{"id":911,"date":"2011-04-10T14:18:44","date_gmt":"2011-04-10T06:18:44","guid":{"rendered":"http:\/\/www.jpuyy.com\/blog\/?p=911"},"modified":"2020-11-21T21:04:26","modified_gmt":"2020-11-21T13:04:26","slug":"linux-nmap","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=911","title":{"rendered":"linux\u5de5\u5177\u4e4bnmap"},"content":{"rendered":"<p><a href=\"http:\/\/en.wikipedia.org\/wiki\/Nmap\">http:\/\/en.wikipedia.org\/wiki\/Nmap<\/a><\/p>\n<p>The Network Mapper<\/p>\n<ul>\n<li>\u5b89\u88c5nmap:<\/li>\n<\/ul>\n<pre>apt-get install nmap<\/pre>\n<ul>\n<li>\u68c0\u67e5\u6211\u6240\u5728\u7f51\u6bb5\u6709\u591a\u5c11\u53f0\u201c\u6d3b\u7740\u201d\u7684\u673a\u5668(P\u4ee3\u8868ping)<\/li>\n<\/ul>\n<pre>root@debian:~# nmap -sP 219.xxx.xxx.0\/24  \u00a0 \u00a0 \u00a0 \u00a0 #\u53ef\u4ee5\u67e5\u770b\u5230MAC\u5730\u5740<\/pre>\n<ul>\n<li>\u67e5\u770b\u672c\u673a0-1000\u90fd\u5f00\u653e\u4e86\u4ec0\u4e48\u7aef\u53e3<\/li>\n<\/ul>\n<pre>root@debian:~# nmap -p 0-1000 localhost<\/pre>\n<ul>\n<ul>\n<li>\u67e5\u770b\u540c\u7f51\u6bb5\u54ea\u4e9b\u5f00\u4e86 3389 \u7aef\u53e3<\/li>\n<\/ul>\n<pre>root@debian:~# nmap 192.168.1.0\/24 -p 3389<\/pre>\n<ul>\n<li>\u68c0\u67e5\u6211\u672c\u8eab\u7684\u673a\u5668\u5f00\u653e\u4e86\u54ea\u4e9b\u7aef\u53e3(T\u4ee3\u8868Tcp,U\u4ee3\u8868Udp)<\/li>\n<\/ul>\n<pre>root@debian:~# nmap -sTU localhost<\/pre>\n<p>\u53c2\u6570\u8bf4\u660e\uff1a<br \/>\n1.SYN\u626b\u63cf,\u53c8\u79f0\u4e3a\u534a\u5f00\u653e\u626b\u63cf\uff0c\u5b83\u4e0d\u6253\u5f00\u4e00\u4e2a\u5b8c\u5168\u7684TCP\u8fde\u63a5\uff0c\u6267\u884c\u5f97\u5f88\u5feb\uff1a<\/p>\n<pre>nmap -sS 192.168.32.0\/24<\/pre>\n<p>2.\u5f53SYN\u626b\u63cf\u4e0d\u80fd\u7528\u65f6\uff0cTCP Connect()\u626b\u63cf\u5c31\u662f\u9ed8\u8ba4\u7684TCP\u626b\u63cf\uff1a<\/p>\n<pre> nmap -sT 192.168.32.0\/24<\/pre>\n<p>3.UDP\u626b\u63cf\u7528-sU\u9009\u9879,UDP\u626b\u63cf\u53d1\u9001\u7a7a\u7684(\u6ca1\u6709\u6570\u636e)UDP\u62a5\u5934\u5230\u6bcf\u4e2a\u76ee\u6807\u7aef\u53e3:<\/p>\n<pre> nmap -sU 192.168.32.0\/24<\/pre>\n<h2><span style=\"color: #ff6600;\">\u4ee5\u4e0b\u5185\u5bb9\u6765\u81eawiki\uff1a<\/span><\/h2>\n<p>Basic commands working in Nmap<\/p>\n<ul>\n<li>For target specifications :\u68c0\u6d4b\u8be6\u7ec6\u4fe1\u606f<\/li>\n<\/ul>\n<p>nmap &lt;target&#8217;s URL&#8217;s or IP&#8217;s with spaces between them(can also use CIDR notation)&gt;<br \/>\ne.g. : scanme.nmap.org, microsoft.com\/24, 192.168.0.1; 10.0.0\u2013255.1\u2013254 (The command is nmap scanme.nmap.org and similar)<\/p>\n<ul>\n<li>For OS detection :\u68c0\u6d4b\u7cfb\u7edf\u7248\u672c<\/li>\n<\/ul>\n<pre>nmap -O &lt;target-host's URL or IP&gt;<\/pre>\n<ul>\n<li>For Version detection:\u68c0\u6d4b\u5e94\u7528\u7a0b\u5e8f\u7248\u672c<\/li>\n<\/ul>\n<pre>nmap -sV &lt;target-host's URL or IP&gt;<\/pre>\n<ul>\n<li>For configuring response timings(-T0 to -T5 :increasing in aggressiveness): \u00a0 #\u68c0\u6d4b\u53cd\u5e94\u65f6\u95f4<\/li>\n<\/ul>\n<pre>nmap -T0 -sV -O &lt;target-host's URL or IP&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/en.wikipedia.org\/wiki\/Nmap The Network Mapper \u5b89\u88c5nmap: apt-get install nmap \u68c0\u67e5\u6211\u6240\u5728\u7f51\u6bb5\u6709\u591a\u5c11\u53f0\u201c\u6d3b\u7740\u201d\u7684\u673a\u5668(P\u4ee3\u8868ping) root@debian:~# nmap -sP 219.xxx.xxx.0\/24 \u00a0 \u00a0 \u00a0 \u00a0 #\u53ef\u4ee5\u67e5\u770b\u5230MAC\u5730\u5740 \u67e5\u770b\u672c\u673a0-1000\u90fd\u5f00\u653e\u4e86\u4ec0\u4e48\u7aef\u53e3 root@debian:~# nmap -p 0-1000 localhost \u67e5\u770b\u540c\u7f51\u6bb5\u54ea\u4e9b\u5f00\u4e86 3389 \u7aef\u53e3 root@debian:~# nmap 192.168.1.0\/24 -p 3389 \u68c0\u67e5\u6211\u672c\u8eab\u7684\u673a\u5668\u5f00\u653e\u4e86\u54ea\u4e9b\u7aef\u53e3(T\u4ee3\u8868Tcp,U\u4ee3\u8868Udp) root@debian:~# nmap -sTU localhost \u53c2\u6570\u8bf4\u660e\uff1a 1.SYN\u626b\u63cf,\u53c8\u79f0\u4e3a\u534a\u5f00\u653e\u626b\u63cf\uff0c\u5b83\u4e0d\u6253\u5f00\u4e00\u4e2a\u5b8c\u5168\u7684TCP\u8fde\u63a5\uff0c\u6267\u884c\u5f97\u5f88\u5feb\uff1a nmap -sS 192.168.32.0\/24 2.\u5f53SYN\u626b\u63cf\u4e0d\u80fd\u7528\u65f6\uff0cTCP Connect()\u626b\u63cf\u5c31\u662f\u9ed8\u8ba4\u7684TCP\u626b\u63cf\uff1a nmap -sT 192.168.32.0\/24 3.UDP\u626b\u63cf\u7528-sU\u9009\u9879,UDP\u626b\u63cf\u53d1\u9001\u7a7a\u7684(\u6ca1\u6709\u6570\u636e)UDP\u62a5\u5934\u5230\u6bcf\u4e2a\u76ee\u6807\u7aef\u53e3: nmap -sU 192.168.32.0\/24 \u4ee5\u4e0b\u5185\u5bb9\u6765\u81eawiki\uff1a Basic commands working [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[23],"class_list":["post-911","post","type-post","status-publish","format-standard","hentry","category-linux","tag-summary"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/911","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=911"}],"version-history":[{"count":26,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/911\/revisions"}],"predecessor-version":[{"id":9195,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/911\/revisions\/9195"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}