---
analysis: A static rule for web shells is prone to noise from administrative activity.
  This hunt adds the context of a confirmed vulnerable state and stack-counts outbound
  proxy traffic to isolate rare C2 patterns that simple rules miss.
blind_spots:
- id: vulnerability-data-staleness
  question: whether the vulnerability finding is current or represents a previously
    patched state
  requires: Real-time vulnerability scanning
  risk: The hunt might target systems already remediated but not yet updated in the
    inventory.
  stage: initial-access-vulnerability-exploitation
- id: proxy-port-ambiguity
  question: whether traffic on proxy ports is legitimate administrative traffic or
    multi-hop C2
  requires: Application layer protocol identification
  risk: Common ports like 8080 are frequently used for both proxies and legitimate
    internal services, creating false positives.
  stage: c2-multi-hop-obfuscation
coverage:
- stage: initial-access-vulnerability-exploitation
  status: covered
  steps:
  - vulnerable-internet-assets
- stage: execution-post-exploitation
  status: covered
  steps:
  - web-shell-execution
- stage: c2-multi-hop-obfuscation
  status: covered
  steps:
  - proxy-traffic-prevalence
guardrails:
  claims: no_unsupported
  evidence: citation_required
  missing_data: not_benign
  telemetry: untrusted
hunt:
  applicability: campaign-specific
  handoff: promote-to-detection
  justification: The collapsing patch window creates a period of elevated risk where
    static rules are insufficient; hunting for behavioral indicators of exploitation
    on vulnerable assets provides a necessary adaptive control.
  methodology: model-assisted
  trigger: intel-report
hypothesis: An adversary has exploited a critical vulnerability in a public-facing
  web application during the window before patching and is using a multi-hop proxy
  to mask command-and-control traffic.
labels:
- hunt
- attack.t1190
- attack.t1090.003
name: Exploitation and Obfuscated C2 in the Patch Window
parameters:
  lookback_days:
    default: '14'
    description: Days of history to examine for behavioral signals.
    from:
      kind: manual
      observed: '2024-05-22'
      ref: Default setting
    type: number
  proxy_ports:
    default:
    - '9001'
    - '9050'
    - '1080'
    - '8080'
    description: Ports commonly used by Tor or multi-hop proxy networks.
    from:
      kind: article
      observed: '2024-05-22'
      ref: T1090.003 common ports
    type: list[string]
  scope_hosts:
    default: []
    description: Hostnames identified in the lead step; populate this to run behavioral
      queries on a specific scope.
    from:
      kind: manual
      observed: '2024-05-22'
      ref: Analyst input from lead step
    type: list[host]
  shell_processes:
    default:
    - cmd.exe
    - powershell.exe
    - sh
    - bash
    - zsh
    description: Common shell binaries spawned by exploited web processes.
    from:
      kind: article
      observed: '2024-05-22'
      ref: Standard T1190 artifacts
    type: list[string]
provenance:
  authors:
  - name: Huntbase hunt generation
    org: huntbase.io
  generated:
    by: huntbase-hunt-generation
    from: https://azure.microsoft.com/en-us/blog/the-patch-window-is-collapsing-why-security-needs-a-new-control-plane/
    gates:
    - dry-run
    - lint
    model: hb_google/gemini-3-flash-preview
rationale: Start with internet-facing assets identified by vulnerability scans. Priority
  is given to high-severity findings where an exploit is known to be available.
references:
- name: 'MSRC Blog: The patch window is collapsing'
  url: https://azure.microsoft.com/en-us/blog/the-patch-window-is-collapsing-why-security-needs-a-new-control-plane/
related:
- hunt: container-vulnerability-exploitation
  reason: This hunt focuses on traditional web servers; containers require distinct
    logic on hb_software_inventory.
  relation: out-of-scope-alternative
