MASSIVE NETWORK DISCOVERY

masscan | public

INSTALL

ubuntu

apt install masscan

from source

# ubuntu
apt install gcc git make libpcap-dev

# slackware
ls -lF /var/log/packages/{gcc,git,libcap,make}-[0-9]*

git clone https://github.com/robertdavidgraham/masscan
cd masscan/
grep ^proc /proc/cpuinfo
echo $MAKEFLAGS
make >/dev/null && echo BUILT
make install >/dev/null && echo INSTALLED
which masscan

USAGE

list options compatible with nmap

masscan --nmap

the defaults are

-sS -Pn -n --randomize-hosts -v --send-eth

LAN

cidr=x.x.x.x/xx

masscan $cidr -p0-65535 --rate=100000 -oB ${cidr/\//_}.alltcp
masscan --readscan ${cidr/\//_}.alltcp

masscan --readscan ${cidr/\//_}.alltcp -oG - | grep -v ^# | sort -V -k4

specific ip list

masscan -iL list.ip --rate=100000 --open-only --banners --top-ports 1000 -oB list.ip.top1000tcp
masscan --readscan list.ip.top1000tcp

masscan -iL list.ip --rate=100000 --open-only --banners -p0-65535 --offline
masscan -iL list.ip --rate=100000 --open-only --banners -p0-65535 -oB list.ip.alltcp
masscan --readscan list.ip.alltcp

the whole internet – see masscan-public

ADDITIONAL NOTES

check the settings

masscan --echo

define your own

ls -lF /etc/masscan/masscan.conf # no exist
mkdir -p /etc/masscan/
vi /etc/masscan/masscan.conf

rate = 100000

RESOURCES

https://github.com/robertdavidgraham/masscan/blob/master/doc/masscan.8.markdown

https://danielmiessler.com/study/masscan/


https://stackoverflow.com/questions/51005045/performing-a-masscan-on-an-input-file-containing-domain-names

https://techyrick.com/masscan-full-tutorial/ ==> -pU:53, –http-user-agent


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun