# 1 echo request to a host
ping -c 1 199.66.11.4
# Send echo requests to ranges
fping -g 199.66.11.0/24
#Send echo, timestamp requests and subnet mask requests
nmap -PEPM -sP -n 199.66.11.0/24
TCP LARGE SCAN
#Using masscan to scan top20ports of nmap in a /24 range (less than 5min)
masscan -p20,21-23,25,53,80,110,111,135,139,143,443,445,993,995,1723,3306,3389,5900,8080 199.66.11.0/24
HTTP PORT SCAN
masscan -p80,443,8000-8100,8443 199.66.11.0/24
UDP SCAN
nmap -sU -sV --version-intensity 0 -F -n 199.66.11.53/24
# The -sV will make nmap test each possible known UDP service packet
# The "--version-intensity 0" will make nmap only test the most probable
# wget https://raw.githubusercontent.com/CiscoCXSecurity/udp-proto-scanner/master/udp-proto-scanner.pl
#chmod +x udp-proto-scanner.pl
./udp-proto-scanner.pl 199.66.11.53/24
It looks for :
- DNS
- TFTP
- NTP
- NBT
- SunRPC
- MS SQL
- DB2
- SNMPv3
SCTP SCAN
#Probably useless, but it's pretty fast, why not trying?
nmap -T4 -sY -n --open -Pn <IP/range>
Internal/On-Site Scan
Passsive wardriving
netdiscover -p
p0f -i eth0 -p -o /tmp/p0f.log
# Bettercap
sudo bettercap
net.recon on/off #Read local ARP cache periodically
net.show
set net.show.meta true #more info
-p = Passive mode : only sniff
Active wardriving
#ARP discovery
nmap -sn <Network> #ARP Requests (Discover IPs)
netdiscover -r 192.168.63.0/24 #ARP requests (Discover IPs)
#NBT discovery
nbtscan -r 192.168.0.1/24 #Search in Domain
# Bettercap
net.probe on/off #Discover hosts on current subnet by probing with ARP, mDNS, NBNS, UPNP, and/or WSD
set net.probe.mdns true/false #Enable mDNS discovery probes (default=true)
set net.probe.nbns true/false #Enable NetBIOS name service discovery probes (default=true)
set net.probe.upnp true/false #Enable UPNP discovery probes (default=true)
set net.probe.wsd true/false #Enable WSD discovery probes (default=true)
set net.probe.throttle 10 #10ms between probes sent (default=10)
#IPv6
alive6 <IFACE> # Send a pingv6 to multicast.