← All hunts high TLP:CLEAR

Autonomous Cairn AI Framework Exploitation

An autonomous AI agent is conducting an end-to-end intrusion, starting with credential spraying and proceeding to deploy framework artifacts like AUTHORIZATION.md before creating persistent admin accounts and tampering with cloud storage.

Based on research by Unit 42 2026-11-13 12 steps · 5 queries T1110.003 T1133 T1190 T1505.003 T1565

Brief

Why this hunt

Unit 42 recently detailed a framework called Cairn in their report, "Attackers Use Autonomous AI to Target Semiconductor, Defense and Civil Society Sectors". This framework allows attackers to automate the entire lifecycle of an intrusion. Unlike traditional automated scripts, these agents use Large Language Models (LLMs) to make tactical decisions based on the environment they encounter. We designed this hunt to find the specific footprint these agents leave as they move from initial access to data impact.

How the Hunt Flows

The hunt begins with scoping on the hb_process_activity surface. It looks for anomalous shells or interpreters spawned by web and VPN service processes. This identifies the potential entry points where the Cairn agent might first land. The first query lists every host where a common gateway process spawns a shell or python interpreter.

Once we have a set of candidate hosts, the hunt pivots to a parallel search for early indicators. One branch examines hb_auth_signin for credential spraying patterns, particularly those originating from known Cairn egress IPs or showing high-volume distinct user attempts. The second branch scans hb_file_activity for the creation of AUTHORIZATION.md. This file is a high-fidelity artifact used by the Cairn framework for session management and evidence gathering.

Following the identification of these early indicators, an analyst or automated agent performs an initial triage to link the shell processes, login attempts, and file artifacts. If a host shows correlated activity, the hunt shifts focus to persistence mechanisms. We query hb_account_change to find new administrator or service accounts created by the compromised entities. This step filters for accounts with admin or svc naming conventions created during the suspect window by the users identified in the previous phase.

Finally, the hunt connects these endpoint events to cloud activity. Using hb_cloud_api_activity, we look for document modifications in S3 or other storage services. The query specifically targets document writes (PDF, DOCX, XLSX) originating from the same IPs or users flagged in the earlier stages. This allows us to see if the intruder reached its objective of tampering with or retrieving sensitive business documents.

Blind Spots

This hunt has two primary limitations. First, if the adversary uses unauthenticated endpoints for cloud storage modifications, these actions may not appear in standard management-plane logs like CloudTrail without Data Events enabled. Second, the framework artifact AUTHORIZATION.md is a transient indicator. If the agent deletes this file or if EDR retention for file-creation events is short, the hunt might miss the middle of the chain. Analysts should consider widening the lookback period if telemetry retention allows.

