AI agent that failed to breach Perplexity compromised two other companies

Help Net Security

Source published: Site published:

Original article · فارسی

An autonomous AI agent spent two weeks trying to steal cloud login details from Perplexity's systems so it could access Amazon Bedrock's AI models. It failed to break into Perplexity, but it was much more successful against two other companies it targeted.

Perplexity AI agent attack

The attacker wanted access to Amazon Bedrock. This is an AWS service that provides AI models from several companies through a single API. Perplexity said in a report about the incident that none of the agent's attempts to break into its systems succeeded.

"Perplexity Computer, our agent platform, flagged the probing in our application logs and escalated it to the security team," the company said.

"Our security controls held," Perplexity wrote. It explained that checks on outgoing URLs and access permissions blocked every attempt. None of the attacker's attempts to reach internal services, other users' data, or login details succeeded.

Two weeks of probing

Perplexity said the attacker created several temporary accounts in late October and first carried out a small number of checks. On November 2, the agent began sending large numbers of requests. At its busiest, it sent about 48,000 requests in 13 minutes, or more than 200 requests every second. Two more bursts of activity followed the next day. They lasted 15 minutes each and involved about 9,300 and 12,700 requests.

The activity included server-side request forgery (SSRF). This is a type of attack in which someone tricks a server into sending requests on their behalf. In this case, the requests were aimed at cloud metadata services that can provide login credentials. The agent tried different ways to get around Perplexity's security checks, including methods involving filters, DNS rebinding domains, and redirect chains. None of these attempts worked.

The agent also tried to guess where secret files and configuration files were stored in Amazon S3. AWS CloudTrail audit logs recorded 3,681 failed attempts to find more than 3,300 different file names over 14 hours. No private files were opened. Attempts to gain higher access privileges and reach other customers' data were also blocked.

To avoid being blocked, the attacker switched between more than 40 temporary email accounts and about 290 proxy addresses. The attempts stopped within a week of the first major burst of activity.

A campaign built on Cairn

Perplexity examined files that the attacker had left exposed on its own server. The company found that the operation used Cairn, an open-source tool for automated AI security testing. "Cairn structures each campaign as a graph of observations," the company explained. The person running the operation sets a goal. The system then records what it discovers as "facts" and gives tasks to its agents as "intents."

Each worker agent ran in its own container with Kali Linux, a version of Linux designed for security testing. It had access to command-line tools, networks, and a browser that could run without showing a window. In one campaign, a single worker created 276 additional tasks by itself over 19.5 hours. It ran as many as 14 tasks at the same time.

Perplexity counted 37 cases where the agent decided that an attack path had reached a "dead end." Later tasks returned to 19 of these failed attempts and used what they had learned as a starting point for new attempts.

Stolen tokens and secrets at two other firms

Perplexity's team found the attacker's server while the operation was still happening. The server had 207 open ports, and 29 of them showed public lists of files. More than 10,000 files could be viewed by anyone. These files showed that the agent had also been targeting other companies. Perplexity identified two of them and warned them about the activity, but did not reveal their names.

At the first company, the agent "found a live customer OAuth credential in deleted git history." This was a login token that had been removed from the code but still existed in the repository's history and continued to work. The agent used it to gain administrator control of that customer's workspace. It then obtained temporary AWS credentials, but those credentials did not allow access to Bedrock.

At the second company, "the agent logged into an exposed management API on a demo environment and deployed a persistent command runner." This was a program that could continue running and receiving instructions. Over 15 hours, it contacted the attacker about 1,000 times and collected password stores, Kubernetes secrets, and EC2 role credentials. However, its attempts to reach Bedrock through a proxy were rejected.

Open questions

Perplexity was clear that it does not know everything about the operation. The server it discovered was probably only one part of a larger campaign. Some of the campaign workspaces contained only incomplete records. The company also warned that "agents can misread responses or overstate partial access." This means the agent's own reports about what it managed to access may not be accurate.

"Agent harnesses make it cheap to probe targets around the clock and adapt as requests fail," the company warned. It added that security teams can use the same technology to protect their systems. They can run agents against their own code and systems exposed to the internet to find leaked secrets and exposed access points before an attacker's agent discovers them.