Tool Spotlight: CloudFox - Accelerating AWS Penetration Testing

If you have ever been dropped into a sprawling AWS environment with a set of IAM credentials and told to "find the critical data," you know the feeling of overwhelming complexity. Navigating massive, undocumented cloud estates manually is like trying to map a dark cave with a penlight. You end up running dozens of disjointed AWS CLI commands, getting rate-limited, and sifting through endless JSON output just to answer basic questions: Who am I? What can I access? Where is the data?
Enter CloudFox by Bishop Fox.
CloudFox is an open-source command-line tool designed to help penetration testers and cloud security practitioners gain situational awareness in unfamiliar cloud environments. It automates the enumeration of AWS (and GCP) infrastructure, finding exploitable attack paths and surfacing the most interesting targets quickly. Think of it as PowerView, but for AWS.
The Job to Be Done: Escaping IAM Hell
The primary problem CloudFox solves is the sheer verbosity and lack of context in standard cloud APIs. When assessing an AWS environment, you do not just want a list of all IAM roles; you want to know which roles have AdministratorAccess, which EC2 instances have overly permissive instance profiles attached, and whether any S3 buckets are secretly exposing data to the internet.
Manually hunting for this—or relying solely on compliance-focused CSPM (Cloud Security Posture Management) tools—often misses the nuanced exploitation chains attackers look for. CloudFox bridges this gap by explicitly focusing on attack paths. It groups related API calls, parses the JSON into highly readable output formats (tables, grep-friendly lists, and CSVs), and even generates commands you can copy-paste for further exploitation.
As we discussed in our AWS Cloud Security Audit Tools Roundup, having a tool that speaks the language of a red teamer rather than an IT auditor is invaluable.
A high-tech visualization of AWS cloud enumeration, mapping IAM roles and potential attack paths.
Where CloudFox Fits in a Workflow
CloudFox is primarily an enumeration and post-compromise reconnaissance tool.
You reach for it after you have obtained some level of access. This could be a leaked AWS_ACCESS_KEY_ID found in a public GitHub repo, an SSRF vulnerability (like those covered in our Cloud SSRF Hunting Methodology) that yielded an EC2 metadata credential, or a set of read-only credentials provided by a client for an authorized white-box penetration test.
The workflow is straightforward:
- Authenticate: Setup your AWS profile.
- Enumerate: Run CloudFox to map the environment.
- Analyze: Read the output tables to find misconfigurations and pivot points.
- Exploit: Use the generated commands to execute the next phase of the attack.
Installation and Setup
CloudFox is written in Go, which makes it fast and highly portable. The easiest way to install it is to grab the pre-compiled binary from the official releases page, or build it yourself using go install.
# Install the latest version using Go go install github.com/bishopfox/cloudfox@latest # Verify installation cloudfox -h
Before running it, you need valid AWS credentials configured. CloudFox seamlessly uses your standard ~/.aws/credentials file or environment variables.
# Export the credentials you found during your initial access phase export AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE" export AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" export AWS_SESSION_TOKEN="OptionalSessionTokenIfUsingAssumeRole" # Or simply specify the AWS profile you want to use export AWS_PROFILE="compromised_account"
Realistic Usage Examples
Let's look at how a practitioner actually uses CloudFox in an authorized lab scenario.
1. The Blanket Approach: aws all-checks
When you first land in an account and have no idea what you are looking at, the all-checks command is your best friend. It runs every supported AWS enumeration module concurrently, drastically reducing the time you'd spend running individual AWS CLI commands.
# Run all enumeration checks against the specified profile cloudfox aws all-checks -p compromised_account
CloudFox drops all of its findings into an organized local directory (~/.cloudfox/). For every module, it generates a nicely formatted .txt table for human reading, and a .csv for programmatic parsing.
2. Hunting for Loot: aws instances and aws secrets
Instead of running aws ec2 describe-instances and drowning in JSON, you can use the instances module. It extracts only what matters to an attacker: instance IDs, internal/external IPs, attached security groups, and most importantly, attached IAM instance profiles.
# Find EC2 instances and their associated IAM roles cloudfox aws instances -p compromised_account
If you spot an EC2 instance with an IAM role that looks privileged (e.g., arn:aws:iam::123456789012:role/ProductionAdmin), that instance becomes a high-priority target for lateral movement.
Next, you can hunt for hardcoded credentials or sensitive data in AWS Secrets Manager and Systems Manager Parameter Store.
# List secrets and generate commands to retrieve them cloudfox aws secrets -p compromised_account
Note: CloudFox smartly avoids automatically retrieving the actual secret values by default, preventing you from generating massive audit logs that would alert defenders. Instead, it lists the secret names and provides you with the exact AWS CLI command needed to retrieve them manually.
3. Visualizing Attack Paths: aws permissions
One of CloudFox's most powerful features is how it handles IAM permissions. Evaluating IAM policies manually to find privilege escalation paths is notoriously difficult. CloudFox simplifies this.
cloudfox aws permissions -p compromised_account
This module evaluates the permissions of your current principal and identifies specific actions you can take (e.g., iam:PutUserPolicy, sts:AssumeRole) that could lead to full account takeover.
Strengths and Limitations
Strengths
- Built for Attackers: The output is tailored for human consumption during an active engagement. The inclusion of "copy-paste" exploitation commands in the output is a massive time-saver.
- Speed: Because it runs in Go and uses concurrent API requests, it is significantly faster than chaining bash scripts.
- Offline Analysis: By saving everything locally to
~/.cloudfox/, you can parse the results long after your credentials have been revoked.
Limitations
- Noise and API Throttling: Running
all-checkson a massive enterprise account can generate a lot of API traffic. Defenders utilizing sophisticated CloudTrail monitoring (like GuardDuty) will likely flag this rapid enumeration. - Maintenance: While actively maintained by Bishop Fox, cloud APIs change constantly. Always check the GitHub Issues to ensure the modules you are relying on haven't been broken by an AWS update.
Alternatives in the Cloud Recon Space
If CloudFox isn't fitting your specific workflow, you have a few other excellent options:
- Pacu: Developed by Rhino Security Labs, Pacu is an expansive AWS exploitation framework (think Metasploit for AWS). While CloudFox is purely for enumeration and awareness, Pacu has active exploitation modules.
- ScoutSuite: An auditing tool that generates beautiful HTML reports. It is better suited for compliance audits than rapid, terminal-based red teaming.
- Prowler: Another heavyweight security assessment tool, excellent for CIS benchmarking and defensive auditing.
Verdict and Ethics
If you perform cloud penetration testing, CloudFox belongs in your toolkit. It transforms the agonizing process of manual AWS enumeration into a quick, readable, and actionable workflow.
Ethics Reminder: As always, tools like CloudFox must only be used against infrastructure you own or have explicit, documented authorization to test. Unauthorized enumeration of cloud accounts violates terms of service and the law. If you want a safe environment to practice with CloudFox, Bishop Fox provides CloudFoxable, an intentionally vulnerable AWS environment designed specifically for learning these techniques.
References / Further reading
- Bishop Fox. "CloudFox Official GitHub Repository." GitHub, https://github.com/BishopFox/cloudfox.
- Bishop Fox. "CloudFox Tool Documentation." BishopFox, https://bishopfox.com/tools/cloudfox.
- Bishop Fox. "CloudFoxable: An Intentionally Vulnerable AWS Environment." GitHub, https://github.com/BishopFox/cloudfoxable.
- Bishop Fox. "Introducing CloudFox." BishopFox Blog, https://bishopfox.com/blog/introducing-cloudfox.


