@remnux/mcp-server 0.1.53 → 0.1.55

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.
Files changed (72) hide show
  1. package/README.md +7 -1
  2. package/dist/analysis/behavior-prerequisites.d.ts +65 -0
  3. package/dist/analysis/behavior-prerequisites.d.ts.map +1 -0
  4. package/dist/analysis/behavior-prerequisites.js +186 -0
  5. package/dist/analysis/behavior-prerequisites.js.map +1 -0
  6. package/dist/analysis/file-diff.d.ts +59 -0
  7. package/dist/analysis/file-diff.d.ts.map +1 -0
  8. package/dist/analysis/file-diff.js +55 -0
  9. package/dist/analysis/file-diff.js.map +1 -0
  10. package/dist/analysis/index.d.ts +1 -1
  11. package/dist/analysis/index.d.ts.map +1 -1
  12. package/dist/analysis/index.js +1 -1
  13. package/dist/analysis/index.js.map +1 -1
  14. package/dist/analysis/string-usage.d.ts +77 -0
  15. package/dist/analysis/string-usage.d.ts.map +1 -0
  16. package/dist/analysis/string-usage.js +130 -0
  17. package/dist/analysis/string-usage.js.map +1 -0
  18. package/dist/analysis/summarizer.d.ts +22 -0
  19. package/dist/analysis/summarizer.d.ts.map +1 -1
  20. package/dist/analysis/summarizer.js +41 -0
  21. package/dist/analysis/summarizer.js.map +1 -1
  22. package/dist/connectors/local.d.ts.map +1 -1
  23. package/dist/connectors/local.js +14 -1
  24. package/dist/connectors/local.js.map +1 -1
  25. package/dist/connectors/ssh.d.ts +1 -0
  26. package/dist/connectors/ssh.d.ts.map +1 -1
  27. package/dist/connectors/ssh.js +14 -6
  28. package/dist/connectors/ssh.js.map +1 -1
  29. package/dist/handlers/analyze-file.d.ts.map +1 -1
  30. package/dist/handlers/analyze-file.js +14 -2
  31. package/dist/handlers/analyze-file.js.map +1 -1
  32. package/dist/handlers/check-behavior-prerequisites.d.ts +16 -0
  33. package/dist/handlers/check-behavior-prerequisites.d.ts.map +1 -0
  34. package/dist/handlers/check-behavior-prerequisites.js +132 -0
  35. package/dist/handlers/check-behavior-prerequisites.js.map +1 -0
  36. package/dist/handlers/compare-files.d.ts +10 -0
  37. package/dist/handlers/compare-files.d.ts.map +1 -0
  38. package/dist/handlers/compare-files.js +147 -0
  39. package/dist/handlers/compare-files.js.map +1 -0
  40. package/dist/handlers/report.d.ts.map +1 -1
  41. package/dist/handlers/report.js +11 -0
  42. package/dist/handlers/report.js.map +1 -1
  43. package/dist/handlers/verify-string-usage.d.ts +10 -0
  44. package/dist/handlers/verify-string-usage.d.ts.map +1 -0
  45. package/dist/handlers/verify-string-usage.js +166 -0
  46. package/dist/handlers/verify-string-usage.js.map +1 -0
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +47 -8
  49. package/dist/index.js.map +1 -1
  50. package/dist/parsers/capa.d.ts +8 -1
  51. package/dist/parsers/capa.d.ts.map +1 -1
  52. package/dist/parsers/capa.js +138 -0
  53. package/dist/parsers/capa.js.map +1 -1
  54. package/dist/parsers/imports.d.ts +36 -0
  55. package/dist/parsers/imports.d.ts.map +1 -0
  56. package/dist/parsers/imports.js +67 -0
  57. package/dist/parsers/imports.js.map +1 -0
  58. package/dist/parsers/r2.d.ts +73 -0
  59. package/dist/parsers/r2.d.ts.map +1 -0
  60. package/dist/parsers/r2.js +161 -0
  61. package/dist/parsers/r2.js.map +1 -0
  62. package/dist/parsers/types.d.ts +19 -0
  63. package/dist/parsers/types.d.ts.map +1 -1
  64. package/dist/report/triage-discipline.d.ts +28 -0
  65. package/dist/report/triage-discipline.d.ts.map +1 -0
  66. package/dist/report/triage-discipline.js +49 -0
  67. package/dist/report/triage-discipline.js.map +1 -0
  68. package/dist/schemas/tools.d.ts +45 -3
  69. package/dist/schemas/tools.d.ts.map +1 -1
  70. package/dist/schemas/tools.js +22 -2
  71. package/dist/schemas/tools.js.map +1 -1
  72. package/package.json +1 -1
