cantarella-framework 1.11.0 → 1.13.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/api-graphql-checker/index.mjs +44 -0
- package/modules/api-graphql-checker/module.json +14 -0
- package/modules/api-robots-checker/index.mjs +55 -0
- package/modules/api-robots-checker/module.json +14 -0
- package/modules/osint-shodan/index.mjs +43 -0
- package/modules/osint-shodan/module.json +14 -0
- package/modules/recon-crtsh/index.mjs +48 -0
- package/modules/recon-crtsh/module.json +14 -0
- package/modules/reporting-csv-export/index.mjs +51 -0
- package/modules/reporting-csv-export/module.json +14 -0
- package/modules/threat-intel-urlhaus/index.mjs +40 -0
- package/modules/threat-intel-urlhaus/module.json +14 -0
- package/modules/vuln-management-openvas-import/index.mjs +62 -0
- package/modules/vuln-management-openvas-import/module.json +14 -0
- package/modules/wrapper-arp-scan/index.mjs +41 -0
- package/modules/wrapper-arp-scan/module.json +21 -0
- package/modules/wrapper-brakeman/index.mjs +47 -0
- package/modules/wrapper-brakeman/module.json +21 -0
- package/modules/wrapper-cewl/index.mjs +40 -0
- package/modules/wrapper-cewl/module.json +21 -0
- package/modules/wrapper-chkrootkit/index.mjs +40 -0
- package/modules/wrapper-chkrootkit/module.json +21 -0
- package/modules/wrapper-kubectl/index.mjs +47 -0
- package/modules/wrapper-kubectl/module.json +21 -0
- package/modules/wrapper-ldapsearch/index.mjs +43 -0
- package/modules/wrapper-ldapsearch/module.json +21 -0
- package/modules/wrapper-mobsfscan/index.mjs +47 -0
- package/modules/wrapper-mobsfscan/module.json +21 -0
- package/modules/wrapper-osquery/index.mjs +39 -0
- package/modules/wrapper-osquery/module.json +21 -0
- package/modules/wrapper-reaver/index.mjs +39 -0
- package/modules/wrapper-reaver/module.json +28 -0
- package/modules/wrapper-snyk/index.mjs +47 -0
- package/modules/wrapper-snyk/module.json +21 -0
- package/modules/wrapper-terraform/index.mjs +46 -0
- package/modules/wrapper-terraform/module.json +21 -0
- package/modules/wrapper-xsstrike/index.mjs +39 -0
- package/modules/wrapper-xsstrike/module.json +21 -0
- package/modules/wrapper-yara/index.mjs +42 -0
- package/modules/wrapper-yara/module.json +28 -0
- package/package.json +1 -1
- package/packages/cli/dist/cli.js +1 -1
- package/packages/gui/dist/server.js +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "password",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Builds a wordlist from a website with CeWL and reports the words it found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "cewl",
|
|
9
|
+
"install_hint": "Install CeWL from your distribution packages or with gem install cewl.",
|
|
10
|
+
"name": "CeWL"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "password/cewl",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "CeWL",
|
|
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("chkrootkit", ["-q"], { 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: `chkrootkit 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 infected = [];
|
|
22
|
+
for (const line of plain.split("\n")) {
|
|
23
|
+
const trimmed = line.trim();
|
|
24
|
+
if (!trimmed) continue;
|
|
25
|
+
if (/not infected/i.test(trimmed)) continue;
|
|
26
|
+
if (/INFECTED/i.test(trimmed)) infected.push(trimmed);
|
|
27
|
+
}
|
|
28
|
+
if (code !== 0 && !infected.length && !plain.trim()) {
|
|
29
|
+
emit({ type: "error", message: `chkrootkit failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
30
|
+
process.exitCode = 1;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
emit({
|
|
34
|
+
type: "result",
|
|
35
|
+
summary: infected.length ? `chkrootkit found ${infected.length} infected checks.` : "chkrootkit found no infected checks.",
|
|
36
|
+
data: { target, infected: infected.slice(0, 100), clean: infected.length === 0 },
|
|
37
|
+
});
|
|
38
|
+
emit({ type: "done", summary: infected.length ? `chkrootkit finished: ${infected.length} infected checks.` : "chkrootkit finished: clean." });
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "incident-response",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Runs chkrootkit and reports any infected system checks.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "chkrootkit",
|
|
9
|
+
"install_hint": "Install chkrootkit from your distribution packages.",
|
|
10
|
+
"name": "chkrootkit"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "incident-response/chkrootkit",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "chkrootkit",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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("kubectl", ["get", "pods", "--all-namespaces", "-o", "json"], { 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: `kubectl 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
|
+
const items = Array.isArray(report?.items) ? report.items : [];
|
|
27
|
+
if (code !== 0 && !report) {
|
|
28
|
+
emit({ type: "error", message: `kubectl failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
29
|
+
process.exitCode = 1;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const byNamespace = {};
|
|
33
|
+
const byPhase = {};
|
|
34
|
+
for (const item of items) {
|
|
35
|
+
const namespace = item.metadata?.namespace ?? "unknown";
|
|
36
|
+
const phase = item.status?.phase ?? "unknown";
|
|
37
|
+
byNamespace[namespace] = (byNamespace[namespace] ?? 0) + 1;
|
|
38
|
+
byPhase[phase] = (byPhase[phase] ?? 0) + 1;
|
|
39
|
+
}
|
|
40
|
+
emit({
|
|
41
|
+
type: "result",
|
|
42
|
+
summary: `kubectl found ${items.length} pods across ${Object.keys(byNamespace).length} namespaces.`,
|
|
43
|
+
data: { target, pods: items.length, by_namespace: byNamespace, by_phase: byPhase },
|
|
44
|
+
});
|
|
45
|
+
emit({ type: "done", summary: `kubectl finished: ${items.length} pods.` });
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "cloud",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Lists Kubernetes pods across all namespaces with kubectl and reports their status.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "kubectl",
|
|
9
|
+
"install_hint": "Install kubectl from your distribution packages or the Kubernetes releases.",
|
|
10
|
+
"name": "kubectl"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "cloud/kubectl",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "kubectl Pods",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -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 child = spawn("ldapsearch", ["-x", "-H", `ldap://${target}`, "-b", "", "-s", "base", "(objectclass=*)"], { 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: `ldapsearch 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 attributes = [];
|
|
22
|
+
for (const line of plain.split("\n")) {
|
|
23
|
+
const trimmed = line.trim();
|
|
24
|
+
if (!trimmed) continue;
|
|
25
|
+
if (trimmed.startsWith("#")) continue;
|
|
26
|
+
const match = trimmed.match(/^([a-zA-Z][a-zA-Z0-9-]*):\s*(.*)$/);
|
|
27
|
+
if (!match) continue;
|
|
28
|
+
if (match[1] === "search" || match[1] === "result" || match[1] === "dn") continue;
|
|
29
|
+
attributes.push({ key: match[1], value: match[2].trim() });
|
|
30
|
+
}
|
|
31
|
+
if (code !== 0 && !attributes.length) {
|
|
32
|
+
emit({ type: "error", message: `ldapsearch failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
33
|
+
process.exitCode = 1;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
emit({
|
|
37
|
+
type: "result",
|
|
38
|
+
summary: `ldapsearch returned ${attributes.length} rootDSE attributes for ${target}.`,
|
|
39
|
+
data: { target, attributes: attributes.slice(0, 100) },
|
|
40
|
+
});
|
|
41
|
+
emit({ type: "done", summary: `ldapsearch finished: ${attributes.length} attributes.` });
|
|
42
|
+
});
|
|
43
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "internal",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Queries the LDAP rootDSE of a directory server with ldapsearch and reports its attributes.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "ldapsearch",
|
|
9
|
+
"install_hint": "Install ldapsearch from your distribution packages (openldap-clients).",
|
|
10
|
+
"name": "ldapsearch"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "internal/ldapsearch",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "ldapsearch",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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("mobsfscan", ["--json", 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: `MobSFScan 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
|
+
const findings = [];
|
|
27
|
+
const raw = Array.isArray(report?.results) ? report.results : [];
|
|
28
|
+
for (const finding of raw) {
|
|
29
|
+
findings.push({ title: finding.title ?? "", severity: finding.severity ?? "UNKNOWN", file: finding.file ?? "" });
|
|
30
|
+
}
|
|
31
|
+
if (code !== 0 && !findings.length && !report) {
|
|
32
|
+
emit({ type: "error", message: `MobSFScan failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
33
|
+
process.exitCode = 1;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const bySeverity = {};
|
|
37
|
+
for (const finding of findings) {
|
|
38
|
+
bySeverity[finding.severity] = (bySeverity[finding.severity] ?? 0) + 1;
|
|
39
|
+
}
|
|
40
|
+
emit({
|
|
41
|
+
type: "result",
|
|
42
|
+
summary: `MobSFScan found ${findings.length} findings in ${target}.`,
|
|
43
|
+
data: { target, total: findings.length, by_severity: bySeverity, findings: findings.slice(0, 100) },
|
|
44
|
+
});
|
|
45
|
+
emit({ type: "done", summary: `MobSFScan finished: ${findings.length} findings.` });
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "mobile",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Scans mobile app code with MobSFScan and reports the security findings.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "mobsfscan",
|
|
9
|
+
"install_hint": "Install MobSFScan from your distribution packages or with pipx install mobsfscan.",
|
|
10
|
+
"name": "MobSFScan"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "mobile/mobsfscan",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "MobSFScan",
|
|
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("osqueryi", ["--json", 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: `osquery failed: ${error.message}` });
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
});
|
|
19
|
+
child.on("close", (code) => {
|
|
20
|
+
let rows = null;
|
|
21
|
+
try {
|
|
22
|
+
rows = JSON.parse(stdout);
|
|
23
|
+
} catch {
|
|
24
|
+
rows = null;
|
|
25
|
+
}
|
|
26
|
+
if (code !== 0 && !Array.isArray(rows)) {
|
|
27
|
+
emit({ type: "error", message: `osquery failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
28
|
+
process.exitCode = 1;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (!Array.isArray(rows)) rows = [];
|
|
32
|
+
emit({
|
|
33
|
+
type: "result",
|
|
34
|
+
summary: `osquery returned ${rows.length} rows.`,
|
|
35
|
+
data: { query: target, rows: rows.length, results: rows.slice(0, 50) },
|
|
36
|
+
});
|
|
37
|
+
emit({ type: "done", summary: `osquery finished: ${rows.length} rows.` });
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "blue-team",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Runs an osquery SQL query and reports the rows it returns.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "osqueryi",
|
|
9
|
+
"install_hint": "Install osquery from your distribution packages or the osquery releases.",
|
|
10
|
+
"name": "osquery"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "blue-team/osquery",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "osquery",
|
|
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 iface = String(request.options?.interface ?? "wlan0mon");
|
|
11
|
+
const child = spawn("reaver", ["-i", iface, "-b", target, "-vv"], { 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: `Reaver 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 pinMatch = plain.match(/WPS PIN:\s*'(\d+)'/);
|
|
23
|
+
const pskMatch = plain.match(/WPA PSK:\s*'([^']+)'/);
|
|
24
|
+
const ssidMatch = plain.match(/AP SSID:\s*'([^']+)'/);
|
|
25
|
+
const psk = pskMatch ? pskMatch[1] : null;
|
|
26
|
+
const pin = pinMatch ? pinMatch[1] : null;
|
|
27
|
+
if (code !== 0 && !psk && !pin) {
|
|
28
|
+
emit({ type: "error", message: `Reaver failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
29
|
+
process.exitCode = 1;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
emit({
|
|
33
|
+
type: "result",
|
|
34
|
+
summary: psk ? `Reaver recovered the PSK for ${ssidMatch ? ssidMatch[1] : target}.` : `Reaver did not recover the PSK for ${target}.`,
|
|
35
|
+
data: { target, ssid: ssidMatch ? ssidMatch[1] : null, pin, psk, cracked: Boolean(psk) },
|
|
36
|
+
});
|
|
37
|
+
emit({ type: "done", summary: psk ? "Reaver finished: PSK recovered." : "Reaver finished: PSK not recovered." });
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "wireless",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Attacks a WPS-enabled access point with Reaver and reports the recovered PIN and PSK.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "reaver",
|
|
9
|
+
"install_hint": "Install Reaver from your distribution packages.",
|
|
10
|
+
"name": "Reaver"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "wireless/reaver",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Reaver",
|
|
17
|
+
"options": [
|
|
18
|
+
{
|
|
19
|
+
"default": "wlan0mon",
|
|
20
|
+
"description": "Wireless interface in monitor mode.",
|
|
21
|
+
"name": "interface",
|
|
22
|
+
"type": "string"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"risk": "high",
|
|
26
|
+
"schema_version": 1,
|
|
27
|
+
"version": "0.1.0"
|
|
28
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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("snyk", ["test", "--json", 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: `Snyk 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
|
+
const vulnerabilities = [];
|
|
27
|
+
const raw = Array.isArray(report?.vulnerabilities) ? report.vulnerabilities : [];
|
|
28
|
+
for (const vuln of raw) {
|
|
29
|
+
vulnerabilities.push({ id: vuln.id ?? "", title: vuln.title ?? "", severity: vuln.severity ?? "unknown", package: vuln.packageName ?? "" });
|
|
30
|
+
}
|
|
31
|
+
if (code !== 0 && !vulnerabilities.length && !report) {
|
|
32
|
+
emit({ type: "error", message: `Snyk failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
33
|
+
process.exitCode = 1;
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const bySeverity = {};
|
|
37
|
+
for (const vuln of vulnerabilities) {
|
|
38
|
+
bySeverity[vuln.severity] = (bySeverity[vuln.severity] ?? 0) + 1;
|
|
39
|
+
}
|
|
40
|
+
emit({
|
|
41
|
+
type: "result",
|
|
42
|
+
summary: `Snyk found ${vulnerabilities.length} vulnerabilities in ${target}.`,
|
|
43
|
+
data: { target, total: vulnerabilities.length, by_severity: bySeverity, vulnerabilities: vulnerabilities.slice(0, 100) },
|
|
44
|
+
});
|
|
45
|
+
emit({ type: "done", summary: `Snyk finished: ${vulnerabilities.length} vulnerabilities.` });
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "devsecops",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Tests a project for known vulnerable dependencies with Snyk and reports the findings.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "snyk",
|
|
9
|
+
"install_hint": "Install Snyk from your distribution packages or with npm install -g snyk.",
|
|
10
|
+
"name": "Snyk"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "devsecops/snyk",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Snyk Test",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -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 child = spawn("terraform", ["plan", "-no-color", "-input=false"], { cwd: 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: `Terraform 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 add = 0;
|
|
22
|
+
let change = 0;
|
|
23
|
+
let destroy = 0;
|
|
24
|
+
let found = false;
|
|
25
|
+
const planMatch = plain.match(/Plan:\s+(\d+) to add, (\d+) to change, (\d+) to destroy/);
|
|
26
|
+
if (planMatch) {
|
|
27
|
+
add = Number(planMatch[1]);
|
|
28
|
+
change = Number(planMatch[2]);
|
|
29
|
+
destroy = Number(planMatch[3]);
|
|
30
|
+
found = true;
|
|
31
|
+
} else if (/No changes\./.test(plain)) {
|
|
32
|
+
found = true;
|
|
33
|
+
}
|
|
34
|
+
if (code !== 0 && !found) {
|
|
35
|
+
emit({ type: "error", message: `Terraform failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
36
|
+
process.exitCode = 1;
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
emit({
|
|
40
|
+
type: "result",
|
|
41
|
+
summary: `Terraform plan: ${add} to add, ${change} to change, ${destroy} to destroy.`,
|
|
42
|
+
data: { target, add, change, destroy },
|
|
43
|
+
});
|
|
44
|
+
emit({ type: "done", summary: `Terraform plan finished: ${add} to add, ${change} to change, ${destroy} to destroy.` });
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "automation",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Runs terraform plan in a directory and reports the planned changes.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "terraform",
|
|
9
|
+
"install_hint": "Install Terraform from your distribution packages or the HashiCorp releases.",
|
|
10
|
+
"name": "Terraform"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "automation/terraform",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Terraform Plan",
|
|
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("xsstrike", ["-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: `XSStrike 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 findings = [];
|
|
22
|
+
for (const line of plain.split("\n")) {
|
|
23
|
+
const trimmed = line.trim();
|
|
24
|
+
if (!trimmed) continue;
|
|
25
|
+
if (/vulnerable/i.test(trimmed)) findings.push(trimmed);
|
|
26
|
+
}
|
|
27
|
+
if (code !== 0 && !findings.length && !plain.trim()) {
|
|
28
|
+
emit({ type: "error", message: `XSStrike failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
29
|
+
process.exitCode = 1;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
emit({
|
|
33
|
+
type: "result",
|
|
34
|
+
summary: findings.length ? `XSStrike found ${findings.length} vulnerable reflections on ${target}.` : `XSStrike found no XSS on ${target}.`,
|
|
35
|
+
data: { target, vulnerable: findings.length > 0, findings: findings.slice(0, 100) },
|
|
36
|
+
});
|
|
37
|
+
emit({ type: "done", summary: findings.length ? `XSStrike finished: ${findings.length} vulnerable reflections.` : "XSStrike finished: no XSS found." });
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "web",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Scans a URL for cross-site scripting with XSStrike and reports vulnerable reflections.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "xsstrike",
|
|
9
|
+
"install_hint": "Install XSStrike from your distribution packages or with pipx install xsstrike.",
|
|
10
|
+
"name": "XSStrike"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "web/xsstrike",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "XSStrike",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "medium",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|