From 976df7a32b04a29863c01a4ea70238b7d48c8c46 Mon Sep 17 00:00:00 2001 From: Thaer Jaafreh Date: Tue, 27 Oct 2026 19:18:14 +0300 Subject: [PATCH] Add JSON index regenerator; rebuild claude-skills.json (78->79) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The existing convert_skills.py does not produce claude-skills.json — it reads a lowercase skills/ dir and emits reformatted SKILL.md files + zips. Nothing in the repo rebuilt the JSON index, so it had drifted from disk. Add regen_index.py, which rebuilds claude-skills.json from the real SKILL.md files: - reads YAML frontmatter (name/description) via PyYAML, with a regex fallback when PyYAML is absent - falls back to the "## Description" section body for older "## Metadata"-format skills that have no frontmatter description - derives category from the Skills/// path - preserves the original top-level metadata and recomputes counts - path-relative (Path(__file__).parent), so it runs from any clone Regenerated index: 79 skills / 23 categories, adding offensive-netexec (previously present on disk but missing from the index) and filling all 28 descriptions that were empty (51 frontmatter + 28 section fallback, 0 empty). Ignore *.bak. Co-Authored-By: Claude Opus 4.8 --- .gitignore | 1 + claude-skills.json | 69 +++++++++++++++------------- regen_index.py | 109 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+), 31 deletions(-) create mode 100755 regen_index.py diff --git a/.gitignore b/.gitignore index e43b0f9..13d6c95 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .DS_Store +*.bak diff --git a/claude-skills.json b/claude-skills.json index 9a1946b..01d1f36 100644 --- a/claude-skills.json +++ b/claude-skills.json @@ -5,7 +5,8 @@ "homepage": "https://github.com/SnailSploit/claude-red", "categories": { "active-directory": [ - "offensive-active-directory" + "offensive-active-directory", + "offensive-netexec" ], "ai": [ "offensive-ai-security" @@ -136,11 +137,17 @@ "path": "Skills/active-directory/offensive-active-directory/SKILL.md", "description": "Active Directory attack methodology for internal network red team engagements. Covers reconnaissance (BloodHound, PowerView, ADExplorer), credential abuse (Kerberoasting, ASREProasting, NTLM relay, LLMNR/NBT-NS poisoning), privilege escalation (ACL abuse, GPO abuse, unconstrained/constrained delegation), lateral movement (Pass-the-Hash, Pass-the-Ticket, Overpass-the-Hash, WMI/WinRM/PsExec), persistence (Golden/Silver/Diamond Tickets, DCSync, DCShadow, AdminSDHolder, Skeleton Key), forest trust attacks, ADCS abuse (ESC1-ESC15), and modern MDI/Defender for Identity evasion. Use when assessing on-prem AD, hybrid AD/Entra ID environments, or ADCS deployments." }, + { + "name": "offensive-netexec", + "category": "active-directory", + "path": "Skills/active-directory/offensive-netexec/SKILL.md", + "description": "Use this skill whenever the user asks about NetExec (nxc) — a network exploitation and post-exploitation tool for Active Directory environments. Triggers include: any mention of 'nxc', 'netexec', 'crackmapexec' successor questions, AD enumeration, SMB/LDAP/WinRM/MSSQL/SSH/RDP/VNC/WMI/FTP/NFS protocol attacks, password spraying, credential dumping (SAM, NTDS, LSASS, DPAPI), Kerberoasting, ASREPRoasting, lateral movement, BloodHound collection, module usage, or any pentest workflow involving Windows domain environments. This skill covers ALL protocols, ALL modules, and ALL core features of NetExec. Always provide full command examples with correct flags and options." + }, { "name": "offensive-ai-security", "category": "ai", "path": "Skills/ai/offensive-ai-security/SKILL.md", - "description": "" + "description": "AI/LLM security offensive checklist: prompt injection, jailbreaking, model extraction, training data poisoning, adversarial inputs, LLM-assisted attack automation, and AI system reconnaissance. Use when assessing AI/ML systems, red-teaming LLMs, or researching AI attack vectors." }, { "name": "offensive-api-abuse", @@ -164,7 +171,7 @@ "name": "offensive-oauth", "category": "auth", "path": "Skills/auth/offensive-oauth/SKILL.md", - "description": "" + "description": "OAuth 2.0 attack checklist: authorization code interception, redirect_uri bypass, CSRF on OAuth flow, state parameter abuse, open redirector chaining, token leakage via Referer, PKCE bypass, and scope escalation. Use when testing OAuth implementations in web apps or bug bounty." }, { "name": "offensive-cicd-pipeline", @@ -212,31 +219,31 @@ "name": "offensive-basic-exploitation", "category": "exploit-dev", "path": "Skills/exploit-dev/offensive-basic-exploitation/SKILL.md", - "description": "" + "description": "Week 5 exploit development curriculum. Foundational exploitation techniques: controlling EIP/RIP, ROP chain construction, ret2libc, shellcode injection, heap spraying, bypass techniques for ASLR/NX/stack canaries. Use when building initial PoCs or understanding classic exploitation primitives." }, { "name": "offensive-crash-analysis", "category": "exploit-dev", "path": "Skills/exploit-dev/offensive-crash-analysis/SKILL.md", - "description": "" + "description": "Week 4 exploit development curriculum. Crash triage and analysis methodology: WinDbg/GDB analysis, ASAN/MSAN output interpretation, exploitability assessment, register/stack trace reading, root cause identification. Use when analyzing crash dumps, assessing exploitability, or understanding fuzzer-generated crashes." }, { "name": "offensive-exploit-dev-course", "category": "exploit-dev", "path": "Skills/exploit-dev/offensive-exploit-dev-course/SKILL.md", - "description": "" + "description": "Full exploit development course roadmap and syllabus: weekly topics, recommended reading, lab setup, and learning path from vulnerability classes through advanced exploitation. Use to structure exploit dev training or onboard new researchers." }, { "name": "offensive-exploit-development", "category": "exploit-dev", "path": "Skills/exploit-dev/offensive-exploit-development/SKILL.md", - "description": "" + "description": "Exploit development operational guide: environment setup, debugging workflow, PoC development lifecycle, writing reliable exploits, using pwntools/pwndbg, heap exploitation techniques, and weaponization considerations. Use when actively developing exploits or setting up an exploit dev environment." }, { "name": "offensive-mitigations", "category": "exploit-dev", "path": "Skills/exploit-dev/offensive-mitigations/SKILL.md", - "description": "" + "description": "Security mitigation reference and bypass catalog: ASLR, DEP/NX, RELRO, stack canaries, CFI, sandboxing, seccomp. Covers both detection of enabled mitigations and known bypass techniques. Use when assessing target hardening or planning exploit mitigation bypasses." }, { "name": "offensive-toctou", @@ -260,7 +267,7 @@ "name": "offensive-bug-identification", "category": "fuzzing", "path": "Skills/fuzzing/offensive-bug-identification/SKILL.md", - "description": "" + "description": "Systematic bug identification methodology: source code review patterns, black-box testing strategies, taint analysis, dangerous function hunting, data flow tracing, and automated scanning setup. Use for code audits, bug bounty triage, or building vulnerability identification pipelines." }, { "name": "offensive-fuzzing", @@ -272,13 +279,13 @@ "name": "offensive-fuzzing-course", "category": "fuzzing", "path": "Skills/fuzzing/offensive-fuzzing-course/SKILL.md", - "description": "" + "description": "Week 2 of the exploit development curriculum. Covers fuzzing methodology: target selection, corpus generation, coverage-guided fuzzing with AFL++/libFuzzer, structured fuzzing, and triage/deduplication. Use when setting up fuzz campaigns, selecting harness strategies, or triaging fuzzer output." }, { "name": "offensive-vuln-classes", "category": "fuzzing", "path": "Skills/fuzzing/offensive-vuln-classes/SKILL.md", - "description": "" + "description": "Exploit development curriculum covering core vulnerability classes with real-world CVE case studies: stack/heap buffer overflows, use-after-free, integer overflows, format strings, type confusion, and race conditions. Use when learning or teaching vuln classes, researching specific CVE patterns, or building exploit dev knowledge." }, { "name": "offensive-advanced-redteam", @@ -290,19 +297,19 @@ "name": "offensive-edr-evasion", "category": "infrastructure", "path": "Skills/infrastructure/offensive-edr-evasion/SKILL.md", - "description": "" + "description": "EDR evasion offensive checklist: hook unhooking (user/kernel), direct syscalls, PPID spoofing, process injection variants, AMSI bypass, ETW patching, memory encryption, and behavior-based evasion. Use when planning EDR bypass during red team engagements or researching AV/EDR evasion techniques." }, { "name": "offensive-initial-access", "category": "infrastructure", "path": "Skills/infrastructure/offensive-initial-access/SKILL.md", - "description": "" + "description": "Initial access techniques checklist: phishing (spear/smishing), credential stuffing, exposed service exploitation, supply chain attacks, watering hole, VPN/RDP brute force, public-facing application exploitation. Maps to MITRE ATT&CK TA0001. Use when planning initial access phases of red team engagements." }, { "name": "offensive-keylogger-arch", "category": "infrastructure", "path": "Skills/infrastructure/offensive-keylogger-arch/SKILL.md", - "description": "" + "description": "Low-level keylogger architecture design: kernel driver hooks (WH_KEYBOARD_LL, SetWindowsHookEx), ETW-based input capture, user-mode vs kernel-mode approaches, stealth techniques, and data exfiltration. Use for understanding input capture mechanisms, EDR evasion research, or malware architecture analysis." }, { "name": "offensive-shellcode", @@ -314,13 +321,13 @@ "name": "offensive-windows-boundaries", "category": "infrastructure", "path": "Skills/infrastructure/offensive-windows-boundaries/SKILL.md", - "description": "" + "description": "Windows security boundary taxonomy and attack surface enumeration: kernel/user boundary, sandbox boundaries (LPAC, AppContainer), COM/RPC boundaries, hypervisor boundary, trust level transitions. Use when planning privilege escalation paths, sandbox escapes, or understanding Windows security architecture." }, { "name": "offensive-windows-mitigations", "category": "infrastructure", "path": "Skills/infrastructure/offensive-windows-mitigations/SKILL.md", - "description": "" + "description": "Deep-dive on Windows exploit mitigations: ASLR, DEP/NX, CFG, CET/Shadow Stack, SEHOP, Heap Guard, ACG, Arbitrary Code Guard. Covers both the protection mechanism and known bypass techniques. Use when researching Windows exploit mitigations, planning bypass strategies, or understanding protection depth." }, { "name": "offensive-iot", @@ -368,7 +375,7 @@ "name": "offensive-windows-privesc", "category": "privesc", "path": "Skills/privesc/offensive-windows-privesc/SKILL.md", - "description": "Comprehensive Windows privilege escalation methodology for offensive security engagements. Covers the full attack surface from a standard user shell to NT AUTHORITY\\\\SYSTEM: token impersonation via SeImpersonate and SeAssignPrimaryToken privileges using JuicyPotato, PrintSpoofer, GodPotato, SweetPotato, and RoguePotato; service misconfigurations including unquoted service paths, weak service DACLs, writable service binaries, and insecure service creation permissions; AlwaysInstallElevated MSI exploitation; DLL hijacking through search order abuse, phantom DLL loading, and writable PATH directory injection; UAC bypass techniques via fodhelper.exe, eventvwr.exe, CMSTP, and environment variable manipulation; scheduled task abuse for writable task actions and new task creation; registry autorun exploitation for persistence and escalation; PrintNightmare (CVE-2021-34527) for remote and local privilege escalation; and credential harvesting from SAM database extraction, DPAPI blob decryption, LSA secret dumping, and Credential Manager enumeration. Integrates automated enumeration with WinPEAS, PowerUp, SharpUp, Seatbelt, and BeRoot. Each technique includes detection signatures and defender-side visibility for purple team operations. Maps to MITRE ATT&CK T1548 (Abuse Elevation Control Mechanism) and T1574 (Hijack Execution Flow). Designed for authorized penetration testing, red team engagements, and CTF competitions where you hold a standard user shell and need to escalate to SYSTEM or local Administrator." + "description": "Comprehensive Windows privilege escalation methodology for offensive security engagements. Covers the full attack surface from a standard user shell to NT AUTHORITY\\SYSTEM: token impersonation via SeImpersonate and SeAssignPrimaryToken privileges using JuicyPotato, PrintSpoofer, GodPotato, SweetPotato, and RoguePotato; service misconfigurations including unquoted service paths, weak service DACLs, writable service binaries, and insecure service creation permissions; AlwaysInstallElevated MSI exploitation; DLL hijacking through search order abuse, phantom DLL loading, and writable PATH directory injection; UAC bypass techniques via fodhelper.exe, eventvwr.exe, CMSTP, and environment variable manipulation; scheduled task abuse for writable task actions and new task creation; registry autorun exploitation for persistence and escalation; PrintNightmare (CVE-2021-34527) for remote and local privilege escalation; and credential harvesting from SAM database extraction, DPAPI blob decryption, LSA secret dumping, and Credential Manager enumeration. Integrates automated enumeration with WinPEAS, PowerUp, SharpUp, Seatbelt, and BeRoot. Each technique includes detection signatures and defender-side visibility for purple team operations. Maps to MITRE ATT&CK T1548 (Abuse Elevation Control Mechanism) and T1574 (Hijack Execution Flow). Designed for authorized penetration testing, red team engagements, and CTF competitions where you hold a standard user shell and need to escalate to SYSTEM or local Administrator." }, { "name": "offensive-osint", @@ -380,7 +387,7 @@ "name": "offensive-osint-methodology", "category": "recon", "path": "Skills/recon/offensive-osint-methodology/SKILL.md", - "description": "" + "description": "Structured OSINT methodology framework: target definition, source selection, collection workflows, data correlation, timeline reconstruction, and reporting. Use to guide systematic OSINT campaigns or teach OSINT methodology." }, { "name": "offensive-phishing", @@ -410,7 +417,7 @@ "name": "offensive-fast-checking", "category": "utility", "path": "Skills/utility/offensive-fast-checking/SKILL.md", - "description": "" + "description": "Speed-optimized offensive checklist for rapid assessment: quick-win vulnerability patterns, fast recon shortcuts, automated scanner configurations, and triage shortcuts. Use for time-boxed assessments, CTF-speed engagements, or initial rapid surface mapping." }, { "name": "offensive-reporting", @@ -434,7 +441,7 @@ "name": "offensive-file-upload", "category": "web", "path": "Skills/web/offensive-file-upload/SKILL.md", - "description": "" + "description": "File upload vulnerability checklist: MIME type bypass, extension bypass, magic byte manipulation, path traversal in filenames, stored XSS via SVG/HTML upload, server-side processing attacks, and race conditions. Use for assessing file upload endpoints in web app pentests or bug bounty." }, { "name": "offensive-graphql", @@ -446,37 +453,37 @@ "name": "offensive-idor", "category": "web", "path": "Skills/web/offensive-idor/SKILL.md", - "description": "" + "description": "IDOR (Insecure Direct Object Reference) testing checklist: object ID enumeration, horizontal/vertical privilege escalation, GUID predictability, indirect references via hashes, chained IDOR, and API endpoint IDOR. Use for web app pentests and bug bounty IDOR discovery." }, { "name": "offensive-open-redirect", "category": "web", "path": "Skills/web/offensive-open-redirect/SKILL.md", - "description": "" + "description": "Open redirect vulnerability checklist: parameter identification, bypass techniques (URL encoding, double slashes, CRLF injection, protocol handlers), chaining with OAuth/SSRF, and impact escalation paths. Use for web app testing and bug bounty open redirect discovery." }, { "name": "offensive-parameter-pollution", "category": "web", "path": "Skills/web/offensive-parameter-pollution/SKILL.md", - "description": "" + "description": "HTTP parameter pollution (HPP) checklist: duplicate parameter injection, backend vs frontend parsing differences, WAF bypass via HPP, server-side vs client-side HPP, and practical exploitation patterns. Use when testing web applications for parameter handling flaws." }, { "name": "offensive-race-condition", "category": "web", "path": "Skills/web/offensive-race-condition/SKILL.md", - "description": "" + "description": "Race condition (TOCTOU) testing checklist: identifying timing windows, Burp Suite Turbo Intruder, Last-Byte sync technique, rate limit bypass, double-spend attacks, and concurrent request exploitation. Use for web app race condition testing or bug bounty time-of-check-to-time-of-use bugs." }, { "name": "offensive-rce", "category": "web", "path": "Skills/web/offensive-rce/SKILL.md", - "description": "" + "description": "Remote Code Execution testing checklist: OS command injection, SSTI-to-RCE, deserialization RCE, file upload RCE, XXE with SSRF to RCE, RCE via dependency confusion, and CVE-based RCE patterns. Use for web app pentests and bug bounty RCE discovery." }, { "name": "offensive-request-smuggling", "category": "web", "path": "Skills/web/offensive-request-smuggling/SKILL.md", - "description": "" + "description": "HTTP request smuggling checklist: CL.TE, TE.CL, TE.TE variants, detection with timing and differential responses, WAF bypass, cache poisoning, credential hijacking, and request smuggling via HTTP/2. Use when testing reverse proxy/load balancer configurations." }, { "name": "offensive-sqli", @@ -488,7 +495,7 @@ "name": "offensive-ssrf", "category": "web", "path": "Skills/web/offensive-ssrf/SKILL.md", - "description": "" + "description": "Server-Side Request Forgery testing checklist: SSRF discovery, blind SSRF with out-of-band, cloud metadata endpoints (AWS/GCP/Azure), SSRF filter bypass techniques (IP encoding, DNS rebinding, redirect chains), and SSRF to RCE escalation. Use for web app SSRF testing and bug bounty." }, { "name": "offensive-ssti", @@ -500,19 +507,19 @@ "name": "offensive-waf-bypass", "category": "web", "path": "Skills/web/offensive-waf-bypass/SKILL.md", - "description": "" + "description": "WAF bypass techniques checklist: encoding bypass (URL/HTML/Unicode/double encoding), case variation, comment injection, HTTP header manipulation, chunked encoding, IP rotation, timing attacks, and payload obfuscation per WAF vendor. Use when WAF is blocking payloads during web app tests." }, { "name": "offensive-xss", "category": "web", "path": "Skills/web/offensive-xss/SKILL.md", - "description": "" + "description": "Cross-Site Scripting testing checklist: stored/reflected/DOM/blind XSS discovery, polyglot payloads, CSP bypass, XSS filter bypass, event handler injection, DOM clobbering, mutation XSS, and impact escalation (session hijack, phishing, keylogging). Use for web app XSS testing and bug bounty." }, { "name": "offensive-xxe", "category": "web", "path": "Skills/web/offensive-xxe/SKILL.md", - "description": "" + "description": "XML External Entity injection testing checklist: classic XXE, blind XXE (out-of-band), XXE via file upload (SVG/docx), XXE in SOAP/REST, error-based XXE, XInclude attacks, and XXE filter bypass. Use for web app XXE testing and bug bounty." }, { "name": "offensive-bluetooth-ble", @@ -599,6 +606,6 @@ "description": "Zigbee, Thread, and Matter mesh-protocol attack methodology — IEEE 802.15.4 sniffing with TI CC2531 / CC2540 / Sonoff Zigbee Dongle E, KillerBee toolkit, Touchlink commissioning abuse with the well-known transport key, replay/injection attacks, Zigbee Cluster Library command abuse for door locks and bulbs, Thread network credential theft, Matter commissioning chain analysis, and 6LoWPAN/IPv6 routing exploitation. Use when targeting smart-home or commercial mesh deployments, Zigbee-based door locks, lighting, or sensor networks." } ], - "skill_count": 78, + "skill_count": 79, "category_count": 23 } diff --git a/regen_index.py b/regen_index.py new file mode 100755 index 0000000..01e22a2 --- /dev/null +++ b/regen_index.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +"""Regenerate claude-skills.json from the real SKILL.md frontmatter on disk. +Preserves the existing file's top-level metadata (name/version/license/homepage) +and the original category ordering; recomputes skills, categories, and counts.""" +import json, re, sys +from pathlib import Path + +ROOT = Path(__file__).resolve().parent +SKILLS = ROOT / "Skills" +JSON = ROOT / "claude-skills.json" + +try: + import yaml +except ImportError: + yaml = None + +def description_section(text): + """Fallback for older '## Metadata'-format files: pull the body of the + '## Description' section (everything up to the next '## ' header).""" + m = re.search(r'^##\s+Description\s*\n(.*?)(?=^\s*##\s+|\Z)', text, re.S | re.M | re.I) + if not m: + return "" + body = m.group(1).strip() + # collapse the paragraph into a single clean line + return re.sub(r'\s+', ' ', body).strip() + +def frontmatter(text): + m = re.match(r'^---\n(.*?)\n---', text, re.S) + if not m: + return {} + block = m.group(1) + if yaml: + try: + data = yaml.safe_load(block) or {} + if isinstance(data, dict): + return data + except Exception: + pass + # fallback: minimal name/description parse + out = {} + nm = re.search(r'^name:\s*(.+)$', block, re.M) + if nm: out['name'] = nm.group(1).strip().strip('"\'') + dm = re.search(r'^description:\s*(.+)$', block, re.M | re.S) + if dm: out['description'] = dm.group(1).strip().strip('"\'') + return out + +old = json.loads(JSON.read_text()) + +skills = [] +for sk in sorted(SKILLS.rglob("SKILL.md")): + rel = sk.relative_to(ROOT) + parts = rel.parts # Skills / / / SKILL.md + category = parts[1] if len(parts) >= 4 else "uncategorized" + raw = sk.read_text(encoding="utf-8", errors="replace") + fm = frontmatter(raw) + name = fm.get("name") or sk.parent.name + desc = (fm.get("description") or "").strip() + desc_source = "frontmatter" + if not desc: + desc = description_section(raw) + desc_source = "section" if desc else "none" + skills.append({ + "name": name, + "category": category, + "path": str(rel), + "description": desc, + "_src": desc_source, + }) + +skills.sort(key=lambda s: (s["category"], s["name"])) + +# tally description sources, then strip the private marker before serializing +from collections import Counter +src_counts = Counter(s.pop("_src") for s in skills) + +categories = {} +for s in skills: + categories.setdefault(s["category"], []).append(s["name"]) +for c in categories: + categories[c].sort() + +result = { + "name": old.get("name", "claude-red"), + "version": old.get("version", "0.0.0"), + "license": old.get("license", "MIT"), + "homepage": old.get("homepage", ""), + "categories": {c: categories[c] for c in sorted(categories)}, + "skills": skills, + "skill_count": len(skills), + "category_count": len(categories), +} + +JSON.write_text(json.dumps(result, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") + +# report +empty = [s["name"] for s in skills if not s["description"]] +print(f"yaml parser: {'PyYAML' if yaml else 'regex-fallback'}") +print(f"skills written : {result['skill_count']}") +print(f"categories : {result['category_count']}") +print(f"desc sources : frontmatter={src_counts.get('frontmatter',0)} " + f"section-fallback={src_counts.get('section',0)} none={src_counts.get('none',0)}") +print(f"empty descrips : {len(empty)}") +if empty: + print(" ->", ", ".join(empty)) +# which names are new vs old +oldnames = {s['name'] for s in old['skills']} +newnames = {s['name'] for s in skills} +print("added vs old :", ", ".join(sorted(newnames - oldnames)) or "none") +print("removed vs old :", ", ".join(sorted(oldnames - newnames)) or "none")