scenario:
  stages:
  - name: Exploitation of Public-Facing Applications
    observables:
    - HTTP requests targeting specific disclosed CVEs
    - Anomalous HTTP/2 connection patterns (concurrent stream limits, request constraints)
    - Automated vulnerability scanning from external IP addresses
    - Rapid exploitation following public PoC disclosure
    slug: initial-access-vulnerability-exploitation
    tactic: initial-access
    techniques:
    - T1190
  - name: Post-Exploit Execution
    observables:
    - Web server processes (e.g., w3wp.exe, httpd) spawning shell processes (cmd.exe,
      bash)
    - In-memory execution or fileless code delivery
    - Process spawning with unexpected integrity levels
    slug: execution-post-exploitation
    tactic: execution
    techniques:
    - T1190
  - name: Multi-hop Proxy C2
    observables:
    - Outbound connections to Tor exit nodes
    - Communication with Operational Relay Box (ORB) networks
    - DNS lookups for .onion or proxy-related domains
    - Encrypted C2 traffic traversing multiple proxy layers
    slug: c2-multi-hop-obfuscation
    tactic: command-and-control
    techniques:
    - T1090.003
  summary: Adversaries leverage the shrinking window between vulnerability disclosure
    and patch deployment to exploit public-facing applications at internet scale.
    These campaigns often involve rapid, AI-assisted weaponization followed by command-and-control
    traffic routed through multi-hop proxies like Tor or ORB networks to obfuscate
    the origin of the attack.
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
tlp: clear
type: investigation
---


# Exploitation and Obfuscated C2 in the Patch Window

As the time between vulnerability disclosure and weaponization collapses, organizations face elevated risk during the remediation gap. This gated hunt first identifies internet-exposed systems with high-severity exploitable vulnerabilities. If the exposure is confirmed, the hunt fans out to identify behavioral artifacts: web server processes spawning command shells and rare outbound connections to proxy infrastructure. An agent then triages these signals together to identify active intrusions that bypassed initial network controls.

## vulnerable-internet-assets
<!-- Identify exploitable internet-facing assets -->
Find systems with critical vulnerabilities where an exploit is known to be available, providing the lead for behavioral analysis.

```sqlite target=endpoint role=scoping
~~~yaml
expected: A list of hostnames and their critical CVEs. Silence suggests no current
  high-risk exploitable surface in the vulnerability inventory.
reads:
- device_uid
- cve_uid
- severity
- severity_id
- is_exploit_available
- status
- hostname
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, v.affected_package_name FROM hb_vulnerability_finding v JOIN hb_devices d ON v.device_uid = d.device_uid WHERE v.severity_id >= 4 AND v.is_exploit_available = 'TRUE' AND v.status != 'suppressed'
```

## assess-exposure
<!-- Assess exposure risk -->
```agent target=hunter
cite: required
context:
- vulnerable-internet-assets
max_iterations: 3
objective: Determine if any discovered vulnerability on internet-facing hosts represents
  an immediate risk that warrants behavioral monitoring.
success_criteria: A verdict citing specific vulnerable hosts that require follow-up.
tools:
- endpoint
- network
```

## gate-on-exposure
<!-- Gate on identified risk -->
if~: "the assess-exposure verdict confirms at least one high-risk vulnerable host is present" (confidence: high, judge=hunter)
then: → behavior-fan-out
indeterminate: → manual-review
unavailable: → manual-review (blind_spot: vulnerability-data-staleness)
else: → no-exposure-close-out

## behavior-fan-out
<!-- Analyze behavior on vulnerable assets -->
parallel:
- → web-shell-execution
- → proxy-traffic-prevalence
join: → triage-behavior

## web-shell-execution
<!-- Web server shell spawning -->
Identify web server processes spawning interactive shells, a hallmark of successful T1190 exploitation.

