Home

Awesome

Quick reference

What is Pacu?

Pacu is an open-source AWS exploitation framework, designed for offensive security testing against cloud environments. Created and maintained by Rhino Security Labs, Pacu allows penetration testers to exploit configuration flaws within an AWS account, using modules to easily expand its functionality. Current modules enable a range of attacks, including user privilege escalation, backdooring of IAM users, attacking vulnerable Lambda functions, and much more.

Installation

Pacu is a fairly lightweight program, as it requires only Python3.7+ and pip3 to install a handful of Python libraries.

Quick Installation

  > pip3 install -U pip
  > pip3 install -U pacu
  > pacu

For a more detailed and user-friendly set of user instructions, please check out the Wiki's installation guide.

How to use Pacu's Docker image

Try in PWD

Option 1: Run with default entrypoint which directly runs Pacu

$ docker run -it rhinosecuritylabs/pacu:latest

Option 2: Run without default entrypoint

$ docker run -it --entrypoint /bin/sh rhinosecuritylabs/pacu:latest

Option 3: Run with AWS config and credentials

Warning: Running this command will mount your local AWS configuration files into the Docker container when it is launched. This means that any user with access to the container will have access to your host computer's AWS credentials.

$ docker run -it -v ~/.aws:/root/.aws rhinosecuritylabs/pacu:latest

Getting Started

The first time Pacu is launched, you will be prompted to start and name a new session. This session will be used to store AWS key pairs, as well as any data obtained from running various modules. You can have any number of different sessions in Pacu, each with their own sets of AWS keys and data, and resume a session at any time (though a restart is currently required to switch between sessions).

Modules require an AWS key, which grants you minimal access to an AWS environment and is comprised of an access key ID and a secret access key. To set your session's keys, use the set_keys command, and then follow the prompts to supply a key alias (nickname for reference), an AWS access key ID, an AWS secret access key, and an AWS session token (if you are using one).

If you are ever stuck, help will bring up a list of available commands.

Basic Commands in Pacu

Running Pacu From the CLI

Pacu's Modular Power

Pacu uses a range of plug-in modules to assist an attacker in enumeration, privilege escalation, data exfiltration, service exploitation, and log manipulation within AWS environments. Contributions or ideas for new modules are welcome.

To keep pace with ongoing AWS product developments, we've designed Pacu from the ground up with extensibility in mind. A common syntax and data structure keep modules easy to build and expand on - no need to specify AWS regions or make redundant permission checks between modules. A local SQLite database is used to manage and manipulate retrieved data, minimizing API calls (and associated logs). Reporting and attack auditing is also built into the framework; Pacu assists the documentation process through command logging and exporting, helping build a timeline for the testing process.

Community

We're always happy to get bug reports in the Pacu framework itself, as well as testing and feedback on different modules, and generally, critical feedback to help refine the framework. Any support for Pacu through use, testing, improvement, or just by spreading the word, would be very much appreciated.

If you're interested in contributing directly to the Pacu Framework itself, please read our contribution guidelines for code conventions and git-flow notes.

Developing Pacu Modules

If you're interested in writing your own modules for Pacu, check out our Module Development wiki page. As you develop new capabilities please reach out to us -- we'd love to add your new modules into the core collection that comes with Pacu.

Pacu Framework Development Goals

Notes

Submitting Requests / Bug Reports

Wiki

For walkthroughs and full documentation, please visit the Pacu wiki.

Contact Us

Disclaimers, and the AWS Acceptable Use Policy