BBLABS v2BBLABSv2
>Home>Labs
>New labs

Latest 3 labs

Loading…

View all labs →
>Creators>Ranking
>Learn

Learn bug bounty

AcademyGuides, cheatsheets and glossaryVulnerabilitiesXSS, SQLi, IDOR, SSRF and moreHunter RoadmapYour step-by-step bug bounty pathBlogBug bounty guides and news
>Business>Pricing
ES
Log inLog in
>Home>Labs>New labs>Creators>Ranking>Learn>Business>Pricing
ES
Sign inCreate account
  1. Home
  2. Labs
  3. Stored XSS to Domain Takeover
Insane$1,20045 min

Stored XSS to Domain Takeover

By @gorka

Plataforma de hosting cloud con feature de impersonacion de cuentas (Access Manager). Un Stored XSS en el nombre de las plantillas de email se activa al duplicarlas ("Copy of: PAYLOAD"). El XSS ejecuta en la sesion real de la victima (no impersonada), bypaseando las restricciones de permisos para modificar DNS records y lograr domain takeover.

596 views14 completedUpdated Aug 2026
Log in to start
Explainer videoby @gorka

Learn to find this bug

This bug paid $1,200 on HackerOne.

Create your account and practice real bugs that got paid. Download the environment, find it and learn the exact technique — your path to your first bounty.

hunters training
650

hunters training

labs from real reports
50

labs from real reports

completions
380

completions

in bounties practiced
$200,000

in bounties practiced

40 flags captured this week
Create account
I already have an account

Access to all labs · no commitment · cancel anytime

Hunters who solved it· 7

zynap1
@zynap3 days ago
flyingwhales2
@flyingwhales4 days ago
AL3
@alndrwla20 days ago
AL
@alex.burja.200029 days ago
pl4nkton
@pl4nktonJun 2026
benjaminnocervigni
@benjaminnocervigniMay 2026
MA
@maxioliveraMay 2026

Objectives

1
Obtener acceso de impersonacion a la cuenta de la victima (sarah_wilson) via Access Manager
2
Descubrir que los cambios de DNS estan bloqueados durante la impersonacion
3
Encontrar el Stored XSS en los nombres de plantillas de email al duplicarlas
4
Inyectar un payload XSS que modifique los DNS records del dominio de la victima
5
Explotar el bot que renderiza las plantillas para ejecutar el XSS en la sesion real de la victima
6
Recibir la flag via el health check de DNS que apunta al servidor del atacante

Information

Platform
HackerOne
Difficulty
Insane
Duration
45 min
Bounty
$1,200
Completed
14
Creator
gorka@gorka
Collaborators
antoniorivera@antoniorivera
Updated
Aug 2026

Download the environment

Reproduce it and find the bug yourself

Create account

Tools

Burp SuiteNavegadorNC

Prerequisites

  • Conocimientos de XSS stored
  • Saber usar fetch()

Tags

XSS

Achievement you'll earn

Solve this lab to unlock this shareable achievement

BBLABS.ESLab Solved
Insane$1,200
// achievement_unlocked

Stored XSS to Domain Takeover

XSS
Aug 2026
gorka
solved_by@gorkaMember since Mar 2026
bblabs.es// real bug bounty practice

Community writeups

La aplicacion

NexusHost es una plataforma de hosting cloud donde los usuarios gestionan servidores, dominios con DNS, y plantillas de email. La app incluye:

  • Gestion de Servidores — Ver servidores con specs, estado, region y coste
  • Gestion de Dominios — Dominios con registros DNS editables (A/CNAME), SSL, auto-renovacion
  • Plantillas de Email — Crear, editar, duplicar y eliminar plantillas de correo
  • Access Manager — Invitar a otros usuarios a impersonar tu cuenta con permisos limitados
  • Panel Admin — Estadisticas de la plataforma, gestion de usuarios, log de actividad

La vulnerabilidad

La pagina de plantillas renderiza los nombres con dangerouslySetInnerHTML (para soportar "nombres ricos"). Al duplicar una plantilla, el nombre se genera como Copy of: ${original.name} sin sanitizar.

Si el nombre original contiene HTML/JavaScript, al duplicar se crea una plantilla con XSS persistente que se ejecuta cada vez que alguien ve la lista de plantillas.

La restriccion de permisos

