Detection queries Reported campaignDeveloper workflows · Cloud & SaaS

GhostAction Stage 2 stealer targeting cloud and AI credentials

Malicious workflows and a VS Code auto-run task steal AWS, npm, SSH and Claude/Gemini credentials across 94 repos. AI is a credential target here, not the attack operator.

What happened

GhostAction pushes malicious GitHub Actions then Stage 2: .vscode/tasks.json folderOpen runs node on fake fa-solid-400.woff2 JS stealer; cron */5 pulls C2. Targets AWS/npm/git/kube/SSH plus Claude/Gemini creds. 94 repos / 66 owners. PolinRider copycat technique, not DPRK per OSM.

Steals AI client credentials (~/.claude/.credentials.json, ~/.gemini/oauth_creds.json, sk-ant- grep) alongside cloud/git tokens

Read the original source

How it happened

Select a stage to explore its defenses
Detect this stage
Detect this stage
Detect this stage
Detect this stage
Select a stage · Drag to explore · + / − to zoom · Dashed edges are loopsSelect a stage · Arrows show reported connectionsResearch / qualified account
Read the flow as text & sources

A catalog reconstruction of the supplied source account. Primary attack is CI secret theft + VS Code folderOpen stealer; AI is a credential target (Claude/Gemini keys), not the attack operator. Included because Jose's post calls out AI tooling theft.

  1. 01 · Compromised account changes a repository

    Malicious GitHub Actions and workspace tasks are introduced.

    Hunt: A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.

    Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.

    Source for step 1
  2. 02 · Trusted workspace opens a task

    VS Code executes Node content disguised as a font file.

    Hunt: A repository, dependency or agent changes MCP commands, automatic-task settings, tool approval or model-routing configuration before new execution.

    A file-write event alone cannot establish what changed. Legitimate setup also changes these files; obtain a diff and authorization context.

    Source for step 2
  3. 03 · AI credential stores are searched

    The stealer targets Claude and Gemini tokens alongside cloud and developer credentials.

    Hunt: An unexpected process or tool accesses credential stores and is followed by token use or outbound transfer inconsistent with the owner.

    Defender DeviceFileEvents is not a general file-read audit trail. Collect suitable object-access, EDR or application logs; legitimate developer tools also read secrets.

    Source for step 3
  4. 04 · Secrets are stolen with persistence

    The report describes periodic C2 retrieval through cron and a multi-repository campaign.

    Hunt: A task, Run key, cron entry, shell profile, or startup file is changed and later launches the same unexpected program.

    Windows and Unix persistence require different collectors. A configuration change without a subsequent launch is not proof that persistence ran.

    Source for step 4

Why it matters

Reported entry point: Compromised GitHub account → malicious workflow + VS Code trusted workspace auto task. Reported impact: The report describes periodic C2 retrieval through cron and a multi-repository campaign; reported targets include GitHub maintainers / developers (many dormant repos).

Check these source-linked conditions against your setup.

Claude CodeClaude / Claude DesktopGemini / Gemini CLIAI API / cloud credentialsnpm / PyPI dependencies

The reported stealer targets local development, cloud and Claude / Gemini credentials.

Conditions to check
  • The malicious workflow or VS Code folder-open task must run with access to locally stored credentials.
  • AI is a credential target in this account; the report does not establish an AI-operated intrusion.

Source-linked applicability guidance. Confirm current scope in the original report.

Read the original report

What you can do

Protection & prevention

Start here

Review workflow and folder-open task changes, then rotate exposed development and AI credentials.

task.allowAutomaticTasks off; Restricted Mode; crontab -l for #ghc2; rotate Claude/Gemini/cloud/git creds

Catalog defensive guidance based on the reported behavior. Confirm scope and current mitigations in the original source.

Review the original guidance
Investigate each phase

Detection queries

Draft query starters grouped by the attack stages where they apply.

Download stage pack

Start with the logs you collect. Each hunt identifies its required visibility, field mapping and limits. Queries are catalog-authored drafts using reusable behavior profiles; test with known activity and your normal baseline before alerting.

01Compromised account changes a repositoryDependency / CI trust boundaryCustom schema · Draft

