ubuntu

如何通过Ubuntu Dumpcap进行网络安全审计

小樊
40
2025-12-01 10:19:33
栏目: 智能运维

Ubuntu 上使用 Dumpcap 进行网络安全审计

一 环境准备与权限配置

二 捕获策略与常用命令

三 审计场景与 BPF 过滤器示例

审计目标 BPF 过滤器示例 说明
可疑主机外联 host 203.0.113.45 聚焦与特定外部 IP 的双向通信
内网横向移动 src net 192.168.1.0/24 and dst net 192.168.1.0/24 and not host 192.168.1.1 内网互访,排除网关/安全设备
暴力登录尝试 tcp dst port 22 and (tcp[tcpflags] & tcp-syn != 0) and (tcp[tcpflags] & tcp-ack == 0) SYN 探测,定位 SSH 扫描
HTTP 可疑访问 tcp port 80 and (http.host contains "admin" or http.request.uri contains "cmd.php") 结合显示过滤器在 Wireshark/tshark 中细化
DNS 隧道/异常查询 udp port 53 and (dns.qry.name contains "i2p" or dns.qry.name matches "\\.onion$") 发现非常规域名与 .onion 查询
明文凭证泄露 tcp port 21 or (tcp port 23 and data-text-lines contains "password") or (tcp port 3306 and data-text-lines contains "SELECT") or (tcp port 1433 and data-text-lines contains "SELECT") 抓取常见明文协议与关键字(示例,需结合显示过滤器复核)
可疑 SMB 行为 tcp port 445 and (smb.cmd == 0x72 or smb2.cmd == 5) 创建/打开文件等可疑操作(建议用显示过滤器复核)
可疑 ICMP 隧道 icmp and (icmp[4:4] > 100 or icmp[4:4] < 8) 非标准 ICMP 载荷长度,需结合上下文研判
说明:上表的 BPF 为“捕获过滤器”,只影响抓什么;如需更细粒度分析,可在 Wireshark/tshark 中使用“显示过滤器”(如 http.request.method == "GET"dns.qry.name contains "example")。

四 自动化与长期运行

五 分析与取证工作流

0
看了该问题的人还看了