@remnux/mcp-server 0.1.55 → 0.1.57
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/README.md +9 -0
- package/data/osint-resources.json +546 -0
- package/dist/analysis/string-usage.d.ts +0 -3
- package/dist/analysis/string-usage.d.ts.map +1 -1
- package/dist/analysis/string-usage.js +1 -7
- package/dist/analysis/string-usage.js.map +1 -1
- package/dist/connectors/docker.d.ts +1 -0
- package/dist/connectors/docker.d.ts.map +1 -1
- package/dist/connectors/docker.js +39 -5
- package/dist/connectors/docker.js.map +1 -1
- package/dist/handlers/analyze-file.d.ts.map +1 -1
- package/dist/handlers/analyze-file.js +11 -1
- package/dist/handlers/analyze-file.js.map +1 -1
- package/dist/handlers/extract-iocs.d.ts.map +1 -1
- package/dist/handlers/extract-iocs.js +6 -0
- package/dist/handlers/extract-iocs.js.map +1 -1
- package/dist/handlers/get-tool-help.d.ts.map +1 -1
- package/dist/handlers/get-tool-help.js +11 -0
- package/dist/handlers/get-tool-help.js.map +1 -1
- package/dist/handlers/osint.d.ts +10 -0
- package/dist/handlers/osint.d.ts.map +1 -0
- package/dist/handlers/osint.js +72 -0
- package/dist/handlers/osint.js.map +1 -0
- package/dist/handlers/verify-string-usage.d.ts.map +1 -1
- package/dist/handlers/verify-string-usage.js +11 -4
- package/dist/handlers/verify-string-usage.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/osint/guidance.d.ts +125 -0
- package/dist/osint/guidance.d.ts.map +1 -0
- package/dist/osint/guidance.js +217 -0
- package/dist/osint/guidance.js.map +1 -0
- package/dist/osint/index.d.ts +61 -0
- package/dist/osint/index.d.ts.map +1 -0
- package/dist/osint/index.js +64 -0
- package/dist/osint/index.js.map +1 -0
- package/dist/parsers/capa.d.ts.map +1 -1
- package/dist/parsers/capa.js +8 -1
- package/dist/parsers/capa.js.map +1 -1
- package/dist/schemas/tools.d.ts +11 -0
- package/dist/schemas/tools.d.ts.map +1 -1
- package/dist/schemas/tools.js +22 -0
- package/dist/schemas/tools.js.map +1 -1
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +34 -0
- package/dist/tools/definitions.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/
|
|
|
6
6
|
import { createMcpExpressApp } from "@modelcontextprotocol/sdk/server/express.js";
|
|
7
7
|
import { requireBearerAuth } from "@modelcontextprotocol/sdk/server/auth/middleware/bearerAuth.js";
|
|
8
8
|
import { createConnector } from "./connectors/index.js";
|
|
9
|
-
import { runToolSchema, getFileInfoSchema, listFilesSchema, extractArchiveSchema, uploadFromHostSchema, downloadFromUrlSchema, downloadFileSchema, analyzeFileSchema, suggestToolsSchema, extractIOCsSchema, checkToolsSchema, getToolHelpSchema, getReportTemplateSchema, getReportGuidanceSchema, checkBehaviorPrerequisitesSchema, verifyStringUsageSchema, compareFilesSchema, } from "./schemas/tools.js";
|
|
9
|
+
import { runToolSchema, getFileInfoSchema, listFilesSchema, extractArchiveSchema, uploadFromHostSchema, downloadFromUrlSchema, downloadFileSchema, analyzeFileSchema, suggestToolsSchema, extractIOCsSchema, checkToolsSchema, getToolHelpSchema, getReportTemplateSchema, getReportGuidanceSchema, getOsintGuidanceSchema, checkBehaviorPrerequisitesSchema, verifyStringUsageSchema, compareFilesSchema, } from "./schemas/tools.js";
|
|
10
10
|
import { SessionState, DEFAULT_ARCHIVE_PASSWORD } from "./state/session.js";
|
|
11
11
|
import { handleRunTool } from "./handlers/run-tool.js";
|
|
12
12
|
import { handleGetFileInfo } from "./handlers/get-file-info.js";
|
|
@@ -21,6 +21,7 @@ import { handleCheckTools } from "./handlers/check-tools.js";
|
|
|
21
21
|
import { handleSuggestTools } from "./handlers/suggest-tools.js";
|
|
22
22
|
import { handleGetToolHelp } from "./handlers/get-tool-help.js";
|
|
23
23
|
import { handleGetReportTemplate, handleGetReportGuidance } from "./handlers/report.js";
|
|
24
|
+
import { handleGetOsintGuidance } from "./handlers/osint.js";
|
|
24
25
|
import { handleCheckBehaviorPrerequisites } from "./handlers/check-behavior-prerequisites.js";
|
|
25
26
|
import { handleVerifyStringUsage } from "./handlers/verify-string-usage.js";
|
|
26
27
|
import { handleCompareFiles } from "./handlers/compare-files.js";
|
|
@@ -181,6 +182,13 @@ export async function createServer(config) {
|
|
|
181
182
|
"triage discipline checklist (artifact-vs-behavior gates) to consult at the START of an analysis. For " +
|
|
182
183
|
"interactive review or numeric scoring, the zeltser-website MCP server's malware_review_report / " +
|
|
183
184
|
"rating_score_writing offer more when connected.", getReportGuidanceSchema.shape, (args) => handleGetReportGuidance(deps, args));
|
|
185
|
+
// Tool: get_osint_guidance - OSINT triage tradecraft + curated lookup catalog for malware indicators (offline)
|
|
186
|
+
server.tool("get_osint_guidance", "OSINT triage for malware indicators. Given the hashes, C2 domains/IPs, and URLs from a sample (for " +
|
|
187
|
+
"example from analyze_file or extract_iocs), returns malware-specific enrichment tradecraft — hash-first " +
|
|
188
|
+
"and disclosure-aware, do not tip off the adversary, leads not verdicts — plus a curated catalog of free " +
|
|
189
|
+
"and freemium lookup services. Use `topic` to pick the guidance slice and `ioc_type` to narrow the catalog " +
|
|
190
|
+
"to a hash, url, domain, ip, family, or host_artifact. Guidance only: it runs no lookups and stores no API " +
|
|
191
|
+
"keys; the AI performs the lookups with its own tools.", getOsintGuidanceSchema.shape, (args) => handleGetOsintGuidance(deps, args));
|
|
184
192
|
// ── MCP Resources: Tool Registry ──────────────────────────────────────────
|
|
185
193
|
// Static resource: all tools
|
|
186
194
|
server.resource("tools", "remnux://tools", { description: "All registered REMnux analysis tools with metadata" }, () => ({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU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AACL,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OSINT malware-triage guidance — server-authored, bundled, offline.
|
|
3
|
+
*
|
|
4
|
+
* Operational tradecraft for enriching the IOCs that analyze_file / extract_iocs
|
|
5
|
+
* surface (hashes, domains, IPs, URLs) against external reputation and
|
|
6
|
+
* threat-intel services. It is the same category of locally-authored guidance as
|
|
7
|
+
* triage-discipline.ts and the analyze_file analysis_guidance: hand-authored and
|
|
8
|
+
* versioned here, with no live network fetch (the works-offline guarantee is
|
|
9
|
+
* load-bearing for air-gapped REMnux deployments).
|
|
10
|
+
*
|
|
11
|
+
* This module returns GUIDANCE only. It never queries an external service and
|
|
12
|
+
* holds no API keys — the AI runs the lookups with its own tools. The companion
|
|
13
|
+
* resource catalog lives in data/osint-resources.json and is maintained by pull
|
|
14
|
+
* request (see src/osint/index.ts for the loader).
|
|
15
|
+
*
|
|
16
|
+
* The workflow (A3) names service CATEGORIES, not specific services, so this
|
|
17
|
+
* prose stays one source of truth and cannot drift from the catalog. The agent
|
|
18
|
+
* resolves concrete services from the catalog via the `ioc_type` slice.
|
|
19
|
+
*/
|
|
20
|
+
export declare const OSINT_GUIDANCE: {
|
|
21
|
+
readonly version: "1.0.0";
|
|
22
|
+
readonly title: "OSINT malware triage — tradecraft, workflow, and a curated lookup-service catalog";
|
|
23
|
+
readonly provenance: string;
|
|
24
|
+
readonly scope: string;
|
|
25
|
+
readonly header: string;
|
|
26
|
+
readonly tradecraft: readonly [{
|
|
27
|
+
readonly title: "Hash-first, disclosure-aware";
|
|
28
|
+
readonly detail: string;
|
|
29
|
+
}, {
|
|
30
|
+
readonly title: "Confidentiality tiering before any upload or submission";
|
|
31
|
+
readonly detail: string;
|
|
32
|
+
}, {
|
|
33
|
+
readonly title: "Authorization before disclosure";
|
|
34
|
+
readonly detail: string;
|
|
35
|
+
}, {
|
|
36
|
+
readonly title: "Do not tip off the adversary";
|
|
37
|
+
readonly detail: string;
|
|
38
|
+
}, {
|
|
39
|
+
readonly title: "Results are leads, not verdicts";
|
|
40
|
+
readonly detail: string;
|
|
41
|
+
}, {
|
|
42
|
+
readonly title: "Detection counts and source independence";
|
|
43
|
+
readonly detail: string;
|
|
44
|
+
}, {
|
|
45
|
+
readonly title: "Enrichment can be poisoned";
|
|
46
|
+
readonly detail: string;
|
|
47
|
+
}, {
|
|
48
|
+
readonly title: "Validate indicators before spending lookups";
|
|
49
|
+
readonly detail: string;
|
|
50
|
+
}, {
|
|
51
|
+
readonly title: "Data minimization and PII";
|
|
52
|
+
readonly detail: string;
|
|
53
|
+
}, {
|
|
54
|
+
readonly title: "Record provenance";
|
|
55
|
+
readonly detail: string;
|
|
56
|
+
}];
|
|
57
|
+
readonly access_guidance: {
|
|
58
|
+
readonly principle: string;
|
|
59
|
+
readonly rules: readonly [string, string, string, string];
|
|
60
|
+
readonly tiers: {
|
|
61
|
+
readonly free: "No account required.";
|
|
62
|
+
readonly free_account: "Free, but registration or an API key is required.";
|
|
63
|
+
readonly freemium: "Usable free tier with paid upgrades.";
|
|
64
|
+
readonly paid: "Commercial only.";
|
|
65
|
+
};
|
|
66
|
+
readonly ai_access: {
|
|
67
|
+
readonly api_nokey: "Clean JSON or REST you can call with no account. Best for an agent, and listed first.";
|
|
68
|
+
readonly api_key: "Programmatic, but needs a free or paid key or account first.";
|
|
69
|
+
readonly web: "Primarily a web UI or desktop tool, with no clean keyless API, so a browser or manual step is needed.";
|
|
70
|
+
};
|
|
71
|
+
readonly no_key_coverage: {
|
|
72
|
+
readonly note: "With no keys, keyless external pivots exist for network IOCs but are thin or absent for hash, family, and host_artifact. For family and host_artifact there is NO keyless external pivot, so stop and request an account or key (Malpedia, VirusTotal Intelligence, OTX) rather than improvising or hallucinating a lookup.";
|
|
73
|
+
readonly hash: "Team Cymru MHR only (MD5/SHA-1 via DNS, SHA-256 via HTTPS).";
|
|
74
|
+
readonly ip: "Shodan InternetDB, GreyNoise, DShield, ipinfo, RDAP, urlscan search.";
|
|
75
|
+
readonly domain: "crt.sh, RDAP, urlscan search, OpenPhish feed.";
|
|
76
|
+
readonly url: "urlscan search, OpenPhish feed.";
|
|
77
|
+
readonly family: "none keyless — request an account (Malpedia) or key.";
|
|
78
|
+
readonly host_artifact: "none keyless — request a key (VirusTotal Intelligence, OTX, ThreatFox).";
|
|
79
|
+
};
|
|
80
|
+
readonly first_moves: {
|
|
81
|
+
readonly hash: "Team Cymru MHR, then stop unless you have a key.";
|
|
82
|
+
readonly ip: "Shodan InternetDB + GreyNoise + DShield + ipinfo, then RDAP for ownership.";
|
|
83
|
+
readonly domain: "crt.sh + RDAP + urlscan search of existing scans.";
|
|
84
|
+
readonly url: "urlscan search of existing scans. Do not submit attacker URLs for live scanning from your own infrastructure.";
|
|
85
|
+
readonly family: "request an account (Malpedia) to normalize the name across vendors.";
|
|
86
|
+
readonly host_artifact: "use the artifact locally (YARA, correlation); request a key for external pivots.";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly disclosure_legend: {
|
|
90
|
+
readonly query_disclosing: "Does looking something up reveal your interest? `none` means no per-indicator transmission (a bulk feed you download and grep locally, such as OpenPhish or DShield). `vendor` means the operator sees the specific indicator you queried. `public` means the query or result is searchable by anyone. Almost every live per-indicator lookup is at least `vendor`, not `none`.";
|
|
91
|
+
readonly content_disclosing: "Does using it require submitting sample or URL content that gets shared, or fetching the target live? none, vendor (shared with the operator or subscribers, or fetched from the operator's infrastructure), or public (publicly visible).";
|
|
92
|
+
readonly note: "Catalog entries report the WORST-CASE posture for the service. The caveats field explains when a lighter action (a hash lookup) is non-content-disclosing even though the query still reveals the indicator to the vendor and uploading a file is fully disclosing.";
|
|
93
|
+
};
|
|
94
|
+
readonly workflow_by_ioc: {
|
|
95
|
+
readonly hash: {
|
|
96
|
+
readonly posture: "non-disclosing first";
|
|
97
|
+
readonly steps: readonly ["Query [file_repo] and [multiscanner] for whether the hash is known, and [family_yara] for YARA or family hits. These are non-disclosing hash lookups.", "Cluster on sample-intrinsic fuzzy hashes (imphash, TLSH or ssdeep) and [code_similarity] to find related samples anchored to the binary's own properties, which are forgery-resistant and the antidote to poisoned single-source IOCs.", "Submit the file to a [multiscanner] or [sandbox] (content-disclosing) only if the hash is unknown and disclosure is authorized."];
|
|
98
|
+
};
|
|
99
|
+
readonly url: {
|
|
100
|
+
readonly posture: "passive first";
|
|
101
|
+
readonly steps: readonly ["Search existing results via [url_web], [community_intel], [passive_dns], and [cert_transparency]. These are query-disclosing at most.", "A live [url_web] submission is content-disclosing, so apply disclosure awareness and unlisted or private visibility, and remember it fetches the attacker's infrastructure."];
|
|
102
|
+
};
|
|
103
|
+
readonly domain: {
|
|
104
|
+
readonly posture: "passive first";
|
|
105
|
+
readonly steps: readonly ["Pivot passively via [passive_dns] (resolution history), [registration] (RDAP registrar and creation data), [cert_transparency], and [community_intel] to map history, ownership, and related infrastructure.", "Use [url_web] for current page analysis, applying the same live-submission discipline as for URLs."];
|
|
106
|
+
};
|
|
107
|
+
readonly ip: {
|
|
108
|
+
readonly posture: "non-disclosing";
|
|
109
|
+
readonly steps: readonly ["Use [infrastructure] enrichment for noise-versus-targeted classification, open ports and services, hostnames, and reputation.", "Corroborate across independent [infrastructure] and [aggregator] sources before trusting a single reputation verdict."];
|
|
110
|
+
};
|
|
111
|
+
readonly family: {
|
|
112
|
+
readonly posture: "non-disclosing";
|
|
113
|
+
readonly steps: readonly ["Use [family_yara] to resolve aliases across vendors, then [community_intel] to pivot from the family to its current infrastructure.", "Planted-pulse risk applies, so corroborate before trusting a pivot."];
|
|
114
|
+
};
|
|
115
|
+
readonly host_artifact: {
|
|
116
|
+
readonly posture: "non-disclosing";
|
|
117
|
+
readonly steps: readonly ["Not all host artifacts pivot equally. STRONG external pivots: a distinctive hash, certificate thumbprint, wallet or email address, or a unique mutex string. WEAK pivots: common registry paths (CurrentVersion\\Run, Explorer\\Advanced), named pipes, and service names, which are often shared across unrelated software. Pivot only on DISTINCTIVE artifacts, and note that a dynamically generated mutex has no static value to search.", "Search a distinctive artifact in [multiscanner], [community_intel], and [aggregator] to surface related samples and reports. Most of these searches need an account or key (for example VirusTotal Intelligence), so with no key, use the artifact for in-sandbox correlation and YARA, and ask the user for a key when an external pivot is needed. Treat any match as a lead to corroborate."];
|
|
118
|
+
};
|
|
119
|
+
readonly packed: {
|
|
120
|
+
readonly posture: "content-disclosing";
|
|
121
|
+
readonly steps: readonly ["If triage stalls because the sample is packed, it must be unpacked inside the analysis sandbox (REMnux) before you draw IOC conclusions, since absent strings are not absence of C2. Unpacking is a local analysis step performed with the REMnux tooling, never a command you run against the sample on your own host. A corrupted UPX header signals anti-unpack tampering that needs dynamic analysis in the sandbox. Only when in-sandbox unpacking stalls do external [unpacking] services apply, and submitting the sample to them is content-disclosing, so apply the same upload discipline. All malware handling stays inside the sandbox."];
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
//# sourceMappingURL=guidance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guidance.d.ts","sourceRoot":"","sources":["../../src/osint/guidance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuNjB,CAAC"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OSINT malware-triage guidance — server-authored, bundled, offline.
|
|
3
|
+
*
|
|
4
|
+
* Operational tradecraft for enriching the IOCs that analyze_file / extract_iocs
|
|
5
|
+
* surface (hashes, domains, IPs, URLs) against external reputation and
|
|
6
|
+
* threat-intel services. It is the same category of locally-authored guidance as
|
|
7
|
+
* triage-discipline.ts and the analyze_file analysis_guidance: hand-authored and
|
|
8
|
+
* versioned here, with no live network fetch (the works-offline guarantee is
|
|
9
|
+
* load-bearing for air-gapped REMnux deployments).
|
|
10
|
+
*
|
|
11
|
+
* This module returns GUIDANCE only. It never queries an external service and
|
|
12
|
+
* holds no API keys — the AI runs the lookups with its own tools. The companion
|
|
13
|
+
* resource catalog lives in data/osint-resources.json and is maintained by pull
|
|
14
|
+
* request (see src/osint/index.ts for the loader).
|
|
15
|
+
*
|
|
16
|
+
* The workflow (A3) names service CATEGORIES, not specific services, so this
|
|
17
|
+
* prose stays one source of truth and cannot drift from the catalog. The agent
|
|
18
|
+
* resolves concrete services from the catalog via the `ioc_type` slice.
|
|
19
|
+
*/
|
|
20
|
+
export const OSINT_GUIDANCE = {
|
|
21
|
+
version: "1.0.0",
|
|
22
|
+
title: "OSINT malware triage — tradecraft, workflow, and a curated lookup-service catalog",
|
|
23
|
+
provenance: "Server-authored operational guidance, bundled and offline (not synced from zeltser.com). " +
|
|
24
|
+
"The resource catalog lives in data/osint-resources.json and is maintained by pull request.",
|
|
25
|
+
scope: "Malware-analysis OSINT triage: enrich the hashes, domains, IPs, and URLs from a sample to " +
|
|
26
|
+
"prioritize follow-up. This is triage, not a finished assessment or attribution. OSINT operates only on " +
|
|
27
|
+
"derived indicators (hashes, domains, IPs, URLs, host artifacts); the sample itself is handled solely " +
|
|
28
|
+
"inside the analysis sandbox, never executed or processed on your own host.",
|
|
29
|
+
// Persistent header returned on EVERY response, not left to model discretion.
|
|
30
|
+
header: "Leads, not verdicts. Corroborate across independent source types before trusting an indicator. " +
|
|
31
|
+
"Pivots on attacker-controlled data can be poisoned. This is triage to prioritize follow-up, not a " +
|
|
32
|
+
"finished assessment or attribution.",
|
|
33
|
+
// A1 — OPSEC / tradecraft principles.
|
|
34
|
+
tradecraft: [
|
|
35
|
+
{
|
|
36
|
+
title: "Hash-first, disclosure-aware",
|
|
37
|
+
detail: "Do non-disclosing lookups before disclosing actions. Querying a SHA-256 or an IOC still transmits that " +
|
|
38
|
+
"indicator to the service, and a rare or victim-specific one can reveal investigation interest, possession, " +
|
|
39
|
+
"or timing even with no upload, including to an adversary who monitors a service or seeded the indicator. " +
|
|
40
|
+
"It is far less exposing than uploading the sample, but it is not invisible. Uploading the sample, or " +
|
|
41
|
+
"submitting an attacker URL that gets fetched, discloses content and can be visible to vendors, " +
|
|
42
|
+
"subscribers, or the public. Look up the hash first, and upload only if the hash is unknown and " +
|
|
43
|
+
"disclosure is authorized.",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
title: "Confidentiality tiering before any upload or submission",
|
|
47
|
+
detail: "Never upload a sample or submit a URL tied to a confidential incident or an identifiable victim " +
|
|
48
|
+
"to a public service without authorization. Public submissions are routinely shared with the " +
|
|
49
|
+
"vendor and often searchable by others. Treat upload as irreversible disclosure.",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
title: "Authorization before disclosure",
|
|
53
|
+
detail: "Uploading a sample, submitting a URL for live scanning, and actively resolving or connecting to " +
|
|
54
|
+
"attacker infrastructure all require authorization tied to the engagement. This is where an AI " +
|
|
55
|
+
"agent most plausibly errs, so confirm it explicitly rather than by implication.",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
title: "Do not tip off the adversary",
|
|
59
|
+
detail: "Active connections to live C2 from attributable infrastructure can alert the adversary and burn " +
|
|
60
|
+
"the investigation. Prefer passive sources (passive DNS, certificate transparency, existing " +
|
|
61
|
+
"sandbox or urlscan results). A live URL submission fetches the attacker's infrastructure and may " +
|
|
62
|
+
"be publicly visible, which makes it a disclosing action.",
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
title: "Results are leads, not verdicts",
|
|
66
|
+
detail: "A detection count, a sandbox family label, or a community pulse is an unverified lead to " +
|
|
67
|
+
"corroborate against the local analysis and at least one independent source. A family name from " +
|
|
68
|
+
"any service is resemblance, not confirmed attribution.",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: "Detection counts and source independence",
|
|
72
|
+
detail: "A detection count is not a probability, and a low or zero count does not clear a sample (new, targeted, " +
|
|
73
|
+
"or packed malware often detects low). Aggregators (CyberGordon, Pulsedive, IBM X-Force) and feeds that " +
|
|
74
|
+
"re-ingest the same upstreams (the abuse.ch family, anything echoing VirusTotal) are not independent " +
|
|
75
|
+
"corroboration. Three hits can be one source echoed three times, so corroborate across independent source " +
|
|
76
|
+
"TYPES, and weight a forgery-resistant sample-intrinsic match (code similarity, imphash) over another " +
|
|
77
|
+
"network-IOC echo.",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
title: "Enrichment can be poisoned",
|
|
81
|
+
detail: "Attacker-controlled or community-sourced data (community pulses, shared hosting) can carry " +
|
|
82
|
+
"planted or false-flag indicators. Corroborate across independent source TYPES, and anchor on " +
|
|
83
|
+
"forgery-resistant, sample-intrinsic pivots (imphash, TLSH or ssdeep, Rich-header hash, code " +
|
|
84
|
+
"similarity) which are far harder to salt than network IOCs.",
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
title: "Validate indicators before spending lookups",
|
|
88
|
+
detail: "Extracted IOCs include false positives, especially from managed (.NET) and Rust or Go binaries, where " +
|
|
89
|
+
"type names and source filenames (for example futex.rs or System.Resources.Tools) surface as domains, " +
|
|
90
|
+
"and base58 symbol names can look like wallet addresses. Benign toolchain artifacts are not IOCs either: " +
|
|
91
|
+
"packer and SDK URLs such as upx.sf.net or schemas.microsoft.com appear in many unrelated binaries. " +
|
|
92
|
+
"Confirm an indicator is a plausible real host or address, prefer ones the local analysis shows are " +
|
|
93
|
+
"referenced by code (verify_string_usage and the extractor confidence scores), and never submit a " +
|
|
94
|
+
"doubtful artifact to a third-party service.",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
title: "Data minimization and PII",
|
|
98
|
+
detail: "IOCs can carry victim identifiers (internal hostnames, usernames in paths, email addresses, " +
|
|
99
|
+
"tokens). Submit the minimum needed, such as a hash or a bare domain, not raw artifacts that " +
|
|
100
|
+
"embed context.",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
title: "Record provenance",
|
|
104
|
+
detail: "For each lookup, note the service, the exact query, the timestamp, and what it returned, so " +
|
|
105
|
+
"findings are reproducible and attributable to a source.",
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
// A2 — Free vs paid access handling.
|
|
109
|
+
access_guidance: {
|
|
110
|
+
principle: "The server does not know whether you have paid or API-keyed access to any service, and holds no " +
|
|
111
|
+
"keys. Each catalog entry carries an `access` tier.",
|
|
112
|
+
rules: [
|
|
113
|
+
"Default to free-first. Start with `free` and `free_account` services. Reach for `freemium` paid " +
|
|
114
|
+
"features or `paid`-only services only when a free source cannot answer the question.",
|
|
115
|
+
"Prefer services you can call directly without a key. Each entry also carries an `ai_access` field, and " +
|
|
116
|
+
"the catalog lists `api_nokey` services first. With no keys configured, those keyless JSON APIs (for " +
|
|
117
|
+
"example Shodan InternetDB, GreyNoise, ipinfo, DShield, urlscan search, crt.sh, RDAP) are what you can " +
|
|
118
|
+
"use right now, and they cover most IP, domain, and URL triage passively.",
|
|
119
|
+
"Never assume a key, never block on one. If a paid source would materially help, state what it " +
|
|
120
|
+
"offers and let the user decide or supply access. Do not fail the triage because a paid lookup is " +
|
|
121
|
+
"unavailable. Fall back to free sources and say what was not checked.",
|
|
122
|
+
"The user supplies access, not the server. Any API key or paid query runs through the user's own " +
|
|
123
|
+
"tools. This server never requests, stores, or transmits credentials.",
|
|
124
|
+
],
|
|
125
|
+
tiers: {
|
|
126
|
+
free: "No account required.",
|
|
127
|
+
free_account: "Free, but registration or an API key is required.",
|
|
128
|
+
freemium: "Usable free tier with paid upgrades.",
|
|
129
|
+
paid: "Commercial only.",
|
|
130
|
+
},
|
|
131
|
+
ai_access: {
|
|
132
|
+
api_nokey: "Clean JSON or REST you can call with no account. Best for an agent, and listed first.",
|
|
133
|
+
api_key: "Programmatic, but needs a free or paid key or account first.",
|
|
134
|
+
web: "Primarily a web UI or desktop tool, with no clean keyless API, so a browser or manual step is needed.",
|
|
135
|
+
},
|
|
136
|
+
// No-key reality per IOC type, so a keyless agent knows where the wall is.
|
|
137
|
+
no_key_coverage: {
|
|
138
|
+
note: "With no keys, keyless external pivots exist for network IOCs but are thin or absent for hash, family, and host_artifact. For family and host_artifact there is NO keyless external pivot, so stop and request an account or key (Malpedia, VirusTotal Intelligence, OTX) rather than improvising or hallucinating a lookup.",
|
|
139
|
+
hash: "Team Cymru MHR only (MD5/SHA-1 via DNS, SHA-256 via HTTPS).",
|
|
140
|
+
ip: "Shodan InternetDB, GreyNoise, DShield, ipinfo, RDAP, urlscan search.",
|
|
141
|
+
domain: "crt.sh, RDAP, urlscan search, OpenPhish feed.",
|
|
142
|
+
url: "urlscan search, OpenPhish feed.",
|
|
143
|
+
family: "none keyless — request an account (Malpedia) or key.",
|
|
144
|
+
host_artifact: "none keyless — request a key (VirusTotal Intelligence, OTX, ThreatFox).",
|
|
145
|
+
},
|
|
146
|
+
// The fastest keyless first move per IOC type, before reaching for keyed services.
|
|
147
|
+
first_moves: {
|
|
148
|
+
hash: "Team Cymru MHR, then stop unless you have a key.",
|
|
149
|
+
ip: "Shodan InternetDB + GreyNoise + DShield + ipinfo, then RDAP for ownership.",
|
|
150
|
+
domain: "crt.sh + RDAP + urlscan search of existing scans.",
|
|
151
|
+
url: "urlscan search of existing scans. Do not submit attacker URLs for live scanning from your own infrastructure.",
|
|
152
|
+
family: "request an account (Malpedia) to normalize the name across vendors.",
|
|
153
|
+
host_artifact: "use the artifact locally (YARA, correlation); request a key for external pivots.",
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
// Disclosure posture legend for the catalog's two disclosure fields.
|
|
157
|
+
disclosure_legend: {
|
|
158
|
+
query_disclosing: "Does looking something up reveal your interest? `none` means no per-indicator transmission (a bulk feed you download and grep locally, such as OpenPhish or DShield). `vendor` means the operator sees the specific indicator you queried. `public` means the query or result is searchable by anyone. Almost every live per-indicator lookup is at least `vendor`, not `none`.",
|
|
159
|
+
content_disclosing: "Does using it require submitting sample or URL content that gets shared, or fetching the target live? none, vendor (shared with the operator or subscribers, or fetched from the operator's infrastructure), or public (publicly visible).",
|
|
160
|
+
note: "Catalog entries report the WORST-CASE posture for the service. The caveats field explains when a lighter action (a hash lookup) is non-content-disclosing even though the query still reveals the indicator to the vendor and uploading a file is fully disclosing.",
|
|
161
|
+
},
|
|
162
|
+
// A3 — Workflow by artifact type and disclosure posture. Names catalog
|
|
163
|
+
// CATEGORIES (in brackets), not specific services. Resolve services via the
|
|
164
|
+
// `ioc_type` slice of the catalog. Ordered non-disclosing-first.
|
|
165
|
+
workflow_by_ioc: {
|
|
166
|
+
hash: {
|
|
167
|
+
posture: "non-disclosing first",
|
|
168
|
+
steps: [
|
|
169
|
+
"Query [file_repo] and [multiscanner] for whether the hash is known, and [family_yara] for YARA or family hits. These are non-disclosing hash lookups.",
|
|
170
|
+
"Cluster on sample-intrinsic fuzzy hashes (imphash, TLSH or ssdeep) and [code_similarity] to find related samples anchored to the binary's own properties, which are forgery-resistant and the antidote to poisoned single-source IOCs.",
|
|
171
|
+
"Submit the file to a [multiscanner] or [sandbox] (content-disclosing) only if the hash is unknown and disclosure is authorized.",
|
|
172
|
+
],
|
|
173
|
+
},
|
|
174
|
+
url: {
|
|
175
|
+
posture: "passive first",
|
|
176
|
+
steps: [
|
|
177
|
+
"Search existing results via [url_web], [community_intel], [passive_dns], and [cert_transparency]. These are query-disclosing at most.",
|
|
178
|
+
"A live [url_web] submission is content-disclosing, so apply disclosure awareness and unlisted or private visibility, and remember it fetches the attacker's infrastructure.",
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
|
+
domain: {
|
|
182
|
+
posture: "passive first",
|
|
183
|
+
steps: [
|
|
184
|
+
"Pivot passively via [passive_dns] (resolution history), [registration] (RDAP registrar and creation data), [cert_transparency], and [community_intel] to map history, ownership, and related infrastructure.",
|
|
185
|
+
"Use [url_web] for current page analysis, applying the same live-submission discipline as for URLs.",
|
|
186
|
+
],
|
|
187
|
+
},
|
|
188
|
+
ip: {
|
|
189
|
+
posture: "non-disclosing",
|
|
190
|
+
steps: [
|
|
191
|
+
"Use [infrastructure] enrichment for noise-versus-targeted classification, open ports and services, hostnames, and reputation.",
|
|
192
|
+
"Corroborate across independent [infrastructure] and [aggregator] sources before trusting a single reputation verdict.",
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
family: {
|
|
196
|
+
posture: "non-disclosing",
|
|
197
|
+
steps: [
|
|
198
|
+
"Use [family_yara] to resolve aliases across vendors, then [community_intel] to pivot from the family to its current infrastructure.",
|
|
199
|
+
"Planted-pulse risk applies, so corroborate before trusting a pivot.",
|
|
200
|
+
],
|
|
201
|
+
},
|
|
202
|
+
host_artifact: {
|
|
203
|
+
posture: "non-disclosing",
|
|
204
|
+
steps: [
|
|
205
|
+
"Not all host artifacts pivot equally. STRONG external pivots: a distinctive hash, certificate thumbprint, wallet or email address, or a unique mutex string. WEAK pivots: common registry paths (CurrentVersion\\Run, Explorer\\Advanced), named pipes, and service names, which are often shared across unrelated software. Pivot only on DISTINCTIVE artifacts, and note that a dynamically generated mutex has no static value to search.",
|
|
206
|
+
"Search a distinctive artifact in [multiscanner], [community_intel], and [aggregator] to surface related samples and reports. Most of these searches need an account or key (for example VirusTotal Intelligence), so with no key, use the artifact for in-sandbox correlation and YARA, and ask the user for a key when an external pivot is needed. Treat any match as a lead to corroborate.",
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
packed: {
|
|
210
|
+
posture: "content-disclosing",
|
|
211
|
+
steps: [
|
|
212
|
+
"If triage stalls because the sample is packed, it must be unpacked inside the analysis sandbox (REMnux) before you draw IOC conclusions, since absent strings are not absence of C2. Unpacking is a local analysis step performed with the REMnux tooling, never a command you run against the sample on your own host. A corrupted UPX header signals anti-unpack tampering that needs dynamic analysis in the sandbox. Only when in-sandbox unpacking stalls do external [unpacking] services apply, and submitting the sample to them is content-disclosing, so apply the same upload discipline. All malware handling stays inside the sandbox.",
|
|
213
|
+
],
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
};
|
|
217
|
+
//# sourceMappingURL=guidance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guidance.js","sourceRoot":"","sources":["../../src/osint/guidance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,OAAO;IAChB,KAAK,EAAE,mFAAmF;IAC1F,UAAU,EACR,2FAA2F;QAC3F,4FAA4F;IAC9F,KAAK,EACH,4FAA4F;QAC5F,yGAAyG;QACzG,uGAAuG;QACvG,4EAA4E;IAE9E,8EAA8E;IAC9E,MAAM,EACJ,iGAAiG;QACjG,oGAAoG;QACpG,qCAAqC;IAEvC,sCAAsC;IACtC,UAAU,EAAE;QACV;YACE,KAAK,EAAE,8BAA8B;YACrC,MAAM,EACJ,yGAAyG;gBACzG,6GAA6G;gBAC7G,2GAA2G;gBAC3G,uGAAuG;gBACvG,iGAAiG;gBACjG,iGAAiG;gBACjG,2BAA2B;SAC9B;QACD;YACE,KAAK,EAAE,yDAAyD;YAChE,MAAM,EACJ,kGAAkG;gBAClG,8FAA8F;gBAC9F,iFAAiF;SACpF;QACD;YACE,KAAK,EAAE,iCAAiC;YACxC,MAAM,EACJ,kGAAkG;gBAClG,gGAAgG;gBAChG,iFAAiF;SACpF;QACD;YACE,KAAK,EAAE,8BAA8B;YACrC,MAAM,EACJ,kGAAkG;gBAClG,6FAA6F;gBAC7F,mGAAmG;gBACnG,0DAA0D;SAC7D;QACD;YACE,KAAK,EAAE,iCAAiC;YACxC,MAAM,EACJ,2FAA2F;gBAC3F,iGAAiG;gBACjG,wDAAwD;SAC3D;QACD;YACE,KAAK,EAAE,0CAA0C;YACjD,MAAM,EACJ,0GAA0G;gBAC1G,yGAAyG;gBACzG,sGAAsG;gBACtG,2GAA2G;gBAC3G,uGAAuG;gBACvG,mBAAmB;SACtB;QACD;YACE,KAAK,EAAE,4BAA4B;YACnC,MAAM,EACJ,6FAA6F;gBAC7F,+FAA+F;gBAC/F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pH,MAAM,EAAE,qEAAqE;YAC7E,aAAa,EAAE,kFAAkF;SAClG;KACF;IAED,qEAAqE;IACrE,iBAAiB,EAAE;QACjB,gBAAgB,EAAE,iXAAiX;QACnY,kBAAkB,EAAE,4OAA4O;QAChQ,IAAI,EAAE,qQAAqQ;KAC5Q;IAED,uEAAuE;IACvE,4EAA4E;IAC5E,iEAAiE;IACjE,eAAe,EAAE;QACf,IAAI,EAAE;YACJ,OAAO,EAAE,sBAAsB;YAC/B,KAAK,EAAE;gBACL,uJAAuJ;gBACvJ,wOAAwO;gBACxO,iIAAiI;aAClI;SACF;QACD,GAAG,EAAE;YACH,OAAO,EAAE,eAAe;YACxB,KAAK,EAAE;gBACL,uIAAuI;gBACvI,6KAA6K;aAC9K;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE,eAAe;YACxB,KAAK,EAAE;gBACL,8MAA8M;gBAC9M,oGAAoG;aACrG;SACF;QACD,EAAE,EAAE;YACF,OAAO,EAAE,gBAAgB;YACzB,KAAK,EAAE;gBACL,+HAA+H;gBAC/H,uHAAuH;aACxH;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE,gBAAgB;YACzB,KAAK,EAAE;gBACL,qIAAqI;gBACrI,qEAAqE;aACtE;SACF;QACD,aAAa,EAAE;YACb,OAAO,EAAE,gBAAgB;YACzB,KAAK,EAAE;gBACL,8aAA8a;gBAC9a,gYAAgY;aACjY;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE,oBAAoB;YAC7B,KAAK,EAAE;gBACL,qnBAAqnB;aACtnB;SACF;KACF;CACO,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OSINT resource catalog loader.
|
|
3
|
+
*
|
|
4
|
+
* Loads the contributor-editable data/osint-resources.json (maintained by pull
|
|
5
|
+
* request, validated in CI) and provides slicing helpers for the
|
|
6
|
+
* get_osint_guidance handler. Mirrors the data-file loading pattern in
|
|
7
|
+
* src/catalog/index.ts (data/ at package root, two levels up from dist/osint/),
|
|
8
|
+
* with a module-level memo since the catalog is immutable at runtime.
|
|
9
|
+
*
|
|
10
|
+
* This module reads a bundled JSON file only — no network, no API keys.
|
|
11
|
+
*/
|
|
12
|
+
export type AccessTier = "free" | "free_account" | "freemium" | "paid";
|
|
13
|
+
export type DisclosurePosture = "none" | "vendor" | "public";
|
|
14
|
+
export type IocType = "hash" | "url" | "domain" | "ip" | "family" | "host_artifact";
|
|
15
|
+
/** How directly an AI agent can pull data: clean no-key API, key-gated API, or web/GUI only. */
|
|
16
|
+
export type AiAccess = "api_nokey" | "api_key" | "web";
|
|
17
|
+
/** Sort priority: keyless programmatic services first (most agent-usable), web/GUI last. */
|
|
18
|
+
export declare const AI_ACCESS_ORDER: Record<AiAccess, number>;
|
|
19
|
+
export interface OsintResource {
|
|
20
|
+
name: string;
|
|
21
|
+
url: string;
|
|
22
|
+
categories: string[];
|
|
23
|
+
ioc_types: IocType[];
|
|
24
|
+
access: AccessTier;
|
|
25
|
+
ai_access: AiAccess;
|
|
26
|
+
query_disclosing: DisclosurePosture;
|
|
27
|
+
content_disclosing: DisclosurePosture;
|
|
28
|
+
best_use: string;
|
|
29
|
+
caveats?: string;
|
|
30
|
+
stability?: string;
|
|
31
|
+
last_verified: string;
|
|
32
|
+
source_list?: string[];
|
|
33
|
+
}
|
|
34
|
+
export interface OsintCatalog {
|
|
35
|
+
version: string;
|
|
36
|
+
updated: string;
|
|
37
|
+
resources: OsintResource[];
|
|
38
|
+
}
|
|
39
|
+
/** The condensed view returned for topic:"all" — keeps the default call cheap. */
|
|
40
|
+
export interface CondensedResource {
|
|
41
|
+
name: string;
|
|
42
|
+
ioc_types: IocType[];
|
|
43
|
+
access: AccessTier;
|
|
44
|
+
ai_access: AiAccess;
|
|
45
|
+
query_disclosing: DisclosurePosture;
|
|
46
|
+
content_disclosing: DisclosurePosture;
|
|
47
|
+
best_use: string;
|
|
48
|
+
}
|
|
49
|
+
/** Absolute path to the bundled catalog (data/ is two levels up from dist/osint/ or src/osint/). */
|
|
50
|
+
export declare function resolveCatalogPath(): string;
|
|
51
|
+
/** Load and parse the catalog, throwing on any error. Used by the CI integrity test. */
|
|
52
|
+
export declare function loadOsintCatalogStrict(): OsintCatalog;
|
|
53
|
+
/** Load the catalog with a module-level memo and a graceful fallback so a missing/corrupt file never crashes the server. */
|
|
54
|
+
export declare function loadOsintCatalog(): OsintCatalog;
|
|
55
|
+
/** Condense one entry to the fields shown in the topic:"all" index. */
|
|
56
|
+
export declare function condense(r: OsintResource): CondensedResource;
|
|
57
|
+
/** The full catalog condensed (topic:"all"). */
|
|
58
|
+
export declare function condensedCatalog(): CondensedResource[];
|
|
59
|
+
/** Full-detail entries whose ioc_types include the given type (ioc_type slice). */
|
|
60
|
+
export declare function resourcesForIocType(iocType: IocType): OsintResource[];
|
|
61
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/osint/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAMH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,cAAc,GAAG,UAAU,GAAG,MAAM,CAAC;AACvE,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC7D,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,IAAI,GAAG,QAAQ,GAAG,eAAe,CAAC;AACpF,gGAAgG;AAChG,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,KAAK,CAAC;AAEvD,4FAA4F;AAC5F,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAwC,CAAC;AAE9F,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EA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Loads the contributor-editable data/osint-resources.json (maintained by pull
|
|
5
|
+
* request, validated in CI) and provides slicing helpers for the
|
|
6
|
+
* get_osint_guidance handler. Mirrors the data-file loading pattern in
|
|
7
|
+
* src/catalog/index.ts (data/ at package root, two levels up from dist/osint/),
|
|
8
|
+
* with a module-level memo since the catalog is immutable at runtime.
|
|
9
|
+
*
|
|
10
|
+
* This module reads a bundled JSON file only — no network, no API keys.
|
|
11
|
+
*/
|
|
12
|
+
import { readFileSync } from "node:fs";
|
|
13
|
+
import { resolve, dirname } from "node:path";
|
|
14
|
+
import { fileURLToPath } from "node:url";
|
|
15
|
+
/** Sort priority: keyless programmatic services first (most agent-usable), web/GUI last. */
|
|
16
|
+
export const AI_ACCESS_ORDER = { api_nokey: 0, api_key: 1, web: 2 };
|
|
17
|
+
/** Absolute path to the bundled catalog (data/ is two levels up from dist/osint/ or src/osint/). */
|
|
18
|
+
export function resolveCatalogPath() {
|
|
19
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
20
|
+
return resolve(__dirname, "../../data/osint-resources.json");
|
|
21
|
+
}
|
|
22
|
+
/** Load and parse the catalog, throwing on any error. Used by the CI integrity test. */
|
|
23
|
+
export function loadOsintCatalogStrict() {
|
|
24
|
+
const raw = readFileSync(resolveCatalogPath(), "utf-8");
|
|
25
|
+
return JSON.parse(raw);
|
|
26
|
+
}
|
|
27
|
+
let cached = null;
|
|
28
|
+
/** Load the catalog with a module-level memo and a graceful fallback so a missing/corrupt file never crashes the server. */
|
|
29
|
+
export function loadOsintCatalog() {
|
|
30
|
+
if (cached)
|
|
31
|
+
return cached;
|
|
32
|
+
try {
|
|
33
|
+
const cat = loadOsintCatalogStrict();
|
|
34
|
+
// Order keyless programmatic services first so an agent sees what it can use now.
|
|
35
|
+
cat.resources = [...cat.resources].sort((a, b) => (AI_ACCESS_ORDER[a.ai_access] ?? 9) - (AI_ACCESS_ORDER[b.ai_access] ?? 9));
|
|
36
|
+
cached = cat;
|
|
37
|
+
}
|
|
38
|
+
catch (err) {
|
|
39
|
+
console.error("WARNING: Failed to load OSINT catalog — get_osint_guidance resources will be empty:", err);
|
|
40
|
+
cached = { version: "0.0.0", updated: "unknown", resources: [] };
|
|
41
|
+
}
|
|
42
|
+
return cached;
|
|
43
|
+
}
|
|
44
|
+
/** Condense one entry to the fields shown in the topic:"all" index. */
|
|
45
|
+
export function condense(r) {
|
|
46
|
+
return {
|
|
47
|
+
name: r.name,
|
|
48
|
+
ioc_types: r.ioc_types,
|
|
49
|
+
access: r.access,
|
|
50
|
+
ai_access: r.ai_access,
|
|
51
|
+
query_disclosing: r.query_disclosing,
|
|
52
|
+
content_disclosing: r.content_disclosing,
|
|
53
|
+
best_use: r.best_use,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/** The full catalog condensed (topic:"all"). */
|
|
57
|
+
export function condensedCatalog() {
|
|
58
|
+
return loadOsintCatalog().resources.map(condense);
|
|
59
|
+
}
|
|
60
|
+
/** Full-detail entries whose ioc_types include the given type (ioc_type slice). */
|
|
61
|
+
export function resourcesForIocType(iocType) {
|
|
62
|
+
return loadOsintCatalog().resources.filter((r) => r.ioc_types.includes(iocType));
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/osint/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAQzC,4FAA4F;AAC5F,MAAM,CAAC,MAAM,eAAe,GAA6B,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;AAmC9F,oGAAoG;AACpG,MAAM,UAAU,kBAAkB;IAChC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AAM,EAAE,CAAC,CAAC,MAAM;QAChB,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,gBAAgB,EAAE,CAAC,CAAC,gBAAgB;QACpC,kBAAkB,EAAE,CAAC,CAAC,kBAAkB;QACxC,QAAQ,EAAE,CAAC,CAAC,QAAQ;KACrB,CAAC;AACJ,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,gBAAgB;IAC9B,OAAO,gBAAgB,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpD,CAAC;AAED,mFAAmF;AACnF,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,OAAO,gBAAgB,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capa.d.ts","sourceRoot":"","sources":["../../src/parsers/capa.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAW,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"capa.d.ts","sourceRoot":"","sources":["../../src/parsers/capa.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAW,YAAY,EAAE,MAAM,YAAY,CAAC;AAsG1E;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,YAAY,EAAE,GAAG,SAAS,CA4B7F;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAsEnE"}
|