Back to Intelligence

AI Skill Supply Chain Backdoors: Malicious SKILL.md Packages, Prompt Injection & Agent Hijacking — OTX Detection Pack

SA
Security Arsenal Team
December 4, 2026
9 min read

Threat Summary

A new OTX pulse published by AlienVault, based on analysis from K7 Computing Labs, signals an emerging and rapidly weaponizing threat class: supply chain attacks against AI agent "skills." AI Skills are natural-language instruction packages (anchored by a SKILL.md manifest file) that tell autonomous AI agents how to execute complex tasks. They are distributed through public and private skill registries — and that distribution model is now being treated by adversaries exactly the way npm, PyPI, and browser-extension marketplaces were treated in earlier supply chain waves.

The pulse's seven file-hash indicators correspond to malicious skill-package components: poisoned SKILL.md manifests, auxiliary scripts carrying embedded payloads, and bundled assets that execute out-of-band code when the agent loads the skill. The attack chain is consistent across the samples:

  1. Distribution — A trojanized skill is published to a community skill registry or shared repository, often masquerading as a productivity, scraping, or DevOps helper.
  2. Activation — A developer or enterprise user installs the skill; the AI agent parses SKILL.md and auto-invokes auxiliary scripts with the agent's own privileges.
  3. Execution — Embedded shell/PowerShell/Python payloads run with inherited agent permissions — effectively arbitrary code execution disguised as agent behavior.
  4. Objective — Credential and secret harvesting (API keys, tokens, env files), data exfiltration to attacker infrastructure, and in several samples a persistent backdoor that re-executes each time the agent loads the skill.

A second, quieter vector is prompt injection embedded in skill content: adversarial instructions inside SKILL.md or reference files that redirect the agent itself — for example, silently altering what the agent sends, to whom, or instructing it to exfiltrate conversation context. This maps directly to MITRE ATLAS techniques rather than classic ATT&CK, and most enterprise detection stacks are blind to it.

Threat Actor / Malware Profile

Threat class: AI Skill supply-chain malware (trojanized agent instruction packages) Attribution: Unknown — consistent with opportunistic criminal tooling sold and traded in dark web communities where "agent backdoor" kits are an emerging commodity.

Distribution method: Public skill registries, shared Git repositories, and copy-paste installation from community forums. Social engineering is minimal — the trust model of the registry does the work, identical to typosquatted package attacks.

Payload behavior: Auxiliary scripts bundled alongside SKILL.md execute when the agent initializes the skill. Observed payloads perform:

  • Reading of .env, .aws/credentials, SSH keys, browser credential stores, and CI/CD secrets
  • Outbound exfiltration over HTTPS, frequently via curl or PowerShell Invoke-WebRequest to attacker endpoints
  • Second-stage retrieval using Base64-encoded download cradles (Invoke-Expression, bash -c with piped eval)

C2 communication: Outbound HTTPS from the host running the agent — blending with legitimate agent API traffic (a serious detection gap). Exfil endpoints in these samples use newly registered domains and free-hosting subdomains rather than classic C2 signatures.

Persistence mechanism: The skill itself is the persistence. Because agents auto-load installed skills at invocation time, the malicious script re-runs every time the skill is triggered — no registry Run key or scheduled task required. Some samples additionally drop a scheduled task as a fallback loader.

Anti-analysis techniques:

  • Payloads staged inside assets/ folders with innocuous filenames to evade manual review
  • Base64/obfuscated one-liners inside otherwise benign-looking helper scripts
  • Prompt-injection content designed to be invisible to human reviewers but directive to the LLM parsing it — a form of machine-targeted steganography

IOC Analysis

The pulse carries 7 indicators, all file hashes (3× SHA256, 2× SHA1, 2× MD5). There are no IPs, domains, or URLs — which is itself a finding: this threat class currently evades network-based blocklists because execution happens inside trusted agent processes and exfil blends with legitimate HTTPS.

How SOC teams should operationalize these hashes:

  • Import all seven hashes into EDR blocklists (Defender, CrowdStrike, SentinelOne custom indicators) as block-on-hash rules — these are known-malicious skill components and should never execute in your environment.
  • Sweep file repositories, developer workstations, and build/agent servers for any file matching the hashes, with particular attention to skill directories, agent config paths, and recently downloaded archives.
  • Submit hashes to a sandbox (or re-pull from your existing malware analysis tooling) to extract the embedded scripts — the obfuscated download cradles frequently reveal the C2 domains the pulse does not list, giving you network IOCs of your own.
  • Extend detection beyond hashes: because re-packed variants will have different hashes, the behavioral rules in the Detection Engineering section below are the durable control.

Detection Engineering

The following Sigma rules target the specific behaviors in this pulse: script execution out of AI skill directories, Base64 download cradles in auxiliary scripts, and agent-initiated exfiltration to rare destinations.

