Sleeper Agent
This personnel network was built on a quiet assumption: that a name, once safely stored, stays safe wherever it resurfaces.
The newest agent profiles are always shown front and center on the dashboard - a friendly welcome to the network. The question is whether the name you chose at registration really stays dormant until it’s called upon again.
Connections
- https://follow-adjustment-jerusalem-guide.trycloudflare.com
Writeup
A spy-flavored personnel archive. The stored codename is the attack surface, and the flag format is NVR{...}.
Recon
Opening the site drops you on the sign-in page, which links to the registration form. The form wants a codename, a password of at least eight characters, and a region from a fixed list, and the footer of every page reads “Personnel records are access logged”.
<select id="region" name="region">
<option>North Campus</option>
<option>Library Sector</option>
<option>East Residence</option>
<option selected>unknown</option>
</select>
The <option > with a space before the closing bracket is a template artifact. The server conditionally injects selected into that empty attribute slot, so a session whose stored region is none of the listed values gets <option selected>unknown</option>. The whole site is one server-side template with stored data interpolated into it.

The response headers round out the picture. x-powered-by: Express on the far side of a Cloudflare tunnel, no Content-Security-Policy header anywhere, and the session cookie sleeper.sid set with HttpOnly and SameSite=Lax. That matters twice over. Injected script would run with no CSP to stop it, and document.cookie is worthless to that script because the browser refuses to hand over an HttpOnly cookie, so any exfiltration has to carry page content rather than the session itself.
Registering and clicking around maps the app. The dashboard has a dossier panel for our own record, codename, region and a decorative redaction bar, next to a panel titled “Other recent agents” with the subtitle “Profiles recently added to the network, excluding your own record.” Most loads also show an alert, “Some agent records could not be loaded.”, and only the newest handful of rows. Once in a while the panel comes back with the entire archive instead, and during the event we saved one such response, 819,698 bytes with 3,409 rows. The Agents page is a directory table of the 30 newest records, codename, region and added date, behind the login.
Then we probed the codename field itself, typing markup into the form and clicking Create profile. Nothing is filtered. The directory already held other players’ attempts stored as-is, among them "><img src=x onerror=alert(1)> and SQL injection strings like ' UNION SELECT flag FROM secrets--. The one hard limit is length. Registration stores a codename of 120 characters and refuses 121 with “Check the codename and password, then try again.”, a boundary our deploy log recorded exactly:
[12:30:29] deploy proof [D1428] len=121 ok=False
[12:32:58] deploy proof [D577] len=120 ok=True
Duplicate codenames are refused with “That codename is already in use.” The region field also accepts arbitrary values, we stored plain text and HTML markup in it, but the region renders escaped in every page we checked. The codename is the field that comes back.
Exploitation
Stored XSS in the codename
The directory already shows it: other players’ codenames like "><img src=x onerror=alert(1)> and SQL strings sit stored verbatim as rows, and our own registration of the same string comes back unescaped on the dashboard. There is no filter and no CSP, so stored markup executes on render. The one limit is length: 120 characters accepted, 121 refused, recorded in our deploy log:
[12:30:29] deploy proof [D1428] len=121 ok=False
[12:32:58] deploy proof [D577] len=120 ok=True
We first assumed an admin bot and built webhook and tunnel exfiltration for it. After hours of zero callbacks, other players’ markers appearing in the directory as ordinary records showed the real mechanic: payloads execute in the registering player’s own session, with no bot and no external host involved.
Rendering the payload from a second account
The dashboard subtitle states the mechanic outright: “Profiles recently added to the network, excluding your own record.” A stored payload codename renders for every logged-in session except the account that owns it. So register the payload codename once, then sign up a second time: from the second account the first profile is somebody else’s record, it renders into the dashboard on the next load, and the script executes in our own session.
Self-XSS is normally worthless, but here it is enough. The flag endpoint serves logged-in sessions, and a same-origin fetch carries the session cookie automatically, so a script running in our own page can read /flag and then register the returned text back as a new codename. That registration is the exfiltration channel: the result lands in the newest records, where any logged-in account can read it.
The payload
"><script>fetch('/flag').then(r=>r.text()).then(t=>fetch('/register',{method:'POST',body:new URLSearchParams({username:t,password:'aaaaaaaa'})}))</script>
The leading "> is insurance for the interpolation point: if the codename lands inside an attribute it closes the attribute and the tag, and in a text context it renders as two harmless characters. <script> works because the stored codename is interpolated unescaped. fetch('/flag') is same-origin, so the browser attaches the session cookie and the endpoint answers with the flag page. .then(r=>r.text()) reads the response. The second fetch posts that text back to /register as a new codename: new URLSearchParams form-encodes the braces and underscores so the flag text survives, sets Content-Type: application/x-www-form-urlencoded so Express parses the body, and username plus password are the two fields the endpoint requires.
As printed, that chain is 154 characters and the cap is 120, so it cannot be stored as one codename. The job splits: a 61-character chain (<script>fetch('/flag').then(r=>r.text()).then(alert)</script>) reads the flag onto the screen, and the register-back half becomes a plain form post once the text is known. The directory after the burn shows both halves, the payload codenames stored verbatim and the exfiltrated flag among them as an ordinary record:

Flag capture
Flag capture
A polling script logged in, fetched the dashboard, and saved any response that came back unusually large. Its sixth cycle caught the full archive at 819,698 bytes:
11:52:54 LOTTERY page len=819698 saved lottery_6.html
Inside the dump, a fresh row held a codename that was nothing but flag text, with Region: North Campus and an added timestamp of 10:52:51 AM. The page stamps its Added times in UTC, an hour behind our local log clock, so that row landed three seconds before the 11:52:54 scan. A burn had gone through the register-back channel moments earlier, and our saved copy had it. Filtering the page for clean flag-shaped strings separated it from a decoy another player had stored much earlier:
$ grep -ao 'NVR{[^}<>&]*}' lottery_6.html | sort -u
NVR{s1gn_up_tw1c3_burn_0nc3}
NVR{test}
NVR{test} is the decoy. The other string is the flag.