Malicious GitHub Actions and workspace tasks are introduced.

What to look for

A package or workflow change introduces a lifecycle hook, remote dependency or new command that accesses secrets or external services.

Visibility: Defender-side logs where collected

Required logs

  • Package-manager and CI job logs
  • Lockfile / manifest / workflow diffs
  • Runner process trees, secret access and egress

Coverage limit. Package installation and unfamiliar names are not malicious by themselves. Dependency resolution and CI audit records are required.

Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Dependency / CI trust boundary
id: 5fa9c45a-ac1c-4666-a598-e80626320997
status: experimental
description: A package or workflow change introduces a lifecycle hook, remote
  dependency or new command that accesses secrets or external services.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: application
  product: openattacks_audit
  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
    Target and CorrelationId from the required source logs first.
detection:
  selection:
    EventType:
      - package.install
      - ci.workflow.change
      - package.lifecycle.exec
  condition: selection
KQL
Draft KQLDownload KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("package.install", "ci.workflow.change", "package.lifecycle.exec")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Compare package provenance, publish identity, lifecycle scripts and resolved dependency URLs with the approved version.
  2. Correlate the install or workflow to secret reads and subsequent token use; distinguish exposure from confirmed compromise.
02Trusted workspace opens a taskAgent trust / configuration changesCustom schema · Draft

VS Code executes Node content disguised as a font file.

What to look for

A repository, dependency or agent changes MCP commands, automatic-task settings, tool approval or model-routing configuration before new execution.

Visibility: Defender-side logs where collected

Required logs

  • File changes and before/after content for MCP / IDE configuration
  • Repository audit / pull-request history
  • Agent startup and tool-invocation logs

Coverage limit. A file-write event alone cannot establish what changed. Legitimate setup also changes these files; obtain a diff and authorization context.

Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Agent trust / configuration changes
id: 2dfc8034-d66b-42a7-a699-a76b2ef872ac
status: experimental
description: A repository, dependency or agent changes MCP commands,
  automatic-task settings, tool approval or model-routing configuration before
  new execution.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: application
  product: openattacks_audit
  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
    Target and CorrelationId from the required source logs first.
detection:
  selection:
    EventType:
      - agent.config.write
      - agent.approval.change
  condition: selection
KQL
Draft KQLDownload KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("agent.config.write", "agent.approval.change")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("agent.config.write", "agent.approval.change")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Diff command, args, environment, origin, autoApprove and task settings against the previously approved version.
  2. Correlate the author and change with the next agent launch; inspect path canonicalization and trailing-dot variants where relevant.
03AI credential stores are searchedSensitive store access → credential useCustom schema · Draft

The stealer targets Claude and Gemini tokens alongside cloud and developer credentials.

What to look for

An unexpected process or tool accesses credential stores and is followed by token use or outbound transfer inconsistent with the owner.

Visibility: Defender-side logs where collected

Required logs

  • File-read / API access telemetry for relevant secret stores
  • Process identity and command lines
  • Identity, token and outbound-network audit logs

Coverage limit. Defender DeviceFileEvents is not a general file-read audit trail. Collect suitable object-access, EDR or application logs; legitimate developer tools also read secrets.

Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.

Sigma
Draft SigmaDownload Sigma
title: Hunt - Sensitive store access → credential use
id: 46c46c62-2d83-4198-a8bf-d6637094527b
status: experimental
description: An unexpected process or tool accesses credential stores and is
  followed by token use or outbound transfer inconsistent with the owner.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: application
  product: openattacks_audit
  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
    Target and CorrelationId from the required source logs first.
detection:
  selection:
    EventType:
      - secret.read
      - credential.store.read
  condition: selection
KQL
Draft KQLDownload KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("secret.read", "credential.store.read")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("secret.read", "credential.store.read")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Identify the actor, process and exact store touched, then pivot to token use from new devices or infrastructure.
  2. Correlate reads with egress and rotate affected credentials after confirming exposure.
04Secrets are stolen with persistenceNew persistence → recurring executionCustom schema · Draft

The report describes periodic C2 retrieval through cron and a multi-repository campaign.