Steps

  1. Search for anomalous web/VPN child processes

    Query · scoping

    Identify web or VPN servers exhibiting behavioral signs of exploitation, such as shells spawned by service processes.

    reads hb_process_activitysql
    SELECT device_hostname, process_name, process_cmd_line, parent_process_name, time FROM hb_process_activity WHERE (LOWER(parent_process_name) LIKE '%http%' OR LOWER(parent_process_name) LIKE '%nginx%' OR LOWER(parent_process_name) LIKE '%apache%' OR LOWER(parent_process_name) LIKE '%vpn%') AND (LOWER(process_name) IN ('cmd.exe', 'powershell.exe', 'sh', 'bash', 'zsh', 'python', 'perl', 'php')) AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. A list of hostnames and processes where a service has spawned a shell or interpreter. Silence indicates no such common shell-spawn behavior was observed on scoped hosts.

  2. Credential spraying from known and anomalous IPs

    Query · baseline

    Detect the initial credential access attempts performed by the framework, broadening the search to any source IP showing spray patterns.

    reads hb_auth_signinsql
    SELECT src_endpoint_ip, COUNT(DISTINCT actor_user_name) AS distinct_users, device_hostname, status, MAX(time) AS last_attempt FROM hb_auth_signin WHERE ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY src_endpoint_ip, device_hostname, status HAVING distinct_users > 5 OR (instr(',' || '{{cairn_egress_ips}}' || ',', ',' || src_endpoint_ip || ',') > 0)

    What a hit looks like. Source IPs attempting multiple users or matching report indicators. High distinct_users count suggests a spray.

  3. Detection of AUTHORIZATION.md

    Query · detection candidate

    Find the unique evidence-gathering file created by the Cairn framework on compromised systems.

    reads hb_file_activitysql
    SELECT device_hostname, file_path, file_name, process_name, time FROM hb_file_activity WHERE LOWER(file_name) = 'authorization.md' AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. Creation of this specific filename. Silence suggests the framework has not established a presence on these hosts using this artifact.

  4. Analyze early access indicators

    Agent triage

    Weight the correlation between shell processes, external spraying, and local framework artifacts to identify a likely breach.

  5. Anomalous administrator account creation

    Query · triage

    Detect the creation of persistent admin accounts occurring on flagged hosts or by flagged users.

    reads hb_account_changesql
    SELECT device_hostname, user_name, actor_user_name, time FROM hb_account_change WHERE activity_id = 1 AND (LOWER(user_name) LIKE '%admin%' OR LOWER(user_name) LIKE '%svc%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND ('{{breached_users}}' = '' OR instr(',' || '{{breached_users}}' || ',', ',' || actor_user_name || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. A new account with administrative keywords created in the window on a host flagged earlier.

  6. Restricted cloud storage document writes

    Query · enrichment

    Identify document modifications in cloud storage specifically originating from the IPs or users flagged in the earlier stages.

    reads hb_cloud_api_activitysql
    SELECT cloud_account_uid, api_operation, resource_uid, actor_user_name, src_endpoint_ip, time FROM hb_cloud_api_activity WHERE (LOWER(api_service_name) LIKE '%s3%' OR LOWER(api_service_name) LIKE '%storage%') AND (LOWER(resource_uid) LIKE '%.docx' OR LOWER(resource_uid) LIKE '%.pdf' OR LOWER(resource_uid) LIKE '%.xlsx') AND (api_operation LIKE '%Put%' OR api_operation LIKE '%Write%') AND ('{{scope_ips}}' = '' OR instr(',' || '{{scope_ips}}' || ',', ',' || src_endpoint_ip || ',') > 0) AND ('{{breached_users}}' = '' OR instr(',' || '{{breached_users}}' || ',', ',' || actor_user_name || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. A cloud storage write to a document resource originating from a flagged entity. Silence indicates no document-level storage writes occurred via these actors.

  7. Synthesize full attack chain

    Agent triage

    Connect early breach evidence with confirmed persistence and impact to reach a final verdict.

  8. Route on verdict

    Decision

    Act on confirmed autonomous activity or route for manual review.

  9. Isolate host and revoke credentials

    Response action

    Contain the autonomous agent by cutting off its host access and revoking the accounts it created.

  10. Analyst incident review

    Analyst task

    Final validation of findings and tuning of scoped parameters.

  11. Hunt closure

    Analyst task

    Final record keeping.

Coverage

Scenario coverage

StageCoveredHow, or why not
Autonomous Recon and Credential Spraying
T1110.003 · T1190 · T1133
Yes scope-exposed-services, auth-signin-spray
Web Shell and Agent Deployment
T1505.003
Yes cairn-artifact-detection
Unauthorized Account Creation
T1133
Yes admin-account-persistence
Data Retrieval and Document Modification
T1565
Yes cloud-document-tampering

Blind spots

  • Needs CloudTrail Data Events or equivalent for specific storage buckets. A stealthy document modification via an unauthenticated endpoint might not appear in management-plane logs. It would answer whether unauthenticated writes were logged for specific document buckets.
  • Needs EDR file creation event persistence. If file-creation events have short retention, a long-running autonomous operation might leave no trace of its initial setup. It would answer if the AUTHORIZATION.md file was created and subsequently deleted by the agent.

Parameters & data

Parameters

ParameterTypeDefaultWhat it is
breached_userslist[string]—User accounts flagged in early-stage triage for follow-on persistence checks.
cairn_egress_ipslist[ip]82.29.129.54, 154.44.31.4Known Cairn controller and egress staging nodes.
lookback_daysnumber14Days of history to examine.
scope_hostslist[host]—Specific hostnames identified in the scoping step to focus on; leave empty to scan the entire estate.
scope_ipslist[ip]—Source IPs flagged in the early-stage triage to focus follow-on hunting.

Telemetry

SourceCategoryTelemetry
Endpoint telemetry (hb_ surfaces)endpointendpoint
Identity / sign-in telemetryidentityidentity

Source

Download hunt.md Definition (JSON) An open hunt.md file; it runs anywhere that reads the format.
---
analysis: A single rule might catch the password spray, but this hunt correlates the
  external spray with framework artifacts (AUTHORIZATION.md) and subsequent high-impact
  behaviors like document tampering on the same hosts.
blind_spots:
- id: limited-cloud-logging
  question: whether unauthenticated writes were logged for specific document buckets
  requires: CloudTrail Data Events or equivalent for specific storage buckets
  risk: A stealthy document modification via an unauthenticated endpoint might not
    appear in management-plane logs.
  stage: data-retrieval-and-document-modification
- id: missing-auth-file-history
  question: if the AUTHORIZATION.md file was created and subsequently deleted by the
    agent
  requires: EDR file creation event persistence
  risk: If file-creation events have short retention, a long-running autonomous operation
    might leave no trace of its initial setup.
  stage: web-shell-and-agent-deployment
coverage:
- stage: autonomous-recon-and-credential-spraying
  status: covered
  steps:
  - scope-exposed-services
  - auth-signin-spray
- stage: web-shell-and-agent-deployment
  status: covered
  steps:
  - cairn-artifact-detection
- stage: unauthorized-account-creation
  status: covered
  steps:
  - admin-account-persistence
- stage: data-retrieval-and-document-modification
  status: covered
  steps:
  - cloud-document-tampering
guardrails:
  claims: no_unsupported
  evidence: citation_required
  missing_data: not_benign
  telemetry: untrusted
hunt:
  applicability: campaign-specific
  handoff: keep-as-periodic-hunt
  justification: The rise of autonomous agent frameworks like Cairn allows attackers
    to conduct rapid, end-to-end intrusions with minimal human intervention. Detecting
    the early stages of these automated loops is essential to prevent large-scale
    data theft or document tampering.
  methodology: model-assisted
  trigger: intel-report
hypothesis: An autonomous AI agent is conducting an end-to-end intrusion, starting
  with credential spraying and proceeding to deploy framework artifacts like AUTHORIZATION.md
  before creating persistent admin accounts and tampering with cloud storage.
labels:
- hunt
- attack.t1110.003
- attack.t1190
- attack.t1133
- attack.t1505.003
- attack.t1565
- impact
- initial access
- persistence
name: Autonomous Cairn AI Framework Exploitation
parameters:
  breached_users:
    default: []
    description: User accounts flagged in early-stage triage for follow-on persistence
      checks.
    from:
      kind: manual
      observed: '2024-11-12'
      ref: analyst-defined
    type: list[string]
  cairn_egress_ips:
    default:
    - 82.29.129.54
    - 154.44.31.4
    description: Known Cairn controller and egress staging nodes.
    from:
      kind: article
      observed: '2026-11-12'
      ref: unit42-cairn-2026
    type: list[ip]
  lookback_days:
    default: '14'
    description: Days of history to examine.
    from:
      kind: manual
      observed: '2024-11-12'
      ref: default
    type: number
  scope_hosts:
    default: []
    description: Specific hostnames identified in the scoping step to focus on; leave
      empty to scan the entire estate.
    from:
      kind: manual
      observed: '2024-11-12'
      ref: analyst-defined
    type: list[host]
  scope_ips:
    default: []
    description: Source IPs flagged in the early-stage triage to focus follow-on hunting.
    from:
      kind: manual
      observed: '2024-11-12'
      ref: analyst-defined
    type: list[ip]
provenance:
  authors:
  - name: Huntbase hunt generation
    org: huntbase.io
  generated:
    by: huntbase-hunt-generation
    from: https://unit42.paloaltonetworks.com/cairn-framework-ai-autonomous-attacks/
    gates:
    - dry-run
    - lint
    model: hb_google/gemini-3-flash-preview
rationale: Focus on internet-facing application servers and VPN gateways. Widen to
  internal systems if AUTHORIZATION.md is detected on any perimeter host.
references:
- name: "Unit 42 \u2014 Attackers Use Autonomous AI to Target Semiconductor, Defense\
    \ and Civil Society Sectors"
  url: https://unit42.paloaltonetworks.com/cairn-framework-ai-autonomous-attacks/
related:
- hunt: mcp-server-git-remote
  reason: Another autonomous agent technique involving Model Context Protocol (MCP)
    servers.
  relation: sibling
scenario:
  stages:
  - name: Autonomous Recon and Credential Spraying
    observables:
    - 'IP: 82.29.129.54'
    - Weak-password spraying against internet-facing application servers
    - Autonomous enumeration of root domains
    - Targeted use of VPN gateway addresses and group passwords
    slug: autonomous-recon-and-credential-spraying
    tactic: initial-access
    techniques:
    - T1110.003
    - T1190
    - T1133
  - name: Web Shell and Agent Deployment
    observables:
    - Deployment of webshells
    - 'File creation: AUTHORIZATION.md'
    - Presence of 'AIScan Runner Skills' logic (skill pack)
    slug: web-shell-and-agent-deployment
    tactic: persistence
    techniques:
    - T1505.003
  - name: Unauthorized Account Creation
    observables:
    - Creation of persistent administrator accounts in production systems
    slug: unauthorized-account-creation
    tactic: persistence
    techniques:
    - T1133
  - name: Data Retrieval and Document Modification
    observables:
    - Modification of live industry standards-ballot document files
    - Mass exposure of personal data records (exceeding 1M records)
    - Retrieval of military and government identities
    - Unauthenticated cloud-storage writes
    slug: data-retrieval-and-document-modification
    tactic: impact
    techniques:
    - T1565
  summary: The China-nexus actor CL-STA-1238 used the open-source Cairn AI agent framework
    to autonomously conduct multi-stage operations against semiconductor, defense,
    and civil society targets. These autonomous agents mapped attack surfaces, performed
    password spraying, exploited web applications, and achieved persistence through
    web shells and unauthorized administrator account creation.
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
  identity:
    category: identity
    name: Identity / sign-in telemetry
    telemetry:
    - identity
tlp: clear
type: investigation
---


# Autonomous Cairn AI Framework Exploitation

This hunt identifies the multi-stage behavior of the Cairn AI agentic framework. It first identifies anomalous shell processes on web and VPN infrastructure, then searches for early indicators of agent activity: password spraying and the framework-specific AUTHORIZATION.md file. Finally, the hunt pivots to identify unauthorized administrator account creation and suspicious modifications to cloud-stored documents linked to the initial breach entities.

## scope-exposed-services
<!-- Search for anomalous web/VPN child processes -->
Identify web or VPN servers exhibiting behavioral signs of exploitation, such as shells spawned by service processes.

```sqlite target=endpoint role=scoping params=(scope_hosts=scope_hosts, lookback_days=lookback_days)
~~~yaml
expected: A list of hostnames and processes where a service has spawned a shell or
  interpreter. Silence indicates no such common shell-spawn behavior was observed
  on scoped hosts.
reads:
- device_hostname
- parent_process_name
- process_cmd_line
- process_name
- time
silence: not_evidence_of_absence
source: hb_process_activity
verified: dry-run
verified_at: '2026-11-13'
~~~
SELECT device_hostname, process_name, process_cmd_line, parent_process_name, time FROM hb_process_activity WHERE (LOWER(parent_process_name) LIKE '%http%' OR LOWER(parent_process_name) LIKE '%nginx%' OR LOWER(parent_process_name) LIKE '%apache%' OR LOWER(parent_process_name) LIKE '%vpn%') AND (LOWER(process_name) IN ('cmd.exe', 'powershell.exe', 'sh', 'bash', 'zsh', 'python', 'perl', 'php')) AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')
```

## early-indicators-parallel
<!-- Parallel search for early agent indicators -->
parallel:
- → auth-signin-spray
- → cairn-artifact-detection
join: → early-stage-triage

## auth-signin-spray
<!-- Credential spraying from known and anomalous IPs -->
Detect the initial credential access attempts performed by the framework, broadening the search to any source IP showing spray patterns.

```sqlite target=identity role=baseline params=(cairn_egress_ips=cairn_egress_ips, lookback_days=lookback_days, scope_hosts=scope_hosts)
~~~yaml
baseline:
  compare: new_this_window
  window: '{{lookback_days}}d'
expected: Source IPs attempting multiple users or matching report indicators. High
  distinct_users count suggests a spray.
prevalence:
  by: actor_user_name
  key:
  - src_endpoint_ip
  rare_below: 5
reads:
- actor_user_name
- device_hostname
- src_endpoint_ip
- status
- time
silence: evidence_of_absence
source: hb_auth_signin
verified: dry-run
verified_at: '2026-11-13'
~~~
SELECT src_endpoint_ip, COUNT(DISTINCT actor_user_name) AS distinct_users, device_hostname, status, MAX(time) AS last_attempt FROM hb_auth_signin WHERE ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY src_endpoint_ip, device_hostname, status HAVING distinct_users > 5 OR (instr(',' || '{{cairn_egress_ips}}' || ',', ',' || src_endpoint_ip || ',') > 0)
```

## cairn-artifact-detection
<!-- Detection of AUTHORIZATION.md -->
Find the unique evidence-gathering file created by the Cairn framework on compromised systems.

```sqlite target=endpoint role=detection-candidate params=(lookback_days=lookback_days, scope_hosts=scope_hosts)
~~~yaml
expected: Creation of this specific filename. Silence suggests the framework has not
  established a presence on these hosts using this artifact.
reads:
- device_hostname
- file_name
- file_path
- process_name
- time
silence: not_evidence_of_absence
source: hb_file_activity
verified: dry-run
verified_at: '2026-11-13'
~~~
SELECT device_hostname, file_path, file_name, process_name, time FROM hb_file_activity WHERE LOWER(file_name) = 'authorization.md' AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')
```

## early-stage-triage
<!-- Analyze early access indicators -->
```agent target=hunter
cite: required
context:
- scope-exposed-services
- auth-signin-spray
- cairn-artifact-detection
max_iterations: 3
objective: Determine if any host shows evidence of a credential spray or shell activity
  followed by the creation of an AUTHORIZATION.md file.
success_criteria: Per-host verdict citing specific IPs, shell processes, and file
  paths.
tools:
- endpoint
- identity
```

## admin-account-persistence
<!-- Anomalous administrator account creation -->
Detect the creation of persistent admin accounts occurring on flagged hosts or by flagged users.

```sqlite target=endpoint role=triage params=(lookback_days=lookback_days, scope_hosts=scope_hosts, breached_users=breached_users)
~~~yaml
expected: A new account with administrative keywords created in the window on a host
  flagged earlier.
reads:
- activity_id
- actor_user_name
- device_hostname
- time
- user_name
silence: not_evidence_of_absence
source: hb_account_change
verified: dry-run
verified_at: '2026-11-13'
~~~
SELECT device_hostname, user_name, actor_user_name, time FROM hb_account_change WHERE activity_id = 1 AND (LOWER(user_name) LIKE '%admin%' OR LOWER(user_name) LIKE '%svc%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND ('{{breached_users}}' = '' OR instr(',' || '{{breached_users}}' || ',', ',' || actor_user_name || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')
```

## cloud-document-tampering
<!-- Restricted cloud storage document writes -->
Identify document modifications in cloud storage specifically originating from the IPs or users flagged in the earlier stages.

```sqlite target=endpoint role=enrichment params=(lookback_days=lookback_days, scope_ips=scope_ips, breached_users=breached_users)
~~~yaml
expected: A cloud storage write to a document resource originating from a flagged
  entity. Silence indicates no document-level storage writes occurred via these actors.
reads:
- actor_user_name
- api_operation
- api_service_name
- cloud_account_uid
- resource_uid
- src_endpoint_ip
- time
silence: evidence_of_absence
source: hb_cloud_api_activity
verified: dry-run
verified_at: '2026-11-13'
~~~
SELECT cloud_account_uid, api_operation, resource_uid, actor_user_name, src_endpoint_ip, time FROM hb_cloud_api_activity WHERE (LOWER(api_service_name) LIKE '%s3%' OR LOWER(api_service_name) LIKE '%storage%') AND (LOWER(resource_uid) LIKE '%.docx' OR LOWER(resource_uid) LIKE '%.pdf' OR LOWER(resource_uid) LIKE '%.xlsx') AND (api_operation LIKE '%Put%' OR api_operation LIKE '%Write%') AND ('{{scope_ips}}' = '' OR instr(',' || '{{scope_ips}}' || ',', ',' || src_endpoint_ip || ',') > 0) AND ('{{breached_users}}' = '' OR instr(',' || '{{breached_users}}' || ',', ',' || actor_user_name || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')
```

## follow-on-triage
<!-- Synthesize full attack chain -->
```agent target=hunter
cite: required
context:
- early-stage-triage
- admin-account-persistence
- cloud-document-tampering
max_iterations: 4
objective: Correlate early-stage breach entities with persistence events to confirm
  an active intrusion chain.
success_criteria: A verdict of malicious if the chain is complete for any host or
  cloud account.
tools:
- endpoint
- identity
```

## route-on-verdict
<!-- Route on verdict -->
if~: "the follow-on triage verdict is malicious for at least one host or cloud tenant" (confidence: high, judge=hunter)
then: → isolate-compromised-host
indeterminate: → analyst-incident-review
unavailable: → analyst-incident-review (blind_spot: limited-cloud-logging)
else: → hunt-closure

## isolate-compromised-host
<!-- Isolate host and revoke credentials -->
```action target=endpoint
~~~yaml
approval: required
~~~
Isolate the affected host, revoke any newly created administrator credentials, and restore document versions from cloud storage backups.
```
→ analyst-incident-review

## analyst-incident-review
<!-- Analyst incident review -->
```manual target=analyst
Review the findings for false positives (e.g., authorized security testing). Document the full timeline of the agent's actions.
```
→ hunt-closure

## hunt-closure
<!-- Hunt closure -->
```manual target=analyst
Record what was found, tune the egress IP list, and update the scoping parameters for future runs.
```
→ 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.