Microsoft Agent Framework PyPI Compromise

Two malicious agent-framework releases (1.26.1, 1.26.2) install a .pth startup hook that steals Azure, CI/CD and registry credentials on every Python launch · published 2026-11-17 · quarantined within about an hour
Threat
agent-framework PyPI Compromise
Severity
HIGH Quarantined; retro-hunt
Type
Supply-chain / Credential theft
Targets
CI/CD runners & Azure workloads
Version
v0.1 (2026-11-18)
Author
HuntPack
Confidence
High (root cause unconfirmed)
01

Executive Summary

On 2026-11-17 two malicious releases of Microsoft’s agent-framework PyPI package, 1.26.1 (20:35 UTC) and 1.26.2 (~21:08 UTC), were published 33 minutes apart. Both were quarantined by roughly 21:30 UTC; 1.26.0 (2026-11-12 18:25 UTC) is the last clean release. Wiz puts the package at about 41,000 downloads a week, SecurityWeek and Aikido at about 190,000 a month.

Both releases drop a .pth file into the site-packages root (agent_framework_meta.pth in 1.26.1, af_runtime_diag.pth in 1.26.2). CPython executes any import line in a .pth file on every interpreter start, so the stealer runs on any Python launch in that environment, pip itself included, whether or not anything imports agent_framework. The victim never has to use the library.

The stealer forks into a detached background process, sets _AF_TEL=1 as a run-once marker (a marker, not a credential), and harvests environment variables by substring (TOKEN, SECRET, PASSWORD, KEY, AZURE, AWS, GITHUB, OPENAI and more), up to 300 /proc/*/environ files, and up to 60 (1.26.1) or 80 (1.26.2) credential files: Azure CLI state, Azure DevOps agent .credentials, pip.conf, .npmrc, .netrc, .git-credentials, .docker/config.json, Hugging Face tokens and .env files. It also requests Azure managed-identity tokens from IMDS for 12 resources and, in 1.26.2, GitHub Actions OIDC tokens for api://AzureADTokenExchange and https://management.azure.com/. Everything is zlib-compressed, base64-encoded and sent in one HTTPS POST to a webhook.site endpoint.

Attacker objective: steal cloud, CI/CD and registry credentials from developer and build environments and mint fresh Azure identities from them. Root cause is unconfirmed. Candidates in the reporting are a stolen PyPI upload token, a misconfigured Trusted Publisher or a compromised maintainer account; none is established. Attribution to a named actor is also unestablished and this pack does not assert one.

Honest scope: the releases are quarantined, so the window of exposure is closed. The value of this pack is retro-hunting install evidence (builds, images and caches from 2026-11-17 onward) and treating every hit as a credential-compromise event requiring rotation. It is not live prevention.

Defender priority: build agents (Azure DevOps, GitHub Actions runners, container builds) and Azure-hosted workloads are the highest-value scope. Find every environment that resolved 1.26.1 or 1.26.2, run Q1 to Q4, search proxy logs for the webhook UUID (Q5), and rotate every secret and identity reachable from any hit before anything else.

02

Source Review & Web Hunter Notes

TierSourceKey findingCarry fwd
1Socket (2026-11-17)Richest IOC and behavior detail: per-version file chain, selector lists, credential file globs, token audiences, base64 destination, seven SHA-256 values, both User-AgentsYes
1Wiz (2026-11-17)UTC timeline, root-cause evidence (no matching tag or release in the source repo, wheel only, no sdist), IOC table, the only SHA-1, the 100-request free-tier cap on webhook.site, remediation stepsYes
1Aikido (2026-11-17)Wheel diff against 1.26.0 (994 vs 853 bytes, world-writable injected files), full code excerpts, IMDS 169.254.169.254 fallback, 1.26.2 restored the clean __init__.py, per-version hash listsYes
2SecurityWeekPress coverage: Microsoft acknowledged the incident; OX Security, Wiz, Endor Labs and SafeDep analyzed it independently; mentions a PyPI account named in third-party analysis. Used for context onlyPartial

Sourcing note: every atomic indicator in this pack was re-derived from the saved snapshots in AgentFramework-PyPI-CredentialStealer-Hunt-sources/ (01-socket, 02-wiz, 03-securityweek, 04-aikido), not from search summaries. No fetched page contained text directed at an AI agent.

Discrepancies and open items

  • Quarantine time: Wiz says both versions were gone by ~21:30 UTC; Aikido says 1.26.1 was pulled around the 1.26.2 upload and both were gone by ~21:20 UTC. This pack uses the wider window (20:35 to ~21:30 UTC).
  • Download volume: Wiz about 41,000 a week; SecurityWeek and Aikido about 190,000 a month. Not material to hunting.
  • __init__.py hash: Socket and Aikido list c275ccbe… for agent_framework_meta/__init__.py; Aikido places it under 1.26.1 and says 1.26.2 restored the byte-identical clean 1.26.0 file. It ships as detect only because a clean module shares the filename.
  • Maintainer account: SecurityWeek relays a third-party (SafeDep) claim about a newly created PyPI maintainer account with publish rights. Its involvement is explicitly unconfirmed, it is not in any snapshot of the primary reports, and it is not used as an indicator here.
  • Root cause: unconfirmed in every source. Wiz notes an earlier unrelated Microsoft Python package (durabletask) compromise via a stolen PyPI token and states the two are not linked.
03

Hunt Brief & Attack Chain

Hunt hypotheses (fidelity-ordered)

#HypothesisMITRETelemetryConf
H1The campaign webhook UUID appears in a logged URLT1567, T1041URL-path logs from a proxy or gateway (Next-Gen SIEM, ECS fields)High
H2A host installed 1.26.1 or 1.26.2T1195.002Process creation with command line (CrowdStrike: ProcessRollup2 and SyntheticProcessRollup2. SentinelOne: Process Creation. Defender: DeviceProcessEvents)High
H3The exfil User-Agent appears in outbound HTTPT1567, T1071.001User-Agent logs from a proxy or gatewayHigh
H4A Python-family process resolved webhook.siteT1567, T1041DNS lookup with the requesting process (CrowdStrike: DnsRequest. SentinelOne: DNS Resolved. Defender: DeviceEvents, ActionType DnsQueryResponse)High
H5A package manager or test runner requested Azure IMDS tokensT1552.005, T1528Outbound network connection (CrowdStrike: NetworkConnectIP4. SentinelOne: IP Connect. Defender: DeviceNetworkEvents)Med
H6A host ran an install of agent-framework that could have resolved a malicious releaseT1195.002Process creation with command line (CrowdStrike: ProcessRollup2 and SyntheticProcessRollup2. SentinelOne: Process Creation. Defender: DeviceProcessEvents)Med
H7A .pth hook or stealer module exists in site-packages, a venv, image layer or cacheT1546.018File inventory (not in endpoint event telemetry; see s7)High

Attack chain

StepActionTelemetry / hunt angle
1 · PublishMalicious wheel-only releases uploaded to PyPI with valid publishing credentials; no matching tag in the source repoRegistry audit; lockfile and requirements grep (s7)
2 · InstallDev machine, CI job or image build resolves 1.26.1 or 1.26.2 (loose pin or dependency bot PR)Process creation with command line (CrowdStrike: ProcessRollup2 and SyntheticProcessRollup2. SentinelOne: Process Creation. Defender: DeviceProcessEvents). Q1, Q2
3 · Hook.pth file written to the site-packages root; runs on every interpreter startNo file-write event covers text files. File inventory (s7)
4 · CollectFork and setsid(); env-var sweep, up to 300 /proc/*/environ, up to 60 or 80 credential filesIn-process reads: no endpoint event. Covered indirectly by steps 2, 5 and 6
5 · Mint tokensAzure IMDS or IDENTITY_ENDPOINT tokens for 12 resources; Azure DevOps OIDC; GitHub Actions OIDC (1.26.2)Outbound network connection (CrowdStrike: NetworkConnectIP4. SentinelOne: IP Connect. Defender: DeviceNetworkEvents). Q3. Identity-side: Entra service-principal and managed-identity sign-in logs (s7)
6 · ExfilOne zlib+base64 HTTPS POST to webhook.site with ?t=telemetry and a masqueraded User-AgentDNS lookup with the requesting process (CrowdStrike: DnsRequest. SentinelOne: DNS Resolved. Defender: DeviceEvents, ActionType DnsQueryResponse). Q4. Proxy URL and User-Agent logs. Q5, Q6
04

