技能 aws-penetration-testing
🛡️

aws-penetration-testing

高风险 ⚙️ 外部命令🌐 网络访问📁 文件系统访问🔑 环境变量

執行 AWS 滲透測試與安全評估

組織需要針對真實世界攻擊技術驗證其 AWS 雲端安全態勢。本技能為經授權的安全團隊提供全面的技術方法,涵蓋 IAM 枚舉、SSRF 漏洞利用測試、S3 儲存桶評估及權限提升偵測。

支持: Claude Codex Code(CC)
⚠️ 57
1

下载技能 ZIP

2

在 Claude 中上传

前往 设置 → 功能 → 技能 → 上传技能

3

开启并开始使用

测试它

正在使用“aws-penetration-testing”。 枚舉目前 IAM 身分與權限

预期结果:

身分:arn:aws:iam::ACCOUNT:user/test-user
附加原則:AmazonS3ReadOnlyAccess、CloudWatchLogsReadOnly
內嵌原則:無
提升風險:低 — 未偵測到權限提升權限

正在使用“aws-penetration-testing”。 檢查 S3 儲存桶公開存取設定

预期结果:

儲存桶:company-assets
公開存取封鎖:已啟用
儲存桶原則:拒絕公開存取
ACL:Bucket-owner-enforced
狀態:安全 — 未識別到公開存取媒介

正在使用“aws-penetration-testing”。 測試中繼資料端點可存取性

预期结果:

IMDS 版本:IMDSv2 已啟用
需要權杖:是
中繼資料存取:受保護
狀態:安全 — IMDSv2 權杖要求可防止 SSRF 利用

安全审计

高风险
v1 • 2/24/2026

Static analysis detected 287 patterns across 2 files (881 lines). Most findings are FALSE POSITIVEs because files contain Markdown documentation (not executable code). However, content includes sensitive offensive security techniques (SSRF exploitation, privilege escalation, persistence mechanisms) requiring explicit authorization warnings. Recommend: publish with prominent authorization disclaimers and user acknowledgment requirements.

2
已扫描文件
881
分析行数
12
发现项
1
审计总数

高风险问题 (3)

SSRF to AWS Metadata Endpoint Documentation
Skill documents SSRF exploitation technique targeting AWS Instance Metadata Service (IMDS). While educational for authorized testing, this technique can extract IAM role credentials from compromised EC2 instances. Static analyzer correctly identified metadata endpoint patterns (169.254.169.254).
Privilege Escalation Techniques
Documents multiple AWS IAM privilege escalation paths including CreateAccessKey, AttachUserPolicy, and Lambda code injection. These are legitimate security testing techniques but require explicit authorization.
Credential Extraction Methods
Documents techniques for extracting credentials from Lambda environment variables, EBS volumes, and container metadata. Educational for defensive security but offensive in nature.
中风险问题 (3)
Static Analysis False Positives - External Commands
Static analyzer flagged 140 'external_commands' patterns. These are FALSE POSITIVEs - the patterns appear in Markdown code blocks (documentation), not executable scripts. Commands are educational examples for AWS CLI usage during authorized penetration testing.
Static Analysis False Positives - Cryptographic Patterns
Static analyzer flagged 'weak cryptographic algorithm' patterns. These are FALSE POSITIVEs - no actual cryptographic implementations exist. Pattern matches likely triggered on documentation text mentioning encryption concepts.
Static Analysis False Positives - C2/Malware Keywords
Static analyzer flagged 'C2 keywords' and 'malware type keywords'. These are FALSE POSITIVEs - terms like 'backdoor' appear in educational security context (e.g., 'Lambda Backdooring' as a technique to detect/test for). No actual malware or C2 infrastructure present.
低风险问题 (2)
Hardcoded URLs and IP Addresses
Static analyzer flagged hardcoded URLs and IP addresses. These are FALSE POSITIVEs - URLs are AWS service endpoints (s3.amazonaws.com), documentation references (github.com), or AWS metadata IPs (169.254.169.254) documented for educational purposes.
System Reconnaissance Commands
Static analyzer flagged reconnaissance patterns. These are standard AWS CLI commands (describe-instances, list-users) for authorized security auditing. Low risk in educational documentation context.

