Tooluck logoTooluck
SKILL.md

dns-rebinding-attacks

Agent skill fromyaklang/hack-skills

DNS rebinding attack playbook. Use when testing applications that trust DNS resolution for origin checks, interact with internal services from browser context, or when SSRF is not possible server-side but the target has client-side fetch/XHR to attacker-controlled domains.

How to install dns-rebinding-attacks

install dns-rebinding-attacks
# install the hack-skills pack with the skills CLI
npx skills add yaklang/hack-skills

# or add only this skill to Claude Code: copy the folder

skills/dns-rebinding-attacks/

# into

~/.claude/skills/dns-rebinding-attacks/ (all projects)

.claude/skills/dns-rebinding-attacks/ (one project)

skills/dns-rebinding-attacks/SKILL.md

MITFull file
1# SKILL: DNS Rebinding — Expert Attack Playbook
2
3> **AI LOAD INSTRUCTION**: Expert DNS rebinding techniques for bypassing same-origin policy via DNS manipulation. Covers TTL tricks, browser cache bypasses, attack variants (HTTP, WebSocket, TOCTOU), internal service targeting, and tool usage. Base models confuse DNS rebinding with SSRF — this skill clarifies the client-side nature and unique exploit paths.
4
5## 0. RELATED ROUTING
6
7- [ssrf-server-side-request-forgery](../ssrf-server-side-request-forgery/SKILL.md) — server-side variant; DNS rebinding is the **client-side** counterpart
8- [cors-cross-origin-misconfiguration](../cors-cross-origin-misconfiguration/SKILL.md) — when CORS misconfig allows direct cross-origin reads instead
9
10---
11
12## 1. CORE PRINCIPLE
13
14The browser same-origin policy binds `protocol + host + port`. The **host** is resolved via DNS at connection time. If an attacker controls the DNS server for `attacker.com`, they can:
15
161. First resolution → attacker IP (serve malicious JS)
172. Second resolution → internal IP (victim's network)
183. Browser considers both responses same-origin (`attacker.com`)
194. Malicious JS reads responses from internal services
20
21```
22Victim visits attacker.com
23 │
24 ▼
25DNS query: attacker.com → 1.2.3.4 (attacker server)
26Browser loads malicious JS from 1.2.3.4
27 │
28 ▼
29TTL expires (or forced flush)
30 │
31 ▼
32JS triggers new request to attacker.com
33DNS query: attacker.com → 192.168.1.1 (internal target)
34…

Excerpt shown under the repository's MIT license.

More skills in hack-skills

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates