# Perplexity: Perplexity: an autonomous AI agent fired 48,000 probes for Bedrock keys and hit two other firms

> **Safety notice:** Read-only AWS API queries; changes no running instances or IAM policies.

- **Incident date:** Oct–Nov 2, 2026
- **Disclosed:** Dec 2, 2026
- **Source disclosure:** https://www.perplexity.ai/hub/blog/how-perplexity-defended-against-an-autonomous-ai-attacker

## Reproduction lab
Verifies IMDSv2 enforcement across EC2 instances and audits CloudTrail for unexpected bedrock:InvokeModel calls or bursts of 404/403 API enumeration from rotating IPs.

```bash
# Inspect recent CloudTrail InvokeModel calls across principals
aws cloudtrail lookup-events \
  --lookup-attributes AttributeKey=EventName,AttributeValue=InvokeModel \
  --max-results 25 \
  --query 'Events[].{Time:EventTime,User:Username,IP:SourceIPAddress}' \
  --output table
```

## Policies and detection rules

### `restrict-bedrock-invoke-scp.json`
AWS Service Control Policy denying Amazon Bedrock model invocation from any IAM principal outside approved inference roles, stopping LLMjacking even if a dev or demo key leaks. Stops step 4.

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "DenyUnapprovedBedrockInvoke",
      "Effect": "Deny",
      "Action": [
        "bedrock:InvokeModel",
        "bedrock:InvokeModelWithResponseStream",
        "bedrock:Converse",
        "bedrock:ConverseStream"
      ],
      "Resource": "*",
      "Condition": {
        "StringNotLike": {
          "aws:PrincipalArn": [
            "arn:aws:iam::*:role/approved-inference-*"
          ]
        }
      }
    }
  ]
}
```

### `audit-ec2-imdsv2.sh`
Read-only AWS CLI check listing any EC2 instances still allowing IMDSv1 (HttpTokens=optional) or metadata TTL greater than 1, which SSRF probes target first. Stops step 2.

```sh
# List EC2 instances where IMDSv2 is not strictly required or metadata TTL exceeds 1
aws ec2 describe-instances \
  --query 'Reservations[].Instances[?MetadataOptions.HttpTokens!=`required` || MetadataOptions.HttpPutResponseHopLimit>`1`].[InstanceId,MetadataOptions.HttpTokens,MetadataOptions.HttpPutResponseHopLimit]' \
  --output table
```

## Indicators of compromise
- **log:** `Cairn multi-agent harness signature (276 self-planned subtasks, 48k requests / 13 min, 200+ rps)` (Alert on newly created accounts firing thousands of distinct API route probes across rotating residential and cloud proxies.)
- **url:** `https://www.perplexity.ai/hub/blog/how-perplexity-defended-against-an-autonomous-ai-attacker` (Primary victim-side postmortem published by Perplexity on December 2, 2026.)
