Advertisement
UHLI_REMO

Nmap basic commands

Apr 25th, 2016
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.00 KB | None | 0 0
  1.  
  2.  
  3. List of NMAP Commands
  4. A GUEST SEP 29TH, 2012 514 NEVER
  5.  
  6. rawdownloadreport 5.80 KB
  7. Basic Scanning Techniques
  8.  
  9. Scan a single target —> nmap [target]
  10.  
  11. Scan multiple targets —> nmap [target1,target2,etc]
  12.  
  13. Scan a list of targets —-> nmap -iL [list.txt]
  14.  
  15. Scan a range of hosts —-> nmap [range of IP addresses]
  16.  
  17. Scan an entire subnet —-> nmap [IP address/cdir]
  18.  
  19. Scan random hosts —-> nmap -iR [number]
  20.  
  21. Excluding targets from a scan —> nmap [targets] –exclude [targets]
  22.  
  23. Excluding targets using a list —> nmap [targets] –excludefile [list.txt]
  24.  
  25. Perform an aggressive scan —> nmap -A [target]
  26.  
  27. Scan an IPv6 target —> nmap -6 [target]
  28.  
  29. Discovery Options
  30.  
  31. Perform a ping scan only —> nmap -sP [target]
  32.  
  33. Don’t ping —> nmap -PN [target]
  34.  
  35. TCP SYN Ping —> nmap -PS [target]
  36.  
  37. TCP ACK ping —-> nmap -PA [target]
  38.  
  39. UDP ping —-> nmap -PU [target]
  40.  
  41. SCTP Init Ping —> nmap -PY [target]
  42.  
  43. ICMP echo ping —-> nmap -PE [target]
  44.  
  45. ICMP Timestamp ping —> nmap -PP [target]
  46.  
  47. ICMP address mask ping —> nmap -PM [target]
  48.  
  49. IP protocol ping —-> nmap -PO [target]
  50.  
  51. ARP ping —> nmap -PR [target]
  52.  
  53. Traceroute —> nmap –traceroute [target]
  54.  
  55. Force reverse DNS resolution —> nmap -R [target]
  56.  
  57. Disable reverse DNS resolution —> nmap -n [target]
  58.  
  59. Alternative DNS lookup —> nmap –system-dns [target]
  60.  
  61. Manually specify DNS servers —> nmap –dns-servers [servers] [target]
  62.  
  63. Create a host list —-> nmap -sL [targets]
  64.  
  65. Advanced Scanning Options
  66.  
  67. TCP SYN Scan —> nmap -sS [target]
  68.  
  69. TCP connect scan —-> nmap -sT [target]
  70.  
  71. UDP scan —-> nmap -sU [target]
  72.  
  73. TCP Null scan —-> nmap -sN [target]
  74.  
  75. TCP Fin scan —> nmap -sF [target]
  76.  
  77. Xmas scan —-> nmap -sX [target]
  78.  
  79. TCP ACK scan —> nmap -sA [target]
  80.  
  81. Custom TCP scan —-> nmap –scanflags [flags] [target]
  82.  
  83. IP protocol scan —-> nmap -sO [target]
  84.  
  85. Send Raw Ethernet packets —-> nmap –send-eth [target]
  86.  
  87. Send IP packets —-> nmap –send-ip [target]
  88.  
  89. Port Scanning Options
  90.  
  91. Perform a fast scan —> nmap -F [target]
  92.  
  93. Scan specific ports —-> nmap -p [ports] [target]
  94.  
  95. Scan ports by name —-> nmap -p [port name] [target]
  96.  
  97. Scan ports by protocol —-> nmap -sU -sT -p U:[ports],T:[ports] [target]
  98.  
  99. Scan all ports —-> nmap -p “*” [target]
  100.  
  101. Scan top ports —–> nmap –top-ports [number] [target]
  102.  
  103. Perform a sequential port scan —-> nmap -r [target]
  104.  
  105. Version Detection
  106.  
  107. Operating system detection —-> nmap -O [target]
  108.  
  109. Submit TCP/IP Fingerprints —-> www.nmap.org/submit/
  110.  
  111. Attempt to guess an unknown —-> nmap -O –osscan-guess [target]
  112.  
  113. Service version detection —-> nmap -sV [target]
  114.  
  115. Troubleshooting version scans —-> nmap -sV –version-trace [target]
  116.  
  117. Perform a RPC scan —-> nmap -sR [target]
  118.  
  119. Timing Options
  120.  
  121. Timing Templates —-> nmap -T [0-5] [target]
  122.  
  123. Set the packet TTL —-> nmap –ttl [time] [target]
  124.  
  125. Minimum of parallel connections —-> nmap –min-parallelism [number] [target]
  126.  
  127. Maximum of parallel connection —-> nmap –max-parallelism [number] [target]
  128.  
  129. Minimum host group size —–> nmap –min-hostgroup [number] [targets]
  130.  
  131. Maximum host group size —-> nmap –max-hostgroup [number] [targets]
  132.  
  133. Maximum RTT timeout —–> nmap –initial-rtt-timeout [time] [target]
  134.  
  135. Initial RTT timeout —-> nmap –max-rtt-timeout [TTL] [target]
  136.  
  137. Maximum retries —-> nmap –max-retries [number] [target]
  138.  
  139. Host timeout —-> nmap –host-timeout [time] [target]
  140.  
  141. Minimum Scan delay —-> nmap –scan-delay [time] [target]
  142.  
  143. Maximum scan delay —-> nmap –max-scan-delay [time] [target]
  144.  
  145. Minimum packet rate —-> nmap –min-rate [number] [target]
  146.  
  147. Maximum packet rate —-> nmap –max-rate [number] [target]
  148.  
  149. Defeat reset rate limits —-> nmap –defeat-rst-ratelimit [target]
  150.  
  151. Firewall Evasion Techniques
  152.  
  153. Fragment packets —-> nmap -f [target]
  154.  
  155. Specify a specific MTU —-> nmap –mtu [MTU] [target]
  156.  
  157. Use a decoy —-> nmap -D RND: [number] [target]
  158.  
  159. Idle zombie scan —> nmap -sI [zombie] [target]
  160.  
  161. Manually specify a source port —-> nmap –source-port [port] [target]
  162.  
  163. Append random data —-> nmap –data-length [size] [target]
  164.  
  165. Randomize target scan order —-> nmap –randomize-hosts [target]
  166.  
  167. Spoof MAC Address —-> nmap –spoof-mac [MAC|0|vendor] [target]
  168.  
  169. Send bad checksums —-> nmap –badsum [target]
  170.  
  171. Output Options
  172.  
  173. Save output to a text file —-> nmap -oN [scan.txt] [target]
  174.  
  175. Save output to a xml file —> nmap -oX [scan.xml] [target]
  176.  
  177. Grepable output —-> nmap -oG [scan.txt] [target]
  178.  
  179. Output all supported file types —-> nmap -oA [path/filename] [target]
  180.  
  181. Periodically display statistics —-> nmap –stats-every [time] [target]
  182.  
  183. 133t output —-> nmap -oS [scan.txt] [target]
  184.  
  185. Troubleshooting and debugging
  186.  
  187. Help —> nmap -h
  188.  
  189. Display Nmap version —-> nmap -V
  190.  
  191. Verbose output —-> nmap -v [target]
  192.  
  193. Debugging —-> nmap -d [target]
  194.  
  195. Display port state reason —-> nmap –reason [target]
  196.  
  197. Only display open ports —-> nmap –open [target]
  198.  
  199. Trace packets —> nmap –packet-trace [target]
  200.  
  201. Display host networking —> nmap –iflist
  202.  
  203. Specify a network interface —> nmap -e [interface] [target]
  204.  
  205. Nmap Scripting Engine
  206.  
  207. Execute individual scripts —> nmap –script [script.nse] [target]
  208.  
  209. Execute multiple scripts —-> nmap –script [expression] [target]
  210.  
  211. Script categories —-> all, auth, default, discovery, external, intrusive, malware, safe, vuln
  212.  
  213. Execute scripts by category —-> nmap –script [category] [target]
  214.  
  215. Execute multiple scripts categories —-> nmap –script [category1,category2, etc]
  216.  
  217. Troubleshoot scripts —-> nmap –script [script] –script-trace [target]
  218.  
  219. Update the script database —-> nmap –script-updatedb
  220.  
  221. Ndiff
  222.  
  223. Comparison using Ndiff —-> ndiff [scan1.xml] [scan2.xml]
  224.  
  225. Ndiff verbose mode —-> ndiff -v [scan1.xml] [scan2.xml]
  226.  
  227. XML output mode —-> ndiff –xml [scan1.xm] [scan2.xml]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement