Dark Web

osint

Dark Web

Definition

The dark web refers to encrypted overlay networks that exist on top of the public internet but require specialized software, configurations, or authorization to access. The most well-known dark web network is Tor (The Onion Router), which routes traffic through multiple relay nodes with layered encryption, providing anonymity for both users and service operators. Unlike the surface web (indexed by search engines) or the deep web (unindexed but accessible via standard browsers), dark web content is intentionally hidden and accessible only through protocol-specific clients.

Dark web services use .onion addresses (Tor) or .i2p addresses (I2P) that resolve only within their respective overlay networks. These hidden services do not reveal their IP addresses, making attribution and takedown efforts significantly more difficult than for surface web infrastructure. This property makes the dark web a critical domain for OSINT practitioners who must monitor for organizational threats including credential leaks, data breaches, ransomware negotiations, and emerging attack tooling.

For intelligence platforms, the dark web represents both a collection challenge and a high-value intelligence source. The ephemeral nature of dark web services (average uptime measured in weeks to months), the absence of conventional indexing, and the operational security requirements for collection make automated, resilient monitoring systems essential. The Prismatic Platform integrates dark web monitoring through its OSINT tool registry, enabling structured collection, analysis, and alerting workflows.

The distinction between the surface web, deep web, and dark web is fundamental to understanding collection requirements:

LayerAccessibilityIndexingSize EstimateOSINT Relevance
Surface WebStandard browsers, no authenticationFully indexed by search engines~5% of total webBaseline intelligence, public records
Deep WebStandard browsers, authentication requiredNot indexed (databases, intranets, paywalls)~90% of total webAccount data, proprietary databases
Dark WebSpecialized software (Tor, I2P)Not indexed by conventional engines~5% of total webThreat intelligence, leaked data, adversary comms

Core Concepts

ConceptDescriptionIntelligence Value
Onion RoutingMulti-layer encryption through relay nodes providing sender/receiver anonymityUnderstanding routing enables traffic analysis and de-anonymization research
Hidden ServicesServices accessible only within the overlay network via .onion/.i2p addressesPrimary targets for dark web OSINT collection
Rendezvous ProtocolBoth client and server build circuits to a shared meeting pointProtocol analysis enables service fingerprinting
Entry GuardFirst hop in Tor circuit, knows client IP but not destinationGuard node analysis can reveal access patterns
Exit NodeFinal hop to clearnet (not used for hidden services)Exit node monitoring for data exfiltration
Credential MarketsMarketplaces trading stolen credentials, databases, and accessEarly warning for organizational compromise
Paste SitesAnonymous text sharing services often hosting leaked dataRapid indicator extraction for threat detection
Underground ForumsDiscussion boards for threat actors, tool sharing, and collaborationAdversary TTP (Tactics, Techniques, Procedures) intelligence
Ransomware Leak SitesExtortion sites where ransomware groups publish stolen dataVictim identification and impact assessment
Dark Web CrawlersAutomated systems that index dark web content for searchabilityFoundation for dark web monitoring platforms
Operational Security (OPSEC)Practices preventing attribution of collection activitiesMandatory for sustainable dark web monitoring
Time DecayIntelligence value diminishes rapidly for ephemeral dark web contentPrioritization framework for collection and analysis

Network Architecture

ComponentFunctionOSINT RelevanceCollection Challenge
Entry GuardFirst hop, knows client IPGuard node analysis can reveal access patternsGuard rotation periods, limited guard sets
Middle RelayIntermediate hopTraffic correlation resistanceNo direct intelligence value
Exit NodeFinal hop to clearnetExit node monitoring for data exfiltrationOnly relevant for clearnet-bound traffic
Hidden Service.onion endpointPrimary target for dark web OSINT collectionEphemeral, requires discovery mechanisms
Rendezvous PointMeeting node for hidden service connectionsProtocol analysis for service fingerprintingTransient, different per connection
Directory AuthorityConsensus mechanism for relay informationNetwork topology intelligencePublicly available, well-monitored
Bridge RelayUnlisted entry point for censorship circumventionAdversary infrastructure identificationIntentionally hidden from public listing

