Skip to content

Rebuild dark-mcp on AIL Framework - #1

Merged
homanp merged 40 commits into
mainfrom
codex/full-source-registry
Oct 20, 2026
Merged

homanp merged 40 commits into
mainfrom
codex/full-source-registry

Conversation

@homanp

@homanp homanp commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Rebuild dark-mcp as an MCP interface to AIL Framework. Collection, retained objects, processing and full-text search now run through genuine AIL workers, Lacus/Tor and Meilisearch. The old custom collectors, catalog and evidence database are removed from the active implementation. Version 1.0.0 is a breaking tool/configuration change with a fresh corpus.

Add a pinned local deployment and authenticated compatibility routes calling AIL's existing search/object libraries. Ten bounded MCP tools cover explicit page collection, retained capture history, keyword search, original objects, ingested chats and labelled operator submissions. Monitoring and alert delivery remain outside scope.

Document an agent-driven workflow for broad and deep research: inventory actual source coverage, expand entity/intent queries, discover original threads, collect within budgets, reconcile asynchronous captures, inspect original content, pivot on substantiated leads and report provenance and access gaps. Add root AGENTS.md with repository architecture, development checks, research instructions and private-data handling.

Validation:

  • 21 adapter tests, lint/format checks, package build, Compose configuration and documentation link checks passed locally on the final revision.
  • AIL, Lacus and MCP images built on ARM64; AIL dependency consistency check passed during runtime validation.
  • Initial real MCP stdio validation collected one original onion thread and three Telegram preview pages. Their source URLs and bodies remained retrievable after AIL restarted. Unauthenticated compatibility API access returned 401.
  • Expanded real MCP validation attempted nine additional URLs and retained nine HTML bodies: three readable original threads, two forum listings, two public Telegram previews, one gated claim-only thread and one landing page. The combined corpus contained 13 page bodies plus 13 derived titles, not 26 independent sources.
  • All 31 final keyword-query API calls succeeded. Original content revealed account-procurement intent and an unverified capability advertisement; no company-specific imminent attack or pre-disclosure detection was demonstrated.
  • Firecrawl, Exa, Replit, Lovable, Legora and Cursor checks yielded no substantiated entity matches in this bounded corpus. Nine fuzzy Exa/Replit hits were rejected after original-content inspection. A channel repost sample lagged its own claimed event dates by 37–67 days (median 48); these were not independently verified incident dates.

Live testing exposed an experimental substring false negative, so that mode is excluded. Native keyword search has typo/prefix tolerance and requires original-content checks. Temporary task removal is not a success receipt: retained URLs, collection times and bodies must be reconciled, including late captures on shared hostnames. Ordinary non-crawled operator imports are stored but excluded from upstream full-text indexing.

See README.md, AGENTS.md, docs/research-playbook.md, docs/architecture.md, docs/validation-2026-10-20.md and docs/expanded-validation-2026-10-20.md. Raw source bodies, credentials, sessions and local protocol receipts are not committed. Public page access is demonstrated; native Telegram ingestion, authenticated forums and OCR require separate configuration. The evidence does not establish detection before compromise/disclosure or commercial coverage parity.

@open-cla

open-cla Bot commented Oct 18, 2026

Copy link
Copy Markdown

Contributor License Agreement

All contributors have CLA coverage or an explicit repository exemption.

Explicitly exempt from the CLA (not signed):

@homanp homanp changed the title Expose full source registry and agent-directed collection Add source registry, persistent evidence, and resumable collection Oct 19, 2026
@homanp homanp changed the title Add source registry, persistent evidence, and resumable collection Add source registry, persistent evidence and original forum collection Oct 19, 2026
@homanp homanp changed the title Add source registry, persistent evidence and original forum collection Add original-source collection and persistent MCP evidence Oct 19, 2026
@homanp homanp changed the title Add original-source collection and persistent MCP evidence Add native source collection, forum sessions and persistent MCP evidence Oct 19, 2026
@homanp homanp changed the title Add native source collection, forum sessions and persistent MCP evidence Add original forum collection and persistent MCP evidence Oct 19, 2026
@homanp homanp changed the title Add original forum collection and persistent MCP evidence Add original-source collection, Telegram research imports and persistent evidence Oct 19, 2026
@homanp homanp changed the title Add original-source collection, Telegram research imports and persistent evidence Add original-source collection and Telegram investigation tools Oct 19, 2026
@homanp homanp changed the title Add original-source collection and Telegram investigation tools Add original-source collection and investigation tools Oct 19, 2026

@superagent-security superagent-security Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superagent found 1 security concern(s).

Comment thread src/dark_mcp/forums.py Outdated
records = await asyncio.get_running_loop().getaddrinfo(host, 443, type=socket.SOCK_STREAM)
addresses = list(dict.fromkeys(row[4][0] for row in records))
if not addresses or any(
not ipaddress.ip_address(ip).is_global or ipaddress.ip_address(ip).is_multicast for ip in addresses

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Forum DNS validation accepts NAT64 IPv6 addresses and can route HTTPS requests to internal IPv4

NAT64 IPv6 (64:ff9b::/96) passes is_global, so a forum AAAA record can route the server to internal IPv4.

Reject is_reserved and transition prefixes (64:ff9b::/96, 6to4, IPv4-mapped) before connecting; add NAT64 tests.

AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.

<file name="src/dark_mcp/forums.py">
<violation number="1" location="src/dark_mcp/forums.py:180">
<priority>P2</priority>
<title>Forum DNS validation accepts NAT64 IPv6 addresses and can route HTTPS requests to internal IPv4</title>
<evidence>public_addresses() rejects only addresses for which `not ipaddress.ip_address(ip).is_global or ...is_multicast` is true. Python's `is_global` classifies the NAT64 well-known prefix `64:ff9b::/96` as globally routable (confirmed across supported Python versions), even though it is reserved and encodes an IPv4 destination. For example, `64:ff9b::7f00:1` encodes 127.0.0.1 and `64:ff9b::a9fe:a9fe` encodes 169.254.169.254. A compromised or attacker-controlled allowlisted forum can return such an AAAA record; `_request` then pins that address and performs an HTTPS GET with the forum Host/SNI. This defeats the private-address guard. TLS hostname verification still limits full response retrieval unless the internal endpoint presents a trusted certificate for the requested forum host, so treat this as an internal-reachability/blind-SSRF bypass, not guaranteed metadata disclosure.</evidence>
<recommendation>Reject `is_reserved` in addition to non-global/multicast addresses, and explicitly deny IPv4-embedded IPv6 transition prefixes such as `::ffff:0:0/96`, `64:ff9b::/96`, `64:ff9b:1::/48`, `2002::/16`, and `2001::/32` before connecting. Add regression tests for NAT64/6to4/IPv4-mapped answers and an egress firewall rule blocking private and link-local destinations.</recommendation>
</violation>
</file>

@homanp homanp changed the title Add original-source collection and investigation tools Rebuild dark-mcp on AIL Framework Oct 20, 2026
@superagent-security

Copy link
Copy Markdown

Superagent didn't find any vulnerabilities or security issues in this PR.

@homanp
homanp merged commit a2e2c13 into main Oct 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant