Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计异常

exploiting-broken-link-hijacking利用损坏的链接劫持

Agent Skill

exploiting-broken-link-hijacking 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

563

周安装

23

GitHub Stars

5,896

下载量

182
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:exploiting-broken-link-hijacking(利用损坏的链接劫持)
来源仓库:https://github.com/mukul975/anthropic-cybersecurity-skills
仓库路径:skills/exploiting-broken-link-hijacking
安装命令:
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill exploiting-broken-link-hijacking
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill exploiting-broken-link-hijacking

简介

用于查找、检索和筛选相关信息,支持基于关键词或场景的信息聚合。

  • 适合快速定位失效外链、悬垂 CNAME 记录或第三方资源劫持案例。
  • 可按域名注册状态、CDN 服务商或资源类型分类返回风险点。
  • 安装命令:npx skills add https://github.com/mukul975/anthropic-cybersecurity-skills --skill exploiting-broken-link-hijacking
  • 注意:扫描结果需经 DNS 权威解析验证,避免误判临时不可达链接。

SKILL.md

Exploiting Broken Link Hijacking

When to Use

  • When auditing web applications for references to expired or unclaimed external resources
  • During supply chain security assessments of third-party script and resource dependencies
  • When testing for subdomain takeover opportunities via dangling CNAME records
  • During bug bounty hunting for broken link hijacking vulnerabilities
  • When assessing the security of external resource dependencies in production applications

Prerequisites

  • Web crawler or spider for discovering all external links (Burp Suite Spider, Scrapy)
  • DNS lookup tools for checking CNAME records and domain availability
  • Domain registrar access for claiming expired domains (as proof of concept)
  • Understanding of CDN and cloud service provisioning (S3, Azure Blob, GitHub Pages)
  • blc (broken-link-checker) or similar tool for automated link validation
  • Knowledge of services vulnerable to subdomain takeover (can-i-take-over-xyz)
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.

Workflow

Step 1 — Crawl and Extract All External References

# Use broken-link-checker to find dead links
npx broken-link-checker http://target.com --recursive --ordered \
  --exclude-internal --filter-level 3 -o broken_links.txt

# Extract all external links from page source
curl -s http://target.com | grep -oP 'https?://[^"'"'"'\s>]+' | sort -u > all_links.txt

# Extract JavaScript sources
curl -s http://target.com | grep -oP 'src="[^"]*"' | grep -v target.com > external_scripts.txt

# Extract CSS references
curl -s http://target.com | grep -oP 'href="[^"]*\.css"' | grep -v target.com > external_css.txt

# Use wayback machine for historical external references
curl -s "https://web.archive.org/web/timemap/link/http://target.com" | \
  grep -oP 'https?://[^>]+' | sort -u > historical_links.txt

# Spider with Burp Suite
# Configure Spider scope to include target.com
# Review Site Map > Filter by "External" to list all external references

Step 2 — Identify Dead or Claimable Resources

# Check if external domains are registered
for domain in $(cat external_domains.txt); do
  whois $domain 2>/dev/null | grep -qi "no match\|not found\|available" && \
    echo "[CLAIMABLE] $domain"
done

# Check HTTP status of external links
while read url; do
  status=$(curl -o /dev/null -s -w "%{http_code}" "$url" --max-time 5)
  if [ "$status" = "000" ] || [ "$status" = "404" ]; then
    echo "[DEAD] $url (Status: $status)"
  fi
done < all_links.txt

# Check for dangling CNAME records
for sub in $(cat subdomains.txt); do
  cname=$(dig +short CNAME $sub)
  if [ -n "$cname" ]; then
    resolved=$(dig +short $cname)
    if [ -z "$resolved" ]; then
      echo "[DANGLING] $sub -> $cname (UNRESOLVED)"
    fi
  fi
done

# Check cloud resource availability
# AWS S3 bucket
aws s3 ls s3://target-assets 2>&1 | grep -q "NoSuchBucket" && echo "[CLAIMABLE] S3: target-assets"

Step 3 — Check Service-Specific Takeover Possibilities

# Check GitHub Pages takeover
# If CNAME points to <user>.github.io and 404 is returned
curl -s https://subdomain.target.com | grep -q "There isn't a GitHub Pages site here"

# Check AWS S3 takeover
curl -s http://subdomain.target.com | grep -q "NoSuchBucket"

# Check Azure Blob Storage
curl -s http://subdomain.target.com | grep -q "The specified container does not exist"

# Check Heroku
curl -s http://subdomain.target.com | grep -q "No such app"

# Check Shopify
curl -s http://subdomain.target.com | grep -q "Sorry, this shop is currently unavailable"

