Open arubaxi opened 4 years ago
Banners are not emitted to stdout. You will need to use an output file format that supports writing the banners. Try using -oJ masscan.log
or -oD masscan.log
Output file also doesn't have anything related to banners
And you followed the documentation and told your TCP/IP stack to ignore traffic to your machine on the port you're specifying? I see you used --source-port 60000
, so you should have used:
iptables -A INPUT -p TCP --dport 60000 -j DROP
Check with:
$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP tcp -- anywhere anywhere tcp dpt:61000
...
I can't help much beyond this. There's not much else that can go wrong here unless you're using a file format that doesn't support it (use -oJ
, -oD
, or one of the other fuller formats over -oG
)
$ masscan 5.10.205.0/24 --rate 5000 -p 80 --banners --source-port 61000 -oD out.ndjson
Starting masscan 1.3.2 (http://bit.ly/14GZzcT) at 2021-07-10 18:52:11 GMT
Initiating SYN Stealth Scan
Scanning 1 hosts [1 port/host]
$ cat out.ndjson| jq '. | select(.rec_type == "banner") | .data.banner' -r
Apache/2.2.22 (Debian)
HTTP/1.1 200 OK
Date: Sat, 10 Jul 2021 18:52:13 GMT
Server: Apache/2.2.22 (Debian)
Last-Modified: Mon, 06 Oct 2014 08:38:36 GMT
ETag: "18084e-b1-504bd02365b00"
Accept-Ranges: bytes
Content-Length: 177
Vary: Accept-Encoding
Connection: close
Content-Type: text/html
...
I am unable to get
--banners
working using masscan versions from (a) Ubuntu 18 repo (b) Debian 10 repo (c) compiled from this repoIt works fine for port discovery, but never does the banner work nor shows the 'Banner on' messages. I am expecting to get
Tried various combinations:
Tried on different VPS from different VPS providers.
None of them show banners for me. Is there any other parameter that should be added in order to get it working?