performing-cloud-penetration-testing-with-pacu
Skill này làm gì
Pacu là công cụ kiểm tra bảo mật của tài khoản đám mây Amazon Web Services (AWS). Nó giúp tìm các điểm yếu bảo mật, như quyền quá rộng hoặc truy cập dữ liệu nhạy cảm, bằng cách mô phỏng các cuộc tấn công đã được cho phép.
Khi nào nên dùng
- ✓Khi thực hiện kiểm thử xâm nhập được cho phép trong môi trường AWS.
- ✓Khi cần kiểm tra xem các quy tắc phân quyền (chính sách IAM) có hoạt động đúng không.
- ✓Khi cần đánh giá mức độ ảnh hưởng của thông tin đăng nhập AWS bị lộ.
Liên kết skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-cloud-penetration-testing-with-pacu/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn kiểm tra bảo mật tài khoản AWS để xem người có quyền hạn chế có thể nâng quyền hoặc truy cập dữ liệu riêng tư không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Bạn cung cấp thông tin đăng nhập kiểm thử cho Pacu, sau đó công cụ chạy nhiều lệnh để khám phá cấu hình tài khoản AWS của bạn. Nó tìm các đường đi mà kẻ tấn công có thể dùng để giành thêm quyền kiểm soát hoặc truy cập thông tin.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Performing Cloud Penetration Testing with Pacu
When to Use
- When conducting authorized penetration testing of AWS environments
- When validating the effectiveness of IAM policies, SCPs, and permission boundaries
- When assessing the blast radius of a compromised set of AWS credentials
- When testing detection capabilities of GuardDuty, Security Hub, and custom alerting
- When building red team exercises against AWS cloud infrastructure
Do not use for unauthorized testing of any AWS account, for testing AWS infrastructure itself (covered by shared responsibility), for DDoS or volumetric attacks without AWS approval, or for production account testing without explicit authorization and breakglass procedures.
Prerequisites
- Written authorization from the AWS account owner with defined scope and rules of engagement
- Pacu v1.5+ installed (
pip install pacu) - Test AWS credentials with limited starting permissions (simulates compromised credential scenario)
- CloudTrail logging enabled to capture all Pacu activity for post-engagement review
- GuardDuty enabled to validate detection of Pacu activities
- Emergency contact and rollback procedures documented
Workflow
Step 1: Initialize Pacu Session and Configure Credentials
Set up a Pacu session with the test credentials and define the engagement scope.
# Install Pacu
pip install pacu
# Start Pacu
pacu
# Create a new session for the engagement
Pacu > set_keys --key-alias pentest-target
# Enter Access Key ID: AKIA...
# Enter Secret Access Key: ...
# Verify identity
Pacu > whoami
# Review available modules
Pacu > list
Pacu > search iam
Pacu > search ec2
Pacu > search s3
Step 2: Enumerate IAM Configuration
Run IAM enumeration modules to map users, roles, policies, and group memberships.
# Comprehensive IAM enumeration
Pacu > run iam__enum_users_roles_policies_groups
# Enumerate detailed permissions for the current principal
Pacu > run iam__enum_permissions
# Enumerate account authorization details (requires iam:GetAccountAuthorizationDetails)
Pacu > run iam__get_credential_report
# Enumerate role trust policies for cross-account access
Pacu > run iam__enum_roles
# Check current session data
Pacu > data iam
Step 3: Scan for Privilege Escalation Paths
Use Pacu's privilege escalation scanner to identify all exploitable escalation vectors.
# Run the privilege escalation scanner
Pacu > run iam__privesc_scan
# The scanner tests for 21+ escalation methods:
# Method 1: iam:CreatePolicyVersion
# Method 2: iam:SetDefaultPolicyVersion
# Method 3: iam:PassRole + ec2:RunInstances
# Method 4: iam:PassRole + lambda:CreateFunction + lambda:InvokeFunction
# Method 5: iam:PassRole + lambda:CreateFunction + lambda:CreateEventSourceMapping
# Method 6: iam:PassRole + glue:CreateDevEndpoint
# Method 7: iam:PassRole + cloudformation:CreateStack
# Method 8: iam:PassRole + datapipeline:CreatePipeline
# Method 9: iam:CreateAccessKey
# Method 10: iam:CreateLoginProfile
# Method 11: iam:UpdateLoginProfile
# Method 12: iam:AttachUserPolicy
# Method 13: iam:AttachGroupPolicy
# Method 14: iam:AttachRolePolicy
# Method 15: iam:PutUserPolicy
# Method 16: iam:PutGroupPolicy
# Method 17: iam:PutRolePolicy
# Method 18: iam:AddUserToGroup
# Method 19: iam:UpdateAssumeRolePolicy
# Method 20: sts:AssumeRole
# Method 21: lambda:UpdateFunctionCode
# If escalation paths found, attempt exploitation
Pacu > run iam__privesc_scan --escalate
Step 4: Enumerate and Test Data Access
Discover accessible data stores including S3, DynamoDB, RDS, and Secrets Manager.
# Enumerate S3 buckets
Pacu > run s3__bucket_finder
# Download S3 bucket data for analysis
Pacu > run s3__download_bucket --bucket target-bucket --dl-names
# Enumerate EC2 instances and extract user data
Pacu > run ec2__enum
Pacu > run ec2__download_userdata
# Enumerate Lambda functions and check for secrets in environment variables
Pacu > run lambda__enum
# Enumerate Secrets Manager
Pacu > run secretsmanager__enum
# Enumerate SSM parameters (often contain secrets)
Pacu > run ssm__download_parameters
# Check for exposed EBS snapshots
Pacu > run ebs__enum_snapshots_unauth
Step 5: Test Lateral Movement and Persistence
Evaluate cross-account access, service exploitation, and persistence mechanisms.
# Test cross-account role assumption
Pacu > run sts__assume_role --role-arn arn:aws:iam::TARGET:role/CrossAccountRole
…
Câu hỏi thường gặp
Kiểm thử xâm nhập là gì?
Đó là bài kiểm tra bảo mật có sự cho phép nhằm tìm lỗ hổng trước khi hacker độc hại tìm thấy.
Thông tin đăng nhập AWS là gì?
Đó giống như tên người dùng và mật khẩu để truy cập Amazon Web Services.
Leo thang đặc quyền (privilege escalation) là gì?
Đó là khi kẻ tấn công có quyền hạn chế giành được quyền cao hơn, giống như một nhân viên thường được cấp quyền quản trị viên.
Chi tiết
Mô tả gốc của tác giả
Run authorized AWS penetration tests with Pacu, the open-source AWS exploitation framework, to enumerate IAM configuration, scan for privilege escalation paths, and test data access and lateral movement using compromised credentials. Use when conducting authorized red-team assessments of AWS environments, validating IAM policies and SCPs, or determining the blast radius of compromised AWS credenti
Độ phổ biến
- Sao GitHub
- 35k
- Vị trí xếp hạng
- #8205
- Giấy phép
- Apache-2.0
- Cập nhật
- 31/8/2026
Bình luận
- …
Thêm skill từ kho mã này
abusing-dpapi-for-credential-access
35kCung cấp cho agent AI của bạn hướng dẫn có sẵn cho một tác vụ cụ thể, giúp nó làm việc tốt hơn và nhanh hơn.
abusing-shadow-credentials-for-privesc
35kDạy agent AI của bạn viết văn bản rõ ràng và có cấu trúc tốt.
achieving-cmmc-level-2-compliance
35kGiúp agent của bạn chuẩn bị môi trường để tuân thủ CMMC Level 2. Triển khai các yêu cầu bảo mật và quản lý tài liệu cần thiết.
acquiring-disk-image-with-dd-and-dcfldd
35kGiúp agent của bạn tạo bản sao chính xác của ổ đĩa. Cách này đảm bảo không mất hay thay đổi thông tin trong quá trình điều tra.
Skill tương tự
test-driven-development
311kDạy agent của bạn viết kiểm thử thất bại trước, xem nó thất bại, rồi viết đoạn mã ngắn nhất để vượt qua trước khi làm bất kỳ tính năng hay bản sửa nào.
verification-before-completion
311kDạy agent của bạn chạy kiểm tra thực tế và đọc kết quả đầu ra trước khi khẳng định một việc, bản sửa hoặc bản build đã hoàn thành hay vượt qua.
migrate-to-shoehorn
310kThay các ép kiểu rủi ro trong tệp kiểm thử bằng thư viện shoehorn, để các bài kiểm thử dùng dữ liệu một phần vẫn qua được kiểm tra kiểu.