@@ -0,0 +1,161 @@
1
+ /**
2
+ * Pure parsers for radare2 JSON output (izj/izzj strings, iSj sections, aflj
3
+ * functions, axtj cross-references) plus the marker-split for the batched
4
+ * "Pass 2" command used by verify_string_usage.
5
+ *
6
+ * Every parser is defensive and NEVER throws — malformed/partial r2 output
7
+ * returns an empty result so the classifier can degrade to `unknown` rather
8
+ * than mistaking a parse failure for a real "no xref" answer. Field shapes were
9
+ * captured from radare2 6.1.6; alternative key names seen across versions are
10
+ * tolerated (e.g. function address as `addr` or `offset`).
11
+ */
12
+ /** Self-generated markers (emitted via `?e`) that delimit the Pass-2 sections. */
13
+ export const R2_MARKERS = {
14
+ sections: "__R2MCP_SEC__",
15
+ functions: "__R2MCP_FNS__",
16
+ xref: "__R2MCP_XR__",
17
+ };
18
+ /** The connector caps stdout at 10MB and appends this sentinel when it does. */
19
+ const TRUNCATION_SENTINEL = "[OUTPUT TRUNCATED";
20
+ function asArray(json) {
21
+ try {
22
+ const data = JSON.parse(json);
23
+ return Array.isArray(data) ? data : [];
24
+ }
25
+ catch {
26
+ return [];
27
+ }
28
+ }
29
+ function num(v) {
30
+ return typeof v === "number" && Number.isFinite(v) ? v : undefined;
31
+ }
32
+ /** Parse `izj` / `izzj` string output. */
33
+ export function parseR2Strings(json) {
34
+ const out = [];
35
+ for (const e of asArray(json)) {
36
+ if (!e || typeof e !== "object")
37
+ continue;
38
+ const r = e;
39
+ const value = r.string;
40
+ const vaddr = num(r.vaddr);
41
+ if (typeof value === "string" && vaddr !== undefined) {
42
+ out.push({ value, vaddr, section: typeof r.section === "string" ? r.section : "" });
43
+ }
44
+ }
45
+ return out;
46
+ }
47
+ /** Parse `iSj` section output into ranges with an exec flag. */
48
+ export function parseR2Sections(json) {
49
+ const out = [];
50
+ for (const e of asArray(json)) {
51
+ if (!e || typeof e !== "object")
52
+ continue;
53
+ const r = e;
54
+ const vaddr = num(r.vaddr);
55
+ const vsize = num(r.vsize) ?? 0;
56
+ if (vaddr === undefined)
57
+ continue;
58
+ const perm = typeof r.perm === "string" ? r.perm : "";
59
+ out.push({
60
+ name: typeof r.name === "string" ? r.name : "",
61
+ vaddr,
62
+ vaddrEnd: vaddr + vsize,
63
+ exec: perm.includes("x"),
64
+ });
65
+ }
66
+ return out;
67
+ }
68
+ /** Parse `aflj` function list (address key is `addr` or `offset` across versions). */
69
+ export function parseR2Functions(json) {
70
+ const out = [];
71
+ for (const e of asArray(json)) {
72
+ if (!e || typeof e !== "object")
73
+ continue;
74
+ const r = e;
75
+ const addr = num(r.addr) ?? num(r.offset);
76
+ if (addr === undefined)
77
+ continue;
78
+ out.push({ addr, name: typeof r.name === "string" ? r.name : "", size: num(r.size) ?? 0 });
79
+ }
80
+ return out;
81
+ }
82
+ /** Parse `axtj` cross-reference output for one address. */
83
+ export function parseR2Xrefs(json) {
84
+ const out = [];
85
+ for (const e of asArray(json)) {
86
+ if (!e || typeof e !== "object")
87
+ continue;
88
+ const r = e;
89
+ const from = num(r.from);
90
+ if (from === undefined)
91
+ continue;
92
+ out.push({
93
+ from,
94
+ type: typeof r.type === "string" ? r.type : "",
95
+ fcnAddr: num(r.fcn_addr),
96
+ fcnName: typeof r.fcn_name === "string" ? r.fcn_name : undefined,
97
+ opcode: typeof r.opcode === "string" ? r.opcode : undefined,
98
+ });
99
+ }
100
+ return out;
101
+ }
102
+ /** Extract the radare2 version string from `?V` output (first matching line). */
103
+ export function parseR2Version(text) {
104
+ const m = text.match(/radare2\s+(\S+)/i);
105
+ return m ? m[1] : undefined;
106
+ }
107
+ /**
108
+ * Split the batched Pass-2 stdout on the self-generated markers. The preamble
109
+ * (before the sections marker) carries the `?V` version line; sections sit
110
+ * between the sections and functions markers; functions between the functions
111
+ * marker and the first xref marker; each `__R2MCP_XR__ <addr>` block holds that
112
+ * address's axtj JSON up to the next marker or EOF.
113
+ */
114
+ export function splitMarkedR2Output(stdout) {
115
+ const result = {
116
+ truncated: stdout.includes(TRUNCATION_SENTINEL),
117
+ sectionsJson: "",
118
+ functionsJson: "",
119
+ xrefsByVaddr: new Map(),
120
+ };
121
+ const lines = stdout.split("\n");
122
+ let bucket = { kind: "pre" };
123
+ let buf = [];
124
+ const flush = () => {
125
+ const text = buf.join("\n").trim();
126
+ if (bucket.kind === "pre") {
127
+ result.version = parseR2Version(text);
128
+ }
129
+ else if (bucket.kind === "sec") {
130
+ result.sectionsJson = text;
131
+ }
132
+ else if (bucket.kind === "fns") {
133
+ result.functionsJson = text;
134
+ }
135
+ else if (bucket.kind === "xref" && bucket.key) {
136
+ result.xrefsByVaddr.set(bucket.key, text);
137
+ }
138
+ buf = [];
139
+ };
140
+ for (const line of lines) {
141
+ const trimmed = line.trim();
142
+ if (trimmed === R2_MARKERS.sections) {
143
+ flush();
144
+ bucket = { kind: "sec" };
145
+ }
146
+ else if (trimmed === R2_MARKERS.functions) {
147
+ flush();
148
+ bucket = { kind: "fns" };
149
+ }
150
+ else if (trimmed.startsWith(R2_MARKERS.xref + " ")) {
151
+ flush();
152
+ bucket = { kind: "xref", key: trimmed.slice(R2_MARKERS.xref.length + 1).trim() };
153
+ }
154
+ else {
155
+ buf.push(line);
156
+ }
157
+ }
158
+ flush();
159
+ return result;
160
+ }
161
+ //# sourceMappingURL=r2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"r2.js","sourceRoot":"","sources":["../../src/parsers/r2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,kFAAkF;AAClF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,QAAQ,EAAE,eAAe;IACzB,SAAS,EAAE,eAAe;IAC1B,IAAI,EAAE,cAAc;CACZ,CAAC;AAEX,gFAAgF;AAChF,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAkChD,SAAS,OAAO,CAAC,IAAY;IAC3B,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9B,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC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AAO,KAAK,UAAU,CAAC,SAAS,EAAE,CAAC;YAC5C,KAAK,EAAE,CAAC;YACR,MAAM,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC3B,CAAC;aAAM,IAAI,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YACrD,KAAK,EAAE,CAAC;YACR,MAAM,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QACnF,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IACD,KAAK,EAAE,CAAC;IACR,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -11,7 +11,26 @@ export interface Finding {
11
11
  category?: string;
