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,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 rules = String(request.options?.rules ?? "rules.yar");
|
|
11
|
+
const child = spawn("yara", [rules, 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: `YARA 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 matches = [];
|
|
23
|
+
for (const line of plain.split("\n")) {
|
|
24
|
+
const trimmed = line.trim();
|
|
25
|
+
if (!trimmed) continue;
|
|
26
|
+
const parts = trimmed.split(/\s+/);
|
|
27
|
+
if (parts.length < 2) continue;
|
|
28
|
+
matches.push({ rule: parts[0], file: parts.slice(1).join(" ") });
|
|
29
|
+
}
|
|
30
|
+
if (code !== 0 && !matches.length) {
|
|
31
|
+
emit({ type: "error", message: `YARA failed: ${stderr.trim() || `exited with ${code}`}` });
|
|
32
|
+
process.exitCode = 1;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
emit({
|
|
36
|
+
type: "result",
|
|
37
|
+
summary: `YARA found ${matches.length} rule matches in ${target}.`,
|
|
38
|
+
data: { target, rules, matches: matches.slice(0, 100) },
|
|
39
|
+
});
|
|
40
|
+
emit({ type: "done", summary: `YARA finished: ${matches.length} matches.` });
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"category": "forensics",
|
|
3
|
+
"core_api": "^0.1.0",
|
|
4
|
+
"description": "Scans a file with YARA rules and reports the rules that match.",
|
|
5
|
+
"entry": "index.mjs",
|
|
6
|
+
"external_tools": [
|
|
7
|
+
{
|
|
8
|
+
"command": "yara",
|
|
9
|
+
"install_hint": "Install YARA from your distribution packages.",
|
|
10
|
+
"name": "YARA"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"id": "forensics/yara",
|
|
14
|
+
"kind": "wrapper",
|
|
15
|
+
"maintenance": "active",
|
|
16
|
+
"name": "YARA Scan",
|
|
17
|
+
"options": [
|
|
18
|
+
{
|
|
19
|
+
"default": "rules.yar",
|
|
20
|
+
"description": "Path to the YARA rules file.",
|
|
21
|
+
"name": "rules",
|
|
22
|
+
"type": "string"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"risk": "low",
|
|
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.13.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.13.0",
|
|
82
|
+
update_message: (await checkForUpdate("1.13.0")).message,
|
|
83
83
|
categories: CATEGORIES,
|
|
84
84
|
modules: modules.map(({ manifest }) => manifest),
|
|
85
85
|
external_tools: [...tools.values()],
|