← All hunts high TLP:CLEAR Part 2 of 2

AI-Enhanced C2 and Web Proxy Hijacking

An adversary has exploited PHP or Node.js vulnerabilities to deploy a Go-based implant that hides its command-and-control activity by hijacking AI API keys and using local proxies.

Based on research by Cisco Talos 2026-10-30 9 steps · 3 queries T1071.001 T1090 T1190 T1486 T1566

Brief

Why this hunt?

Cisco Talos recently published "A quiet week in infosec" (https://blog.talosintelligence.com/a-quiet-week-in-infosec/), which describes a trend of attackers exploiting web servers to deploy Go-based implants. These implants use hijacked AI API keys to facilitate command-and-control communication. This approach allows malicious traffic to blend into the significant volume of legitimate AI requests in modern environments.

How the Hunt Flows

The first phase identifies the attack surface. It queries the software inventory to list every host running PHP or Node.js interpreters. This scoping step ensures that subsequent behavioral queries focus on the assets most likely to be targeted by the web-based exploits described in the source research. The inventory query includes package versions to help analysts determine if the installed engine version matches known vulnerable releases, though the hunt assumes any presence is a potential risk. The hunt then pivots to network behavior, specifically rare DNS activity. The hunt looks for DNS queries to uncommon domains where the requesting process is the web interpreter itself. This identifies potential command-and-control infrastructure that a web engine has no legitimate reason to contact, providing a clear signal of unauthorized activity. The query aggregates these signals by hostname and count, filtering out common domains to ensure that only truly rare infrastructure remains for analysis. The third phase identifies anomalous HTTP requests to AI service providers like OpenAI or Anthropic. It targets servers that are not designated for AI development. When a production web server suddenly communicates with these APIs, it suggests that an implant is using a hijacked key or the API as a proxy for exfiltration. The list of API domains is configurable, allowing teams to include internal AI endpoints or other third-party services that the adversary might use for similar hijacking techniques. Finally, an automated agent triages these signals. It reviews the intersection of the vulnerable software inventory and the anomalous network events. The agent provides a verdict for each host, citing the specific rare domains or API requests that indicate a compromise. This allows the team to focus on high-confidence leads.

Blind Spots

This hunt does not inspect the request bodies of encrypted AI API traffic. Without full payload inspection, the hunt cannot differentiate between legitimate prompts and C2 instructions. Additionally, short-lived local proxies may evade snapshot-based socket monitoring if they open and close between polling intervals.

Running the Hunt

This hunt is a hunt.md playbook. You can import it into Huntbase or any hunt.md-aware runtime environment. It guides you through the discovery and isolation of AI-hijacking implants without the noise of static detection rules.

In this series

Steps

  1. Identify PHP and Node.js assets

    Query · scoping

    Find hosts running the web engines mentioned in the threat research to scope the behavioral queries.

    reads hb_software_inventorysql
    SELECT device_hostname, package_name, package_version FROM hb_software_inventory WHERE (LOWER(package_name) LIKE '%php%' OR LOWER(package_name) LIKE '%node%')

    What a hit looks like. A list of hosts running PHP or Node.js. Silence means no such engines are recorded in the inventory.

  2. Rare DNS from web interpreters

    Query · baseline

    Find rare domains queried by PHP or Node processes, which may indicate C2 infrastructure.

    reads hb_dns_activitysql
    SELECT device_hostname, process_name, query_hostname, COUNT(DISTINCT device_hostname) AS hosts, COUNT(*) AS lookups, MIN(time) AS first_seen FROM hb_dns_activity WHERE (LOWER(process_name) LIKE '%php%' OR LOWER(process_name) LIKE '%node%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY query_hostname HAVING hosts <= 3 ORDER BY hosts ASC

    What a hit looks like. DNS queries to rare domains originating from web engine processes. Normal noise includes updates and legitimate API integrations.

  3. Anomalous AI API requests

    Query · detection candidate

    Identify hosts talking to AI service APIs, which may indicate hijacked keys used for NIK C2 communication.

    reads hb_http_activitysql
    SELECT device_hostname, url_hostname, url_path, user_agent, COUNT(*) AS request_count, MIN(time) AS first_seen FROM hb_http_activity WHERE instr(',' || '{{ai_api_domains}}' || ',', ',' || LOWER(url_hostname) || ',') > 0 AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY device_hostname, url_hostname, url_path, user_agent

    What a hit looks like. HTTP requests to AI provider domains. Any row on a server not explicitly designed for AI development is suspicious.

  4. Triage compromise signals

    Agent triage

    Synthesize the inventory and network signals to determine which hosts show signs of exploitation and AI-driven C2.

  5. Route on verdict

    Decision

    Direct the hunt to containment or manual investigation based on the agent's findings.

  6. Isolate and remediate

    Response action

    Halt active C2 and exfiltration by isolating the host.

  7. Forensic evidence collection

    Analyst task

    Gather artifacts to confirm the Go-based implant and proxy configuration.

  8. Patching and closure

    Analyst task

    Ensure the estate is protected against the initial vulnerabilities and close the hunt.

Coverage

Scenario coverage

StageCoveredHow, or why not
Exploitation of Public-Facing Applications
T1190 · T1566
Yes identify-web-asset-inventory
AI-Enhanced Command and Control
T1071.001 · T1090
Yes rare-dns-from-interpreters, anomalous-ai-api-requests
NIK C2 Implant Execution
T1059.001
Out of scope Belongs to another part of the 'A quiet week in infosec <.<' series.
Credential and Data Harvesting
T1003
Out of scope Belongs to another part of the 'A quiet week in infosec <.<' series.
Screen-locking Ransomware
T1486
Out of scope Belongs to another part of the 'A quiet week in infosec <.<' series.

Blind spots

  • Needs hb_http_activity with request body capture. Without payload inspection, legitimate AI developer traffic may mask C2 communication perfectly. It would answer whether an AI API request contains stolen credentials or command responses.
  • Needs hb_network_listener with real-time bind events. Snapshot-based socket tools like osquery may miss temporary proxy listeners used by the NIK C2 implant. It would answer whether a local proxy was opened and closed rapidly between polling intervals.

Parameters & data

Parameters

ParameterTypeDefaultWhat it is
ai_api_domainslist[domain]api.openai.com, api.anthropic.com, api.cohere.ai, api.groq.comKnown AI service API endpoints that may be targeted for key hijacking.
lookback_daysnumber14Days of history to examine.
scope_hostslist[host]—Optional list of hosts to narrow the investigation.

Telemetry

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

Source

Download hunt.md Definition (JSON) An open hunt.md file; it runs anywhere that reads the format.
---
analysis: A single rule for AI API traffic would drown an analyst in noise. This hunt
  uses the context of vulnerable web software to focus network behavioral analysis,
  pivoting between software inventory, rare DNS, and API volume to find hidden implants.
blind_spots:
- id: encrypted-ai-payloads
  question: whether an AI API request contains stolen credentials or command responses
  requires: hb_http_activity with request body capture
  risk: Without payload inspection, legitimate AI developer traffic may mask C2 communication
    perfectly.
  stage: command-and-control-ai
- id: short-lived-proxies
  question: whether a local proxy was opened and closed rapidly between polling intervals
  requires: hb_network_listener with real-time bind events
  risk: Snapshot-based socket tools like osquery may miss temporary proxy listeners
    used by the NIK C2 implant.
  stage: command-and-control-ai
coverage:
- stage: initial-access-exploitation
  status: covered
  steps:
  - identify-web-asset-inventory
- stage: command-and-control-ai
  status: covered
  steps:
  - rare-dns-from-interpreters
  - anomalous-ai-api-requests
- reason: Belongs to another part of the 'A quiet week in infosec <.<' series.
  stage: execution-implant-deployment
  status: out_of_scope
- reason: Belongs to another part of the 'A quiet week in infosec <.<' series.
  stage: credential-access-theft
  status: out_of_scope
- reason: Belongs to another part of the 'A quiet week in infosec <.<' series.
  stage: impact-ransomware-deployment
  status: out_of_scope
guardrails:
  claims: no_unsupported
  evidence: citation_required
  missing_data: not_benign
  telemetry: untrusted
hunt:
  applicability: campaign-specific
  handoff: promote-to-detection
  justification: Adversaries are collapsing the time between compromise and exfiltration
    by using AI to automate data analysis. A negative result confirms your web infrastructure
    is not a node in this high-velocity attack chain.
  methodology: model-assisted
  trigger: intel-report
hypothesis: An adversary has exploited PHP or Node.js vulnerabilities to deploy a
  Go-based implant that hides its command-and-control activity by hijacking AI API
  keys and using local proxies.
labels:
- hunt
- attack.t1190
- attack.t1071.001
- attack.t1090
- attack.t1566
- attack.t1486
- command and control
- credential access
- execution
- impact
- initial access
name: AI-Enhanced C2 and Web Proxy Hijacking
parameters:
  ai_api_domains:
    default:
    - api.openai.com
    - api.anthropic.com
    - api.cohere.ai
    - api.groq.com
    description: Known AI service API endpoints that may be targeted for key hijacking.
    from:
      kind: article
      observed: '2026-10-29'
      ref: Cisco Talos - NIK C2
    type: list[domain]
  lookback_days:
    default: '14'
    description: Days of history to examine.
    type: number
  scope_hosts:
    default: []
    description: Optional list of hosts to narrow the investigation.
    type: list[host]
provenance:
  authors:
  - name: Huntbase hunt generation
    org: huntbase.io
  generated:
    by: huntbase-hunt-generation
    from: https://blog.talosintelligence.com/a-quiet-week-in-infosec/
    gates:
    - dry-run
    - lint
    model: hb_google/gemini-3-flash-preview
rationale: Focus on internet-facing servers running PHP or Node.js. Use the software
  inventory to prioritize those that cannot be immediately patched.
references:
- name: "Cisco Talos \u2014 A quiet week in infosec"
  url: https://blog.talosintelligence.com/a-quiet-week-in-infosec/
related:
- hunt: php-node-rce-behavioral-monitoring
  reason: This hunt focuses on the network behavior of the post-exploit implant; a
    separate hunt should monitor process-level exploitation of the interpreters.
  relation: out-of-scope-alternative
- hunt: ai-driven-nik-c2-implant-theft
  relation: follows
scenario:
  stages:
  - name: Exploitation of Public-Facing Applications
    observables:
    - Exploitation of PHP core RCE vulnerabilities
    - Exploitation of Node.js/Brotli decoder flaws
    - Phishing emails targeting AI credentials
    slug: initial-access-exploitation
    tactic: initial-access
    techniques:
    - T1190
    - T1566
  - name: NIK C2 Implant Execution
    observables:
    - Go-based Windows implant execution
    - Unexpected PowerShell executions
    - 'Process names: KMSAuto++.exe, KMSAuto Net.exe'
    slug: execution-implant-deployment
    tactic: execution
    techniques:
    - T1059.001
  - name: Credential and Data Harvesting
    observables:
    - Unauthorized access to browser databases
    - Access to crypto wallets
    - Credential dumping from memory
    - Keystroke streaming
    slug: credential-access-theft
    tactic: credential-access
    techniques:
    - T1003
  - name: AI-Enhanced Command and Control
    observables:
    - Unusual local proxy routing
    - Hijacked OpenAI API keys used for outbound C2 communication
    - Go-based implant network activity
    slug: command-and-control-ai
    tactic: command-and-control
    techniques:
    - T1071.001
    - T1090
  - name: Screen-locking Ransomware
    observables:
    - Deployment of screen-locking ransomware
    - Data encryption for impact
    slug: impact-ransomware-deployment
    tactic: impact
    techniques:
    - T1486
  summary: The NIK C2 framework is a Go-based Windows implant that leverages integrated
    AI models to analyze harvested data in real-time. The campaign involves credential
    dumping, keystroke streaming, and the deployment of screen-locking ransomware,
    while masking infrastructure by hijacking victims' OpenAI API keys for data processing.
series:
  index: 2
  slug: a-quiet-week-in-infosec
  title: A quiet week in infosec <.<
  total: 2
severity: high
targets:
  analyst:
    name: Tier-2 analyst
    role: analyst
  endpoint:
    category: endpoint
    name: Endpoint telemetry (hb_ surfaces)
    telemetry:
    - endpoint
  hunter:
    agent: true
    name: Hunt agent
  web:
    category: siem
    name: Web server / proxy logs
    telemetry:
    - network
tlp: clear
type: investigation
---


# AI-Enhanced C2 and Web Proxy Hijacking

This hunt identifies compromised web assets by starting with the presence of PHP and Node.js engines, then fanning out to look for anomalous network behaviors. It specifically targets the NIK C2 pattern where the attacker hijacks legitimate OpenAI API keys to mask exfiltration and uses local proxy routing to blend into encrypted traffic. An agent triages the intersection of vulnerable software and rare outbound network signals.

## identify-web-asset-inventory
<!-- Identify PHP and Node.js assets -->
Find hosts running the web engines mentioned in the threat research to scope the behavioral queries.

```sqlite target=endpoint role=scoping
~~~yaml
expected: A list of hosts running PHP or Node.js. Silence means no such engines are
  recorded in the inventory.
reads:
- device_hostname
- package_name
- package_version
silence: not_evidence_of_absence
source: hb_software_inventory
verified: dry-run
verified_at: '2026-10-30'
~~~
SELECT device_hostname, package_name, package_version FROM hb_software_inventory WHERE (LOWER(package_name) LIKE '%php%' OR LOWER(package_name) LIKE '%node%')
```

## investigate-network-anomalies
<!-- Investigate network anomalies -->
parallel:
- → rare-dns-from-interpreters
- → anomalous-ai-api-requests
join: → triage-compromise-signals

## rare-dns-from-interpreters
<!-- Rare DNS from web interpreters -->
Find rare domains queried by PHP or Node processes, which may indicate C2 infrastructure.

```sqlite target=endpoint role=baseline params=(scope_hosts=scope_hosts, lookback_days=lookback_days)
~~~yaml
baseline:
  compare: first_seen
  window: '{{lookback_days}}d'
expected: DNS queries to rare domains originating from web engine processes. Normal
  noise includes updates and legitimate API integrations.
prevalence:
  by: device_hostname
  key:
  - query_hostname
  rare_below: 3
reads:
- device_hostname
- process_name
- query_hostname
- time
silence: not_evidence_of_absence
source: hb_dns_activity
verified: dry-run
verified_at: '2026-10-30'
~~~
SELECT device_hostname, process_name, query_hostname, COUNT(DISTINCT device_hostname) AS hosts, COUNT(*) AS lookups, MIN(time) AS first_seen FROM hb_dns_activity WHERE (LOWER(process_name) LIKE '%php%' OR LOWER(process_name) LIKE '%node%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY query_hostname HAVING hosts <= 3 ORDER BY hosts ASC
```

## anomalous-ai-api-requests
<!-- Anomalous AI API requests -->
Identify hosts talking to AI service APIs, which may indicate hijacked keys used for NIK C2 communication.

```sqlite target=web role=detection-candidate params=(ai_api_domains=ai_api_domains, scope_hosts=scope_hosts, lookback_days=lookback_days)
~~~yaml
expected: HTTP requests to AI provider domains. Any row on a server not explicitly
  designed for AI development is suspicious.
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-10-30'
~~~
SELECT device_hostname, url_hostname, url_path, user_agent, COUNT(*) AS request_count, MIN(time) AS first_seen FROM hb_http_activity WHERE instr(',' || '{{ai_api_domains}}' || ',', ',' || LOWER(url_hostname) || ',') > 0 AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY device_hostname, url_hostname, url_path, user_agent
```

## triage-compromise-signals
<!-- Triage compromise signals -->
```agent target=hunter
cite: required
context:
- identify-web-asset-inventory
- rare-dns-from-interpreters
- anomalous-ai-api-requests
max_iterations: 5
objective: Identify hosts where rare DNS queries or AI API communications intersect
  with the presence of PHP/Node.js, citing rows that suggest a Go-based implant or
  key theft.
success_criteria: A verdict of malicious, suspicious, or benign per host, with cited
  network anomalies.
tools:
- endpoint
- web
```

## route-on-verdict
<!-- Route on verdict -->
if~: "the triage verdict is malicious for at least one host" (confidence: high, judge=hunter)
then: → isolate-and-remediate
indeterminate: → forensic-evidence-collection
unavailable: → forensic-evidence-collection (blind_spot: encrypted-ai-payloads)
else: → patching-and-closure

## isolate-and-remediate
<!-- Isolate and remediate -->
```action target=endpoint
~~~yaml
approval: required
~~~
Isolate the host immediately. Revoke any AI API keys associated with the host or found in its environment variables. Prepare for memory collection.
```
→ forensic-evidence-collection

## forensic-evidence-collection
<!-- Forensic evidence collection -->
```manual target=analyst
Collect and analyze active network sockets for local proxy routing (127.0.0.1). Search for Go-based binaries in web server directories. Review PHP and Node.js logs for RCE patterns matching the Talos advisory.
```
→ patching-and-closure

## patching-and-closure
<!-- Patching and closure -->
```manual target=analyst
Verify all hosts running PHP and Node.js are patched against the RCE vulnerabilities. Confirm the removal of any detected implants and finalize the incident report.
```
→ 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.

Locked pack

Sign up to unlock

Pack contents are available to Huntbase users.