← All hunts medium TLP:CLEAR

Exploit and Multi-Hop Proxy C2

An adversary has exploited a critical vulnerability on a public-facing host and is masking command-and-control traffic through a multi-hop proxy or onion routing network.

Based on research by Elastic Security Labs 2026-09-20 9 steps · 3 queries T1090.003 T1190

Brief

Why now 10:17 AM 1/23/2025

The speed of vulnerability discovery is increasing. As Elastic Security Labs describes in From vulnerability report to CVE draft in minutes: how Elastic automated security advisories with AI (https://www.elastic.co/security-labs/blog/security-advisory-automation-rag-elastic-agent-builder), automation now allows for rapid generation of security advisories. This same speed benefits adversaries. When a new vulnerability breaks, attackers use automated tools to find and exploit unpatched systems. This hunt focuses on identifying the immediate aftermath: a host that remains unpatched and begins communicating with proxy-based command-and-control infrastructure.

How the hunt flows

The first phase identifies the attack surface. The hunt queries vulnerability management data for systems with unresolved critical vulnerabilities. These hostnames provide the scope for the following behavioral checks. Filtering by severity ensures the hunt focuses on the most likely entry points for an external intruder.

Next, the hunt inspects outbound network connections from these specific hosts. It looks for traffic on common proxy ports like 1080, 9050, or 8080. To separate legitimate business tools from C2, the query calculates the prevalence of each destination IP and port across the fleet. It flags connections to destinations seen on three or fewer hosts, suggesting private or adversary-controlled infrastructure rather than a standard corporate proxy.

Simultaneously, the hunt monitors HTTP activity for signs of live research. It looks for servers visiting MITRE documentation for CWE and CAPEC definitions. While developers might do this from workstations, an internal server suddenly requesting exploit-related documentation suggests an attacker or an automated tool on the host is gathering context for local privilege escalation or lateral movement. The hunt specifically looks for paths like /data/definitions/699.html referenced in automated research flows.

In the triage phase, an agent evaluates the overlap between vulnerability and behavior. A host that is both unpatched and exhibiting rare proxy egress or unusual research activity receives a high-confidence verdict for compromise. The hunt then routes these hosts for isolation and process-level investigation to identify the malicious binary.

This is a hunt, not a detection, because standard alerts on proxy ports are often too noisy for general use. Many legitimate tools use these ports for administrative tasks. By scoping the data to known vulnerable hosts and using prevalence to isolate rare traffic, an analyst can find stealthy C2 that an automated alert would miss or bury in false positives.

What the hunt cannot see

This hunt relies on the presence of HTTP telemetry. If servers do not log outbound web requests, the hunt cannot see the research activity and must rely solely on network connection patterns. Additionally, the scoping step only identifies managed devices. If an unmanaged or shadow-IT host is exploited, it will not appear in the initial list of vulnerable hosts. Attackers using standard ports like 443 for proxy traffic will also bypass the egress port check.

Steps

  1. Unresolved critical vulnerabilities

    Query · scoping

    Identify potential beachheads by listing hostnames with unresolved critical vulnerabilities.

    reads hb_vulnerability_findingsql
    SELECT DISTINCT d.hostname AS device_hostname, v.cve_uid, v.severity_id FROM hb_vulnerability_finding v JOIN hb_devices d ON v.device_uid = d.device_uid WHERE v.status = 'UNRESOLVED' AND v.severity_id >= 4

    What a hit looks like. A list of vulnerable hostnames. These systems are the primary targets for exploitation and subsequent proxy activity.

  2. Rare egress on proxy ports

    Query · baseline

    Find hosts connecting to common proxy ports where the destination is rare across the fleet, suggesting private C2 infrastructure.

    reads hb_network_connectionsql
    SELECT device_hostname, process_name, dst_endpoint_ip, dst_endpoint_port, COUNT(DISTINCT device_hostname) AS host_count FROM hb_network_connection WHERE (('{{scope_hosts}}' = '') OR (instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0)) AND direction = 'outbound' AND instr(',' || '{{proxy_ports}}' || ',', ',' || CAST(dst_endpoint_port AS TEXT) || ',') > 0 AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY dst_endpoint_ip, dst_endpoint_port HAVING host_count <= 3

    What a hit looks like. Connections to proxy ports from a small subset of the vulnerable estate. Silence means no proxy-like egress was observed.

  3. MITRE research activity

    Query · enrichment

    Detect requests to specific CWE and CAPEC pages originating from the server, which may indicate an attacker using interactive tools on the host.

    reads hb_http_activitysql
    SELECT device_hostname, url_hostname, url_path, user_agent, time FROM hb_http_activity WHERE (('{{scope_hosts}}' = '') OR (instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0)) AND LOWER(url_hostname) LIKE '%mitre.org%' AND (instr(',' || '{{research_paths}}' || ',', ',' || LOWER(url_path) || ',') > 0 OR LOWER(url_path) LIKE '%/definitions/%') AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. HTTP requests from internal servers to MITRE documentation. This logic assumes the adversary is performing live research or using automated tools that fetch context directly from the host.

  4. Triage verdict

    Agent triage

    Evaluate if the combined indicators suggest a successful exploitation and active proxy-based C2.

  5. Route verdict

    Decision

    Route to isolation if the agent finds evidence of compromise.

  6. Isolate host

    Response action

    Contain the suspected breach by isolating the affected host.

  7. Investigate process

    Analyst task

    Analyze the process responsible for the proxy connections.

  8. Remediate vulnerability

    Analyst task

    Coordinate patching of the identified vulnerabilities.

Coverage

Scenario coverage

StageCoveredHow, or why not
Exploitation of Public-Facing Application
T1190
Yes unresolved-vulnerabilities
Command and Control via Multi-hop Proxy
T1090.003
Yes rare-proxy-egress, mitre-research-activity

Blind spots

  • Needs hb_http_activity on all servers. A server without HTTP logging prevents the hunt from seeing research activity, relying solely on rare egress patterns. It would answer whether the attacker researched the vulnerability directly from the host.
  • Needs complete enrollment in hb_devices. The scoping step only sees devices that report to both the vulnerability scanner and the device inventory provider. It would answer whether vulnerable unmanaged devices are present in the environment.

Parameters & data

Parameters

ParameterTypeDefaultWhat it is
lookback_daysnumber14Days of history to examine.
proxy_portslist[string]1080, 3128, 8080, 9001, 9050Common egress ports used by proxies and Tor nodes.
research_pathslist[path]/data/definitions/699.html, /data/definitions/513.htmlMITRE CWE/CAPEC paths referenced in the report.
scope_hostslist[host]Hosts to include in behavioral queries; paste hostnames from the scoping step here.

Telemetry

SourceCategoryTelemetry
Endpoint telemetry (hb_ surfaces)endpointendpoint
Network telemetrynetworknetwork
Web server / proxy logssiemnetwork

Source

Download hunt.md Definition (JSON) An open hunt.md file; it runs anywhere that reads the format.
---
analysis: "Standard alerts on common proxy ports often produce excessive noise from\
  \ legitimate business tools. This hunt addresses that gap by scoping the data to\
  \ known vulnerable hosts and using prevalence to isolate rare, per-host proxy traffic.\
  \ It also monitors for specific research activity on the host itself\u2014an indicator\
  \ of an attacker seeking technical context on their breach."
blind_spots:
- id: no-http-telemetry
  question: whether the attacker researched the vulnerability directly from the host
  requires: hb_http_activity on all servers
  risk: A server without HTTP logging prevents the hunt from seeing research activity,
    relying solely on rare egress patterns.
  stage: multi-hop-proxy-c2
- id: unmanaged-devices
  question: whether vulnerable unmanaged devices are present in the environment
  requires: complete enrollment in hb_devices
  risk: The scoping step only sees devices that report to both the vulnerability scanner
    and the device inventory provider.
  stage: exploit-public-facing-application
coverage:
- stage: exploit-public-facing-application
  status: covered
  steps:
  - unresolved-vulnerabilities
- stage: multi-hop-proxy-c2
  status: covered
  steps:
  - rare-proxy-egress
  - mitre-research-activity
guardrails:
  claims: no_unsupported
  evidence: citation_required
  missing_data: not_benign
  telemetry: untrusted
hunt:
  applicability: campaign-specific
  handoff: keep-as-periodic-hunt
  justification: Exploitation of public-facing software provides the primary entry
    point for intruders. Correlating unpatched vulnerabilities with proxy-based C2
    and unusual research activity helps identify compromised servers before data exfiltration
    occurs.
  methodology: model-assisted
  trigger: intel-report
hypothesis: An adversary has exploited a critical vulnerability on a public-facing
  host and is masking command-and-control traffic through a multi-hop proxy or onion
  routing network.
labels:
- hunt
- attack.t1190
- attack.t1090.003
name: Exploit and Multi-Hop Proxy C2
parameters:
  lookback_days:
    default: '14'
    description: Days of history to examine.
    type: number
  proxy_ports:
    default:
    - '1080'
    - '3128'
    - '8080'
    - '9001'
    - '9050'
    description: Common egress ports used by proxies and Tor nodes.
    type: list[string]
  research_paths:
    default:
    - /data/definitions/699.html
    - /data/definitions/513.html
    description: MITRE CWE/CAPEC paths referenced in the report.
    from:
      kind: article
      observed: '2026-06-23'
      ref: elastic-security-labs-automation
    type: list[path]
  scope_hosts:
    default: []
    description: Hosts to include in behavioral queries; paste hostnames from the
      scoping step here.
    type: list[host]
provenance:
  authors:
  - name: Huntbase hunt generation
    org: huntbase.io
  generated:
    by: huntbase-hunt-generation
    from: https://www.elastic.co/security-labs/blog/security-advisory-automation-rag-elastic-agent-builder
    gates:
    - dry-run
    - lint
    model: hb_google/gemini-3-flash-preview
rationale: The hunt begins by joining hb_vulnerability_finding and hb_devices to identify
  specific hostnames with unresolved critical vulnerabilities. For the parallel queries
  to work correctly, the analyst must copy the hostnames from this first step into
  the 'scope_hosts' parameter.
references:
- name: 'From vulnerability report to CVE draft in minutes: how Elastic automated
    security advisories with AI'
  url: https://www.elastic.co/security-labs/blog/security-advisory-automation-rag-elastic-agent-builder
related:
- hunt: tor-exit-node-connections
  reason: That hunt uses IP intelligence for known Tor nodes, while this hunt focuses
    on behavioral port patterns and research activity.
  relation: out-of-scope-alternative
scenario:
  stages:
  - name: Exploitation of Public-Facing Application
    observables:
    - vulnerable software components
    - product versions
    - CVE-YYYY-NNNNN
    - ESA-2026-01
    - vulnerability reports
    - CVSS scores
    slug: exploit-public-facing-application
    tactic: initial-access
    techniques:
    - T1190
  - name: Command and Control via Multi-hop Proxy
    observables:
    - CAPEC methodology
    - multi-hop proxy chains
    - onion routing
    - Tor network traffic
    - 699.html
    - 513.html
    - Elastic Crawler
    slug: multi-hop-proxy-c2
    tactic: command-and-control
    techniques:
    - T1090.003
  summary: This intrusion scenario involves the exploitation of vulnerabilities in
    public-facing applications to gain initial access, followed by the establishment
    of command and control using multi-hop proxies and onion routing. The activity
    is documented through an automated pipeline that uses AI to draft security advisories
    by mapping raw vulnerability data to the MITRE CWE and CAPEC catalogs.
severity: medium
targets:
  analyst:
    name: Tier-2 analyst
    role: analyst
  endpoint:
    category: endpoint
    name: Endpoint telemetry (hb_ surfaces)
    telemetry:
    - endpoint
  hunter:
    agent: true
    name: Hunt agent
  network:
    category: network
    name: Network telemetry
    telemetry:
    - network
  web:
    category: siem
    name: Web server / proxy logs
    telemetry:
    - network
tlp: clear
type: investigation
---


# Exploit and Multi-Hop Proxy C2

This hunt identifies internet-facing systems with unresolved high-severity vulnerabilities. It correlates these hosts with network behaviors indicative of multi-hop proxying. The hunt uses vulnerability findings as the lead to scope the investigation and then fans out to inspect egress port patterns and specific HTTP research indicators matching the MITRE documentation referenced in automated vulnerability research. An agent weighs these independent signals to determine if a vulnerable host has been compromised.

## unresolved-vulnerabilities
<!-- Unresolved critical vulnerabilities -->
Identify potential beachheads by listing hostnames with unresolved critical vulnerabilities.

```sqlite target=endpoint role=scoping
~~~yaml
expected: A list of vulnerable hostnames. These systems are the primary targets for
  exploitation and subsequent proxy activity.
reads:
- device_uid
- cve_uid
- severity_id
- status
silence: not_evidence_of_absence
source: hb_vulnerability_finding
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT DISTINCT d.hostname AS device_hostname, v.cve_uid, v.severity_id FROM hb_vulnerability_finding v JOIN hb_devices d ON v.device_uid = d.device_uid WHERE v.status = 'UNRESOLVED' AND v.severity_id >= 4
```

## correlate-egress-indicators
<!-- Correlate egress and research indicators -->
parallel:
- → rare-proxy-egress
- → mitre-research-activity
join: → triage-verdict

## rare-proxy-egress
<!-- Rare egress on proxy ports -->
Find hosts connecting to common proxy ports where the destination is rare across the fleet, suggesting private C2 infrastructure.

```sqlite target=network role=baseline params=(lookback_days=lookback_days, proxy_ports=proxy_ports, scope_hosts=scope_hosts)
~~~yaml
baseline:
  compare: first_seen
  window: '{{lookback_days}}d'
expected: Connections to proxy ports from a small subset of the vulnerable estate.
  Silence means no proxy-like egress was observed.
prevalence:
  by: device_hostname
  key:
  - dst_endpoint_ip
  - dst_endpoint_port
  rare_below: 4
reads:
- device_hostname
- process_name
- dst_endpoint_ip
- dst_endpoint_port
- direction
- time
silence: not_evidence_of_absence
source: hb_network_connection
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT device_hostname, process_name, dst_endpoint_ip, dst_endpoint_port, COUNT(DISTINCT device_hostname) AS host_count FROM hb_network_connection WHERE (('{{scope_hosts}}' = '') OR (instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0)) AND direction = 'outbound' AND instr(',' || '{{proxy_ports}}' || ',', ',' || CAST(dst_endpoint_port AS TEXT) || ',') > 0 AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY dst_endpoint_ip, dst_endpoint_port HAVING host_count <= 3
```

## mitre-research-activity
<!-- MITRE research activity -->
Detect requests to specific CWE and CAPEC pages originating from the server, which may indicate an attacker using interactive tools on the host.

```sqlite target=web role=enrichment params=(lookback_days=lookback_days, research_paths=research_paths, scope_hosts=scope_hosts)
~~~yaml
expected: HTTP requests from internal servers to MITRE documentation. This logic assumes
  the adversary is performing live research or using automated tools that fetch context
  directly from the host.
reads:
- device_hostname
- url_hostname
- url_path
- user_agent
- time
silence: not_evidence_of_absence
source: hb_http_activity
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT device_hostname, url_hostname, url_path, user_agent, time FROM hb_http_activity WHERE (('{{scope_hosts}}' = '') OR (instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0)) AND LOWER(url_hostname) LIKE '%mitre.org%' AND (instr(',' || '{{research_paths}}' || ',', ',' || LOWER(url_path) || ',') > 0 OR LOWER(url_path) LIKE '%/definitions/%') AND time >= datetime('now', '-{{lookback_days}} days')
```

## triage-verdict
<!-- Triage verdict -->
```agent target=hunter
cite: required
context:
- unresolved-vulnerabilities
- rare-proxy-egress
- mitre-research-activity
max_iterations: 3
objective: Identify hosts that are vulnerable AND exhibit either rare proxy egress
  or unusual HTTP research activity.
success_criteria: Verdicts citing specific hosts and evidence rows.
tools:
- endpoint
- network
- web
```

## route-verdict
<!-- Route verdict -->
if~: "the triage verdict is malicious for at least one host" (confidence: high, judge=hunter)
then: → isolate-host
indeterminate: → investigate-process
unavailable: → investigate-process (blind_spot: no-http-telemetry)
else: → remediate-vulnerability

## isolate-host
<!-- Isolate host -->
```action target=endpoint
~~~yaml
approval: required
~~~
Isolate the endpoint and revoke any service account sessions originating from it.
```
→ investigate-process

## investigate-process
<!-- Investigate process -->
```manual target=analyst
Review hb_process_activity for the process_name identified in the proxy egress query. Check for suspicious parent processes and associated file activity.
```
→ remediate-vulnerability

## remediate-vulnerability
<!-- Remediate vulnerability -->
```manual target=analyst
Coordinate with the infrastructure team to patch the affected packages identified in the scoping step. Verify the fix using a subsequent hb_vulnerability_finding read.
```
→ end

Run it

Take this hunt into your environment.

Open it in Huntbase to run every step against your own connections, with Scout weighing the evidence and your analysts in command. Or take the open hunt.md file anywhere that reads the format.

Machine-drafted by huntbase-hunt-generation using hb_google/gemini-3-flash-preview, gated by dry-run, lint, then reviewed by a person.