cantarella-framework 1.8.0 → 1.9.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 +4 -0
- package/modules/wrapper-amass/index.mjs +42 -0
- package/modules/wrapper-amass/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-dirsearch/index.mjs +40 -0
- package/modules/wrapper-dirsearch/module.json +21 -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-theharvester/index.mjs +42 -0
- package/modules/wrapper-theharvester/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/gui/dist/server.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.0
|
|
4
|
+
|
|
5
|
+
- New modules: WPScan WordPress scans, Amass subdomain enumeration, Hydra credential testing, Binwalk firmware analysis, theHarvester OSINT gathering, Masscan fast port scans, Bandit Python audits, John the Ripper hash cracking, dirsearch path brute forcing, and Checkov infrastructure-as-code scans.
|
|
6
|
+
|
|
3
7
|
## 1.8.0
|
|
4
8
|
|
|
5
9
|
- New modules: Ansible playbook runs, Trivy filesystem scans, Markdown report building, and OWASP Dependency-Check scans.
|
|
@@ -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("amass", ["enum", "-d", 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: `Amass 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}`) && trimmed !== target) continue;
|
|
28
|
+
subdomains.push(trimmed);
|
|
29
|
+
}
|
|
30
|
+
if (code !== 0 && !subdomains.length) {
|
|
31
|
+
emit({ type: "error", message: `Amass failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
32
|
+
process.exitCode = 1;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
emit({
|
|
36
|
+
type: "result",
|
|
37
|
+
summary: `Amass found ${subdomains.length} subdomains for ${target}.`,
|
|
38
|
+
data: { target, subdomains: [...new Set(subdomains)].slice(0, 500) },
|
|
39
|
+
});
|
|
40
|
+
emit({ type: "done", summary: `Amass 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 Amass and reports the subdomains found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "amass",
|
|
9
|
+
"install_hint": "Install Amass from your distribution packages or the OWASP Amass releases.",
|
|
10
|
+
"name": "Amass"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "recon/amass",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Amass",
|
|
17
|
+
"options": [],
|
|
18
|
+
"risk": "low",
|
|
19
|
+
"schema_version": 1,
|
|
20
|
+
"version": "0.1.0"
|
|
21
|
+
}
|
|
@@ -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("bandit", ["-r", target, "-f", "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: `Bandit 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
|
+
if (report && Array.isArray(report.results)) {
|
|
28
|
+
for (const result of report.results) {
|
|
29
|
+
findings.push({
|
|
30
|
+
test_id: result.test_id ?? "",
|
|
31
|
+
test_name: result.test_name ?? "",
|
|
32
|
+
severity: result.issue_severity ?? "UNKNOWN",
|
|
33
|
+
confidence: result.issue_confidence ?? "UNKNOWN",
|
|
34
|
+
file: result.filename ?? "",
|
|
35
|
+
line: result.line_number ?? null,
|
|
36
|
+
issue: result.issue_text ?? "",
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (code !== 0 && !findings.length && !report) {
|
|
41
|
+
emit({ type: "error", message: `Bandit failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
42
|
+
process.exitCode = 1;
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const bySeverity = {};
|
|
46
|
+
for (const finding of findings) {
|
|
47
|
+
bySeverity[finding.severity] = (bySeverity[finding.severity] ?? 0) + 1;
|
|
48
|
+
}
|
|
49
|
+
emit({
|
|
50
|
+
type: "result",
|
|
51
|
+
summary: `Bandit found ${findings.length} issues in ${target}.`,
|
|
52
|
+
data: { target, total: findings.length, by_severity: bySeverity, findings: findings.slice(0, 100) },
|
|
53
|
+
});
|
|
54
|
+
emit({ type: "done", summary: `Bandit finished: ${findings.length} issues.` });
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "code-audit",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Audits Python code with Bandit and reports the security issues found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "bandit",
|
|
9
|
+
"install_hint": "Install Bandit from your distribution packages or with pipx install bandit.",
|
|
10
|
+
"name": "Bandit"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "code-audit/bandit",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Bandit",
|
|
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("binwalk", [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: `Binwalk 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 signatures = [];
|
|
22
|
+
for (const line of plain.split("\n")) {
|
|
23
|
+
const trimmed = line.trim();
|
|
24
|
+
const match = trimmed.match(/^(\d+)\s+0x[0-9A-Fa-f]+\s+(.+)$/);
|
|
25
|
+
if (!match) continue;
|
|
26
|
+
signatures.push({ offset: Number(match[1]), description: match[2].trim() });
|
|
27
|
+
}
|
|
28
|
+
if (code !== 0 && !signatures.length) {
|
|
29
|
+
emit({ type: "error", message: `Binwalk failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
30
|
+
process.exitCode = 1;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
emit({
|
|
34
|
+
type: "result",
|
|
35
|
+
summary: `Binwalk found ${signatures.length} signatures in ${target}.`,
|
|
36
|
+
data: { target, signatures: signatures.slice(0, 200) },
|
|
37
|
+
});
|
|
38
|
+
emit({ type: "done", summary: `Binwalk finished: ${signatures.length} signatures.` });
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "forensics",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Analyzes a binary or firmware file with Binwalk and reports the embedded signatures found.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "binwalk",
|
|
9
|
+
"install_hint": "Install Binwalk from your distribution packages or with pipx install binwalk.",
|
|
10
|
+
"name": "Binwalk"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "forensics/binwalk",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Binwalk",
|
|
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("checkov", ["-d", target, "--framework", "terraform", "--output", "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: `Checkov 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 results = report?.results ?? report ?? {};
|
|
27
|
+
const passed = Array.isArray(results.passed_checks) ? results.passed_checks : [];
|
|
28
|
+
const failedRaw = Array.isArray(results.failed_checks) ? results.failed_checks : [];
|
|
29
|
+
const failed = failedRaw.map((check) => ({
|
|
30
|
+
check_id: check.check_id ?? "",
|
|
31
|
+
check_name: check.check_name ?? "",
|
|
32
|
+
file: check.file_path ?? "",
|
|
33
|
+
resource: check.resource ?? "",
|
|
34
|
+
}));
|
|
35
|
+
if (code !== 0 && !passed.length && !failed.length && !report) {
|
|
36
|
+
emit({ type: "error", message: `Checkov failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
37
|
+
process.exitCode = 1;
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
emit({
|
|
41
|
+
type: "result",
|
|
42
|
+
summary: `Checkov reported ${failed.length} failed and ${passed.length} passed checks in ${target}.`,
|
|
43
|
+
data: { target, passed: passed.length, failed: failed.length, failed_checks: failed.slice(0, 100) },
|
|
44
|
+
});
|
|
45
|
+
emit({ type: "done", summary: `Checkov finished: ${failed.length} failed, ${passed.length} passed.` });
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "cloud",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Scans infrastructure as code with Checkov and reports failed policy checks.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "checkov",
|
|
9
|
+
"install_hint": "Install Checkov from your distribution packages or with pipx install checkov.",
|
|
10
|
+
"name": "Checkov"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "cloud/checkov",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "Checkov",
|
|
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("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,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("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,59 @@
|
|
|
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 args = ["--url", target, "--no-update", "--format", "json"];
|
|
11
|
+
const apiToken = String(request.options?.api_token ?? "").trim();
|
|
12
|
+
if (apiToken) args.push("--api-token", apiToken);
|
|
13
|
+
const child = spawn("wpscan", args, { 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: `WPScan failed: ${error.message}` });
|
|
20
|
+
process.exitCode = 1;
|
|
21
|
+
});
|
|
22
|
+
child.on("close", (code) => {
|
|
23
|
+
let report = null;
|
|
24
|
+
try {
|
|
25
|
+
report = JSON.parse(stdout);
|
|
26
|
+
} catch {
|
|
27
|
+
report = null;
|
|
28
|
+
}
|
|
29
|
+
const vulnerabilities = [];
|
|
30
|
+
const plugins = [];
|
|
31
|
+
if (report) {
|
|
32
|
+
const collect = (component, entry) => {
|
|
33
|
+
if (!entry || !Array.isArray(entry.vulnerabilities)) return;
|
|
34
|
+
for (const vuln of entry.vulnerabilities) {
|
|
35
|
+
vulnerabilities.push({ component, title: vuln.title ?? "", fixed_in: vuln.fixed_in ?? "" });
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
collect("wordpress", report.version);
|
|
39
|
+
collect("theme", report.main_theme);
|
|
40
|
+
if (report.plugins && typeof report.plugins === "object") {
|
|
41
|
+
for (const [slug, entry] of Object.entries(report.plugins)) {
|
|
42
|
+
plugins.push(slug);
|
|
43
|
+
collect(`plugin:${slug}`, entry);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (code !== 0 && !vulnerabilities.length && !report) {
|
|
48
|
+
emit({ type: "error", message: `WPScan failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
49
|
+
process.exitCode = 1;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
emit({
|
|
53
|
+
type: "result",
|
|
54
|
+
summary: `WPScan found ${vulnerabilities.length} vulnerabilities on ${target}.`,
|
|
55
|
+
data: { target, version: report?.version?.number ?? "", plugins, vulnerabilities: vulnerabilities.slice(0, 100) },
|
|
56
|
+
});
|
|
57
|
+
emit({ type: "done", summary: `WPScan finished: ${vulnerabilities.length} vulnerabilities.` });
|
|
58
|
+
});
|
|
59
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "web",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Scans a WordPress site with WPScan and reports vulnerable components.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "wpscan",
|
|
9
|
+
"install_hint": "Install WPScan from your distribution packages or with gem install wpscan.",
|
|
10
|
+
"name": "WPScan"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "web/wpscan",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "WPScan",
|
|
17
|
+
"options": [
|
|
18
|
+
{
|
|
19
|
+
"default": "",
|
|
20
|
+
"description": "WPScan API token for vulnerability data, empty means no token.",
|
|
21
|
+
"name": "api_token",
|
|
22
|
+
"type": "string"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"risk": "medium",
|
|
26
|
+
"schema_version": 1,
|
|
27
|
+
"version": "0.1.0"
|
|
28
|
+
}
|
package/package.json
CHANGED
package/packages/cli/dist/cli.js
CHANGED
|
@@ -11,7 +11,7 @@ process.stdout.on("error", (error) => {
|
|
|
11
11
|
process.exit(0);
|
|
12
12
|
throw error;
|
|
13
13
|
});
|
|
14
|
-
const VERSION = "1.
|
|
14
|
+
const VERSION = "1.9.0";
|
|
15
15
|
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../..");
|
|
16
16
|
function banner() {
|
|
17
17
|
return (process.stdout.columns ?? 80) >= 72 ? BANNER : COMPACT_BANNER;
|
|
@@ -78,8 +78,8 @@ export function createGuiServer(root) {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
sendJson(response, 200, {
|
|
81
|
-
version: "1.
|
|
82
|
-
update_message: (await checkForUpdate("1.
|
|
81
|
+
version: "1.9.0",
|
|
82
|
+
update_message: (await checkForUpdate("1.9.0")).message,
|
|
83
83
|
categories: CATEGORIES,
|
|
84
84
|
modules: modules.map(({ manifest }) => manifest),
|
|
85
85
|
external_tools: [...tools.values()],
|