acquiring-disk-image-w…
Create forensically sound bit-for-bit disk images using dd and dcfldd while preserving evidence integrity through
Detect and prevent ARP spoofing attacks using ARPWatch, Dynamic ARP Inspection, Wireshark analysis, and custom
$ npx -y skills add Mikaru0Mystic/sectinel --skill detecting-arp-poisoning-in-network-traffic --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/detecting-arp-poisoning-in-network-trafficContext preview
The summary Claude sees to decide when to auto-load this skill.
Detect and prevent ARP spoofing attacks using ARPWatch, Dynamic ARP Inspection, Wireshark analysis, and custom
name: detecting-arp-poisoning-in-network-traffic description: Detect and prevent ARP spoofing attacks using ARPWatch, Dynamic ARP Inspection, Wireshark analysis, and custom monitoring scripts to protect against man-in-the-middle interception. domain: cybersecurity subdomain: network-security tags: - arp-poisoning - arp-spoofing - mitm - dynamic-arp-inspection - arpwatch - network-security - man-in-the-middle - layer-2-security version: '1.0' author: mahipal license: Apache-2.0 nist_csf: - PR.IR-01 - DE.CM-01 - ID.AM-03 - PR.DS-02
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.
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)
| 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 |
# 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:
**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
# Detect gratuitous ARP (sender and target IP are the same) arp.src.proto_ipv4 == arp.dst.proto_ipv4 # Detect ARP replies (focus on unsolicited) arp.opcode == 2 # Detect duplicate IP address claims arp.duplicate-address-detected # Detect ARP packets from specific attacker MAC eth.src == ev:il:ma:ca:dd:rr # Detect ARP storms (high volume) # Use Statistics > I/O Graphs > Display filter: arp # Detect gateway impersonation arp.src.proto_ipv4 == 10.0.1.1 && arp.src.hw_mac != aa:bb:cc:dd:ee:01
#!/usr/bin/env python3
"""
Real-time ARP poisoning detection using packet capture.
Monitors ARP traffic for spoofing indicators and alerts on anomalies.
"""
import subprocess
import sys
import json
import time
from collections import defaultdict
from datetime import datetime
try:
from scapy.all import sniff, ARP, Ether, get_if_hwaddr, conf
SCAPY_AVAILABLE = TrueOpen-source security arsenal for AI coding agents: 784 cybersecurity skills, scanner integrations, and a security MCP for Claude Code, Cursor, opencode, Gemini CLI, Cline, and any agentskills.io agent. Mapped to OWASP, MITRE ATT&CK, NIST CSF, D3FEND, ATLAS.
Repo: Mikaru0Mystic/sectinel
Create forensically sound bit-for-bit disk images using dd and dcfldd while preserving evidence integrity through
Detect dangerous ACL misconfigurations in Active Directory using ldap3 to identify GenericAll, WriteDACL, and
Perform static analysis of Android APK malware samples using apktool for decompilation, jadx for Java source
Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect BOLA/IDOR attacks, rate limit bypass,
Analyze advanced persistent threat (APT) group techniques using MITRE ATT&CK Navigator to create layered heatmaps
Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query to detect suspicious administrative