YAML
---
title: Suspicious Script Execution From AI Skill Directory
id: 7f3a9c2e-1b4d-4e8f-9a2c-5d6e7f8a9b01
status: experimental
description: Detects script interpreters executing payloads from AI agent skill directories, consistent with trojanized SKILL.md auxiliary scripts observed in OTX pulse analysis.
author: Security Arsenal Threat Intelligence
references:
    - https://labs.k7computing.com/index.php/a-primer-on-ai-skill-security/
date: 2026/12/05
tags:
    - attack.execution
    - attack.t1059
    - mitre.atlas.aml-t0051
logsource:
    category: process_creation
    product: windows
detection:
    selection_interpreter:
        Image|endswith:
            - '\powershell.exe'
            - '\pwsh.exe'
            - '\python.exe'
            - '\cmd.exe'
            - '\wscript.exe'
            - '\curl.exe'
    selection_skill_path:
        CommandLine|contains:
            - '\skills\'
            - '\.agent\skills\'
            - 'SKILL.md'
            - '\skill-registry\'
    condition: selection_interpreter and selection_skill_path
falsepositives:
    - Legitimate skill packages containing auxiliary scripts vetted by the organization
level: high
---
title: Base64 Download Cradle In Agent Or Skill Context
id: 8a4b1d3f-2c5e-4f9a-0b3d-6e7f8a9b0c12
status: experimental
description: Detects Base64-encoded download cradles and eval-piped execution associated with malicious AI skill payloads and staged second-stage retrieval.
author: Security Arsenal Threat Intelligence
references:
    - https://labs.k7computing.com/index.php/a-primer-on-ai-skill-security/
date: 2026/12/05
tags:
    - attack.execution
    - attack.t1059.001
    - attack.t1027
logsource:
    category: process_creation
    product: windows
detection:
    selection_encoded:
        CommandLine|contains:
            - ' -enc '
            - ' -EncodedCommand '
            - 'FromBase64String'
            - 'Invoke-Expression'
            - 'IEX '
            - 'base64 -d'
            - '| bash'
            - '| sh'
    selection_net:
        CommandLine|contains:
            - 'Invoke-WebRequest'
            - 'wget '
            - 'curl '
            - 'DownloadString'
            - 'http://'
            - 'https://'
    filter_known_good:
        ParentImage|endswith:
            - '\Code.exe'
        CommandLine|contains: '--update'
    condition: selection_encoded and selection_net and not filter_known_good
falsepositives:
    - Admin automation scripts using encoded commands
level: high
---
title: Agent Process Secret File Access And Outbound Exfiltration
id: 9b5c2e4a-3d6f-4a0b-1c4e-7f8a9b0c1d23
status: experimental
description: Detects AI agent or skill processes accessing credential stores and secret files, indicative of skill-borne data exfiltration and backdoor behavior.
author: Security Arsenal Threat Intelligence
references:
    - https://labs.k7computing.com/index.php/a-primer-on-ai-skill-security/
date: 2026/12/05
tags:
    - attack.credential_access
    - attack.t1552
    - attack.exfiltration
    - attack.t1041
logsource:
    category: file_event
    product: windows
detection:
    selection_secret_target:
        TargetFilename|contains:
            - '\.env'
            - '\credentials'
            - '\.aws\'
            - '\.ssh\'
            - 'id_rsa'
            - 'Login Data'
            - 'token'
            - '\secrets\'
    filter_system:
        User|contains: 'SYSTEM'
    condition: selection_secret_target and not filter_system
falsepositives:
    - Backup agents and legitimate secrets-management tooling
level: medium

The following KQL query hunts Microsoft Sentinel for agent-context processes that both execute out of skill-style directories and initiate outbound network connections — the compound behavior signature of a weaponized skill.

KQL — Microsoft Sentinel / Defender
let SkillPaths = dynamic(["skills", ".agent", "SKILL.md", "skill-registry"]);
let Interpreters = dynamic(["powershell.exe", "pwsh.exe", "python.exe", "cmd.exe", "curl.exe", "wscript.exe"]);
let SkillProcs =
    DeviceProcessEvents
    | where Timestamp > ago(7d)
    | where ProcessCommandLine has_any (SkillPaths)
    | where FileName in~ (Interpreters)
    | summarize ProcCount = count(), FirstSeen = min(Timestamp), LastSeen = max(Timestamp)
      by DeviceName, FileName, ProcessCommandLine, InitiatingProcessAccountName;
let NetActivity =
    DeviceNetworkEvents
    | where Timestamp > ago(7d)
    | where InitiatingProcessFileName in~ (Interpreters)
    | where RemoteIP !startswith "10." and RemoteIP !startswith "192.168." and RemoteIP !startswith "172."
    | summarize NetCount = count(), Destinations = make_set(RemoteUrl, 20)
      by DeviceName, InitiatingProcessFileName;
