Skip to content
Back to search

TORCH

Karpathy LLM based claude harness for PenetrationTesting / Bugbounty using obsidian

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/encod3d-sec--torch/badge.svg)](/listings/encod3d-sec--torch)

HTML

<a href="/listings/encod3d-sec--torch"><img src="/api/listings/encod3d-sec--torch/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

git clone <this-repo> TORCH
cd TORCH

# One-time, per-machine setup. NOTE: bootstrap.sh mutates ~/.claude: it writes a
# CLAUDE.md include, symlinks the hooks, registers the MCP servers, and installs
# qmd + the official Claude plugins. Read it first; it is aggressive by design.
bash setup/bootstrap.sh

# Build the search index (re-run after adding wiki pages)
qmd update

# Restart Claude Code so it loads the hooks, skills, and MCP servers.

# Start an engagement (pentest | bugbounty | ctf)
bash setup/new-engagement.sh acme pentest

# Then, inside Claude Code, drive the whole engagement autonomously with the matching workflow:
#   /pt-workflow    pentest (client-report deliverable)
#   /bb-workflow    bug-bounty program
#   /ctf-workflow   CTF / boot-to-root box

# Run the test suite
python3 -m pytest -q

# Before any push, run the leak gate
bash scripts/check-leaks.sh

`bootstrap.sh` self-locates the vault; if it cannot, set `OBSIDIAN_VAULT` (and `QMD_VAULT` for the search index) to the repo root. Per-machine paths go in the git-ignored `CLAUDE.local.md`, copy [`CLAUDE.local.example.md`](CLAUDE.local.example.md) to create it. See [`docs/setup.md`](docs/setup.md) for the full walkthrough.

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 197 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # TORCH
  2. ```sh
  3. )
  4. ( (
  5. ) ) (
  6. ( ( ) ) T O R C H
  7. ) (*) ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  8. )|( Targeted Offensive Recon & Compromise Harness
  9. |
  10. |=|
  11. | |
  12. |_|
  13. ```
  14. **An AI-powered penetration testing and bug-bounty knowledge base and automation harness for [Claude Code](https://claude.com/claude-code).** It turns an Obsidian vault into an opinionated offensive-security workflow: autonomous campaign drivers (`/pt-workflow`, `/bb-workflow`, `/ctf-workflow`) that run a whole engagement end to end, a searchable wiki of 500+ hacking technique pages, per-vulnerability "hunt" skills, deterministic hooks that fire the right skill at the right moment, and a state-first engagement model that stops you (and the model) from repeating work.
  15. [![Built for Claude Code](https://img.shields.io/badge/built%20for-Claude%20Code-blueviolet.svg)](https://claude.com/claude-code)
  16. [![Wiki pages](https://img.shields.io/badge/wiki-500%2B%20pages-brightgreen.svg)](wiki/)
  17. [![LinkedIn](https://img.shields.io/badge/LinkedIn-Tomas%20Zabukas-0A66C2.svg?logo=linkedin&logoColor=white)](https://www.linkedin.com/in/tomas-zabukas/)
  18. TORCH is a red-team / bug-bounty second brain built on Andrej Karpathy's [LLM Wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) pattern: a persistent, AI-maintained knowledge base the model synthesizes each new source into over time, instead of re-deriving from raw documents on every query. Concretely, an offensive-security wiki, an agentic hunt-skill library, and a Model Context Protocol (MCP) search layer, wired together so Claude Code always checks the knowledge base before it attacks and never repeats a dead end. Think HackTricks or PayloadsAllTheThings, but indexed for semantic search and driven by an autonomous AI agent.
  19. > **Authorized testing only.** Everything here assumes a legal engagement: a signed penetration test, a bug-bounty program in scope, or your own lab / CTF. You are responsible for staying in scope and within the rules of engagement.
  20. If TORCH saves you time on an engagement, a [star](https://github.com/Encod3d-Sec/TORCH) helps other pentesters and bug-bounty hunters find it.
  21. ---
  22. ## Contents
  23. - [Features](#features)
  24. - [The knowledge base](#the-knowledge-base-500-pages-ship-with-the-repo)
  25. - [What ships vs what stays private](#what-ships-vs-what-stays-private)
  26. - [Requirements](#requirements)
  27. - [Quickstart](#quickstart)
  28. - [Plugins and MCP servers](#plugins-and-mcp-servers)
  29. - [Layout](#layout)
  30. - [The model underneath](#the-model-underneath)
  31. - [Safety and boundaries](#safety-and-boundaries)
  32. - [License](#license)
  33. ---
  34. ## Features
  35. - **Autonomous engagement workflows** (`/pt-workflow`, `/bb-workflow`, `/ctf-workflow`): the headline capability, run a whole pentest, bug-bounty program, or boot-to-root box end to end with no operator approvals. A deterministic driver (`scripts/campaign.py`) owns pass state, builds a kill-chain board from recon, and prints the exact next action (which skill + tool) every turn, enforcing the wiki-first, tool-first, typed-evidence, and dead-end-first gates. Single agent, refuter-verified; the pentest flow delivers a client report. Verify the driver is wired up on a new machine with `/campaign-health`.
  36. - **Wiki-first methodology.** 500+ markdown technique pages indexed by `qmd` for semantic and keyword search over an MCP server (`wiki-search`). Every hunt skill queries the wiki *before* attacking, so knowledge compounds instead of scattering.
  37. - **Hunt skills** (`skills/hunt/hunt-*`): one per vulnerability class, XSS, SQLi, SSRF, IDOR, RCE, auth bypass, OAuth/SAML federation, deserialization, cloud (AWS/Azure/GCP), Active Directory, local Windows and macOS privilege escalation, API (OWASP API Top 10), LLM/AI, ICS/OT, request smuggling, cache poisoning, and more. Each is wiki-first, out-of-band-gated for blind bugs, and emits a uniform FIND finding schema.
  38. - **Deterministic automation (hooks).** Plain Python that fires on Claude Code lifecycle events:
  39. - `hunt-trigger.py` (UserPromptSubmit) matches your prompt against `skills/hunt/triggers.json` and loads the matching hunt skill.
  40. - `recon-capture.py` (PostToolUse) fingerprints discovered tech against `scripts/playbook.json`, routes to targeted tests, and auto-captures results into engagement state and PoC evidence.
  41. - `engagement-init.py` (SessionStart) self-heals the engagement file set and injects a ranked next-move summary.
  42. - `scope-guard.py` (PreToolUse) denies a command that targets an out-of-scope host or uses rules-of-engagement-forbidden tooling (deterministic enforcement; a `.enforce-off` marker downgrades it to advisory).
  43. - **State-first engagement model.** Each engagement lives under `targets/<name>/` (`state`, `loot`, `paths`, `scope`, `killchain`). `next_move.py` ranks what to do next, and the kill-chain board's coverage table (via the `coverage` skill) surfaces untested vulnerability classes so nothing in scope is skipped.
  44. - **Research loop** (`skills/research`) for CVE discovery on binaries, libraries, and repos, with its own persistent state under `raw/research/`.
  45. - **Hard client-data boundary.** Every client specific stays under `targets/` (git-ignored); `scripts/check-leaks.sh` gates tracked files before you ever push.
  46. ---
  47. ## The knowledge base (500+ pages ship with the repo)
  48. The `wiki/` corpus is the heart of TORCH and it is fully committed, clone it and you get the whole library, not an empty shell. It is a living offensive-security reference organized as:
  49. | Area | Covers |
  50. |---|---|
  51. | `wiki/techniques/` | Active Directory, cloud, web, network, Linux, macOS, exploit-dev, OSINT, cracking, red-team, mobile/IoT, blockchain, methodology |
  52. | `wiki/payloads/` | Per-vulnerability-class payload arsenals the hunt skills pull from |
  53. | `wiki/tools/` | Per-tool references (nmap, ffuf, nuclei, httpx, sqlmap, BloodHound, netexec, ...) |
  54. | `wiki/cheatsheets/` | Quick-reference command sheets and default-credential tables |
  55. Pages are cross-linked Obsidian-style and indexed for semantic search, so "SSRF to cloud metadata" or "ESC1 ADCS" resolves to the right page in one query. The wiki grows every engagement through the `learn` skill, which distills generic, client-free lessons back into it.
  56. ---
  57. ## What ships vs what stays private
  58. The wiki and the entire harness are public. Only client data and per-machine state are held back by [`.gitignore`](.gitignore):
  59. | Tracked (ships, safe to push) | Git-ignored (stays private) |
  60. |---|---|
  61. | `wiki/` the full 500+ page corpus | `targets/` client engagements and findings |
  62. | `skills/`, `scripts/`, `setup/`, `docs/`, `tests/` | `CLAUDE.local.md` machine hostnames and paths |
  63. | `CLAUDE.md`, `README.md`, `LICENSE` | `session/`, `raw/` local working state |
  64. | `targets/TARGETS.md` the generic engagement playbook | `.claude/`, `.obsidian/`, runtime stamps and caches |
  65. **The client-data boundary is a hard rule.** Hosts, credentials, findings, and engagement narrative live *only* under `targets/`, which git ignores wholesale (with the single generic playbook whitelisted). Run `bash scripts/check-leaks.sh` before your first push, it scans tracked files for engagement markers, private IPs, and emails.
  66. ---
  67. ## Requirements
  68. - Linux or WSL, `bash`, `python3` (3.10+)
  69. - [Claude Code](https://claude.com/claude-code) CLI
  70. - Node.js >= 18 and [bun](https://bun.sh)
  71. - `qmd` (installed by the bootstrap via `bun install -g @qmd/cli`), which provides the `wiki-search` MCP server via `qmd mcp`
  72. ## Quickstart
  73. ```bash
  74. git clone <this-repo> TORCH
  75. cd TORCH
  76. # One-time, per-machine setup. NOTE: bootstrap.sh mutates ~/.claude: it writes a
  77. # CLAUDE.md include, symlinks the hooks, registers the MCP servers, and installs
  78. # qmd + the official Claude plugins. Read it first; it is aggressive by design.
  79. bash setup/bootstrap.sh
  80. # Build the search index (re-run after adding wiki pages)
  81. qmd update
  82. # Restart Claude Code so it loads the hooks, skills, and MCP servers.
  83. # Start an engagement (pentest | bugbounty | ctf)
  84. bash setup/new-engagement.sh acme pentest
  85. # Then, inside Claude Code, drive the whole engagement autonomously with the matching workflow:
  86. # /pt-workflow pentest (client-report deliverable)
  87. # /bb-workflow bug-bounty program
  88. # /ctf-workflow CTF / boot-to-root box
  89. # Run the test suite
  90. python3 -m pytest -q
  91. # Before any push, run the leak gate
  92. bash scripts/check-leaks.sh
  93. ```
  94. `bootstrap.sh` self-locates the vault; if it cannot, set `OBSIDIAN_VAULT` (and `QMD_VAULT` for the search index) to the repo root. Per-machine paths go in the git-ignored `CLAUDE.local.md`, copy [`CLAUDE.local.example.md`](CLAUDE.local.example.md) to create it. See [`docs/setup.md`](docs/setup.md) for the full walkthrough.
  95. ---
  96. ## Plugins and MCP servers
  97. TORCH runs on Claude Code plus a set of plugins and MCP servers. `setup/bootstrap.sh`
  98. installs the core set for you; the rest are referenced by the workflow and installed separately.
  99. **Installed by `bootstrap.sh`:**
  100. - **qmd** - the semantic + keyword search engine over `wiki/` (`bun install -g @qmd/cli`); registers the `wiki-search` MCP (`qmd mcp`).
  101. - **caveman** - terse-output / prose-compression mode; also registers the `caveman-shrink` MCP (a token-compressed `wiki-search`).
  102. - **ponytail** - "lazy senior dev" engineering-discipline mode (pushes for the simplest working solution; governs code, not prose), from marketplace `DietrichGebert/ponytail`.
  103. - Official Claude Code plugins: **code-review**, **claude-md-management**, **skill-creator**, **frontend-design** (`claude plugins install <name>@claude-plugins-official`).
  104. **Install separately (referenced by the harness):**
  105. - **superpowers** (recommended) - the planning / execution / debugging workflow the CLAUDE.md loop routes to: `brainstorming` -> `writing-plans` -> `subagent-driven-development`, plus `systematic-debugging`, `dispatching-parallel-agents`, and `verification-before-completion`.
  106. - **context7** (optional MCP) - up-to-date library / API docs, used for vendor-default and dependency lookups.
  107. - **gsd** (optional) - the `pause-work` session-end helper.
  108. - **burp-mcp** (optional MCP) - drives Burp Suite for the `hunt-burp` workflow.
  109. Install plugins from Claude Code's plugin marketplace (`/plugin`), and MCP servers with `claude mcp add`.
  110. Everything degrades gracefully: the hooks fail open and the hunt/wiki skills work without the optional
  111. plugins, but the documented planning loop assumes `superpowers`.
  112. ## Layout
  113. ```
  114. CLAUDE.md top-level instructions loaded by Claude Code
  115. wiki/ 500+ page technique corpus (ships; semantic + keyword indexed)
  116. skills/ hunt-* skills, workflow/ (campaign drivers, triage / evidence / coverage), research / disclosure / burp, hooks/, meta-skills
  117. scripts/ campaign (autonomous workflow driver), next_move, find-lint, check-leaks, index / lint tooling
  118. setup/ bootstrap, install-hooks, install-skills, new-engagement / research, templates
  119. docs/ workflows, page-types, setup, sharing (client-data boundary), conventions
  120. tests/ pytest suite for the automation
  121. targets/ engagements (git-ignored; client data lives ONLY here)
  122. ```
  123. Full annotated tree in [`docs/layout.md`](docs/layout.md). Start with [`docs/workflows.md`](docs/workflows.md) for the day-to-day flow and [`docs/sharing.md`](docs/sharing.md) for the client-data boundary rules.
  124. ---
  125. ## The model underneath
  126. TORCH is a *harness*, the intelligence it orchestrates is a large language model (Claude). If you want to understand what an LLM actually is under the hood, tokens, attention, training, and inference, the clearest from-scratch implementations on the internet are Andrej Karpathy's:
  127. - **[nanoGPT](https://github.com/karpathy/nanoGPT)** a minimal, readable GPT training and finetuning codebase; the canonical "here is a transformer, end to end."
  128. - **[nanochat](https://github.com/karpathy/nanochat)** a full ChatGPT-style pipeline (pretraining, supervised finetuning, RL, and inference with a web UI) in one hackable repo.
  129. - **[Neural Networks: Zero to Hero](https://karpathy.ai/zero-to-hero.html)** the video series that builds an LLM line by line, from `micrograd` up to a GPT.
  130. Those repos show you the engine; TORCH shows you how to point that engine at a target and keep it disciplined.
  131. ---
  132. ## Safety and boundaries
  133. - Client and engagement data (hosts, credentials, findings) lives **only** under `targets/`, which is git-ignored. Never write it into `wiki/`, `docs/`, `skills/`, or commit messages.
  134. - `scripts/check-leaks.sh` scans tracked files for engagement markers and flags emails and private IPs before you publish. Run it before any push.
  135. - The hunt skills enforce out-of-band confirmation for blind vulnerability classes, no inference-only findings.
  136. ---
  137. ## License
  138. MIT, see [LICENSE](LICENSE).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.