- Apr 25, 2015
- 1,845
- 2
- 2,199
- 327
Looking for port 80 on a specific subnet?
Write your IP list:
I find that sometimes, if you do not use --unprivileged, everything can report back as open within Nmap.
Find some random servers with port 80 open:
The main difference here is Nmap does not (to my knowledge) have a built-in way to continue scanning until it finds X# of hosts listening on a certain port. For example, with the Nmap method you may find 5 hosts listening on port 80 by scanning 100 random hosts. ZMap outperforms here, by allowing -N 100, to keep scanning until 100 hosts listening on 80 are scanned. If you want to continuously scan with Nmap to discover hosts listening on 80, you would need to add 0 to iR e.g.
As we know, simply having port 80 does not mean a server is there so how about we perform service discovery against our list(s)?
.. that is all for today, might add more later.
ZMap would have to use something else like ZGrab (or wget), something to check http status codes or server info etc.
Code:
nmap -p80 --unprivileged 172.22.1.0/24
zmap -p80 172.22.1.0/24
Write your IP list:
Code:
nmap -p80 --unprivileged 172.22.1.0/24 -oG - | grep "/open" | awk '{ print $2 }' > wicked.list
zmap -p80 172.22.1.0/24 -o wicked.list
Find some random servers with port 80 open:
Code:
nmap -p 80 -iR 100 -oG - | grep "/open" | awk '{ print $2 }' > wicked.list
zmap -p 80 -N 100 -o wicked.list
nmap -Pn -sS -p 80 -iR 0
As we know, simply having port 80 does not mean a server is there so how about we perform service discovery against our list(s)?
Code:
nmap -p80 -sV -iL wicked.list
.. that is all for today, might add more later.
ZMap would have to use something else like ZGrab (or wget), something to check http status codes or server info etc.