显示去往102.168.1.102的所有ftp会话信息:
- tcpdump -i eth1 'dst 192.168.1.102 and (port 21 or 20)'
显示去往102.168.1.102的所有HTTP会话信息:
- tcpdump -ni eth0 'dst 192.168.1.102 and tcp and port 8080'
12、nmap
扫描某一主机打开的端口以及端口提供的服务信息,通常用于查看本机哪些端口对外提供服务,或者确定服务器哪些端口对外开放。
使用方式:
- nmap -v -A localhost
命令输出:
- robert@robert-ubuntu1410:~$ nmap -v -A localhost
-
- Starting Nmap 6.40 ( http://nmap.org ) at 2017-04-23 12:11 CST
- NSE:Loaded 110 scripts for scanning.
- NSE:Script Pre-scanning.
- Initiating Ping Scan at 12:11
- Scanning localhost (127.0.0.1) [2 ports]
- Completed Ping Scan at 12:11, 0.00s elapsed (1 total hosts)
- Initiating Connect Scan at 12:11
- Scanning localhost (127.0.0.1) [1000 ports]
- Discovered open port 22/tcp on 127.0.0.1
- Discovered open port 8080/tcp on 127.0.0.1
- Discovered open port 25/tcp on 127.0.0.1
- Discovered open port 3306/tcp on 127.0.0.1
- Discovered open port 631/tcp on 127.0.0.1
- Completed Connect Scan at 12:11, 0.01s elapsed (1000 total ports)
- Initiating Service scan at 12:11
- Scanning 5 services on localhost (127.0.0.1)
- Completed Service scan at 12:11, 6.04s elapsed (5 services on 1 host)
- NSE:Script scanning 127.0.0.1.
- Initiating NSE at 12:11
- Completed NSE at 12:11, 0.22s elapsed
- Nmap scan report for localhost (127.0.0.1)
- Host is up (0.00025s latency).
- Not shown:995 closed ports
- PORT STATE SERVICE VERSION
- 22/tcp open ssh (protocol 2.0)
- | ssh-hostkey:1024 95:41:c2:46:25:8d:bc:2d:d1:15:c6:90:ca:a7:8b:bc (DSA)
- | 2048 47:32:93:bf:49:df:9c:e7:d7:c5:f8:ef:92:e3:28:c2 (RSA)
- |_256 bd:ef:f2:21:01:b1:cb:78:c7:42:a8:f3:5f:40:e3:37 (ECDSA)
- 25/tcp open smtp Postfix smtpd
- |_smtp-commands:robert-ubuntu1410, PIPELINING, SIZE 10240000, VRFY, ETRN, STARTTLS, ENHANCEDSTATUSCODES, 8BITMIME, DSN,
- | ssl-cert:Subject:commonName=ubuntu-kylin
- | Issuer:commonName=ubuntu-kylin
- | Public Key type:rsa
- | Public Key bits:2048
- | Not valid before:2015-10-24T08:56:26+00:00
- | Not valid after: 2025-10-21T08:56:26+00:00
- | MD5: 2458 afb6 3955 335a b4ad 171e 3917 b222
- |_SHA-1:eb49 e335 4352 ccd7 4582 aa2d 1002 7eb3 725e 9045
- |_ssl-date:2103-09-27T17:18:12+00:00; +86y157d13h06m52s from local time.
- 631/tcp open ipp CUPS 1.7
- | http-methods:GET HEAD OPTIONS POST PUT
- | Potentially risky methods:PUT
- |_See http://nmap.org/nsedoc/scripts/http-methods.html
- | http-robots.txt:1 disallowed entry
- |_/
- |_http-title:Home - CUPS 1.7.2
- 3306/tcp open mysql MySQL 5.5.54-0ubuntu0.14.04.1
- | mysql-info:Protocol:10
- | Version:5.5.54-0ubuntu0.14.04.1
- | Thread ID:38
- | Some Capabilities:Long Passwords, Connect with DB, Compress, ODBC, Transactions, Secure Connection
- | Status:Autocommit
- |_Salt:yB|ixB~v
- 8080/tcp open http Apache Tomcat/Coyote JSP engine 1.1
- |_http-favicon:Unknown favicon MD5:0488FACA4C19046B94D07C3EE83CF9D6
- | http-methods:GET HEAD POST PUT DELETE TRACE OPTIONS PATCH
- | Potentially risky methods:PUT DELETE TRACE PATCH
- |_See http://nmap.org/nsedoc/scripts/http-methods.html
- |_http-title:Site doesn't have a title (application/json;charset=UTF-8).
- 1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at http://www.insecure.org/cgi-bin/servicefp-submit.cgi :
- SF-Port22-TCP:V=6.40%I=7%D=4/23%Time=58FC2968%P=x86_64-pc-linux-gnu%r(NULL
- SF:,2B,"SSH-2\.0-OpenSSH_6\.6\.1p1\x20Ubuntu-2ubuntu2\.8\r\n");
- Service Info:Host: robert-ubuntu1410
-
- NSE:Script Post-scanning.
- Initiating NSE at 12:11
- Completed NSE at 12:11, 0.00s elapsed
- Read data files from:/usr/bin/../share/nmap
- Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
- Nmap done:1 IP address (1 host up) scanned in 6.49 seconds
(编辑:ASP站长网)
|