exploiting-broken-link-hijacking
하는 일
이 도구는 악용될 수 있는 웹사이트의 깨진 링크를 찾습니다. 사이트가 사용하는 외부 도메인이나 리소스가 만료되었거나 등록되지 않았는지 확인합니다. 그러면 공격자가 이를 등록해 통제권을 얻을 수 있습니다.
사용하는 경우
- ✓더 이상 작동하지 않는 링크를 찾아 웹사이트 보안을 감사할 때.
- ✓사이트가 사용하는 제3자 스크립트나 리소스가 탈취될 수 있는지 조사할 때.
- ✓보안 테스트 중 ‘서브도메인 탈취’ 기회를 찾는 경우.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/exploiting-broken-link-hijacking/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“example.com에서 깨진 링크와 탈취될 수 있는 외부 리소스를 검사해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 먼저 웹사이트를 크롤링해 모든 외부 링크를 찾습니다. 그다음 이 링크나 연결된 도메인이 아직 활성 상태인지, 아니면 다른 사람이 등록할 수 있는지 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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
…
자주 묻는 질문
‘깨진 링크 탈취’란 무엇인가요?
웹사이트가 더 이상 활성 상태가 아니거나 등록되지 않은 외부 리소스(예: 스크립트나 이미지)에 링크하는 취약점입니다. 공격자는 그 링크나 도메인을 등록해 웹사이트가 공격자가 통제하는 리소스를 사용하게 만들 수 있습니다.
‘서브도메인 탈취’란 무엇인가요?
서브도메인(예: ‘blog.example.com’)이 그 서브도메인용으로 더 이상 설정되지 않은 외부 서비스(예: 호스팅 서비스)를 가리킬 때 발생합니다. 공격자는 그 외부 서비스를 설정해 서브도메인을 통제할 수 있습니다.
이 도구를 쓰려면 어떤 준비가 필요한가요?
웹사이트를 크롤링하는 도구(스파이더), DNS 레코드를 확인하는 도구, 그리고 만료된 도메인을 주장해 보기 위한 도메인 등록 기관 접근 권한이 필요할 수 있습니다.
상세 정보
작성자의 원본 설명
Discovers and exploits broken link hijacking by spidering a site (Burp Suite Spider, Scrapy, curl scraping), extracting referenced external scripts/domains, and checking DNS/CNAME records and domain registration status for expired or unclaimed resources an attacker could register. Use for subdomain takeover testing, supply-chain review of third-party scripts, or bug bounty hunting for hijackable e
인기도
- GitHub 스타
- 35k
- 순위
- #7903
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.