Threat Categories Monitored

CategoryDescriptionDetection MethodUrgency
Credential LeakStolen usernames, passwords, API keys, tokensKeyword monitoring, regex matchingCritical -- immediate action required
Data BreachBulk organizational data (databases, documents, PII)Organization name monitoring, domain matchingCritical -- containment and notification
Ransomware LeakData published by ransomware groups as extortion leverageLeak site monitoring, victim name matchingHigh -- impact assessment required
Threat Actor TTPsForum discussions about techniques, tools, and proceduresTopic monitoring, adversary trackingMedium -- defensive posture updates
Exploit TradingZero-day and N-day exploit sales and advertisementsVulnerability keyword monitoringHigh -- patching prioritization
Infrastructure SalesCompromised server access, botnet rental, proxy servicesInfrastructure keyword monitoringMedium -- network defense updates
Insider ThreatEmployees offering internal access or dataOrganization-specific monitoringCritical -- HR and legal escalation

Technical Deep Dive

Tor Network Architecture

The Tor network implements onion routing through a three-hop circuit: the entry guard (knows the client but not the destination), the middle relay (knows neither), and the exit node (knows the destination but not the client). Hidden services add a rendezvous protocol where both client and server build circuits to a shared rendezvous point, meaning neither party reveals their network location.

The hidden service protocol involves six steps: the service generates a long-term key pair, selects introduction points, publishes a service descriptor to the distributed hash table, the client retrieves the descriptor, both parties build circuits to a rendezvous point, and the connection is established through layered encryption. This protocol provides mutual anonymity but introduces latency (typically 2-10 seconds for initial connection) and reliability challenges (circuit failures require full re-establishment).

Collection Architecture

Dark web intelligence collection requires a layered architecture that handles discovery, access, collection, normalization, and analysis:

LayerFunctionTechnologyPlatform Integration
DiscoveryFinding new hidden services and content sourcesCrawlers, DHT scanning, forum scrapingOSINT tool registry auto-discovery
AccessMaintaining reliable connectivity to dark web networksTor client pools, circuit management, retry logicIsolated collection environment
CollectionExtracting content from discovered sourcesHTML parsing, API integration, screenshot captureOSINT adapter framework
NormalizationConverting raw content to structured intelligenceNLP, regex extraction, entity recognitionPrismaticOsintCore processing pipeline
AnalysisEvaluating relevance and assessing threat levelScoring models, pattern matching, analyst reviewEnsemble scoring engine
AlertingNotifying relevant stakeholders of findingsPubSub, email, webhook, dashboard updatesReal-time LiveView dashboards

Operational Security Requirements

RequirementImplementationConsequence of Violation
Network IsolationDedicated collection infrastructure separate from productionAttribution of collection activities to organization
Identity SeparationUnique personas per source, no cross-contaminationCompromise of one identity exposes all collection
Rate LimitingThrottled requests mimicking human browsing patternsDetection and blocking by service operators
Session RotationRegular Tor circuit rotation and credential cyclingPattern-based identification of automated collection
Data SanitizationStrip metadata from collected artifacts before analysisLeaked operational details in stored intelligence
Access LoggingImmutable audit trail of all collection activitiesCompliance violations, legal liability

Usage in Prismatic Platform

The Prismatic Platform integrates dark web monitoring through its OSINT tool registry, providing automated collection and analysis of dark web intelligence sources. The platform's 157 self-registering OSINT tools include adapters for dark web data aggregation services that index Tor hidden services, paste sites, and underground forums.

Integration Architecture

The platform does not connect directly to Tor hidden services from production infrastructure. Instead, it integrates with dark web aggregation APIs that maintain their own collection infrastructure. These aggregation services crawl dark web sources, normalize the data, and expose it through REST APIs that the platform's OSINT adapters consume safely from standard network environments.

