跳到正文
Skillpedia
通用编程35k · #7839

exploiting-aws-with-pacu

它能做什么

这个工具可以帮助测试 AWS 云账户的安全性。它会查找获取更多权限的途径(权限提升),还可以创建隐藏的访问入口,供你之后再次使用(持久化)。

适用场景

  • ✓当你在 AWS 账户上进行经过授权的安全测试时。
  • ✓当你想了解被盗凭证可能带来的危害时。
  • ✓当你想演示如何更好地保护账户免受未授权访问时。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-aws-with-pacu/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-aws-with-pacu/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“对我的 AWS 账户进行一次完整的安全测试,并告诉我是否存在薄弱环节。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会使用你的凭证连接到 AWS 账户,并检查所有权限。它会寻找已知的提权路径,还可以创建新的访问密钥或权限,以保持访问能力。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Exploiting AWS with Pacu

Legal Notice: This skill is for authorized penetration testing and educational purposes only. Pacu performs active enumeration, privilege escalation, persistence, and backdooring against live AWS accounts. Run it ONLY against accounts you own or have explicit written authorization (scope/Rules of Engagement) to test. Many modules create durable changes (new IAM users, access keys, policies); track and remove everything. Unauthorized use is illegal under the CFAA and equivalent laws.

Overview

Pacu is the open-source AWS exploitation framework from Rhino Security Labs. It is the cloud-pentest analogue of Metasploit: a modular Python console that manages target sessions, enumerates an AWS account, identifies privilege-escalation paths, and executes persistence/backdooring/exfiltration modules — all backed by a local SQLite database that records every enumerated resource so modules can chain off one another's findings.

A Pacu engagement follows a consistent arc. You create a named session, load AWS keys (with set_keys or by importing from ~/.aws/credentials), confirm the identity with whoami, then enumerate IAM and the rest of the account. The flagship workflow is iam__enum_permissions followed by iam__privesc_scan, which checks the compromised principal against ~20 known AWS IAM privilege-escalation primitives (e.g. iam:CreatePolicyVersion, iam:AttachUserPolicy, iam:PassRole + lambda:CreateFunction, sts:AssumeRole) and can auto-exploit them. Persistence modules such as iam__backdoor_users_keys mint a second access key on an existing user, and iam__backdoor_assume_role adds a trust to a role so the attacker can assume it later.

This skill covers installing Pacu, session and credential management, IAM enumeration, automated privilege-escalation scanning and exploitation, persistence/backdooring, and data access — every command and module name verified against the Rhino Security Labs project. Source: github.com/RhinoSecurityLabs/pacu.

When to Use

  • Conducting an authorized AWS cloud penetration test or red-team engagement
  • Assessing the blast radius of a single compromised IAM credential (privesc scanning)
  • Demonstrating persistence/backdoor techniques to drive remediation
  • Generating realistic attacker telemetry to test cloud detections (purple team)
  • Mapping an unfamiliar AWS account's IAM, EC2, S3, and Lambda exposure

Prerequisites

  • Pacu installed:
    python3 -m pip install -U pip
    python3 -m pip install -U pacu     # then run: pacu
    # or, preferred on Kali, with pipx:
    pipx install git+https://github.com/RhinoSecurityLabs/pacu.git
    # or Docker:
    docker run -it rhinosecuritylabs/pacu:latest
    
  • AWS access key/secret (and optional session token) for the in-scope target principal
  • A signed authorization / Rules of Engagement document defining scope
  • Python 3.9+ and outbound HTTPS to AWS API endpoints
  • AWS CLI installed for verification (aws sts get-caller-identity)

Objectives

  • Install Pacu and create an isolated engagement session
  • Load and validate target AWS credentials
  • Enumerate IAM permissions for the compromised principal
  • Identify and (where authorized) exploit privilege-escalation paths
  • Establish persistence via backdoor access keys and role trusts
  • Enumerate and access data in EC2, S3, and Secrets Manager
  • Export findings for reporting and ensure all artifacts are removed

MITRE ATT&CK Mapping

ID Name Use in this skill
T1078.004 Valid Accounts: Cloud Accounts Pacu operates as a valid AWS principal and abuses its permissions
T1098.001 Account Manipulation: Additional Cloud Credentials iam__backdoor_users_keys mints a second access key
T1098.003 Account Manipulation: Additional Cloud Roles iam__backdoor_assume_role / privesc via role policy changes
T1580 Cloud Infrastructure Discovery ec2__enum, iam__enum_users_roles_policies_groups
T1530 Data from Cloud Storage s3__download_bucket retrieves S3 objects
T1552.005 Unsecured Credentials: Cloud Instance Metadata API EC2 IMDS credential abuse

Workflow

1. Launch Pacu and create a session

pacu
# In the Pacu console:
Pacu> set_keys
#   key alias  : engagement-target
#   access key : AKIA...
#   secret key : ...
#   session tok: (optional)

2. Confirm the identity you are operating as

Pacu> whoami

…
常见问题

使用这个工具需要获得许可吗?

需要。你只能对自己拥有或已获得明确书面授权测试的 AWS 账户使用这个工具。未经许可使用属于违法行为。

什么是“权限提升”?

指权限有限的用户或程序设法获得超出其应有范围的权限,比如一名普通员工获得了主管的文件访问权限。

这里的“持久化”是什么意思?

指建立一种途径,即使原始凭证被发现或被撤销,仍能保持对 AWS 账户的访问,好比故意留下一扇“后门”。

详情

作者的原始描述

Runs the Pacu AWS exploitation framework end-to-end — session and credential setup, IAM enumeration, automated privilege-escalation scanning via iam__privesc_scan, and persistence/backdooring modules like iam__backdoor_users_keys. Use for authorized AWS penetration tests or red-team engagements, assessing blast radius from a compromised IAM credential, or generating attacker telemetry for purple-t

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#7839
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能