← All hunts high TLP:CLEAR Part 2 of 2

AI-Impersonation Driven Script Execution and Data Theft

An intruder uses a trusted AI platform to trick a user into executing a terminal command from the clipboard, establishing persistence and stealing credentials.

Based on research by Huntress 2026-09-20 12 steps · 4 queries T1053.005 T1059.001 T1059.004 T1539 T1552 T1555

Brief

Why Now

Threat actors are moving beyond traditional SEO poisoning to exploit the trust users place in AI platforms. A recent report by Huntress, The AI Attack Surface: How Threat Actors Abuse Trusted AI Platforms, describes "ClickFix" campaigns where attackers use shared AI conversations to deliver malicious instructions. These lures masquerade as technical support, convincing users to copy and execute terminal commands that deploy credential stealers like AMOS or MacSync.

How the Hunt Flows

The hunt starts by identifying interaction with known redirect infrastructure. A scoping query scans DNS activity for resolutions of malicious domains observed in AI-lure campaigns. This initial step is a cost-effective filter, narrowing the scope to hosts that likely interacted with a fraudulent AI artifact.

An analyst evaluates these DNS leads to determine if the timing and process context match the AI impersonation pattern. If the lead is suspicious, the hunt opens three parallel forensic paths. The first path examines process activity for shell interpreters—such as bash, zsh, or PowerShell—executing commands that pipe network downloads directly into a shell or use encoded arguments.

The second path identifies persistence by baselining scheduled jobs across the environment. It flags tasks that are unique to the suspicious hosts, as stealers often create local persistence to maintain access after the initial terminal execution. This helps separate one-off administrative tasks from malware-driven automation.

The third path monitors access to sensitive files. The query looks for processes reading SSH keys, AWS credentials, or browser keychains. This provides evidence of the final stage of the attack: the exfiltration of high-value secrets. Finally, an analyst correlates these results into a unified verdict, identifying the full lifecycle from the initial redirect to data theft.

What the Hunt Cannot See

This hunt has specific blind spots. It cannot see the exact text the user copied from the AI platform because standard endpoint telemetry does not capture clipboard contents. The analyst sees the execution but not the specific lure that prompted it. Additionally, if the host uses DNS over HTTPS (DoH) or other encrypted DNS protocols that bypass the local resolver, the initial lead query may fail. The hunt also requires comprehensive agent coverage; an unmanaged host interacting with the redirect domain remains invisible to the subsequent forensic queries.

In this series

Steps

  1. DNS to AI-lure redirect domains

    Query · scoping

    Find any host resolving known malicious domains used as redirects from legitimate AI artifacts.

    reads hb_dns_activitysql
    SELECT device_hostname, query_hostname, process_name, time FROM hb_dns_activity WHERE instr(',' || '{{redirect_domains}}' || ',', ',' || LOWER(query_hostname) || ',') > 0 AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. A hit indicates a user clicked a link within an AI platform; silence suggests no interaction with known indicators in this window.

  2. Evaluate DNS lead

    Agent triage

    Determine if the resolution of the redirect domain warrants forensic investigation of the endpoint.

  3. Gate forensics on DNS lead

    Decision

    Open expensive forensic queries only for hosts showing suspicious DNS interaction.

  4. Suspicious shell execution patterns

    Query · detection candidate

    Identify command execution matching the AI-lure pattern, such as shell downloads or encoded PowerShell commands.

    reads hb_process_activitysql
    SELECT device_hostname, process_name, process_cmd_line, user_name, time FROM hb_process_activity WHERE ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND (LOWER(process_name) IN ('curl', 'wget', 'bash', 'zsh', 'powershell.exe', 'pwsh', 'cmd.exe')) AND (LOWER(process_cmd_line) LIKE '%|%sh%' OR LOWER(process_cmd_line) LIKE '%iex%' OR LOWER(process_cmd_line) LIKE '%-enc%') AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. Process rows showing an interpreter downloading and executing content directly from the command line.

  5. Rare scheduled persistence

    Query · baseline

    Find new scheduled tasks that are unique to the scoped hosts, indicating persistence established by the malware.

    reads hb_scheduled_jobsql
    SELECT LOWER(job_cmd_line) AS cmd, COUNT(DISTINCT device_hostname) AS hosts, MIN(time) AS first_seen FROM hb_scheduled_job WHERE ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY cmd HAVING hosts <= 3 ORDER BY hosts ASC

    What a hit looks like. A job seen on one or two hosts shortly after the lead interaction.

  6. Credential and sensitive file access

    Query · enrichment

    Detect access to SSH keys, cloud credentials, and browser keychains targeted by stealers.

    reads hb_file_activitysql
    SELECT device_hostname, process_name, file_path, activity_name, time FROM hb_file_activity WHERE ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND (LOWER(file_path) LIKE '%/.ssh/%' OR LOWER(file_path) LIKE '%/.aws/%' OR LOWER(file_path) LIKE '%/library/keychains/%' OR LOWER(file_path) LIKE '%/telegram%') AND time >= datetime('now', '-{{lookback_days}} days')

    What a hit looks like. File activity indicating a shell or unknown process reading sensitive directories.

  7. Kill chain triage

    Agent triage

    Correlate the DNS redirect, terminal execution, persistence, and data theft into a single intrusion verdict.

  8. Route on triage verdict

    Decision

    Direct confirmed infections to isolation and others to review.

  9. Contain compromised host

    Response action

    Isolate the host to prevent further data theft and exfiltration.

  10. Remediation and key rotation review

    Analyst task

    Confirm that all targeted credentials have been successfully rotated.

  11. Close out

    Analyst task

    Document findings and any required tuning.