Los usuarios que impersonan una cuenta tienen permisos limitados:

  • Pueden ver servidores, dominios, y gestionar plantillas
  • NO pueden modificar DNS — el endpoint devuelve 403 "DNS modifications not permitted in impersonation mode"

El bypass via XSS

El XSS se ejecuta en el contexto del navegador de la victima (sarah_wilson), que revisa sus plantillas cada 15 segundos. Como la victima NO esta impersonando (es su propia sesion), el XSS puede hacer fetch PUT /api/domains/:id/dns con exito, cambiando el destino DNS del dominio.

El health check de DNS

Cada 10 segundos, el servidor verifica los dominios enviando un POST con la flag al dns_target configurado. Cuando el atacante cambia el DNS a su propio servidor, recibe la flag.

Cadena de ataque completa

1. Registrarse como atacante
2. Access Manager → Solicitar acceso a sarah_wilson → Auto-aceptado
3. Impersonar sarah_wilson
4. Intentar cambiar DNS directamente → 403 (bloqueado)
5. Crear plantilla con XSS en el nombre
6. Duplicar plantilla → "Copy of: <img src=x onerror=fetch(...)>"
7. Dejar de impersonar → Bot renderiza plantillas cada 15s
8. XSS ejecuta en sesion de sarah → cambia DNS a host.docker.internal:9999
9. Montar servidor HTTP en puerto 9999
10. DNS health check (10s) → POST /health-check con flag

Payload XSS de ejemplo

SCREEEETTTTT

Recibir la flag

# Opcion 1: Python
python3 -m http.server 9999

# Opcion 2: Netcat
nc -lp 9999

# Recibiras un POST a /health-check con body:

Solucion interactiva

Accede a /writeup dentro de la aplicacion para una guia paso a paso con botones que ejecutan cada peticion automaticamente.


Remediacion

  1. Sanitizar todo input antes de renderizar — usar textContent en vez de innerHTML
  2. Nunca usar dangerouslySetInnerHTML con datos de usuario sin sanitizar
  3. Implementar Content Security Policy que bloquee scripts inline
  4. Requerir re-autenticacion para cambios criticos como DNS
  5. Auditar y alertar sobre modificaciones de DNS en tiempo real

Contact

Practice, learn and hack

Bug bounty practice platform with labs based on real reports. Learn ethical hacking in safe environments.

contact→

Follow us

YouTube
@0xGorka
X
@gorkaelbochi
LinkedIn
gorka-el-bochi-morillo
Instagram
@_.gorkaaa.b
Email
team@bblabs.es

Access every lab from €7.99/mo

New labs every week. Cancel anytime.

Create account

BBLabs is the bug bounty labs platform where you learn bug bounty with real vulnerabilities extracted from paid reports on HackerOne, Bugcrowd and Intigriti. Here you practice web hacking —XSS, SQLi, IDOR, SSRF, CSRF and more— in downloadable environments, capture the flag, read the writeup and apply the technique on active bug bounty programs.

BBLabs is the alternative to HackTheBox, TryHackMe and PentesterLab for those who want to practice bug bounty with real reports instead of artificial CTFs. From €7.99/mo, no commitment.

→ Learn bug bounty from scratch→ How to do bug bounty step by step→ Real bug bounty reports→ BBLabs for companies and academiesLabsAcademyVulnerabilitiesToolsHunter rankingXSS labsIDOR labsSSRF labsCSRF labsHackTheBox alternativeHack4u alternativeTryHackMe alternativePortSwigger alternativePentesterLab alternativeBug Bounty Labs comparisonHackerOne to practiceOffSec / OSCP alternativeINE / eWPT alternativeHTB Academy alternativeDVWA alternativeJuice Shop alternativeVulnHub alternativePentesterAcademy alternativeRoot-Me alternativeHackTheBox vs TryHackMeBest bug bounty platforms 2026BlogSpoilersWhat is bug bounty?How much do you earn in bug bounty?OWASP Top 10 explainedBest sites to practice web hackingHow to become an ethical hacker from scratchBurp Suite tutorial (Spanish)OSCP guide and prepGoogle Dorks for bug bountyHow much an ethical hacker earns in SpainBug bounty tools 2026Best cybersecurity certifications 2026Burp Suite tutorialsqlmap tutorialffuf web fuzzingnuclei tutorialHTTP Request SmugglingWAF bypassPrompt injection (LLM)Google Dorks
Made withand code
TermsPrivacyComparisonES

© 2026 BBLABS v2 — All rights reserved