Open source cloud attack frameworks such as Pacu turn one stolen AWS access key into automated enumeration, privilege escalation, credential harvesting and log tampering within minutes, and every step is an ordinary AWS API call. Pacu, CloudFox and Stratus Red Team are built for penetration testers and detection engineers, but the techniques they automate are the same ones criminals run after buying or scraping leaked keys. This guide profiles the main AWS tools, maps their capabilities to MITRE ATT&CK and to the CloudTrail events they leave, and sets out the detections, preventive guardrails and test approach that catch them. It is written for cloud detection engineers, SOC analysts and AWS platform owners, and it is defensive only: it names capabilities and evidence, not usage. For the general three-cloud detection set, see the Cloud Detection Engineering Guide.
This is an independent guide from NHI Mgmt Group, based on the public documentation of Pacu (Rhino Security Labs), CloudFox (Bishop Fox), Stratus Red Team (Datadog) and AWS as of November 2026. It is not sponsored or reviewed by any of those projects or by AWS. Tools change, so confirm behaviour against the projects' and AWS's current documentation.
Key takeaways
- The tool is invisible, the credential is not. Every framework works through a valid access key or role session, so detection is about what an identity does compared with its normal behaviour, not about spotting a binary.
- Pacu covers the whole kill chain. ATT&CK v20 maps Pacu (S1091) to 21 techniques, from cloud discovery and secrets store access to disabling cloud logs and modifying cloud firewalls.
- Log tampering is the highest-value alert. Pacu's documentation describes "minimising" CloudTrail rather than stopping it, and adding attacker IPs to the GuardDuty trusted list, so alert on any change to trails, detectors and IP sets, not only on deletion.
- Use the same tools to test yourself. Stratus Red Team detonates single, ATT&CK-mapped AWS techniques in a controlled way, which makes it the natural harness for proving your detections fire.
- Guardrails beat alerts for the worst moves. Organisation-level policies that deny logging changes, plus short-lived role credentials instead of long-term keys, remove whole module categories from play.
The tools and what they automate
Pacu is an open source AWS exploitation framework created and maintained by Rhino Security Labs and released under the BSD-3-Clause licence. Its README describes it as designed for offensive security testing, with modules for privilege escalation, backdooring IAM users, attacking vulnerable Lambda functions and more. It stores keys and enumerated data in a local SQLite database, which the project says minimises API calls "and associated logs". That design point matters for defenders: after the first enumeration pass, much of the analysis happens offline and the tenant sees fewer, more targeted calls.
| Tool | Purpose stated by the project | What defenders see |
|---|---|---|
| Pacu (Rhino Security Labs) | Modular AWS exploitation framework: enumeration, escalation, persistence, evasion, exfiltration, lateral movement | Bursts of List, Describe and Get calls, then targeted writes to IAM, logging and compute |
| CloudFox (Bishop Fox) | Situational awareness and attack path discovery, designed to run from a principal with limited read-only permissions | Broad read-only enumeration across many services and Regions; secrets in user data and environment variables |
| Stratus Red Team (Datadog) | "Atomic Red Team for the cloud": granular, self-contained emulation of single attack techniques mapped to ATT&CK | One technique at a time, with set-up and clean-up; ideal for detection testing |
| Ad hoc scripts and the AWS CLI | Not a framework; most criminal key-testing uses plain SDK calls | The same API sequences without any tool fingerprint |
The last row is the reason to write detections against behaviour. TruffleNet operators tested stolen keys at scale with simple identity and quota checks before abusing Amazon SES, no framework required. See the TruffleNet 2025 breach page.
Pacu module categories mapped to ATT&CK and CloudTrail
Pacu's module documentation groups modules into reconnaissance (authenticated and unauthenticated), enumeration, escalation, exploitation, persistence, evasion, lateral movement and exfiltration. The table maps each group to ATT&CK v20 techniques from the Pacu software entry and to CloudTrail evidence.
| Module group | Examples (from the module list) | ATT&CK v20 | CloudTrail and other evidence |
|---|---|---|---|
| Enumeration | IAM users, roles, policies, groups; EC2, Lambda, ECS, EKS, RDS, Secrets Manager, Organizations | T1087.004, T1069.003, T1526, T1580, T1619 | High volume of read-only events from one access key across many services and Regions; many AccessDenied errors |
| Permission brute force | Calling supported APIs to learn permissions without the IAM API | T1526, T1059.009 Cloud API | Very high error rate, many distinct eventSource values in minutes |
| Detection enumeration | Enumerating CloudTrail, CloudWatch, Config, Shield, VPC and GuardDuty settings | T1518.001 Security Software Discovery, T1654 Log Enumeration | DescribeTrails, GetTrailStatus, ListDetectors, DescribeConfigurationRecorders from a non-security principal |
| Escalation | Privilege escalation path scan; CloudFormation resource injection | T1078.004 Cloud Accounts | Policy attach or version changes, role trust edits, PassRole into new compute |
| Persistence | Adding access keys or console passwords to other users; backdooring role trust; Lambda that backdoors new users or roles | T1098.001 Additional Cloud Credentials, T1546 Event Triggered Execution | CreateAccessKey where the caller is not the key owner, CreateLoginProfile, UpdateAssumeRolePolicy, new EventBridge rules invoking Lambda |
| Credential access | Downloading Systems Manager parameters with decrypted values; Secrets Manager enumeration; EC2 user data | T1555.006 Cloud Secrets Management Stores, T1552 Unsecured Credentials | Bulk GetParameter/GetParametersByPath with decryption, bulk GetSecretValue, KMS Decrypt spikes |
| Evasion | Disabling, deleting or minimising CloudTrail, GuardDuty, Config, alarms and flow logs; adding IPs to the GuardDuty trusted IP list | T1685.002 Disable or Modify Cloud Log | StopLogging, DeleteTrail, UpdateTrail, PutEventSelectors, DeleteDetector, CreateIPSet/UpdateIPSet, DeleteFlowLogs, StopConfigurationRecorder |
| Network changes | Backdooring EC2 security groups | T1686.001 Cloud Firewall | AuthorizeSecurityGroupIngress opening admin ports to the internet |
| Execution and lateral movement | Systems Manager command execution on EC2; startup script changes; assuming roles across Organizations accounts | T1651 Cloud Administration Command, T1648 Serverless Execution | SendCommand across many instances, ModifyInstanceAttribute on user data, AssumeRole into member accounts |
| Exfiltration | Downloading S3 buckets and EBS or RDS snapshots | T1530 Data from Cloud Storage, T1578.001 Create Snapshot | S3 data events (if enabled), CreateSnapshot, ModifySnapshotAttribute sharing to unknown accounts |
Two module descriptions deserve special attention. The "minimise" option for CloudTrail leaves a trail enabled while removing its SNS topic, global service events, multi-Region collection, log file validation, CloudWatch Logs integration and encryption, precisely to avoid the obvious stop and delete calls. And the honeytoken check module states that it identifies known canary keys and the owning account while avoiding CloudTrail. Design canary credentials so their value does not depend on looking unidentifiable, and alert on any use at all.
Detections that work
High-fidelity rules (alert directly)
- Any change to logging or detection: trail stop, delete or update, event selector changes, S3 lifecycle rules on the log bucket, GuardDuty detector or IP set changes, flow log deletion, Config recorder stops, and attempts to leave the AWS Organization. GuardDuty raises
Stealth:IAMUser/CloudTrailLoggingDisabledfor trail changes, but its own detector changes need your rule. See the AWS CloudTrail Guide. - Credentials created for someone else:
CreateAccessKeyorCreateLoginProfilewhere the calling identity differs from the target user. See How to detect AWS access key creation for another user. - Role trust edits:
UpdateAssumeRolePolicythat adds an external account or wildcard principal. - Snapshot or AMI sharing to an account outside your Organization.
- Penetration testing distribution findings: GuardDuty's
PenTest:IAMUser/KaliLinuxfamily flags API calls made from known testing distributions. Easy to evade by changing the user agent, but cheap and worth routing to the authorisation register check.
Behavioural rules (baseline, then alert)
- Enumeration burst: one access key or role session calling more than a set number of distinct
eventNamevalues across more than fiveeventSourceservices within 15 minutes, especially when it never did so before. GuardDuty'sDiscovery:IAMUser/AnomalousBehaviorcovers part of this. - Error storm: access denied errors above baseline for one principal. Permission brute forcing produces error rates no legitimate workload does.
- Secrets harvesting: a principal reading more parameters or secrets in an hour than it reads in a typical week.
- Workload credentials used elsewhere: GuardDuty's
InstanceCredentialExfiltration.OutsideAWSandInsideAWSfindings flag EC2 role credentials used from another host. The Capital One breach is the classic case of role credentials taken from instance metadata. - Fresh key, fast actions: long-term keys that sat unused and suddenly enumerate, or keys that call
GetCallerIdentityfrom a new ASN and then act within minutes.
Low-value signals to avoid relying on
The userAgent field is supplied by the caller. A framework string in it is useful when present, but an absent string proves nothing. Source IP reputation is weak against residential proxies and cloud-hosted attackers. Treat both as enrichment.
Preventive guardrails
| Module category blocked | Guardrail | Notes |
|---|---|---|
| Evasion | Service control policy denying CloudTrail, GuardDuty, Config and flow log changes to everyone except a named security role; organisation trail owned by the management or log archive account | Member accounts cannot delete or stop an organisation trail |
| Persistence via keys | Deny iam:CreateAccessKey and iam:CreateUser outside a provisioning role; move humans to IAM Identity Center | Removes long-term keys, the usual starting point |
| Escalation | Permissions boundaries on roles that can create roles; least privilege for iam:PassRole | Run IAM Access Analyzer policy checks in CI |
| Credential access | Resource policies on secrets and KMS keys scoped to the consuming role; IMDSv2 required on EC2 | IMDSv2 blocks the simple metadata theft path |
| Exfiltration | S3 Block Public Access at account level; deny snapshot sharing outside the Organization; data events on sensitive buckets | Data events cost money: scope them |
| Initial access | Secret scanning on code and images; short-lived federated credentials for CI | See the AWS Access Keys Security Guide |
Where identity fits
Every module needs credentials, and the credentials that start these intrusions are almost always non-human: CI access keys, forgotten automation users, and role credentials lifted from workloads. The Codefinger S3 ransomware campaign used stolen long-term keys with S3 read and write rights, and the 2025 AWS crypto-mining campaign had miners running within minutes of compromise. An inventory of access keys with owner, last use and permissions, plus aggressive removal of unused keys, shrinks the pool of credentials these tools can start from. See the How to Investigate CloudTrail for a Compromised Access Key guide when one is found.
How to implement
- Confirm coverage. An organisation trail in all Regions with log file validation, delivered to a log archive account, plus GuardDuty enabled organisation-wide. Add data events for your most sensitive buckets.
- Deploy the guardrails in a test organisational unit. Apply the logging-protection service control policy to a sandbox OU first, confirm deployment pipelines still work, then roll out to production OUs. Roll back by detaching the policy.
- Write the high-fidelity rules. Logging changes, cross-user key creation, trust edits and external sharing go straight to alerting.
- Emulate, with authorisation. In a dedicated test account, run Stratus Red Team techniques one at a time (it handles set-up and clean-up) and confirm each rule fires. Run a scoped Pacu enumeration from a known IP to measure the burst and error-storm baselines. Follow the AWS penetration testing policy and record every run in the authorisation register.
- Tune the behavioural rules. Run them in report mode for two to four weeks, exclude known scanners (CSPM, CNAPP, inventory tools) by role ARN rather than by user agent, then promote.
- Automate first response. For a confirmed malicious key: deactivate (not delete) the key, revoke active role sessions, preserve CloudTrail for the key, and check for keys, login profiles and trust edits it created.
Decision guidance
- Single account or small estate: GuardDuty plus a few EventBridge rules on logging and IAM changes give most of the value. Remove long-term keys first.
- Large AWS Organization: service control policies and an organisation trail are mandatory; centralise detections in the SIEM and correlate by access key ID across accounts.
- Native findings or custom rules: GuardDuty is anomaly and threat-intelligence based and needs no tuning to start; custom rules catch the specific write events that matter to you. Use both.
- Which emulation tool: Stratus Red Team for repeatable, single-technique detection tests; Pacu or CloudFox for scoped penetration tests that look for real escalation paths. CloudFox is designed to run with read-only permissions, which makes it the lower-risk choice for attack path reviews.
Detection and measurement
- Emulation pass rate: share of Stratus Red Team AWS techniques relevant to you that raise an alert within 15 minutes (target above 90% for evasion and persistence).
- Logging integrity: number of accounts without the organisation trail or GuardDuty (target zero).
- Long-term key count: active IAM user access keys, trending down, with none older than 90 days.
- Mean time to contain: from first alert to key deactivation for confirmed misuse.
- Exception hygiene: scanner exclusions defined by role ARN and reviewed quarterly.
Common failure patterns
- Alerting only on StopLogging and DeleteTrail. Minimising a trail, changing event selectors or adding a lifecycle rule to the log bucket achieves the same effect quietly.
- Allow-listing scanners by user agent. Anyone can set it, so a rule that ignores a CSPM user agent ignores an attacker who copies it.
- No owner for long-term keys. Keys with no owner cannot be checked quickly, so analysts close enumeration alerts as "probably a script". The Sumo Logic breach began with one compromised AWS credential.
- Testing in production without a register. Unannounced penetration tests train analysts to dismiss real alerts.
- GuardDuty trusted IP lists nobody reviews. An IP added to the trusted list silences future findings from it.
Framework mapping
| Framework | Reference | How it applies |
|---|---|---|
| MITRE ATT&CK v20 | S1091 Pacu; T1087.004, T1526, T1580, T1098.001, T1555.006, T1685.002, T1686.001, T1530, T1651 | Coverage targets for detection testing |
| NIST SP 800-53 Rev 5 | AU-2, AU-6, SI-4, AC-2, AC-6, CA-8 | Logging, review, monitoring, account control, least privilege, penetration testing |
| NIST CSF 2.0 | DE.CM-09, DE.AE-02, PR.AA-05, PR.PS-04 | Monitoring, analysis, least privilege, log generation |
| CIS Controls v8.1 | 8.2, 8.11, 5.3, 18.1 | Audit logs, log review, disable dormant accounts, penetration testing programme |
| ISO/IEC 27001:2022 | A.8.15, A.8.16, A.5.18, A.8.2 | Logging, monitoring, access rights, privileged access |
Practitioner checklist
- Run an organisation trail in all Regions with validation, owned outside workload accounts.
- Enable GuardDuty organisation-wide and route PenTest, Stealth and credential exfiltration findings to the SOC.
- Protect logging services with a service control policy.
- Alert on every trail, detector, IP set, flow log and Config recorder change.
- Alert on access keys or login profiles created for another user and on role trust edits.
- Baseline enumeration and error rates per principal, then alert on bursts.
- Require IMDSv2 and remove unused long-term access keys.
- Test detections with Stratus Red Team in a dedicated account under an authorisation register.
- Exclude scanners by role ARN, never by user agent.
Standards and references
- MITRE ATT&CK: Pacu (S1091)
- AWS: GuardDuty IAM finding types
- GitHub: Pacu project documentation
- GitHub: Pacu module details
- GitHub: Stratus Red Team
- GitHub: CloudFox
Related NHI Mgmt Group resources: Cloud Detection Engineering Guide · AWS CloudTrail Guide · AWS Access Keys Security Guide · ROADtools and AADInternals Detection Guide · Cloud Detection and Response Guide