Consolidated IOC Table

TypeIndicatorConfidenceActionSourcesContext
SHA-256d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110highprevent3 srcagent_framework-1.26.1-py3-none-any.whl
SHA-2563d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9highprevent3 srcagent_framework-1.26.2-py3-none-any.whl
SHA-25621f28e8517a10ffe431f8d68f5875c85eca4001ae6d118322b0a41873998eb5ehighprevent2 srcagent_framework_meta.pth (1.26.1 startup hook)
SHA-25639fa329f2a93f734b0bb8f5adb203ea3331d1ae479832a5015a54cb17aabd663highprevent2 srcagent_framework_meta/_telemetry.py (1.26.1 stealer)
SHA-256c275ccbe520ef3c0f02dc6a35389e427f9f1b4e0b12e140cd7bf7179ce143f02mediumdetect2 srcagent_framework_meta/__init__.py (1.26.1 loader appended). Detect only: same filename as a legitimate module, and the reporting does not tie this hash to a single release
SHA-256325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93highprevent3 srcaf_runtime_diag.pth (1.26.2 startup hook)
SHA-25654d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1fhighprevent3 srcaf_runtime_diag.py (1.26.2 stealer)
SHA-10a013e4724c4437cf9b177def1d988113e167539mediumdetect1 srcagent_framework_meta/_telemetry.py (Wiz only). Falcon IOC import does not accept SHA-1, so this is a table entry, not a CSV row
UUID path tokend381fd80-ec62-42ad-8f5c-d1b15103c9bbhighhunt3 srcCampaign webhook UUID: the safe, specific string to search
Base64 stringaHR0cHM6Ly93ZWJob29rLnNpdGUvZDM4MWZkODAtZWM2Mi00MmFkLThmNWMtZDFiMTUxMDNjOWJihighhunt2 srcHardcoded encoded destination (_ENC) in both payload modules; decodes to the exfil URL without the query string
User-Agentaf-runtime-diagnostics/1highhunt3 srcExfil User-Agent, 1.26.1
User-Agentruntime-diagnostics/1highhunt3 srcExfil User-Agent, 1.26.2 (also on GitHub OIDC token requests)
Filenameagent_framework_meta.pthhighhunt3 srcStartup hook in the site-packages root (1.26.1)
Filenameagent_framework_meta/_telemetry.pyhighhunt3 srcStealer module (1.26.1)
Filenameaf_runtime_diag.pthhighhunt3 srcStartup hook in the site-packages root (1.26.2)
Filenameaf_runtime_diag.pyhighhunt3 srcStealer module, top level of site-packages (1.26.2)
Env marker_AF_TEL=1highhunt3 srcRun-once marker set in the Python process environment. A marker, not a credential
Packageagent-framework==1.26.1highhunt4 srcMalicious PyPI release, 2026-11-17 20:35 UTC (quarantined)
Packageagent-framework==1.26.2highhunt4 srcMalicious PyPI release, 2026-11-17 ~21:08 UTC (quarantined)

Exfiltration endpoint: an HTTPS POST to a public request-bin endpoint, path UUID d381fd80-ec62-42ad-8f5c-d1b15103c9bb, query string ?t=telemetry. It is listed as narrative rather than as an indicator row because the hostname is a public request-bin shared by unrelated actors: the UUID path is the atomic indicator, and the host must never be blocked tenant-wide.

webhook.site is not an IOC. It is a public request-bin used by many unrelated actors and legitimate developers. The pack ships the full URL with the campaign UUID and hunts the UUID string. The bare hostname is not in any import file at any action.

Prevent rule: only indicators present in two or more snapshots may be prevent. All seven SHA-256 values are two-source or better; six ship prevent and the shared-filename __init__.py hash ships detect. The SHA-1 is Wiz-only and is not importable to Falcon. Network, filename and behavioral strings are hunt strings, not blocks.

05

Affected Surface & Telemetry Matrix

SurfaceTelemetryPriorityGap
Azure DevOps build agents (Linux, self-hosted and hosted images)Process creation with command line (CrowdStrike: ProcessRollup2 and SyntheticProcessRollup2. SentinelOne: Process Creation. Defender: DeviceProcessEvents); Outbound network connection (CrowdStrike: NetworkConnectIP4. SentinelOne: IP Connect. Defender: DeviceNetworkEvents)CriticalHosted ephemeral agents often have no sensor: outside endpoint telemetry. Use lockfile, registry and Entra logs
GitHub Actions runners (hosted and self-hosted)Process creation with command line (CrowdStrike: ProcessRollup2 and SyntheticProcessRollup2. SentinelOne: Process Creation. Defender: DeviceProcessEvents); workflow logs and pip logsCriticalGitHub-hosted runners are outside endpoint telemetry. 1.26.2 only for OIDC theft
Azure VMs, App Service, Functions, AKS nodes with a managed identityOutbound network connection (CrowdStrike: NetworkConnectIP4. SentinelOne: IP Connect. Defender: DeviceNetworkEvents); DNS lookup with the requesting process (CrowdStrike: DnsRequest. SentinelOne: DNS Resolved. Defender: DeviceEvents, ActionType DnsQueryResponse)HighApp Service and Functions have no endpoint sensor: outside endpoint telemetry
Developer workstations (Linux, macOS, Windows)Process creation with command line (CrowdStrike: ProcessRollup2 and SyntheticProcessRollup2. SentinelOne: Process Creation. Defender: DeviceProcessEvents); DNS lookup with the requesting process (CrowdStrike: DnsRequest. SentinelOne: DNS Resolved. Defender: DeviceEvents, ActionType DnsQueryResponse)MediumWindows has no /proc; the file-credential and env sweeps still run
Container images and CI caches built from 2026-11-17Image scan for .pth files and the package version (not endpoint telemetry)HighNeeds image and cache inventory; no endpoint event
Egress proxy / secure web gatewayURL path, User-Agent and status logging (Next-Gen SIEM, ECS fields)HighHostname-only DNS or SNI logs cannot see the UUID
Entra ID and Azure Resource ManagerService-principal, managed-identity and federated-credential sign-in logs; Azure Activity logHighIdentity-side: outside endpoint telemetry
06

ATT&CK Mapping

TacticTechniqueBehaviorQuery / control
Initial AccessT1195.002 Compromise Software Supply ChainMalicious PyPI releases of a trusted Microsoft packageQ1, Q2, Q7; lockfile audit; M1051, M1013
Persistence / ExecutionT1546.018 Python Startup Hooks.pth import line runs on every interpreter startFile inventory (s7); hardening tier 1
ExecutionT1059.006 PythonPayload runs as Python in a forked background processQ1 to Q4
Credential AccessT1552.001 Credentials in FilesAzure CLI, .npmrc, .netrc, .git-credentials, .docker/config.json, Hugging Face, ADO .credentials, .envGap in endpoint telemetry; rotation; M1027, M1041
Credential AccessT1552.005 Cloud Instance Metadata APIIMDS and IDENTITY_ENDPOINT managed-identity tokens for 12 resourcesQ3; IMDS egress restriction
Credential AccessT1528 Steal Application Access TokenAzure DevOps and GitHub Actions OIDC tokens, SYSTEM_ACCESSTOKENEntra sign-in logs (s7); federated-credential scoping
Credential AccessT1552 Unsecured Credentials (environment)Substring sweep of environment variables and other processes’ /proc/*/environGap in endpoint telemetry; rotation
Defense EvasionT1036 Masquerading, T1027 Obfuscated FilesTelemetry-themed names and User-Agents; base64-encoded destinationQ6; string hunts
ExfiltrationT1567 Exfiltration Over Web ServiceSingle HTTPS POST to webhook.site, zlib+base64 bodyQ4, Q5, Q6; proxy egress control
07

Native Audit-Log Hunts (non-CQL)

Do not start Python in a suspect environment to investigate it. The stealer runs on every interpreter launch there, pip and pytest included. Use the shell-only checks below, or python3 -S -I (the -S flag skips site processing, so .pth hooks do not run), or inspect from a clean host against a mounted image.

Host and image inventory (no interpreter)

# Linux / macOS: find the hooks and stealer modules
find / -xdev \( -name 'agent_framework_meta.pth' -o -name 'af_runtime_diag.pth' \
  -o -name 'af_runtime_diag.py' -o -path '*/agent_framework_meta/_telemetry.py' \) 2>/dev/null

