cantarella-framework 1.9.0 → 1.11.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/incident-response-log-parser/index.mjs +42 -0
- package/modules/incident-response-log-parser/module.json +14 -0
- package/modules/lab-base64-tool/index.mjs +40 -0
- package/modules/lab-base64-tool/module.json +27 -0
- package/modules/lab-url-parser/index.mjs +40 -0
- package/modules/lab-url-parser/module.json +14 -0
- package/modules/threat-intel-otx/index.mjs +35 -0
- package/modules/threat-intel-otx/module.json +14 -0
- package/modules/vuln-management-nessus-import/index.mjs +62 -0
- package/modules/vuln-management-nessus-import/module.json +14 -0
- package/modules/wrapper-apktool/index.mjs +61 -0
- package/modules/wrapper-apktool/module.json +21 -0
- package/modules/wrapper-assetfinder/index.mjs +42 -0
- package/modules/wrapper-assetfinder/module.json +21 -0
- package/modules/wrapper-clamscan/index.mjs +40 -0
- package/modules/wrapper-clamscan/module.json +21 -0
- package/modules/wrapper-flawfinder/index.mjs +40 -0
- package/modules/wrapper-flawfinder/module.json +21 -0
- package/modules/wrapper-gau/index.mjs +40 -0
- package/modules/wrapper-gau/module.json +21 -0
- package/modules/wrapper-gitleaks/index.mjs +64 -0
- package/modules/wrapper-gitleaks/module.json +21 -0
- package/modules/wrapper-gobuster/index.mjs +41 -0
- package/modules/wrapper-gobuster/module.json +28 -0
- package/modules/wrapper-hashcat/index.mjs +42 -0
- package/modules/wrapper-hashcat/module.json +34 -0
- package/modules/wrapper-kube-bench/index.mjs +41 -0
- package/modules/wrapper-kube-bench/module.json +21 -0
- package/modules/wrapper-sleuthkit-fls/index.mjs +40 -0
- package/modules/wrapper-sleuthkit-fls/module.json +21 -0
- package/modules/wrapper-ssh-audit/index.mjs +39 -0
- package/modules/wrapper-ssh-audit/module.json +21 -0
- package/modules/wrapper-subfinder/index.mjs +42 -0
- package/modules/wrapper-subfinder/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/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,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "code-audit",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Audits C and C++ code with Flawfinder and reports the risky calls found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "flawfinder",
|
|
9
|
+
"install_hint": "Install Flawfinder from your distribution packages or with pipx install flawfinder.",
|
|
10
|
+
"name": "Flawfinder"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "code-audit/flawfinder",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Flawfinder",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -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("gau", [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: `gau 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 urls = [];
|
|
22
|
+
for (const line of plain.split("\n")) {
|
|
23
|
+
const trimmed = line.trim();
|
|
24
|
+
if (!trimmed) continue;
|
|
25
|
+
if (!/^https?:\/\//.test(trimmed)) continue;
|
|
26
|
+
urls.push(trimmed);
|
|
27
|
+
}
|
|
28
|
+
if (code !== 0 && !urls.length) {
|
|
29
|
+
emit({ type: "error", message: `gau failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
30
|
+
process.exitCode = 1;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
emit({
|
|
34
|
+
type: "result",
|
|
35
|
+
summary: `gau found ${urls.length} archived URLs for ${target}.`,
|
|
36
|
+
data: { target, urls: [...new Set(urls)].slice(0, 500) },
|
|
37
|
+
});
|
|
38
|
+
emit({ type: "done", summary: `gau finished: ${urls.length} archived URLs.` });
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "bug-bounty",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Lists archived URLs for a domain from the Wayback Machine with gau.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "gau",
|
|
9
|
+
"install_hint": "Install gau with go install github.com/lc/gau/v2/cmd/gau@latest.",
|
|
10
|
+
"name": "gau"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "bug-bounty/gau",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "gau",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
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,41 @@
|
|
|
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/dirb/common.txt");
|
|
11
|
+
const child = spawn("gobuster", ["dir", "-u", target, "-w", wordlist], { 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: `Gobuster 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 paths = [];
|
|
23
|
+
for (const line of plain.split("\n")) {
|
|
24
|
+
const trimmed = line.trim();
|
|
25
|
+
const match = trimmed.match(/^(\S+)\s+\(Status:\s+(\d+)\)\s+\[Size:\s+(\d+)\]/);
|
|
26
|
+
if (!match) continue;
|
|
27
|
+
paths.push({ path: match[1], status: Number(match[2]), size: Number(match[3]) });
|
|
28
|
+
}
|
|
29
|
+
if (code !== 0 && !paths.length) {
|
|
30
|
+
emit({ type: "error", message: `Gobuster failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
31
|
+
process.exitCode = 1;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
emit({
|
|
35
|
+
type: "result",
|
|
36
|
+
summary: `Gobuster found ${paths.length} paths on ${target}.`,
|
|
37
|
+
data: { target, paths: paths.slice(0, 500) },
|
|
38
|
+
});
|
|
39
|
+
emit({ type: "done", summary: `Gobuster finished: ${paths.length} paths.` });
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "web",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Brute forces hidden paths on a website with Gobuster and reports the paths found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "gobuster",
|
|
9
|
+
"install_hint": "Install Gobuster from your distribution packages or the OJ Gobuster releases.",
|
|
10
|
+
"name": "Gobuster"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "web/gobuster",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Gobuster",
|
|
17
|
+
"options": [
|
|
18
|
+
{
|
|
19
|
+
"default": "/usr/share/wordlists/dirb/common.txt",
|
|
20
|
+
"description": "Wordlist of paths to try.",
|
|
21
|
+
"name": "wordlist",
|
|
22
|
+
"type": "string"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"risk": "medium",
|
|
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 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,41 @@
|
|
|
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 child = spawn("kube-bench", [], { stdio: ["ignore", "pipe", "pipe"] });
|
|
10
|
+
let stdout = "";
|
|
11
|
+
let stderr = "";
|
|
12
|
+
child.stdout.on("data", (chunk) => (stdout += chunk));
|
|
13
|
+
child.stderr.on("data", (chunk) => (stderr += chunk));
|
|
14
|
+
child.on("error", (error) => {
|
|
15
|
+
emit({ type: "error", message: `kube-bench failed: ${error.message}` });
|
|
16
|
+
process.exitCode = 1;
|
|
17
|
+
});
|
|
18
|
+
child.on("close", (code) => {
|
|
19
|
+
const plain = stdout.replace(/\x1b\[[0-9;]*m/g, "");
|
|
20
|
+
const checks = [];
|
|
21
|
+
for (const line of plain.split("\n")) {
|
|
22
|
+
const trimmed = line.trim();
|
|
23
|
+
const match = trimmed.match(/^\[(PASS|FAIL|WARN|INFO)\]\s+(\d+\.\d+\.\d+)\s+(.+)$/);
|
|
24
|
+
if (!match) continue;
|
|
25
|
+
checks.push({ status: match[1], id: match[2], description: match[3].trim() });
|
|
26
|
+
}
|
|
27
|
+
if (code !== 0 && !checks.length) {
|
|
28
|
+
emit({ type: "error", message: `kube-bench failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
29
|
+
process.exitCode = 1;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const passed = checks.filter((check) => check.status === "PASS").length;
|
|
33
|
+
const failed = checks.filter((check) => check.status === "FAIL").length;
|
|
34
|
+
emit({
|
|
35
|
+
type: "result",
|
|
36
|
+
summary: `kube-bench reported ${failed} failed and ${passed} passed checks.`,
|
|
37
|
+
data: { passed, failed, checks: checks.slice(0, 200) },
|
|
38
|
+
});
|
|
39
|
+
emit({ type: "done", summary: `kube-bench finished: ${failed} failed, ${passed} passed.` });
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "cloud",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Runs CIS Kubernetes benchmarks with kube-bench and reports passing and failing checks.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "kube-bench",
|
|
9
|
+
"install_hint": "Install kube-bench from your distribution packages or the aquasecurity releases.",
|
|
10
|
+
"name": "kube-bench"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "cloud/kube-bench",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "kube-bench",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -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("fls", ["-r", 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: `fls 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 entries = [];
|
|
22
|
+
for (const line of plain.split("\n")) {
|
|
23
|
+
const trimmed = line.trim();
|
|
24
|
+
const match = trimmed.match(/^([rwdl-])\/([rwdl-])\s+(\d+):\s+(.+)$/);
|
|
25
|
+
if (!match) continue;
|
|
26
|
+
entries.push({ type: `${match[1]}/${match[2]}`, inode: Number(match[3]), name: match[4].trim() });
|
|
27
|
+
}
|
|
28
|
+
if (code !== 0 && !entries.length) {
|
|
29
|
+
emit({ type: "error", message: `fls failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
30
|
+
process.exitCode = 1;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
emit({
|
|
34
|
+
type: "result",
|
|
35
|
+
summary: `fls listed ${entries.length} entries in ${target}.`,
|
|
36
|
+
data: { target, entries: entries.slice(0, 500) },
|
|
37
|
+
});
|
|
38
|
+
emit({ type: "done", summary: `fls finished: ${entries.length} entries.` });
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "forensics",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Lists files in a disk image with The Sleuth Kit fls and reports the entries found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "fls",
|
|
9
|
+
"install_hint": "Install The Sleuth Kit from your distribution packages.",
|
|
10
|
+
"name": "The Sleuth Kit"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "forensics/sleuthkit-fls",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Sleuth Kit fls",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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("ssh-audit", ["-j", 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: `ssh-audit failed: ${error.message}` });
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
});
|
|
19
|
+
child.on("close", (code) => {
|
|
20
|
+
let report = null;
|
|
21
|
+
try {
|
|
22
|
+
report = JSON.parse(stdout);
|
|
23
|
+
} catch {
|
|
24
|
+
report = null;
|
|
25
|
+
}
|
|
26
|
+
if (code !== 0 && !report) {
|
|
27
|
+
emit({ type: "error", message: `ssh-audit failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
28
|
+
process.exitCode = 1;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const recommendations = Array.isArray(report?.recommendations) ? report.recommendations : [];
|
|
32
|
+
emit({
|
|
33
|
+
type: "result",
|
|
34
|
+
summary: `ssh-audit reported ${recommendations.length} recommendations for ${target}.`,
|
|
35
|
+
data: { target, banner: report?.banner ?? "", grade: report?.grade ?? "", recommendations: recommendations.slice(0, 100) },
|
|
36
|
+
});
|
|
37
|
+
emit({ type: "done", summary: `ssh-audit finished: ${recommendations.length} recommendations.` });
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "network",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Audits an SSH server with ssh-audit and reports the recommendations found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "ssh-audit",
|
|
9
|
+
"install_hint": "Install ssh-audit from your distribution packages or with pipx install ssh-audit.",
|
|
10
|
+
"name": "ssh-audit"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "network/ssh-audit",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "ssh-audit",
|
|
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("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,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
|
+
}
|