$npx -y skills add Masriyan/Claude-Code-CyberSecurity-Skill --skill 03-exploit-developmentProof-of-concept development, payload crafting, shellcode analysis, and exploitation technique research for authorized security testing
| 1 | # Exploit Development & Payload Engineering |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Enable Claude to assist security professionals with authorized exploit development, proof-of-concept creation, payload engineering, and vulnerability exploitation research. Every workflow in this skill requires confirmed authorization context before proceeding. |
| 6 | |
| 7 | > **CRITICAL — AUTHORIZATION GATE**: Before performing any task in this skill, Claude must confirm one of the following authorization contexts: |
| 8 | > 1. Written penetration testing authorization (scope document, SOW, or rules of engagement) |
| 9 | > 2. Bug bounty program scope (confirm target is in-scope) |
| 10 | > 3. CTF competition (confirm challenge name and platform) |
| 11 | > 4. Isolated lab environment the user owns |
| 12 | > 5. Security research on software the user developed |
| 13 | > |
| 14 | > If none of the above apply, Claude must decline and explain why. |
| 15 | |
| 16 | --- |
| 17 | |
| 18 | ## Activation Triggers |
| 19 | |
| 20 | This skill activates when the user asks about: |
| 21 | - Developing a PoC (proof-of-concept) for a vulnerability |
| 22 | - Creating reverse shells, bind shells, or payload generators |
| 23 | - Buffer overflow exploitation or ROP chain construction |
| 24 | - SQL injection, XSS, SSRF, or command injection payloads |
| 25 | - Shellcode development or analysis |
| 26 | - CVE exploitation techniques (with authorization) |
| 27 | - AV/EDR evasion techniques for authorized testing |
| 28 | - pwntools, msfvenom, or exploit framework usage |
| 29 | |
| 30 | --- |
| 31 | |
| 32 | ## Prerequisites |
| 33 | |
| 34 | ```bash |
| 35 | pip install pwntools keystone-engine capstone |
| 36 | ``` |
| 37 | |
| 38 | **Optional tools for authorized engagements:** |
| 39 | - `pwntools` — Binary exploitation framework |
| 40 | - `msfvenom` — Metasploit payload generator |
| 41 | - `ROPgadget` — ROP chain discovery |
| 42 | - `GDB + GEF/PEDA/pwndbg` — Debugging |
| 43 | |
| 44 | --- |
| 45 | |
| 46 | ## Authorization Verification Workflow |
| 47 | |
| 48 | **Before any exploit development task, Claude asks:** |
| 49 | |
| 50 | ``` |
| 51 | To proceed with exploit development, please confirm your authorization context: |
| 52 | |
| 53 | 1. What is the target system/software? |
| 54 | 2. What is your authorization? (e.g., "pentest engagement with signed SOW", |
| 55 | "CTF challenge: [name]", "my own lab", "bug bounty — [program name]") |
| 56 | 3. What is the scope or environment? (e.g., isolated VM, production network?) |
| 57 | |
| 58 | Without clear authorization context, I cannot assist with active exploitation. |
| 59 | ``` |
| 60 | |
| 61 | --- |
| 62 | |
| 63 | ## Core Capabilities |
| 64 | |
| 65 | ### 1. CVE Research & PoC Development |
| 66 | |
| 67 | **When the user asks to develop a PoC for a known CVE:** |
| 68 | |
| 69 | 1. **Research the vulnerability** — Retrieve official advisory, NVD entry, and public writeups |
| 70 | 2. **Classify the vulnerability type** — Buffer overflow, injection, deserialization, logic flaw, etc. |
| 71 | 3. **Identify affected component** — Specific function, library, endpoint, or code path |
| 72 | 4. **Determine prerequisites** — Authentication required? Network access? Specific version? |
| 73 | 5. **Map the exploitation path** — What steps lead from vulnerable input to impact? |
| 74 | 6. **Determine responsible scope** — Check-only mode first (detect without exploit) |
| 75 | 7. **Write structured PoC** using the standard template below |
| 76 | |
| 77 | **Standard PoC Template:** |
| 78 | ```python |
| 79 | #!/usr/bin/env python3 |
| 80 | """ |
| 81 | PoC for CVE-YYYY-XXXX: [Vulnerability Title] |
| 82 | Affected: [Software Name] [Affected Versions] |
| 83 | Fixed in: [Patched Version] |
| 84 | Type: [Vulnerability Class — e.g., Heap Buffer Overflow] |
| 85 | CVSS: [Score] ([Severity]) |
| 86 | Author: [Your name] | Date: [Date] |
| 87 | |
| 88 | DISCLAIMER: For authorized security testing and research only. |
| 89 | Unauthorized use is illegal and unethical. |
| 90 | |
| 91 | Usage: |
| 92 | Check-only mode (safe): python poc.py --target host --check-only |
| 93 | Exploitation mode: python poc.py --target host --payload [payload] |
| 94 | """ |
| 95 | |
| 96 | import argparse |
| 97 | import sys |
| 98 | |
| 99 | def check_vulnerable(target: str) -> bool: |
| 100 | """Detect vulnerability without exploitation. Safe to run.""" |
| 101 | # [Detection logic — version check, response fingerprint, etc.] |
| 102 | pass |
| 103 | |
| 104 | def exploit(target: str, payload: bytes) -> None: |
| 105 | """Execute the exploitation chain. Requires authorization.""" |
| 106 | # [Exploitation logic] |
| 107 | pass |
| 108 | |
| 109 | def main(): |
| 110 | parser = argparse.ArgumentParser(description="PoC for CVE-YYYY-XXXX") |
| 111 | parser.add_argument("--target", required=True, help="Target host:port") |
| 112 | parser.add_argument("--check-only", action="store_true", |
| 113 | help="Only check if target is vulnerable (safe mode)") |
| 114 | parser.add_argument("--payload", help="Payload to deliver") |
| 115 | args = parser.parse_args() |
| 116 | |
| 117 | print("[*] Checking authorization: Ensure you have written permission for this target") |
| 118 | |
| 119 | if args.check_only: |
| 120 | vulnerable = check_vulnerable(args.target) |
| 121 | print(f"[{'VULN' if vulnerable else 'SAFE'}] Target {'appears vulnerable' if vulnerable else 'does not appear vulnerable'}") |
| 122 | else: |
| 123 | if not args.payload: |
| 124 | print("[-] Payload required for exploitation mode") |
| 125 | sys.exit(1) |