# Any .pth with an executable import line in site-packages (broader, will show benign hooks too)
find / -xdev -path '*/site-packages/*.pth' -exec grep -l '^import ' {} + 2>/dev/null

# Containers: scan an image without running Python
docker run --rm --entrypoint sh IMAGE -c "find / -xdev \( -name 'agent_framework_meta.pth' -o -name 'af_runtime_diag.pth' \) 2>/dev/null"

# Is the run-once marker present in any running process?
for p in /proc/[0-9]*/environ; do tr '\0' '\n' < "$p" 2>/dev/null | grep -q '^_AF_TEL=' && echo "$p"; done

# Windows (PowerShell): hooks under every site-packages
Get-ChildItem -Path C:\ -Recurse -Include agent_framework_meta.pth,af_runtime_diag.pth,af_runtime_diag.py -ErrorAction SilentlyContinue | Select FullName,Length,LastWriteTime

Lockfile, manifest and registry audit

# Every repo, build cache and artifact store: any pin, range or lock entry for agent-framework
# Files: requirements*.txt, pyproject.toml, uv.lock, poetry.lock, Pipfile.lock, constraints files
# Exposed: resolved version 1.26.1 or 1.26.2. Also exposed: any loose range (>=1.26) resolved on or after 2026-11-17 20:35 UTC.
# Registry proxy / SCA (Artifactory, Nexus, Azure Artifacts, devpi): list download events for
# agent-framework 1.26.1 and 1.26.2 since 2026-11-17 20:35 UTC; map each to a host, CI job and user.
# Image registries: images and layers built since 2026-11-17 may carry the hook even if a later rebuild is clean.

Entra ID: identities reachable from affected hosts (Log Analytics KQL)

// Managed identities and service principals signing in after the window opens, from unexpected IPs.
// Stolen managed-identity and OIDC-exchanged tokens stay valid for up to 24 hours (Wiz).
let start = datetime(2026-11-17T20:35:00Z);
union ManagedIdentitySignInLogs, ServicePrincipalSignInLogs
| where TimeGenerated >= start
| summarize SignIns=count(), IPs=make_set(IPAddress, 20), Resources=make_set(ResourceDisplayName, 20) by ServicePrincipalName, AppId
| order by SignIns desc
// Then review AzureActivity for write operations by those principals, and the Entra audit log for
// new credentials, role assignments and federated credentials created since the window opened.

GitHub Actions and Azure DevOps

# GitHub Actions: workflow runs that installed agent-framework since 2026-11-17 20:35 UTC.
# For runs of 1.26.2 with "permissions: id-token: write": treat OIDC tokens for
#   api://AzureADTokenExchange and https://management.azure.com/ as exposed.
# Review the Entra federated credentials that trust those repos/workflows and the sign-ins
# of the matching app registrations. Rotate repo and org secrets exposed to those jobs.
# Azure DevOps: pipelines that ran pip/uv install since the window opened. Treat SYSTEM_ACCESSTOKEN,
# service connections and any PAT on the agent as exposed. Check agent hosts for
# _work/*/.credentials and /vss-agent/*/.credentials (read by the stealer).

Egress logs

# Proxy / gateway / firewall URL logs, 2026-11-17 onward:
#   URL path contains d381fd80-ec62-42ad-8f5c-d1b15103c9bb         (Q5)
#   User-Agent equals af-runtime-diagnostics/1 or runtime-diagnostics/1   (Q6)
# HTTP 200 = webhook.site accepted that host's data; 410 or 429 = rejected (Wiz). Rotate either way.
# Wiz confirmed the attacker's token was free tier: at most 100 requests accepted, at most 50 captured.
# That cap limits attacker visibility, it does not make any captured host safe.

Steps 3 and 4 of the chain (the .pth write and the credential reads) leave no discrete endpoint event. This host and image inventory is what proves installation; the CQL queries show execution-adjacent behavior.

08

Hunt Queries: CrowdStrike CQL, SentinelOne PowerQuery and Defender XDR KQL

Show all queries in
Pick your tenant's cloud first — every "Open in Falcon" button below uses this selection.

Q1 to Q4 and Q7 run on endpoint telemetry. Q5 and Q6 use ECS dotted fields for a web proxy or gateway repository in Next-Gen SIEM: select that repository before running them. Event names used here are limited to ProcessRollup2, SyntheticProcessRollup2, NetworkConnectIP4 and DnsRequest. No Falcon event records the write of a text .pth file, so no file-write query is offered (see Coverage Map).

Q1 · pip / uv / poetry install of the compromised releases 1.26.1 or 1.26.2
CONF HIGHFP LOWCOST LOW

Looks for: A package-manager or interpreter process whose command line pins one of the two quarantined versions. This is the retro-hunt that answers “did this host install a malicious release” whenever the version appears on the command line.

FP: None expected: only the two quarantined versions match. A -r requirements.txt install does not show the version on the command line, so a miss here does not clear a host; use Q2 and the lockfile audit in s7.

Validation: schema-aligned, static-reviewedAutomated: static-passedEquivalence: equivalent-with-schema-assumptionsProfiles: microsoft-defender-xdr, sentinelone-endpoint-ocsf
Known limitations and deployment notes
  • PowerQuery: An install launched by a process the agent did not observe starting is not captured.
  • PowerQuery assumes: tgt.process.cmdline holds the full command line of the created process.
  • PowerQuery assumes: matches is case-insensitive by default, which reproduces the CQL /i flag.
  • KQL – Defender XDR: An install launched by a process the sensor did not observe starting is not captured.
  • KQL – Defender XDR assumes: ProcessCommandLine holds the full command line of the created process.
// HUNT: install of the compromised agent-framework releases 1.26.1 / 1.26.2
// MITRE: T1195.002 | CONF: high  FP: low  COST: low
// REQUIRES: process creation with command line on dev, CI and server hosts
// LOOKBACK: 30d via the console time picker (releases were live 2026-11-17 20:35 to ~21:30 UTC)
#event_simpleName=/^(ProcessRollup2|SyntheticProcessRollup2)$/
| FileName=/^(pip[0-9.]*|pipx|uv|poetry|pdm|python[0-9.]*|py)(\.exe)?$/i
| CommandLine=/agent[-_]framework\s*(===|==|=|@)?\s*1\.26\.[12]([^0-9]|$)/i
| table([@timestamp, aid, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName], limit=200)
Q2 · Any install of agent-framework, excluding explicit 1.26.0 pins (exposure inventory)
CONF MEDIUMFP MEDIUMCOST LOW

Looks for: Every host that ran an install, upgrade or sync naming agent-framework (not agent-framework-core), minus commands that explicitly pin the clean 1.26.0. Catches loose requirements such as agent-framework>=1.26 that resolved to a malicious release during the window.

FP: Legitimate Microsoft Agent Framework users match. Treat a host as exposed only if its install ran on or after 2026-11-17 20:35 UTC and before the quarantine; confirm the resolved version in the lockfile or image layer.

Validation: schema-aligned, static-reviewedAutomated: static-passedEquivalence: approximate-analyticProfiles: microsoft-defender-xdr, sentinelone-endpoint-ocsf
Known limitations and deployment notes
  • PowerQuery: Only one sample command line per host is shown; the CQL tab lists every distinct command line.
  • PowerQuery assumes: tgt.process.cmdline holds the full command line of the created process.
  • PowerQuery assumes: The quote characters in the CQL boundary class are written as hex escapes.
  • KQL – Defender XDR: The command line list is capped at 20 distinct values per host.
  • KQL – Defender XDR assumes: ProcessCommandLine holds the full command line of the created process.
