Masscan
是一款极速扫描器,和Nmap
并称扫描界的两大黑社会大哥,Masscan
最大的优势大概在于其性能速度方面的优势,它在理论上可以每秒钟发送2500
万
个探测数据包,号称世界上最快的男人,精度虽然差了Nmap
一点点,但是使用还是要谨慎,不要太装逼,装逼遭雷劈。
🐇性能与帮助
扫描互联网的全部IP地址的一个指定端口
也就需要6分钟左右的时间
它同时也支持TCP
和UDP
协议的端口扫描
🌸格式
┌─[root@icml8]─[/home/icml8]
└──╼ #masscan ip地址/范围 -P 端口选项┌─[root@icml8]─[/home/icml8]
└──╼ #masscan -p 端口选项 ip地址/范围
🍒实例
🌑扫描段内单个端口
─[✗]─[root@icml8]─[/home/icml8]
└──╼ #masscan 10.107.65.0/8 -p 80
🌒扫描段内多个端口
┌─[root@icml8]─[/home/icml8]
└──╼ #masscan 10.107.65.0/8 -p 22,443,80
🌙获取Banner信息
┌─[root@icml8]─[/home/icml8]
└──╼ #masscan 10.0.0.0/8 -p 80 --banners --指定源ip x.x.x.x
🌖全网扫描
┌─[✗]─[root@icml8]─[/home/icml8]
└──╼ #masscan 0.0.0.0/0 -p 0-65535 --rate 100000 --exclude 255.255.255.255
🌘创建配置文件
rate = 100000
output-format = xml
output-status = all
output-filename = scan.xml
ports = 0-65535
range = 0.0.0.0-255.255.255.255
excludefile = exclude.txt
🌔使用配置文件来扫描
用--echo
将当前配置输出到一个配置文件
利用 -c
来制定配置文件进行扫描:
┌─[root@icml8]─[/home/icml8]
└──╼ #masscan -p 80,8000-8100 10.0.0.0/8 --echo > scan.conf
┌─[root@icml8]─[/home/icml8]
└──╼ #masscan -c scan.conf --rate 1000
🌒masscan --nmap
兼容方式
usage:
masscan -p80,8000-8100 10.0.0.0/8 --rate=10000
scan some web ports on 10.x.x.x at 10kpps
masscan --nmap
list those options that are compatible with nmap
masscan -p80 10.0.0.0/8 --banners -oB <filename>
save results of scan in binary format to <filename>
masscan --open --banners --readscan <filename> -oX <savefile>
read binary scan results in <filename> and save them as xml in <savefile>
原文始发于微信公众号(猫因的安全):Masscan扫描器的一些常见用法
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论