Linux的nmap命令有什么用
本篇内容主要讲解“Linux的nmap命令有什么用”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Linux的nmap命令有什么用”吧!
Linux常用命令nmap(Network Mapper – 网络映射器)命令用于网络探测和安全审核,是网络探索工具和端口扫描程序。namp 它可以扫描单主机,也可以快速扫描大型网络结构。
语法格式nmap[ScanType...][Options]{targetspecification}选项说明
-O#激活探测操作-P0#只进行扫描,不ping主机-PT#是同TCP的ping-sV#显示服务版本信息-sP#ping扫描,仅发现目标主机是否存活-ps#发送同步(SYN)报文-PU#发送udpping-PE#强制执行直接的ICMPping-PB#默认模式-6#使用IPv6地址-v#详细信息-d#增加调试信息地输出-A#使用所有高级扫描选项--resume#恢复(继续上次)中止的扫描-P#指定要扫描的端口,可以是一个端口,用逗号隔开多个端口,使用“-”表示端口范围-e#在多网络接口Linux系统中,指定扫描使用的网络接口-g#将指定的端口作为源端口进行扫描--ttl#指定发送的扫描报文的生存期--packet-trace#显示扫描过程中收发报文统计--scanflags#设置在扫描报文中的TCP标志--send-eth/--send-ip#使用原始以太网发送/构造指定IP发送应用举例
典型的扫描
[root@CentOS7-1~]#nmap-Awww.baidu.comStartingNmap6.40(http://nmap.org)at2021-03-1304:30ESTNmapscanreportforwww.baidu.com(36.152.44.95)Hostisup(0.012slatency).Otheraddressesforwww.baidu.com(notscanned):36.152.44.96Notshown:998filteredportsPORTSTATESERVICEVERSION80/tcpopenhttp-proxysslstrip|_http-methods:NoAlloworPublicheaderinOPTIONSresponse(statuscode302)|http-robots.txt:10disallowedentries|/baidu/s?/ulink?/link?/home/news/data//bh/shifen/|_/homepage//cpro/|_http-title:xE7x99xBExE5xBAxA6xE4xB8x80xE4xB8x8BxEFxBCx8CxE4xBDxA0xE5xB0xB1xE7x9FxA5xE9x81x93443/tcpopenssl/http-proxysslstrip|_http-methods:NoAlloworPublicheaderinOPTIONSresponse(statuscode302)|http-robots.txt:10disallowedentries|/baidu/s?/ulink?/link?/home/news/data//bh/shifen/|_/homepage//cpro/|_http-title:Sitedoesn'thaveatitle(text/html).|ssl-cert:Subject:commonName=baidu.com/organizationName=BeijingBaiduNetcomScienceTechnologyCo.,Ltd/stateOrProvinceName=beijing/countryName=CN|Notvalidbefore:2020-04-02T06:04:58+00:00|_Notvalidafter:2021-07-26T04:31:02+00:00|_ssl-date:2021-03-16T03:14:21+00:00;+2d17h53m18sfromlocaltime.|tls-nextprotoneg:|_http/1.1Warning:OSScanresultsmaybeunreliablebecausewecouldnotfindatleast1openand1closedportDevicetype:specialized|switchRunning(JUSTGUESSING):AVtechembedded(88%),HPembedded(86%)OSCPE:cpe:/h:hp:procurve_switch_4000mAggressiveOSguesses:AVtechRoomAlert26Wenvironmentalmonitor(88%),HP4000MProCurveswitch(J4121A)(86%)NoexactOSmatchesforhost(testconditionsnon-ideal).NetworkDistance:10hopsTRACEROUTE(usingport80/tcp)HOPRTTADDRESS10.97ms192.168.1.124.96ms100.106.0.13...91015.25ms36.152.44.95OSandServicedetectionperformed.Pleasereportanyincorrectresultsathttp://nmap.org/submit/.Nmapdone:1IPaddress(1hostup)scannedin37.64seconds
TCP 端口扫描
[root@CentOS7-1~]#nmap-sT192.168.1.100StartingNmap6.40(http://nmap.org)at2021-03-1304:32ESTNmapscanreportfor192.168.1.100Hostisup(0.00037slatency).Notshown:999closedportsPORTSTATESERVICE22/tcpopensshNmapdone:1IPaddress(1hostup)scannedin0.07seconds
扫描1-65535
[root@CentOS7-1~]#nmap-p1-65535-T4-A-v192.168.1.100StartingNmap6.40(http://nmap.org)at2021-03-1304:33ESTNSE:Loaded110scriptsforscanning.NSE:ScriptPre-scanning.InitiatingParallelDNSresolutionof1host.at04:33CompletedParallelDNSresolutionof1host.at04:33,0.00selapsedInitiatingSYNStealthScanat04:33Scanning192.168.1.100[65535ports]Discoveredopenport22/tcpon192.168.1.100Discoveredopenport19999/tcpon192.168.1.100CompletedSYNStealthScanat04:33,6.82selapsed(65535totalports)InitiatingServicescanat04:33Scanning2serviceson192.168.1.100CompletedServicescanat04:33,19.10selapsed(2serviceson1host)InitiatingOSdetection(try#1)against192.168.1.100NSE:Scriptscanning192.168.1.100.InitiatingNSEat04:34CompletedNSEat04:34,0.14selapsedNmapscanreportfor192.168.1.100Hostisup(0.000032slatency).Notshown:65533closedportsPORTSTATESERVICEVERSION22/tcpopensshOpenSSH7.4(protocol2.0)|ssh-hostkey:204837:71:8e:4a:db:cc:ac:29:f2:a2:20:93:23:8c:f6:e8(RSA)|_256cc:4b:7d:b6:59:0f:77:83:a9:a5:32:70:4e:87:0d:41(ECDSA)19999/tcpopenunknown1serviceunrecognizeddespitereturningdata.Ifyouknowtheservice/version,pleasesubmitthefollowingfingerprintathttp://www.insecure.org/cgi-bin/servicefp-submit.cgi:SF-Port19999-TCP:V=6.40%I=7%D=3/13%Time=604C86FA%P=x86_64-redhat-linux-gnuSF:%r(GenericLines,190,"HTTP/1.1x20400x20Badx20RequestrnConnection:SF:x20closernServer:x20NetDatax20Embeddedx20HTTPx20Serverx20v1.29SF:.3rnAccess-Control-Allow-Origin:x20*rnAccess-Control-Allow-CredenSF:tials:x20truernContent-Type:x20text/plain;x20charset=utf-8rnDateSF::x20Sat,x2013x20Marx202021x2009:33:46x20GMTrnCache-Control:x20SF:no-cache,x20no-store,x20must-revalidaternPragma:x20no-cachernExpSF:ires:x20Sat,x2013x20Marx202021x2009:33:47x20GMTrnContent-LengthSF::x2027rnrnIx20don'tx20understandx20you...rn")%r(GetRequestSF:,5580,"HTTP/1.1x20200x20OKrnConnection:x20closernServer:x20NetSF:Datax20Embeddedx20HTTPx20Serverx20v1.29.3rnAccess-Control-AllowSF:-Origin:x20*rnAccess-Control-Allow-Credentials:x20truernContent-SF:Type:x20text/html;x20charset=utf-8rnDate:x20Tue,x2009x20Febx202SF:021x2010:11:54x20GMTrnCache-Control:x20publicrnExpires:x20Sun,SF:x2014x20Marx202021x2009:33:46x20GMTrnContent-Length:x2085228rnSF:rnnetdatax20dashSF:boardSF:UDP端口扫描[root@CentOS7-1~]#nmap-sU192.168.1.100StartingNmap6.40(http://nmap.org)at2021-03-1304:34ESTNmapscanreportfor192.168.1.100Hostisup(0.0000040slatency).All1000scannedportson192.168.1.100areclosedNmapdone:1IPaddress(1hostup)scannedin1.65seconds
到此,相信大家对“Linux的nmap命令有什么用”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。