hunt-source-leak
Skill này làm gì
Công cụ này tìm kiếm thông tin nhạy cảm có thể đã vô tình bị lộ trên website. Nó tìm các file chứa mã nguồn, bí mật như mật khẩu và khóa API, hoặc thông tin về cách API của trang hoạt động.
Khi nào nên dùng
- ✓Khi bạn là chuyên gia bảo mật đang kiểm tra khả năng bảo vệ của một website.
- ✓Khi bạn kiểm tra xem thông tin bí mật có bị lộ trên website hay không.
- ✓Trong các môi trường kiểm thử có kiểm soát để hiểu cách thông tin bị lộ.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/hunt-source-leak/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
“Tìm rò rỉ mã nguồn và bí mật trên example.com”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ thử truy cập các đường dẫn phổ biến nơi có thể chứa thông tin nhạy cảm. Nó kiểm tra các file như “.env” (có thể chứa mật khẩu), “.js.map” (có thể tiết lộ toàn bộ mã nguồn) và “swagger.json” (mô tả API).
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.
⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.
Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
- Ask the user to state the exact target URL, IP, account, or resource.
- Ask the user to confirm written authorization and the permitted scope.
- Show the exact command(s) and explain their expected effect.
- Wait for explicit confirmation in the current conversation.
Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
HUNT-SOURCE-LEAK — Source Code & Build Artifact Leakage
Crown Jewel Targets
Source map exposing TypeScript source = see all API routes, auth logic, secrets. Swagger/OpenAPI JSON = complete API surface map.
Highest-value findings:
.js.mapsource maps — reconstruct full TypeScript/ES6 source code → find hardcoded API keys, internal endpoints, auth logic bypassesswagger.json/openapi.json— complete REST API specification with all endpoints, parameters, auth schemes, and internal route names.env/.env.production— APP_KEY, DB_PASSWORD, API_KEY, SECRET_KEY in plaintext.git/exposure —git clonethe entire source history → all past hardcoded secretsasset-manifest.json/_next/static/— all JS bundle paths → systematic source map discoverybuild-info/info.json— git commit hash, build timestamp, dependency versions → CVE targeting
Phase 1 — Quick Wins (Run First)
# These 10 requests take <30 seconds and often yield Critical findings
for PATH in \
"/.env" \
"/.env.production" \
"/.env.local" \
"/.git/HEAD" \
"/swagger.json" \
"/api/swagger.json" \
"/v1/swagger.json" \
"/openapi.json" \
"/api/openapi.json" \
"/api-docs"; do
STATUS=$(curl -s -o /tmp/sl_test -w "%{http_code}" "https://$TARGET$PATH")
if [ "$STATUS" = "200" ]; then
echo "[+] HIT: https://$TARGET$PATH"
head -5 /tmp/sl_test
echo "---"
fi
done
Phase 2 — Source Map Discovery
Always resolve the CURRENT build hash before testing, and again before re-verifying. Bundle filenames are content-hashed, so they rotate on every deploy. A
.mapURL recorded yesterday can 404 today while the map is still fully exposed under a new name. A 404 at the old URL is not remediation — it is a new build.# ALWAYS derive the hash live, never reuse a recorded URL HASH=$(curl -s "https://$TARGET/" | grep -oE 'main\.[a-f0-9]+\.js' | head -1) curl -s -o /dev/null -w '%{http_code} %{size_download} %{content_type}\n' \ "https://$TARGET/static/js/${HASH}.map"Lesson from an authorized engagement. A large production map was found at
main.<hashA>.js.map. On re-verification that URL returned a small HTML soft-404 and the finding was nearly closed as fixed. The bundle had rotated tomain.<hashB>.js— and the map was still published atmain.<hashB>.js.map, same size. Nothing had been remediated.Tell the client this explicitly in the report: redeploying does not fix source map exposure. Only
GENERATE_SOURCEMAP=false(or stripping.mapat deploy) plus a CDN purge closes it. A team that redeploys and re-checks the old link will wrongly declare victory.Same rule applies to any content-hashed artifact: chunk files, CSS maps,
asset-manifest.json, and staging equivalents.
# Step 1: Get asset manifest to find all JS bundle paths
curl -s "https://$TARGET/asset-manifest.json" | python3 -m json.tool 2>/dev/null
curl -s "https://$TARGET/static/js/main.*.js" 2>/dev/null | head -3
# Next.js
BUILD_ID=$(curl -s https://$TARGET/ | grep -oP '"buildId":"\K[^"]+')
curl -s "https://$TARGET/_next/static/$BUILD_ID/_buildManifest.js" | head -5
# Step 2: For each JS bundle, check for source map reference at end of file
for JS_URL in $(curl -s https://$TARGET/ | grep -oP 'src="[^"]*\.js"' | sed 's/src="//;s/"//'); do
LAST_LINE=$(curl -s "https://$TARGET$JS_URL" | tail -1)
echo "$LAST_LINE" | grep -q "sourceMappingURL" && echo "[+] Source map: $JS_URL"
done
# Step 3: Download and reconstruct source from .map files
…
Câu hỏi thường gặp
File “.js.map” là gì và tại sao nguy hiểm?
Đây là các file giúp trình duyệt gỡ lỗi mã JavaScript. Tuy nhiên, chúng có thể được dùng để tái tạo mã nguồn gốc (TypeScript/ES6), từ đó có thể lộ các bí mật như khóa API và logic nội bộ.
“swagger.json” hoặc “openapi.json” là gì?
Đây là các file mô tả cách một API hoạt động. Chúng liệt kê tất cả các “điểm truy cập” (endpoint), dữ liệu mà chúng cần và kết quả trả về, có thể làm lộ các đường dẫn nội bộ và chi tiết xác thực.
Tôi có thể dùng công cụ này trên bất kỳ website nào không?
Không. Công cụ này chỉ dành cho mục đích học tập hoặc đánh giá bảo mật có ủy quyền. Bạn phải có sự cho phép rõ ràng, bằng văn bản, từ chủ hệ thống trước khi dùng. Sử dụng sai là vi phạm pháp luật.
Chi tiết
Mô tả gốc của tác giả
Hunt source code and build artifact leakage
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #4901
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
graincrawl
394kCho phép agent của bạn tìm trong ghi chú cuộc họp và bản chép lời Granola đã lưu, kiểm tra độ mới và đếm số cuộc họp trong một khoảng thời gian.
notcrawl
394kCho phép agent của bạn tìm trong bản sao đã lưu của workspace Notion, tra cứu trang và database, rồi xuất trang ra file Markdown.
knowledge-entities
394kGiúp agent của bạn xác định người, công ty và dự án, rồi viết trang hồ sơ có nguồn cho họ trong kho Knowledge của bạn.