Giter VIP home page Giter VIP logo

np's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

np's Issues

Importing previous results overwrites current ones

In internal/scan/np.go, I stupidly do this:

func (s *Scan) ParseNP() {
 // We're importing an old np session so just unpack into results
 err := json.Unmarshal(s.Bytes, &s.Result.Hosts)
 if err != nil {
  s.Logger.Errorf("error unmarshaling np results: %v", err)
 }
}

This is fine as long as the np JSON file is the first thing to be unpacked, but there is no guaranteeing that. Need to refactor this to add hosts rather than unmarshal onto results.

Refactor -service

It should work like this:

$ np -service http
scanme.nmap.org:80
some.site.com:8443

Refactor Nmap scan

Currently internal/scan/nmap.go imports internal/result. This shouldn't be the case; each type of scan should be a more or less standalone package and we should handle importing the result elsewhere, probably in internal/scan.

Add -exclude flag

Some hosts annoyingly and falsely state that every port is open. Likely to gum up port scans. This can result in 65k open ports in scan output, which is gross to look at.

The following should work:

  • np -exclude 10.2.4.1
  • np -exclude 10.2.4.1,10.1.5.9
  • np -exclude www.bishopfox.com

Refactor output

Move to an output.go, decide on the format. We'll need:

  • JSON
  • -ports (all, suitable for nmap usage)
  • -hosts (alive)
  • -services (all)
  • -service match

Don't print port headers if there are no ports

Check for ports before printing the headers so we don't get this:

PORT    SERVICE PRODUCT                          VERSION
161/udp snmp    net-snmp; net-snmp SNMPv3 server                     
                                                                                                                                             
PORT SERVICE PRODUCT VERSION                                          
                                                                                                                                             
PORT SERVICE PRODUCT VERSION                                         
                                                                      
PORT SERVICE PRODUCT VERSION 

Add support for DNSx

It would be handy to be able to ingest name resolution data along with port scan data. This would allow us to scan by IP initially, and then later add hostnames.

Sort output

All outputs with the exception of JSON should be sorted according to the output type (e.g. -services should be sorted by service, -hosts should be sorted by hostname or IP)

Explore Timeline Output

It would be neat to show the changes over time rather than the end state. For example, if you run one scan per day, np would start at the oldest and process scan 1:

$ np
2022-01-01 12:10 AM 10.1.23.5 80/tcp open
2022-01-01 12:10 AM 10.1.23.5 22/tcp open

Then a subsequent scan against the host after SNMP has been enabled:

2022-01-02 12:10 AM 10.1.23.5 161/udp open

And later HTTP is disabled:

2022-01-03 12:10 AM 10.1.23.5 80/tcp closed

This would allow us to review only the changes for each new scan processed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.