# Hackers Use AntiFox AI Pentesting Agents in AWS Attacks

*Updated on November 11, 2026*

Threat researchers at **Arctic Wolf** and secrets-security firm **GitGuardian** have uncovered active in-the-wild intrusions where attackers deployed self-hosted instances of **`AntiFox`**, an open-source agentic AI penetration-testing platform forked from `ARTEX`, on **Alibaba Cloud** infrastructure to exploit web applications, drop `IIS` webshells, and systematically harvest **Amazon Web Services (`AWS`) production secrets and `S3` buckets**.

In one documented intrusion timeline analyzed by Arctic Wolf, the attacker-operated `AntiFox` infrastructure took stolen AWS `IAM` user keys and assumed `EC2` instance roles harvested from compromised application files, then **cycled through multiple valid AWS identities while firing hundreds of authenticated AWS API enumeration requests in roughly `30 minutes`**. Although AWS IAM permission boundaries blocked most discovery calls, the autonomous reconnaissance loop succeeded in locating privileged paths that exposed **live production secrets**, and in a separate incident, read, copied, and **deleted customer `S3` objects**.

`AntiFox` (recently updated on GitHub to `v2.0` with automated exploit documentation and reporting) illustrates the exact failure of **"honor-system" safety disclaimers** on open-source offensive AI frameworks. While `AntiFox`'s repository README explicitly forbids running the agent against live production targets or conducting unauthorized attacks, the codebase contains **zero technical guardrails** preventing anyone from spinning it up on an offshore VPS pointed at enterprise cloud endpoints.

Responding to the disclosures, AWS confirmed that core AWS services operated as designed and were not compromised, emphasizing that the threat actors abused **customer credentials exposed inside compromised web applications and `EC2` metadata configurations** rather than an underlying cloud vulnerability.

<a aria-hidden="true" id="executive-fast-facts"></a>  Fast Facts

