forked from andrewjkerr/security-cheatsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nmap
21 lines (15 loc) · 704 Bytes
/
nmap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# HTB scan
# sV: enumerate versions
# sC: safe script
# oA: output all formats
nmap -sV -sC -oA nmap 0.0.0.0
# Nmap verbose scan, runs syn stealth, T4 timing (should be ok on LAN), OS and service version info, traceroute and scripts against services
nmap -v -sS -A -T4 target
# As above but scans all TCP ports (takes a lot longer)
nmap -v -sS -p- -A -T4 target
# As above but scans all TCP ports and UDP scan (takes even longer)
nmap -v -sU -sS -p- -A -T4 target
# Search nmap scripts for keywords
ls /usr/share/nmap/scripts/* | grep ftp
# Nmap script to scan for vulnerable SMB servers - WARNING: unsafe=1 may cause knockover
nmap -v -p 445 --script=smb-check-vulns --script-args=unsafe=1 target