Coverage

Scenario coverage

StageCoveredHow, or why not
Terminal and PowerShell Execution
T1059.001 · T1059.004
Yes clipboard-execution
Malware Persistence
T1053.005
Yes rare-scheduled-persistence
Credential and Secret Theft
T1555 · T1539 · T1552
Yes credential-theft-evidence
AI Platform SEO Redirection
T1566.002 · T1204.001
Out of scope This stage occurs on the search engine and browser before endpoint behavior begins.
AI-Themed Payload Delivery
T1204.001
Out of scope Payload delivery is observed as the redirect DNS and resulting terminal command.

Blind spots

  • Needs endpoint agent on all systems. A host without an agent resolves the domain but remains invisible to forensics. It would answer Are there hosts missing telemetry for DNS or process activity?.
  • Needs clipboard monitoring logs. The hunt sees the execution but not the specific 'Apple Support' or 'Claude Cowork' lure that prompted it. It would answer What was the exact text the user copied from the AI platform?.
  • Needs TLS inspection or proxy logs. If the agent cannot intercept encrypted DNS, the initial lead may be missed. It would answer Was the redirect domain resolved via DoH (DNS over HTTPS)?.

Parameters & data

Parameters

ParameterTypeDefaultWhat it is
lookback_daysnumber14Days of history to examine.
redirect_domainslist[domain]downloading-api.it.comMalicious redirect domains observed in AI-lure campaigns.
scope_hostslist[host]Limit forensics to these hosts; usually the output of the DNS lead step.

Telemetry

SourceCategoryTelemetry
Endpoint telemetry (hb_ surfaces)endpointendpoint

Source

Download hunt.md Definition (JSON) An open hunt.md file; it runs anywhere that reads the format.
---
analysis: A simple rule on 'curl | sh' is often too noisy for developer environments.
  This hunt uses a gated flow to correlate DNS-based redirection with rare persistence
  and specific sensitive file access, providing the context needed for high-confidence
  triage.
blind_spots:
- id: no-agent-coverage
  question: Are there hosts missing telemetry for DNS or process activity?
  requires: endpoint agent on all systems
  risk: A host without an agent resolves the domain but remains invisible to forensics.
- id: clipboard-content-visibility
  question: What was the exact text the user copied from the AI platform?
  requires: clipboard monitoring logs
  risk: The hunt sees the execution but not the specific 'Apple Support' or 'Claude
    Cowork' lure that prompted it.
  stage: clipboard-command-execution
- id: encrypted-dns
  question: Was the redirect domain resolved via DoH (DNS over HTTPS)?
  requires: TLS inspection or proxy logs
  risk: If the agent cannot intercept encrypted DNS, the initial lead may be missed.
coverage:
- stage: clipboard-command-execution
  status: covered
  steps:
  - clipboard-execution
- stage: stealer-persistence
  status: covered
  steps:
  - rare-scheduled-persistence
- stage: sensitive-data-access
  status: covered
  steps:
  - credential-theft-evidence
- reason: This stage occurs on the search engine and browser before endpoint behavior
    begins.
  stage: initial-access-seo-redirection
  status: out_of_scope
- reason: Payload delivery is observed as the redirect DNS and resulting terminal
    command.
  stage: malicious-payload-delivery
  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: Threat actors are weaponizing the trust inherent in AI platforms
    to deliver malware. Confirming that users have not executed commands from these
    emerging impersonation vectors is a high-priority exposure check.
  methodology: model-assisted
  trigger: intel-report
hypothesis: An intruder uses a trusted AI platform to trick a user into executing
  a terminal command from the clipboard, establishing persistence and stealing credentials.
