detecting-arp-poisoning-in-network-traffic
Skill này làm gì
Công cụ này giúp tìm các cuộc tấn công “ARP poisoning” trên mạng của bạn. Nó theo dõi lưu lượng để phát hiện xem có ai đang cố đánh lừa các máy tính khác bằng cách giả làm chúng, điều có thể dùng để đánh cắp thông tin.
Khi nào nên dùng
- ✓Khi bạn nghi ngờ có người đang chặn lưu lượng mạng của bạn.
- ✓Khi điều tra các hoạt động chiếm phiên đáng ngờ.
- ✓Để kiểm tra xem mạng của bạn có được bảo vệ khỏi kiểu tấn công này không.
Liên kết skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-arp-poisoning-in-network-traffic/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra các cuộc tấn công ARP poisoning trên mạng cục bộ của tôi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ dùng các chương trình như ARPWatch và Wireshark để quan sát thông điệp mạng. Nó tìm các mẫu lạ, như một máy tính liên tục đổi danh tính hoặc gửi nhiều thông điệp cùng lúc, cho thấy có nỗ lực tấn công.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Detecting ARP Poisoning in Network Traffic
Overview
ARP poisoning (ARP spoofing) is a Layer 2 attack where an adversary sends falsified ARP messages to associate their MAC address with the IP address of a legitimate host, enabling man-in-the-middle (MitM) interception, session hijacking, or denial of service. Since ARP has no built-in authentication mechanism, any device on a broadcast domain can forge ARP replies. Detection requires monitoring ARP traffic for anomalies such as gratuitous ARP floods, IP-to-MAC mapping changes, and duplicate IP addresses. This skill covers deploying multiple detection layers including ARPWatch, Dynamic ARP Inspection (DAI), Wireshark-based analysis, and custom Python monitoring tools.
When to Use
- When investigating security incidents that require detecting arp poisoning in network traffic
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Access to the target network segment (broadcast domain)
- Linux host for ARPWatch and custom monitoring tools
- Managed switches supporting Dynamic ARP Inspection (Cisco Catalyst, Aruba, Juniper EX)
- Wireshark or tcpdump for packet capture
- DHCP snooping configured (prerequisite for DAI)
- Network monitoring infrastructure (SIEM, syslog server)
Core Concepts
ARP Protocol Fundamentals
ARP maps IP addresses to MAC addresses on a local network segment. The protocol operates statelessly with no authentication:
Normal ARP Process:
1. Host A broadcasts: "Who has 10.0.1.1? Tell 10.0.1.100"
2. Router replies: "10.0.1.1 is at AA:BB:CC:DD:EE:01"
3. Host A caches the mapping
ARP Poisoning Attack:
1. Attacker sends unsolicited ARP reply to Host A:
"10.0.1.1 is at EV:IL:MA:CA:DD:RR" (attacker's MAC)
2. Host A updates cache, sends traffic to attacker
3. Attacker forwards to real gateway (MitM position)
Attack Indicators
| Indicator | Description | Severity |
|---|---|---|
| MAC flip-flopping | Same IP mapped to different MACs rapidly | High |
| Gratuitous ARP flood | Unsolicited ARP replies targeting multiple hosts | High |
| Duplicate IP address | Two different MACs claiming same IP | Critical |
| Unusual ARP volume | Spike in ARP packets per second | Medium |
| ARP from non-DHCP source | Static IP claims from unknown devices | Medium |
| Gateway MAC change | Default gateway MAC address changed | Critical |
Workflow
Step 1: Deploy ARPWatch for Continuous Monitoring
# Install ARPWatch
sudo apt-get install -y arpwatch
# Configure ARPWatch
sudo vi /etc/default/arpwatch
# INTERFACES="eth0"
# ARGS="-N -p -i eth0 -f /var/lib/arpwatch/arp.dat"
# Start monitoring
sudo systemctl enable arpwatch
sudo systemctl start arpwatch
# View current ARP database
cat /var/lib/arpwatch/arp.dat
# Monitor logs for changes
tail -f /var/log/syslog | grep arpwatch
ARPWatch alert types:
- new station - Previously unseen MAC address
- changed ethernet address - IP mapped to different MAC (potential poisoning)
- flip flop - MAC alternating between two addresses (active attack)
- reused old ethernet address - Previously seen mapping returned
Step 2: Configure Dynamic ARP Inspection (DAI) on Switches
Cisco Catalyst configuration:
! Enable DHCP snooping (prerequisite for DAI)
ip dhcp snooping
ip dhcp snooping vlan 10,20,30
! Configure trusted ports (uplinks, DHCP servers)
interface GigabitEthernet1/0/1
description Uplink to Distribution
ip dhcp snooping trust
interface GigabitEthernet1/0/48
description DHCP Server
ip dhcp snooping trust
! Enable Dynamic ARP Inspection
ip arp inspection vlan 10,20,30
! Configure trusted ports for DAI
interface GigabitEthernet1/0/1
ip arp inspection trust
! Set rate limits to prevent ARP flood DoS
interface range GigabitEthernet1/0/2-47
ip arp inspection limit rate 15
! Enable additional validation checks
ip arp inspection validate src-mac dst-mac ip
! Configure ARP ACL for static IP devices (servers, printers)
arp access-list STATIC-ARP-ENTRIES
permit ip host 10.0.10.100 mac host 0011.2233.4455
permit ip host 10.0.10.101 mac host 0011.2233.4456
ip arp inspection filter STATIC-ARP-ENTRIES vlan 10
! Verify DAI status
show ip arp inspection vlan 10
show ip arp inspection statistics
show ip dhcp snooping binding
…
Câu hỏi thường gặp
ARP poisoning là gì?
Đây là cuộc tấn công trong đó kẻ tấn công gửi thông điệp giả để liên kết địa chỉ mạng (MAC) của chúng với địa chỉ IP của một máy tính hợp pháp. Nhờ đó, kẻ tấn công có thể xem hoặc sửa đổi lưu lượng vốn đi giữa các máy tính.
Dấu hiệu của cuộc tấn công là gì?
Dấu hiệu gồm cùng một địa chỉ IP liên kết với nhiều địa chỉ MAC khác nhau trong thời gian ngắn, nhiều thông điệp ARP không mong muốn, hoặc hai máy tính cùng tuyên bố có một địa chỉ IP.
Tôi có cần thiết bị đặc biệt không?
Bạn cần quyền truy cập vào mạng và lý tưởng là dùng switch hỗ trợ “Dynamic ARP Inspection” (DAI). Một máy tính Linux được dùng để chạy một số công cụ giám sát.
Chi tiết
Mô tả gốc của tác giả
Detect Layer 2 ARP poisoning/spoofing by deploying ARPWatch, Dynamic ARP Inspection (DAI), Wireshark packet analysis, and custom Python monitoring scripts that flag gratuitous ARP floods, IP-to-MAC mapping changes, and duplicate IP addresses. Use when investigating suspected man-in-the-middle interception or session hijacking on a local network segment, or when building layer-2 anomaly detection f
Độ phổ biến
- Sao GitHub
- 35k
- Vị trí xếp hạng
- #7794
- Giấy phép
- Apache-2.0
- Cập nhật
- 31/8/2026
Bình luận
- …
Thêm skill từ kho mã này
abusing-dpapi-for-credential-access
35kCung cấp cho agent AI của bạn hướng dẫn có sẵn cho một tác vụ cụ thể, giúp nó làm việc tốt hơn và nhanh hơn.
abusing-shadow-credentials-for-privesc
35kDạy agent AI của bạn viết văn bản rõ ràng và có cấu trúc tốt.
achieving-cmmc-level-2-compliance
35kGiúp agent của bạn chuẩn bị môi trường để tuân thủ CMMC Level 2. Triển khai các yêu cầu bảo mật và quản lý tài liệu cần thiết.
acquiring-disk-image-with-dd-and-dcfldd
35kGiúp agent của bạn tạo bản sao chính xác của ổ đĩa. Cách này đảm bảo không mất hay thay đổi thông tin trong quá trình điều tra.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.