hackXpert labs
All labs › Stored XSS

💾 Stored XSS

Your payload is saved and fires later, for whoever loads the page next. Ask who that is before you decide what the payload should do.

13 labs and targetsfree accountlesson included
How cross-site scripting actually works — taught by The XSS Rat

What it is

XSS happens when input you control ends up in the page without being neutralised for the context it lands in. Context is the whole game: inside HTML, inside an attribute, inside a script block and inside a URL all need different escaping, and a filter built for one of them is useless in the others.

How I attack it

  1. Find where your input is reflected, then view source and look at exactly what surrounds it.
  2. Break out of that context first - close the attribute, close the tag, close the string - before you even think about a payload.
  3. If the output is encoded, check whether it is encoded for the right context. HTML-encoding inside a script block stops nothing.
  4. Stored beats reflected on impact. Ask who else loads that page, and what their session can do.

Learn it from The XSS Rat

Free reference reading

The core set 4

Start at 00 and work up.

Applications 9

Application

RatMarket

Marketplace with stored XSS in the listings. Think about who reads them.

Application

RatPack

Packing-list app. The stored payload fires on the shared list.

Application

RatStock

Stock tracker. Two of its rooms are hidden behind the obvious one.

Application

ThemeParkRental

Rental flow with stored XSS in the booking details.

Application

ThemeParkRental API

The rental API behind the UI, documented. Store it through the API instead.

Also here 2

Nothing matches thatClear the filter to see everything again.