-
Notifications
You must be signed in to change notification settings - Fork 14
Port Scanning
lethanhtung01011980 edited this page Jan 4, 2020
·
14 revisions
- --min-parallelism, --max-parallelism
-
nmap -p- -T4 -A -v victim-ip
<======= MUST DO THIS FIRST
- TCP Scanning:
nc -nvv -w 1 -z x.x.x.x 3388-3390
- UDP Scanning:
nc -nv -u -z -w 1 x.x.x.x 160-162
Scan all ports
nmap -p- victim_ip
-
nmap -p- -T4 -A -v victim-ip
: All ports, OS, version detection with faster speed.
Get IPs
nmap -v -sn x.x.x.11-254 -oG ping-sweep.txt
grep Up ping-sweep.txt | cut -d" " -f2 > ping-sweep-ip.txt
Scan through IPs
#!/bin/bash
for ip in $(cat ping-sweep-ip.txt)
do
echo $ip
done
Scan ports
- Port: nmap -p 80 x.x.x.x
- OS: nmap -O x.x.x.x
- Scan ports and get banners:
nmap -sV -sT x.x.x.x
Scan SMB
nmap x.x.x.1-254 --script smb-os-discovery.nse
nmap -p 139,445 -script=smb-vuln* x.x.x.1-254 -oG smb-vul.txt