Integration PointService TypeData ProvidedUpdate Frequency
Credential MonitoringAggregation APILeaked credentials matching monitored domainsNear real-time
Paste MonitoringAggregation APIPaste site content matching keywords/domainsMinutes
Forum MonitoringAggregation APIForum posts matching adversary tracking queriesHours
Leak Site MonitoringAggregation APIRansomware leak site victim listingsHours
Market MonitoringAggregation APIMarketplace listings for organizational dataDaily

Alert Pipeline

Dark web findings flow through a multi-stage alert pipeline: raw findings are collected by OSINT adapters, scored by the relevance engine, deduplicated against known findings, and dispatched to appropriate channels based on severity and category.

Code Examples

defmodule PrismaticOsintCore.Tools.DarkWebMonitor do
  @moduledoc """
  Dark web monitoring adapter for the Prismatic OSINT tool registry.
  Queries aggregation services for mentions of specified domains,
  email addresses, and organizational identifiers.

  This adapter does not connect to Tor directly -- it integrates with
  dark web aggregation APIs that maintain their own collection
  infrastructure, ensuring production network isolation.
  """

  use PrismaticOsintCore.Tool

  register_tool(%{
    slug: "dark-web-monitor",
    name: "Dark Web Monitor",
    category: :global,
    api_style: :provider,
    input_fields: [
      %{name: :query, type: :text, label: "Search Query (domain, email, keyword)", required: true},
      %{name: :time_range, type: :select, label: "Time Range",
        options: ["24h", "7d", "30d", "90d"], required: false},
      %{name: :categories, type: :multi_select, label: "Categories",
        options: ["credentials", "paste", "forum", "leak_site", "market"], required: false}
    ],
    requires_auth: true,
    description: "Monitor dark web sources for organizational threats"
  })