12
12
  /** Raw evidence from tool output */
13
13
  evidence?: string;
14
+ /**
15
+ * For capability findings (e.g. capa): the kind(s) of evidence the match
16
+ * actually relied on, derived from the feature nodes that matched. An
17
+ * unordered, deduplicated set describing HOW the rule matched — not a verdict
18
+ * on what the sample does. Absent when it cannot be determined (treat absence
19
+ * as "unknown", not "none").
20
+ * - artifact — matched on strings/regex/bytes (data present, not necessarily executed)
21
+ * - behavior — matched on API calls, mnemonics, or other code semantics
22
+ * - structural — matched on sections, file characteristics, format/arch
23
+ * - linking — matched on imports / runtime-linking
24
+ */
25
+ evidence_types?: EvidenceType[];
14
26
  }
27
+ /**
28
+ * The kind of evidence a capability match relied on (see Finding.evidence_types).
29
+ * A `string` artifact match proves the data is present; it does NOT prove the
30
+ * binary executes the corresponding behavior. Only a `behavior` match (API
31
+ * calls, mnemonics) is code-level evidence.
32
+ */
33
+ export type EvidenceType = "artifact" | "behavior" | "structural" | "linking";
15
34
  /** Structured metadata extracted from tool output. */
16
35
  export interface ParsedToolOutput {
17
36
  /** Tool that produced this output */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/parsers/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,mDAAmD;AACnD,MAAM,WAAW,OAAO;IACtB,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAC3D,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,sDAAsD;AACtD,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,MAAM,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,oEAAoE;AACpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,gBAAgB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/parsers/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,mDAAmD;AACnD,MAAM,WAAW,OAAO;IACtB,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IACpB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAC3D,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,YAAY,EAAE,CAAC;CACjC;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;AAE9E,sDAAsD;AACtD,MAAM,WAAW,gBAAgB;IAC/B,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,mEAAmE;IACnE,MAAM,EAAE,OAAO,CAAC;IAChB,kCAAkC;IAClC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,yCAAyC;IACzC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,oEAAoE;AACpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,KAAK,gBAAgB,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Pre-claim triage discipline checklist — server-authored, bundled, offline.
3
+ *
4
+ * This is operational guidance on USING the analysis tools and reasoning about
5
+ * evidence (the gates to pass before asserting a behavioral claim). It is
6
+ * deliberately distinct from the report-WRITING guidelines in
7
+ * content.generated.ts, which are synced from zeltser.com; this content is the
8
+ * same category as the server's other locally-authored guidance (the
9
+ * analyze_file analysis_guidance, the advisories, the suggest_tools hints) and
10
+ * is therefore authored and versioned here.
11
+ *
12
+ * Upgrade path: if this should later be published and reused on zeltser.com, it
13
+ * can graduate to the synced report-guidance pipeline without changing the
14
+ * `triage_checklist` topic's interface. Until then it is bundled and offline —
15
+ * no live network fetch (the server's works-offline guarantee is load-bearing
16
+ * for air-gapped REMnux deployments).
17
+ */
18
+ export declare const TRIAGE_DISCIPLINE: {
19
+ readonly version: "1.0.0";
20
+ readonly title: "Malware triage discipline — gates to pass before making a claim";
21
+ readonly provenance: "Server-authored operational guidance, bundled and offline (not synced from zeltser.com).";
22
+ readonly core_principle: string;
23
+ readonly before_claiming_a_behavior: readonly ["Are the required APIs imported, or resolvable at runtime (GetProcAddress + LoadLibrary*)? If neither, the behavior is not statically supported.", "If the required APIs are absent but the binary is packed / encrypted / high-entropy, the honest answer is 'indeterminate — unpack first', not 'incapable'. Static absence on an obscured binary proves nothing.", "Are the relevant data artifacts (strings, wallet addresses, regexes) cross-referenced from executable code? Data sitting in .rdata with no code xref is an artifact, not an operational indicator.", "Is the relevant code reachable from the entry point, or only from unused / initializer-only code?", "Did dynamic analysis (emulation, sandbox) actually exercise the suspected path? Static analysis alone cannot confirm a runtime behavior.", "Distinguish 'the code to do X is present' (a capability) from 'the sample does X' (a confirmed behavior). Until confirmed, write 'capable of' or 'consistent with', not 'performs'."];
24
+ readonly for_each_ioc: readonly ["Operationally used (referenced by reachable code, or observed in traffic) vs. vestigial (present in the file but unreferenced)?", "Pyramid-of-Pain tier — trivially changed by the adversary (hash, IP) or costly (tooling, TTP)?", "Pivotable to other samples / campaigns, or unique to this sample?"];
25
+ readonly for_confidence: readonly ["Direct evidence vs. inferential leap — how many assumptions sit between the observation and the claim?", "Single-source vs. corroborated across independent tools or methods.", "Use ICD-203 estimative language; state attribution confidence separately from detection confidence."];
26
+ readonly using_this_server: readonly ["capa findings carry evidence_types (artifact / behavior / structural / linking), and analyze_file returns a capability_evidence field separating behavior_capable from artifact_only — read those before asserting a behavior.", "A YARA family match is resemblance, not identity. A family name in the filename is a lead to test, never a finding.", "When you need behavioral confirmation, plan for emulation (speakeasy) or sandbox detonation rather than inferring it from static artifacts."];
27
+ };
28
+ //# sourceMappingURL=triage-discipline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triage-discipline.d.ts","sourceRoot":"","sources":["../../src/report/triage-discipline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;CA+BpB,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Pre-claim triage discipline checklist — server-authored, bundled, offline.
3
+ *
4
+ * This is operational guidance on USING the analysis tools and reasoning about
5
+ * evidence (the gates to pass before asserting a behavioral claim). It is
6
+ * deliberately distinct from the report-WRITING guidelines in
7
+ * content.generated.ts, which are synced from zeltser.com; this content is the
8
+ * same category as the server's other locally-authored guidance (the
9
+ * analyze_file analysis_guidance, the advisories, the suggest_tools hints) and
10
+ * is therefore authored and versioned here.
11
+ *
12
+ * Upgrade path: if this should later be published and reused on zeltser.com, it
13
+ * can graduate to the synced report-guidance pipeline without changing the
14
+ * `triage_checklist` topic's interface. Until then it is bundled and offline —
15
+ * no live network fetch (the server's works-offline guarantee is load-bearing
16
+ * for air-gapped REMnux deployments).
17
+ */
18
+ export const TRIAGE_DISCIPLINE = {
19
+ version: "1.0.0",
20
+ title: "Malware triage discipline — gates to pass before making a claim",
21
+ provenance: "Server-authored operational guidance, bundled and offline (not synced from zeltser.com).",
22
+ core_principle: "Separate ARTIFACT-level evidence (a string, regex, constant, or capa pattern is PRESENT in the file) from " +
23
+ "BEHAVIORAL evidence (reachable code actually performs the action). The presence of an artifact is not proof " +
24
+ "the behavior executes. Most over-confident triage errors come from restating an artifact as a behavior.",
25
+ before_claiming_a_behavior: [
26
+ "Are the required APIs imported, or resolvable at runtime (GetProcAddress + LoadLibrary*)? If neither, the behavior is not statically supported.",
27
+ "If the required APIs are absent but the binary is packed / encrypted / high-entropy, the honest answer is 'indeterminate — unpack first', not 'incapable'. Static absence on an obscured binary proves nothing.",
28
+ "Are the relevant data artifacts (strings, wallet addresses, regexes) cross-referenced from executable code? Data sitting in .rdata with no code xref is an artifact, not an operational indicator.",
29
+ "Is the relevant code reachable from the entry point, or only from unused / initializer-only code?",
30
+ "Did dynamic analysis (emulation, sandbox) actually exercise the suspected path? Static analysis alone cannot confirm a runtime behavior.",
31
+ "Distinguish 'the code to do X is present' (a capability) from 'the sample does X' (a confirmed behavior). Until confirmed, write 'capable of' or 'consistent with', not 'performs'.",
32
+ ],
33
+ for_each_ioc: [
34
+ "Operationally used (referenced by reachable code, or observed in traffic) vs. vestigial (present in the file but unreferenced)?",
35
+ "Pyramid-of-Pain tier — trivially changed by the adversary (hash, IP) or costly (tooling, TTP)?",
36
+ "Pivotable to other samples / campaigns, or unique to this sample?",
37
+ ],
38
+ for_confidence: [
39
+ "Direct evidence vs. inferential leap — how many assumptions sit between the observation and the claim?",
40
+ "Single-source vs. corroborated across independent tools or methods.",
41
+ "Use ICD-203 estimative language; state attribution confidence separately from detection confidence.",
42
+ ],
43
+ using_this_server: [
44
+ "capa findings carry evidence_types (artifact / behavior / structural / linking), and analyze_file returns a capability_evidence field separating behavior_capable from artifact_only — read those before asserting a behavior.",
45
+ "A YARA family match is resemblance, not identity. A family name in the filename is a lead to test, never a finding.",
46
+ "When you need behavioral confirmation, plan for emulation (speakeasy) or sandbox detonation rather than inferring it from static artifacts.",
47
+ ],
48
+ };
49
+ //# sourceMappingURL=triage-discipline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triage-discipline.js","sourceRoot":"","sources":["../../src/report/triage-discipline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,iEAAiE;IACxE,UAAU,EAAE,0FAA0F;IACtG,cAAc,EACZ,4GAA4G;QAC5G,8GAA8G;QAC9G,yGAAyG;IAC3G,0BAA0B,EAAE;QAC1B,iJAAiJ;QACjJ,iNAAiN;QACjN,oMAAoM;QACpM,mGAAmG;QACnG,0IAA0I;QAC1I,qLAAqL;KACtL;IACD,YAAY,EAAE;QACZ,iIAAiI;QACjI,gGAAgG;QAChG,mEAAmE;KACpE;IACD,cAAc,EAAE;QACd,wGAAwG;QACxG,qEAAqE;QACrE,qGAAqG;KACtG;IACD,iBAAiB,EAAE;QACjB,gOAAgO;QAChO,qHAAqH;QACrH,6IAA6I;KAC9I;CACO,CAAC"}
@@ -146,11 +146,53 @@ export type ExtractIOCsArgs = z.infer<typeof extractIOCsSchema>;
146
146
  export declare const getReportTemplateSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
