The Code/X ArchiveView on X
Aravind Srinivas

@AravSrinivas

In late October and early November, an attacker ran an autonomous AI agent against Perplexity for two weeks trying to steal Amazon Bedrock credentials for frontier model access. At its peak, it sent roughly 48,000 requests in 13 minutes. 1/n
31182010.6K4.7K
Aravind Srinivas

@AravSrinivas

The attacker’s agent swept 28,000 guessed API routes, tried 3,681 S3 lookups hunting for files like .env.production and .aws/credentials, and tested our link-fetching features for SSRF. SSRF basically means tricking a server into fetching an internal address it should not expose, eg the AWS metadata endpoint (169.254.169.254) that hands out cloud credentials.
624955103
Aravind Srinivas

@AravSrinivas

When direct internal IPs were blocked, it tried hex and decimal IP encodings, redirect chains, and DNS rebinding (using a domain that resolves to a safe public IP during the initial check, then flips to an internal IP right when the actual request happens). Because our outbound validator resolves and checks the IP at connection time, every attempt failed.
41979654
Aravind Srinivas

@AravSrinivas

Whenever per-account rate limits kicked in, the agent switched to a fresh signup or proxy, cycling through 40+ disposable accounts and about 290 residential and cloud proxies. Looking at any single account on its own, you would miss the full campaign.
41166430
Aravind Srinivas

@AravSrinivas

We use Perplexity Computer to watch application logs and triage alerts. It connected those throwaway accounts through shared IPs, email domains, and callback hosts and flagged the campaign on Nov 2. From there, we ran a dedicated Computer workflow for over 5 days that tracked newly rotated infrastructure and drafted preventive hardening changes for our engineers to review and ship while the attack was still live.
31063428
Aravind Srinivas

@AravSrinivas

When our security team scanned it to inspect the redirector scripts, they found 207 open ports running ad-hoc Python listeners for individual attack steps, plus 29 ports serving unauthenticated Python SimpleHTTP directory listings straight to the public internet. Over 10,000 working files were sitting out in the open, including live campaign workspaces targeting Perplexity and two other companies.
21051923
Aravind Srinivas

@AravSrinivas

Looking at those workspaces gave us a clear picture of how an autonomous offensive agent works under the hood.

The attacker was running Cairn, an open-source agent harness that runs CLI coding agents inside a Kali Linux container with shell, network, and headless-browser access.

Everything lives in one graph file (graph.yaml) with three pieces: an operator goal prompt, a list of facts (what the agent observed, including dead ends), and a list of intents (worker tasks). Each task reads earlier facts, runs scripts or probes, writes back new facts, and queues the next tasks.
518706399
Aravind Srinivas

@AravSrinivas

Once started, the agent ran almost entirely on its own.

In one recovered workspace, the operator only bootstrapped the first task, and the agent created 276 more by itself over 19.5 hours (up to 14 running in parallel, median 11 minutes each). It mined cert logs, web archives, npm and PyPI packages, mobile builds, and scanned 4,281 forks of 10 public GitHub repos looking for complete key pairs.

The agent is resilient with failed branches. 37 branches were marked as dead ends, and 19 triggered follow-up workarounds within a median of 31 minutes. Eg when GitHub code search required authentication, within 25 minutes it spun up 3 parallel tasks: one to find a GitHub token and two to mine other public sources instead, then looped back once it had a token.
21040731
Aravind Srinivas

@AravSrinivas

Across all three targets, the operator prompt had the exact same goal: steal AWS keys or bearer tokens able to invoke two frontier models on Amazon Bedrock.

None of the campaigns reached that goal. Against Perplexity, the agent came away with nothing. At the other two companies, it did get deeper footholds via a live customer OAuth credential left in deleted git history at one, and an exposed management API on a demo environment at the other.

Within hours of finding the server on Nov 4, we used Computer to compile technical reports and indicators and notified both security teams while the intrusions were still underway.
2741524
Aravind Srinivas

@AravSrinivas

A few practical takeaways for engineering and security teams:
1. Agent harnesses make probing cheap, tireless, and adaptive. One prompt can turn into hundreds of parallel tasks that route around failed checks on their own.
2. Strong baseline security is still what decides day-one outcomes: connection-time URL validation, strict authorization, and cleaning up deleted git history or exposed demo environments.
3.Defenders can use the same agent loops. Running autonomous agents proactively against your own code and public surfaces catches leaks before someone else does, and using them live during an incident lets your team match the attacker’s speed.
756874323
Aravind Srinivas

@AravSrinivas

Full technical write-up and threat indicators on our blog (we’re hiring, DM @kpolley if you’re interested in joining our team!)

perplexity.ai/hub/blog/how-p…
291301.5K1.3K
End of thread