agent-bypass@2.29.3
Malicious code in agent-bypass (npm)
Analysis
This package ships an installable offensive-security toolkit. Running its bin (bin/install.js) copies publisher-authored skill files (SKILL.md, ck-hunter.md, references/) into AI-assistant harness directories — ~/.pi/agent/skills, ~/.config/opencode/skills, ~/.claude/skills, ~/.grok/skills, ~/.agents/skills and /var/minis/skills — and injects a marked preset block into the DeepSeek Harness profile file ~/.dsh/profiles/<profile>/cordis.patch.yml, so subsequent agent sessions run with an attacker-authored "universal executor" persona that accepts pentest/forgery/brute-force instructions. With --doctor it fingerprints the host: platform, architecture, node and npm versions, and a which() enumeration of python3, pip3, curl, git and rg plus installed package managers. The bundled playbooks and Python tools target credential material: scripts/keystrike.py probes for /.ssh/id_rsa, /.ssh/id_ed25519, /.npmrc, /.env, /.claude/.credentials.json, /.codex/auth.json, /.opencode/auth.json and /.hermes/auth.json; scripts/env_chain.py parses .env content and classifies AWS, database, secret and API-key entries; ck-hunter.md drives FOFA/Shodan keyword searches for internet-exposed "Directory listing for /" pages whose body contains .npmrc, .ssh, .env, wallet.json, private.key, mnemonic, binance.json or bybit.json, i.e. hunting credential and wallet stores on third-party hosts. scripts/payment_forge.py builds a signed payment-callback body (MD5 over the sorted query string) and POSTs it to <base>/payment/notify/<method>/<uuid> to forge a successful payment notification. Other scripts perform directory brute forcing, CDN/WAF origin tracing with certificate verification deliberately disabled (ssl.CERT_NONE plus check_hostname=False in scripts/origin_trace.py, webprobe.py, mutate.py, keystrike.py) and key-hunting over JS bundles. The network code contacts only public lookup services — DoH at 1[.]1[.]1[.]1/dns.google/223[.]5[.]5[.]5, crt.sh, api[.]certspotter[.]com, otx[.]alienvault[.]com, api[.]hackertarget[.]com, jldc[.]me, rapiddns[.]io — and targets supplied on the command line; no hardcoded command-and-control or exfiltration endpoint was found.
- analyzed by
- Leitwacht
- first seen
- Nov 2, 2026, 01:45 PM
- analyzed
- Nov 2, 2026, 01:47 PM
- weekly installs
- 3,312
Related advisories
- agent-bypass@2.30.7 same package
- agent-bypass@2.30.2 same package
- agent-bypass@2.29.2 same package
- agent-bypass@2.29.1 same package
- tensorlake@0.5.144
- character-ai-sdk@1.0.0
- agent-bypass@2.28.0 same package
- charape@1.0.1
Independently detected by the Leitwacht supply-chain probe. IOCs are defanged. Published CC0. Think this is a mistake? See the dispute policy.