{"id":208296,"date":"2021-01-03T08:52:38","date_gmt":"2021-01-03T00:52:38","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=208296"},"modified":"2020-12-28T09:53:04","modified_gmt":"2020-12-28T01:53:04","slug":"nmap-tool-example","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/nmap-tool-example.html","title":{"rendered":"nmap\u547d\u4ee4\u5e38\u7528\u5b9e\u4f8b"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\nNmap\u662f\u4e00\u6b3e\u514d\u8d39\u3001\u5f00\u6e90\u7684\u7f51\u7edc\u53d1\u73b0\u548c\u4fa6\u5bdf\u5de5\u5177\u3002Nmap\u53ef\u4ee5\u626b\u63cf\u7f51\u7edc\u4e2d\u7684\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u7684\u4e3b\u673a\u3001\u5f00\u653e\u7aef\u53e3\u3001\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u548c\u670d\u52a1\u68c0\u6d4b\u4ee5\u53ca\u6267\u884c\u9690\u533f\u65b9\u5f0f\u7684\u4fe1\u606f\u626b\u63cf\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u5982\u4f55\u5b89\u88c5<\/strong><\/div>\n

\u5728Ubuntu\/Debian\u4e2d\u5b89\u88c5\uff1a<\/p>\n

\r\n$ sudo apt -y install nmap\r\n<\/pre>\n

\u5728Centos\/RHEL\u4e2d\u5b89\u88c5\uff1a<\/p>\n

\r\n# yum -y install nmap\r\n<\/pre>\n

\u5728Arch Linux\u4e2d\u5b89\u88c5\uff1a<\/p>\n

\r\n# pacman -S nmap\r\n<\/pre>\n
\u5b9e\u4f8b\u4e00\uff0c\u626b\u63cf\u5355\u53f0\u4e3b\u673a<\/strong><\/div>\n

nmap\u547d\u4ee4\u52a0ip\u5730\u5740\/\u57df\u540d\uff0c\u53ef\u7528\u4e8e\u626b\u63cf\u5355\u4e2a\u4e3b\u673a\uff0c\u800c\u65e0\u9700\u4f20\u9012\u4efb\u4f55\u53c2\u6570\u3002\u8bed\u6cd5\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap 192.168.0.12\r\n<\/pre>\n

\"\"
\n\u4e0b\u9762\u662f\u6307\u5b9a\u57df\u540d\u6765\u626b\u63cf\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap scanme.nmap.org\r\n<\/pre>\n
\u5b9e\u4f8b\u4e8c\uff0c\u626b\u63cf\u591a\u53f0\u4e3b\u673a<\/strong><\/div>\n

\u53ef\u4ee5\u5728\u4e00\u884c\u4e2d\u6307\u5b9a\u591a\u4e2aIP\u5730\u5740\u6216\u57df\u540d\uff0c\u5e76\u7528\u7a7a\u683c\u9694\u5f00\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap 192.168.43.137 192.168.43.166 192.168.43.177\r\n<\/pre>\n

\"\"
\n\u53ef\u4ee5\u4e0d\u8f93\u5165\u5b8c\u6574\u7684IP\u5730\u5740\uff0c\u53ef\u4ee5\u4f7f\u7528\u9017\u53f7\u5206\u9694\u7ed3\u5c3e\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap 192.168.43.137,166,177\r\n<\/pre>\n

\"\"
\n\u53e6\u5916\uff0c\u53ef\u4ee5\u626b\u63cf\u6307\u5b9a\u8303\u56f4\u7684ip\u5730\u5740\u3002\u4f8b\u5982\uff0c\u4e0b\u9762\u7684\u547d\u4ee4\u5c06\u4e3b\u673a\u4ece192.168.43.100\u5230192.168.43.200\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap 192.168.43.100-200\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u4e09\uff0c\u626b\u63cf\u4e00\u4e2a\u5b50\u7f51<\/strong><\/div>\n

\u53ef\u4ee5\u4f7f\u7528\u901a\u914d\u7b26\u6765\u626b\u63cf\u6574\u4e2a\u5b50\u7f51\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap 192.168.43.*\r\n\u6216\u8005\r\n[root@localhost ~]# nmap 192.168.43.0\/24\r\n<\/pre>\n

\u5982\u9700\u8981\u4f18\u5316\u626b\u63cf\u901f\u5ea6\uff0c\u4ec5\u53d1\u73b0\u5b50\u7f51\u4e2d\u7684\u6d3b\u52a8\u4e3b\u673a\uff0c\u4e0d\u53bb\u626b\u63cf\u7aef\u53e3\u4fe1\u606f\uff0c\u8bf7\u4f7f\u7528-sn<\/code>\u9009\u9879\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap -sn 192.168.43.*\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u56db\uff0c\u4f7f\u7528-v\u9009\u9879\u626b\u63cf\u8be6\u7ec6\u4fe1\u606f<\/strong><\/div>\n

\u4f7f\u7528-v\u9009\u9879\u53ef\u6253\u5370\u51fa\u626b\u63cf\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u4f8b\u5982\u626b\u63cf\u7684\u6027\u8d28\u548c\u53d1\u73b0\u6253\u5f00\u7684\u7aef\u53e3\u3002<\/p>\n

\r\n[root@localhost ~]# nmap -v 192.168.43.180\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u4e94\uff0c\u626b\u63cf\u6587\u4ef6\u4e2d\u5305\u542b\u7684\u4e3b\u673a<\/strong><\/div>\n

\u53ef\u4ee5\u628aip\u5730\u5740\u6216\u57df\u540d\u653e\u5728\u6587\u672c\u6587\u4ef6\u91cc\u9762\uff0c\u7136\u540e\u4f7f\u7528-iL\u9009\u9879\u5c06\u8be5\u6587\u4ef6\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap -iL list.txt\r\n<\/pre>\n

\"\"
\n\u4e0b\u9762\u662f\u6587\u4ef6\u4e2d\u7684ip\u5730\u5740\u4fe1\u606f\uff1a
\n\"\"<\/p>\n

\u5b9e\u4f8b\u516d\uff0c\u542f\u7528OS\u626b\u63cf<\/strong><\/div>\n

Nmap\u8fd8\u53ef\u4ee5\u626b\u63cf\u76ee\u6807\u4e3b\u673a\u7684\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u3002\u5bf9\u4e8eOS\u68c0\u6d4b\u4f7f\u7528-O\u9009\u9879\u3002\u4e0b\u9762\u64cd\u4f5c\uff0c\u4f1a\u626b\u63cf192.168.43.166\u548c180\u4e24\u53f0\u4e3b\u673a\u662f\u4ec0\u4e48\u7cfb\u7edf\u3002<\/p>\n

\r\n[root@localhost ~]# nmap -O 192.168.43.166,180\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u4e03\uff0c\u7aef\u53e3\u626b\u63cf<\/strong><\/div>\n

nmap\u5de5\u5177\u57fa\u672c\u4efb\u52a1\u4e4b\u4e00\u662f\u626b\u63cf\u4e3b\u673a\u4e0a\u7684\u7aef\u53e3\u3002\u4f7f\u7528-p\u9009\u9879\u540e\u8ddf\u7aef\u53e3\u53f7\u6307\u5b9a\u8981\u626b\u63cf\u7684\u7aef\u53e3\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap -p 80 192.168.43.166\r\n<\/pre>\n

\"\"
\n\u53ef\u4ee5\u4f7f\u7528\u9017\u53f7\u5206\u9694\u591a\u4e2a\u7aef\u53e3\uff0c\u4ee5\u626b\u63cf\u591a\u4e2a\u7aef\u53e3\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap -p 25,80,110 192.168.0.12\r\n<\/pre>\n

\"\"
\n\u4e5f\u53ef\u4ee5\u4f7f\u7528\u4e0b\u9762\u65b9\u5f0f\u626b\u63cf\u6307\u5b9a\u8303\u56f4\u7684\u7aef\u53e3\u548c\u6307\u5b9a\u8303\u56f4\u7684ip\u5730\u5740\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap -p 80-443 192.168.43.*\r\n<\/pre>\n
\u5b9e\u4f8b\u516b\uff0c\u6307\u5b9a\u626b\u63cfTCP\u6216\u8005UDP\u7aef\u53e3<\/strong><\/div>\n

\u8981\u626b\u63cfTCP\u7aef\u53e3\uff0c\u8bf7\u4f7f\u7528-sT\u9009\u9879\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap -sT 192.168.43.180\r\n<\/pre>\n

\"\"
\n\u8981\u626b\u63cfDUP\u7aef\u53e3\uff0c\u8bf7\u4f7f\u7528-sU\u9009\u9879\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap -sU 192.168.43.180\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u4e5d\uff0c\u626b\u63cf\u5f00\u653e\u7aef\u53e3\u7684\u8f6f\u4ef6\u7248\u672c\u4fe1\u606f<\/strong><\/div>\n
\r\n[root@localhost ~]# nmap -sV 192.168.43.166\r\n<\/pre>\n

\"\"
\n\"\"<\/p>\n

\u5b9e\u4f8b\u5341\uff0c\u6267\u884c\u9690\u533f\u626b\u63cf<\/strong><\/div>\n

nmap\u626b\u63cf\u901a\u5e38\u4f1a\u7559\u4e0b\u8db3\u8ff9\uff0c\u800c\u8db3\u8ff9\u53ef\u4ee5\u88ab\u5f3a\u5927\u7684\u5165\u4fb5\u68c0\u6d4b\u7cfb\u7edf\u6807\u8bb0\uff0c\u6700\u7ec8\u53ef\u4ee5\u8ffd\u6eaf\u5230\u4f60\u3002\u8981\u4fdd\u6301\u533f\u540d\uff0c\u53ef\u4ee5\u4f7f\u7528-sS<\/code>\u9009\u9879\u6267\u884c\u9690\u533f\u626b\u63cf\uff1a<\/p>\n

\r\n[root@localhost ~]# nmap -sS 192.168.43.180\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u5341\u4e00\uff0c\u626b\u63cf\u4e3b\u673a\u5bf9\u5916\u5f00\u653e\u7684\u534f\u8bae<\/strong><\/div>\n

\u4f7f\u7528-sO<\/code>\u9009\u9879\u6765\u67e5\u770b\u76ee\u6807\u7cfb\u7edf\u5bf9\u5916\u5f00\u653e\u4e86\u4ec0\u4e48\u534f\u8bae\u3002<\/p>\n

\r\n[root@localhost ~]# nmap -sO 114.114.114.114\r\n<\/pre>\n

\"\"<\/p>\n

\u5b9e\u4f8b\u5341\u4e8c\uff0c\u6267\u884c\u4e3b\u52a8\u626b\u63cf<\/strong><\/div>\n

\u4f7f\u7528-A<\/code>\u9009\u9879\u65f6\uff0cnmap\u4f1a\u7ed9\u51fa\u975e\u5e38\u8be6\u7ec6\u7684\u626b\u63cf\u7ed3\u679c\uff0c\u5305\u62ec\u6253\u5f00\u7684\u7aef\u53e3\u548c\u6b63\u5728\u8fd0\u884c\u7684\u670d\u52a1\u7684\u7248\u672c\uff0c\u68c0\u6d4b\u64cd\u4f5c\u7cfb\u7edf\uff0c\u751a\u81f3\u6267\u884c\u76ee\u6807\u4e3b\u673a\u7684\u8ddf\u8e2a\u8def\u7531\u3002<\/p>\n

\r\n[root@localhost ~]# nmap -A -T4 192.168.43.180\r\n<\/pre>\n
\u5b9e\u4f8b\u5341\u4e09\uff0c\u4f7f\u7528nmap\u67e5\u770b\u63a5\u53e3\u548c\u8def\u7531\u4fe1\u606f<\/strong><\/div>\n
\r\n[root@localhost ~]# nmap --iflist\r\n<\/pre>\n

\"\"<\/p>\n

\u603b\u7ed3<\/strong><\/div>\n

Nmap\u662f\u4e00\u6b3e\u514d\u8d39\u3001\u5f00\u6e90\u7684\u7f51\u7edc\u53d1\u73b0\u548c\u4fa6\u5bdf\u5de5\u5177\u3002Nmap\u53ef\u4ee5\u626b\u63cf\u7f51\u7edc\u4e2d\u7684\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u7684\u4e3b\u673a\u3001\u5f00\u653e\u7aef\u53e3\u3001\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u548c\u670d\u52a1\u68c0\u6d4b\u4ee5\u53ca\u6267\u884c\u9690\u533f\u65b9\u5f0f\u7684\u4fe1\u606f\u626b\u63cf\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728Ubuntu\/Debian\u4e2d\u5b89\u88c5\uff1a $ sudo apt -y install nmap \u5728Centos\/R […]<\/p>\n","protected":false},"author":309,"featured_media":208297,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-208296","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/208296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=208296"}],"version-history":[{"count":1,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/208296\/revisions"}],"predecessor-version":[{"id":208316,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/208296\/revisions\/208316"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/208297"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=208296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=208296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=208296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}