Linux port scan

Note: For more information scanning tool to scan hosts using Linux.

Pre-content: rpm installation implementation

# Rpm package installation, the installation process details are printed 
rpm -ivh [rpm_package] 
# display system all installation packages, can be used to target specific packet grep 
rpm -qa 
# does not check to unload a manner dependent Packages 
rpm -e - nodeps [Package Penalty for] 
# navigate to the directory where the files from a command 
whereis [the command] 
# to listen to pure IP network address in the form of TCP port 
netstat -ltn 
# capture command, src to intercept data, dst to monitor 
tcpdump -np -i eth0 src host [IP address] 
the tcpdump -i eth0 DST Host -NP [the IP address]
Host Scan

Scan Tool: fping, hping these two tools are required to download from the official website and then compiled to install on a Linux machine

fping IP address input mode (which only shows the survival parameters -a host, -u displays only nonviable host, -l cycles proceed ping):

  • fping IP1 IP2 IP3

  • fping -f filename

  • fping -g IP1 IP2 (indicate the beginning to the end of the range of range)

Parameter Description :-p hping specified port; -S disposed TCP SYN packet transmission mode; -a fake IP address of a host contract

Scan Routing

You can query a host to another through route

Common tools: tranceroute, mtr

tranceroute parameters (default contract using the UDP protocol): - T -p [port] use of TCP packets sent to the specified port; -I uses ICMP packets transmitted; -n analytical section shows the result removed

mtr use: mtr [IP address]

Batch scanning service

Batch scanning command: nmap, ncat

nmap: -sP ping scan (using ICMP protocol); - sS SYN packet scan; -sT TCP scan fully open; -sU UDP protocol scan mode (effective but slower through the firewall)

Default Scan range: 0-1024 -p port ranges can be specified scan

ncat: -w timeout -z provided a display command input output execution mode -v

The default tcp-based protocol

  • nc -v -z -w2 [IP Address] [port range]

  • nc -v -u -z -w2 [IP Address] [port range] (connected to the UDP protocol)

Guess you like

Origin www.cnblogs.com/BeauBiu/p/12459433.html