Protecting Stored API Keys From AI Scanners
Many development groups adopting modern artificial intelligence connect proxies, orchestration panels, and model routing frameworks to coordinate calls across upstream providers. While these central services simplify load distribution and token handling, they also gather sensitive access secrets into single points of failure. Online threat actors are now deploying autonomous software agents engineered expressly to discover, evaluate, and extract access tokens from these systems around the clock.
Recent security reporting from Amazon Threat Intelligence highlights this trend, detailing how autonomous scanning tools targeted services such as LiteLLM, Dify, and Langflow. Using agentic penetration testing codebases, remote attackers surveyed the public web for unhardened deployments, retrieved provider credentials, and immediately converted those access tokens into active computing capacity. The core aim was acquiring functional keys to run intensive inference workloads at the victim’s financial expense or exploit connected downstream pipelines.
For development leads, technical founders, and engineering teams, this threat landscape shifts defensive timetables. Vulnerabilities like untamed configuration files or exposed control consoles are no longer uncovered solely during manual audits; autonomous software swarms sweep the web unceasingly. Guarding stored API keys demands a clear understanding of how these agentic sweeps operate, along with immediate structural defenses across every deployed AI service.
How Self-Sustaining Agentic Scans Operate
Telemetric data captured by Amazon’s MadPot decoy sensors recorded autonomous requests arriving from 3 October to 5 November 2026. The findings, summarized by Amazon Integrated Security CISO CJ Moses, indicated that the incoming requests retained operational state and execution memory tied to ARTEX, an open-source agentic software framework created for penetration testing. Amazon attributed the malicious efforts, with moderate confidence, to independent threat clusters associated with Chinese actors, noting that the decoy infrastructure simulated well-known model services across hundreds of attack targets.
The operational architecture of this offensive campaign established a closed-loop economic mechanism. Rather than dumping found credentials into static log files for later human review, the automated agents immediately verified each upstream key against external provider endpoints. Once confirmed valid, those extracted access tokens were funneled into a collective resource pool that powered the very language models running the scanning operations.
This closed feedback loop permitted the scanning framework to self-finance its computational overhead using the financial balances of breached organizations. As soon as the agents compromised an administrative interface, the newly acquired credentials enabled expanded inference runs, accelerating subsequent cycles of discovery across the web. The resulting velocity eliminated the usual gap between initial discovery and active exploitation.
Targeting Gateways and Orchestration Frameworks
Attackers prioritized applications that concentrate provider credentials. When engineering teams build generative software, they frequently insert intermediate proxies or visual workflow builders to coordinate prompts, govern context size, and switch between language model backends. This aggregation design means that piercing a single misconfigured administration console yields the upstream access secrets for numerous client services and underlying accounts.
Amazon noted that the autonomous scans systematically focused on two specific categories of systems: inference proxies and visual orchestration platforms. The list of monitored targets spanned multiple widely adopted open-source and self-hosted tools:
- Proxy and model routing layers: LiteLLM, Sub2API, Veloera, One API, and New API.
- Orchestration builders and interfaces: Dify, FastGPT, Langflow, RAGFlow, Open WebUI, LobeChat, and Ollama.
When an enterprise deploys an orchestration dashboard on an accessible network route without strict perimeter firewalls or mandatory user authentication, internet crawlers can easily access administrative controls. Once inside, attackers scrape the upstream tokens configured for commercial model providers. Threat actors recognize that hijacking a routing engine produces far higher yields than penetrating isolated application servers.
Exploitation Vectors and Asset Reconnaissance
Amazon highlighted that the autonomous tooling did not rely on intricate zero-day vulnerabilities. Instead, the automated agents systematically capitalized on elementary lapses in environment hygiene and deployment setup. What made the ARTEX framework formidable was its tireless persistence, mechanically testing every uncovered endpoint against standard setup blunders.
The scanning routines targeted several well-known infrastructure weaknesses:
- Unfinished deployment wizards: Launching containers on public networks prior to finishing onboarding, enabling scanning bots to finalize administrative registration and seize instance ownership.
- Default credential sets: Deploying services with baseline installation secrets untouched, such as failing to reset LiteLLM’s default master key during environment bootstrapping.
- Exposed management routes: Permitting internet access to diagnostics, health checks, or configuration panels without placing them behind authenticating reverse proxies.
- Server-side request forgery paths: Leveraging document processing endpoints or model runners to initiate SSRF requests directed toward internal cloud instance metadata endpoints.
- Accidentally bundled assets: Leaving sensitive credentials embedded within browser JavaScript, unstripped production source maps, diagnostic routes, or publicly reachable
.envconfiguration files.
The agentic collection process reached beyond rudimentary port queries. The software scraped multiple external telemetry streams, combining data from network reconnaissance utilities, certificate transparency monitors, public GitHub repositories, and package archives from npm and PyPI. The bots also analyzed container filesystem layers, online paste boards, and public Telegram channels. Any secret leaked during a git push or container build was rapidly discovered and tested by the scanning engine.
Corroborating Intelligence and Broader Campaign Signals
Findings beyond Amazon confirm that multiple threat groups have embraced this tooling. According to reporting from The Hacker News, Cloudflare observed an ARTEX-driven compromise involving an account-level CI/CD token that lacked IP restrictions and request caps. Utilizing this token, the malicious process fired off 400 database dump requests within sixty minutes, though Cloudflare did not confirm whether backend records were successfully extracted.
Cloudflare concluded that the token surfaced through a third-party cloud vendor, even though the primary breach mechanism was not published. Concurrently, an FBI FLASH bulletin revealed that malicious operators have been utilizing ARTEX since August or earlier, while Microsoft separately tracked adversary groups deploying matching utilities to harvest credentials across GitHub. After widespread reports documenting malicious exploitation, the creator of ARTEX took the primary GitHub repository offline on 8 October, though downstream forks and a paid tier branded ARTEX PRO continue to circulate.
Amazon’s investigation captured another initiative wherein automated programs supplied synthetic face videos alongside altered identification cards against KYC verification checks at two cryptocurrency exchanges. In each case recorded by the agents, the identity verification platform successfully turned away the synthetic media. Meanwhile, network defenders from Cisco Talos have linked upward of 2,500 distinct IP addresses to ARTEX operations, showing that scanning nodes extend significantly beyond the 11 baseline network indicators published in AWS telemetry.
Essential Audit Steps for Engineering Teams
To defend against automated credential harvesting, teams hosting model routing proxies, visual builders, and inference gateways must enforce strict operational discipline. Review the following practical measures to eliminate common avenues of exposure:
- Reset administrative credentials: Replace LiteLLM’s default master key immediately upon container initialization and audit every gateway instance to confirm no factory passwords remain active.
- Isolate early-stage deployments: Restrict newly spun instances to private virtual networks until setup wizards conclude and administrative accounts are securely claimed.
- Scrub build pipelines and codebases: Search through environment variables, container build stages, CI/CD scripts, and databases for hardcoded tokens, rotating any secret exposed to shared environments.
- Lock down deployment tokens: Enforce strict source-IP boundaries and short-lived durations on Cloudflare API tokens, deployment service accounts, and repository secrets.
- Audit serverless workloads: Review Cloudflare Workers registries for unauthorized serverless scripts utilizing prefixes like
artex-*,artex-pgrecon-*,artex-pgw-*, orartex-do-*. - Block scanner network ranges: Filter inbound perimeter traffic against the 11 malicious addresses cataloged by Amazon, while ingesting the expanded list of more than 2,500 nodes tracked by Cisco Talos.
- Upgrade builder frameworks: Apply recent security releases across RAGFlow and Langflow to remediate SSRF flaws and unauthorized execution entry points.
- Configure spend triggers and billing caps: Establish rigorous cost thresholds and usage alerts inside model provider consoles so that unauthorized token use triggers immediate automated shutoffs.
Planning something like this? XORGEEK designs and builds web and mobile apps for teams in Japan and around the world. Talk to us.