cantarella-framework 1.8.0 → 1.10.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/CHANGELOG.md +8 -0
- package/modules/forensics-strings-extractor/index.mjs +44 -0
- package/modules/forensics-strings-extractor/module.json +21 -0
- package/modules/lab-base64-tool/index.mjs +40 -0
- package/modules/lab-base64-tool/module.json +27 -0
- package/modules/vuln-management-nessus-import/index.mjs +62 -0
- package/modules/vuln-management-nessus-import/module.json +14 -0
- package/modules/wrapper-amass/index.mjs +42 -0
- package/modules/wrapper-amass/module.json +21 -0
- package/modules/wrapper-apktool/index.mjs +61 -0
- package/modules/wrapper-apktool/module.json +21 -0
- package/modules/wrapper-bandit/index.mjs +56 -0
- package/modules/wrapper-bandit/module.json +21 -0
- package/modules/wrapper-binwalk/index.mjs +40 -0
- package/modules/wrapper-binwalk/module.json +21 -0
- package/modules/wrapper-checkov/index.mjs +47 -0
- package/modules/wrapper-checkov/module.json +21 -0
- package/modules/wrapper-clamscan/index.mjs +40 -0
- package/modules/wrapper-clamscan/module.json +21 -0
- package/modules/wrapper-dirsearch/index.mjs +40 -0
- package/modules/wrapper-dirsearch/module.json +21 -0
- package/modules/wrapper-gitleaks/index.mjs +64 -0
- package/modules/wrapper-gitleaks/module.json +21 -0
- package/modules/wrapper-hashcat/index.mjs +42 -0
- package/modules/wrapper-hashcat/module.json +34 -0
- package/modules/wrapper-hydra/index.mjs +43 -0
- package/modules/wrapper-hydra/module.json +40 -0
- package/modules/wrapper-john/index.mjs +46 -0
- package/modules/wrapper-john/module.json +28 -0
- package/modules/wrapper-masscan/index.mjs +42 -0
- package/modules/wrapper-masscan/module.json +34 -0
- package/modules/wrapper-subfinder/index.mjs +42 -0
- package/modules/wrapper-subfinder/module.json +21 -0
- package/modules/wrapper-theharvester/index.mjs +42 -0
- package/modules/wrapper-theharvester/module.json +21 -0
- package/modules/wrapper-waf-detector/index.mjs +36 -0
- package/modules/wrapper-waf-detector/module.json +21 -0
- package/modules/wrapper-waybackurls/index.mjs +40 -0
- package/modules/wrapper-waybackurls/module.json +21 -0
- package/modules/wrapper-wpscan/index.mjs +59 -0
- package/modules/wrapper-wpscan/module.json +28 -0
- package/package.json +1 -1
- package/packages/cli/dist/cli.js +1 -1
- package/packages/cli/dist/cli.js.map +1 -1
- package/packages/gui/dist/server.js +2 -2
- package/packages/gui/dist/server.js.map +1 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
|
|
3
|
+
let input = "";
|
|
4
|
+
process.stdin.setEncoding("utf8");
|
|
5
|
+
process.stdin.on("data", (chunk) => (input += chunk));
|
|
6
|
+
process.stdin.on("end", () => {
|
|
7
|
+
const request = JSON.parse(input || "{}");
|
|
8
|
+
const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
|
|
9
|
+
const target = String(request.target ?? "");
|
|
10
|
+
const child = spawn("dirsearch", ["-u", target], { stdio: ["ignore", "pipe", "pipe"] });
|
|
11
|
+
let stdout = "";
|
|
12
|
+
let stderr = "";
|
|
13
|
+
child.stdout.on("data", (chunk) => (stdout += chunk));
|
|
14
|
+
child.stderr.on("data", (chunk) => (stderr += chunk));
|
|
15
|
+
child.on("error", (error) => {
|
|
16
|
+
emit({ type: "error", message: `dirsearch failed: ${error.message}` });
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
});
|
|
19
|
+
child.on("close", (code) => {
|
|
20
|
+
const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
|
|
21
|
+
const paths = [];
|
|
22
|
+
for (const line of plain.split("\n")) {
|
|
23
|
+
const trimmed = line.trim();
|
|
24
|
+
const match = trimmed.match(/(\d{3})\s+-\s+(\S+)\s+-\s+(\S+)/);
|
|
25
|
+
if (!match) continue;
|
|
26
|
+
paths.push({ status: Number(match[1]), size: match[2], path: match[3] });
|
|
27
|
+
}
|
|
28
|
+
if (code !== 0 && !paths.length) {
|
|
29
|
+
emit({ type: "error", message: `dirsearch failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
30
|
+
process.exitCode = 1;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
emit({
|
|
34
|
+
type: "result",
|
|
35
|
+
summary: `dirsearch found ${paths.length} paths on ${target}.`,
|
|
36
|
+
data: { target, paths: paths.slice(0, 500) },
|
|
37
|
+
});
|
|
38
|
+
emit({ type: "done", summary: `dirsearch finished: ${paths.length} paths.` });
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "web",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Brute forces hidden paths on a website with dirsearch and reports the paths found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "dirsearch",
|
|
9
|
+
"install_hint": "Install dirsearch from your distribution packages or with pipx install dirsearch.",
|
|
10
|
+
"name": "dirsearch"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "web/dirsearch",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "dirsearch",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "medium",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { mkdtemp, readFile, rm } from "node:fs/promises";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
|
|
6
|
+
let input = "";
|
|
7
|
+
process.stdin.setEncoding("utf8");
|
|
8
|
+
process.stdin.on("data", (chunk) => (input += chunk));
|
|
9
|
+
process.stdin.on("end", () => {
|
|
10
|
+
const request = JSON.parse(input || "{}");
|
|
11
|
+
const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
|
|
12
|
+
const target = String(request.target ?? "");
|
|
13
|
+
run(request, target, emit).catch((error) => {
|
|
14
|
+
emit({ type: "error", message: `Gitleaks failed: ${error.message}` });
|
|
15
|
+
process.exitCode = 1;
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
async function run(request, target, emit) {
|
|
20
|
+
const outDir = await mkdtemp(join(tmpdir(), "cantarella-gitleaks-"));
|
|
21
|
+
const reportPath = join(outDir, "gitleaks.json");
|
|
22
|
+
try {
|
|
23
|
+
const child = spawn("gitleaks", ["detect", "--source", target, "--no-git", "--report-format", "json", "--report-path", reportPath], { stdio: ["ignore", "pipe", "pipe"] });
|
|
24
|
+
let stdout = "";
|
|
25
|
+
let stderr = "";
|
|
26
|
+
child.stdout.on("data", (chunk) => (stdout += chunk));
|
|
27
|
+
child.stderr.on("data", (chunk) => (stderr += chunk));
|
|
28
|
+
const code = await new Promise((resolve, reject) => {
|
|
29
|
+
child.on("error", reject);
|
|
30
|
+
child.on("close", resolve);
|
|
31
|
+
});
|
|
32
|
+
let report = null;
|
|
33
|
+
try {
|
|
34
|
+
const raw = await readFile(reportPath, "utf8");
|
|
35
|
+
report = JSON.parse(raw || "[]");
|
|
36
|
+
} catch {
|
|
37
|
+
report = null;
|
|
38
|
+
}
|
|
39
|
+
const findings = [];
|
|
40
|
+
if (Array.isArray(report)) {
|
|
41
|
+
for (const finding of report) {
|
|
42
|
+
findings.push({
|
|
43
|
+
rule: finding.RuleID ?? "",
|
|
44
|
+
description: finding.Description ?? "",
|
|
45
|
+
file: finding.File ?? "",
|
|
46
|
+
line: finding.StartLine ?? null,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
if (code !== 0 && !findings.length && !report) {
|
|
51
|
+
emit({ type: "error", message: `Gitleaks failed: ${stderr.trim() || stdout.trim() || `exited with ${code}`}` });
|
|
52
|
+
process.exitCode = 1;
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
emit({
|
|
56
|
+
type: "result",
|
|
57
|
+
summary: `Gitleaks found ${findings.length} secrets in ${target}.`,
|
|
58
|
+
data: { target, total: findings.length, findings: findings.slice(0, 100) },
|
|
59
|
+
});
|
|
60
|
+
emit({ type: "done", summary: `Gitleaks finished: ${findings.length} secrets.` });
|
|
61
|
+
} finally {
|
|
62
|
+
await rm(outDir, { recursive: true, force: true });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "devsecops",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Scans a repository for leaked secrets with Gitleaks and reports the findings.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "gitleaks",
|
|
9
|
+
"install_hint": "Install Gitleaks from your distribution packages or the Gitleaks releases.",
|
|
10
|
+
"name": "Gitleaks"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "devsecops/gitleaks",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Gitleaks",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
|
|
3
|
+
let input = "";
|
|
4
|
+
process.stdin.setEncoding("utf8");
|
|
5
|
+
process.stdin.on("data", (chunk) => (input += chunk));
|
|
6
|
+
process.stdin.on("end", () => {
|
|
7
|
+
const request = JSON.parse(input || "{}");
|
|
8
|
+
const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
|
|
9
|
+
const target = String(request.target ?? "");
|
|
10
|
+
const mode = String(request.options?.mode ?? 0);
|
|
11
|
+
const wordlist = String(request.options?.wordlist ?? "/usr/share/wordlists/rockyou.txt");
|
|
12
|
+
const child = spawn("hashcat", ["-m", mode, "-a", "0", target, wordlist], { stdio: ["ignore", "pipe", "pipe"] });
|
|
13
|
+
let stdout = "";
|
|
14
|
+
let stderr = "";
|
|
15
|
+
child.stdout.on("data", (chunk) => (stdout += chunk));
|
|
16
|
+
child.stderr.on("data", (chunk) => (stderr += chunk));
|
|
17
|
+
child.on("error", (error) => {
|
|
18
|
+
emit({ type: "error", message: `Hashcat failed: ${error.message}` });
|
|
19
|
+
process.exitCode = 1;
|
|
20
|
+
});
|
|
21
|
+
child.on("close", (code) => {
|
|
22
|
+
const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
|
|
23
|
+
let cracked = 0;
|
|
24
|
+
let total = 0;
|
|
25
|
+
const match = plain.match(/Recovered[.:\s]+(\d+)\s*\/\s*(\d+)/);
|
|
26
|
+
if (match) {
|
|
27
|
+
cracked = Number(match[1]);
|
|
28
|
+
total = Number(match[2]);
|
|
29
|
+
}
|
|
30
|
+
if (code !== 0 && !match) {
|
|
31
|
+
emit({ type: "error", message: `Hashcat failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
32
|
+
process.exitCode = 1;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
emit({
|
|
36
|
+
type: "result",
|
|
37
|
+
summary: `Hashcat recovered ${cracked} of ${total} hashes from ${target}.`,
|
|
38
|
+
data: { target, mode: Number(mode), cracked, total },
|
|
39
|
+
});
|
|
40
|
+
emit({ type: "done", summary: `Hashcat finished: ${cracked} of ${total} hashes recovered.` });
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "password",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Cracks password hashes with Hashcat and reports how many were recovered.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "hashcat",
|
|
9
|
+
"install_hint": "Install Hashcat from your distribution packages.",
|
|
10
|
+
"name": "Hashcat"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "password/hashcat",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Hashcat",
|
|
17
|
+
"options": [
|
|
18
|
+
{
|
|
19
|
+
"default": 0,
|
|
20
|
+
"description": "Hashcat hash mode, for example 0 for MD5 or 1000 for NTLM.",
|
|
21
|
+
"name": "mode",
|
|
22
|
+
"type": "number"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"default": "/usr/share/wordlists/rockyou.txt",
|
|
26
|
+
"description": "Wordlist of passwords to try.",
|
|
27
|
+
"name": "wordlist",
|
|
28
|
+
"type": "string"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"risk": "high",
|
|
32
|
+
"schema_version": 1,
|
|
33
|
+
"version": "0.1.0"
|
|
34
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
|
|
3
|
+
let input = "";
|
|
4
|
+
process.stdin.setEncoding("utf8");
|
|
5
|
+
process.stdin.on("data", (chunk) => (input += chunk));
|
|
6
|
+
process.stdin.on("end", () => {
|
|
7
|
+
const request = JSON.parse(input || "{}");
|
|
8
|
+
const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
|
|
9
|
+
const target = String(request.target ?? "");
|
|
10
|
+
const user = String(request.options?.user ?? "admin");
|
|
11
|
+
const wordlist = String(request.options?.wordlist ?? "/usr/share/wordlists/rockyou.txt");
|
|
12
|
+
const service = String(request.options?.service ?? "ssh");
|
|
13
|
+
const child = spawn("hydra", ["-l", user, "-P", wordlist, target, service], { stdio: ["ignore", "pipe", "pipe"] });
|
|
14
|
+
let stdout = "";
|
|
15
|
+
let stderr = "";
|
|
16
|
+
child.stdout.on("data", (chunk) => (stdout += chunk));
|
|
17
|
+
child.stderr.on("data", (chunk) => (stderr += chunk));
|
|
18
|
+
child.on("error", (error) => {
|
|
19
|
+
emit({ type: "error", message: `Hydra failed: ${error.message}` });
|
|
20
|
+
process.exitCode = 1;
|
|
21
|
+
});
|
|
22
|
+
child.on("close", (code) => {
|
|
23
|
+
const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
|
|
24
|
+
const credentials = [];
|
|
25
|
+
for (const line of plain.split("\n")) {
|
|
26
|
+
const trimmed = line.trim();
|
|
27
|
+
const match = trimmed.match(/\[(\d+)\]\[(\S+)\]\s+host:\s+(\S+)\s+login:\s+(\S+)\s+password:\s+(.+)$/);
|
|
28
|
+
if (!match) continue;
|
|
29
|
+
credentials.push({ port: Number(match[1]), service: match[2], host: match[3], login: match[4], password: match[5].trim() });
|
|
30
|
+
}
|
|
31
|
+
if (code !== 0 && !credentials.length) {
|
|
32
|
+
emit({ type: "error", message: `Hydra failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
33
|
+
process.exitCode = 1;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
emit({
|
|
37
|
+
type: "result",
|
|
38
|
+
summary: `Hydra found ${credentials.length} valid credentials for ${target}.`,
|
|
39
|
+
data: { target, service, credentials: credentials.slice(0, 100) },
|
|
40
|
+
});
|
|
41
|
+
emit({ type: "done", summary: `Hydra finished: ${credentials.length} valid credentials.` });
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "password",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Tests login credentials with Hydra and reports valid username and password pairs.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "hydra",
|
|
9
|
+
"install_hint": "Install Hydra from your distribution packages.",
|
|
10
|
+
"name": "Hydra"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "password/hydra",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Hydra",
|
|
17
|
+
"options": [
|
|
18
|
+
{
|
|
19
|
+
"default": "admin",
|
|
20
|
+
"description": "Username to test.",
|
|
21
|
+
"name": "user",
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"default": "/usr/share/wordlists/rockyou.txt",
|
|
26
|
+
"description": "Wordlist of passwords to try.",
|
|
27
|
+
"name": "wordlist",
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"default": "ssh",
|
|
32
|
+
"description": "Service to test, for example ssh, ftp, or http-post-form.",
|
|
33
|
+
"name": "service",
|
|
34
|
+
"type": "string"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"risk": "high",
|
|
38
|
+
"schema_version": 1,
|
|
39
|
+
"version": "0.1.0"
|
|
40
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
|
|
3
|
+
let input = "";
|
|
4
|
+
process.stdin.setEncoding("utf8");
|
|
5
|
+
process.stdin.on("data", (chunk) => (input += chunk));
|
|
6
|
+
process.stdin.on("end", () => {
|
|
7
|
+
const request = JSON.parse(input || "{}");
|
|
8
|
+
const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
|
|
9
|
+
const target = String(request.target ?? "");
|
|
10
|
+
const wordlist = String(request.options?.wordlist ?? "/usr/share/wordlists/rockyou.txt");
|
|
11
|
+
const child = spawn("john", [`--wordlist=${wordlist}`, target], { stdio: ["ignore", "pipe", "pipe"] });
|
|
12
|
+
let stdout = "";
|
|
13
|
+
let stderr = "";
|
|
14
|
+
child.stdout.on("data", (chunk) => (stdout += chunk));
|
|
15
|
+
child.stderr.on("data", (chunk) => (stderr += chunk));
|
|
16
|
+
child.on("error", (error) => {
|
|
17
|
+
emit({ type: "error", message: `John failed: ${error.message}` });
|
|
18
|
+
process.exitCode = 1;
|
|
19
|
+
});
|
|
20
|
+
child.on("close", (code) => {
|
|
21
|
+
const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
|
|
22
|
+
const credentials = [];
|
|
23
|
+
let cracked = 0;
|
|
24
|
+
for (const line of plain.split("\n")) {
|
|
25
|
+
const trimmed = line.trim();
|
|
26
|
+
const countMatch = trimmed.match(/(\d+) password hashes? cracked/i);
|
|
27
|
+
if (countMatch) cracked = Math.max(cracked, Number(countMatch[1]));
|
|
28
|
+
const credMatch = trimmed.match(/^(\S+)\s+\(([^)]+)\)$/);
|
|
29
|
+
if (credMatch && !/^Session/i.test(trimmed)) {
|
|
30
|
+
credentials.push({ password: credMatch[1], user: credMatch[2] });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (code !== 0 && !credentials.length && !cracked) {
|
|
34
|
+
emit({ type: "error", message: `John failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
35
|
+
process.exitCode = 1;
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (!cracked) cracked = credentials.length;
|
|
39
|
+
emit({
|
|
40
|
+
type: "result",
|
|
41
|
+
summary: `John cracked ${cracked} password hashes from ${target}.`,
|
|
42
|
+
data: { target, cracked, credentials: credentials.slice(0, 100) },
|
|
43
|
+
});
|
|
44
|
+
emit({ type: "done", summary: `John finished: ${cracked} password hashes cracked.` });
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "password",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Cracks password hashes with John the Ripper and reports the passwords recovered.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "john",
|
|
9
|
+
"install_hint": "Install John the Ripper from your distribution packages.",
|
|
10
|
+
"name": "John the Ripper"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "password/john",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "John the Ripper",
|
|
17
|
+
"options": [
|
|
18
|
+
{
|
|
19
|
+
"default": "/usr/share/wordlists/rockyou.txt",
|
|
20
|
+
"description": "Wordlist of passwords to try.",
|
|
21
|
+
"name": "wordlist",
|
|
22
|
+
"type": "string"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"risk": "high",
|
|
26
|
+
"schema_version": 1,
|
|
27
|
+
"version": "0.1.0"
|
|
28
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
|
|
3
|
+
let input = "";
|
|
4
|
+
process.stdin.setEncoding("utf8");
|
|
5
|
+
process.stdin.on("data", (chunk) => (input += chunk));
|
|
6
|
+
process.stdin.on("end", () => {
|
|
7
|
+
const request = JSON.parse(input || "{}");
|
|
8
|
+
const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
|
|
9
|
+
const target = String(request.target ?? "");
|
|
10
|
+
const ports = String(request.options?.ports ?? "1-1000");
|
|
11
|
+
const rate = String(request.options?.rate ?? 1000);
|
|
12
|
+
const child = spawn("masscan", [target, `-p${ports}`, "--rate", rate], { stdio: ["ignore", "pipe", "pipe"] });
|
|
13
|
+
let stdout = "";
|
|
14
|
+
let stderr = "";
|
|
15
|
+
child.stdout.on("data", (chunk) => (stdout += chunk));
|
|
16
|
+
child.stderr.on("data", (chunk) => (stderr += chunk));
|
|
17
|
+
child.on("error", (error) => {
|
|
18
|
+
emit({ type: "error", message: `Masscan failed: ${error.message}` });
|
|
19
|
+
process.exitCode = 1;
|
|
20
|
+
});
|
|
21
|
+
child.on("close", (code) => {
|
|
22
|
+
const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
|
|
23
|
+
const openPorts = [];
|
|
24
|
+
for (const line of plain.split("\n")) {
|
|
25
|
+
const trimmed = line.trim();
|
|
26
|
+
const match = trimmed.match(/Discovered open port (\d+)\/(\w+) on (\S+)/);
|
|
27
|
+
if (!match) continue;
|
|
28
|
+
openPorts.push({ port: Number(match[1]), protocol: match[2], host: match[3] });
|
|
29
|
+
}
|
|
30
|
+
if (code !== 0 && !openPorts.length) {
|
|
31
|
+
emit({ type: "error", message: `Masscan failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
32
|
+
process.exitCode = 1;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
emit({
|
|
36
|
+
type: "result",
|
|
37
|
+
summary: `Masscan found ${openPorts.length} open ports on ${target}.`,
|
|
38
|
+
data: { target, open_ports: openPorts.slice(0, 500) },
|
|
39
|
+
});
|
|
40
|
+
emit({ type: "done", summary: `Masscan finished: ${openPorts.length} open ports.` });
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "network",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Scans a target fast with Masscan and reports the open ports found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "masscan",
|
|
9
|
+
"install_hint": "Install Masscan from your distribution packages.",
|
|
10
|
+
"name": "Masscan"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "network/masscan",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Masscan",
|
|
17
|
+
"options": [
|
|
18
|
+
{
|
|
19
|
+
"default": "1-1000",
|
|
20
|
+
"description": "Ports or ranges to scan, for example 1-1000 or 80,443.",
|
|
21
|
+
"name": "ports",
|
|
22
|
+
"type": "string"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"default": 1000,
|
|
26
|
+
"description": "Packets per second to send.",
|
|
27
|
+
"name": "rate",
|
|
28
|
+
"type": "number"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"risk": "medium",
|
|
32
|
+
"schema_version": 1,
|
|
33
|
+
"version": "0.1.0"
|
|
34
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
|
|
3
|
+
let input = "";
|
|
4
|
+
process.stdin.setEncoding("utf8");
|
|
5
|
+
process.stdin.on("data", (chunk) => (input += chunk));
|
|
6
|
+
process.stdin.on("end", () => {
|
|
7
|
+
const request = JSON.parse(input || "{}");
|
|
8
|
+
const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
|
|
9
|
+
const target = String(request.target ?? "");
|
|
10
|
+
const child = spawn("subfinder", ["-d", target, "-silent"], { stdio: ["ignore", "pipe", "pipe"] });
|
|
11
|
+
let stdout = "";
|
|
12
|
+
let stderr = "";
|
|
13
|
+
child.stdout.on("data", (chunk) => (stdout += chunk));
|
|
14
|
+
child.stderr.on("data", (chunk) => (stderr += chunk));
|
|
15
|
+
child.on("error", (error) => {
|
|
16
|
+
emit({ type: "error", message: `Subfinder failed: ${error.message}` });
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
});
|
|
19
|
+
child.on("close", (code) => {
|
|
20
|
+
const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
|
|
21
|
+
const subdomains = [];
|
|
22
|
+
for (const line of plain.split("\n")) {
|
|
23
|
+
const trimmed = line.trim();
|
|
24
|
+
if (!trimmed) continue;
|
|
25
|
+
if (!/^[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/.test(trimmed)) continue;
|
|
26
|
+
if (trimmed === target) continue;
|
|
27
|
+
if (!trimmed.endsWith(`.${target}`)) continue;
|
|
28
|
+
subdomains.push(trimmed);
|
|
29
|
+
}
|
|
30
|
+
if (code !== 0 && !subdomains.length) {
|
|
31
|
+
emit({ type: "error", message: `Subfinder failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
32
|
+
process.exitCode = 1;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
emit({
|
|
36
|
+
type: "result",
|
|
37
|
+
summary: `Subfinder found ${subdomains.length} subdomains for ${target}.`,
|
|
38
|
+
data: { target, subdomains: [...new Set(subdomains)].slice(0, 500) },
|
|
39
|
+
});
|
|
40
|
+
emit({ type: "done", summary: `Subfinder finished: ${subdomains.length} subdomains.` });
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "recon",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Enumerates subdomains for a domain with Subfinder and reports the subdomains found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "subfinder",
|
|
9
|
+
"install_hint": "Install Subfinder from your distribution packages or the ProjectDiscovery releases.",
|
|
10
|
+
"name": "Subfinder"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "recon/subfinder",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Subfinder",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
|
|
3
|
+
let input = "";
|
|
4
|
+
process.stdin.setEncoding("utf8");
|
|
5
|
+
process.stdin.on("data", (chunk) => (input += chunk));
|
|
6
|
+
process.stdin.on("end", () => {
|
|
7
|
+
const request = JSON.parse(input || "{}");
|
|
8
|
+
const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
|
|
9
|
+
const target = String(request.target ?? "");
|
|
10
|
+
const child = spawn("theHarvester", ["-d", target, "-b", "all"], { stdio: ["ignore", "pipe", "pipe"] });
|
|
11
|
+
let stdout = "";
|
|
12
|
+
let stderr = "";
|
|
13
|
+
child.stdout.on("data", (chunk) => (stdout += chunk));
|
|
14
|
+
child.stderr.on("data", (chunk) => (stderr += chunk));
|
|
15
|
+
child.on("error", (error) => {
|
|
16
|
+
emit({ type: "error", message: `theHarvester failed: ${error.message}` });
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
});
|
|
19
|
+
child.on("close", (code) => {
|
|
20
|
+
const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
|
|
21
|
+
const emails = [...new Set(plain.match(/[\w.+-]+@[\w-]+\.[\w.]+/g) ?? [])];
|
|
22
|
+
const hosts = [];
|
|
23
|
+
for (const line of plain.split("\n")) {
|
|
24
|
+
const trimmed = line.trim();
|
|
25
|
+
if (!/^[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/.test(trimmed)) continue;
|
|
26
|
+
if (trimmed === target) continue;
|
|
27
|
+
if (!trimmed.endsWith(`.${target}`)) continue;
|
|
28
|
+
hosts.push(trimmed);
|
|
29
|
+
}
|
|
30
|
+
if (code !== 0 && !emails.length && !hosts.length) {
|
|
31
|
+
emit({ type: "error", message: `theHarvester failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
32
|
+
process.exitCode = 1;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
emit({
|
|
36
|
+
type: "result",
|
|
37
|
+
summary: `theHarvester found ${emails.length} emails and ${hosts.length} hosts for ${target}.`,
|
|
38
|
+
data: { target, emails: emails.slice(0, 200), hosts: [...new Set(hosts)].slice(0, 500) },
|
|
39
|
+
});
|
|
40
|
+
emit({ type: "done", summary: `theHarvester finished: ${emails.length} emails, ${hosts.length} hosts.` });
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "osint",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Gathers emails and hostnames for a domain with theHarvester and reports what was found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "theHarvester",
|
|
9
|
+
"install_hint": "Install theHarvester from your distribution packages or with pipx install theHarvester.",
|
|
10
|
+
"name": "theHarvester"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "osint/theharvester",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "theHarvester",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
|
|
3
|
+
let input = "";
|
|
4
|
+
process.stdin.setEncoding("utf8");
|
|
5
|
+
process.stdin.on("data", (chunk) => (input += chunk));
|
|
6
|
+
process.stdin.on("end", () => {
|
|
7
|
+
const request = JSON.parse(input || "{}");
|
|
8
|
+
const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
|
|
9
|
+
const target = String(request.target ?? "");
|
|
10
|
+
const child = spawn("wafw00f", [target], { stdio: ["ignore", "pipe", "pipe"] });
|
|
11
|
+
let stdout = "";
|
|
12
|
+
let stderr = "";
|
|
13
|
+
child.stdout.on("data", (chunk) => (stdout += chunk));
|
|
14
|
+
child.stderr.on("data", (chunk) => (stderr += chunk));
|
|
15
|
+
child.on("error", (error) => {
|
|
16
|
+
emit({ type: "error", message: `wafw00f failed: ${error.message}` });
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
});
|
|
19
|
+
child.on("close", (code) => {
|
|
20
|
+
const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
|
|
21
|
+
let waf = null;
|
|
22
|
+
const behind = plain.match(/is behind (.+?) WAF/i);
|
|
23
|
+
if (behind) waf = behind[1].trim();
|
|
24
|
+
if (code !== 0 && !waf && !/No WAF/i.test(plain)) {
|
|
25
|
+
emit({ type: "error", message: `wafw00f failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
26
|
+
process.exitCode = 1;
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
emit({
|
|
30
|
+
type: "result",
|
|
31
|
+
summary: waf ? `${target} is behind ${waf} WAF.` : `No WAF detected on ${target}.`,
|
|
32
|
+
data: { target, waf, detected: Boolean(waf) },
|
|
33
|
+
});
|
|
34
|
+
emit({ type: "done", summary: waf ? `WAF detected: ${waf}.` : "No WAF detected." });
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "web",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Detects the web application firewall in front of a site with wafw00f.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "wafw00f",
|
|
9
|
+
"install_hint": "Install wafw00f from your distribution packages or with pipx install wafw00f.",
|
|
10
|
+
"name": "wafw00f"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "web/waf-detector",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "WAF Detector",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|