```sqlite target=endpoint role=detection-candidate params=(lookback_days=lookback_days, scope_hosts=scope_hosts, shell_processes=shell_processes)
~~~yaml
expected: A web server (w3wp, nginx, apache) spawning a shell process. This is high-confidence
  evidence of exploitation.
reads:
- device_hostname
- process_name
- process_cmd_line
- parent_process_name
- time
silence: not_evidence_of_absence
source: hb_process_activity
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT device_hostname, process_name, process_cmd_line, parent_process_name, time FROM hb_process_activity WHERE (LOWER(parent_process_name) LIKE '%w3wp.exe' OR LOWER(parent_process_name) LIKE '%httpd' OR LOWER(parent_process_name) LIKE '%nginx' OR LOWER(parent_process_name) LIKE '%apache2') AND (instr(',' || '{{shell_processes}}' || ',', ',' || LOWER(process_name) || ',') > 0 OR instr(',' || '{{shell_processes}}' || ',', ',' || replace(LOWER(process_name), rtrim(LOWER(process_name), replace(LOWER(process_name), '\', '')), '') || ',') > 0 OR instr(',' || '{{shell_processes}}' || ',', ',' || replace(LOWER(process_name), rtrim(LOWER(process_name), replace(LOWER(process_name), '/', '')), '') || ',') > 0) AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')
```

## proxy-traffic-prevalence
<!-- Rare outbound proxy connections -->
Find rare outbound connections to proxy or ORB ports from the scoped vulnerable hosts.

```sqlite target=network role=baseline params=(lookback_days=lookback_days, scope_hosts=scope_hosts, proxy_ports=proxy_ports)
~~~yaml
baseline:
  compare: first_seen
  window: '{{lookback_days}}d'
expected: Proxy ports reached by a small number of hosts in the scoped environment.
  Silence suggests no obvious multi-hop C2 via standard proxy ports.
prevalence:
  by: device_hostname
  key:
  - dst_endpoint_ip
  - dst_endpoint_port
  rare_below: 3
reads:
- dst_endpoint_ip
- dst_endpoint_port
- device_hostname
- time
silence: not_evidence_of_absence
source: hb_network_connection
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT dst_endpoint_ip, dst_endpoint_port, COUNT(DISTINCT device_hostname) AS host_count, MIN(time) AS first_seen FROM hb_network_connection WHERE instr(',' || '{{proxy_ports}}' || ',', ',' || CAST(dst_endpoint_port AS TEXT) || ',') > 0 AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY dst_endpoint_ip, dst_endpoint_port HAVING host_count <= 3
```

## triage-behavior
<!-- Triage behavior and exposure -->
```agent target=hunter
cite: required
context:
- assess-exposure
- web-shell-execution
- proxy-traffic-prevalence
max_iterations: 5
objective: Determine if any host shows evidence of post-exploitation execution or
  rare outbound proxy communication within the context of known vulnerabilities.
success_criteria: A per-host verdict (malicious | suspicious | benign) citing specific
  process or network rows.
tools:
- endpoint
- network
```

## route-on-verdict
<!-- Route based on behavioral triage -->
if~: "the triage-behavior verdict is malicious for at least one host" (confidence: high, judge=hunter)
then: → isolate-and-remediate
indeterminate: → manual-review
unavailable: → manual-review (blind_spot: proxy-port-ambiguity)
else: → manual-review

## isolate-and-remediate
<!-- Isolate compromised web server -->
```action target=endpoint
~~~yaml
approval: required
~~~
Isolate the identified host using the endpoint agent. Collect process memory and web server logs for forensic analysis before patching.
```
→ manual-review

## manual-review
<!-- Manual forensic review -->
```manual target=analyst
Examine the command lines of spawned shells. Verify if outbound proxy connections are related to administrative tools or known C2 frameworks.
```
→ end

## no-exposure-close-out
<!-- Close out: No critical exposure -->
```manual target=analyst
Record the negative result. Note that while no exploitable vulnerabilities were identified today, the patch window remains a critical gap for future disclosures.
```
→ end
