Scanning

Automation Scan

All Port Scan

TCP

nmap -p- -T3 $ip -o all_tcp.nmap

Scan

sudo nmap -sU -p- $ip -o all_udp.nmap

Create ports

ports=$(cat all_tcp.nmap | grep ^[0-9] | cut -d '/' -f1 | tr '\n' ',' | sed s/,$//); echo $ports

Service Scan

nmap -sC -sV -p$ports $ip

Script Scan

nmap --script smb-vul* -p 139,445 $ip
nmap -p 1433 --script ms-sql-brute --script-args userdb=customuser.txt,passdb=custompass.txt <host>

Last updated