onionclaw
Check the OnionClaw setup, search the Tor dark web, fetch and crawl .onion hidden service pages, rotate Tor identity, run structured OSINT investigations, and monitor ransomware leak sites for changes. Use when user asks to search dark web, investigate .onion sites, find if data appeared on dark web, conduct Tor-based OSINT, look up dark web leaks, fetch or crawl any .onion URL, check for leaked credentials, investigate, monitor or prioritise ransomware groups, map them to MITRE ATT&CK, pull a list of indicators (onion hosts, domains, wallets, CVEs) to block, watch for new victims in a sector, or export threat intel as STIX 2.1.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/JacobJandon/OnionClaw with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/JacobJandon/OnionClaw'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/jacobjandon--onionclaw)HTML
<a href="/listings/jacobjandon--onionclaw"><img src="/api/listings/jacobjandon--onionclaw/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
**Linux (Debian/Ubuntu):**
apt install tor && tor &
**macOS:**
brew install tor && tor &
**With control port (needed for `renew.py`):**
cat > /tmp/onionclaw_tor.conf << 'EOF' SocksPort 9050 ControlPort 9051 CookieAuthentication 1 DataDirectory /tmp/tor_data EOF tor -f /tmp/onionclaw_tor.conf &
Then set `TOR_DATA_DIR=/tmp/tor_data` in `.env`.
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.
SKILL.md · Manifest · 410 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- ---
- name: onionclaw
- description: Check the OnionClaw setup, search the Tor dark web, fetch and crawl .onion hidden service pages, rotate Tor identity, run structured OSINT investigations, and monitor ransomware leak sites for changes. Use when user asks to search dark web, investigate .onion sites, find if data appeared on dark web, conduct Tor-based OSINT, look up dark web leaks, fetch or crawl any .onion URL, check for leaked credentials, investigate, monitor or prioritise ransomware groups, map them to MITRE ATT&CK, pull a list of indicators (onion hosts, domains, wallets, CVEs) to block, watch for new victims in a sector, or export threat intel as STIX 2.1.
- homepage: https://github.com/JacobJandon/OnionClaw
- metadata:
- {
- "openclaw": {
- "emoji": "🧅",
- "os": ["darwin", "linux"],
- "requires": {
- "bins": ["python3", "pip3"],
- "pip": ["requests[socks]", "beautifulsoup4", "python-dotenv", "stem"]
- },
- "version": "2.4.0",
- "author": "JacobJandon",
- "license": "Apache-2.0",
- "repo": "https://github.com/JacobJandon/OnionClaw"
- }
- }
- ---
- # OnionClaw — Tor / Dark Web Access
- **by JacobJandon** · Apache License 2.0 · [github.com/JacobJandon/OnionClaw](https://github.com/JacobJandon/OnionClaw)
- OnionClaw routes all requests through the Tor network. It searches 17 dark web search engines simultaneously, fetches .onion hidden service pages, rotates Tor circuits, and produces structured OSINT reports using the Robin investigation pipeline.
- ## Setup (run once after install)
- Install Python dependencies:
- ```bash
- pip3 install requests[socks] beautifulsoup4 python-dotenv stem
- ```
- Run the interactive first-run wizard (sets up `.env` and torrc in one step):
- ```bash
- python3 {baseDir}/setup.py
- ```
- Or set up manually:
- ```bash
- cp {baseDir}/.env.example {baseDir}/.env
- # Edit {baseDir}/.env — add LLM_PROVIDER + API key (optional; search and fetch work without one)
- ```
- Start Tor (required before any command):
- ```bash
- # Linux: sudo apt install tor && sudo systemctl start tor
- # macOS: brew install tor && brew services start tor
- # Custom: tor -f /tmp/tor_data/torrc & (setup.py creates this)
- ```
- Enable circuit rotation (ControlPort) — required for `renew.py`:
- ```
- Add to /etc/tor/torrc:
- ControlPort 9051
- CookieAuthentication 1
- Then restart Tor. setup.py does this automatically.
- ```
- ---
- ## Commands
- ### Check the whole setup
- **Run this first when anything misbehaves.** It reports Python, dependencies, Tor, the
- ControlPort, `.env`, the LLM provider, the observation store and engine health in one
- pass, and prints the command that fixes each problem.
- ```bash
- python3 {baseDir}/doctor.py # full report
- python3 {baseDir}/doctor.py --deep # also makes one live request through Tor
- python3 {baseDir}/doctor.py --json # machine-readable
- ```
- Exit code 0 means everything required is in place. Tor and the LLM key are optional:
- search, fetch, crawl and the clearnet collectors work without them.
- ---
- ### Check Tor is running
- **Always run this first** before any search or fetch.
- ```bash
- python3 {baseDir}/check_tor.py
- ```
- Output: exit IP address and `tor_active: true/false`. If tor_active is false, tell the user to start Tor and stop.
- ---
- ### Rotate Tor identity
- Get a fresh exit node and new identity. Use between investigation sessions or when you need a new IP.
- ```bash
- python3 {baseDir}/renew.py
- ```
- Output: `success: true/false`. If false, the user needs to ensure ControlPort 9051 is enabled and `TOR_DATA_DIR` is set in `.env`.
- ---
- ### Search the dark web
- Search all 17 dark web engines simultaneously. Returns deduplicated `{title, url, engine}` results.
- **Basic search:**
- ```bash
- python3 {baseDir}/search.py --query "SEARCH_TERM"
- ```
- **With result limit:**
- ```bash
- python3 {baseDir}/search.py --query "SEARCH_TERM" --max 30
- ```
- **Specific engines only:**
- ```bash
- python3 {baseDir}/search.py --query "SEARCH_TERM" --engines Ahmia Tor66 Ahmia-clearnet
- ```
- **Only engines known to be alive (recommended):**
- ```bash
- python3 {baseDir}/check_engines.py # refresh the health list
- python3 {baseDir}/search.py --query "SEARCH_TERM" --alive
- ```
- Dark web indexes go down constantly. Every dead engine costs the full `TOR_TIMEOUT`
- (45s by default), so a default all-engine search can block for minutes. Measured on a
- live Tor circuit with 11 of 17 engines up: `--alive` returned in **3 seconds**, the
- unscoped search did not finish within 280. Prefer `--alive` and tell the user how many
- engines answered.
- Available engines: Ahmia, OnionLand, Amnesia, Torland, Excavator, Onionway, Tor66, OSS, Torgol, TheDeepSearches, DuckDuckGo-Tor, Ahmia-clearnet
- **Tip:** Use short keyword queries (≤5 words). Dark web indexes respond better to focused keywords than natural-language questions.
- ---
- ### Fetch a .onion page
- Fetch the full content of any .onion URL or clearnet URL through Tor.
- ```bash
- python3 {baseDir}/fetch.py --url "http://SOME.onion/path"
- ```
- Output: title, text (first 3000 chars), link list, HTTP status. If status is 0 or error is set, the hidden service is unreachable.
- ---
- ### Check which search engines are alive
- Ping all 12 engines via Tor and get latency + status for each.
- ```bash
- python3 {baseDir}/check_engines.py
- ```
- Output: per-engine up/down status, latency in ms. Use this before a large search run to pass only alive engines to `--engines`.
- ---
- ### OSINT analysis
- Analyse scraped dark web content with an LLM. Produces a structured sectioned report.
- **From a string:**
- ```bash
- python3 {baseDir}/ask.py --query "INVESTIGATION_QUERY" --mode MODE --content "RAW_TEXT"
- ```
- **From a file:**
- ```bash
- python3 {baseDir}/ask.py --query "INVESTIGATION_QUERY" --mode MODE --file /path/to/content.txt
- ```
- **From stdin (pipe):**
- ```bash
- echo "CONTENT" | python3 {baseDir}/ask.py --query "QUERY" --mode MODE
- ```
- **Analysis modes:**
- | Mode | Use for |
- |---|---|
- | `threat_intel` | General OSINT (default) — artifacts, insights, next steps |
- | `ransomware` | Malware/C2/MITRE TTPs, victim orgs, indicators |
- | `personal_identity` | PII/breach exposure, severity, protective actions |
- | `corporate` | Leaked credentials/code/docs, IR recommendations |
- **With custom focus:**
- ```bash
- python3 {baseDir}/ask.py --query "QUERY" --mode threat_intel --custom "Focus on cryptocurrency wallet addresses"
- ```
- ---
- ### Full OSINT pipeline (one command)
- Runs the complete Robin pipeline: refine query → check live engines → search → filter best results → batch scrape → OSINT analysis.
- ```bash
- python3 {baseDir}/pipeline.py --query "INVESTIGATION_QUERY" --mode MODE
- ```
- **With more results:**
- ```bash
- python3 {baseDir}/pipeline.py --query "INVESTIGATION_QUERY" --mode ransomware --max 50 --scrape 10
- ```
- **Without an LLM key (raw results only):**
- ```bash
- python3 {baseDir}/pipeline.py --query "INVESTIGATION_QUERY" --no-llm
- ```
- **Options:**
- - `--query` — investigation topic (natural language OK — it gets refined automatically)
- - `--mode` — `threat_intel` (default), `ransomware`, `personal_identity`, `corporate`
- - `--max` — max raw results from search (default 30)
- - `--scrape` — how many pages to batch-fetch (default 8)
- - `--custom` — custom LLM instructions appended to the mode prompt
- - `--out FILE` — write final report to a file
- - `--no-llm` — skip refine/filter/ask steps; dump raw scraped content (no API key needed)
- ---
- ### Crawl one hidden service
- Follow links within a single .onion site and collect checksum-validated entities (BTC/ETH/XMR wallets, emails, .onion links, Tox IDs, PGP blocks). Pages in a level are fetched concurrently.
- ```bash
- python3 {baseDir}/crawl.py --url "http://example.onion" --depth 2 --max-pages 15
- python3 {baseDir}/crawl.py --url "http://example.onion" --json
- ```
- Abuse material is never crawled; every refusal is listed with its reason in the output.
- ---
- ### Monitor for changes (swarm)
- Read-only collectors run in parallel and report only what changed since the last sweep. State is kept in `{baseDir}/onionclaw.db`; the first run records a quiet baseline.
- ```bash
- python3 {baseDir}/swarm.py # one sweep → prioritised digest
- python3 {baseDir}/swarm.py --watch healthcare --watch US # flag matching events as PRIORITY
- python3 {baseDir}/swarm.py --wallet bc1q... # track a Bitcoin address on-chain
- python3 {baseDir}/swarm.py --onion http://xyz.onion # watch a hidden-service page (needs Tor)
- python3 {baseDir}/swarm.py --json # machine-readable digest
- ```
- Collectors: `leaksites` (ransomware.live victims), `groupinfra` (leak-site up/down), `kev` (CISA KEV, incl. CVEs newly tied to ransomware), `wallets` (mempool.space), `onionsites` (your URLs via Tor). Clearnet sources work without Tor.
- Alerts: `--webhook URL --webhook-format slack|discord|generic` (exactly-once per webhook, optional `--webhook-secret` HMAC signing).
- ---
- ### Export STIX 2.1 and correlate groups
- ```bash
- python3 {baseDir}/stix.py -o bundle.json # STIX 2.1 bundle for MISP / OpenCTI
- python3 {baseDir}/graph.py # groups linked by shared wallet / host / alias, with evidence
- python3 {baseDir}/graph.py --activity # groups ranked by time-decayed activity
- ```
- Correlation is a lead for an analyst, not attribution — present the evidence with every link.
- ---
- ### Prioritise groups and map their ATT&CK techniques
- ```bash
- python3 {baseDir}/risk.py # groups ranked by a transparent priority score
- python3 {baseDir}/risk.py --group qilin # every factor behind one group's score
- python3 {baseDir}/ttp.py --group medusa # MITRE ATT&CK techniques + tools for a group
- python3 {baseDir}/ttp.py --technique T1078 # which observed groups use a technique
- python3 {baseDir}/ttp.py # most-used techniques across observed groups
- ```
- ### List every observed indicator
- ```bash
- python3 {baseDir}/iocs.py # all indicators, most actionable first
- python3 {baseDir}/iocs.py --group qilin # indicators attributed to one group
- python3 {baseDir}/iocs.py --type btc_wallet --type cve
- python3 {baseDir}/iocs.py --flag ransomware # KEV CVEs tied to ransomware campaigns
- python3 {baseDir}/iocs.py --format csv -o iocs.csv # table | json | csv
- ```
- Types: `onion_host`, `domain`, `btc_wallet`, `cve`, `email`, `tox`. The list is derived from
- stored observations, so it never disagrees with them. Values are **defanged** by default
- (`hxxp://`, `[.]`) for safe sharing; pass `--fanged` for machine-readable output. Attribution
- comes from what a leak site published, not analysis — present it as a lead.
- ---
- `ttp.py` uses the ATT&CK data ransomware.live publishes per group (confidence "high") and adds whole-word keyword hits from ransom notes (confidence "low", each with the sentence it came from). `risk.py` scores volume, critical-sector victims, reach, capability and evidence links, then decays groups that have gone quiet. Present the score as a triage order, not a threat verdict, and show the factors.
- ---
- ## Typical investigation flows
- ### "Search the dark web for X"
- 1. `python3 {baseDir}/check_tor.py` — verify connected
- 2. `python3 {baseDir}/search.py --query "X"` — search all engines
- 3. `python3 {baseDir}/fetch.py --url "URL"` on 2-3 top results
- 4. `python3 {baseDir}/ask.py --mode threat_intel --query "X" --content "..."` on combined text
- ### "Has company.com been leaked on the dark web"
- 1. `python3 {baseDir}/check_tor.py`
- 2. `python3 {baseDir}/pipeline.py --query "company.com data leak credentials" --mode corporate`
- 3. Present the structured report to the user
- ### "Investigate ransomware group X"
- 1. `python3 {baseDir}/check_tor.py`
- 2. `python3 {baseDir}/pipeline.py --query "GROUP_NAME ransomware" --mode ransomware`
- ### "Watch for new ransomware victims in sector X"
- 1. `python3 {baseDir}/swarm.py --watch "X"` — the first run baselines; later runs report only changes
- 2. Present the PRIORITY events first, then the rest of the digest
- ### "Give me indicators for group X we can block"
- 1. `python3 {baseDir}/swarm.py` — refresh observations
- 2. `python3 {baseDir}/iocs.py --group X --fanged --format csv -o X.csv`
- 3. Note which rows are flagged `live`; say plainly that attribution is the leak site's claim
- ### "Which ransomware groups should we worry about right now?"
- 1. `python3 {baseDir}/swarm.py` — refresh observations
- 2. `python3 {baseDir}/risk.py` — ranked list; then `risk.py --group NAME` for the top ones
- 3. `python3 {baseDir}/ttp.py --group NAME` — the ATT&CK techniques to defend against
- ### "Fetch this .onion URL"
- 1. `python3 {baseDir}/check_tor.py`
- 2. `python3 {baseDir}/fetch.py --url "URL"`
- 3. Show the user the title + text content
- ---
- ## Important notes
- - All traffic routes through Tor — tell the user this when relevant.
- - .onion sites are frequently offline — if fetch returns `status: 0`, the site is temporarily down.
- - Dark web search indexes go down often — run `check_engines.py` first, then search with `--alive`. Each dead engine costs the full `TOR_TIMEOUT`, so this is the difference between seconds and minutes.
- - LLM tools (`ask`) require an API key in `{baseDir}/.env`. Search and fetch work without any key.
- - The swarm's collectors only read public data; never use OnionClaw to contact, negotiate with, or deceive anyone.
- - ransomware.live's free API is for personal use and allows 1 request/minute per endpoint; OnionClaw enforces the limit. Business use needs a PRO key (`RANSOMWARE_LIVE_API_KEY`).
- - Use responsibly and lawfully — OSINT, security research, and threat intelligence only.
- ---
- ## Maintenance
- ### sync_sicry.py — update bundled sicry.py from upstream
- `sync_sicry.py` fetches the latest (or a tagged) `sicry.py` from the upstream
- [SICRY™ GitHub repo](https://github.com/JacobJandon/Sicry) and overwrites the
- bundled copy inside OnionClaw. Run it after a new SICRY™ release is published.
- ### Checking for OnionClaw updates
- OnionClaw will **automatically notify you** whenever a newer release is
- available — a one-line message is printed at startup of `pipeline.py` if an
- update exists. You can also check on demand:
- ```bash
- # Quick CLI update check (prints latest version, release URL, upgrade command):
- python3 {baseDir}/pipeline.py --check-update
- # Programmatic check from any Python environment:
- import sicry
- r = sicry.check_update()
- if not r["up_to_date"]:
- print(f"Update: {r['current']} → {r['latest']} {r['url']}")
- ```
- Upgrade after a new release:
- ```bash
- git -C {baseDir} pull # update the whole repo
- python3 {baseDir}/sync_sicry.py # re-sync sicry.py from SICRY™
- ```
- The check is clearnet-only (not through Tor), uses a 4-second timeout, and
- is always silent on network errors.
- ```bash
- # Pull latest main branch:
- python3 {baseDir}/sync_sicry.py
- # Pull a specific release tag:
- python3 {baseDir}/sync_sicry.py --tag v1.2.0
- # Preview without writing (dry run):
- python3 {baseDir}/sync_sicry.py --dry-run
- ```
- **Development workflow** (when editing sicry.py locally):
- 1. Edit `OnionClaw/sicry.py`.
- 2. Copy to parent repo: `cp OnionClaw/sicry.py Sicry/sicry.py`
- 3. Commit + tag both repos, then push.
- 4. Once the tag is live on GitHub, users can run `sync_sicry.py --tag vX.Y.Z`
- to update their OnionClaw copy.
- Flags:
- - `--tag REF` — git ref or tag to fetch (default: `main`)
- - `--dry-run` — show what would happen without writing anything
README.md · README · 793 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- # OnionClaw 🧅
- [](https://github.com/JacobJandon/OnionClaw/blob/main/LICENSE)
- [](https://github.com/JacobJandon/OnionClaw/actions/workflows/ci.yml)
- [](https://github.com/JacobJandon/OnionClaw)
- **by JacobJandon**
- <p align="center">
- <img src="OnionClaw-logo.png" alt="OnionClaw logo" width="200"/>
- </p>
- > **OpenClaw skill + standalone tool** — full Tor / dark web access for AI agents
- OnionClaw gives AI agents full access to the Tor network and .onion hidden services. It runs as an [OpenClaw](https://github.com/openclaw/openclaw) skill (drop-in, zero config beyond a `.env` file) and also works standalone from any terminal.
- Based on the [SICRY](https://github.com/JacobJandon/Sicry) engine — 17 dark web search engines, Robin OSINT pipeline, four LLM analysis modes.
- ```bash
- # As an OpenClaw skill:
- cp -r OnionClaw ~/.openclaw/skills/onionclaw
- # → agent now has 7 dark web commands available in every session
- # Standalone:
- python3 doctor.py # check the whole setup, and what to fix
- python3 check_tor.py # verify Tor
- python3 check_engines.py && python3 search.py --query "ransomware healthcare" --alive
- python3 pipeline.py --query "acme.com data leak" --mode corporate
- ```
- ---
- ## ⚠️ The Rabbit Hole
- > *Autonomous agents paired with the Tor network will be one of the most dangerous automation stacks on the internet within the next five years. OnionClaw is living proof that the rabbit hole goes deeper than most people think.*
- This tool is built for **legitimate OSINT, threat intelligence, and security research**. But the same primitives — anonymous routing, bulk scraping, AI-driven synthesis, zero-attribution browsing, automated identity rotation — are precisely what make this combination genuinely dangerous in the wrong hands.
- This is not a warning tucked in fine print. It is the whole point of writing it down openly.
- ### What the stack enables — the full map
- | Use case | What it looks like |
- |---|---|
- | **Dark-web crawling** | Automated, headless spidering of `.onion` services at scale — forums, paste sites, markets, leak boards — with full identity rotation between every request. No human ever touches a keyboard. |
- | **Threat intelligence** | Continuous monitoring of ransomware group blogs, initial access broker ads, CVE exploit drops, and actor chatter long before it surfaces on clearnet feeds. |
- | **Marketplace monitoring** | Price tracking, stock alerts, vendor reputation scraping, and availability checks across darknet markets — the same logic a researcher uses to track fentanyl price trends is the same logic a supplier uses to undercut competitors. |
- | **Credential surveillance** | Watching paste boards, breach dumps, and forum leaks for specific email domains, API keys, SSH keys, or internal hostnames the moment they appear — at a scale no human analyst can match. |
- | **Deanonymisation research** | Cross-correlating `.onion` service metadata with clearnet traces, timing attacks, correlation of writing style and PGP keys — used both by law enforcement hunting criminals and by threat actors hunting journalists and dissidents. |
- | **Criminal automation** | Autonomous agents placing orders, posting ads, messaging vendors, managing mule accounts, draining wallets — an entire criminal operation running without a human ever in the loop. |
- | **Disinformation infrastructure** | Coordinated persona networks on hidden boards, fabricated document drops timed to bleed into legitimate OSINT pipelines, synthetic intelligence that reads real but originates from nowhere. |
- | **Zero-day brokerage** | Automated monitoring of exploit vendor channels, private CVE auction boards, and vulnerability markets — buy-side and sell-side intelligence gathered faster than any human analyst. |
- ### The ugly side
- The 2026 internet is already at the edge of this. Within five years, AI agents that can:
- 1. **Browse anonymously** through rotating Tor circuits with no persistent identity
- 2. **Understand context** well enough to navigate dark web UIs, CAPTCHA logic, and forum culture without hardcoded selectors
- 3. **Act autonomously** — search, buy, post, exfiltrate, rotate — in closed loops with no human confirmation step
- 4. **Self-orchestrate** across dozens of simultaneous Tor identities on parallel threads
- …represent a qualitative shift from *human criminals using tools* to **autonomous criminal infrastructure operating at machine speed with no human in the loop**. The bottleneck has always been human attention. Remove it and the scaling properties of dark web operations change completely.
- OnionClaw demonstrates all four of those primitives working together **today**. The full `pipeline.py` step — query refinement → multi-engine search → result filtering → batch scrape → LLM synthesis → identity rotation — is a complete autonomous dark web intelligence loop. Remove the OSINT framing and it is equally a complete autonomous dark web **operation** loop. The code is the same either way.
- ### Why this is written explicitly
- Security tools that pretend the dual-use problem does not exist are more dangerous than ones that name it directly. If you are building on top of OnionClaw:
- - **Know what you are building.** The pipeline does not know if the query is `"acme.com credential leak"` for a pentest or `"rival vendor SSH keys"` for espionage.
- - **Know your jurisdiction.** Automated access to dark web content and `.onion` services may be illegal in your country regardless of intent or findings.
- - **Tor is not legal protection.** It is operational security. The two are different things with very different limits.
- - **AI + Tor + autonomy is not a theoretical threat.** It is a present capability. This repo is one of many signals that the tooling is ready.
- OnionClaw is published for **defensive research, red-team engagements, and threat intelligence work**. The code does not know the difference between those uses and their inverse. You do. Build accordingly.
- ---
- ## Contents
- 1. [⚠️ The Rabbit Hole](#️-the-rabbit-hole)
- 2. [What OnionClaw does](#what-onionclaw-does)
- 3. [Requirements](#requirements)
- 4. [Install as OpenClaw skill](#install-as-openclaw-skill)
- 5. [Standalone install](#standalone-install)
- 6. [Configuration](#configuration)
- 7. [All seven commands](#all-seven-commands)
- 8. [Investigation flows](#investigation-flows)
- 9. [Analysis modes](#analysis-modes)
- 10. [Architecture](#architecture)
- 11. [Troubleshooting](#troubleshooting)
- 12. [Credits](#credits)
- ---
- ## What OnionClaw does
- Seven commands expose the complete Tor OSINT toolkit:
- | Command | What it does |
- |---|---|
- | `check_tor.py` | Verify Tor is active, show current exit IP |
- | `renew.py` | Rotate Tor circuit — new exit node, new identity |
- | `check_engines.py` | Ping all 17 dark web search engines, show latency |
- | `search.py` | Search up to 17 engines simultaneously, deduplicated results |
- | `fetch.py` | Fetch any `.onion` or clearnet URL through Tor |
- | `ask.py` | LLM OSINT analysis of scraped content (4 modes) |
- | `pipeline.py` | Full Robin pipeline: refine → search → filter → scrape → analyse |
- ---
- ## Requirements
- - **Python 3.10+**
- - **Tor** running locally (SOCKS proxy on `127.0.0.1:9050`)
- - **pip packages**: `requests[socks] beautifulsoup4 python-dotenv stem`
- - **LLM key** (optional — only needed for `ask.py` and `pipeline.py` analysis step)
- ### Install Tor
- **Linux (Debian/Ubuntu):**
- ```bash
- apt install tor && tor &
- ```
- **macOS:**
- ```bash
- brew install tor && tor &
- ```
- **With control port (needed for `renew.py`):**
- ```bash
- cat > /tmp/onionclaw_tor.conf << 'EOF'
- SocksPort 9050
- ControlPort 9051
- CookieAuthentication 1
- DataDirectory /tmp/tor_data
- EOF
- tor -f /tmp/onionclaw_tor.conf &
- ```
- Then set `TOR_DATA_DIR=/tmp/tor_data` in `.env`.
- ### Install Python packages
- ```bash
- pip install requests[socks] beautifulsoup4 python-dotenv stem
- ```
- ---
- ## Install as OpenClaw skill
- 1. **Clone or copy** this repo into your OpenClaw skills directory:
- ```bash
- # Option A — clone directly
- git clone https://github.com/JacobJandon/OnionClaw ~/.openclaw/skills/onionclaw
- # Option B — copy local folder
- cp -r OnionClaw ~/.openclaw/skills/onionclaw
- ```
- 2. **Configure** `.env` in the skill folder:
- ```bash
- cp ~/.openclaw/skills/onionclaw/.env.example ~/.openclaw/skills/onionclaw/.env
- nano ~/.openclaw/skills/onionclaw/.env # add LLM key if desired
- ```
- 3. **Start a new OpenClaw session** — the skill loads automatically on startup. OpenClaw includes `onionclaw` in the agent context whenever the user asks about dark web topics.
- **Verify OpenClaw can see the skill:**
- ```bash
- openclaw skills list
- # → onionclaw 🧅 Search the Tor dark web...
- ```
- **OpenClaw trigger phrases:**
- - "search the dark web for …"
- - "investigate this .onion site …"
- - "check if my data appeared on the dark web"
- - "find ransomware leaks related to …"
- - "fetch this .onion URL …"
- - "run a Tor OSINT investigation on …"
- > After install, start a **new session** — existing sessions will not pick up the new skill.
- ---
- ## Standalone install
- No OpenClaw required. Every script runs directly from a terminal:
- ```bash
- git clone https://github.com/JacobJandon/OnionClaw
- cd OnionClaw
- pip install requests[socks] beautifulsoup4 python-dotenv stem
- cp .env.example .env
- # Edit .env — add LLM key if desired (optional for most commands)
- ```
- ---
- ## Configuration
- Copy `.env.example` to `.env` and fill in what you need:
- ```dotenv
- # ── Tor ────────────────────────────────────────────────────────────────
- TOR_SOCKS_HOST=127.0.0.1
- TOR_SOCKS_PORT=9050
- TOR_CONTROL_HOST=127.0.0.1
- TOR_CONTROL_PORT=9051
- # TOR_CONTROL_PASSWORD=your_password # only if HashedControlPassword in torrc
- # TOR_DATA_DIR=/tmp/tor_data # DataDirectory path for cookie auth
- # ── LLM (needed only for ask.py and pipeline.py analysis step) ──────────
- LLM_PROVIDER=openai # openai | anthropic | gemini | ollama | llamacpp
- OPENAI_API_KEY=sk-...
- # ANTHROPIC_API_KEY=sk-ant-...
- # GEMINI_API_KEY=AIza...
- # OLLAMA_MODEL=llama3.2 # local model — no API key needed
- ```
- > **No LLM key?** Set `LLM_PROVIDER=ollama` with a running Ollama instance for fully local inference. `search.py`, `fetch.py`, `check_tor.py`, `renew.py`, and `check_engines.py` work with no LLM key at all.
- ---
- ## All seven commands
- ### `check_tor.py` — verify Tor
- ```bash
- python3 check_tor.py
- ```
- ```
- ✓ Tor active
- Exit IP : 185.220.101.20
- Error : None
- {"tor_active": true, "exit_ip": "185.220.101.20", "error": null}
- ```
- Run this before anything else. Exits with code 1 if Tor is not running or not accessible on port 9050.
- ---
- ### `renew.py` — rotate identity
- ```bash
- python3 renew.py
- ```
- ```
- Rotating Tor circuit...
- ✓ Identity renewed — new Tor circuit established
- {"success": true, "error": null}
- ```
- Auth order: password env var → cookie from `TOR_DATA_DIR` → common system paths → null auth. Works out of the box with the recommended torrc above or with a standard system Tor install.
- ---
- ### `check_engines.py` — engine health check
- ```bash
- # Live ping (15–30 s)
- python3 check_engines.py
- # --cached N: reuse last result if less than N minutes old (skips the slow ping)
- python3 check_engines.py --cached 10
- # JSON output only
- python3 check_engines.py --json
- # Show version
- python3 check_engines.py --version
- ```
- ```
- ALIVE 9/12
- ──────────────────────────────────────────
- ✓ Ahmia-clearnet 670ms ███
- ✓ Tor66 749ms ███
- ✓ Ahmia 1139ms █████
- ✓ OSS 1203ms ██████
- ...
- DOWN 3/12
- ✗ Kaizer timeout
- ✗ Anima timeout
- ✗ FindTor timeout
- ```
- Run before a large search session. Use the alive engine names as arguments to `--engines` in `search.py`.
- ---
- ### `search.py` — search dark web
- ```bash
- # All 17 engines (default)
- python3 search.py --query "ransomware healthcare leak"
- # Specific engines (faster — use alive engines from check_engines output)
- python3 search.py \
- --query "credential dump" \
- --engines Ahmia Tor66 Ahmia-clearnet OSS
- # Limit result count
- python3 search.py --query "bitcoin mixer" --max 30
- ```
- Returns a deduplicated `{title, url, engine}` list across all engines.
- **Tip:** Use short keyword queries (3–5 words). Dark web search indexes respond much better to keywords than natural-language sentences.
- ---
- ### `fetch.py` — fetch any .onion page
- ```bash
- # Hidden service
- python3 fetch.py \
- --url "http://juhanurmihxlp77nkq76byazcldy2hlmovfu2epvl5ankdibsot4csyd.onion"
- # With links extracted
- python3 fetch.py --url "http://example.onion/page" --links
- # JSON output only
- python3 fetch.py --url "http://example.onion" --json
- ```
- Returns: title, text content (up to 8000 chars), extracted links, HTTP status code. A status of `0` means the hidden service is unreachable or offline.
- ---
- ### `ask.py` — LLM OSINT analysis
- ```bash
- # Inline content
- python3 ask.py \
- --query "LockBit ransomware" \
- --mode ransomware \
- --content "page text from scraped pages"
- # From file
- python3 ask.py \
- --query "acme.com" \
- --mode corporate \
- --file /tmp/scraped_pages.txt
- # Pipe from fetch.py
- python3 fetch.py --url "http://some.onion" --json | \
- python3 -c "import sys,json; print(json.load(sys.stdin)['text'])" | \
- python3 ask.py --query "investigate" --mode threat_intel
- # Custom analysis focus
- python3 ask.py \
- --query "mixer services" \
- --mode threat_intel \
- --content "..." \
- --custom "Focus on cryptocurrency wallet addresses only"
- ```
- **Modes:** `threat_intel` · `ransomware` · `personal_identity` · `corporate` — see [Analysis modes](#analysis-modes).
- ---
- ### `pipeline.py` — full investigation (one command)
- Runs the complete Robin OSINT pipeline automatically:
- | Step | What happens |
- |---|---|
- | 1 | Verify Tor is active |
- | 2 | Check which engines are alive |
- | 3 | Refine query to ≤5 keywords (LLM) |
- | 4 | Search all alive engines |
- | 5 | Filter top 20 most relevant results (LLM) |
- | 6 | Batch-scrape pages concurrently |
- | 7 | OSINT analysis and report (LLM) |
- ```bash
- # Basic
- python3 pipeline.py --query "hospital ransomware 2026"
- # With analysis mode and output file
- python3 pipeline.py \
- --query "acme.com credentials leak" \
- --mode corporate \
- --out report.md
- # Full options
- python3 pipeline.py \
- --query "QUERY" \
- --mode ransomware \
- --max 50 \
- --scrape 12 \
- --custom "Focus on ransom amounts and victim industries" \
- --out report.md
- ```
- **Steps 1–6 work fully without an LLM key.** Only steps 3, 5, and 7 use the LLM — they fall back gracefully when no key is set, printing what was collected so far.
- ```bash
- # --clear-cache: discard cached fetch results before this run
- python3 pipeline.py --query "fresh data" --clear-cache
- # --version: print OnionClaw version
- python3 pipeline.py --version
- ```
- ---
- ### `sync_sicry.py` — update bundled SICRY engine
- OnionClaw bundles a copy of `sicry.py` from the upstream [SICRY™](https://github.com/JacobJandon/Sicry) repo.
- `sync_sicry.py` lets you pull the latest version (or a specific release tag) without a full `git pull`.
- ```bash
- # Fetch latest from main branch
- python3 sync_sicry.py
- # Fetch a specific release tag
- python3 sync_sicry.py --tag v1.2.0
- # Preview what would happen without writing
- python3 sync_sicry.py --dry-run
- # Show version
- python3 sync_sicry.py --version
- ```
- After syncing, commit the updated file:
- ```bash
- git add sicry.py && git commit -m "chore: sync sicry.py to SICRY v1.2.0"
- ```
- > **Update notices** — `pipeline.py` (and `sicry.check_update()`) checks the
- > GitHub **Releases API** (`/releases/latest`). Only published formal releases
- > trigger a notice — plain git tags and pre-releases are silently ignored.
- ---
- ## Monitoring swarm (v2.4)
- Everything above answers *"what is on this page?"*. The swarm answers *"what changed since I last looked?"* —
- continuously, persistently, and read-only.
- ```bash
- python3 swarm.py # one sweep → prioritised digest
- python3 swarm.py --watch healthcare --watch US # flag matching events PRIORITY (whole-word match)
- python3 swarm.py --wallet bc1q... # always track an address on-chain
- python3 swarm.py --onion http://xyz.onion # monitor a hidden-service page (needs Tor)
- python3 swarm.py --loop 900 # sweep every 15 min
- python3 swarm.py --webhook https://hooks.slack.com/... --webhook-format slack
- python3 stix.py -o bundle.json # STIX 2.1 export (MISP / OpenCTI)
- python3 graph.py # evidence-based group correlation
- python3 graph.py --activity # time-decayed group activity ranking
- python3 risk.py # groups ranked by transparent priority score
- python3 ttp.py --group medusa # MITRE ATT&CK techniques + tools per group
- python3 iocs.py --group qilin --format csv # every observed indicator, defanged by default
- python3 crawl.py --url http://xyz.onion --depth 2 # concurrent single-site crawl
- ```
- | Collector | Source | Detects |
- |---|---|---|
- | `leaksites` | ransomware.live | new victim disclosures; wallets in ransom notes |
- | `groupinfra` | ransomware.live | leak sites going up / down / moving; each group's ATT&CK techniques and tools (and when they change) |
- | `kev` | CISA KEV | new exploited CVEs, and CVEs **newly linked to ransomware** |
- | `wallets` | mempool.space | balance / tx movement on tracked ransom wallets |
- | `onionsites` | your URLs, via Tor | content change and new wallets / emails on a page |
- State lives in `onionclaw.db` (SQLite). The first run baselines silently; later runs report only changes.
- A failing source is reported and never stops the others.
- **Read-only by design.** Collectors only fetch public data. Nothing here contacts, negotiates with, or
- deceives a threat actor, and no feature is planned that would.
- **Alerts** (`--webhook`): `KEV_RANSOMWARE`, `WALLET_MOVEMENT`, `WALLET_LINK`, `WATCHLIST_HIT` (HIGH);
- `CRITICAL_VICTIM`, `ONION_CHANGE` (MEDIUM); `INFRA_CHANGE` (LOW). Delivery is exactly-once per webhook,
- retried until the receiver answers 2xx, and `generic` payloads can be HMAC-signed (`--webhook-secret`).
- **Priority and ATT&CK.** `risk.py` ranks groups by observed volume, critical-sector victims, reach,
- capability (published ATT&CK techniques, tools, live leak-site hosts) and evidence links, then decays
- groups that have gone quiet. Every score lists the numbers behind it; it is a triage order, not a verdict.
- `ttp.py` maps groups to MITRE ATT&CK from the data ransomware.live publishes, and STIX exports include
- `attack-pattern` and `tool` objects linked to each group by `uses` relationships.
- **Indicators.** `iocs.py` is one queryable view of every indicator the swarm has observed
- (onion hosts, clearnet domains, ransom-note wallets, KEV CVEs, contact addresses), derived from
- the stored observations rather than a second copy, with first/last seen, attribution and source
- for each. Values are defanged by default so they can be pasted into a ticket safely.
- **Correlation is a lead, not attribution.** `graph.py` links groups only through hard identifiers (shared
- wallet, shared leak-site host, normalised alias, shared victim) and shows the evidence for every edge.
- A host shared by three or more groups is weighted low, since that usually means a shared platform.
- ### ⚠ ransomware.live terms
- The free v2 API is limited to **personal use** (not corporate/business), **1 request/minute/endpoint**,
- and returns victims delayed versus PRO. OnionClaw enforces the rate limit across processes and tells you
- when it is on the free tier. For business use, get a PRO key and set `RANSOMWARE_LIVE_API_KEY`,
- `RANSOMWARE_LIVE_BASE`, and `RANSOMWARE_LIVE_KEY_HEADER`. *The PRO auth header name and paths could not be
- verified from public documentation — the `X-API-KEY` default is unconfirmed; check the PRO docs.*
- ### Known limits
- - `.onion` fetching (`onionsites`, `crawl.py`) needs Tor; the test suite covers that logic against a local
- server but does not exercise the Tor transport.
- - STIX 2.1 has no standard cryptocurrency-wallet observable; wallets use a custom
- `x-cryptocurrency-wallet` pattern that generic consumers will not match.
- - ransom-note wallet harvesting depends on what the tracker publishes; many victims carry none.
- ## Website
- The project site lives in `web/` (Vite + three.js, all versions pinned):
- ```bash
- cd web
- npm install
- npm run dev # http://127.0.0.1:5173 — live reload
- npm run build # static site in web/dist/, deploy anywhere
- npm run preview # serve the built site at http://127.0.0.1:4173
- ```
- - `/` — **Peel**: scroll through the three Tor encryption layers of a glass onion down to the swarm core.
- - `/hybrid/` — **Hybrid**: a toon "onion planet" whose stations are the tools; orbit it chapter by
- chapter, then explore it freely.
- - Add `?static` for a readable version without WebGL (used automatically with reduced motion).
- ## Investigation flows
- ### Scenario 1: Check for leaked credentials
- ```bash
- python3 check_tor.py
- python3 pipeline.py \
- --query "acme.com email passwords" \
- --mode corporate \
- --scrape 10 \
- --out acme_leak_report.md
- ```
- ### Scenario 2: Ransomware intelligence
- ```bash
- python3 check_tor.py
- python3 search.py \
- --query "LockBit healthcare 2026" \
- --engines Ahmia Tor66 Ahmia-clearnet \
- --max 40
- # Fetch the most relevant URL
- python3 fetch.py --url "http://..." > /tmp/page.json
- # Analyse
- python3 ask.py \
- --query "LockBit healthcare 2026" \
- --mode ransomware \
- --file /tmp/page.json
- ```
- ### Scenario 3: Personal data exposure check
- ```bash
- python3 pipeline.py \
- --query "john.smith@email.com personal data" \
- --mode personal_identity \
- --scrape 8
- ```
- ### Scenario 4: Manual step-by-step investigation
- ```bash
- # 1. Verify Tor
- python3 check_tor.py
- # 2. Find alive engines
- python3 check_engines.py
- # 3. Search with alive engines
- python3 search.py \
- --query "ransomware hospital 2026" \
- --engines Ahmia Tor66 OSS \
- --max 40
- # 4. Fetch top pages
- python3 fetch.py --url "http://..." --links
- python3 fetch.py --url "http://..."
- # 5. Analyse
- python3 ask.py \
- --query "hospital ransomware" \
- --mode ransomware \
- --content "combined text from pages"
- # 6. Rotate identity when done
- python3 renew.py
- ```
- ---
- ## Analysis modes
- ### `threat_intel` (default)
- General dark web OSINT. Extracts: IoCs, infrastructure details, actor mentions, next investigation steps.
- Output sections: Input Query · Source Links · Investigation Artifacts · Key Insights · Recommended Next Steps
- ### `ransomware`
- Malware/RaaS intelligence. Extracts C2 domains, file hashes, MITRE ATT&CK TTPs, victim sectors, ransom amounts.
- Output sections: Input Query · Source Links · Malware/Ransomware Indicators · Threat Actor Profile · Key Insights · Recommended Next Steps
- ### `personal_identity`
- PII and breach exposure. Surfaces SSNs, emails, passwords, passport data, breach sources, risk severity ratings.
- Output sections: Input Query · Source Links · Exposed PII Artifacts · Breach/Marketplace Sources · Exposure Risk Assessment · Key Insights · Recommended Next Steps
- ### `corporate`
- Corporate threat intelligence. Detects leaked credentials, source code, internal documents, initial access broker activity.
- Output sections: Input Query · Source Links · Leaked Corporate Artifacts · Threat Actor/Broker Activity · Business Impact Assessment · Key Insights · Recommended Next Steps
- ---
- ## Troubleshooting
- **`✗ Tor NOT active`**
- ```bash
- # Is Tor running?
- pgrep tor || tor &
- # Is port 9050 listening?
- ss -tlnp | grep 9050
- ```
- **`renew.py` → `success: false`**
- ```bash
- # Is control port open?
- ss -tlnp | grep 9051
- # Enable it in torrc:
- echo "ControlPort 9051" >> /etc/tor/torrc
- echo "CookieAuthentication 1" >> /etc/tor/torrc
- systemctl restart tor
- # Set correct DataDirectory in .env:
- TOR_DATA_DIR=/var/lib/tor # system Tor (Debian/Ubuntu)
- TOR_DATA_DIR=/tmp/tor_data # custom torrc DataDirectory
- ```
- **`fetch.py` → `status: 0`**
- The hidden service is offline. .onion sites go down frequently — try a different URL from `search.py` results. Confirm Tor is healthy with `check_tor.py`.
- **`search.py` returns 0 results**
- Dark web indexes fluctuate. Run `check_engines.py` to find alive engines, then use `--engines Ahmia Ahmia-clearnet` as reliable fallbacks.
- **`ask.py` / `pipeline.py` LLM error**
- Set `LLM_PROVIDER` and an API key in `.env`. For no-key local operation: `LLM_PROVIDER=ollama` with a running Ollama instance. All five non-LLM scripts (`check_tor`, `renew`, `check_engines`, `search`, `fetch`) work without any key.
- **`ERROR: sicry.py not found`**
- `sicry.py` must be in the OnionClaw root (same folder as `SKILL.md`). It is included in this repo — do not delete or move it. If you cloned and it is missing, re-clone fresh.
- ---
- ## Architecture
- How OnionClaw’s pieces fit together — from a command-line invocation all the way to a `.onion` response.
- ### Layer diagram
- ```
- ┌──────────────────────────────────────────────────────────────┐
- │ User / OpenClaw Agent / CI script │
- │ python3 pipeline.py --query … | pipeline.py --daemon-poll │
- └───────────────────────────┬───────────────────────────────┘
- │
- Python wrappers ▼
- ┌──────────────────────────────────────────────────────────────┐
- │ OnionClaw command layer │
- │ │
- │ check_tor.py renew.py fetch.py search.py ask.py │
- │ check_engines.py pipeline.py sync_sicry.py │
- │ │
- │ All call into ↓ one file │
- └────────────────────────────┬──────────────────────────────────┘
- │
- ▼
- ┌──────────────────────────────────────────────────────────────┐
- │ SICRY™ (sicry.py — bundled) │
- │ │
- │ check_tor() search(query, engines, …) │
- │ renew_identity() scrape_all(urls) │
- │ fetch(url) ask(content, mode, …) │
- │ check_search_engines() refine_query() filter_results() │
- │ │
- │ State: SQLite DB (watch jobs · engine stats · result cache) │
- └─────┬──────────────────────────┬──────────────────────────────┘
- │ SOCKS5 │ stem control
- │ 127.0.0.1:9050 │ 127.0.0.1:9051
- ▼ ▼
- ┌───────────────────┐ ┌───────────────────┐
- │ Tor (tor / TorPool) │ │ Tor Control Port │
- │ SOCKS5 proxy │◄─│ renew_identity() │
- └─────┬─────────────┘ └───────────────────┘
- │ onion routing (3 hops)
- ▼
- ┌──────────────────────────────────────────────────────────────┐
- │ Dark Web / Tor Network │
- │ │
- │ 17 search engines (.onion) Clearnet via Tor exit nodes │
- │ Ahmia · DuckDuckGo-Tor Any HTTPS/HTTP URL │
- │ Tor66 · + 15 more… │
- └──────────────────────────────────────────────────────────────┘
- ```
- ### pipeline.py flow
- ```
- --query / watch job
- │
- ▼
- [1] check_tor() → abort if not active
- [2] check_search_engines() → collect live engine list
- [3] refine_query() → LLM: natural language → ≤5 keywords
- [4] search(engines=live) → parallel queries over Tor
- [5] filter_results() → LLM: keep top 20 relevant
- [6] scrape_all(best[:N]) → concurrent batch-fetch over Tor
- [7] ask(content, mode=…) → LLM OSINT report
- │
- ▼
- report [→ --out file.md] [→ --watch-check --output-dir]
- ```
- ### TorPool mode (optional)
- Set `SICRY_POOL_SIZE=N` (recommended 2–4) to run N independent Tor processes
- for higher search throughput:
- ```
- pipeline.py ─→ TorPool
- ├── tor[0] :9050
- ├── tor[1] :9052
- └── tor[N-1]:...
- ```
- ### Update policy
- `pipeline.py --check-update` calls `sicry.check_update()`, which queries the
- GitHub **Releases API** (`/releases/latest`). Only **published formal releases**
- trigger a notice — plain git tags and pre-releases are silently ignored.
- ---
- ## File structure
- ```
- OnionClaw/
- ├── SKILL.md ← OpenClaw skill descriptor (YAML frontmatter)
- ├── sicry.py ← SICRY engine (bundled — no separate install needed)
- ├── .env.example ← Copy to .env and configure
- ├── README.md ← This file
- ├── check_tor.py ← Verify Tor / show exit IP
- ├── renew.py ← Rotate Tor circuit
- ├── check_engines.py ← Ping all 17 engines
- ├── search.py ← Search dark web
- ├── fetch.py ← Fetch .onion pages
- ├── ask.py ← OSINT analysis via LLM
- ├── pipeline.py ← Full Robin investigation pipeline
- └── sync_sicry.py ← Sync SICRY engine from upstream
- ```
- ---
- ## Credits
- - Dark web search engine list and Robin OSINT pipeline from [Robin](https://github.com/apurvsinghgautam/robin) by [@apurvsinghgautam](https://github.com/apurvsinghgautam) — MIT licence
- - Core engine: [SICRY](https://github.com/JacobJandon/Sicry)
- - .onion address verification via [dark.fail](https://dark.fail)
- - Agent runtime: [OpenClaw](https://github.com/openclaw/openclaw)
- - Network anonymisation: [Tor Project](https://www.torproject.org/)
- ---
- ## License
- Apache License 2.0 — Copyright (c) 2026 JacobJandon
- "OnionClaw" and the OnionClaw logo are owned by JacobJandon.
- See [LICENSE](LICENSE) for full text.
- ---
- > ⚠️ **Use responsibly and lawfully.** Built for OSINT, security research, and threat intelligence. Read [The Rabbit Hole](#️-the-rabbit-hole) section before deploying autonomously.
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.