147
147
  export type GetReportTemplateArgs = z.infer<typeof getReportTemplateSchema>;
148
148
  export declare const getReportGuidanceSchema: z.ZodObject<{
149
- topic: z.ZodDefault<z.ZodOptional<z.ZodEnum<["all", "sections", "confidence", "capabilities", "pyramid_of_pain", "anti_patterns", "review", "writing", "frameworks", "profiles"]>>>;
149
+ topic: z.ZodDefault<z.ZodOptional<z.ZodEnum<["all", "sections", "confidence", "capabilities", "pyramid_of_pain", "anti_patterns", "review", "writing", "frameworks", "profiles", "triage_checklist"]>>>;
150
150
  }, "strip", z.ZodTypeAny, {
151
- topic: "all" | "sections" | "confidence" | "capabilities" | "pyramid_of_pain" | "anti_patterns" | "review" | "writing" | "frameworks" | "profiles";
151
+ topic: "all" | "sections" | "confidence" | "capabilities" | "pyramid_of_pain" | "anti_patterns" | "review" | "writing" | "frameworks" | "profiles" | "triage_checklist";
152
152
  }, {
153
- topic?: "all" | "sections" | "confidence" | "capabilities" | "pyramid_of_pain" | "anti_patterns" | "review" | "writing" | "frameworks" | "profiles" | undefined;
153
+ topic?: "all" | "sections" | "confidence" | "capabilities" | "pyramid_of_pain" | "anti_patterns" | "review" | "writing" | "frameworks" | "profiles" | "triage_checklist" | undefined;
154
154
  }>;
