cantarella-framework 1.17.0 → 1.19.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-burp-import/index.mjs +45 -0
- package/modules/api-burp-import/module.json +14 -0
- package/modules/code-audit-codeql-import/index.mjs +46 -0
- package/modules/code-audit-codeql-import/module.json +14 -0
- package/modules/forensics-autopsy-import/index.mjs +42 -0
- package/modules/forensics-autopsy-import/module.json +14 -0
- package/modules/internal-bloodhound-import/index.mjs +43 -0
- package/modules/internal-bloodhound-import/module.json +14 -0
- package/modules/mobile-mobsf-import/index.mjs +45 -0
- package/modules/mobile-mobsf-import/module.json +14 -0
- package/modules/wrapper-aapt/index.mjs +56 -0
- package/modules/wrapper-aapt/module.json +21 -0
- package/modules/wrapper-bettercap/index.mjs +41 -0
- package/modules/wrapper-bettercap/module.json +21 -0
- package/modules/wrapper-bulk-extractor/index.mjs +60 -0
- package/modules/wrapper-bulk-extractor/module.json +21 -0
- package/modules/wrapper-cloudsploit/index.mjs +61 -0
- package/modules/wrapper-cloudsploit/module.json +21 -0
- package/modules/wrapper-cupp/index.mjs +48 -0
- package/modules/wrapper-cupp/module.json +40 -0
- package/modules/wrapper-eslint/index.mjs +53 -0
- package/modules/wrapper-eslint/module.json +21 -0
- package/modules/wrapper-frida/index.mjs +41 -0
- package/modules/wrapper-frida/module.json +21 -0
- package/modules/wrapper-grype/index.mjs +48 -0
- package/modules/wrapper-grype/module.json +21 -0
- package/modules/wrapper-impacket/index.mjs +41 -0
- package/modules/wrapper-impacket/module.json +34 -0
- package/modules/wrapper-kismet/index.mjs +45 -0
- package/modules/wrapper-kismet/module.json +21 -0
- package/modules/wrapper-kiterunner/index.mjs +41 -0
- package/modules/wrapper-kiterunner/module.json +21 -0
- package/modules/wrapper-kube-hunter/index.mjs +44 -0
- package/modules/wrapper-kube-hunter/module.json +21 -0
- package/modules/wrapper-ldapdomaindump/index.mjs +48 -0
- package/modules/wrapper-ldapdomaindump/module.json +40 -0
- package/modules/wrapper-recon-ng/index.mjs +40 -0
- package/modules/wrapper-recon-ng/module.json +21 -0
- package/modules/wrapper-ripgrep/index.mjs +42 -0
- package/modules/wrapper-ripgrep/module.json +28 -0
- package/modules/wrapper-scoutsuite/index.mjs +61 -0
- package/modules/wrapper-scoutsuite/module.json +21 -0
- package/modules/wrapper-spiderfoot/index.mjs +44 -0
- package/modules/wrapper-spiderfoot/module.json +21 -0
- package/modules/wrapper-syft/index.mjs +43 -0
- package/modules/wrapper-syft/module.json +21 -0
- package/modules/wrapper-testssl/index.mjs +50 -0
- package/modules/wrapper-testssl/module.json +21 -0
- package/modules/wrapper-tfsec/index.mjs +43 -0
- package/modules/wrapper-tfsec/module.json +21 -0
- package/modules/wrapper-trufflehog/index.mjs +49 -0
- package/modules/wrapper-trufflehog/module.json +21 -0
- package/modules/wrapper-tshark/index.mjs +41 -0
- package/modules/wrapper-tshark/module.json +21 -0
- package/modules/wrapper-zap/index.mjs +44 -0
- package/modules/wrapper-zap/module.json +21 -0
- package/package.json +1 -1
- package/packages/cli/dist/cli.js +1 -1
- package/packages/gui/dist/server.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.19.0
|
|
4
|
+
|
|
5
|
+
- New modules: Recon-ng module search, MobSF report import, BloodHound export import, ScoutSuite AWS auditing, CloudSploit cloud checks, kube-hunter Kubernetes hunting, Grype vulnerability scanning, Syft package inventory, tfsec Terraform checks, TruffleHog secret scanning, CodeQL SARIF import, ESLint code linting, ripgrep code search, and Autopsy report import.
|
|
6
|
+
|
|
7
|
+
## 1.18.0
|
|
8
|
+
|
|
9
|
+
- New modules: tshark packet reading, SpiderFoot OSINT scanning, OWASP ZAP quick scanning, testssl.sh TLS auditing, Kiterunner API route discovery, Burp Suite issue import, aapt APK metadata, frida-ps device process listing, Bettercap network probing, Kismet device extraction, CUPP targeted wordlists, Impacket GetNPUsers AS-REP requests, ldapdomaindump domain user dumping, and bulk_extractor email and URL carving.
|
|
10
|
+
|
|
3
11
|
## 1.17.0
|
|
4
12
|
|
|
5
13
|
- New modules: RustScan fast port scanning, fping live host discovery, hping3 TCP probing, dnsx DNS resolution, Katana web crawling, gowitness website screenshots, Maigret username search, Holehe email footprint, Arjun parameter discovery, and ParamSpider parameter mining.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
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
|
+
try {
|
|
10
|
+
const result = build(String(request.target ?? ""));
|
|
11
|
+
emit({ type: "result", summary: result.summary, data: result.data });
|
|
12
|
+
emit({ type: "done", summary: `Burp import finished: ${result.data.issues.length} issues.` });
|
|
13
|
+
} catch (error) {
|
|
14
|
+
emit({ type: "error", message: error.message });
|
|
15
|
+
process.exitCode = 1;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
function field(block, tag) {
|
|
20
|
+
const match = block.match(new RegExp(`<${tag}>([\\s\\S]*?)</${tag}>`));
|
|
21
|
+
return match ? match[1].trim() : "";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function build(target) {
|
|
25
|
+
let raw;
|
|
26
|
+
try {
|
|
27
|
+
raw = readFileSync(target, "utf8");
|
|
28
|
+
} catch {
|
|
29
|
+
throw new Error(`Cannot read Burp export file: ${target}.`);
|
|
30
|
+
}
|
|
31
|
+
const issues = [];
|
|
32
|
+
const blocks = raw.match(/<issue>[\s\S]*?<\/issue>/g) ?? [];
|
|
33
|
+
for (const block of blocks) {
|
|
34
|
+
issues.push({
|
|
35
|
+
name: field(block, "name"),
|
|
36
|
+
severity: field(block, "severity"),
|
|
37
|
+
host: field(block, "host"),
|
|
38
|
+
path: field(block, "path"),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
summary: `Burp import read ${issues.length} issues from ${target}.`,
|
|
43
|
+
data: { source: target, issues: issues.slice(0, 100) },
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "api",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Imports issues from a Burp Suite XML export and reports them.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"id": "api/burp-import",
|
|
7
|
+
"kind": "native",
|
|
8
|
+
"maintenance": "active",
|
|
9
|
+
"name": "Burp Import",
|
|
10
|
+
"options": [],
|
|
11
|
+
"risk": "info",
|
|
12
|
+
"schema_version": 1,
|
|
13
|
+
"version": "0.1.0"
|
|
14
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
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
|
+
try {
|
|
10
|
+
const result = build(String(request.target ?? ""));
|
|
11
|
+
emit({ type: "result", summary: result.summary, data: result.data });
|
|
12
|
+
emit({ type: "done", summary: `CodeQL import finished: ${result.data.issues.length} issues.` });
|
|
13
|
+
} catch (error) {
|
|
14
|
+
emit({ type: "error", message: error.message });
|
|
15
|
+
process.exitCode = 1;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
function build(target) {
|
|
20
|
+
let raw;
|
|
21
|
+
try {
|
|
22
|
+
raw = readFileSync(target, "utf8");
|
|
23
|
+
} catch {
|
|
24
|
+
throw new Error(`Cannot read CodeQL SARIF file: ${target}.`);
|
|
25
|
+
}
|
|
26
|
+
let parsed;
|
|
27
|
+
try {
|
|
28
|
+
parsed = JSON.parse(raw);
|
|
29
|
+
} catch {
|
|
30
|
+
throw new Error(`Invalid CodeQL SARIF file: ${target} is not valid JSON.`);
|
|
31
|
+
}
|
|
32
|
+
const runs = Array.isArray(parsed.runs) ? parsed.runs : [];
|
|
33
|
+
const results = runs.length > 0 && Array.isArray(runs[0].results) ? runs[0].results : [];
|
|
34
|
+
const issues = [];
|
|
35
|
+
for (const entry of results) {
|
|
36
|
+
issues.push({
|
|
37
|
+
rule: entry.ruleId ?? "",
|
|
38
|
+
level: entry.level ?? "",
|
|
39
|
+
message: entry.message?.text ?? "",
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
summary: `CodeQL import read ${issues.length} issues from ${target}.`,
|
|
44
|
+
data: { source: target, issues: issues.slice(0, 100) },
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "code-audit",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Imports findings from a CodeQL SARIF file and reports them.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"id": "code-audit/codeql-import",
|
|
7
|
+
"kind": "native",
|
|
8
|
+
"maintenance": "active",
|
|
9
|
+
"name": "CodeQL Import",
|
|
10
|
+
"options": [],
|
|
11
|
+
"risk": "info",
|
|
12
|
+
"schema_version": 1,
|
|
13
|
+
"version": "0.1.0"
|
|
14
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
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
|
+
try {
|
|
10
|
+
const result = build(String(request.target ?? ""));
|
|
11
|
+
emit({ type: "result", summary: result.summary, data: result.data });
|
|
12
|
+
emit({ type: "done", summary: `Autopsy import finished: ${result.data.sections.length} sections.` });
|
|
13
|
+
} catch (error) {
|
|
14
|
+
emit({ type: "error", message: error.message });
|
|
15
|
+
process.exitCode = 1;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
function build(target) {
|
|
20
|
+
let raw;
|
|
21
|
+
try {
|
|
22
|
+
raw = readFileSync(target, "utf8");
|
|
23
|
+
} catch {
|
|
24
|
+
throw new Error(`Cannot read Autopsy report file: ${target}.`);
|
|
25
|
+
}
|
|
26
|
+
const sections = [];
|
|
27
|
+
const parts = raw.split(/<h2[^>]*>/i);
|
|
28
|
+
for (let index = 1; index < parts.length; index += 1) {
|
|
29
|
+
const part = parts[index];
|
|
30
|
+
const name = part.split("</h2>")[0].replace(/<[^>]+>/g, "").trim();
|
|
31
|
+
const rows = (part.match(/<tr>/gi) ?? []).length;
|
|
32
|
+
if (name) sections.push({ name, artifacts: rows });
|
|
33
|
+
}
|
|
34
|
+
if (!sections.length) {
|
|
35
|
+
throw new Error(`No report sections found in ${target}.`);
|
|
36
|
+
}
|
|
37
|
+
const total = sections.reduce((sum, section) => sum + section.artifacts, 0);
|
|
38
|
+
return {
|
|
39
|
+
summary: `Autopsy import read ${total} artifacts across ${sections.length} sections from ${target}.`,
|
|
40
|
+
data: { source: target, total, sections },
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "forensics",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Imports artifact counts from an Autopsy HTML report and reports them by section.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"id": "forensics/autopsy-import",
|
|
7
|
+
"kind": "native",
|
|
8
|
+
"maintenance": "active",
|
|
9
|
+
"name": "Autopsy Import",
|
|
10
|
+
"options": [],
|
|
11
|
+
"risk": "info",
|
|
12
|
+
"schema_version": 1,
|
|
13
|
+
"version": "0.1.0"
|
|
14
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
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
|
+
try {
|
|
10
|
+
const result = build(String(request.target ?? ""));
|
|
11
|
+
emit({ type: "result", summary: result.summary, data: result.data });
|
|
12
|
+
emit({ type: "done", summary: `BloodHound import finished: ${result.data.total} ${result.data.type}.` });
|
|
13
|
+
} catch (error) {
|
|
14
|
+
emit({ type: "error", message: error.message });
|
|
15
|
+
process.exitCode = 1;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
function build(target) {
|
|
20
|
+
let raw;
|
|
21
|
+
try {
|
|
22
|
+
raw = readFileSync(target, "utf8");
|
|
23
|
+
} catch {
|
|
24
|
+
throw new Error(`Cannot read BloodHound export file: ${target}.`);
|
|
25
|
+
}
|
|
26
|
+
let parsed;
|
|
27
|
+
try {
|
|
28
|
+
parsed = JSON.parse(raw);
|
|
29
|
+
} catch {
|
|
30
|
+
throw new Error(`Invalid BloodHound export file: ${target} is not valid JSON.`);
|
|
31
|
+
}
|
|
32
|
+
const data = Array.isArray(parsed.data) ? parsed.data : [];
|
|
33
|
+
const type = parsed.meta?.type ?? "objects";
|
|
34
|
+
const names = [];
|
|
35
|
+
for (const entry of data) {
|
|
36
|
+
const name = entry.properties?.name ?? entry.name ?? "";
|
|
37
|
+
if (name) names.push(name);
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
summary: `BloodHound import read ${data.length} ${type} from ${target}.`,
|
|
41
|
+
data: { source: target, type, total: data.length, names: names.slice(0, 100) },
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "internal",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Imports objects from a BloodHound JSON export and reports what it contains.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"id": "internal/bloodhound-import",
|
|
7
|
+
"kind": "native",
|
|
8
|
+
"maintenance": "active",
|
|
9
|
+
"name": "BloodHound Import",
|
|
10
|
+
"options": [],
|
|
11
|
+
"risk": "info",
|
|
12
|
+
"schema_version": 1,
|
|
13
|
+
"version": "0.1.0"
|
|
14
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
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
|
+
try {
|
|
10
|
+
const result = build(String(request.target ?? ""));
|
|
11
|
+
emit({ type: "result", summary: result.summary, data: result.data });
|
|
12
|
+
emit({ type: "done", summary: `MobSF import finished: ${result.data.findings} findings.` });
|
|
13
|
+
} catch (error) {
|
|
14
|
+
emit({ type: "error", message: error.message });
|
|
15
|
+
process.exitCode = 1;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
function build(target) {
|
|
20
|
+
let raw;
|
|
21
|
+
try {
|
|
22
|
+
raw = readFileSync(target, "utf8");
|
|
23
|
+
} catch {
|
|
24
|
+
throw new Error(`Cannot read MobSF report file: ${target}.`);
|
|
25
|
+
}
|
|
26
|
+
let parsed;
|
|
27
|
+
try {
|
|
28
|
+
parsed = JSON.parse(raw);
|
|
29
|
+
} catch {
|
|
30
|
+
throw new Error(`Invalid MobSF report file: ${target} is not valid JSON.`);
|
|
31
|
+
}
|
|
32
|
+
const findings = parsed.findings ?? parsed.results ?? {};
|
|
33
|
+
const count = Array.isArray(findings) ? findings.length : Object.keys(findings).length;
|
|
34
|
+
return {
|
|
35
|
+
summary: `MobSF import read ${parsed.app_name ?? target}: ${count} findings, average CVSS ${parsed.average_cvss ?? "unknown"}.`,
|
|
36
|
+
data: {
|
|
37
|
+
source: target,
|
|
38
|
+
app_name: parsed.app_name ?? "",
|
|
39
|
+
package_name: parsed.package_name ?? "",
|
|
40
|
+
average_cvss: parsed.average_cvss ?? null,
|
|
41
|
+
security_score: parsed.security_score ?? null,
|
|
42
|
+
findings: count,
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "mobile",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Imports findings from a MobSF JSON report and reports the app score and findings.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"id": "mobile/mobsf-import",
|
|
7
|
+
"kind": "native",
|
|
8
|
+
"maintenance": "active",
|
|
9
|
+
"name": "MobSF Import",
|
|
10
|
+
"options": [],
|
|
11
|
+
"risk": "info",
|
|
12
|
+
"schema_version": 1,
|
|
13
|
+
"version": "0.1.0"
|
|
14
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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("aapt", ["dump", "badging", 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: `aapt 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 packageName = "";
|
|
22
|
+
let versionCode = "";
|
|
23
|
+
let versionName = "";
|
|
24
|
+
let label = "";
|
|
25
|
+
const permissions = [];
|
|
26
|
+
for (const line of plain.split("\n")) {
|
|
27
|
+
const trimmed = line.trim();
|
|
28
|
+
if (!trimmed) continue;
|
|
29
|
+
const pkgMatch = trimmed.match(/^package:\s+name='([^']+)'\s+versionCode='([^']+)'\s+versionName='([^']+)'/);
|
|
30
|
+
if (pkgMatch) {
|
|
31
|
+
packageName = pkgMatch[1];
|
|
32
|
+
versionCode = pkgMatch[2];
|
|
33
|
+
versionName = pkgMatch[3];
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
const labelMatch = trimmed.match(/^application-label:'([^']+)'/);
|
|
37
|
+
if (labelMatch) {
|
|
38
|
+
label = labelMatch[1];
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const permMatch = trimmed.match(/^uses-permission:\s+name='([^']+)'/);
|
|
42
|
+
if (permMatch) permissions.push(permMatch[1]);
|
|
43
|
+
}
|
|
44
|
+
if (code !== 0 && !packageName && !plain.trim()) {
|
|
45
|
+
emit({ type: "error", message: `aapt failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
46
|
+
process.exitCode = 1;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
emit({
|
|
50
|
+
type: "result",
|
|
51
|
+
summary: `aapt read ${packageName || target} with ${permissions.length} permissions.`,
|
|
52
|
+
data: { target, package: packageName, version_code: versionCode, version_name: versionName, label, permissions },
|
|
53
|
+
});
|
|
54
|
+
emit({ type: "done", summary: `aapt finished: ${packageName || target}.` });
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "mobile",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Reads APK metadata with aapt and reports the package, version, and permissions.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "aapt",
|
|
9
|
+
"install_hint": "Install aapt from your distribution packages (Android SDK build-tools).",
|
|
10
|
+
"name": "aapt"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "mobile/aapt",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "aapt",
|
|
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 child = spawn("bettercap", ["-eval", "net.probe on; sleep 2; net.show; 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: `Bettercap 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 hosts = [];
|
|
22
|
+
for (const line of plain.split("\n")) {
|
|
23
|
+
const trimmed = line.trim();
|
|
24
|
+
if (!trimmed) continue;
|
|
25
|
+
const match = trimmed.match(/(\d{1,3}(\.\d{1,3}){3})\s+([0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5})/);
|
|
26
|
+
if (!match) continue;
|
|
27
|
+
hosts.push({ ip: match[1], mac: match[3] });
|
|
28
|
+
}
|
|
29
|
+
if (code !== 0 && !hosts.length && !plain.trim()) {
|
|
30
|
+
emit({ type: "error", message: `Bettercap failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
31
|
+
process.exitCode = 1;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
emit({
|
|
35
|
+
type: "result",
|
|
36
|
+
summary: `Bettercap found ${hosts.length} hosts on the network.`,
|
|
37
|
+
data: { target, hosts: hosts.slice(0, 100) },
|
|
38
|
+
});
|
|
39
|
+
emit({ type: "done", summary: `Bettercap finished: ${hosts.length} hosts.` });
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "wireless",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Probes the local network with Bettercap and reports the hosts it found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "bettercap",
|
|
9
|
+
"install_hint": "Install Bettercap from your distribution packages or the Bettercap releases.",
|
|
10
|
+
"name": "Bettercap"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "wireless/bettercap",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Bettercap",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "medium",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { mkdtemp, readFile } 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", async () => {
|
|
10
|
+
const request = JSON.parse(input || "{}");
|
|
11
|
+
const emit = (event) => process.stdout.write(`${JSON.stringify(event)}\n`);
|
|
12
|
+
const target = String(request.target ?? "");
|
|
13
|
+
const dir = await mkdtemp(join(tmpdir(), "cantarella-bulkextractor-"));
|
|
14
|
+
const child = spawn("bulk_extractor", ["-o", dir, target], { stdio: ["ignore", "pipe", "pipe"] });
|
|
15
|
+
let stdout = "";
|
|
16
|
+
let stderr = "";
|
|
17
|
+
child.stdout.on("data", (chunk) => (stdout += chunk));
|
|
18
|
+
child.stderr.on("data", (chunk) => (stderr += chunk));
|
|
19
|
+
child.on("error", (error) => {
|
|
20
|
+
emit({ type: "error", message: `bulk_extractor failed: ${error.message}` });
|
|
21
|
+
process.exitCode = 1;
|
|
22
|
+
});
|
|
23
|
+
child.on("close", async (code) => {
|
|
24
|
+
const emails = [];
|
|
25
|
+
const urls = [];
|
|
26
|
+
try {
|
|
27
|
+
const emailRaw = await readFile(join(dir, "email.txt"), "utf8");
|
|
28
|
+
for (const line of emailRaw.split("\n")) {
|
|
29
|
+
const trimmed = line.trim();
|
|
30
|
+
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
31
|
+
const match = trimmed.match(/(\S+@\S+)/);
|
|
32
|
+
if (match) emails.push(match[1]);
|
|
33
|
+
}
|
|
34
|
+
} catch {
|
|
35
|
+
// no email.txt, fine
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
const urlRaw = await readFile(join(dir, "url.txt"), "utf8");
|
|
39
|
+
for (const line of urlRaw.split("\n")) {
|
|
40
|
+
const trimmed = line.trim();
|
|
41
|
+
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
42
|
+
const match = trimmed.match(/(https?:\/\/\S+)/);
|
|
43
|
+
if (match) urls.push(match[1]);
|
|
44
|
+
}
|
|
45
|
+
} catch {
|
|
46
|
+
// no url.txt, fine
|
|
47
|
+
}
|
|
48
|
+
if (code !== 0 && !emails.length && !urls.length) {
|
|
49
|
+
emit({ type: "error", message: `bulk_extractor failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
50
|
+
process.exitCode = 1;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
emit({
|
|
54
|
+
type: "result",
|
|
55
|
+
summary: `bulk_extractor found ${emails.length} emails and ${urls.length} URLs in ${target}.`,
|
|
56
|
+
data: { target, emails: emails.slice(0, 100), urls: urls.slice(0, 100) },
|
|
57
|
+
});
|
|
58
|
+
emit({ type: "done", summary: `bulk_extractor finished: ${emails.length} emails, ${urls.length} URLs.` });
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "forensics",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Carves emails and URLs from a disk image with bulk_extractor and reports what it found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "bulk_extractor",
|
|
9
|
+
"install_hint": "Install bulk_extractor from your distribution packages.",
|
|
10
|
+
"name": "bulk_extractor"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "forensics/bulk-extractor",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "bulk_extractor",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
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("cloudsploit", ["scan", "--config", target, "--console", "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: `CloudSploit 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 results = [];
|
|
22
|
+
const whole = plain.trim();
|
|
23
|
+
if (whole.startsWith("[")) {
|
|
24
|
+
try {
|
|
25
|
+
const parsed = JSON.parse(whole);
|
|
26
|
+
if (Array.isArray(parsed)) results.push(...parsed);
|
|
27
|
+
} catch {
|
|
28
|
+
// fall through to line parsing
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (!results.length) {
|
|
32
|
+
for (const line of plain.split("\n")) {
|
|
33
|
+
const trimmed = line.trim();
|
|
34
|
+
if (!trimmed) continue;
|
|
35
|
+
try {
|
|
36
|
+
const parsed = JSON.parse(trimmed);
|
|
37
|
+
if (parsed.plugin) results.push(parsed);
|
|
38
|
+
} catch {
|
|
39
|
+
// not a JSON line, skip
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (code !== 0 && !results.length && !plain.trim()) {
|
|
44
|
+
emit({ type: "error", message: `CloudSploit failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
45
|
+
process.exitCode = 1;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const failures = results.filter((entry) => String(entry.result ?? "").toUpperCase() === "FAIL");
|
|
49
|
+
emit({
|
|
50
|
+
type: "result",
|
|
51
|
+
summary: `CloudSploit ran ${results.length} checks, ${failures.length} failed.`,
|
|
52
|
+
data: {
|
|
53
|
+
target,
|
|
54
|
+
total: results.length,
|
|
55
|
+
failures: failures.length,
|
|
56
|
+
results: results.slice(0, 100).map((entry) => ({ plugin: entry.plugin ?? "", resource: entry.resource ?? "", region: entry.region ?? "", result: entry.result ?? "" })),
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
emit({ type: "done", summary: `CloudSploit finished: ${failures.length} failures.` });
|
|
60
|
+
});
|
|
61
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "cloud",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Scans cloud configuration with CloudSploit and reports the failed checks.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "cloudsploit",
|
|
9
|
+
"install_hint": "Install CloudSploit from your distribution packages or the CloudSploit repository.",
|
|
10
|
+
"name": "CloudSploit"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "cloud/cloudsploit",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "CloudSploit",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|