yaklang avatar

Dns Rebinding Attacks

This is a thorough playbook for DNS rebinding attacks, the client-side technique where you control DNS to make a browser resolve your domain to an internal IP while respecting same-origin policy. It covers the core mechanics (TTL manipulation, browser cache bypass via subdomains or multiple A records), attack variants including WebSocket rebinding and the hybrid TOCTOU server-side case, and high-value targets like cloud metadata services at 169.254.169.254 or internal Docker APIs. The skill includes practical tool references like Singularity and rbndr.us for zero-setup testing. Use this when you need to reach internal services from a browser context where traditional SSRF won't work, or when testing applications that trust DNS resolution for security decisions.

skills.sh installs
3.8K
GitHub stars
2.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add yaklang/hack-skills --skill dns-rebinding-attacks --agent claude-code

Installs into .claude/skills of the current project.

Files

SKILL: DNS Rebinding — Expert Attack Playbook

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.

0. RELATED ROUTING


1. CORE PRINCIPLE

The 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:

  1. First resolution → attacker IP (serve malicious JS)
  2. Second resolution → internal IP (victim's network)
  3. Browser considers both responses same-origin (attacker.com)
  4. Malicious JS reads responses from internal services

Sponsors

Details

Repository
github.com/yaklang/hack-skills
Categories
Backend & APIs, Testing & QA, Automation & Workflows
First seen
Jun 3, 2026

More from yaklang/hack-skills

All 102
1dotnet avatarcreate-blazor-projectdotnet/skillsCreate a new ASP.NET Core web application or web site using Blazor. USE FOR: creating a new Blazor web app, scaffolding a new web project, starting a new web si3.8Kskills.sh installs
2yaklang avatartype-jugglingyaklang/hack-skillsPHP type juggling and weak comparison (`==`) bypass. Use when authentication, HMAC/signature checks, or token validation uses loose equality, numeric coercion, 3.8Kskills.sh installs
3cloudflare avatarbuilding-ai-agent-on-cloudflarecloudflare/skillsBuilds AI agents on Cloudflare using the Agents SDK with state management, real-time WebSockets, scheduled tasks, tool integration, and chat capabilities. Gener3.7Kskills.sh installs
4yaklang avatarnosql-injectionyaklang/hack-skillsNoSQL injection playbook. Use when MongoDB-style operators, JSON query objects, flexible search filters, or backend query DSLs may allow data or logic abuse.3.7Kskills.sh installs
5netlify avatarnetlify-deploynetlify/context-and-toolsDeploy, host, and publish web projects on Netlify with the Netlify CLI. Use when the user wants to deploy a site or repository to Netlify, link a local project 3.7Kskills.sh installs
6huggingface avatarhf-clihuggingface/skillsHugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and more on the Hugging Face Hub. U3.6Kskills.sh installs