end
defmodule Prismatic.DarkWeb.AlertEngine do
  @moduledoc """
  Processes dark web intelligence findings and generates
  prioritized alerts based on organizational relevance scoring.
  Implements time decay on findings and deduplication against
  previously seen indicators.

  Subscribes to the "osint:dark_web" PubSub topic and publishes
  high-relevance findings to "alerts:security" for dashboard
  display and notification dispatch.
  """

  use GenServer

  require Logger

  @type finding :: %{
    source: String.t(),
    content: String.t(),
    timestamp: DateTime.t(),
    relevance_score: float(),
    category: :credential_leak | :data_breach | :threat_actor | :vulnerability | :ransomware | :insider_threat,
    indicators: list(String.t()),
    source_reliability: float()
  }

  @type alert :: %{
    finding: finding(),
    priority: :critical | :high | :medium | :low,
    timestamp: DateTime.t(),
    deduplicated: boolean()
  }

  @type state :: %{
    domains: list(String.t()),
    findings: list(finding()),
    alert_count: non_neg_integer(),
    seen_indicators: MapSet.t(),
    last_cleanup: DateTime.t()
  }

  @alert_threshold 0.7
  @max_findings 10_000
  @cleanup_interval_ms 300_000

  @doc """
  Starts the dark web alert engine with a list of monitored domains.

  ## Examples

      iex> {:ok, pid} = Prismatic.DarkWeb.AlertEngine.start_link(domains: ["example.com"])
      iex> is_pid(pid)
      true

  """
  @spec start_link(keyword()) :: GenServer.on_start()
  def start_link(opts) do
    GenServer.start_link(__MODULE__, opts, name: __MODULE__)
  end

  @doc """
  Returns the current alert statistics including total findings
  processed, alerts generated, and unique indicators seen.
  """
  @spec stats() :: map()
  def stats do
    GenServer.call(__MODULE__, :stats)
  end

  @impl GenServer
  def init(opts) do
    monitored_domains = Keyword.fetch!(opts, :domains)
    Phoenix.PubSub.subscribe(Prismatic.PubSub, "osint:dark_web")
    schedule_cleanup()

    Logger.info("Dark web alert engine started",
      domain_count: length(monitored_domains)
    )

    {:ok, %{
      domains: monitored_domains,
      findings: [],
      alert_count: 0,
      seen_indicators: MapSet.new(),
      last_cleanup: DateTime.utc_now()
    }}
  end

  @impl GenServer
  def handle_call(:stats, _from, state) do
    stats = %{
      monitored_domains: length(state.domains),
      total_findings: length(state.findings),
      total_alerts: state.alert_count,
      unique_indicators: MapSet.size(state.seen_indicators)
    }

    {:reply, stats, state}
  end

  @impl GenServer
  def handle_info({:dark_web_finding, finding}, state) do
    relevance = calculate_relevance(finding, state.domains)
    deduplicated = any_indicator_seen?(finding.indicators, state.seen_indicators)

    enriched_finding = %{finding | relevance_score: relevance}

    state =
      if relevance > @alert_threshold and not deduplicated do
        priority = categorize_priority(finding.category, relevance)

        alert = %{
          finding: enriched_finding,
          priority: priority,
          timestamp: DateTime.utc_now(),
          deduplicated: false
        }

        Phoenix.PubSub.broadcast(
          Prismatic.PubSub,
          "alerts:security",
          {:dark_web_alert, alert}
        )

        Logger.warning("Dark web alert generated",
          category: finding.category,
          priority: priority,
          relevance: relevance
        )

        %{state |
          alert_count: state.alert_count + 1,
          seen_indicators: add_indicators(state.seen_indicators, finding.indicators)
        }
      else
        state
      end

    findings = [enriched_finding | Enum.take(state.findings, @max_findings - 1)]
    {:noreply, %{state | findings: findings}}
  end

  @impl GenServer
  def handle_info(:cleanup, state) do
    now = DateTime.utc_now()
    cutoff = DateTime.add(now, -86_400, :second)

    fresh_findings = Enum.filter(state.findings, fn f ->
      DateTime.compare(f.timestamp, cutoff) == :gt
    end)

    Logger.info("Dark web alert engine cleanup",
      removed: length(state.findings) - length(fresh_findings),
      remaining: length(fresh_findings)
    )

    schedule_cleanup()
    {:noreply, %{state | findings: fresh_findings, last_cleanup: now}}
  end

  @spec calculate_relevance(finding(), list(String.t())) :: float()
  defp calculate_relevance(finding, domains) do
    domain_score = Enum.count(domains, &String.contains?(finding.content, &1))
    domain_ratio = domain_score / max(length(domains), 1)

    category_weight = case finding.category do
      :credential_leak -> 1.0
      :insider_threat -> 1.0
      :data_breach -> 0.9
      :ransomware -> 0.85
      :vulnerability -> 0.7
      :threat_actor -> 0.6
    end

    time_decay = calculate_time_decay(finding.timestamp)
    source_weight = finding.source_reliability

    (domain_ratio * 0.4 + category_weight * 0.3 + source_weight * 0.2 + time_decay * 0.1)
    |> min(1.0)
    |> max(0.0)
  end

  @spec calculate_time_decay(DateTime.t()) :: float()
  defp calculate_time_decay(timestamp) do
    age_hours = DateTime.diff(DateTime.utc_now(), timestamp, :second) / 3600.0
    max(1.0 - age_hours / 168.0, 0.0)
  end

  @spec categorize_priority(atom(), float()) :: :critical | :high | :medium | :low
  defp categorize_priority(category, relevance) do
    cond do
      category in [:credential_leak, :insider_threat] and relevance > 0.8 -> :critical
      category in [:data_breach, :ransomware] and relevance > 0.7 -> :high
      relevance > 0.8 -> :high
      relevance > 0.6 -> :medium
      true -> :low
    end
  end

  @spec any_indicator_seen?(list(String.t()), MapSet.t()) :: boolean()
  defp any_indicator_seen?(indicators, seen) do
    Enum.any?(indicators, &MapSet.member?(seen, &1))
  end

  @spec add_indicators(MapSet.t(), list(String.t())) :: MapSet.t()
  defp add_indicators(seen, indicators) do
    Enum.reduce(indicators, seen, &MapSet.put(&2, &1))
  end

  @spec schedule_cleanup() :: reference()
  defp schedule_cleanup do
    Process.send_after(self(), :cleanup, @cleanup_interval_ms)
  end
