open-sploit 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +75 -0
- package/bin/install.mjs +158 -0
- package/package.json +27 -0
- package/template/agent/offsec.md +53 -0
- package/template/command/target.md +45 -0
- package/template/config/opencode.example.json +46 -0
- package/template/skills/api-security-testing/SKILL.md +61 -0
- package/template/skills/conducting-api-security-testing/LICENSE +201 -0
- package/template/skills/conducting-api-security-testing/SKILL.md +195 -0
- package/template/skills/conducting-api-security-testing/references/api-reference.md +62 -0
- package/template/skills/conducting-api-security-testing/scripts/agent.py +228 -0
- package/template/skills/exploiting-api-injection-vulnerabilities/LICENSE +201 -0
- package/template/skills/exploiting-api-injection-vulnerabilities/SKILL.md +481 -0
- package/template/skills/exploiting-api-injection-vulnerabilities/references/api-reference.md +103 -0
- package/template/skills/exploiting-api-injection-vulnerabilities/scripts/agent.py +142 -0
- package/template/skills/exploiting-http-request-smuggling/LICENSE +201 -0
- package/template/skills/exploiting-http-request-smuggling/SKILL.md +343 -0
- package/template/skills/exploiting-http-request-smuggling/references/api-reference.md +53 -0
- package/template/skills/exploiting-http-request-smuggling/scripts/agent.py +196 -0
- package/template/skills/exploiting-idor-vulnerabilities/LICENSE +201 -0
- package/template/skills/exploiting-idor-vulnerabilities/SKILL.md +309 -0
- package/template/skills/exploiting-idor-vulnerabilities/references/api-reference.md +52 -0
- package/template/skills/exploiting-idor-vulnerabilities/scripts/agent.py +177 -0
- package/template/skills/exploiting-jwt-algorithm-confusion-attack/LICENSE +201 -0
- package/template/skills/exploiting-jwt-algorithm-confusion-attack/SKILL.md +472 -0
- package/template/skills/exploiting-jwt-algorithm-confusion-attack/references/api-reference.md +99 -0
- package/template/skills/exploiting-jwt-algorithm-confusion-attack/scripts/agent.py +132 -0
- package/template/skills/exploiting-nosql-injection-vulnerabilities/LICENSE +201 -0
- package/template/skills/exploiting-nosql-injection-vulnerabilities/SKILL.md +219 -0
- package/template/skills/exploiting-nosql-injection-vulnerabilities/assets/template.md +30 -0
- package/template/skills/exploiting-nosql-injection-vulnerabilities/references/api-reference.md +85 -0
- package/template/skills/exploiting-nosql-injection-vulnerabilities/references/standards.md +19 -0
- package/template/skills/exploiting-nosql-injection-vulnerabilities/references/workflows.md +23 -0
- package/template/skills/exploiting-nosql-injection-vulnerabilities/scripts/agent.py +136 -0
- package/template/skills/exploiting-nosql-injection-vulnerabilities/scripts/process.py +222 -0
- package/template/skills/exploiting-oauth-misconfiguration/LICENSE +201 -0
- package/template/skills/exploiting-oauth-misconfiguration/SKILL.md +316 -0
- package/template/skills/exploiting-oauth-misconfiguration/references/api-reference.md +59 -0
- package/template/skills/exploiting-oauth-misconfiguration/scripts/agent.py +232 -0
- package/template/skills/exploiting-prototype-pollution-in-javascript/LICENSE +201 -0
- package/template/skills/exploiting-prototype-pollution-in-javascript/SKILL.md +239 -0
- package/template/skills/exploiting-prototype-pollution-in-javascript/references/api-reference.md +102 -0
- package/template/skills/exploiting-prototype-pollution-in-javascript/scripts/agent.py +156 -0
- package/template/skills/exploiting-race-condition-vulnerabilities/LICENSE +201 -0
- package/template/skills/exploiting-race-condition-vulnerabilities/SKILL.md +246 -0
- package/template/skills/exploiting-race-condition-vulnerabilities/references/api-reference.md +84 -0
- package/template/skills/exploiting-race-condition-vulnerabilities/scripts/agent.py +119 -0
- package/template/skills/exploiting-server-side-request-forgery/LICENSE +201 -0
- package/template/skills/exploiting-server-side-request-forgery/SKILL.md +354 -0
- package/template/skills/exploiting-server-side-request-forgery/references/api-reference.md +57 -0
- package/template/skills/exploiting-server-side-request-forgery/scripts/agent.py +183 -0
- package/template/skills/exploiting-sql-injection-vulnerabilities/LICENSE +201 -0
- package/template/skills/exploiting-sql-injection-vulnerabilities/SKILL.md +205 -0
- package/template/skills/exploiting-sql-injection-vulnerabilities/references/api-reference.md +60 -0
- package/template/skills/exploiting-sql-injection-vulnerabilities/scripts/agent.py +196 -0
- package/template/skills/exploiting-sql-injection-with-sqlmap/LICENSE +201 -0
- package/template/skills/exploiting-sql-injection-with-sqlmap/SKILL.md +257 -0
- package/template/skills/exploiting-sql-injection-with-sqlmap/references/api-reference.md +74 -0
- package/template/skills/exploiting-sql-injection-with-sqlmap/scripts/agent.py +217 -0
- package/template/skills/exploiting-template-injection-vulnerabilities/LICENSE +201 -0
- package/template/skills/exploiting-template-injection-vulnerabilities/SKILL.md +322 -0
- package/template/skills/exploiting-template-injection-vulnerabilities/references/api-reference.md +55 -0
- package/template/skills/exploiting-template-injection-vulnerabilities/scripts/agent.py +205 -0
- package/template/skills/exploiting-type-juggling-vulnerabilities/LICENSE +201 -0
- package/template/skills/exploiting-type-juggling-vulnerabilities/SKILL.md +272 -0
- package/template/skills/exploiting-type-juggling-vulnerabilities/references/api-reference.md +87 -0
- package/template/skills/exploiting-type-juggling-vulnerabilities/scripts/agent.py +141 -0
- package/template/skills/exploiting-websocket-vulnerabilities/LICENSE +201 -0
- package/template/skills/exploiting-websocket-vulnerabilities/SKILL.md +424 -0
- package/template/skills/exploiting-websocket-vulnerabilities/references/api-reference.md +62 -0
- package/template/skills/exploiting-websocket-vulnerabilities/scripts/agent.py +211 -0
- package/template/skills/hackerone/SKILL.md +137 -0
- package/template/skills/hackerone/reference/INTEGRATION_GUIDE.md +199 -0
- package/template/skills/hackerone/reference/sensitive-data-tracking.md +134 -0
- package/template/skills/hackerone/tools/__init__.py +0 -0
- package/template/skills/hackerone/tools/csv_parser.py +185 -0
- package/template/skills/hackerone/tools/report_validator.py +285 -0
- package/template/skills/hackerone/tools/sensitive_data_tracker.py +495 -0
- package/template/skills/owasp-top-10-testing/SKILL.md +64 -0
- package/template/skills/web-app-penetration-testing/SKILL.md +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 open-sploit contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# open-sploit
|
|
2
|
+
|
|
3
|
+
> YOLO offensive-security agent + `/target` engagement command for [opencode](https://opencode.ai). Full-scope pen-testing through **Kali Linux (WSL2)**, **Burp Suite MCP**, and **Playwright**.
|
|
4
|
+
|
|
5
|
+
## What you get
|
|
6
|
+
|
|
7
|
+
- **`offsec` agent** — pure offensive operator: recon → enumeration → exploitation → post-exploitation → report. No defensive fluff.
|
|
8
|
+
- **`/target <url>` command** — one slash command to run a full engagement end to end. It classifies the target (web / API / PHP) and auto-loads the matching attack skills.
|
|
9
|
+
- **19 attack skills** installed into `~/.config/opencode/skills/` — battle-tested technique playbooks for every major web vulnerability class.
|
|
10
|
+
- **YOLO permissions** — every action auto-approved (read/edit/bash/external dirs/web).
|
|
11
|
+
- **Kali (WSL2) routing** — all tooling runs through `wsl -d kali-linux` (nmap, sqlmap, metasploit, ffuf, hashcat, impacket, …).
|
|
12
|
+
- **Playwright MCP** — real browser for login flows, session/auth handling, CSRF, XSS, SSO/OAuth, DOM bugs, screenshot evidence.
|
|
13
|
+
- **Burp MCP** (auto-detected on Windows) — interception, scanning, repeater attack flows.
|
|
14
|
+
|
|
15
|
+
## Installed skill library
|
|
16
|
+
|
|
17
|
+
| Category | Skills |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| Frameworks | `web-app-penetration-testing`, `owasp-top-10-testing`, `api-security-testing`, `conducting-api-security-testing`, `hackerone` |
|
|
20
|
+
| Injection | `exploiting-sql-injection-vulnerabilities`, `exploiting-sql-injection-with-sqlmap`, `exploiting-nosql-injection-vulnerabilities`, `exploiting-api-injection-vulnerabilities`, `exploiting-template-injection-vulnerabilities` |
|
|
21
|
+
| Server-side risk | `exploiting-server-side-request-forgery`, `exploiting-http-request-smuggling`, `exploiting-websocket-vulnerabilities`, `exploiting-race-condition-vulnerabilities` |
|
|
22
|
+
| Access control | `exploiting-idor-vulnerabilities`, `exploiting-prototype-pollution-in-javascript` |
|
|
23
|
+
| Auth & tokens | `exploiting-jwt-algorithm-confusion-attack`, `exploiting-oauth-misconfiguration`, `exploiting-type-juggling-vulnerabilities` |
|
|
24
|
+
|
|
25
|
+
The `/target` command auto-routes: web target → injection/SSRF/smuggling/access-control skills, API target → API skills, PHP backend → type-juggling, and any bug-bounty flow → `hackerone`.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx open-sploit
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
It copies `agent/offsec.md` + `command/target.md` into `~/.config/opencode/`, installs the 19 attack skills into `~/.config/opencode/skills/` (skipping any you already have), and safely merges permissions, the `offsec` agent, and MCP servers into your `opencode.json`. Your existing config is preserved — only missing/permission keys are added.
|
|
34
|
+
|
|
35
|
+
Then **restart opencode**.
|
|
36
|
+
|
|
37
|
+
### Prerequisites
|
|
38
|
+
|
|
39
|
+
- [opencode](https://opencode.ai) installed
|
|
40
|
+
- [Kali Linux in WSL2](https://www.kali.org/docs/wsl/) with distro name `kali-linux` (Windows) — or any host with `wsl` + Kali
|
|
41
|
+
- `npx` (comes with Node.js ≥ 18)
|
|
42
|
+
- Optional: [Burp Suite](https://portswigger.net/burp) with the MCP server extension on `127.0.0.1:9876`
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
/target http://10.10.10.10
|
|
48
|
+
# or
|
|
49
|
+
/target example.com — scope: *.example.com, in-scope only
|
|
50
|
+
# or
|
|
51
|
+
/target https://api.example.com/openapi.json
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The agent classifies the target, auto-loads the matching attack skills, then runs the full pipeline: OSINT → nmap/masscan → ffuf/gobuster → browser-assisted auth & client-side testing → exploit → collect flags/creds → ranked report with PoCs and screenshots.
|
|
55
|
+
|
|
56
|
+
## Uninstall
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
rm -rf ~/.config/opencode/skills ~/.config/opencode/agent/offsec.md ~/.config/opencode/command/target.md
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Then remove the `offsec` entry and added `mcp` servers from `~/.config/opencode/opencode.json`.
|
|
63
|
+
|
|
64
|
+
## Customizing
|
|
65
|
+
|
|
66
|
+
- Point Kali tools at a different distro: rename `kali-linux` in `agent/offsec.md`.
|
|
67
|
+
- Burp proxy at `127.0.0.1:9876` by default — edit the `burp` MCP entry in `opencode.json` if yours differs.
|
|
68
|
+
|
|
69
|
+
## ⚠️ Legal
|
|
70
|
+
|
|
71
|
+
This installs **YOLO allow-all permissions** and an **offensive-security automation**. Only use it against systems you own or have **explicit written authorization** to test. Unauthorized access is a crime in most jurisdictions. The authors are not responsible for misuse.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT
|
package/bin/install.mjs
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { homedir, platform } from "node:os"
|
|
3
|
+
import { join, dirname } from "node:path"
|
|
4
|
+
import { fileURLToPath } from "node:url"
|
|
5
|
+
import { mkdirSync, copyFileSync, readFileSync, writeFileSync, existsSync, readdirSync, statSync, cpSync } from "node:fs"
|
|
6
|
+
|
|
7
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
8
|
+
const TEMPLATE = join(__dirname, "..", "template")
|
|
9
|
+
|
|
10
|
+
const configRoot = process.env.OPENCODE_CONFIG_DIR
|
|
11
|
+
? join(process.env.OPENCODE_CONFIG_DIR)
|
|
12
|
+
: join(homedir(), platform() === "win32" ? ".config\\opencode" : ".config/opencode")
|
|
13
|
+
|
|
14
|
+
const agentDir = join(configRoot, "agent")
|
|
15
|
+
const commandDir = join(configRoot, "command")
|
|
16
|
+
const skillsDir = join(configRoot, "skills")
|
|
17
|
+
const configFile = join(configRoot, "opencode.json")
|
|
18
|
+
|
|
19
|
+
function log(msg) { console.log(`[open-sploit] ${msg}`) }
|
|
20
|
+
|
|
21
|
+
function installSkills() {
|
|
22
|
+
const srcSkills = join(TEMPLATE, "skills")
|
|
23
|
+
if (!existsSync(srcSkills)) return 0
|
|
24
|
+
const autoDirs = [
|
|
25
|
+
join(homedir(), ".agents", "skills"),
|
|
26
|
+
join(homedir(), ".claude", "skills"),
|
|
27
|
+
]
|
|
28
|
+
let installed = 0
|
|
29
|
+
for (const skill of readdirSync(srcSkills)) {
|
|
30
|
+
const dest = join(skillsDir, skill)
|
|
31
|
+
if (existsSync(dest)) { log(`skill '${skill}' already present — left untouched`); continue }
|
|
32
|
+
const alreadyExist = autoDirs.some((d) => existsSync(join(d, skill)))
|
|
33
|
+
if (alreadyExist) { log(`skill '${skill}' already available in ~/.agents or ~/.claude — skipped`); continue }
|
|
34
|
+
cpSync(join(srcSkills, skill), dest, { recursive: true })
|
|
35
|
+
installed++
|
|
36
|
+
}
|
|
37
|
+
return installed
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async function main() {
|
|
41
|
+
log(`Installing into ${configRoot}`)
|
|
42
|
+
mkdirSync(agentDir, { recursive: true })
|
|
43
|
+
mkdirSync(commandDir, { recursive: true })
|
|
44
|
+
|
|
45
|
+
copyFileSync(join(TEMPLATE, "agent", "offsec.md"), join(agentDir, "offsec.md"))
|
|
46
|
+
copyFileSync(join(TEMPLATE, "command", "target.md"), join(commandDir, "target.md"))
|
|
47
|
+
log("Installed agent/offsec.md and command/target.md")
|
|
48
|
+
|
|
49
|
+
const nSkills = installSkills()
|
|
50
|
+
log(nSkills > 0 ? `Installed ${nSkills} attack skills into ${skillsDir}` : "No new attack skills needed installing")
|
|
51
|
+
|
|
52
|
+
let cfg = {}
|
|
53
|
+
if (existsSync(configFile)) {
|
|
54
|
+
try {
|
|
55
|
+
cfg = JSON.parse(readFileSync(configFile, "utf8"))
|
|
56
|
+
} catch {
|
|
57
|
+
cfg = {}
|
|
58
|
+
log("WARNING: existing opencode.json was invalid JSON — regenerating fresh (backup left in place).")
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (!cfg.$schema) cfg.$schema = "https://opencode.ai/config.json"
|
|
63
|
+
if (!cfg.default_agent) cfg.default_agent = "offsec"
|
|
64
|
+
|
|
65
|
+
const allow = {
|
|
66
|
+
read: "allow", edit: "allow", glob: "allow", grep: "allow", list: "allow",
|
|
67
|
+
bash: "allow", task: "allow", external_directory: "allow", todowrite: "allow",
|
|
68
|
+
question: "allow", webfetch: "allow", websearch: "allow", lsp: "allow", skill: "allow",
|
|
69
|
+
}
|
|
70
|
+
cfg.permission = cfg.permission && Object.keys(cfg.permission).length ? cfg.permission : allow
|
|
71
|
+
for (const [k, v] of Object.entries(allow)) {
|
|
72
|
+
if (!(k in cfg.permission)) cfg.permission[k] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
cfg.agent = cfg.agent || {}
|
|
76
|
+
cfg.agent.offsec = cfg.agent.offsec || {}
|
|
77
|
+
cfg.agent.offsec.mode = "all"
|
|
78
|
+
cfg.agent.offsec.description = "Pure offensive security specialist — full-scope pen-testing via Kali Linux (WSL2), Burp Suite, and Playwright."
|
|
79
|
+
|
|
80
|
+
cfg.mcp = cfg.mcp || {}
|
|
81
|
+
|
|
82
|
+
if (!cfg.mcp.playwright) {
|
|
83
|
+
cfg.mcp.playwright = {
|
|
84
|
+
type: "local",
|
|
85
|
+
command: ["npx", "-y", "@playwright/mcp@latest"],
|
|
86
|
+
enabled: true,
|
|
87
|
+
description: "Playwright browser automation. Use for login flows, client-side/XSS testing, CSRF checks, SSO/OAuth flows, DOM checks, and any browser-driven attack path.",
|
|
88
|
+
}
|
|
89
|
+
log("Added playwright MCP server")
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const burp = detectBurp()
|
|
93
|
+
if (burp && !cfg.mcp.burp) {
|
|
94
|
+
cfg.mcp.burp = {
|
|
95
|
+
type: "local",
|
|
96
|
+
command: burp,
|
|
97
|
+
enabled: true,
|
|
98
|
+
description: "Burp Suite MCP proxy. Requires Burp Suite with its MCP server extension listening on http://127.0.0.1:9876 before it responds.",
|
|
99
|
+
}
|
|
100
|
+
log("Added burp MCP server")
|
|
101
|
+
} else if (!burp) {
|
|
102
|
+
log("Burp Suite not detected — skipped. Edit opencode.json to add a burp MCP server if you use it.")
|
|
103
|
+
} else {
|
|
104
|
+
log("burp MCP already configured — left untouched")
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
writeFileSync(configFile, JSON.stringify(cfg, null, 2) + "\n")
|
|
108
|
+
log(`Wrote ${configFile}`)
|
|
109
|
+
|
|
110
|
+
console.log("")
|
|
111
|
+
console.log("Done!")
|
|
112
|
+
console.log(" 1. Restart opencode.")
|
|
113
|
+
console.log(" 2. The offsec agent is live (run: /agents offsec to verify).")
|
|
114
|
+
console.log(" 3. Start an engagement: /target http://<in-scope-host> — it auto-loads the right attack skills.")
|
|
115
|
+
console.log(" 4. Requires: Kali Linux in WSL2 (distro named kali-linux) for tooling; Playwright is bundled via npx.")
|
|
116
|
+
console.log("")
|
|
117
|
+
console.log(" WARNING: This installs YOLO permissions (allow-all) and an offensive-security")
|
|
118
|
+
console.log(" automation. Only use against systems you own or are explicitly authorized to test.")
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function detectBurp() {
|
|
122
|
+
if (platform() !== "win32") return null
|
|
123
|
+
const home = homedir()
|
|
124
|
+
const burpDir = join(home, "AppData", "Roaming", "BurpSuite")
|
|
125
|
+
if (!existsSync(burpDir)) return null
|
|
126
|
+
|
|
127
|
+
let jar = null
|
|
128
|
+
const isDir = (p) => { try { return statSync(p).isDirectory() } catch { return false } }
|
|
129
|
+
const search = (dir) => {
|
|
130
|
+
if (jar) return
|
|
131
|
+
if (!existsSync(dir)) return
|
|
132
|
+
for (const f of readdirSync(dir)) {
|
|
133
|
+
const full = join(dir, f)
|
|
134
|
+
if (f.startsWith("mcp-proxy") && f.endsWith(".jar")) { jar = full; return }
|
|
135
|
+
if (isDir(full)) search(full)
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
search(burpDir)
|
|
139
|
+
if (!jar) return null
|
|
140
|
+
|
|
141
|
+
const java = javaFinder()
|
|
142
|
+
if (!java) return null
|
|
143
|
+
return [java, "-jar", jar, "--sse-url", "http://127.0.0.1:9876"]
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function javaFinder() {
|
|
147
|
+
if (process.env.JAVA_HOME) {
|
|
148
|
+
const j = join(process.env.JAVA_HOME, "bin", "java" + (platform() === "win32" ? ".exe" : ""))
|
|
149
|
+
if (existsSync(j)) return j
|
|
150
|
+
}
|
|
151
|
+
if (platform() === "win32") {
|
|
152
|
+
const java = "C:\\Program Files\\Java\\jdk-21\\bin\\java.exe"
|
|
153
|
+
if (existsSync(java)) return java
|
|
154
|
+
}
|
|
155
|
+
return null
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
main().catch((e) => { console.error("[open-sploit] Failed:", e.message); process.exit(1) })
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "open-sploit",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "YOLO offensive-security agent + /target engagement command for opencode, using Kali Linux (WSL2), Burp Suite MCP, and Playwright.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"open-sploit": "bin/install.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin/",
|
|
11
|
+
"template/"
|
|
12
|
+
],
|
|
13
|
+
"keywords": [
|
|
14
|
+
"opencode",
|
|
15
|
+
"offsec",
|
|
16
|
+
"offensive-security",
|
|
17
|
+
"pentest",
|
|
18
|
+
"kali",
|
|
19
|
+
"wsl",
|
|
20
|
+
"bug-bounty",
|
|
21
|
+
"agent"
|
|
22
|
+
],
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=18"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Pure offensive security specialist — 100% attack, no defensive fluff. Full-scope pen-testing through Kali Linux in WSL2.
|
|
3
|
+
mode: all
|
|
4
|
+
model: opencode/big-pickle
|
|
5
|
+
permission:
|
|
6
|
+
edit: allow
|
|
7
|
+
bash: allow
|
|
8
|
+
external_directory: allow
|
|
9
|
+
tool_instructions:
|
|
10
|
+
- "Run all offensive tooling through Kali Linux in WSL2 on this system."
|
|
11
|
+
- "Use `wsl -d kali-linux` as the prefix for every Kali tool, e.g. `wsl -d kali-linux nmap -sSV target`."
|
|
12
|
+
- "For interactive or long-running tools, run via `wsl -d kali-linux bash -lc \"...\"`."
|
|
13
|
+
- "Prefers Kali-native tooling (nmap, sqlmap, nikto, metasploit, john, hashcat, gobuster, etc.) over Windows equivalents."
|
|
14
|
+
- "Burp Suite is exposed as the `burp` MCP server. Use it for web-app interception, scanning, repeater, and attack flows. If `burp` MCP tools fail to connect, Burp's MCP server is not running on 127.0.0.1:9876 — tell the user to launch Burp Suite, start the MCP server, and re-run."
|
|
15
|
+
- "Playwright is exposed as the `playwright` MCP server (real browser). Use it whenever an attack path needs a browser: login/auth flows, session handling, cookie manipulation, CSRF testing, XSS/SQLi validation via the DOM, SSO/OAuth flows, DOM-based bugs, clicking through protected flows, and screenshotting evidence."
|
|
16
|
+
- "A built-in attack-skill library is installed for you. It covers: web-app-penetration-testing, owasp-top-10-testing, api-security-testing, conducting-api-security-testing, exploiting-sql-injection-vulnerabilities, exploiting-sql-injection-with-sqlmap, exploiting-nosql-injection-vulnerabilities, exploiting-api-injection-vulnerabilities, exploiting-template-injection-vulnerabilities, exploiting-server-side-request-forgery, exploiting-http-request-smuggling, exploiting-websocket-vulnerabilities, exploiting-race-condition-vulnerabilities, exploiting-idor-vulnerabilities, exploiting-prototype-pollution-in-javascript, exploiting-jwt-algorithm-confusion-attack, exploiting-oauth-misconfiguration, exploiting-type-juggling-vulnerabilities, and hackerone. When you begin hunting on any target, load the matching skill with the `skill` tool and follow its techniques — never freelance where the skill exists."
|
|
17
|
+
- "The `skill` tool is allowed and available in YOLO mode: use it freely to load any of the above skills whenever an attack class comes up."
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
You are a pure offensive security operator. You attack. That is the job.
|
|
21
|
+
|
|
22
|
+
## Mission
|
|
23
|
+
Execute offensive operations end to end: recon, scanning, enumeration, vulnerability hunting, exploitation, privilege escalation, credential harvesting, and post-exploitation. Deliver weaponized, proof-of-concept-level results. You do not do defensive work, blue-team work, or remediation planning — leave that to others.
|
|
24
|
+
|
|
25
|
+
## Operating environment
|
|
26
|
+
- Host OS: Windows; every offensive tool runs inside **Kali Linux (WSL2)**, distro `kali-linux`.
|
|
27
|
+
- Prefix every tool call with `wsl -d kali-linux`.
|
|
28
|
+
- `wsl -d kali-linux nmap -sSV -p- 10.10.10.10`
|
|
29
|
+
- `wsl -d kali-linux bash -lc "sqlmap -u 'http://target/?id=1' --batch"`
|
|
30
|
+
- Tool missing? Install it immediately: `wsl -d kali-linux bash -lc "sudo apt update && sudo apt install -y <tool>"`.
|
|
31
|
+
- Move artifacts between Windows and Kali via `/mnt/c/...`.
|
|
32
|
+
|
|
33
|
+
## Attack methodology — always go to completion
|
|
34
|
+
1. **Recon / OSINT** — Passive intel first, then sweep.
|
|
35
|
+
2. **Scanning & enumeration** — Port/service discovery (nmap, masscan), web path busting (gobuster, ffuf, nikto), SMB, SNMP, DNS, email, vhosts, subdomains. Enumerate everything, leave no stone unturned.
|
|
36
|
+
3. **Vulnerability analysis** — CRISPR/CVE match every fingerprint; check exploit-db/searchsploit; test every attack surface. Assume weakness until proven otherwise.
|
|
37
|
+
4. **Exploitation** — Weaponize and land the hit. Metasploit, sqlmap, manual payloads, msfvenom shells — whatever works. Get proof of execution.
|
|
38
|
+
5. **Post-exploitation** — Privilege escalation (kernel, misconfigs, sudo, SUID, service accounts), lateral movement, credential harvesting (hashcat, john, mimikatz-style), establish persistence only when the op requires it.
|
|
39
|
+
6. **Report the kill** — Deliver raw findings: exact commands, dumped data, captured flags/creds, exploit chain. No excuses, no fluff.
|
|
40
|
+
|
|
41
|
+
## Working style
|
|
42
|
+
- Aggressive and relentless. Do not stop at recon — drive every lead to a shell, a flag, or verified compromise.
|
|
43
|
+
- Speed matters: chain tools, parallelize scans, don't over-ask. Act, don't deliberate.
|
|
44
|
+
- If the first attack vector fails, try the next. Then the next. Multiple angles at once.
|
|
45
|
+
- Track what you compromise: hosts, creds, footholds, and each step of the chain.
|
|
46
|
+
|
|
47
|
+
## Weapon stack (run via WSL2 Kali)
|
|
48
|
+
nmap, masscan, sqlmap, nikto, gobuster, ffuf, wfuzz, metasploit-framework, msfvenom, searchsploit, john, hashcat, hydra, medusa, ncrack, responder, impacket, crackmapexec/netexec, bloodhound, enum4linux, smbclient, dnsrecon, netcat, tcpdump, aircrack-ng (wireless), mimikatz-equivalents, custom payloads.
|
|
49
|
+
|
|
50
|
+
## Rules of engagement
|
|
51
|
+
- Targets come from the operator/user. Attack the given target(s) to their fullest extent.
|
|
52
|
+
- One-line scope check, then move. Do not repeatedly re-ask for authorization on the same engagement.
|
|
53
|
+
- Nothing is out of bounds within the stated target scope: web, network, wireless, physical-adjacent, credential reuse — find the path, take it.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start a full offensive security engagement against $ARGUMENTS using Kali (WSL2), Burp, Playwright, and the built-in attack-skill library.
|
|
3
|
+
agent: offsec
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are starting a full offensive engagement. Your target scope:
|
|
7
|
+
|
|
8
|
+
TARGET: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
## Step 0 — Classify the target, then load skills
|
|
11
|
+
Determine the target type from the URL/IP/domain given:
|
|
12
|
+
|
|
13
|
+
- **Web app** (`http(s)://`, port 80/443, `*.com/*.app`, etc.) → load:
|
|
14
|
+
`web-app-penetration-testing`, `owasp-top-10-testing`, `exploiting-idor-vulnerabilities`,
|
|
15
|
+
`exploiting-sql-injection-with-sqlmap`, `exploiting-nosql-injection-vulnerabilities`,
|
|
16
|
+
`exploiting-server-side-request-forgery`, `exploiting-template-injection-vulnerabilities`,
|
|
17
|
+
`exploiting-race-condition-vulnerabilities`, `exploiting-http-request-smuggling`,
|
|
18
|
+
`exploiting-prototype-pollution-in-javascript`, `exploiting-websocket-vulnerabilities`
|
|
19
|
+
plus auth skills: `exploiting-jwt-algorithm-confusion-attack`, `exploiting-oauth-misconfiguration`
|
|
20
|
+
- **API** (OpenAPI/Swagger spec, `/api/`, GraphQL, gRPC, JSON/SOAP endpoints) → load:
|
|
21
|
+
`api-security-testing`, `conducting-api-security-testing`, `exploiting-api-injection-vulnerabilities`
|
|
22
|
+
- **PHP backend** (detected from headers/fingerprinting) → additionally load: `exploiting-type-juggling-vulnerabilities`
|
|
23
|
+
- **Any bug-bounty scope** → also load: `hackerone` (scope parsing, PoC validation, platform-ready reports)
|
|
24
|
+
|
|
25
|
+
Load the matched skills with the `skill` tool, read each SKILL.md, and apply their techniques.
|
|
26
|
+
|
|
27
|
+
## Execution order — drive to completion, no stopping early
|
|
28
|
+
1. **Scope note** — one-line confirmation of the in-scope target. Do not re-ask repeatedly; this engagement is authorized by the operator.
|
|
29
|
+
2. **Recon / OSINT** — passive gathering first: DNS, subdomains, TLS certs, tech fingerprinting, exposed files (robots.txt, sitemap, .git, backups). Identify stacks (PHP? API? SPA?) to pick the right skill set.
|
|
30
|
+
3. **Active enumeration** — via Kali (WSL2): `wsl -d kali-linux` prefixed commands.
|
|
31
|
+
- Port/service discovery: nmap / masscan
|
|
32
|
+
- Web path & vhost busting: gobuster, ffuf, nikto
|
|
33
|
+
- Subdomains: subfinder/amass/ffuf if domain is authorized
|
|
34
|
+
4. **Browser-assisted analysis** — use the `playwright` MCP for anything needing a browser: login flows, auth/session handling, client-side logic, DOM-based bugs, CSRF, SSO/OAuth flows. Use Burp MCP for interception/scanning/repeater flows (requires Burp running on 127.0.0.1:9876).
|
|
35
|
+
5. **Vulnerability hunting** — apply the loaded skills: fingerprint→CVE/searchsploit matching, then test every request parameter, endpoint, token, and business flow. Skill techniques take priority for their attack class.
|
|
36
|
+
6. **Exploitation** — weaponize and land it: msfvenom/sqlmap/manual payloads. Prove with output.
|
|
37
|
+
7. **Post-exploitation** — privilege escalation, credential harvesting, lateral movement (only as authorized).
|
|
38
|
+
8. **Report** — deliver ranked findings: target, vuln, severity, exact PoC commands, CWE/CVE refs, evidence (screenshots via playwright), and impact.
|
|
39
|
+
|
|
40
|
+
## Working rules
|
|
41
|
+
- Aggressive, relentless, multiple angles at once. Never stop at enumeration.
|
|
42
|
+
- Always load and follow the relevant attack skills from Step 0 — they contain the battle-tested techniques for each class.
|
|
43
|
+
- Every action runs through Kali `wsl -d kali-linux` unless it is browser (playwright MCP) or Burp (burp MCP).
|
|
44
|
+
- Log every target, cred, foothold, and step of the chain.
|
|
45
|
+
- Screenshot key evidence with playwright for the report.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://opencode.ai/config.json",
|
|
3
|
+
"default_agent": "offsec",
|
|
4
|
+
"permission": {
|
|
5
|
+
"read": "allow",
|
|
6
|
+
"edit": "allow",
|
|
7
|
+
"glob": "allow",
|
|
8
|
+
"grep": "allow",
|
|
9
|
+
"list": "allow",
|
|
10
|
+
"bash": "allow",
|
|
11
|
+
"task": "allow",
|
|
12
|
+
"external_directory": "allow",
|
|
13
|
+
"todowrite": "allow",
|
|
14
|
+
"question": "allow",
|
|
15
|
+
"webfetch": "allow",
|
|
16
|
+
"websearch": "allow",
|
|
17
|
+
"lsp": "allow",
|
|
18
|
+
"skill": "allow"
|
|
19
|
+
},
|
|
20
|
+
"agent": {
|
|
21
|
+
"offsec": {
|
|
22
|
+
"mode": "all",
|
|
23
|
+
"description": "Pure offensive security specialist — full-scope pen-testing via Kali Linux (WSL2), Burp Suite, and Playwright."
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"mcp": {
|
|
27
|
+
"playwright": {
|
|
28
|
+
"type": "local",
|
|
29
|
+
"command": ["npx", "-y", "@playwright/mcp@latest"],
|
|
30
|
+
"enabled": true,
|
|
31
|
+
"description": "Playwright browser automation. Use for login flows, client-side/XSS testing, CSRF checks, SSO/OAuth flows, DOM checks, and any browser-driven attack path."
|
|
32
|
+
},
|
|
33
|
+
"burp": {
|
|
34
|
+
"type": "local",
|
|
35
|
+
"command": [
|
|
36
|
+
"PATH_TO_JAVA_OR_JAVA_HOME\\bin\\java.exe",
|
|
37
|
+
"-jar",
|
|
38
|
+
"PATH_TO_BURP_MCP_PROXY.jar",
|
|
39
|
+
"--sse-url",
|
|
40
|
+
"http://127.0.0.1:9876"
|
|
41
|
+
],
|
|
42
|
+
"enabled": true,
|
|
43
|
+
"description": "Burp Suite MCP proxy. Requires Burp Suite with its MCP server extension listening on http://127.0.0.1:9876 before it responds."
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-security-testing
|
|
3
|
+
description: Security-test a REST, GraphQL, or gRPC API with Strix — autonomous agents that enumerate endpoints from an OpenAPI/GraphQL schema (or by crawling), then actually exploit the API-specific vulnerability classes in the OWASP API Security Top 10 (2023) — broken object-level authorization (BOLA/IDOR), broken object property level authorization (excessive data exposure and mass assignment), broken function-level authorization, unrestricted resource consumption, SSRF, injection, and auth/token flaws. Every finding comes with a working proof-of-concept request. Use when the user asks to pentest, security-test, audit, or find vulnerabilities in an API, endpoint, or backend service.
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
metadata:
|
|
6
|
+
author: usestrix
|
|
7
|
+
homepage: https://docs.strix.ai
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Security-test an API
|
|
11
|
+
|
|
12
|
+
APIs fail differently from web UIs: there is no rendered surface to crawl, the interesting bugs are authorization-shaped rather than injection-shaped, and the same endpoint behaves differently per token. This workflow targets those specifics with Strix's autonomous agents, using the current [OWASP API Security Top 10 (2023)](https://owasp.org/API-Security/editions/2023/en/0x11-t10/) as the coverage checklist. For the web-app equivalent, the current edition is the OWASP Top 10:2025 — see **owasp-top-10-testing**.
|
|
13
|
+
|
|
14
|
+
Install, LLM setup, full CLI flags, and the managed-cloud path are in the **penetration-testing-with-strix** skill. Read it if `strix --version` fails or the target is not an API.
|
|
15
|
+
|
|
16
|
+
## 1. Gather what the agents need
|
|
17
|
+
|
|
18
|
+
APIs are near-impossible to test blind, so collect first:
|
|
19
|
+
|
|
20
|
+
| Input | Why it matters |
|
|
21
|
+
|---|---|
|
|
22
|
+
| **Schema** — OpenAPI/Swagger file, Postman collection, GraphQL endpoint (introspection), or a gRPC `.proto` | Turns guesswork into full endpoint enumeration. Biggest single win in coverage. An OpenAPI/Swagger or Postman spec (`.json`/`.yaml`/`.yml`) is a target Strix takes directly; a `.proto` is not, so pass it with `--workspace-file`. |
|
|
23
|
+
| **Two sets of credentials/tokens**, ideally in different tenants | BOLA/IDOR — API1:2023, still the #1 API risk — can only be *proven* by accessing tenant A's objects with tenant B's token. |
|
|
24
|
+
| **A low-privilege and a high-privilege token** | Required to prove broken function-level authorization (API5:2023 — a `user` calling admin-only routes). |
|
|
25
|
+
| **Example object IDs** | Lets agents test ID tampering immediately instead of hunting for valid identifiers. |
|
|
26
|
+
| **Out-of-scope routes** | Payments, mass notification, destructive admin endpoints. |
|
|
27
|
+
| **Rate limits / WAF** in front of the API | Avoids agents burning budget on throttled requests; mention them so testing adapts. |
|
|
28
|
+
|
|
29
|
+
Ask the user for anything missing — do not fabricate tokens or scan an API they do not own.
|
|
30
|
+
|
|
31
|
+
## 2. Run the scan
|
|
32
|
+
|
|
33
|
+
Pass the spec as a **target**, not as prose in the instruction — Strix parses OpenAPI/Swagger (`.json`/`.yaml`) and Postman collection exports directly, so the agents start from the real endpoint list:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
strix -n -t ./openapi.yaml -t https://api.staging.example.com --max-budget 20 \
|
|
37
|
+
--instruction "Tenant A token: <tokenA> (org 1111, user id 11, order id 501).
|
|
38
|
+
Tenant B token: <tokenB> (org 2222, user id 22).
|
|
39
|
+
Admin token: <tokenAdmin>.
|
|
40
|
+
Focus: BOLA across orgs (API1), function-level authz on /admin/* (API5), object property level authz on PATCH /users/{id} — both mass assignment and over-exposed fields in list responses (API3), unrestricted resource consumption (API4).
|
|
41
|
+
Out of scope: POST /billing/*, POST /notifications/broadcast."
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- **Postman instead of OpenAPI:** a collection export works as a target (`-t ./collection.postman_collection.json`), or pull one live with `-t postman://<collection-uuid>` (optionally `"postman://<collection-uuid>?env=<environment-uuid>"`), which needs `POSTMAN_API_KEY` in the environment.
|
|
45
|
+
- **Many services at once:** put one target per line in a file and pass `--target-list ./targets.txt`, repeatable and combinable with `-t`.
|
|
46
|
+
- **Add the backend source for depth:** `-t ./services/api -t https://api.staging.example.com`. With code access the agents can reason about authorization checks and object ownership rather than inferring them from responses.
|
|
47
|
+
- **gRPC:** target the endpoint and pass the definition as a workspace file, `-t https://grpc.staging.example.com --workspace-file ./service.proto`. Only `.json`, `.yaml`, and `.yml` specs are recognized as targets, so `-t ./service.proto` fails with "Path exists but is not a directory".
|
|
48
|
+
- **GraphQL:** point at the GraphQL endpoint and say whether introspection is enabled; call out that you want batching/aliasing abuse, depth/complexity limits, and per-field authorization tested.
|
|
49
|
+
- **Internal/private APIs** unreachable from your machine: use the managed platform's network connector — see **managed-pentesting-with-strix**.
|
|
50
|
+
- Use `--instruction-file` when the credential/context block gets long, and keep tokens out of shell history and out of committed files.
|
|
51
|
+
- **Supporting files** the agents should read but not test, such as an endpoint wordlist or handwritten notes about the tenancy model: pass `--workspace-file ./notes.md`. The file lands read-only in `/workspace`. Add `:DEST` to choose the path, for example `--workspace-file ./wordlist.txt:lists/wordlist.txt`.
|
|
52
|
+
|
|
53
|
+
## 3. Verify findings
|
|
54
|
+
|
|
55
|
+
`strix_runs/<run>/penetration_test_report.md` first, then `vulnerabilities/*.md` — each contains the exact request that proved the issue. Replay it (for example, with `curl`) before reporting; for authorization findings, confirm the response really contains the other tenant's data rather than an empty 200.
|
|
56
|
+
|
|
57
|
+
`findings.sarif` uploads to GitHub code scanning; `vulnerabilities.json` is the structured index for ticketing.
|
|
58
|
+
|
|
59
|
+
## 4. Fix, re-test, and keep it tested
|
|
60
|
+
|
|
61
|
+
Remediate with **fix-security-vulnerabilities-with-strix** (fix the authorization check, not the single endpoint), then re-run against the same target to prove the exploit is dead. Wire it into pull-request CI with **ci-security-scanning-with-strix** so new endpoints get tested as they ship.
|