155
155
  export type GetReportGuidanceArgs = z.input<typeof getReportGuidanceSchema>;
156
+ export declare const checkBehaviorPrerequisitesSchema: z.ZodObject<{
157
+ file: z.ZodString;
158
+ behavior: z.ZodOptional<z.ZodString>;
159
+ }, "strip", z.ZodTypeAny, {
160
+ file: string;
161
+ behavior?: string | undefined;
162
+ }, {
163
+ file: string;
164
+ behavior?: string | undefined;
165
+ }>;
166
+ export type CheckBehaviorPrerequisitesArgs = z.infer<typeof checkBehaviorPrerequisitesSchema>;
167
+ export declare const verifyStringUsageSchema: z.ZodObject<{
168
+ file: z.ZodString;
169
+ query: z.ZodString;
170
+ depth: z.ZodOptional<z.ZodEnum<["standard", "deep"]>>;
171
+ max_matches: z.ZodOptional<z.ZodNumber>;
172
+ }, "strip", z.ZodTypeAny, {
173
+ file: string;
174
+ query: string;
175
+ depth?: "standard" | "deep" | undefined;
176
+ max_matches?: number | undefined;
177
+ }, {
178
+ file: string;
179
+ query: string;
180
+ depth?: "standard" | "deep" | undefined;
181
+ max_matches?: number | undefined;
182
+ }>;
183
+ export type VerifyStringUsageArgs = z.infer<typeof verifyStringUsageSchema>;
184
+ export declare const compareFilesSchema: z.ZodObject<{
185
+ file_a: z.ZodString;
186
+ file_b: z.ZodString;
187
+ depth: z.ZodOptional<z.ZodEnum<["quick", "standard"]>>;
188
+ }, "strip", z.ZodTypeAny, {
189
+ file_a: string;
190
+ file_b: string;
191
+ depth?: "quick" | "standard" | undefined;
192
+ }, {
193
+ file_a: string;
194
+ file_b: string;
195
+ depth?: "quick" | "standard" | undefined;
196
+ }>;
197
+ export type CompareFilesArgs = z.infer<typeof compareFilesSchema>;
156
198
  //# sourceMappingURL=tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/schemas/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,aAAa;;;;;;;;;;;;EAIxB,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAExD,eAAO,MAAM,iBAAiB;;;;;;EAE5B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEhE,eAAO,MAAM,eAAe;;;;;;EAE1B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE5D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;EAI/B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;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 @@ export const getReportGuidanceSchema = z.object({