end
defmodule Prismatic.DarkWeb.IndicatorExtractor do
  @moduledoc """
  Extracts structured indicators of compromise (IOCs) from raw
  dark web findings. Supports extraction of email addresses, domains,
  IP addresses, hashes, and cryptocurrency wallet addresses.

  Each extracted indicator is tagged with its type, confidence level,
  and source context for downstream correlation and alerting.
  """

  @type indicator_type :: :email | :domain | :ipv4 | :hash_md5 | :hash_sha256 | :crypto_wallet | :url
  @type indicator :: %{
    type: indicator_type(),
    value: String.t(),
    confidence: float(),
    context: String.t()
  }

  @doc """
  Extracts all recognized indicator types from raw text content.
  Returns a deduplicated list of indicators with confidence scores.

  ## Examples

      iex> text = "leaked: admin@example.com password123"
      iex> indicators = Prismatic.DarkWeb.IndicatorExtractor.extract(text)
      iex> Enum.any?(indicators, & &1.type == :email)
      true

  """
  @spec extract(String.t()) :: list(indicator())
  def extract(text) when is_binary(text) do
    [
      extract_emails(text),
      extract_domains(text),
      extract_ipv4(text),
      extract_hashes(text)
    ]
    |> List.flatten()
    |> Enum.uniq_by(& &1.value)
  end

  @spec extract_emails(String.t()) :: list(indicator())
  defp extract_emails(text) do
    ~r/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/
    |> Regex.scan(text)
    |> List.flatten()
    |> Enum.map(fn email ->
      %{type: :email, value: email, confidence: 0.9, context: "email_pattern"}
    end)
  end

  @spec extract_domains(String.t()) :: list(indicator())
  defp extract_domains(text) do
    ~r/\b(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}\b/
    |> Regex.scan(text)
    |> List.flatten()
    |> Enum.reject(&String.contains?(&1, "@"))
    |> Enum.map(fn domain ->
      %{type: :domain, value: domain, confidence: 0.7, context: "domain_pattern"}
    end)
  end

  @spec extract_ipv4(String.t()) :: list(indicator())
  defp extract_ipv4(text) do
    ~r/\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/
    |> Regex.scan(text)
    |> List.flatten()
    |> Enum.map(fn ip ->
      %{type: :ipv4, value: ip, confidence: 0.8, context: "ipv4_pattern"}
    end)
  end

  @spec extract_hashes(String.t()) :: list(indicator())
  defp extract_hashes(text) do
    md5 = ~r/\b[a-fA-F0-9]{32}\b/
    sha256 = ~r/\b[a-fA-F0-9]{64}\b/

    md5_matches = Regex.scan(md5, text) |> List.flatten() |> Enum.map(fn h ->
      %{type: :hash_md5, value: h, confidence: 0.6, context: "md5_pattern"}
    end)

    sha256_matches = Regex.scan(sha256, text) |> List.flatten() |> Enum.map(fn h ->
      %{type: :hash_sha256, value: h, confidence: 0.8, context: "sha256_pattern"}
    end)

    md5_matches ++ sha256_matches
  end
end

Common Pitfalls