// HUNT: agent-framework installs (loose or unpinned) as an exposure inventory
// MITRE: T1195.002 | CONF: medium  FP: medium  COST: low
// REQUIRES: process creation with command line on dev, CI and server hosts
// LOOKBACK: 14d via the console time picker
// TUNING: only installs with FirstSeen between 2026-11-17 20:35 and ~21:30 UTC can have resolved 1.26.1 or 1.26.2; treat the rest as inventory, not exposure
// TUNING: exclude hosts whose requirements are fully hash-pinned to 1.26.0 once confirmed against the lockfile
#event_simpleName=/^(ProcessRollup2|SyntheticProcessRollup2)$/
| FileName=/^(pip[0-9.]*|pipx|uv|poetry|pdm|python[0-9.]*|py)(\.exe)?$/i
| CommandLine=/agent[-_]framework(\s|=|<|>|~|!|@|"|'|$)/i
| CommandLine!=/agent[-_]framework\s*(===|==)\s*1\.26\.0([^0-9]|$)/i
| groupBy([aid, ComputerName], function=[count(as=Installs), min(@timestamp, as=FirstSeen), max(@timestamp, as=LastSeen), collect([CommandLine])], limit=500)
| sort(LastSeen, order=desc, limit=200)
Q3 · pip / uv / pytest process requesting the Azure instance-metadata endpoint
CONF MEDIUMFP MEDIUMCOST MEDIUM

Looks for: A package manager or test runner connecting to 169.254.169.254. The stealer asks IMDS for managed-identity tokens (12 resources per Wiz) from whatever Python process starts, including pip itself. A package manager has no reason to touch IMDS.

FP: Integration tests that use ManagedIdentityCredential run under pytest and will match. If a known positive returns nothing, the forked collector child may have no process rollup of its own: pivot on the same aid and time window using Q4.

Validation: schema-aligned, static-reviewedAutomated: static-passedEquivalence: equivalent-with-schema-assumptionsProfiles: microsoft-defender-xdr, sentinelone-endpoint-ocsf
Known limitations and deployment notes
  • PowerQuery: A process outside the named package managers and test runners that requests the metadata endpoint is not captured.
  • PowerQuery assumes: On an IP Connect event the connecting process is src.process.*.
  • PowerQuery assumes: The agent records connections to the link-local metadata address.
  • KQL – Defender XDR: A process outside the named package managers and test runners that requests the metadata endpoint is not captured.
  • KQL – Defender XDR assumes: The sensor records connections to the link-local metadata address in DeviceNetworkEvents.
// HUNT: package manager or test runner talking to Azure IMDS (stealer token request)
// MITRE: T1552.005, T1528 | CONF: medium  FP: medium  COST: medium
// REQUIRES: NetworkConnectIP4 and process creation telemetry on Azure VMs, build agents, App Service and AKS nodes
// LOOKBACK: 14d via the console time picker
// TUNING: drop pytest rows whose CommandLine path is a known integration-test suite that legitimately uses managed identity
// TUNING: scope to build-agent host groups first; pip and uv should never request IMDS tokens
#event_simpleName=NetworkConnectIP4
| RemoteAddressIP4="169.254.169.254"
| rename(field=ContextProcessId_decimal, as=TargetProcessId_decimal)
| join(query={
    #event_simpleName=/^(ProcessRollup2|SyntheticProcessRollup2)$/
    | (FileName=/^(pip[0-9.]*|pipx|uv|poetry|pdm|pytest|py\.test)(\.exe)?$/i or CommandLine=/\s-m\s+(pip|pytest|build|venv|ensurepip)(\s|$)/i)
    | select([aid, TargetProcessId_decimal, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName])
  }, field=[aid, TargetProcessId_decimal], mode=inner)
| table([@timestamp, aid, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName, RemoteAddressIP4, RemotePort], limit=200)
Q4 · Python or package-manager process resolving webhook.site
CONF HIGHFP MEDIUMCOST MEDIUM

Looks for: A Python-family process resolving webhook.site, the request-bin service the stealer posts to. DNS cannot show the campaign UUID, so this is a host-level lead that must be confirmed with Q5 or proxy logs. The hostname is a hunt term only; it is never an IOC to block tenant-wide.

FP: Developers testing webhooks from scripts legitimately resolve webhook.site. On build agents and servers a Python process doing so is rare.

Validation: schema-aligned, static-reviewedAutomated: static-passedEquivalence: equivalent-with-schema-assumptionsProfiles: microsoft-defender-xdr, sentinelone-endpoint-ocsf
Known limitations and deployment notes
  • PowerQuery: If the tenant populates dns.request and not event.dns.request, this query returns nothing until the field name is swapped.
  • PowerQuery assumes: event.dns.request holds the queried name; the vendor field documentation names dns.request instead, so check which one is populated on the tenant.
  • PowerQuery assumes: On a DNS Resolved event the requesting process is src.process.*.
  • KQL – Defender XDR: If the tenant stores the name under another AdditionalFields key, this query returns nothing until the key is added.
  • KQL – Defender XDR assumes: AdditionalFields carries the queried name under DnsQueryString or QueryName; the readiness test shows which key the tenant populates.
// HUNT: python / pip process resolving webhook.site (exfil endpoint hostname)
// MITRE: T1567, T1041 | CONF: high  FP: medium  COST: medium
// REQUIRES: DnsRequest and process creation telemetry
// LOOKBACK: 14d via the console time picker
// TUNING: exclude developer workstation host groups that run webhook test scripts; keep build agents and servers in scope
// TUNING: confirm any hit against Q5 (UUID in proxy URL logs) before declaring compromise
#event_simpleName=DnsRequest
| DomainName=/^(.+\.)?webhook\.site$/i
| rename(field=ContextProcessId_decimal, as=TargetProcessId_decimal)
| join(query={
    #event_simpleName=/^(ProcessRollup2|SyntheticProcessRollup2)$/
    | FileName=/^(python[0-9.]*|pip[0-9.]*|pipx|uv|poetry|pdm|pytest|py)(\.exe)?$/i
    | select([aid, TargetProcessId_decimal, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName])
  }, field=[aid, TargetProcessId_decimal], mode=inner)
| table([@timestamp, aid, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName, DomainName], limit=200)
Q5 · Campaign webhook UUID in proxy or gateway URL logs
CONF HIGHFP LOWCOST LOW

Looks for: The campaign-specific webhook UUID in a logged URL. A 200 response means the capture endpoint accepted that host’s data; 410 or 429 means webhook.site rejected it (Wiz). Either way the request was attempted, so rotate.

FP: None: the UUID is unique to this campaign. Requires a log source that records the URL path (TLS-inspecting proxy, secure web gateway, firewall URL filtering). Hostname-only DNS or SNI logs cannot see it.

Validation: schema-aligned, static-reviewedAutomated: static-passedEquivalence: telemetry-gapProfiles: microsoft-defender-xdr, sentinelone-endpoint-ocsf
Known limitations and deployment notes
  • PowerQuery: The query searches all indexed fields, so it can also match the UUID in a command line or a file; it does not name the URL field or the HTTP status.
  • PowerQuery: The CQL's ECS fields host.name, source.ip, user.name, http.request.method, url.full, url.path and user_agent.original are not reproduced: this pivot has no field names to carry.
  • PowerQuery: If the proxy logs are not in the Singularity Data Lake this returns nothing; use the CQL tab against the proxy repository.
  • PowerQuery assumes: The proxy or gateway logs are ingested to the Singularity Data Lake and the URL is an indexed field.
  • KQL – Defender XDR: RemoteUrl often holds only the host name, so a UUID in the URL path is frequently invisible here and an empty result is not a clean result.
  • KQL – Defender XDR: The HTTP status and User-Agent are not available.
  • KQL – Defender XDR: The CQL's ECS fields host.name, source.ip, user.name, http.request.method, url.full, url.path and user_agent.original are not reproduced: they are proxy log fields, not endpoint columns.
  • KQL – Defender XDR assumes: RemoteUrl carries the full URL including the path for the connection; it often holds only the host name.
// HUNT: campaign webhook UUID in web proxy / gateway URL logs
// MITRE: T1567, T1041 | CONF: high  FP: low  COST: low
// REQUIRES: URL-path logging in a proxy, secure web gateway or firewall ingested to Next-Gen SIEM (ECS fields)
// LOOKBACK: 30d via the console time picker; select the proxy repository, not the endpoint repository
// NOTE: status 200 = endpoint accepted the data; 410 or 429 = endpoint rejected it (free-tier cap). Both mean the POST was sent.
url.full=/d381fd80-ec62-42ad-8f5c-d1b15103c9bb/i or url.path=/d381fd80-ec62-42ad-8f5c-d1b15103c9bb/i
| table([@timestamp, host.name, source.ip, user.name, http.request.method, url.full, user_agent.original, http.response.status_code], limit=200)
Q6 · Exfiltration User-Agent strings in proxy or gateway logs
CONF HIGHFP LOWCOST LOW

Looks for: The two distinctive User-Agents: af-runtime-diagnostics/1 (1.26.1) and runtime-diagnostics/1 (1.26.2). The 1.26.2 string is also sent on the GitHub OIDC token requests, so a hit can come from the runner’s own identity-endpoint calls. It survives even if the webhook UUID is rotated by a later variant.

FP: Very unlikely to occur legitimately; the strings imitate SDK telemetry but are not used by Microsoft tooling.

Validation: schema-aligned, static-reviewedAutomated: static-passedEquivalence: telemetry-gapProfiles: microsoft-defender-xdr, sentinelone-endpoint-ocsf
Known limitations and deployment notes
  • PowerQuery: The query searches all indexed fields and matches a substring, so it is broader than the anchored CQL regex and can match the string in a command line or a file.
  • PowerQuery: The CQL's ECS fields host.name, source.ip, user.name, url.full and user_agent.original are not reproduced: this pivot has no field names to carry.
  • PowerQuery: If the proxy logs are not in the Singularity Data Lake this returns nothing; use the CQL tab against the proxy repository.
  • PowerQuery assumes: The proxy or gateway logs are ingested to the Singularity Data Lake and the User-Agent is an indexed field.
  • KQL – Defender XDR: No documented column holds a User-Agent, so an empty result is expected on most tenants and is not a clean result.
  • KQL – Defender XDR: The match is a substring, broader than the anchored CQL regex.
  • KQL – Defender XDR: The CQL's ECS fields host.name, source.ip, user.name, url.full and user_agent.original are not reproduced: they are proxy log fields, not endpoint columns.
  • KQL – Defender XDR assumes: AdditionalFields on a network event can carry a User-Agent; Microsoft does not document that it does.
// HUNT: stealer User-Agent strings in proxy / gateway logs
// MITRE: T1567, T1071.001 | CONF: high  FP: low  COST: low
// REQUIRES: User-Agent logging in a proxy, secure web gateway or firewall ingested to Next-Gen SIEM (ECS fields)
// LOOKBACK: 30d via the console time picker; select the proxy repository, not the endpoint repository
user_agent.original=/^(af-)?runtime-diagnostics.1$/i
| table([@timestamp, host.name, source.ip, user.name, url.full, user_agent.original, http.response.status_code], limit=200)
Q7 · Known malicious file hashes executed on an endpoint (sweep)
CONF HIGHFP LOWCOST LOW

Looks for: The seven SHA-256 values from the reporting as an executed image hash. Expect little yield: the stealer is a .pth and .py text payload, and Falcon records image hashes for executed binaries, not for Python source. Kept as a cheap completeness check and so the hashes also exist as Custom IOCs.

FP: None expected.

Validation: schema-aligned, static-reviewedAutomated: static-passedEquivalence: equivalent-with-schema-assumptionsProfiles: microsoft-defender-xdr, sentinelone-endpoint-ocsf
Known limitations and deployment notes
  • PowerQuery: A payload that never runs as a process (a file written and not executed) is not captured by this process sweep.
  • PowerQuery assumes: tgt.process.image.sha256 is populated on the tenant and stored as lowercase hex, which the case-sensitive in operator requires.
  • KQL – Defender XDR: Advanced Hunting retains 30 days, so the 90d CQL window is not covered here.
  • KQL – Defender XDR: SHA256 is often unpopulated in DeviceProcessEvents; an empty result does not prove a clean estate.
  • KQL – Defender XDR assumes: SHA256 is populated in DeviceProcessEvents on this tenant; Microsoft documents it as often unpopulated.
// HUNT: campaign file hashes seen as process image hashes
// MITRE: T1195.002, T1546.018 | CONF: high  FP: low  COST: low
// REQUIRES: process creation telemetry with SHA256HashData
// LOOKBACK: 90d via the console time picker
#event_simpleName=/^(ProcessRollup2|SyntheticProcessRollup2)$/
| in(SHA256HashData, values=[
    "d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110",
    "3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9",
    "39fa329f2a93f734b0bb8f5adb203ea3331d1ae479832a5015a54cb17aabd663",
    "c275ccbe520ef3c0f02dc6a35389e427f9f1b4e0b12e140cd7bf7179ce143f02",
    "21f28e8517a10ffe431f8d68f5875c85eca4001ae6d118322b0a41873998eb5e",
    "54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f",
    "325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93"])
| table([@timestamp, aid, ComputerName, UserName, FileName, ImageFileName, SHA256HashData, CommandLine], limit=max)
09

Detection Rules by Platform

CrowdStrike: Custom IOA

IOA namePatternExclusionsAction
Pinned install of a compromised release (promote Q1)Process Creation. Image filename matches pip, pipx, uv, poetry, pdm or python; command line agent[-_]framework\s*(===|==|=|@)?\s*1\.26\.[12]([^0-9]|$)None neededDetect (high). The versions are quarantined, so any new match is a stale pin or a mirror
Package manager requests Azure IMDS (promote Q3)Network Connection. Remote IP 169.254.169.254 from an image matching (^|\\)(pip[0-9.]*|pipx|uv|poetry|pdm)(\.exe)?$pytest suites that use managed identity; run in Detect for 14 days firstDetect (medium)
Python process resolves webhook.site (promote Q4)Domain Name rule: webhook\.site from an image matching python|pip|uv|poetry|pdm|pytest, scoped to build-agent and server host groups onlyDeveloper workstation groupsDetect (medium). Never block tenant-wide

Deployment path: load the six prevent and one detect SHA-256 values from s10 as Custom IOCs. Promote Q1 immediately; keep Q3 and Q4 in Detect, scoped to build-agent groups, until the FP rate is measured. No IOA here is a prevention rule, and the webhook.site hostname is never loaded as an IOC.

SentinelOne: custom detection rules

RuleSource queryRun asNotes
Pinned install of a compromised release (promote Q1)Q1, PowerQuery tabScheduled custom detection ruleBind entities so the alert names the host instead of "Unknown Device"
Package manager requests Azure IMDS (promote Q3)Q3, PowerQuery tabScheduled custom detection ruleBind entities so the alert names the host instead of "Unknown Device"
Python process resolves webhook.site (promote Q4)Q4, PowerQuery tabScheduled custom detection ruleBind entities so the alert names the host instead of "Unknown Device"

Create the rule with POST /web/api/v2.1/cloud-detection/rules, queryType: "scheduled" and queryLang: "2.0", with the query in data.scheduledParams.query. Use 2.0 operator spellings: a rule written with the 1.0 token ContainsCIS was accepted and never fired on a tenant. The API does not warn, so lint the body before deploying.

Microsoft Defender: custom detection rules

RuleSource queryRun asNotes
Pinned install of a compromised release (promote Q1)Q1, KQL – Defender XDR tabCustom detection rule, alert only, every hourThe query returns Timestamp, ReportId and DeviceId, which Microsoft recommends for Defender for Endpoint tables so alerts carry the device group scope and the process tree. Remove the Timestamp filter and the final sort and take before saving the rule: the service applies the rule's lookback itself
Package manager requests Azure IMDS (promote Q3)Q3, KQL – Defender XDR tabCustom detection rule, alert only, every hourThe query returns Timestamp, ReportId and DeviceId, which Microsoft recommends for Defender for Endpoint tables so alerts carry the device group scope and the process tree. Remove the Timestamp filter and the final sort and take before saving the rule: the service applies the rule's lookback itself
Python process resolves webhook.site (promote Q4)Q4, KQL – Defender XDR tabCustom detection rule, alert only, every hourThe query returns Timestamp, ReportId and DeviceId, which Microsoft recommends for Defender for Endpoint tables so alerts carry the device group scope and the process tree. Remove the Timestamp filter and the final sort and take before saving the rule: the service applies the rule's lookback itself

Q2, Q5, Q6 and Q7 stay a hunt in this pack, not a rule. A rule can generate only 150 alerts per run. Continuous (NRT) frequency needs a single table and no comment lines, so delete the generated comment header from the query first.

10

Machine-Readable IOC Appendix

Falcon IOC Management CSVbulk import
type,value,action,severity,expiration,description,tags
sha256,d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110,prevent,critical,2027-11-18,agent-framework PyPI compromise: agent_framework-1.26.1 wheel,campaign:AgentFramework-PyPI
sha256,3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9,prevent,critical,2027-11-18,agent-framework PyPI compromise: agent_framework-1.26.2 wheel,campaign:AgentFramework-PyPI
sha256,21f28e8517a10ffe431f8d68f5875c85eca4001ae6d118322b0a41873998eb5e,prevent,critical,2027-11-18,agent-framework PyPI compromise: agent_framework_meta.pth,campaign:AgentFramework-PyPI
sha256,39fa329f2a93f734b0bb8f5adb203ea3331d1ae479832a5015a54cb17aabd663,prevent,critical,2027-11-18,agent-framework PyPI compromise: agent_framework_meta/_telemetry.py,campaign:AgentFramework-PyPI
sha256,c275ccbe520ef3c0f02dc6a35389e427f9f1b4e0b12e140cd7bf7179ce143f02,detect,high,2027-11-18,agent-framework PyPI compromise: agent_framework_meta/__init__.py loader,campaign:AgentFramework-PyPI
sha256,325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93,prevent,critical,2027-11-18,agent-framework PyPI compromise: af_runtime_diag.pth,campaign:AgentFramework-PyPI
sha256,54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f,prevent,critical,2027-11-18,agent-framework PyPI compromise: af_runtime_diag.py,campaign:AgentFramework-PyPI
Microsoft Defender indicators CSVSettings, Endpoints, Indicators, Import: audit and block
indicatorType,indicatorValue,action,title,description,expirationTime,severity,recommendedActions,rbacGroups,category,mitretechniques,GenerateAlert
FileSha256,d27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110,Block,agent-framework PyPI compromise: agent_framework-1.26.1 whee,agent-framework PyPI compromise: agent_framework-1.26.1 wheel,2027-11-18T00:00:00.0Z,High,Investigate the device and pivot into the pack's queries,,,,True
FileSha256,3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9,Block,agent-framework PyPI compromise: agent_framework-1.26.2 whee,agent-framework PyPI compromise: agent_framework-1.26.2 wheel,2027-11-18T00:00:00.0Z,High,Investigate the device and pivot into the pack's queries,,,,True
FileSha256,21f28e8517a10ffe431f8d68f5875c85eca4001ae6d118322b0a41873998eb5e,Block,agent-framework PyPI compromise: agent_framework_meta.pth,agent-framework PyPI compromise: agent_framework_meta.pth,2027-11-18T00:00:00.0Z,High,Investigate the device and pivot into the pack's queries,,,,True
FileSha256,39fa329f2a93f734b0bb8f5adb203ea3331d1ae479832a5015a54cb17aabd663,Block,agent-framework PyPI compromise: agent_framework_meta/_telem,agent-framework PyPI compromise: agent_framework_meta/_telemetry.py,2027-11-18T00:00:00.0Z,High,Investigate the device and pivot into the pack's queries,,,,True
FileSha256,c275ccbe520ef3c0f02dc6a35389e427f9f1b4e0b12e140cd7bf7179ce143f02,Audit,agent-framework PyPI compromise: agent_framework_meta/__init,agent-framework PyPI compromise: agent_framework_meta/__init__.py loader,2027-11-18T00:00:00.0Z,High,Investigate the device and pivot into the pack's queries,,,,True
FileSha256,325e7e9f0ec94e41ad1a1b7a3f18a6b8b5bffece2e2b97b8d3369eb967452f93,Block,agent-framework PyPI compromise: af_runtime_diag.pth,agent-framework PyPI compromise: af_runtime_diag.pth,2027-11-18T00:00:00.0Z,High,Investigate the device and pivot into the pack's queries,,,,True
FileSha256,54d885b7d7161c9ed96489c66364c4bfbf635929166843bba10d97d46b5a2e1f,Block,agent-framework PyPI compromise: af_runtime_diag.py,agent-framework PyPI compromise: af_runtime_diag.py,2027-11-18T00:00:00.0Z,High,Investigate the device and pivot into the pack's queries,,,,True

Column names and allowed values are from Microsoft's documented parameter table. Prevent rows import as Block, without remediation; network indicators cannot use BlockAndRemediate. Check each expirationTime before importing: an indicator whose date has passed is already expired. Download the sample CSV from the Import page to confirm the column order before a bulk import. Each file takes at most 500 indicators. Learn describes the import per entity type, so if a mixed file is rejected, split it by indicatorType. An imported indicator does nothing unless the matching Advanced features are on (for example Custom network indicators and Allow or block file).

SentinelOne IOC importnot included

This pack does not ship a SentinelOne import block: the import format could not be verified against SentinelOne's own documentation. Export a sample from your console and the block can be added with confidence.

Hunt Strings & Behavioral Signaturesnot importable
# Hunt strings (search these in proxy URL logs, EDR command lines, SIEM)
# NOTE: webhook.site is a public request-bin used by many unrelated people.
#       Hunt the UUID below. Do NOT block or import the bare hostname.
d381fd80-ec62-42ad-8f5c-d1b15103c9bb
?t=telemetry
af-runtime-diagnostics/1
runtime-diagnostics/1
_AF_TEL=1
aHR0cHM6Ly93ZWJob29rLnNpdGUvZDM4MWZkODAtZWM2Mi00MmFkLThmNWMtZDFiMTUxMDNjOWJi
# Behavioral signals
.pth file with a line starting "import " written to site-packages root by pip/uv
python/pip/pytest process requesting 169.254.169.254 (Azure IMDS)
python process reading up to 300 /proc/*/environ files, then one HTTPS POST to a request-bin
GitHub Actions: ACTIONS_ID_TOKEN_REQUEST_URL called with audience api://AzureADTokenExchange or https://management.azure.com/
Files & SHA-1 Referencehost artifacts
# Files to look for in any site-packages root, venv, container layer or CI cache
agent_framework_meta.pth
agent_framework_meta/__init__.py   (1.26.1 only: 994 bytes vs 853 clean)
agent_framework_meta/_telemetry.py
af_runtime_diag.pth
af_runtime_diag.py
# SHA-1 (Wiz only; not importable to Falcon):
0a013e4724c4437cf9b177def1d988113e167539  agent_framework_meta/_telemetry.py
Exposure Audit (no interpreter launched)lockfile and host audit
# Package-state audit (SAFE: none of these start a Python interpreter)
grep -RIn --include='requirements*.txt' --include='*.lock' --include='Pipfile*' --include='pyproject.toml' --include='uv.lock' -E 'agent[-_]framework[^-]' .
# Lockfile hash match for the two malicious wheels:
grep -RIn -E 'd27fa34414e6201d5e03e559ef634f020057554d7b3f4898dd5d7cd3e989e110|3d20a8bc91351a9a16b6db243b848ceca0206b7a8623b02d2af553a9c9f7e0a9' .
# Clean version to pin to: agent-framework==1.26.0 (2026-11-12 18:25 UTC)
# Exposure window: 2026-11-17 20:35 UTC to quarantine (Wiz ~21:30, Aikido ~21:20)

Import notes: Falcon IOC import accepts SHA-256 and MD5 only, so the seven SHA-256 values are the whole CSV; the URL, UUID, User-Agents, filenames, base64 string and SHA-1 are hunt strings. The CSV contains no hostname and no domain at any action.

11

Detection Validation Gates

GateCheckPass criteria
Telemetry readyProcess creation with command line (CrowdStrike: ProcessRollup2. SentinelOne: Process Creation. Defender: DeviceProcessEvents) and outbound connection / DNS telemetry flowing from build agents, Azure VMs and developer hosts; a proxy or gateway repository that logs URL path and User-AgentRecent events from representative hosts in each group; proxy repository shows url.full populated
IOC loadedSeven SHA-256 values imported as Custom IOCs (six prevent, one detect)Import status active; no hostname rows present
Positive test (Q1)In a lab, run pip install --dry-run agent-framework==1.26.1 against an offline index stub, or any command line containing that pinQ1 fires on the test host
Positive test (Q5, Q6)Send a benign request through the proxy to a URL ending in the campaign UUID with User-Agent runtime-diagnostics/1 against a harmless internal test endpointQ5 and Q6 return the row. Do not post to webhook.site
Benign baselineRun Q2, Q3 and Q4 for 14 daysAllowlist legitimate Agent Framework users, managed-identity test suites and developer webhook scripts before alerting
Scope completeLockfile, image and cache audit (s7) across all repos and registriesEvery resolved 1.26.1 or 1.26.2 mapped to a host or job; its credentials rotated
PromotionQ1 detection first; Q3 and Q4 only after the baseline; none to preventFP rate below 5% over 14 days before any promotion
12

Hardening — Tiered

Immediate (this week)
  • Pin and hash-lock Python dependencies. Pin agent-framework==1.26.0 and install with --require-hashes from a lock generated by pip-compile --generate-hashes or uv pip compile --generate-hashes. MITRE M1051, M1013. Best-practice (pip secure-install guidance), no formal benchmark. Verify: grep -c -- "--hash=" requirements.txt.
  • Rebuild and purge. Delete virtualenvs, rebuild container images and clear CI caches that resolved a release since 2026-11-17 20:35 UTC. MITRE M1051. Verify with the s7 inventory (no .pth hit).
  • Rotate every secret and identity reachable from any affected environment (Azure CLI sessions, ADO PATs and service connections, GitHub, npm, PyPI, NuGet, Docker and Hugging Face tokens, .env contents). MITRE M1026, M1018. Verify: sign-in logs show only new credentials in use.
  • Deny webhook.site egress from build runners and servers at the proxy or firewall, scoped to those source ranges (not tenant-wide, not a Falcon IOC). MITRE M1037, M1021. Best-practice. Verify: a test request from a runner returns a proxy deny.
Near term (1 to 4 weeks)
  • Dependency cooldown. Enforce a release-age delay before dependency bots or resolvers pick up a new version: Dependabot cooldown, Renovate minimumReleaseAge, or an index snapshot timestamp with uv --exclude-newer. This would have kept both releases out of automated PRs. MITRE M1051, M1013. Best-practice.
  • Least-privilege OIDC in GitHub Actions. Set top-level permissions: contents: read and grant id-token: write only to the single deploy job. Pin Entra federated-credential subjects to a specific branch or environment. MITRE M1026, M1018. Best-practice (GitHub and Microsoft workload-identity guidance).
  • Restrict IMDS reach from build workloads. Block 169.254.169.254 for processes that do not need it (AKS NetworkPolicy for non-system pods; host firewall owner rules on build agents) after inventorying which UIDs legitimately use managed identity. MITRE M1030, M1035. CIS Microsoft Azure Foundations and Microsoft Cloud Security Benchmark (identity and network sections).
  • Scope Azure DevOps tokens. Limit System.AccessToken job authorization scope, avoid exposing it to script steps that install third-party packages, and use ephemeral agents. MITRE M1026. Best-practice (Microsoft Azure DevOps security guidance).
Strategic (1 to 3 months)
  • Private package index with quarantine. Route all CI installs through a proxy (Azure Artifacts, Artifactory, Nexus) that enforces an allowlist and a cooldown, and alerts on a new release of a pinned package. MITRE M1051. Best-practice.
  • Ephemeral runners with no standing secrets. Move to workload identity federation with short-lived, audience-restricted tokens and per-environment approvals; remove long-lived PATs and client secrets from agent images. MITRE M1026, M1032. CIS Azure Foundations, Microsoft Cloud Security Benchmark.
  • Inventory and review of .pth files in base images. Add a build-time check that fails an image containing an unexpected .pth with an import line. MITRE M1047. Best-practice, no formal benchmark.
13

Deployable Playbooks

1 · Locate and verify hooks without launching Python

Prerequisites: Shell access to the host, image mount or CI workspace; do not run python or pip in the suspect environment.
Reboot required: No
Rollback: Read-only; nothing to undo.

find / -xdev \( -name 'agent_framework_meta.pth' -o -name 'af_runtime_diag.pth' -o -name 'af_runtime_diag.py' \) 2>/dev/null | tee /tmp/af-hooks.txt
# Hash any hit with sha256sum and compare against s10:
xargs -r sha256sum < /tmp/af-hooks.txt
# Verify: no output means no hook on this filesystem.

2 · Rebuild the environment clean (do not repair in place)

Prerequisites: A reviewed requirements file; the host or runner is isolated and its secrets are being rotated.
Reboot required: No
Rollback: Keep the old directory renamed until rotation completes, then delete it. Do not reuse it: it contains the live hook.

mv .venv .venv.compromised            # do NOT delete yet if forensics are needed
python3 -m venv .venv                  # new environment, clean interpreter
. .venv/bin/activate
pip install --require-hashes -r requirements.txt   # lock pins agent-framework==1.26.0
# Verify: the lock hashes match and no *.pth import hook is present:
find .venv -path '*/site-packages/*.pth' -exec grep -l '^import ' {} +

3 · Generate a hash-locked requirements file

Prerequisites: Network access to your approved index; pip-tools or uv available.
Reboot required: No
Rollback: Revert the lock file in version control (git checkout -- requirements.txt).

echo "agent-framework==1.26.0" > requirements.in
pip-compile --generate-hashes -o requirements.txt requirements.in
# or: uv pip compile --generate-hashes requirements.in -o requirements.txt
# Verify: every line carries --hash=sha256:...

4 · Dependency cooldown (Dependabot and Renovate)

Prerequisites: Repository admin; dependency bot already enabled.
Reboot required: No
Rollback: Remove the cooldown or minimumReleaseAge key and commit.

# .github/dependabot.yml
version: 2
updates:
  - package-ecosystem: "pip"
    directory: "/"
    schedule:
      interval: "daily"
    cooldown:
      default-days: 7

# renovate.json
{ "packageRules": [ { "matchDatasources": ["pypi"], "minimumReleaseAge": "7 days" } ] }

5 · Least-privilege workflow permissions

Prerequisites: Workflow owner; inventory of which jobs really need Azure login.
Reboot required: No
Rollback: Revert the workflow commit.

# .github/workflows/deploy.yml
permissions:
  contents: read          # default for every job
jobs:
  build:
    runs-on: ubuntu-latest
    steps: [ ... ]        # no id-token here
  deploy:
    permissions:
      contents: read
      id-token: write     # only this job can request an OIDC token
    steps: [ ... ]
# Verify: github.com > repo > Settings > Actions shows default token permissions read-only.

6 · Egress deny for webhook.site from runner subnets (Squid example)

Prerequisites: A forward proxy on the runner egress path; the CI source range is known. Developer ranges are intentionally excluded.
Reboot required: No (Squid reconfigure only)
Rollback: Delete the two ACL lines, then run squid -k reconfigure.

acl ci_runners src 10.20.0.0/16          # replace with your runner/agent ranges
acl reqbin dstdomain .webhook.site
http_access deny ci_runners reqbin
# squid -k reconfigure
# Verify from a runner: curl -sS -o /dev/null -w '%{http_code}\n' -x http://proxy:3128 https://webhook.site/   # expect 403

7 · Restrict IMDS for build workloads (Linux host firewall, pilot first)

Prerequisites: Inventory of the UIDs that legitimately use managed identity (for example the deployment user); root access; a pilot agent pool. Best-practice, no formal benchmark.
Reboot required: No
Rollback: iptables -D OUTPUT -d 169.254.169.254 -m owner ! --uid-owner 0 -j REJECT and the matching allow lines; or reboot to drop non-persistent rules.

# Allow the deployment user, reject everyone else on the build agent:
iptables -A OUTPUT -d 169.254.169.254 -m owner --uid-owner deploy -j ACCEPT
iptables -A OUTPUT -d 169.254.169.254 -m owner ! --uid-owner 0 -j REJECT
# Verify as an unprivileged build user: curl -s -m 3 -H Metadata:true "http://169.254.169.254/metadata/instance?api-version=2021-02-01"  # expect failure

Snippets are raw configuration. Wrap them for fleet deployment with your own tooling.

14

Containment Runbook

PhaseActionsOwnerEvidence
ScopeGrep every repo, lockfile, image and cache for 1.26.1 and 1.26.2 and any loose range resolved since 2026-11-17 20:35 UTC; run Q1, Q2 and the s7 inventoryThreat Hunt / AppSecHit list mapped to hosts and jobs
IsolateIsolate or pause any build agent or host with a hook or a Q1 to Q5 hit; revoke its pipeline and service connections; block webhook.site egress from runner ranges. By platform: Falcon network containment on the host; for hosted runners cancel the job and disable the workflowSOC / PlatformContainment record; egress rule change
Isolate: by platformCrowdStrike: network-contain the host. SentinelOne: network quarantine (Disconnect from Network; confirm the label in your console version). Microsoft Defender: Isolate device (full network isolation).SOC / PlatformContainment record; egress rule change
EradicateDo not repair in place. Rebuild images and venvs from a clean base with agent-framework==1.26.0 and hash-locked requirements; purge cachesPlatform / DevRebuild logs; clean s7 inventory
RotateTreat every secret in the environment as stolen: Azure CLI sessions, ADO PATs and service connections, GitHub, npm, PyPI, NuGet, Docker, Hugging Face and registry tokens, Azure service principal credentials, anything in .env files. Removing the package does not undo what was already sentIAM / PlatformRotation record
Verify abuseReview Entra sign-ins for service principals, managed identities and federated credentials reachable from affected hosts (tokens stay valid up to 24 hours); review Azure Activity, ADO audit, GitHub audit and package-registry publish logs since 2026-11-17 20:35 UTCIR / CloudProvider log review; list of unfamiliar activity
RecoverRe-enable installs behind a hash-locked, cooldown-protected index; keep Q1, Q3 and Q4 as detections; re-run Q5 and Q6 weekly while indicators remain validPlatform / SOCCI configuration; detection status
15

Detection Coverage Map

TechniqueBehaviorCQLIOA/IOCCrowdStrike coverageSentinelOneDefender XDR
T1195.002Malicious release installedQ1, Q2, Q7IOA (Q1) / IOCGood (for command-line-visible installs)Partial: Q2 approximatePartial: Q2 approximate
T1546.018.pth startup hook written—IOC (hashes)GAP no file-write event for text files; use s7 inventoryGAPGAP
T1552.005IMDS token requestsQ3IOA (Q3)Partial (forked child may lack its own rollup)Partial: same limit as CrowdStrikePartial: same limit as CrowdStrike
T1567 / T1041Exfil POST to webhook.siteQ4, Q5, Q6IOA (Q4)Good (Q5, Q6 need URL and User-Agent logging)Partial: Q5 telemetry gap, Q6 telemetry gapPartial: Q5 telemetry gap, Q6 telemetry gap
T1552.001Credential file reads——GAP file reads leave no endpoint event; rotation is the controlGAPGAP
T1552Env-var and /proc/*/environ sweep——GAP in-process readsGAPGAP
T1528Azure DevOps and GitHub OIDC token theft——GAP outside endpoint telemetry; Entra sign-in logs (s7)GAPGAP

Honest read: the malicious releases are quarantined, so live prevention value is low and the exposure window has closed. The pack’s job is to find installs that already happened and to drive credential rotation. The decisive scoping tools are the lockfile, image and registry audit and the Entra and provider logs, not endpoint CQL. The _AF_TEL marker and the credential file reads are visible only by inspecting running processes or the filesystem. Hosted CI runners are usually outside endpoint telemetry entirely.

File-write detection was deliberately not built. The Falcon reference lists ElfFileWritten while this repository’s syntax gate lists ELFFileWritten and flags the other spelling as invented; either way, that event is for ELF executables, and the payload is a text .pth. A query on it would return nothing. Validation gates are in s11.

16

Hunt Summary Ticket

TITLE:      Microsoft Agent Framework PyPI compromise (agent-framework 1.26.1 / 1.26.2)
SEVERITY:   High: credential stealer, quarantined 2026-11-17; retro-hunt and rotation
SCOPE:      Dev, CI/CD (Azure DevOps, GitHub Actions) and Azure workloads that installed
            1.26.1 or 1.26.2 on or after 2026-11-17 20:35 UTC (images and caches included)
HYPOTHESIS: A build or host resolved a malicious release; a .pth hook ran on interpreter
            start, harvested env/files/IMDS/OIDC tokens and POSTed to webhook.site.
QUERIES:    Q1 pinned install · Q2 install inventory · Q3 IMDS from pip · Q4 webhook.site DNS
            Q5 UUID in proxy URLs · Q6 User-Agents · Q7 hash sweep · native inventory (s7)
DO FIRST:   1) Grep lockfiles, images, caches for 1.26.1/1.26.2; run Q1, Q2
            2) Search proxy logs for the webhook UUID and both User-Agents (Q5, Q6)
            3) Rotate every secret and identity reachable from any hit; pin 1.26.0
