ahmedmostafaabdlemenam/SOC-HomeLab-ARP-Spoofing-Detection
GitHub: ahmedmostafaabdlemenam/SOC-HomeLab-ARP-Spoofing-Detection
基于 Splunk 的 SOC 家庭实验室项目,通过模拟网络数据集和威胁狩猎方法检测并调查 ARP 欺骗攻击。
Stars: 0 | Forks: 0
# ARP 欺骗检测实验室
## 概述
本项目演示了在 SOC 家庭实验室环境中,使用 Splunk 检测和调查 ARP 欺骗(ARP 缓存中毒)攻击的过程。
目标是模拟真实的网络流量,识别异常的 ARP 行为,调查可疑活动,并开发能够识别潜在中间人攻击(MITM)的检测规则。
## 项目目标
* 分析 ARP 网络流量。
* 建立正常的 IP 到 MAC 映射。
* 检测异常的 ARP Reply 行为。
* 识别试图冒充受信任主机的设备。
* 调查受影响的系统。
* 为 ARP 欺骗活动创建 Splunk 检测规则。
## 环境
### 基础设施
```
DC01 Domain Controller
WIN11-01 Workstation
WIN11-02 Workstation
WIN11-03 Workstation
WIN11-04 Workstation
KALI01 Attacker Machine
SPLUNK01 SIEM Platform
```
### 安全平台
```
Splunk Enterprise
```
### 网络范围
```
192.168.10.0/24
```
## 数据集信息
### 数据集名称
```
SOC-HOMELAB-ARP-Spoofing-Realistic-700Events.jsonl
```
### 事件计数
```
700 Events
```
### 数据集组成
```
550 Normal ARP Requests
120 Normal ARP Replies
30 Malicious ARP Replies
```
### 字段
```
timestamp
event_type
operation
sender_ip
sender_mac
target_ip
target_mac
sensor
```
## 调查方法论
### 第一步 – 审查 ARP 流量
了解可用字段和整体流量行为。
### 第二步 – 建立基线
识别环境中正常的 IP 到 MAC 映射。
### 第三步 – 检测异常
搜索与多个 MAC 地址关联的 IP 地址。
### 第四步 – 调查可疑活动
审查可疑的 ARP Reply 流量并验证发现。
### 第五步 – 识别受影响的主机
确定哪些主机收到了伪造的 ARP 响应。
### 第六步 – 确认潜在攻击
验证收集的证据并评估影响。
## 检测逻辑
在正常情况下,一个 IP 地址应当只与一个 MAC 地址关联。
### 预期情况
```
192.168.10.1
↓
00:11:22:33:44:55
```
### 可疑情况
```
192.168.10.1
↓
00:11:22:33:44:55
192.168.10.1
↓
AA:BB:CC:DD:EE:FF
```
此行为可能表明存在 ARP 缓存中毒或 ARP 欺骗活动。
## Splunk 检测查询
```
index=arp operation=reply
| stats dc(sender_mac) as MAC_Count values(sender_mac) as MACs by sender_ip
| where MAC_Count > 1
```
## 调查查询
### 建立基线
```
index=arp
| stats values(sender_mac) by sender_ip
```
### 审查可疑网关活动
```
index=arp sender_ip="192.168.10.1"
| table _time sender_ip sender_mac target_ip
| sort _time
```
### 识别受影响的主机
```
index=arp sender_mac="AA:BB:CC:DD:EE:FF"
| stats values(target_ip) as Victims
```
## 发现
调查发现了一个与多个 MAC 地址关联的网关 IP 地址。
证据显示,一个非法的 MAC 地址反复声称拥有该网关 IP,并针对网络中的多个主机发起了攻击。
### 指标
* 同一 IP 关联了多个 MAC 地址。
* 反复出现的 ARP Reply 活动。
* 多个受影响的主机。
* 潜在的网络流量拦截。
### 评估
```
Potential ARP Spoofing Activity Confirmed
```
## MITRE ATT&CK 映射
### 战术
```
Credential Access
```
### 技术
```
T1557 - Adversary-in-the-Middle
```
## 展示技能
* 安全监控
* 威胁狩猎
* 检测工程
* 网络流量分析
* Splunk SPL
* 事件调查
* MITRE ATT&CK 映射
* SOC 分析师方法论
### 第二步 – 建立基线
识别环境中正常的 IP 到 MAC 映射。
### 第三步 – 检测异常
搜索与多个 MAC 地址关联的 IP 地址。
### 第四步 – 调查可疑活动
审查可疑的 ARP Reply 流量并验证发现。
### 第五步 – 识别受影响的主机
确定哪些主机收到了伪造的 ARP 响应。
### 第六步 – 确认潜在攻击
验证收集的证据并评估影响。
## 检测逻辑
在正常情况下,一个 IP 地址应当只与一个 MAC 地址关联。
### 预期情况
```
192.168.10.1
↓
00:11:22:33:44:55
```
### 可疑情况
```
192.168.10.1
↓
00:11:22:33:44:55
192.168.10.1
↓
AA:BB:CC:DD:EE:FF
```
此行为可能表明存在 ARP 缓存中毒或 ARP 欺骗活动。
## Splunk 检测查询
```
index=arp operation=reply
| stats dc(sender_mac) as MAC_Count values(sender_mac) as MACs by sender_ip
| where MAC_Count > 1
```
## 调查查询
### 建立基线
```
index=arp
| stats values(sender_mac) by sender_ip
```
### 审查可疑网关活动
```
index=arp sender_ip="192.168.10.1"
| table _time sender_ip sender_mac target_ip
| sort _time
```
### 识别受影响的主机
```
index=arp sender_mac="AA:BB:CC:DD:EE:FF"
| stats values(target_ip) as Victims
```
## 发现
调查发现了一个与多个 MAC 地址关联的网关 IP 地址。
证据显示,一个非法的 MAC 地址反复声称拥有该网关 IP,并针对网络中的多个主机发起了攻击。
### 指标
* 同一 IP 关联了多个 MAC 地址。
* 反复出现的 ARP Reply 活动。
* 多个受影响的主机。
* 潜在的网络流量拦截。
### 评估
```
Potential ARP Spoofing Activity Confirmed
```
## MITRE ATT&CK 映射
### 战术
```
Credential Access
```
### 技术
```
T1557 - Adversary-in-the-Middle
```
## 展示技能
* 安全监控
* 威胁狩猎
* 检测工程
* 网络流量分析
* Splunk SPL
* 事件调查
* MITRE ATT&CK 映射
* SOC 分析师方法论标签:ARP欺骗, 安全运营中心, 实验环境, 时序数据库, 网络映射, 网络流量分析