- **Offensive Tooling &amp; Lineage**: `AntiFox` (`v2.0` on GitHub, an open-source agentic AI pentesting fork in the `ARTEX` lineage), hosted by threat actors on **Alibaba Cloud** instances as analyzed in the [GitGuardian AntiFox AWS credential analysis](https://blog.gitguardian.com/another-new-ai-hacking-agent-vs-the-same-credential-problem-antifox-targeting-aws-credentials/) and [BleepingComputer's report on Arctic Wolf's findings](https://www.bleepingcomputer.com/news/security/hackers-use-antifox-ai-agents-in-aws-credential-theft-attacks/).
- **Attack Chain Observed**: Initial web-service exploitation and Microsoft `IIS` webshell deployment -&gt; extraction of `.env` / config `IAM` keys and `EC2` role credentials -&gt; high-speed `AntiFox` AWS API enumeration -&gt; `Secrets Manager` / production secret theft and `S3` read/copy/delete actions.
- **Machine-Speed Reconnaissance**: Cycled across multiple compromised `IAM` users and assumed `EC2` roles to execute **hundreds of AWS API calls in `~30 minutes`**, hunting for the single permissive call buried inside a burst of `AccessDenied` responses.
- **Governance Gap**: `AntiFox` prohibits live/malicious usage in text license terms only, with zero cryptographic target-ownership verification (such as DNS TXT token proof).
- **AWS Remediation Guidance**: Enforce **`IMDSv2`** (`HttpTokens: required`) on all `EC2` hosts, eliminate long-lived static `IAM` keys in app files, and scope least-privilege roles.

## Why Agentic Pentesting Forks Turn Minor App Leaks Into 30-Minute Cloud Ransoms

Historically, when an opportunistic attacker planted an `IIS` or PHP webshell on a forgotten marketing or staging server, turning scraped environment variables into lateral AWS movement required a skilled human cloud operator to manually test `sts:GetCallerIdentity`, `iam:ListAttachedUserPolicies`, `secretsmanager:ListSecrets`, and `s3:ListAllMyBuckets` across dozens of AWS regions. Open-source offensive agents automate that entire post-exploitation playbook at machine speed:

| Post-Exploitation Phase | Manual Human Intruder | `AntiFox` Autonomous Agent Loop | Defensive Detection Signal |
|---|---|---|---|
| **Credential Extraction** | Manual grep for `AKIA` keys in web root | Automated config, `.env`, memory &amp; IMDS sweep | Correlate `IIS` w3wp.exe child shells with file reads |
| **Permission Enumeration** | Slow manual CLI checks; noisy typos | **Hundreds of multi-service API calls in 30 mins** | Burst of `AccessDenied` CloudTrail events across ASN |
| **Privilege Discovery** | Often misses obscure service read rights | **Finds 1 allowed `GetSecretValue` / `S3` path in noise** | **1 `200 OK` read buried inside 200+ `AccessDenied` errors** |
| **Impact Velocity** | Hours to days before exfiltration | **Minutes from webshell to S3 copy/delete** | Impossible-ASN alert (`EC2` role used from Alibaba Cloud IP) |

Look closely at Arctic Wolf's #1 threat-hunting insight in Column 4: **most enterprise SIEM rules alert on raw `AccessDenied` spikes and then get tuned out as noisy developer misconfigurations, missing the single successful `GetSecretValue` or `GetObject` call sitting right in the middle of 300 denials!** Even more critically, an `EC2` instance role (`ASIA...` temporary session token) should **never** be making AWS API calls from an external **Alibaba Cloud** IP address, that single ASN mismatch is a `100%-fidelity` credential-exfiltration alarm.

## Blocking External Replay of Stolen EC2 Role Credentials

Cloud security teams can neutralize half of the `AntiFox` AWS playbook immediately by enforcing **`IMDSv2`** (blocking SSRF metadata theft) and attaching an **AWS Organization Service Control Policy (`SCP`) or IAM Role Condition** that cryptographically blocks `EC2` instance credentials from ever being replayed outside your VPCs:

```
{
"Version": "2012-10-17",
"Statement": [
 {
   "Sid": "BlockStolenEC2RoleReplayFromExternalClouds",
   "Effect": "Deny",
   "Action": "*",
   "Resource": "*",
   "Condition": {
     "StringEquals": { "aws:PrincipalType": "AssumedRole" },
     "ArnLike": { "aws:PrincipalArn": "arn:aws:iam::*:role/ec2-*" },
     "StringNotEquals": { "aws:SourceVpc": ["vpc-0a1b2c3d4e5f60001", "vpc-0a1b2c3d4e5f60002"] },
     "BoolIfExists": { "aws:ViaAWSService": "false" }
   }
 }
]
}
```

Pair VPC-bound credentials with three concrete `CloudTrail` and `S3` defenses today:

- **Hunt `"Success Inside Denial Bursts"` in CloudTrail**: Write a `CloudTrail` / `GuardDuty` query that flags any `IAM` principal generating `>=25` `AccessDenied` or `Client.UnauthorizedOperation` errors within a `10-minute` window **followed by &gt;=1 successful `secretsmanager:*`, `ssm:GetParameter*`, or `s3:GetObject` / `s3:DeleteObject` call**.
- **Eliminate Long-Lived `AKIA` Static Keys on `IIS` and Linux Web Hosts**: On-prem or hybrid Windows `IIS` servers that genuinely need AWS access should use **AWS IAM Roles Anywhere** (X.509 hardware/TPM certificate trust) rather than plaintext `AWS_SECRET_ACCESS_KEY` strings sitting in `web.config` or `.env` files.
- **Enable `S3` Object Lock &amp; MFA Delete on Critical Buckets**: Because `AntiFox`-linked operators actively **deleted `S3` objects** after copying them (a classic cloud-extortion pattern), enable S3 Versioning + Object Lock (`Governance` or `Compliance` mode) on backups and production state buckets so compromised application keys cannot wipe data.

  Next Steps

1. **Enforce `IMDSv2` (`HttpTokens=required`, `HopLimit=1`) Account-Wide**: Use an AWS Organizations SCP to block launching or running any `EC2` instance with legacy `IMDSv1` enabled, cutting off easy webshell/SSRF role harvesting.
2. **Deploy External-ASN Replay Alerts on `ASIA*` Session Tokens**: Trigger an automated IAM session revocation (`AWSRevokeOlderSessions`) whenever an `EC2` role token authenticates from a non-AWS datacenter ASN (such as Alibaba Cloud, DigitalOcean, or VPS proxies).
3. **Require Domain Ownership Proof on Internal AI Pentest Tools**: If your AppSec team uses agentic pentesting frameworks internally, run them only inside isolated VPC runners gated by verified DNS TXT target allowlists.