netstat - 系统信息
- 注意:如果是勘验或者验证漏洞,需要验证netstat程序的完整性(netstat程序是否被修改过)。
# 老版本的CentOS中会自带这个软件包,新版的7有的时候需要单独安装。
yum install -y net-tools
参数
说明
-a --all
Show both listening and non-listening (for TCP this means established connections) sockets. With the --interfaces option, show interfaces that are not up
-t --tcp
tcp connection
-u --udp
udp connection
-l --listening
Show only listening sockets. (These are omitted by default.)
-p --program
程序的信息(PID/Program name) 通过PID进而就可以知道源程序在哪里
-n --numeric
# 数值(0.0.0.0:22) Show numerical addresses instead of trying to determine symbolic host, port or user names.
# 老版本的CentOS中会自带这个软件包,新版的7有的时候需要单独安装。
yum install -y net-tools
参数 | 说明 |
---|---|
-a --all | Show both listening and non-listening (for TCP this means established connections) sockets. With the --interfaces option, show interfaces that are not up |
-t --tcp | tcp connection |
-u --udp | udp connection |
-l --listening | Show only listening sockets. (These are omitted by default.) |
-p --program | 程序的信息(PID/Program name) 通过PID进而就可以知道源程序在哪里 |
-n --numeric | # 数值(0.0.0.0:22) Show numerical addresses instead of trying to determine symbolic host, port or user names. |