labels:
- hunt
- attack.t1059.001
- attack.t1059.004
- attack.t1053.005
- attack.t1555
- attack.t1539
- attack.t1552
name: AI-Impersonation Driven Script Execution and Data Theft
parameters:
  lookback_days:
    default: '14'
    description: Days of history to examine.
    type: number
  redirect_domains:
    default:
    - downloading-api.it.com
    description: Malicious redirect domains observed in AI-lure campaigns.
    from:
      kind: article
      observed: '2026-08-27'
      ref: huntress-ai-attack-surface
    type: list[domain]
  scope_hosts:
    default: []
    description: Limit forensics to these hosts; usually the output of the DNS lead
      step.
    type: list[host]
provenance:
  authors:
  - name: Huntbase hunt generation
    org: huntbase.io
  generated:
    by: huntbase-hunt-generation
    from: https://www.huntress.com/blog/ai-attack-surface
    gates:
    - dry-run
    - lint
    - critic
    model: hb_google/gemini-3-flash-preview
rationale: The lead query identifies users interacting with known redirect infrastructure.
  Forensics are then narrowed to those hosts to reduce noise from developers using
  similar terminal patterns.
references:
- name: 'The AI Attack Surface: How Threat Actors Abuse Trusted AI Platforms'
  url: https://www.huntress.com/blog/ai-attack-surface
related:
- hunt: ai-platform-mediated-malvertising-redirection
  relation: follows
scenario:
  stages:
  - name: AI Platform SEO Redirection
    observables:
    - claude.ai
    - chatgpt.com
    - grok.com
    - claude.ai/share
    - sponsored search results
    - Bing
    - Google Search
    slug: initial-access-seo-redirection
    tactic: initial-access
    techniques:
    - T1566.002
    - T1204.001
  - name: AI-Themed Payload Delivery
    observables:
    - downloading-api.it.com
    - ClaudeDesktop.exe
    slug: malicious-payload-delivery
    tactic: execution
    techniques:
    - T1204.001
  - name: Terminal and PowerShell Execution
    observables:
    - curl
    - powershell
    - zsh
    - bash
    - Terminal
    - Apple Support install guide lure
    - Clear disk space lure
    slug: clipboard-command-execution
    tactic: execution
    techniques:
    - T1059.001
    - T1059.004
  - name: Malware Persistence
    observables:
    - new scheduled tasks
    - SectopRAT
    - AMOS
    - MacSync
    slug: stealer-persistence
    tactic: persistence
    techniques:
    - T1053.005
  - name: Credential and Secret Theft
    observables:
    - ~/.ssh
    - ~/.aws
    - ~/Library/Keychains
    - browser cookies
    - Telegram sessions
    slug: sensitive-data-access
    tactic: credential-access
    techniques:
    - T1555
    - T1539
    - T1552
  summary: Threat actors are utilizing SEO poisoning to lure victims into interacting
    with malicious artifacts and shared conversations on trusted AI platforms like
    Claude, ChatGPT, and Grok. These interactions lead to either the download of fake
    installers from malicious redirect domains or the execution of commands via Terminal
    and PowerShell that deploy credential stealers. The resulting malware, such as
    AMOS and MacSync, establishes persistence via scheduled tasks and exfiltrates
    sensitive credentials, cloud keys, and browser data.
series:
  index: 2
  slug: the-ai-attack-surface-how-threat-actors-abuse-trusted-ai-platforms
  title: 'The AI Attack Surface: How Threat Actors Abuse Trusted AI Platforms'
  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
tlp: clear
type: investigation
---


# AI-Impersonation Driven Script Execution and Data Theft

This hunt identifies 'ClickFix' attacks where victims follow malicious instructions from shared AI conversations or artifacts. The attacker uses the inherent trust in platforms like Claude and ChatGPT to bypass search safety, delivering commands that download stealers like AMOS or MacSync. The flow uses a gated approach: a cheap lead query identifies interaction with known redirect domains before opening forensic queries that examine terminal execution, rare scheduled jobs, and sensitive file access.

## dns-to-redirect
<!-- DNS to AI-lure redirect domains -->
Find any host resolving known malicious domains used as redirects from legitimate AI artifacts.

```sqlite target=endpoint role=scoping params=(lookback_days=lookback_days, redirect_domains=redirect_domains)
~~~yaml
expected: A hit indicates a user clicked a link within an AI platform; silence suggests
  no interaction with known indicators in this window.
reads:
- device_hostname
- query_hostname
- process_name
- time
silence: not_evidence_of_absence
source: hb_dns_activity
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT device_hostname, query_hostname, process_name, time FROM hb_dns_activity WHERE instr(',' || '{{redirect_domains}}' || ',', ',' || LOWER(query_hostname) || ',') > 0 AND time >= datetime('now', '-{{lookback_days}} days')
```

## evaluate-dns-lead
<!-- Evaluate DNS lead -->
```agent target=hunter
cite: required
context:
- dns-to-redirect
max_iterations: 3
objective: Determine if the DNS activity indicates a suspicious redirect from an AI
  platform.
success_criteria: A suspicious or benign verdict per host citing the resolution event.
tools:
- endpoint
```