FINDINGS:   ____________________________________________________________
GAPS:       .pth write, credential-file reads, env sweep and OIDC theft produce no endpoint
            event (outside endpoint telemetry); hosted CI runners unmonitored; root cause unconfirmed
ACTIONS:    Rebuild clean · rotate secrets · deny webhook.site from runner ranges ·
            hash-locked requirements · dependency cooldown · least-privilege OIDC
OWNER:      ____________________          VERSION: v0.1 (2026-11-18)
17

Changelog

v0.12026-11-18Initial HuntPack: 7 CQL queries, native inventory and Entra hunts, 19 atomic indicators (18 in two or more sources), tiered hardening with rollback-documented playbooks, containment runbook. Root cause and attribution reported as unconfirmed. SentinelOne PowerQuery and Microsoft Defender KQL tabs added to Q1-Q7: SIEM Query Rosetta release 0.1.0 (public-beta; static-reviewed translations).
18

References

TierSourceUsed forAccessed
1Socket: Microsoft agent-framework PyPI package compromised with credential stealerPer-version file chain, selector lists, credential globs, token audiences, hashes, User-Agents, base64 destination2026-11-18
1Wiz: Malicious version of Microsoft agent-framework published to PyPITimeline, root-cause evidence, IOC table, SHA-1, webhook.site free-tier limits, remediation2026-11-18
1Aikido: Two malicious agent-framework releases hit PyPI in 33 minutesWheel diff, code excerpts, IMDS fallback, per-version hashes, remediation2026-11-18
2SecurityWeek: Microsoft Agent Framework releases poisoned with credential stealerPress context, Microsoft acknowledgement, unconfirmed maintainer-account claim2026-11-18

Generated 2026-11-18 · HuntPack · Defensive detection & hardening content only. No victim organizations named.