CFS275 Ethical Hacking · Chapter 10 · Cloud Audit Tools

Pacu and Prowler: Two Cloud Security Tool Simulators

simulated · offline

Pacu: the AWS exploitation framework

Pacu is to Amazon Web Services (AWS) what Metasploit is to a network: a modular framework you drive from a console, loading one module at a time to enumerate, escalate, and persist in a cloud account you have compromised. Just as Metasploit organizes its module tree into auxiliary, exploit, and post, Pacu groups its modules by category (ENUM, ESCALATE, EXFIL, PERSIST, and more), so you browse and search for the one you need the same way.

Authorized testing only

This terminal is a simulation. It does not connect to AWS, and the keys are fabricated and authenticate nowhere. Pacu is an offensive tool; run it only against accounts you are contracted and authorized to test.

Watch the double underscore

Every module name joins the service to the action with two underscores, not one: iam__enum_permissions, s3__download_bucket, ec2__enum. A single underscore between the service and the action is the most common typo here. Press Tab to let the console complete the name and avoid it.

The key you recovered

Load this fabricated key with set_keys when prompted (alias, access key ID, secret, then press Enter to skip the session token):

alias: leaked-dev
access key id: AKIAEXAMPLE275CFS000
secret: cfs275EXAMPLEsecretKEYsimulatedDoNotUse01

Work through these

0 of 10
Try it
help

List the Pacu console commands, the same way help works in msfconsole.

Try it
set_keys

Load the recovered key into the session. Enter the alias, access key ID, and secret from the box above, then press Enter to skip the session token.

Try it
whoami

Show the active key and the principal it belongs to.

Try it
ls

List modules grouped by category. This is the Pacu equivalent of browsing the Metasploit module tree.

Try it
run iam__enum_permissions

Run the enumeration module to confirm what this key can do. Collected data is stored in the session.

Try it
run iam__privesc_scan --scan-only

Scan for privilege escalation paths the confirmed permissions make possible, without exploiting them.

Try it
run ec2__enum

Enumerate the compute surface. The module flags a security group that exposes SSH (port 22) to the whole internet.

Try it
run s3__download_bucket --bucket-name verdantcart-db-backups

Exfiltrate data. This module takes an argument, the way a Metasploit module takes options. It copies the readable backup objects to the session loot directory.

Try it
run iam__backdoor_users_keys

Establish persistence. The module adds a second access key to the user so access survives rotation of the leaked key. This is the same backdoor idea from the credential walkthrough, run from the framework instead of by hand.

Try it
data

Show the data collected in this session so far, the way you would review loot and creds in Metasploit.

More to explore on your own: search iam, help iam__privesc_scan, run iam__enum_users_roles_policies_groups, run secretsmanager__enum, services.

Checkpoints

0 of 5

Answer these from what the console actually showed you.

Pacu console

simulated · offline

Enter runs a command. Tab autocompletes. Up and down arrows recall history.

Pacu console commands

helpList commands.
set_keysLoad an AWS access key into the session.
whoamiShow the active key and principal.
ls / listList modules grouped by category.
search <text>Find modules by name.
help <module>Show a module's description and arguments.
run <module> [--args]Run a module (alias: exec).
dataShow data collected in the session.
servicesShow AWS services with collected data.
exit / quitLeave the console (simulated).

Shell and Prowler commands

aws configureStore an access key so Prowler can use it.
prowler awsRun all AWS checks against the configured account.
prowler aws --services <s>Scope to one or more services (iam, s3, ec2, ...).
prowler aws --severity <lvl>Filter by critical, high, medium, or low.
prowler aws -c <check_id>Run one named check.
prowler aws --list-servicesList services Prowler can scan.
prowler aws --list-checksList check IDs.
prowler aws -M <fmt>Write a report (csv, html, json-ocsf).
prowler --versionShow the Prowler version.
clearClear the screen.

Score report

Enter your name as you want it to appear, then create your report to submit.