# Use subjack for automated takeover detection
subjack -w subdomains.txt -c fingerprints.json -t 100 -o takeover_candidates.txt

# Use nuclei takeover templates
subfinder -d target.com -silent | nuclei -t http/takeovers/ -o takeovers.txt

Step 4 — Verify External Script Hijacking

# Check if external JavaScript domains are available for registration
curl -s http://target.com | grep -oP 'src="https?://([^/"]+)' | \
  cut -d'/' -f3 | sort -u | while read domain; do
    whois "$domain" 2>/dev/null | grep -qi "no match\|available" && \
      echo "[HIJACKABLE SCRIPT] $domain loaded by target.com"
  done

# Check npm/CDN package references
curl -s http://target.com | grep -oP 'unpkg\.com/[^@/]+' | sort -u
curl -s http://target.com | grep -oP 'cdn\.jsdelivr\.net/npm/[^@/]+' | sort -u

# Verify if referenced packages still exist
# Check npm registry for deprecated or removed packages

Step 5 — Exploit the Broken Link (Authorized Testing Only)

# For expired domain: Register the domain
# For S3 bucket: Create bucket with same name in same region
aws s3 mb s3://target-expired-bucket --region us-east-1

# For GitHub Pages: Create repository with matching name
# Create <org>.github.io repository with proof-of-concept content

# For unclaimed social media: Claim the handle
# Document the takeover with benign proof-of-concept content

# Serve proof-of-concept content
echo "<html><body><h1>Broken Link Hijacking PoC - [Your Name]</h1></body></html>" > index.html
# Upload to claimed resource

Step 6 — Assess Impact and Report

# Determine impact based on resource type:
# - External JavaScript: Full XSS on all pages loading the script
# - External CSS: UI defacement, data exfiltration via CSS injection
# - External image/resource: Phishing, tracking
# - CNAME subdomain: Cookie theft, phishing, OAuth bypass

# Check if hijacked resource serves cookies for parent domain
# Check if hijacked subdomain is in OAuth redirect whitelist
# Verify if hijacked domain receives sensitive Referer headers

Key Concepts

ConceptDescription
Broken Link HijackingClaiming control of external resources referenced by target website
Dangling CNAMEDNS CNAME record pointing to unclaimed or decommissioned service
Subdomain TakeoverClaiming a subdomain by provisioning the service its CNAME points to
External Script HijackingRegistering expired domains that serve JavaScript loaded by target
Supply Chain AttackCompromising external dependencies to inject malicious content
Dead LinkURL reference returning 404 or DNS resolution failure
Resource FingerprintingIdentifying specific cloud services from error messages and headers

Tools & Systems

ToolPurpose
broken-link-checkerAutomated broken link discovery via web crawling
subjackSubdomain takeover detection tool
nucleiTemplate-based takeover detection scanner
can-i-take-over-xyzCommunity database of services vulnerable to takeover
BadDNSDNS auditing tool for detecting domain/subdomain takeovers
Wayback MachineHistorical URL analysis for discovering past external references

Common Scenarios

  1. JavaScript Supply Chain — Register expired domain that serves JavaScript loaded by target; inject malicious code affecting all visitors
  2. S3 Bucket Takeover — Claim deleted AWS S3 bucket referenced by target; serve malicious content or steal uploaded data
  3. GitHub Pages Hijack — Create GitHub Pages repository matching dangling CNAME to serve phishing pages on target subdomain
  4. Social Media Impersonation — Claim unclaimed social media handles linked from target website for brand impersonation
  5. CDN Package Hijack — Claim deprecated npm packages referenced via CDN URLs to inject malicious JavaScript

Output Format

## Broken Link Hijacking Report
- **Target**: http://target.com
- **Total External Links**: 145
- **Dead Links**: 12
- **Hijackable Resources**: 3

### Findings
| # | Resource | Type | Status | Impact |
|---|----------|------|--------|--------|
| 1 | analytics.expired-domain.com | JavaScript | Domain available | Full XSS |
| 2 | assets.target.com -> S3 bucket | Static assets | Bucket deleted | Content injection |
| 3 | blog.target.com -> GitHub Pages | Subdomain | No GitHub repo | Subdomain takeover |

### Remediation
- Remove references to decommissioned external resources
- Delete dangling CNAME records for unused subdomains
- Implement Subresource Integrity (SRI) for external scripts
- Regularly audit external dependencies for availability
- Use Content Security Policy to restrict allowed script sources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.81%
按下载量换算67

Claude

29.94%
按下载量换算54

Cursor

19.15%
按下载量换算35

Gemini CLI

8.44%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills