diff --git a/plugins/nmap/nmap.plugin.zsh b/plugins/nmap/nmap.plugin.zsh index d09f2c61..f9ff9ca2 100644 --- a/plugins/nmap/nmap.plugin.zsh +++ b/plugins/nmap/nmap.plugin.zsh @@ -1,8 +1,13 @@ # Some useful nmap aliases for scan modes -# Nmap options are: +# Nmap options: # -sS - TCP SYN scan # -v - verbose +# -f - fragment tcp packets +# --spoof-mac - clone mac address, try to find hosts of trust and clone their mac +# -D - create Decoys, slower but difficult to trace real ip. Try to decoy real ip addresses +# --data-length - increase or decrease data length to avoid IDS +# -n - skip DNS resolution # -T1 - timing of scan. Options are paranoid (0), sneaky (1), polite (2), normal (3), aggressive (4), and insane (5) # -sF - FIN scan (can sneak through non-stateful firewalls) # -PE - ICMP echo discovery probe @@ -13,7 +18,18 @@ # -O - enable OS detection # -sA - TCP ACK scan # -F - fast scan +# -sn - disable port scan +# -Pn - treat host as UP, skip host discovery. +# --open - show only open (not filtered) ports. Good for quick recon. +# -g - change source port, for firewall evasion, (port 53 = dns queries, port 67 = DHCP). +# +# Nmap Scripts: # --script=vulscan - also access vulnerabilities in target +# --script='smb-vuln* and not smb-vuln-regsvc-dos' - check for smb vulns but discard unsafe D.o.S. +# --script=dns-brute - check for dns entries. +# --script=http-sql-injection - check for SQL injection, watch for false positives. +# --script=http-vhosts - search for common virtual hosts. +# --script=auth - check for badly configure devices, common/empty passwords, etc. alias nmap_open_ports="nmap --open" alias nmap_list_interfaces="nmap --iflist" @@ -29,4 +45,11 @@ alias nmap_full_udp="nmap -sS -sU -T4 -A -v -PE -PS22,25,80 -PA21,23,80,443,3389 alias nmap_traceroute="nmap -sP -PE -PS22,25,80 -PA21,23,80,3389 -PU -PO --traceroute " alias nmap_full_with_scripts="sudo nmap -sS -sU -T4 -A -v -PE -PP -PS21,22,23,25,80,113,31339 -PA80,113,443,10042 -PO --script all " alias nmap_web_safe_osscan="sudo nmap -p 80,443 -O -v --osscan-guess --fuzzy " - +alias nmap_dns_brute="sudo nmap --script=dns-brute -T3 " +alias nmap_dns_brute_noscan="sudo nmap -sn -Pn --script=dns-brute -T3 " +alias nmap_check_smb_vuln="sudo nmap --script='smb-vuln* and not smb-vuln-regsvc-dos' -p445,139 --open " +alias nmap_find_sqli="sudo nmap --script=http-sql-injection " +alias nmap_fast_auth="sudo nmap --script=auth -Pn -n -g53 -T4 -F " +alias nmap_find_vhosts="sudo nmap --script=http-vhosts " +# use 3 decoys, 53 as source port, normal speed, change data length, spoof a cisco MAC addr, never ping, never dns resolution. +alias nmap_firewall_bypass="sudo nmap --script=firewall-bypass -D RND:3,ME -g53 -f -T3 --data-length 72 --spoof-mac cisco -n -Pn " \ No newline at end of file