检测到的模式

AWS Credential Export PatternEBS Volume Mount for Credential ExtractionCloudTrail Disabling Techniques
审计者: claude

质量评分

41
架构
100
可维护性
87
内容
50
社区
0
安全
91
规范符合性

你能构建什么

授權紅隊行動

安全顧問對客戶 AWS 環境執行授權滲透測試,在惡意攻擊者利用之前識別設定錯誤與權限提升路徑。

雲端安全稽核

內部安全團隊針對已知攻擊技術評估組織的 AWS 安全態勢,以驗證防禦控制與監控能力。

安全研究與訓練

安全研究人員與學生在受控實驗室環境 (AWSGoat、CloudGoat) 中學習 AWS 攻擊技術,以提升防禦安全技能。

试试这些提示

基礎 IAM 枚舉
協助我枚舉目前 AWS 身分的 IAM 權限。我已取得授權存取,需要記錄此身分擁有的權限。從 sts get-caller-identity 開始,並顯示如何列出附加原則。
S3 儲存桶安全評估
我需要評估 S3 儲存桶設定的公開存取漏洞。請顯示 AWS CLI 命令以列出儲存桶、檢查儲存桶原則,並在我們的授權測試環境中識別可公開存取的物件。
SSRF 到中繼資料測試
我們正在測試 Web 應用程式是否存在可能存取 AWS 中繼資料端點的 SSRF 漏洞。請記錄 IMDSv1 和 IMDSv2 技術,以便我們驗證執行個體中繼資料保護控制正常運作。
權限提升路徑分析
分析我們已枚舉的 IAM 權限並識別潛在的權限提升路徑。檢查危險權限如 iam:CreateAccessKey、iam:AttachUserPolicy 和 lambda:UpdateFunctionCode,這些可能導致管理員存取。

最佳实践

  • 開始任何滲透測試活動前,務必取得書面授權,記錄範圍、系統及測試時間視窗
  • 測試開始前啟用 CloudTrail 記錄,並保留所有記錄供參與後分析與客戶報告使用
  • 使用專用的測試憑證,未經明確變更核准與復原程序,避免對生產環境進行測試

避免

  • 絕不測試授權範圍外的 AWS 資源 — 未經授權的存取違反電腦犯罪法律,即使出於善意
  • 勿永久停用安全控制 (CloudTrail、GuardDuty、Security Hub) — 臨時繞過必須記錄並還原
  • 行動完成後避免留下持續性後門或存取機制 — 所有測試產物必須在清理期間移除

常见问题

使用本技能前需要什麼授權?
您必須取得 AWS 帳戶擁有者的書面授權,記錄:特定帳戶/資源範圍、測試時間視窗、核准技術及緊急聯絡程序。未經授權的測試違反 AWS 可接受使用政策與電腦犯罪法律。
本技能可以自動執行 AWS 命令嗎?
不能。本技能提供 AWS CLI 命令的指導與文件。您必須使用自己的憑證在自己的終端機中手動執行命令。本技能無法直接存取您的 AWS 帳戶。
測試非我擁有的 AWS 服務是否合法?
不可以。您僅能測試您擁有或已獲得明確書面授權測試的 AWS 資源。AWS 在其可接受使用政策中禁止未經授權的滲透測試。如需測試 AWS 基礎設施,請聯絡 AWS Security 了解其滲透測試政策。
有效使用本技能需要什麼工具?
必要:已設定憑證的 AWS CLI、Python 3 及 boto3 程式庫。建議:Pacu (AWS 利用框架)、Prowler 或 ScoutSuite (安全稽核)、enumerate-iam (權限枚舉)。所有工具僅應在授權環境中使用。
如何防止測試期間產生 GuardDuty 警示?
滲透測試期間 GuardDuty 可能會產生警示。這是預期行為。與安全作業團隊協調以白名單測試活動,或暫時調整警示閾值。未經授權切勿停用 GuardDuty。
測試後需要進行什麼清理?
移除所有建立的資源 (IAM 使用者、存取金鑰、Lambda 函式、EC2 執行個體)。刪除任何後門程式碼或持續性機制。還原已修改的設定。記錄所有變更供客戶驗證。保留測試記錄供最終報告使用。