67
67
  "writing",
68
68
  "frameworks",
69
69
  "profiles",
70
- ]).optional().default("all").describe("Which slice of the writing guidelines to return. 'all' (default) returns the full digest; " +
70
+ "triage_checklist",
71
+ ]).optional().default("all").describe("Which slice of guidance to return. 'all' (default) returns the full writing-guidelines digest; " +
71
72
  "narrow to 'sections', 'confidence', 'capabilities', 'pyramid_of_pain', 'anti_patterns', " +
72
- "'review', 'writing', 'frameworks', or 'profiles' to reduce size."),
73
+ "'review', 'writing', 'frameworks', or 'profiles' to reduce size. " +
74
+ "'triage_checklist' returns the pre-claim triage discipline checklist (artifact-vs-behavior gates to pass " +
75
+ "before drawing a behavioral conclusion) — useful at the START of an analysis, not just when writing up."),
76
+ });
77
+ export const checkBehaviorPrerequisitesSchema = z.object({
78
+ file: z.string().describe("Filename relative to the samples directory, or an absolute path in local mode."),
79
+ behavior: z.string().optional().describe("Behavior to check (omit to scan ALL known behaviors). One of: clipboard_hijacking, http_c2_wininet, " +
80
+ "winhttp_c2, socket_c2, process_injection_remote, process_injection_self, registry_persistence_run, " +
81
+ "lnk_persistence, browser_credential_theft, screen_capture, keylog_polling, keylog_hook, network_share_enum."),
82
+ });
83
+ export const verifyStringUsageSchema = z.object({
84
+ file: z.string().describe("Filename relative to the samples directory, or an absolute path in local mode."),
85
+ query: z.string().describe("The string (or substring) to locate in the binary and cross-reference against code."),
86
+ depth: z.enum(["standard", "deep"]).optional().describe("Analysis depth: 'standard' (radare2 aa; aar — default) or 'deep' (aaa — slower, more thorough)."),
87
+ max_matches: z.number().optional().describe("Cap on the number of distinct matching strings to classify (default 50)."),
88
+ });
89
+ export const compareFilesSchema = z.object({
90
+ file_a: z.string().describe("First file (relative to the samples directory, or absolute in local mode)."),
91
+ file_b: z.string().describe("Second file to compare against file_a."),
92
+ depth: z.enum(["quick", "standard"]).optional().describe("'standard' (default) includes a capa capability diff (slower — runs capa on both files); 'quick' skips capa (imports/sections/compiler/entropy only)."),
73
93
  });
74
94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,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACrD,iGAAiG,CAClG;IACD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0EAA0E,CAAC;CACxH,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4EAA4E,CAAC;IACzG,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wCAAwC,CAAC;IACrE,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACtD,uJAAuJ,CACxJ;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnux/mcp-server",
3
- "version": "0.1.53",
3
+ "version": "0.1.55",
4
4
  "packageManager": "pnpm@10.33.0",
5
5
  "description": "MCP server for using the REMnux malware analysis toolkit via AI assistants",
6
6
  "type": "module",