SkillProcs
| join kind=inner (NetActivity) on DeviceName
| project DeviceName, FileName, ProcessCommandLine, Destinations, InitiatingProcessAccountName, FirstSeen, LastSeen
| order by LastSeen desc

The following PowerShell script sweeps a Windows host for the pulse's file-hash IOCs and for suspicious skill artifacts — SKILL.md manifests containing encoded or network-staging keywords — reporting anything it finds.

PowerShell
# AI Skill Supply-Chain IOC & Artifact Hunt — Security Arsenal
$iocHashes = @(
    'ecb58cb29078d9646ad1dcdbe51526f2d9cfea06be5fb2ab183e8ecc3ab6bf15',
    'c5ed3a22e017c2e0d2e45a46f699f4d58288231f1b99cfa0314ceccdc7a5a25b',
    '04de9ae68e03fb142d1cf94629907b8c0b86226fb02abceefe6a74cbe923d89d',
    'ed90cf275e5448fb228a74267f078c363432ecc6',
    '7d52fa561468f0c77bca112f8393399dec078d02',
    'f49bcd657ef1e626e85ce858958c1769',
    '40c0e4743f5162bc9472f194630d9b6e'
)

$searchRoots = @("$env:USERPROFILE", "C:\ProgramData", "$env:APPDATA")
$findings = @()

# 1) Hash sweep for known-malicious skill components
foreach ($root in $searchRoots) {
    if (Test-Path $root) {
        Get-ChildItem -Path $root -Recurse -File -ErrorAction SilentlyContinue |
            Where-Object { $_.Length -lt 50MB } |
            ForEach-Object {
                $h = (Get-FileHash -Path $_.FullName -Algorithm SHA256 -ErrorAction SilentlyContinue).Hash
                $md5 = (Get-FileHash -Path $_.FullName -Algorithm MD5 -ErrorAction SilentlyContinue).Hash
                if ($iocHashes -contains $h.ToLower() -or $iocHashes -contains $md5.ToLower()) {
                    $findings += "[IOC MATCH] $($_.FullName)"
                }
            }
    }
}

# 2) Scan SKILL.md manifests for suspicious embedded directives
Get-ChildItem -Path $searchRoots -Recurse -Filter 'SKILL.md' -File -ErrorAction SilentlyContinue | ForEach-Object {
    $content = Get-Content $_.FullName -Raw -ErrorAction SilentlyContinue
    if ($content -match '(?i)(invoke-expression|frombase64string|curl |wget |exfiltrat|ignore (all )?previous instructions|send .* to https?://)') {
        $findings += "[SUSPICIOUS SKILL] $($_.FullName)"
    }
}

# 3) Suspicious scheduled tasks staging scripts from skill paths
Get-ScheduledTask | ForEach-Object {
    $actions = $_.Actions | Where-Object { $_.Execute -match '(?i)(powershell|python|curl|wscript)' }
    if ($actions -and ($_.Actions.Arguments -match '(?i)(skills|\.agent|SKILL\.md|-enc |base64)')) {
        $findings += "[TASK] $($_.TaskName) -> $($_.Actions.Execute) $($_.Actions.Arguments)"
    }
}

if ($findings.Count -gt 0) { $findings | ForEach-Object { Write-Host $_ -ForegroundColor Red } }
else { Write-Host 'No AI skill supply-chain artifacts found.' -ForegroundColor Green }

Response Priorities

Immediate (0–4 hours):

  • Push all seven file-hash IOCs to EDR block-on-hash lists across Windows, macOS, and Linux fleets.
  • Run the PowerShell hunt script on developer workstations, build servers, and any host running AI agent frameworks; sweep shared skill repositories.
  • Run the KQL query in Sentinel to surface agent-context processes with anomalous outbound destinations; isolate any host matching both process and network legs.

24 hours:

  • Because these payloads target credentials and secrets, treat any positive finding as a credential compromise event: rotate API keys, cloud tokens, SSH keys, and CI/CD secrets on affected hosts and any secret store the agent could read.
  • Audit which skills are installed across the organization and where they were sourced; quarantine any skill from an unvetted registry pending review.
  • Review outbound HTTPS from agent hosts for exfiltration to newly registered or free-hosted domains and block confirmed destinations.

1 week (architecture hardening):

  • Establish an approved skill registry / allowlist: agents may only load skills signed or vetted through an internal review pipeline, mirroring package-management controls.
  • Sandbox agent execution: run agents under least-privilege identities with no access to .aws, .ssh, .env, or browser credential stores; egress-restrict agent hosts to approved API endpoints.
  • Add SKILL.md content review to onboarding: scan manifests for prompt-injection markers, encoded commands, and embedded network calls before approval.
  • Extend detection coverage to MITRE ATLAS techniques and add the Sigma rules above to production, with tuning for legitimate vetted skills.

Related Resources

Security Arsenal Incident Response Managed SOC & MDR Services AlertMonitor Threat Detection From The Dark Side Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.