summaryrefslogtreecommitdiff
path: root/plugins/nmap
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2015-02-23 09:33:06 -0800
committerRobby Russell <robby@planetargon.com>2015-02-23 09:33:06 -0800
commit656db4dfacfc6abe73299c447e0216e0c71fa8ee (patch)
tree385dfa5ca0dca6c12c21cc3c17a13d92c9f02061 /plugins/nmap
parent31e29e1efbd81df46d9e6ef03a4e4d3bfaf78007 (diff)
parent0dc7b5c049b9cfb747b48d13b32799266b231caf (diff)
downloadzsh-656db4dfacfc6abe73299c447e0216e0c71fa8ee.tar.gz
zsh-656db4dfacfc6abe73299c447e0216e0c71fa8ee.tar.bz2
zsh-656db4dfacfc6abe73299c447e0216e0c71fa8ee.zip
Merge pull request #3623 from uberspot/nmap_feat
Add nmap plugin with some aliases for scan modes
Diffstat (limited to 'plugins/nmap')
-rw-r--r--plugins/nmap/README.md32
-rw-r--r--plugins/nmap/nmap.plugin.zsh28
2 files changed, 60 insertions, 0 deletions
diff --git a/plugins/nmap/README.md b/plugins/nmap/README.md
new file mode 100644
index 000000000..8bb8e0648
--- /dev/null
+++ b/plugins/nmap/README.md
@@ -0,0 +1,32 @@
+# Nmap aliases plugin
+
+Adds some useful aliases for nmap similar to the profiles in zenmap.
+
+Nmap options are:
+ * -sS - TCP SYN scan
+ * -v - verbose
+ * -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
+ * -PP - timestamp discovery probe
+ * -PY - SCTP init ping
+ * -g - use given number as source port
+ * -A - enable OS detection, version detection, script scanning, and traceroute (aggressive)
+ * -O - enable OS detection
+ * -sA - TCP ACK scan
+ * -F - fast scan
+ * --script=vulscan - also access vulnerabilities in target
+
+## Aliases explained
+
+ * nmap_open_ports - scan for open ports on target
+ * nmap_list_interfaces - list all network interfaces on host where the command runs
+ * nmap_slow - slow scan that avoids to spam the targets logs
+ * nmap_fin - scan to see if hosts are up with TCP FIN scan
+ * nmap_full - aggressive full scan that scans all ports, tries to determine OS and service versions
+ * nmap_check_for_firewall - TCP ACK scan to check for firewall existence
+ * nmap_ping_through_firewall - Host discovery with SYN and ACK probes instead of just pings to avoid firewall
+ restrictions
+ * nmap_fast - Fast scan of the top 300 popular ports
+ * nmap_detect_versions - detects versions of services and OS, runs on all ports
+ * nmap_check_for_vulns - uses vulscan script to check target services for vulnerabilities
diff --git a/plugins/nmap/nmap.plugin.zsh b/plugins/nmap/nmap.plugin.zsh
new file mode 100644
index 000000000..f3603f622
--- /dev/null
+++ b/plugins/nmap/nmap.plugin.zsh
@@ -0,0 +1,28 @@
+# Some useful nmap aliases for scan modes
+
+# Nmap options are:
+# -sS - TCP SYN scan
+# -v - verbose
+# -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
+# -PP - timestamp discovery probe
+# -PY - SCTP init ping
+# -g - use given number as source port
+# -A - enable OS detection, version detection, script scanning, and traceroute (aggressive)
+# -O - enable OS detection
+# -sA - TCP ACK scan
+# -F - fast scan
+# --script=vulscan - also access vulnerabilities in target
+
+alias nmap_open_ports="nmap --open"
+alias nmap_list_interfaces="nmap --iflist"
+alias nmap_slow="nmap -sS -v -T1"
+alias nmap_fin="nmap -sF -v"
+alias nmap_full="nmap -sS -T4 -PE -PP -PS80,443 -PY -g 53 -A -p1-65535 -v"
+alias nmap_check_for_firewall="nmap -sA -p1-65535 -v -T4"
+alias nmap_ping_through_firewall="nmap -PS -PA"
+alias nmap_fast="nmap -F -T5 --top-ports 300"
+alias nmap_detect_versions="nmap -sV -p1-65535 -O --osscan-guess -T4 -Pn"
+alias nmap_check_for_vulns="nmap --script=vulscan"
+