performing-cloud-penetration-testing-with-pacu

Warn

Audited by Gen Agent Trust Hub on Sep 15, 2026

Risk Level: MEDIUMCOMMAND_EXECUTIONPRIVILEGE_ESCALATIONDATA_EXFILTRATIONPERSISTENCEEXTERNAL_DOWNLOADSINDIRECT_PROMPT_INJECTIONCREDENTIALS_UNSAFE
Full Analysis
  • [COMMAND_EXECUTION]: The scripts/agent.py file utilizes subprocess.run to execute the pacu command-line interface. This allows the agent to trigger various offensive security modules within the local environment.
  • [PRIVILEGE_ESCALATION]: A core feature of this skill is the identification and exploitation of AWS IAM privilege escalation paths. SKILL.md provides detailed instructions for using Pacu's iam__privesc_scan module with the --escalate flag to gain administrative access.
  • [DATA_EXFILTRATION]: The skill includes automated routines and manual instructions for enumerating and downloading sensitive data from S3, Secrets Manager, and SSM. The results, potentially containing sensitive cloud configuration and data, are saved to unencrypted local JSON files.
  • [PERSISTENCE]: The skill documents the use of Pacu modules designed to establish long-term access to an AWS account, such as creating backdoor IAM access keys (iam__backdoor_users_keys) or modifying Lambda function code to maintain a foothold.
  • [EXTERNAL_DOWNLOADS]: The skill relies on the installation of the pacu framework via pip and references external documentation and code hosted on GitHub by Rhino Security Labs. While these are recognized tools in the security industry, they represent an external dependency chain.
  • [CREDENTIALS_UNSAFE]: The skill facilitates the export of AWS session data and discovered keys to local files (export_keys --all), which increases the risk of credential exposure if the local environment is not properly secured.
  • [INDIRECT_PROMPT_INJECTION]: The scripts/agent.py script processes responses from AWS APIs—such as policy documents, user lists, and role names—which are then interpolated into text reports and CLI arguments without explicit sanitization.
  • Ingestion points: Data ingested from iam.get_paginator, iam.get_policy, and sts.get_caller_identity in scripts/agent.py.
  • Boundary markers: No delimiters or warnings are used when processing API outputs in the report generation logic.
  • Capability inventory: File writing (JSON report), network access (boto3/AWS APIs), and command execution (Pacu CLI).
  • Sanitization: The script lacks validation or sanitization for strings returned by the cloud provider before inclusion in reports or commands.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 15, 2026, 02:41 AM