What to look for

A task, Run key, cron entry, shell profile, or startup file is changed and later launches the same unexpected program.

Visibility: Defender-side logs where collected

Required logs

  • Platform-specific registry, scheduled-task, cron and startup-file changes
  • Process creation and file provenance
  • User / administrative change records

Coverage limit. Windows and Unix persistence require different collectors. A configuration change without a subsequent launch is not proof that persistence ran.

Custom-schema candidates, not out-of-box detectors. Map your application / cloud / platform logs to EventType, Actor, Asset, Action, Target and CorrelationId. KQL uses a custom OpenAttacksAudit_CL table; SPL uses openattacks:audit. EventType values are proposed normalization names, not native vendor event names. Correlation and environment-specific alert logic remain to be built.

Sigma
Draft SigmaDownload Sigma
title: Hunt - New persistence → recurring execution
id: 6154ff56-2978-45fa-aecd-86d91557f32e
status: experimental
description: A task, Run key, cron entry, shell profile, or startup file is
  changed and later launches the same unexpected program.
author: MagicSword OpenAttacks catalog
date: 2026-10-23
falsepositives:
  - Authorized activity matching this broad hunt; baseline and investigate
    before alerting.
level: low
logsource:
  category: application
  product: openattacks_audit
  definition: Custom normalized audit schema; map EventType, Actor, Asset, Action,
    Target and CorrelationId from the required source logs first.
detection:
  selection:
    EventType:
      - persistence.create
      - persistence.modify
  condition: selection
KQL
Draft KQLDownload KQL
// SCHEMA TEMPLATE: create/map this custom table before use; not a built-in Sentinel table.
// OpenAttacksAudit_CL: TimeGenerated(datetime), EventType/Actor/Asset/Action/Target/CorrelationId(string).
// Selects candidates only. Apply the stage hypothesis and correlation steps before alerting.
OpenAttacksAudit_CL
| where TimeGenerated > ago(7d)
| where EventType in ("persistence.create", "persistence.modify")
| project TimeGenerated, EventType, Actor, Asset, Action, Target, CorrelationId
| order by TimeGenerated desc
SPL
Draft SPLDownload SPL
sourcetype="openattacks:audit"
EventType IN ("persistence.create", "persistence.modify")
| table _time EventType Actor Asset Action Target CorrelationId
| sort - _time
Investigation steps
  1. Diff the persistence artifact and identify the creating process / principal.
  2. Correlate the subsequent launch and network behavior; baseline deployment and management agents.
Technical detailsTooling, impact & MITRE ATLAS

Attack context

AI's role
AI credential theft
Initial access
Compromised GitHub account → malicious workflow + VS Code trusted workspace auto task

Tooling as reported

AI products, models and artifacts

Other tooling

Targets and reported impact

Targets / sectors
GitHub maintainers / developers (many dormant repos)
Reported scale / exposure
94 compromised repos; Stage 1 Oct 8, Stage 2 Oct 15 2026

Reported attribution

GhostAction; PolinRider-technique copycat (no shared IOCs with DPRK per OSM)

Structured attribution

Actor
GhostAction

Detection rules

  • Review attack-specific indicatorsGUIDANCE

    Monitor for the techniques described in GhostAction Stage 2 stealer (AI credential theft). Refer to sources for specific IOCs and TTPs.

Source defensive notes

task.allowAutomaticTasks off; Restricted Mode; crontab -l for #ghc2; rotate Claude/Gemini/cloud/git creds

MITRE ATLAS

AI-specific catalog annotations based on the reported behavior; these are not MITRE case-study assignments.

AML.T0055Unsecured Credentials

The stealer searches local AI credential stores. Source

Sources & research credit

1 source

Research by Thijs Xhaflaire (Jamf Threat Labs); OpenSourceMalware deep dive · Jamf Threat Labs / OpenSourceMalware

  1. opensourcemalware.com
Record & downloads
Source record name
GhostAction Stage 2 stealer (AI credential theft)
Entry ID
ghostaction-ai-creds-2026-10
Catalog review
October 20, 2026
Category
attacks-on-ai
AI involvement confidence
unverified