PitfallDescriptionConsequencePrevention
Direct Tor Access from ProductionConnecting to .onion services from production infrastructureAttribution of collection to organization, network compromiseUse aggregation APIs, isolated collection environments
Ignoring Time DecayTreating stale dark web findings as equally relevant to fresh onesResource waste on expired threats, false prioritizationImplement time-decay scoring, auto-expire old findings
Single-Source RelianceDepending on one aggregation API for all dark web intelligenceBlind spots when that source has coverage gapsMulti-source collection with cross-reference validation
Over-AlertingGenerating alerts for every dark web mention regardless of relevanceAlert fatigue, critical findings lost in noiseRelevance scoring with configurable thresholds
Missing DeduplicationAlerting on the same finding multiple times across sourcesWasted analyst time, inflated threat metricsIndicator-based deduplication with seen-set tracking
Credential ValidationAttempting to validate leaked credentials against production systemsLegal liability, audit violations, potential lockoutsNever validate -- treat all leaked credentials as compromised
OPSEC ViolationsUsing organizational email/credentials for dark web researchExposure of intelligence requirements to adversariesDedicated personas, isolated infrastructure
Ignoring ContextExtracting indicators without source contextInability to assess reliability or prioritize responseAlways store source metadata with extracted indicators
Unbounded CollectionCollecting all dark web content without scope limitsStorage bloat, processing bottlenecks, legal riskDefine collection scope, implement data retention policies
Missing Legal ReviewOperating dark web monitoring without legal counsel reviewCompliance violations in certain jurisdictionsLegal review of monitoring scope and data handling

Best Practices

  1. Never access dark web services directly from production infrastructure -- use isolated collection environments with dedicated network paths to prevent attribution. The Prismatic Platform integrates with aggregation APIs exclusively.

  2. Implement multi-layer relevance scoring -- combine domain matching, category weighting, source reliability, and time decay into a composite relevance score. Only alert on findings exceeding a configurable threshold.

  3. Deduplicate findings at the indicator level -- track seen indicators (emails, domains, hashes) in a persistent set and suppress duplicate alerts. New context for known indicators may warrant re-alerting at reduced priority.

  4. Apply time decay aggressively -- dark web intelligence has a half-life measured in hours to days. Findings older than 7 days should carry significantly reduced relevance scores, and findings older than 90 days should be archived.

  5. Cross-reference findings with surface web intelligence -- dark web intelligence gains value when correlated with other OSINT sources through the platform's interconnection engine. A credential leak correlated with a known breach is higher confidence than an isolated finding.

  6. Implement rate limiting and session rotation -- dark web services and aggregation APIs actively detect and block automated crawlers. Respect rate limits and rotate sessions to maintain sustainable collection.

  7. Validate and sanitize all collected data -- dark web content frequently contains malicious payloads, deceptive information, and planted disinformation. Never execute downloaded content; treat all findings as potentially adversary-crafted.

  8. Maintain operational security (OPSEC) -- collection activities should not reveal organizational identity or intelligence requirements. Use dedicated personas, isolated infrastructure, and compartmented access.

  9. Categorize findings by response urgency -- credential leaks and insider threats require immediate response; threat actor TTP intelligence can be processed during regular analysis cycles. Match alerting cadence to category urgency.

  10. Implement comprehensive audit logging -- all dark web monitoring activities must be logged in an immutable audit trail for compliance, legal review, and operational accountability. Log what was collected, when, from where, and by whom.

  • OSINT -- Open source intelligence methodology encompassing dark web collection
  • Threat Intelligence -- Strategic and tactical intelligence derived from dark web monitoring
  • Data Breach -- Unauthorized data exposure often traded on dark web marketplaces
  • IOC -- Indicators of compromise discovered through dark web monitoring
  • Intelligence Fusion -- Combining dark web findings with other intelligence sources
  • Tor -- The Onion Router network providing dark web infrastructure
  • Deep Web -- Unindexed web content distinct from encrypted dark web
  • Threat Hunting -- Proactive threat detection incorporating dark web intelligence
  • PubSub -- Event system for real-time dark web alert distribution
  • GenServer -- Process model for alert engine and monitoring services
  • ETS -- In-memory storage for indicator deduplication sets
  • Ensemble -- Multi-source scoring methods applied to dark web findings
  • Paste Site

See Also

  • OSINT Tools -- Platform OSINT tool registry including dark web adapters
  • Capabilities -- Intelligence collection capabilities overview
  • Architecture -- Platform architecture supporting real-time intelligence
  • Technologies -- Technology stack details
  • Security -- Security architecture and operations

Connect & Contribute

Created by Tomas Korcak (korczis) | Open Source under GHL