summaryrefslogtreecommitdiff
path: root/plugins/nmap
diff options
context:
space:
mode:
authorCiacho <ciacho@ciacho.pl>2016-01-27 21:39:53 +0100
committerMarc Cornellà <marc.cornella@live.com>2020-02-27 18:25:39 +0100
commit011c7153d589b52eb1d48fdf22d4f1438449be2b (patch)
tree3aac821eef3057977908d70c144c646c049d6ea3 /plugins/nmap
parent6b54302b90720437300967b3506bffe00a3e243c (diff)
downloadzsh-011c7153d589b52eb1d48fdf22d4f1438449be2b.tar.gz
zsh-011c7153d589b52eb1d48fdf22d4f1438449be2b.tar.bz2
zsh-011c7153d589b52eb1d48fdf22d4f1438449be2b.zip
nmap: add alias for ICMP scan (#4807)
Closes #4807
Diffstat (limited to 'plugins/nmap')
-rw-r--r--plugins/nmap/README.md54
-rw-r--r--plugins/nmap/nmap.plugin.zsh2
2 files changed, 23 insertions, 33 deletions
diff --git a/plugins/nmap/README.md b/plugins/nmap/README.md
index 5cd646277..0a60068c2 100644
--- a/plugins/nmap/README.md
+++ b/plugins/nmap/README.md
@@ -1,37 +1,27 @@
-# Nmap aliases plugin
+# Nmap plugin
-Adds some useful aliases for nmap similar to the profiles in zenmap.
+Adds some useful aliases for [Nmap](https://nmap.org/) 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
+To use it, add `nmap` to the plugins array in your zshrc file:
-## Aliases explained
+```zsh
+plugins=(... nmap)
+```
- * 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
- * nmap_full_udp - Same as full but via UDP
- * nmap_traceroute - Try to traceroute using the most common ports
- * nmap_full_with_scripts - Same as nmap_full but also runs all the scripts
- * nmap_web_safe_osscan - Little "safer" scan for OS version as connecting to only HTTP and HTTPS ports doesn't look so attacking.
+## Aliases
+- `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.
+- `nmap_full_udp`: same as full but via UDP.
+- `nmap_traceroute`: try to traceroute using the most common ports.
+- `nmap_full_with_scripts`: same as nmap_full but also runs all the scripts.
+- `nmap_web_safe_osscan`: little "safer" scan for OS version as connecting to only HTTP and HTTPS ports doesn't look so attacking.
+- `nmap_ping_scan`: ICMP scan for active hosts.
diff --git a/plugins/nmap/nmap.plugin.zsh b/plugins/nmap/nmap.plugin.zsh
index 8c691bdaa..406870f00 100644
--- a/plugins/nmap/nmap.plugin.zsh
+++ b/plugins/nmap/nmap.plugin.zsh
@@ -29,4 +29,4 @@ alias nmap_full_udp="sudo nmap -sS -sU -T4 -A -v -PE -PS22,25,80 -PA21,23,80,443
alias nmap_traceroute="sudo 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_ping_scan="nmap -n -sP"