## gate-on-lead
<!-- Gate forensics on DNS lead -->
if~: "the evaluate-dns-lead verdict is suspicious for at least one host" (confidence: high, judge=hunter)
then: → parallel-forensics
indeterminate: → remediation-review
unavailable: → remediation-review (blind_spot: no-agent-coverage)
else: → close-out

## parallel-forensics
<!-- Gather forensics side by side -->
parallel:
- → clipboard-execution
- → rare-scheduled-persistence
- → credential-theft-evidence
join: → kill-chain-triage

## clipboard-execution
<!-- Suspicious shell execution patterns -->
Identify command execution matching the AI-lure pattern, such as shell downloads or encoded PowerShell commands.

```sqlite target=endpoint role=detection-candidate params=(lookback_days=lookback_days, scope_hosts=scope_hosts)
~~~yaml
expected: Process rows showing an interpreter downloading and executing content directly
  from the command line.
reads:
- device_hostname
- process_name
- process_cmd_line
- user_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, user_name, time FROM hb_process_activity WHERE ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND (LOWER(process_name) IN ('curl', 'wget', 'bash', 'zsh', 'powershell.exe', 'pwsh', 'cmd.exe')) AND (LOWER(process_cmd_line) LIKE '%|%sh%' OR LOWER(process_cmd_line) LIKE '%iex%' OR LOWER(process_cmd_line) LIKE '%-enc%') AND time >= datetime('now', '-{{lookback_days}} days')
```

## rare-scheduled-persistence
<!-- Rare scheduled persistence -->
Find new scheduled tasks that are unique to the scoped hosts, indicating persistence established by the malware.

```sqlite target=endpoint role=baseline params=(lookback_days=lookback_days, scope_hosts=scope_hosts)
~~~yaml
baseline:
  compare: first_seen
  window: '{{lookback_days}}d'
expected: A job seen on one or two hosts shortly after the lead interaction.
prevalence:
  by: device_hostname
  key:
  - job_cmd_line
  rare_below: 3
reads:
- device_hostname
- job_cmd_line
- time
silence: not_evidence_of_absence
source: hb_scheduled_job
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT LOWER(job_cmd_line) AS cmd, COUNT(DISTINCT device_hostname) AS hosts, MIN(time) AS first_seen FROM hb_scheduled_job WHERE ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY cmd HAVING hosts <= 3 ORDER BY hosts ASC
```

## credential-theft-evidence
<!-- Credential and sensitive file access -->
Detect access to SSH keys, cloud credentials, and browser keychains targeted by stealers.

```sqlite target=endpoint role=enrichment params=(lookback_days=lookback_days, scope_hosts=scope_hosts)
~~~yaml
expected: File activity indicating a shell or unknown process reading sensitive directories.
reads:
- device_hostname
- process_name
- file_path
- activity_name
- time
silence: not_evidence_of_absence
source: hb_file_activity
verified: dry-run
verified_at: '2026-09-20'
~~~
SELECT device_hostname, process_name, file_path, activity_name, time FROM hb_file_activity WHERE ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND (LOWER(file_path) LIKE '%/.ssh/%' OR LOWER(file_path) LIKE '%/.aws/%' OR LOWER(file_path) LIKE '%/library/keychains/%' OR LOWER(file_path) LIKE '%/telegram%') AND time >= datetime('now', '-{{lookback_days}} days')
```

## kill-chain-triage
<!-- Kill chain triage -->
```agent target=hunter
cite: required
context:
- evaluate-dns-lead
- clipboard-execution
- rare-scheduled-persistence
- credential-theft-evidence
max_iterations: 6
objective: Determine if the host shows a complete attack lifecycle following the AI
  redirect.
success_criteria: A malicious verdict citing matching timestamps across DNS, process,
  and file surfaces.
tools:
- endpoint
```

## route-on-triage
<!-- Route on triage verdict -->
if~: "the kill-chain-triage verdict is malicious for at least one host" (confidence: high, judge=hunter)
then: → contain-host
indeterminate: → remediation-review
unavailable: → remediation-review (blind_spot: no-agent-coverage)
else: → close-out

## contain-host
<!-- Contain compromised host -->
```action target=endpoint
~~~yaml
approval: required
~~~
Isolate the host and notify the user to rotate all cloud and SSH keys from a different device.
```
→ remediation-review

## remediation-review
<!-- Remediation and key rotation review -->
```manual target=analyst
Review the file paths in credential-theft-evidence. Verify that the user has rotated SSH keys, AWS credentials, and browser-stored secrets accessed during the incident window.
```
→ close-out

## close-out
<!-- Close out -->
```manual target=analyst
Document the hosts examined. If benign results were numerous, consider tuning the shell execution query to exclude known internal admin utilities.
```
→ 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, critic, then reviewed by a person.