Threat Actors Deploy Agentic AI to Harvest Exposed Secrets from Public Repositories
What Happened — Microsoft Threat Intelligence observed adversaries using an autonomous AI framework (named ARTEX) to scan public GitHub repositories for leaked credentials, API keys, and other secrets. The AI agents automatically parsed the findings and, within minutes, leveraged the stolen secrets to sign into Azure Entra ID service principals, enumerate cloud resources, and exfiltrate data from Azure Key Vaults, Storage Accounts, and AI services. In one documented chain the AI moved from GitHub secret discovery to Azure Key Vault exfiltration in under five minutes.
Microsoft Threat Intelligence reported that threat actors have begun leveraging an agentic artificial‑intelligence offensive framework, identified as ARTEX, to sweep public GitHub repositories for exposed secrets such as credentials, application keys, and AI‑inference API tokens across a range of applications and cloud services. The AI‑driven tool can not only locate these secrets at scale but also analyze the findings and launch follow‑on attacks without human‑in‑the‑loop interaction; in one documented incident the AI moved from scanning GitHub to exfiltrating data from an Azure Key Vault in just five minutes.
The campaign escalated on October 28 2026 when Microsoft observed successful service‑principal sign‑ins originating from IP 199.19.77.84, targeting multiple application IDs belonging to several customers. In at least one case a multitenant, vendor‑owned application credential was compromised at its source and then reused to access downstream tenants, enabling the actors to discover cloud resources, steal additional credentials, and extract data from Azure Key Vaults, Storage Accounts, and Azure AI services. Parallel malicious activity was traced to IP 65.87.223.26, where embedded shell commands in a user‑agent attempted to exploit vulnerabilities and obtain App Service authentication tokens—a pattern also reported by security firm Todyl. A separate reconnaissance effort from IP 157.22.126.128 focused on AI workloads deployed on Azure AI services.
Microsoft urged organizations to scan their GitHub codebases for leaked secrets, remove any found, and immediately rotate the associated keys or credentials. GitHub’s built‑in secret‑scanning service now monitors public repositories, and enterprises can enable public monitoring to catch leaks in secondary repositories across the platform. For deeper protection, Microsoft recommends deploying GitHub Advanced Security for Azure DevOps—or the standalone GitHub Secret Protection for Azure DevOps—to block supported secrets before they are pushed. Additional safeguards include protecting workload identities, enforcing least‑privilege access, leveraging Microsoft Defender for Cloud, and migrating OAuth applications away from secret‑based authentication toward managed identities, which eliminate the risk of secret exposure in code.
The activity, first noted in August 2026, involved the AI framework issuing high‑volume GitHub queries that combined target organization names with keywords related to secrets, cloud services, or other AI providers. Microsoft warned that any organization whose secrets appear in public repositories should assume those credentials are compromised. A subsequent attack phase used the harvested application credentials to infiltrate Microsoft Entra ID tenants and linked Azure and Microsoft 365 resources, with sign‑ins primarily from IP 199.19.77.84 and a Tor‑exit node at 199.19.77.18. The actors performed service‑principal sign‑ins on dozens of applications across multiple tenants, exploiting the fact that “service principals are the identities that applications use to authenticate,” according to Microsoft.
The attackers focused on Azure operations that expose credentials, pulling storage account keys, App Service settings, connection strings, publishing credentials, AI/ML connections, datastores and Azure Kubernetes Service user credentials. Compromised applications then reached into the victims’ SharePoint and OneDrive tenants, downloading files and accessing mailbox items, while in several tenants the threat actors issued Microsoft Graph API calls—mostly search queries—to locate valuable content. They also enumerated subscriptions, resource groups, permissions, AI model deployments and service configurations to build a detailed map of the Azure environment, and attempted to validate stolen Azure resources, including compromised Azure AI services flagged by Defender for Cloud’s AI threat protection, suggesting a possible plan to abuse those services for further attacks.
Cloud‑API adjustments showed the agents adapting on the fly. From the address 199.19.77.84, an initial batch of ARM requests trying to list secret metadata across multiple Key Vaults returned HTTP 400 because a data‑plane API version was used against the control‑plane endpoint. Twenty‑eight seconds later the same batch was resent with the ARM API version 2023‑07‑01 and succeeded with HTTP 200. A similar pattern appeared when a GET request to list an Azure SQL server’s firewall rules used an outdated API version and failed (HTTP 400); about a minute later the request was repeated with a supported version and returned HTTP 200, the only change being the api‑version parameter. An ARM POST to an Application Insights query endpoint also failed with HTTP 400 due to an obsolete API version, but after roughly 80 seconds a retry using a current version succeeded.
OAuth application abuse was observed when the same agentic AI tools first obtained a token for a single‑tenant OAuth application in the target tenant, then leveraged that compromised app to enumerate additional cloud resources. In several instances the agents exfiltrated secrets from Azure Key Vault and searched Azure DevOps for further credentials; until those secrets are revoked or rotated, they enable persistence, identity compromise or resource hijacking. One case documented an AI agent moving from searching for client secrets on GitHub to extracting data from a Key Vault in just five minutes. The compromised OAuth app was also used to invoke the Azure Run Command feature, allowing scripts to run on VMs, which could harvest unsecured credentials, compromise workload identities, or install persistence mechanisms. Throughout the campaign the agents prioritized credentials that grant access to AI services—API keys for major AI providers and OAuth apps with rights to Foundry Tools (formerly Azure Cognitive Services)—mirroring other public reports of threat actors exploiting AI‑related credentials to run the same agentic workflows.
Microsoft’s response outlines containment, detection and defense steps. “Block the exact IP rather than the whole ASN,” the guidance advises, recommending that 199.19.77.84/32 be added as a named location in a Conditional Access policy for workload identities, assigned directly to service principals, and included in a user‑scoped block policy for replayed sessions (noting that workload‑ID policies need Premium licensing and only cover single‑tenant apps). Affected users should have Entra sessions, Azure DevOps PATs and SSH keys revoked, and any compromised application’s client secrets, certificates and federated credentials removed, with the service principal disabled if necessary—though “tokens already issued remain valid until expiry.” All secrets stored in any readable Key Vault must be rotated, and MSPs are urged to review Partner Center access, GDAP relationships and customer tenants, notifying customers per agreements. Detection advice includes reviewing Entra service‑principal and non‑interactive sign‑in logs for 199.19.77.84 and 199.19.77.18, watching for AADSTS7000215 (invalid secret) or AADSTS7000222 (expired secret) errors, and correlating Azure Activity, Key Vault, Storage, Entra audit, Azure DevOps and Microsoft 365 unified audit logs for secret reads, file downloads, or app‑permission changes. Analysts should flag patterns such as a single IP authenticating to three or more service principals with mixed outcomes, or an app requesting tokens across ARM, Key Vault, Storage and Graph in a short window, and search back as far as log retention permits. Finally, Microsoft warns that threat actors can alter source IPs, user‑agent strings and other fingerprints left by agentic AI tools, complicating early identification and blocking of malicious traffic.
Agentic AI frameworks generate a flood of reconnaissance requests in a very short window, often retrying the same technique or moving on to subsequent actions at machine speed. The frameworks typically wrap existing penetration‑testing utilities; for example, the open‑source tool ARTEX launches Nmap scans, curl and wget fetches, Python HTTP clients, the Norma SDK WebFetch library, and headless Chromium via Playwright. Traffic from these utilities can be spotted by default user‑agent strings or other signature patterns, which, while not sufficient to stop an AI‑driven attack—because the agent can quickly randomise them—can serve as an early warning for defenders.
Defensive deception techniques such as honeypots, decoys, tarpits and “fake wins” can divert autonomous AI agents away from production assets. Microsoft’s Sentinel Deception service provides attractive but useless targets, while tarpits exhaust the attacker’s time and budget. In internal testing, Microsoft reported that these controls markedly reduced the volume of malicious traffic reaching legitimate resources and yielded high‑confidence attribution signals.
Microsoft’s guidance for mitigating this threat emphasizes rigorous secret management. Organizations should stop embedding service‑principal credentials, storage keys, connection strings or other secrets in source code, configuration files, public repositories, issue trackers or similar locations, and they are advised to scan codebases with tools such as GitHub Advanced Security or OWASP‑compatible analyzers. Exposed credentials must be treated as compromised, revoked or rotated immediately, and their historic usage investigated, even if the original leak has been edited or deleted. The company also recommends enabling the full suite of Defender for Cloud protections—Resource Manager, Storage, Key Vault, App Service and Databases—enforcing least‑privilege RBAC for service principals, hardening OAuth applications, restricting backup‑infrastructure access, and applying Conditional Access policies and workload‑identity risk signals. Additional steps include cataloguing cloud applications via Defender for Cloud Apps, using Cloud Discovery to surface unmanaged apps, and limiting app registration to privileged users only.
Microsoft Defender and Sentinel provide a set of detections that map to the observed attacker behaviours. Identity‑protection alerts flag authentication attempts from anonymised or high‑risk infrastructure, which may indicate proxy or VPN use (Microsoft Entra ID Protection – Anonymous IP address). Attack‑analysis detections surface OAuth application activity that matches compromise patterns (Defender XDR – Potentially compromised OAuth application). Unattributed network indicators tied to ARTEX usage appear across multiple Sentinel alerts, such as abnormal deny rates, unusual port‑protocol combinations, malformed user‑agent strings and password‑spray attempts against Azure AD applications. Further Defender XDR signals include accounts compromised after password‑spray attacks, anomalous OAuth device‑code authentication, multiple service‑principal sign‑ins from a single IP and Graph API calls originating from Microsoft threat‑intel IPs. Defender for Cloud Apps reports suspicious user agents, repeated failed logins, OAuth activity from rarely visited ISPs and dubious app registrations, while Defender for Cloud flags high‑volume denied Key Vault accesses and access to sensitive blob containers from atypical locations.
Microsoft’s telemetry flagged an Azure Resource Manager operation that originated from a non‑Microsoft IP address, alongside a series of identity‑protection alerts from Entra ID Protection that showed a classic password‑spray pattern. The alerts noted “atypical travel” and identified the source as a verified threat‑actor IP, suggesting repeated login attempts across multiple accounts or tenants. Defender for Identity also recorded a suspicious service‑principal sign‑in that followed the addition of new credentials, while Defender for Cloud (specifically the Key Vault module) reported an abnormal burst of activity in a vault: a high volume of operations, access by an unexpected application, and secret‑listing queries coming from the same external IP address.
Further investigation revealed that the same infrastructure was issuing Microsoft Graph API calls that could be used for discovery, data collection, or subsequent cloud actions. Defender for Identity labeled these Graph requests as “suspicious Entra Graph API queries.” To aid analysts, Microsoft provided a set of advanced hunting queries targeting the activity that began on 28 October 2026. The queries focus on the IP addresses 199.19.77.84 and 65.87.223.26, pulling sign‑in events, Graph API audit logs, cloud‑app events, control‑plane operations, and potential exfiltration from storage accounts. Each query filters timestamps from the start of the day on 28 October 2026 to the present, ordering results chronologically to trace the attackers’ movements.
Microsoft Security Copilot, now embedded in Microsoft Defender, supplies AI‑driven tools to summarize incidents, analyze scripts, and generate hunting queries such as those above. Customers can deploy specialized Copilot agents—including Threat Intelligence Briefing, Phishing Triage, Threat Hunting, and Dynamic Threat Detection—to automate routine security tasks, or use the standalone Copilot portal for deeper investigations, vulnerability assessments, and custom plugin development.
Defender XDR customers can also access threat‑analytics reports that detail the techniques observed in this campaign, though a license for at least one Defender XDR product is required. The activity profile confirms that stolen application credentials were leveraged to impersonate Entra ID workload identities, granting the actors access to Azure and Microsoft 365 resources. Microsoft encourages users to follow its Threat Intelligence Blog, social channels, and podcast for ongoing updates on this evolving threat landscape.
Why It Matters for Trust & Control Assurance — The rapid, automated abuse of exposed secrets highlights the critical need for continuous credential‑lifecycle controls and automated secret‑scanning, a control that maps to multiple compliance frameworks.
Who Is Affected — Cloud‑first enterprises, software‑development organizations, managed‑service providers, and any firm that stores application credentials in code repositories (e.g., finance, technology, SaaS vendors).
Recommended Actions
- Enable GitHub Advanced Security or GitHub Secret Scanning for all repositories and activate push‑protection.
- Immediately rotate any credential found in public code and enforce short‑lived, managed identities wherever possible.
- Enforce least‑privilege RBAC for service principals and disable long‑lived client secrets.
- Deploy Microsoft Defender for Cloud workload protections (Key Vault, Resource Manager, Storage, etc.) and monitor Entra ID service‑principal sign‑in logs for anomalous IPs.
- Implement continuous secret‑management monitoring and audit logging to provide defensible evidence for compliance reviews.
Technical Notes
- Attack vector: Automated AI‑driven secret discovery in public GitHub repos → credential abuse in Azure Entra ID, Key Vault, Storage, AI services.
- Tools referenced: ARTEX framework, Nmap, curl, Playwright, Azure ARM API version switching.
- No CVE; the threat leverages mis‑managed secrets rather than a software flaw.