Linux系统安全----端口扫描
Posted 还行少年
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux系统安全----端口扫描相关的知识,希望对你有一定的参考价值。
端口扫描
NMAP是一个强大的端口扫描类安全评测工具
1.安装NMAP软件包
2.扫描语法及类型
nmap 【扫描类型】 【选项】 <扫描目标>
扫描目标可以是主机名,ip地址或者网络地址
常用扫描类型
-sS,TCP SYN扫描(半开扫描)
-sT,TCP连接扫描
-sF,TCP FIN扫描
-sU,UDP扫描
-sP,ICMP扫描
-P0,跳过ping检测
-p,指定扫描的端口
3.扫描操作
扫描TCP端口
[root@localhost ~]# nmap 127.0.0.1 //扫描TCP端口
Starting Nmap 6.40 ( http://nmap.org ) at 2021-05-17 14:49 CST
Nmap scan report for www.wangdi.com (127.0.0.1)
Host is up (0.000011s latency).
Not shown: 995 closed ports
PORT STATE SERVICE
22/tcp open ssh
23/tcp open telnet
80/tcp open http
111/tcp open rpcbind
631/tcp open ipp
Nmap done: 1 IP address (1 host up) scanned in 1.61 seconds
[root@localhost ~]#
扫描UDP端口
[root@localhost ~]# nmap -sU 127.0.0.1 //扫描UDP端口
Starting Nmap 6.40 ( http://nmap.org ) at 2021-05-17 14:50 CST
Nmap scan report for www.wangdi.com (127.0.0.1)
Host is up (0.0000040s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
111/udp open rpcbind
5353/udp open|filtered zeroconf
Nmap done: 1 IP address (1 host up) scanned in 2.71 seconds
[root@localhost ~]#
检测网段内有哪些主机存活
[root@localhost ~]# nmap -n -sP 192.168.177.0/24
Starting Nmap 6.40 ( http://nmap.org ) at 2021-05-17 15:32 CST
Nmap scan report for 192.168.177.1
Host is up (0.00022s latency).
MAC Address: 00:50:56:C0:00:08 (VMware)
Nmap scan report for 192.168.177.2
Host is up (0.00011s latency).
MAC Address: 00:50:56:E6:24:07 (VMware)
Nmap scan report for 192.168.177.3
Host is up.
Nmap done: 256 IP addresses (3 hosts up) scanned in 2.04 seconds
[root@localhost ~]#
以上是关于Linux系统安全----端口扫描的主要内容,如果未能解决你的问题,请参考以下文章