{"id":358,"date":"2023-05-30T17:21:55","date_gmt":"2023-05-30T15:21:55","guid":{"rendered":"https:\/\/linowebserver.org\/?p=358"},"modified":"2023-05-30T18:32:10","modified_gmt":"2023-05-30T16:32:10","slug":"nmap-cheat-sheet","status":"publish","type":"post","link":"https:\/\/linowebserver.org\/index.php\/2023\/05\/30\/nmap-cheat-sheet\/","title":{"rendered":"NMAP Cheat Sheet v1"},"content":{"rendered":"\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th><strong><u>Port Specification Options<\/u><\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Syntax<\/strong><\/td><td><strong>Example<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>-p<\/td><td>nmap -p 23 192.168.1.1<\/td><td>scanning port 23 of host<\/td><\/tr><tr><td>-p<\/td><td>nmap -p 23-100 192.168.1.1<\/td><td>scanning port range 23-100<\/td><\/tr><tr><td>-pU: , -T:<\/td><td>nmap -pU:110,T:23-25 192.168.1.1<\/td><td>scanning UDP 110 and range 23-25 TCP<\/td><\/tr><tr><td>-p-<\/td><td>nmap -p- 192.168.1.1<\/td><td>scanning all ports<\/td><\/tr><tr><td>-F<\/td><td>nmap -F 192.168.1.1<\/td><td>fast port scan<\/td><\/tr><tr><td>-r<\/td><td>nmap -r 192.168.1.1<\/td><td>sequencial port scan<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><strong><u>Scanning Types (-s \/ -S)<\/u><\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Syntax<\/strong><\/td><td><strong>Example<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>-sS<\/td><td>nmap -sS 192.168.1.1<\/td><td>TCP SYN port Scan<\/td><\/tr><tr><td>-sT<\/td><td>nmap -sT 192.168.1.1<\/td><td>TCP Connet port scan<\/td><\/tr><tr><td>-sA<\/td><td>nmap -sA 192.168.1.1<\/td><td>TCP ACK port scan<\/td><\/tr><tr><td>-sU<\/td><td>nmap -sU 192.168.1.1<\/td><td>UDP port scan<\/td><\/tr><tr><td>-Sf<\/td><td>nmap -Sf 192.168.1.1<\/td><td>TCP FIN scan<\/td><\/tr><tr><td>-Su<\/td><td>nmap -Su 192.168.1.1<\/td><td>UDP scan<\/td><\/tr><tr><td>-sL<\/td><td>nmap -sL 192.168.1.1-253<\/td><td>List scan<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><strong><u>Discovery Scan (-s \/ -P -n)<\/u><\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Syntax<\/strong><\/td><td><strong>Example<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>-sL<\/td><td>nmap -sL 192.168.1.1-254<\/td><td>list x.1-x.254 withour scan<\/td><\/tr><tr><td>-sn<\/td><td>nmap -sn 192.168.1.1\/24<\/td><td>disable port scan<\/td><\/tr><tr><td>-Pn<\/td><td>nmap -Pn 192.168.1.1\/24<\/td><td>only portscan without host discovery<\/td><\/tr><tr><td>-PS<\/td><td>nmap 192.168.1.1 -PS22-25,80,443<\/td><td>SYN specified port scan 22-25,80,443<\/td><\/tr><tr><td>-PA<\/td><td>nmap 192.168.1.1 -PA22-25,80,443<\/td><td>ACK specified port scan 22-25,80,443<\/td><\/tr><tr><td>-PU<\/td><td>nmap 191.68.1.1 -PU53<\/td><td>UDP specified port scan<\/td><\/tr><tr><td>-PR<\/td><td>nmap 192.168.1.1-255<\/td><td>ARP discovery<\/td><\/tr><tr><td>-n<\/td><td>nmap 192.168.1.1 -n<\/td><td>no DNS reselution<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><strong><u>Version Detection<\/u><\/strong><\/th><\/tr><\/thead><tbody><tr><td colspan=\"2\"><strong>Syntax<\/strong><\/td><td colspan=\"2\"><strong>Example<\/strong><\/td><td colspan=\"2\"><strong>Description<\/strong><\/td><\/tr><tr><td colspan=\"2\">-sV<\/td><td colspan=\"2\">nmap -sV 192.168.1.1<\/td><td colspan=\"2\">try to find the version of Service<\/td><\/tr><tr><td colspan=\"2\">-sV &#8211;version-all<\/td><td colspan=\"2\">nmap -sV &#8211;version-all 192.168.1.<\/td><td colspan=\"2\">Set intensily level to 9<\/td><\/tr><tr><td colspan=\"2\">-sV &#8211;version-light<\/td><td colspan=\"2\">nmap -sV &#8211;version-light 192.168.<\/td><td colspan=\"2\">enable light mode<\/td><\/tr><tr><td colspan=\"2\">-A<\/td><td colspan=\"2\">nmap -A 192.168.1.1<\/td><td colspan=\"2\">enable all detections (OS,ver,script)<\/td><\/tr><tr><td colspan=\"2\">-O<\/td><td colspan=\"2\">nmap -O 192.168.1.1<\/td><td colspan=\"2\">OS-Detection<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><strong><u>Scan options<\/u><\/strong><\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"4\"><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\"><strong>Syntax<\/strong><\/td><td colspan=\"2\"><strong>Description<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap -sP 192.168.1.1<\/td><td colspan=\"2\">Ping Scan only<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap 192.168.1.1 192.168.1.100<\/td><td colspan=\"2\">Scan specific Ips<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap 192.168.1.1-253<\/td><td colspan=\"2\">scan a range of Ips<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap test.de<\/td><td colspan=\"2\">scan a domain<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap 192.168.1.0\/24<\/td><td colspan=\"2\">scan using CIDR<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap -iL targets.txt<\/td><td colspan=\"2\">scan from target file<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><strong><u>Specification<\/u><\/strong><\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\"><strong>Syntax<\/strong><\/td><td><strong>description<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap 192.178.1.1<\/td><td colspan=\"2\">single IP scan<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap 192.178.1.1 192.168.100.1<\/td><td colspan=\"2\">scan specific Ips<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap 192.168.1.254<\/td><td colspan=\"2\">scan a range of IPs<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap test.com<\/td><td colspan=\"2\">scan a domain<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap 192.168.1.0\/24<\/td><td colspan=\"2\">scan CIDR notation<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap -iL scan.txt<\/td><td colspan=\"2\">scan from files<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap &#8211;execlude 192.168.1.2<\/td><td colspan=\"2\">exclude a specified IP<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap &#8211;traceroute 192.168.1.1<\/td><td colspan=\"2\">traceroute 192.168.1.1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><strong><u>nmap Output Formats (-o)<\/u><\/strong><\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\"><strong>Syntax<\/strong><\/td><td><strong>description<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">Default \/normal output<\/td><td colspan=\"2\">nmap -oN rs.txt 192.168.1.1<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">XML<\/td><td colspan=\"2\">nmap -oX rs.xml 192.168.1.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">Grepable<\/td><td colspan=\"2\">nmap -oG gp.txt 192.168.1.<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">All formats<\/td><td colspan=\"2\">nmap -oA all.txt 192.168.1.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><strong><u>Firewall Proofing<\/u><\/strong><\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Syntax<\/strong><\/td><td><strong>description<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -f 192.168.1.1<\/td><td>scan fragment packets<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -sTU 1490 192.168.1.1<\/td><td>scan with specified MTU (1490)<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -sI 5 192.168.2.2<\/td><td>scan ZOMBIE<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -source-port 22 192.168.1.1<\/td><td>manual source port -specifiy scan<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -data-length 1400 192.168.1.1<\/td><td>randomly appended data 1400<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -randomize-hosts192.168.1.0\/25<\/td><td>randomly scan of hosts<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><strong><u>Timing Options<\/u><\/strong><\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Syntax<\/strong><\/td><td><strong>description<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -T0 192.168.1.1<\/td><td>slowest<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -T1 192.168.1.1<\/td><td>tricky Scan to avoid IDS<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -T2 192.168.1.1<\/td><td>timely scan<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -T3 192.168.1.1<\/td><td>default scan timer<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -T4 192.168.1.1<\/td><td>aggresive scan timer<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -T5 192.168.1.1<\/td><td>avery aggresive scan timer<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><strong><u>Use of nmap Scipts NSE<\/u><\/strong><\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\"><strong>Syntax<\/strong><\/td><td colspan=\"2\"><strong>description<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap &#8211;script= test script 192.168.1.0\/24<\/td><td colspan=\"2\">execute script against target IP<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap &#8211;script-updatedb<\/td><td colspan=\"2\">update\/adding new scripts<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmap -sV -sC 192.168.1.1<\/td><td colspan=\"2\">safe default Scripts<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\">nmao &#8211;script-help=&#8220;Test Script&#8220;<\/td><td colspan=\"2\">get help for script<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th class=\"has-text-align-left\" data-align=\"left\"><strong><u>Mscellaneous Commands<\/u><\/strong><\/th><\/tr><\/thead><tbody><tr><td class=\"has-text-align-left\" data-align=\"left\" colspan=\"2\"><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\"><strong>Syntax<\/strong><\/td><td><strong>description<\/strong><\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -6<\/td><td>scan IP-V6 targets<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -proxies<\/td><td>run with proxies<\/td><\/tr><tr><td class=\"has-text-align-left\" data-align=\"left\">nmap -open<\/td><td>show open ports only<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Port Specification Options Syntax Example Description -p nmap -p 23 192.168.1.1 scanning port 23 of host -p nmap -p 23-100 192.168.1.1 scanning port range 23-100 -pU: , -T: nmap -pU:110,T:23-25 192.168.1.1 scanning UDP 110 and range 23-25 TCP -p- nmap -p- 192.168.1.1 scanning all ports -F nmap -F 192.168.1.1 fast port scan -r nmap -r [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,33,13,66,9,1,34],"tags":[86,21,23,45,49,25,47,42,84],"class_list":["post-358","post","type-post","status-publish","format-standard","hentry","category-cybersecurity","category-howto-2","category-kali-linux","category-linux-3","category-linux","category-uncategorized","category-windows","tag-cheetsheet","tag-cybersecurity","tag-cybersecuritytraining-2","tag-ethicalhacking","tag-hacking","tag-informationsecurity-2","tag-informationtechnology","tag-infosec","tag-nmap"],"_links":{"self":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/posts\/358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/comments?post=358"}],"version-history":[{"count":11,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/posts\/358\/revisions"}],"predecessor-version":[{"id":377,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/posts\/358\/revisions\/377"}],"wp:attachment":[{"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/media?parent=358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/categories?post=358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linowebserver.org\/index.php\/wp-json\/wp\/v2\/tags?post=358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}