[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6P68KBJGDJNCGSYKRHD3VAK":3,"skill-same:01M6P68KBJGDJNCGSYKRHD3VAK":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":31,"commitSha":50,"skillDirectory":51,"forksCount":13,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":54,"install":55,"resources":68},"01M6P68KBJGDJNCGSYKRHD3VAK","hunt-source-leak",null,"Hunt source code and build artifact leakage","duc-duy-1612\u002FOnline-Delivery-Systems-Web","duc-duy-1612","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F192231384?v=4","01M6NSDKQQDKVTHZ8DZMZ1VYY6","01M6NSDKW8DDVTQHBT1HBDDJPT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fhunt-source-leak\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"source","hunt source leak","hunt","commands","source code","for","relevant","helper","offensive","scripts","scope","testing","artifact","main","community","only","Tools","license","code","security","2026-11-10 10:12:30",false,"---\nname: hunt-source-leak\ndescription: Hunt source code and build artifact leakage\ncategory: security\nrisk: offensive\nsource: https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter\nsource_repo: elementalsouls\u002FClaude-BugHunter\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires explicit written authorization for a target scope plus the\n  relevant testing tools for this technique. Docs-only; helper scripts and commands\n  not bundled.\nsources: hackerone_public, offensive_research\nreport_count: 7\n---\n> **⚠️ AUTHORIZED USE ONLY**\n> This skill is for educational purposes or authorized security assessments only.\n> You must have explicit, written permission from the system owner before using this tool.\n> Misuse of this tool is illegal and strictly prohibited.\n\n> **Mandatory confirmation gate**\n> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:\n> 1. Ask the user to state the exact target URL, IP, account, or resource.\n> 2. Ask the user to confirm written authorization and the permitted scope.\n> 3. Show the exact command(s) and explain their expected effect.\n> 4. Wait for explicit confirmation in the current conversation.\n>\n> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.\n\n# HUNT-SOURCE-LEAK — Source Code & Build Artifact Leakage\n\n## Crown Jewel Targets\n\nSource map exposing TypeScript source = see all API routes, auth logic, secrets. Swagger\u002FOpenAPI JSON = complete API surface map.\n\n**Highest-value findings:**\n- **`.js.map` source maps** — reconstruct full TypeScript\u002FES6 source code → find hardcoded API keys, internal endpoints, auth logic bypasses\n- **`swagger.json` \u002F `openapi.json`** — complete REST API specification with all endpoints, parameters, auth schemes, and internal route names\n- **`.env` \u002F `.env.production`** — APP_KEY, DB_PASSWORD, API_KEY, SECRET_KEY in plaintext\n- **`.git\u002F` exposure** — `git clone` the entire source history → all past hardcoded secrets\n- **`asset-manifest.json` \u002F `_next\u002Fstatic\u002F`** — all JS bundle paths → systematic source map discovery\n- **`build-info` \u002F `info.json`** — git commit hash, build timestamp, dependency versions → CVE targeting\n\n---\n\n## Phase 1 — Quick Wins (Run First)\n\n```bash\n# These 10 requests take \u003C30 seconds and often yield Critical findings\nfor PATH in \\\n  \"\u002F.env\" \\\n  \"\u002F.env.production\" \\\n  \"\u002F.env.local\" \\\n  \"\u002F.git\u002FHEAD\" \\\n  \"\u002Fswagger.json\" \\\n  \"\u002Fapi\u002Fswagger.json\" \\\n  \"\u002Fv1\u002Fswagger.json\" \\\n  \"\u002Fopenapi.json\" \\\n  \"\u002Fapi\u002Fopenapi.json\" \\\n  \"\u002Fapi-docs\"; do\n  STATUS=$(curl -s -o \u002Ftmp\u002Fsl_test -w \"%{http_code}\" \"https:\u002F\u002F$TARGET$PATH\")\n  if [ \"$STATUS\" = \"200\" ]; then\n    echo \"[+] HIT: https:\u002F\u002F$TARGET$PATH\"\n    head -5 \u002Ftmp\u002Fsl_test\n    echo \"---\"\n  fi\ndone\n```\n\n---\n\n## Phase 2 — Source Map Discovery\n\n> **Always resolve the CURRENT build hash before testing, and again before\n> re-verifying.** Bundle filenames are content-hashed, so they rotate on every\n> deploy. A `.map` URL recorded yesterday can 404 today while the map is still\n> fully exposed under a new name. **A 404 at the old URL is not remediation** —\n> it is a new build.\n>\n> ```bash\n> # ALWAYS derive the hash live, never reuse a recorded URL\n> HASH=$(curl -s \"https:\u002F\u002F$TARGET\u002F\" | grep -oE 'main\\.[a-f0-9]+\\.js' | head -1)\n> curl -s -o \u002Fdev\u002Fnull -w '%{http_code} %{size_download} %{content_type}\\n' \\\n>   \"https:\u002F\u002F$TARGET\u002Fstatic\u002Fjs\u002F${HASH}.map\"\n> ```\n>\n> **Lesson from an authorized engagement.** A large production map was found at\n> `main.\u003ChashA>.js.map`. On re-verification that URL returned a small HTML\n> soft-404 and the finding was nearly closed as fixed. The bundle had rotated to\n> `main.\u003ChashB>.js` — and the map was still published at `main.\u003ChashB>.js.map`,\n> same size. Nothing had been remediated.\n>\n> Tell the client this explicitly in the report: **redeploying does not fix source\n> map exposure.** Only `GENERATE_SOURCEMAP=false` (or stripping `.map` at deploy)\n> plus a CDN purge closes it. A team that redeploys and re-checks the old link\n> will wrongly declare victory.\n>\n> Same rule applies to any content-hashed artifact: chunk files, CSS maps,\n> `asset-manifest.json`, and staging equivalents.\n\n```bash\n# Step 1: Get asset manifest to find all JS bundle paths\ncurl -s \"https:\u002F\u002F$TARGET\u002Fasset-manifest.json\" | python3 -m json.tool 2>\u002Fdev\u002Fnull\ncurl -s \"https:\u002F\u002F$TARGET\u002Fstatic\u002Fjs\u002Fmain.*.js\" 2>\u002Fdev\u002Fnull | head -3\n\n# Next.js\nBUILD_ID=$(curl -s https:\u002F\u002F$TARGET\u002F | grep -oP '\"buildId\":\"\\K[^\"]+')\ncurl -s \"https:\u002F\u002F$TARGET\u002F_next\u002Fstatic\u002F$BUILD_ID\u002F_buildManifest.js\" | head -5\n\n# Step 2: For each JS bundle, check for source map reference at end of file\nfor JS_URL in $(curl -s https:\u002F\u002F$TARGET\u002F | grep -oP 'src=\"[^\"]*\\.js\"' | sed 's\u002Fsrc=\"\u002F\u002F;s\u002F\"\u002F\u002F'); do\n  LAST_LINE=$(curl -s \"https:\u002F\u002F$TARGET$JS_URL\" | tail -1)\n  echo \"$LAST_LINE\" | grep -q \"sourceMappingURL\" && echo \"[+] Source map: $JS_URL\"\ndone\n\n# Step 3: Download and reconstruct source from .map files\nJS_URL=\"https:\u002F\u002F$TARGET\u002Fstatic\u002Fjs\u002Fmain.abc123.js\"\nMAP_URL=\"${JS_URL}.map\"\ncurl -s \"$MAP_URL\" | python3 -c \"\nimport sys, json, os\ndata = json.load(sys.stdin)\nsources = data.get('sources', [])\ncontents = data.get('sourcesContent', [])\nfor i, (src, content) in enumerate(zip(sources, contents)):\n    if content:\n        path = '\u002Ftmp\u002Fsourcemap_extract\u002F' + src.replace('..\u002F','').replace('.\u002F',''). replace('webpack:\u002F\u002F','')\n        os.makedirs(os.path.dirname(path), exist_ok=True)\n        with open(path, 'w') as f:\n            f.write(content)\n        print(f'[+] Extracted: {src}')\n\"\n\n# Step 4: Grep extracted source for secrets\ngrep -r \"API_KEY\\|SECRET\\|PASSWORD\\|TOKEN\\|PRIVATE\" \u002Ftmp\u002Fsourcemap_extract\u002F 2>\u002Fdev\u002Fnull\ngrep -r \"process\\.env\\.\" \u002Ftmp\u002Fsourcemap_extract\u002F 2>\u002Fdev\u002Fnull | grep -v \"NEXT_PUBLIC_\" | head -20\ngrep -r \"http:\u002F\u002Finternal\\|localhost\\|127\\.0\\.0\\.1\\|10\\.\\|172\\.\\|192\\.168\" \u002Ftmp\u002Fsourcemap_extract\u002F 2>\u002Fdev\u002Fnull | head -20\n```\n\n---\n\n## Phase 3 — Swagger \u002F OpenAPI Discovery\n\n```bash\n# Common paths\nSWAGGER_PATHS=(\n  \"\u002Fswagger.json\" \"\u002Fswagger.yaml\" \"\u002Fswagger\u002F\"\n  \"\u002Fapi\u002Fswagger.json\" \"\u002Fapi\u002Fswagger.yaml\"\n  \"\u002Fv1\u002Fswagger.json\" \"\u002Fv2\u002Fswagger.json\" \"\u002Fv3\u002Fswagger.json\"\n  \"\u002Fopenapi.json\" \"\u002Fopenapi.yaml\"\n  \"\u002Fapi\u002Fopenapi.json\" \"\u002Fapi-docs\" \"\u002Fapi-docs.json\"\n  \"\u002Fapi\u002Fv1\u002Fswagger.json\" \"\u002Fapi\u002Fv2\u002Fswagger.json\"\n  \"\u002Frest\u002Fswagger.json\" \"\u002Frest\u002Fapi-docs\"\n  \"\u002F.well-known\u002Fopenapi.json\"\n  \"\u002Fgraphql\u002Fschema.json\"\n)\n\nfor PATH in \"${SWAGGER_PATHS[@]}\"; do\n  STATUS=$(curl -s -o \u002Ftmp\u002Fswagger_test -w \"%{http_code}\" \"https:\u002F\u002F$TARGET$PATH\")\n  if [ \"$STATUS\" = \"200\" ]; then\n    echo \"[+] Found: https:\u002F\u002F$TARGET$PATH\"\n    # Extract all API paths from swagger\n    python3 -c \"\nimport sys, json\ntry:\n    d = json.load(open('\u002Ftmp\u002Fswagger_test'))\n    paths = list(d.get('paths', {}).keys())\n    print(f'Endpoints: {len(paths)}')\n    print('\\n'.join(sorted(paths)))\nexcept: pass\n\" | head -50\n  fi\ndone\n```\n\n---\n\n## Phase 4 — .git Exposure\n\n```bash\n# Check if .git directory is accessible\ncurl -s \"https:\u002F\u002F$TARGET\u002F.git\u002FHEAD\" | grep -q \"ref:\" && echo \"[+] .git exposed!\"\n\n# If exposed, reconstruct repo\n# Tool: git-dumper\npip3 install git-dumper\ngit-dumper \"https:\u002F\u002F$TARGET\u002F.git\u002F\" \u002Ftmp\u002Fdumped-repo\u002F\n\n# Grep for secrets in all git history\ncd \u002Ftmp\u002Fdumped-repo && \\\n  git log --all --oneline 2>\u002Fdev\u002Fnull | head -20\n  git grep -i \"password\\|secret\\|api_key\\|token\" $(git rev-list --all) 2>\u002Fdev\u002Fnull | head -30\n\n# trufflehog on git history\ntrufflehog git file:\u002F\u002F\u002Ftmp\u002Fdumped-repo\u002F 2>\u002Fdev\u002Fnull | head -50\n```\n\n---\n\n## Phase 5 — Forgotten Files & Debug Endpoints\n\n```bash\n# Build artifacts and debug files\nDEBUG_PATHS=(\n  \"\u002Fbuild-info.json\" \"\u002Fbuild\u002Fbuild-info.json\"\n  \"\u002Finfo\" \"\u002Factuator\u002Finfo\" \"\u002Fapi\u002Finfo\"\n  \"\u002Fversion\" \"\u002Fapi\u002Fversion\" \"\u002F_version\"\n  \"\u002Fhealth\" \"\u002Fstatus\" \"\u002Fping\"\n  \"\u002Frobots.txt\" \"\u002Fsecurity.txt\" \"\u002F.well-known\u002Fsecurity.txt\"\n  \"\u002Fsitemap.xml\" \"\u002Fmanifest.json\" \"\u002Fbrowserconfig.xml\"\n  \"\u002Fcrossdomain.xml\" \"\u002Fclientaccesspolicy.xml\"\n  \"\u002Fphpinfo.php\" \"\u002Finfo.php\" \"\u002Ftest.php\"\n  \"\u002Fserver-status\" \"\u002Fserver-info\" \"\u002F.htaccess\"\n  \"\u002Fweb.config\" \"\u002FapplicationHost.config\"\n  \"\u002FWEB-INF\u002Fweb.xml\" \"\u002FMETA-INF\u002FMANIFEST.MF\"\n  \"\u002Fpackage.json\" \"\u002Fcomposer.json\" \"\u002FGemfile\"\n  \"\u002FDockerfile\" \"\u002Fdocker-compose.yml\" \"\u002F.dockerenv\"\n)\n\nfor PATH in \"${DEBUG_PATHS[@]}\"; do\n  STATUS=$(curl -s -o \u002Ftmp\u002Fdebug_test -w \"%{http_code}\" \"https:\u002F\u002F$TARGET$PATH\")\n  if [ \"$STATUS\" = \"200\" ]; then\n    echo \"[+] Found: https:\u002F\u002F$TARGET$PATH ($STATUS, $(wc -c \u003C \u002Ftmp\u002Fdebug_test) bytes)\"\n    head -3 \u002Ftmp\u002Fdebug_test\n    echo \"---\"\n  fi\ndone\n```\n\n---\n\n## Phase 6 — .DS_Store File Listing\n\n```bash\n# .DS_Store files on macOS-deployed web servers reveal directory structure\ncurl -s \"https:\u002F\u002F$TARGET\u002F.DS_Store\" | xxd | head -10\n\n# Parse .DS_Store to extract filenames\npip3 install ds_store\npython3 -c \"\nfrom ds_store import DSStore\nwith DSStore.open('\u002Ftmp\u002Fds_store_test', 'r') as d:\n    for entry in d:\n        print(entry.filename)\n\"\n\n# Recursive .DS_Store enumeration\n# Tool: https:\u002F\u002Fgithub.com\u002Flijiejie\u002Fds_store_exp\npython3 ds_store_exp.py \"https:\u002F\u002F$TARGET\u002F\"\n```\n\n---\n\n## Phase 7 — webpack Chunk Analysis\n\n```bash\n# Download and analyze webpack chunks for hardcoded values\n# Find chunk files\ncurl -s https:\u002F\u002F$TARGET\u002F | grep -oP '\"[^\"]*\\.chunk\\.js\"' | tr -d '\"' | while read chunk; do\n  echo \"Analyzing: $chunk\"\n  curl -s \"https:\u002F\u002F$TARGET$chunk\" | \\\n    grep -oE '\"(api_key|apiKey|secret|password|token|key)\"\\s*:\\s*\"[^\"]+\"' | head -5\ndone\n\n# Also grep for internal hostnames\ncurl -s \"https:\u002F\u002F$TARGET\u002Fstatic\u002Fjs\u002Fmain.*.js\" | \\\n  grep -oE '\"(https?:\u002F\u002F[^\"]*internal[^\"]*|http:\u002F\u002F[^\"]*localhost[^\"]*)\"' | sort -u\n\n# Check for Base64-encoded secrets\ncurl -s \"https:\u002F\u002F$TARGET\u002Fstatic\u002Fjs\u002Fmain.*.js\" | \\\n  grep -oP '\"[A-Za-z0-9+\u002F]{30,}={0,2}\"' | while read b64; do\n  DECODED=$(echo \"$b64\" | tr -d '\"' | base64 -d 2>\u002Fdev\u002Fnull)\n  echo \"$DECODED\" | grep -iE \"key|secret|password|token\" && echo \"  B64: $b64\"\ndone\n```\n\n---\n\n## Chain Table\n\n| Source leak finding | Chain to | Impact |\n|--------------------|----------|--------|\n| Source map with API key | Use key directly → API access | High\u002FCritical |\n| Source map with auth logic | Find auth bypass route | Critical |\n| Swagger → internal endpoints | Test undocumented admin routes | High |\n| .git exposed | Full source history → all past secrets | Critical |\n| build-info with git hash | CVE targeting exact version | High |\n| .env with DB_PASSWORD | Direct database access | Critical |\n\n---\n\n## Tools\n\n```bash\n# git-dumper (reconstruct exposed .git)\npip3 install git-dumper\ngit-dumper \"https:\u002F\u002Ftarget.com\u002F.git\u002F\" \u002Ftmp\u002Frepo\u002F\n\n# sourcemap-explorer (visualize what's in bundles)\nnpm install -g source-map-explorer\nsource-map-explorer main.js\n\n# unwebpack-sourcemap (extract all source files)\nnpm install -g unwebpack-sourcemap\n\n# trufflehog (secret scanning)\ntrufflehog filesystem \u002Ftmp\u002Frepo\u002F\n```\n\n---\n\n## Validation\n\n✅ Source map: reconstructed TypeScript source contains API endpoints or hardcoded secrets\n✅ Swagger: JSON contains internal endpoints not visible in UI\n✅ .git exposed: git-dumper successfully clones repo, secrets in history\n✅ .env exposed: DATABASE_URL, API_KEY, SECRET_KEY visible in plaintext\n\n**Severity:**\n- .env with credentials: Critical\n- .git with secrets in history: Critical\n- Source map with secrets: High\n- Swagger with internal routes: Medium-High\n- robots.txt only: Informational\n\n## When to Use\n\n- You have explicit, written authorization to assess the target in scope, and the task matches this skill's vulnerability class or technique within a bug-bounty or penetration-test engagement.\n- You need the recon, exploitation, or validation workflow described below — executed strictly inside the approved scope.\n\n## Limitations\n\n- Authorized scope only: the confirmation gate above is mandatory before any probing, exploitation, or credential-access command.\n- Docs-only import: upstream helper scripts, commands, engine, and research assets are not bundled; reinstall tooling from the source repo when needed.\n- Validate every finding (see `triage-validation`) before reporting; report via `report-writing`. Prefer a sandbox, disposable VM, or controlled lab.\n\n### Example\n\n```bash\n# Read-only first step; confirm scope before anything active.\ncat scope.txt  # target list from the authorized engagement brief\n```\n\n> Adapted from [elementalsouls\u002FClaude-BugHunter](https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: executable helpers, commands, engine, and research assets not bundled.\n","> **⚠️ AUTHORIZED USE ONLY**\n> This skill is for educational purposes or authorized security assessments only.\n> You must have explicit, written permission from the system owner before using this tool.\n> Misuse of this tool is illegal and strictly prohibited.\n\n> **Mandatory confirmation gate**\n> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:\n> 1. Ask the user to state the exact target URL, IP, account, or resource.\n> 2. Ask the user to confirm written authorization and the permitted scope.\n> 3. Show the exact command(s) and explain their expected effect.\n> 4. Wait for explicit confirmation in the current conversation.\n>\n> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.\n\n# HUNT-SOURCE-LEAK — Source Code & Build Artifact Leakage\n\n## Crown Jewel Targets\n\nSource map exposing TypeScript source = see all API routes, auth logic, secrets. Swagger\u002FOpenAPI JSON = complete API surface map.\n\n**Highest-value findings:**\n- **`.js.map` source maps** — reconstruct full TypeScript\u002FES6 source code → find hardcoded API keys, internal endpoints, auth logic bypasses\n- **`swagger.json` \u002F `openapi.json`** — complete REST API specification with all endpoints, parameters, auth schemes, and internal route names\n- **`.env` \u002F `.env.production`** — APP_KEY, DB_PASSWORD, API_KEY, SECRET_KEY in plaintext\n- **`.git\u002F` exposure** — `git clone` the entire source history → all past hardcoded secrets\n- **`asset-manifest.json` \u002F `_next\u002Fstatic\u002F`** — all JS bundle paths → systematic source map discovery\n- **`build-info` \u002F `info.json`** — git commit hash, build timestamp, dependency versions → CVE targeting\n\n---\n\n## Phase 1 — Quick Wins (Run First)\n\n```bash\n# These 10 requests take \u003C30 seconds and often yield Critical findings\nfor PATH in \\\n  \"\u002F.env\" \\\n  \"\u002F.env.production\" \\\n  \"\u002F.env.local\" \\\n  \"\u002F.git\u002FHEAD\" \\\n  \"\u002Fswagger.json\" \\\n  \"\u002Fapi\u002Fswagger.json\" \\\n  \"\u002Fv1\u002Fswagger.json\" \\\n  \"\u002Fopenapi.json\" \\\n  \"\u002Fapi\u002Fopenapi.json\" \\\n  \"\u002Fapi-docs\"; do\n  STATUS=$(curl -s -o \u002Ftmp\u002Fsl_test -w \"%{http_code}\" \"https:\u002F\u002F$TARGET$PATH\")\n  if [ \"$STATUS\" = \"200\" ]; then\n    echo \"[+] HIT: https:\u002F\u002F$TARGET$PATH\"\n    head -5 \u002Ftmp\u002Fsl_test\n    echo \"---\"\n  fi\ndone\n```\n\n---\n\n## Phase 2 — Source Map Discovery\n\n> **Always resolve the CURRENT build hash before testing, and again before\n> re-verifying.** Bundle filenames are content-hashed, so they rotate on every\n> deploy. A `.map` URL recorded yesterday can 404 today while the map is still\n> fully exposed under a new name. **A 404 at the old URL is not remediation** —\n> it is a new build.\n>\n> ```bash\n> # ALWAYS derive the hash live, never reuse a recorded URL\n> HASH=$(curl -s \"https:\u002F\u002F$TARGET\u002F\" | grep -oE 'main\\.[a-f0-9]+\\.js' | head -1)\n> curl -s -o \u002Fdev\u002Fnull -w '%{http_code} %{size_download} %{content_type}\\n' \\\n>   \"https:\u002F\u002F$TARGET\u002Fstatic\u002Fjs\u002F${HASH}.map\"\n> ```\n>\n> **Lesson from an authorized engagement.** A large production map was found at\n> `main.\u003ChashA>.js.map`. On re-verification that URL returned a small HTML\n> soft-404 and the finding was nearly closed as fixed. The bundle had rotated to\n> `main.\u003ChashB>.js` — and the map was still published at `main.\u003ChashB>.js.map`,\n> same size. Nothing had been remediated.\n>\n> Tell the client this explicitly in the report: **redeploying does not fix source\n> map exposure.** Only `GENERATE_SOURCEMAP=false` (or stripping `.map` at deploy)\n> plus a CDN purge closes it. A team that redeploys and re-checks the old link\n> will wrongly declare victory.\n>\n> Same rule applies to any content-hashed artifact: chunk files, CSS maps,\n> `asset-manifest.json`, and staging equivalents.\n\n```bash\n# Step 1: Get asset manifest to find all JS bundle paths\ncurl -s \"https:\u002F\u002F$TARGET\u002Fasset-manifest.json\" | python3 -m json.tool 2>\u002Fdev\u002Fnull\ncurl -s \"https:\u002F\u002F$TARGET\u002Fstatic\u002Fjs\u002Fmain.*.js\" 2>\u002Fdev\u002Fnull | head -3\n\n# Next.js\nBUILD_ID=$(curl -s https:\u002F\u002F$TARGET\u002F | grep -oP '\"buildId\":\"\\K[^\"]+')\ncurl -s \"https:\u002F\u002F$TARGET\u002F_next\u002Fstatic\u002F$BUILD_ID\u002F_buildManifest.js\" | head -5\n\n# Step 2: For each JS bundle, check for source map reference at end of file\nfor JS_URL in $(curl -s https:\u002F\u002F$TARGET\u002F | grep -oP 'src=\"[^\"]*\\.js\"' | sed 's\u002Fsrc=\"\u002F\u002F;s\u002F\"\u002F\u002F'); do\n  LAST_LINE=$(curl -s \"https:\u002F\u002F$TARGET$JS_URL\" | tail -1)\n  echo \"$LAST_LINE\" | grep -q \"sourceMappingURL\" && echo \"[+] Source map: $JS_URL\"\ndone\n\n# Step 3: Download and reconstruct source from .map files\nJS_URL=\"https:\u002F\u002F$TARGET\u002Fstatic\u002Fjs\u002Fmain.abc123.js\"\nMAP_URL=\"${JS_URL}.map\"\ncurl -s \"$MAP_URL\" | python3 -c \"\nimport sys, json, os\ndata = json.load(sys.stdin)\nsources = data.get('sources', [])\ncontents = data.get('sourcesContent', [])\nfor i, (src, content) in enumerate(zip(sources, contents)):\n    if content:\n        path = '\u002Ftmp\u002Fsourcemap_extract\u002F' + src.replace('..\u002F','').replace('.\u002F',''). replace('webpack:\u002F\u002F','')\n        os.makedirs(os.path.dirname(path), exist_ok=True)\n        with open(path, 'w') as f:\n            f.write(content)\n        print(f'[+] Extracted: {src}')\n\"\n\n# Step 4: Grep extracted source for secrets\ngrep -r \"API_KEY\\|SECRET\\|PASSWORD\\|TOKEN\\|PRIVATE\" \u002Ftmp\u002Fsourcemap_extract\u002F 2>\u002Fdev\u002Fnull\ngrep -r \"process\\.env\\.\" \u002Ftmp\u002Fsourcemap_extract\u002F 2>\u002Fdev\u002Fnull | grep -v \"NEXT_PUBLIC_\" | head -20\ngrep -r \"http:\u002F\u002Finternal\\|localhost\\|127\\.0\\.0\\.1\\|10\\.\\|172\\.\\|192\\.168\" \u002Ftmp\u002Fsourcemap_extract\u002F 2>\u002Fdev\u002Fnull | head -20\n```\n\n---\n\n## Phase 3 — Swagger \u002F OpenAPI Discovery\n\n```bash\n# Common paths\nSWAGGER_PATHS=(\n  \"\u002Fswagger.json\" \"\u002Fswagger.yaml\" \"\u002Fswagger\u002F\"\n  \"\u002Fapi\u002Fswagger.json\" \"\u002Fapi\u002Fswagger.yaml\"\n  \"\u002Fv1\u002Fswagger.json\" \"\u002Fv2\u002Fswagger.json\" \"\u002Fv3\u002Fswagger.json\"\n  \"\u002Fopenapi.json\" \"\u002Fopenapi.yaml\"\n  \"\u002Fapi\u002Fopenapi.json\" \"\u002Fapi-docs\" \"\u002Fapi-docs.json\"\n  \"\u002Fapi\u002Fv1\u002Fswagger.json\" \"\u002Fapi\u002Fv2\u002Fswagger.json\"\n  \"\u002Frest\u002Fswagger.json\" \"\u002Frest\u002Fapi-docs\"\n  \"\u002F.well-known\u002Fopenapi.json\"\n  \"\u002Fgraphql\u002Fschema.json\"\n)\n\nfor PATH in \"${SWAGGER_PATHS[@]}\"; do\n  STATUS=$(curl -s -o \u002Ftmp\u002Fswagger_test -w \"%{http_code}\" \"https:\u002F\u002F$TARGET$PATH\")\n  if [ \"$STATUS\" = \"200\" ]; then\n    echo \"[+] Found: https:\u002F\u002F$TARGET$PATH\"\n    # Extract all API paths from swagger\n    python3 -c \"\nimport sys, json\ntry:\n    d = json.load(open('\u002Ftmp\u002Fswagger_test'))\n    paths = list(d.get('paths', {}).keys())\n    print(f'Endpoints: {len(paths)}')\n    print('\\n'.join(sorted(paths)))\nexcept: pass\n\" | head -50\n  fi\ndone\n```\n\n---\n\n## Phase 4 — .git Exposure\n\n```bash\n# Check if .git directory is accessible\ncurl -s \"https:\u002F\u002F$TARGET\u002F.git\u002FHEAD\" | grep -q \"ref:\" && echo \"[+] .git exposed!\"\n\n# If exposed, reconstruct repo\n# Tool: git-dumper\npip3 install git-dumper\ngit-dumper \"https:\u002F\u002F$TARGET\u002F.git\u002F\" \u002Ftmp\u002Fdumped-repo\u002F\n\n# Grep for secrets in all git history\ncd \u002Ftmp\u002Fdumped-repo && \\\n  git log --all --oneline 2>\u002Fdev\u002Fnull | head -20\n  git grep -i \"password\\|secret\\|api_key\\|token\" $(git rev-list --all) 2>\u002Fdev\u002Fnull | head -30\n\n# trufflehog on git history\ntrufflehog git file:\u002F\u002F\u002Ftmp\u002Fdumped-repo\u002F 2>\u002Fdev\u002Fnull | head -50\n```\n\n---\n\n## Phase 5 — Forgotten Files & Debug Endpoints\n\n```bash\n# Build artifacts and debug files\nDEBUG_PATHS=(\n  \"\u002Fbuild-info.json\" \"\u002Fbuild\u002Fbuild-info.json\"\n  \"\u002Finfo\" \"\u002Factuator\u002Finfo\" \"\u002Fapi\u002Finfo\"\n  \"\u002Fversion\" \"\u002Fapi\u002Fversion\" \"\u002F_version\"\n  \"\u002Fhealth\" \"\u002Fstatus\" \"\u002Fping\"\n  \"\u002Frobots.txt\" \"\u002Fsecurity.txt\" \"\u002F.well-known\u002Fsecurity.txt\"\n  \"\u002Fsitemap.xml\" \"\u002Fmanifest.json\" \"\u002Fbrowserconfig.xml\"\n  \"\u002Fcrossdomain.xml\" \"\u002Fclientaccesspolicy.xml\"\n  \"\u002Fphpinfo.php\" \"\u002Finfo.php\" \"\u002Ftest.php\"\n  \"\u002Fserver-status\" \"\u002Fserver-info\" \"\u002F.htaccess\"\n  \"\u002Fweb.config\" \"\u002FapplicationHost.config\"\n  \"\u002FWEB-INF\u002Fweb.xml\" \"\u002FMETA-INF\u002FMANIFEST.MF\"\n  \"\u002Fpackage.json\" \"\u002Fcomposer.json\" \"\u002FGemfile\"\n  \"\u002FDockerfile\" \"\u002Fdocker-compose.yml\" \"\u002F.dockerenv\"\n)\n\nfor PATH in \"${DEBUG_PATHS[@]}\"; do\n  STATUS=$(curl -s -o \u002Ftmp\u002Fdebug_test -w \"%{http_code}\" \"https:\u002F\u002F$TARGET$PATH\")\n  if [ \"$STATUS\" = \"200\" ]; then\n    echo \"[+] Found: https:\u002F\u002F$TARGET$PATH ($STATUS, $(wc -c \u003C \u002Ftmp\u002Fdebug_test) bytes)\"\n    head -3 \u002Ftmp\u002Fdebug_test\n    echo \"---\"\n  fi\ndone\n```\n\n---\n\n## Phase 6 — .DS_Store File Listing\n\n```bash\n# .DS_Store files on macOS-deployed web servers reveal directory structure\ncurl -s \"https:\u002F\u002F$TARGET\u002F.DS_Store\" | xxd | head -10\n\n# Parse .DS_Store to extract filenames\npip3 install ds_store\npython3 -c \"\nfrom ds_store import DSStore\nwith DSStore.open('\u002Ftmp\u002Fds_store_test', 'r') as d:\n    for entry in d:\n        print(entry.filename)\n\"\n\n# Recursive .DS_Store enumeration\n# Tool: https:\u002F\u002Fgithub.com\u002Flijiejie\u002Fds_store_exp\npython3 ds_store_exp.py \"https:\u002F\u002F$TARGET\u002F\"\n```\n\n---\n\n## Phase 7 — webpack Chunk Analysis\n\n```bash\n# Download and analyze webpack chunks for hardcoded values\n# Find chunk files\ncurl -s https:\u002F\u002F$TARGET\u002F | grep -oP '\"[^\"]*\\.chunk\\.js\"' | tr -d '\"' | while read chunk; do\n  echo \"Analyzing: $chunk\"\n  curl -s \"https:\u002F\u002F$TARGET$chunk\" | \\\n    grep -oE '\"(api_key|apiKey|secret|password|token|key)\"\\s*:\\s*\"[^\"]+\"' | head -5\ndone\n\n# Also grep for internal hostnames\ncurl -s \"https:\u002F\u002F$TARGET\u002Fstatic\u002Fjs\u002Fmain.*.js\" | \\\n  grep -oE '\"(https?:\u002F\u002F[^\"]*internal[^\"]*|http:\u002F\u002F[^\"]*localhost[^\"]*)\"' | sort -u\n\n# Check for Base64-encoded secrets\ncurl -s \"https:\u002F\u002F$TARGET\u002Fstatic\u002Fjs\u002Fmain.*.js\" | \\\n  grep -oP '\"[A-Za-z0-9+\u002F]{30,}={0,2}\"' | while read b64; do\n  DECODED=$(echo \"$b64\" | tr -d '\"' | base64 -d 2>\u002Fdev\u002Fnull)\n  echo \"$DECODED\" | grep -iE \"key|secret|password|token\" && echo \"  B64: $b64\"\ndone\n```\n\n---\n\n## Chain Table\n\n| Source leak finding | Chain to | Impact |\n|--------------------|----------|--------|\n| Source map with API key | Use key directly → API access | High\u002FCritical |\n| Source map with auth logic | Find auth bypass route | Critical |\n| Swagger → internal endpoints | Test undocumented admin routes | High |\n| .git exposed | Full source history → all past secrets | Critical |\n| build-info with git hash | CVE targeting exact version | High |\n| .env with DB_PASSWORD | Direct database access | Critical |\n\n---\n\n## Tools\n\n```bash\n# git-dumper (reconstruct exposed .git)\npip3 install git-dumper\ngit-dumper \"https:\u002F\u002Ftarget.com\u002F.git\u002F\" \u002Ftmp\u002Frepo\u002F\n\n# sourcemap-explorer (visualize what's in bundles)\nnpm install -g source-map-explorer\nsource-map-explorer main.js\n\n# unwebpack-sourcemap (extract all source files)\nnpm install -g unwebpack-sourcemap\n\n# trufflehog (secret scanning)\ntrufflehog filesystem \u002Ftmp\u002Frepo\u002F\n```\n\n---\n\n## Validation\n\n✅ Source map: reconstructed TypeScript source contains API endpoints or hardcoded secrets\n✅ Swagger: JSON contains internal endpoints not visible in UI\n✅ .git exposed: git-dumper successfully clones repo, secrets in history\n✅ .env exposed: DATABASE_URL, API_KEY, SECRET_KEY visible in plaintext\n\n**Severity:**\n- .env with credentials: Critical\n- .git with secrets in history: Critical\n- Source map with secrets: High\n- Swagger with internal routes: Medium-High\n- robots.txt only: Informational\n\n## When to Use\n\n- You have explicit, written authorization to assess the target in scope, and the task matches this skill's vulnerability class or technique within a bug-bounty or penetration-test engagement.\n- You need the recon, exploitation, or validation workflow described below — executed strictly inside the approved scope.\n\n## Limitations\n\n- Authorized scope only: the confirmation gate above is mandatory before any probing, exploitation, or credential-access command.\n- Docs-only import: upstream helper scripts, commands, engine, and research assets are not bundled; reinstall tooling from the source repo when needed.\n- Validate every finding (see `triage-validation`) before reporting; report via `report-writing`. Prefer a sandbox, disposable VM, or controlled lab.\n\n### Example\n\n```bash\n# Read-only first step; confirm scope before anything active.\ncat scope.txt  # target list from the authorized engagement brief\n```\n\n> Adapted from [elementalsouls\u002FClaude-BugHunter](https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter) (MIT); frontmatter, When to Use\u002FLimitations, and safety boundaries added for upstream compliance. Docs-only import: executable helpers, commands, engine, and research assets not bundled.\n",{"name":5,"risk":26,"source":43,"license":14,"sources":44,"category":37,"date_added":45,"description":7,"source_repo":46,"source_type":32,"report_count":47,"compatibility":48,"license_source":49},"https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter","hackerone_public, offensive_research","2026-09-20","elementalsouls\u002FClaude-BugHunter",7,"Requires explicit written authorization for a target scope plus the relevant testing tools for this technique. Docs-only; helper scripts and commands not bundled.","https:\u002F\u002Fgithub.com\u002Felementalsouls\u002FClaude-BugHunter\u002Fblob\u002Fmain\u002FLICENSE","f3312ba749561b6159f477dbfc9313c875d40a56",".agents\u002Fskills_archive\u002Fhunt-source-leak","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612","2026-10-25 23:50:58",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill hunt-source-leak",{"tool":61,"command":62},"bunx","bunx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill hunt-source-leak",{"tool":64,"command":65},"pnpm","pnpm dlx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill hunt-source-leak","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fhunt-source-leak\u002FSKILL.md",true,[],[70,90,114,138,155,174],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":38},"01M6Q0FA5FZ410Z33Z3TFQ4DBA","zero-trust","Implement zero-trust network architecture. Configure identity-based access, micro-segmentation, and continuous verification. Use when implementing modern security architectures.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzero-trust\u002FSKILL.md",[],[77,78,79,80,81,82,72,83,84,85,86,33,32,31,87,88,28,27,24,89],"ZeRO","trust","zero trust","architecture","assessment","verification","segmentation","devops-security","access","configure","active","critical","implementing",{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":38},"01M6Q0F1YZJW3KX5FBKEVZ8CV4","zcode-delegate","Delegate coding tasks to the Z.AI ZCode CLI only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzcode-delegate\u002FSKILL.md",[],[97,98,99,100,101,102,103,104,105,106,107,108,109,33,110,32,111,112,88,113],"delegate","zcode","zcode delegate","review","cli","orchestration","tasks","run","Bash","model","node","read","orchestrator","files","desktop app","app","agent-orchestration",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":38},"01M6Q0ETK41VGNMYEXW0T00AJN","youtube-transcript","Fetch YouTube transcripts through DeepAPI or local fallback tooling and save clean text output.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript\u002FSKILL.md",[],[121,122,123,124,125,126,127,35,128,129,130,131,132,32,31,133,134,135,136,137],"transcript","youtube transcript","youtube","safe","github","codex","research","https","text","fetch","tooling","clean","local","output","deepapi","youtube transcripts","blob",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":38},"01M6Q0EPPH2PVMDW40017F8WX0","youtube-transcript-skills","Fetch YouTube video transcripts, search videos\u002Fchannels, browse channels, and extract playlists via the getyoutubetranscript.com API - free tier, no card required.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript-skills\u002FSKILL.md",[],[121,122,123,145,124,146,125,126,35,147,148,149,150,130,151,32,31,152,153,154],"youtube transcript skills","gemini","search","api","Video","browse","api-integration","free","card","channels",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":38},"01M6Q0EAB96PX83W5PTE8A0R8D","youtube-notetaker","Turn YouTube talks into local study notes with slides, transcripts, editable annotations, and a markdown-backed viewer.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-notetaker\u002FSKILL.md",[],[123,162,163,101,124,164,165,166,36,35,149,167,168,169,170,31,171,133,172,173],"youtube notetaker","notetaker","workflow","official","notes","markdown","slides","annotations","README","study","dair-academy","viewer",{"skillNo":175,"name":176,"nameZh":6,"description":177,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":178,"categories":179,"keywords":180,"publishedAt":38},"01M6Q0E55F0GW5MX48V8HXS8B5","youtube-full","Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-full\u002FSKILL.md",[],[181,123,182,183,124,146,147,184,185,148,149,150,130,186,151,32,31,152,187,136],"youtube full","full","google","server","dlp","credits","automatic"]