Skip to content
XSS Write-up Beginner

How “I hacked the Dutch government and got the lousy t-shirt”

The author found reflected cross-site scripting, information leakage, and open redirection vulnerabilities on Dutch government websites. An attacker could execute scripts in a victim's browser, leak information, or redirect users to malicious sites.

IamDEAD Follow

Published on medium.com

Hello everyone, This is my first write-up. In this write-up, I will try to explain how I was able to find 6 vulnerabilities in the Dutch government and I was awarded this cool swag for finding vulnerabilities on their website.

IamDEAD, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 4 min read.

Context

This is a short account of a first bug bounty effort against the Dutch government, written by the researcher IamDEAD. The target was not a single application but a broad set of Dutch government domains, and the goal was to find vulnerabilities that the government would accept through its coordinated vulnerability disclosure (CVD) process. The report does not describe any individual product or feature in detail; it describes a reconnaissance-driven sweep across many hosts, looking for reflected cross-site scripting (XSS), information leakage and open redirection.

The author's stated motivation was the swag from the Dutch government, which they had seen in some blogs and wanted. The phrase "hacked the Dutch government" was, in the author's words, cool enough to make the effort worthwhile.

Setup

There were no accounts, roles or special access. The only precondition was a list of in-scope domains. The author found scope lists in public repositories and gists and points readers to them:

Findings were to be submitted through the NCSC's CVD report form at https://english.ncsc.nl/contact/reporting-a-vulnerability-cvd/cvd-report-form.

The tools used were:

  • Aquatone, for host discovery and screenshots of default pages
  • Gobuster, for content discovery
  • Nmap, for scanning
  • waybackurls, for pulling historical URLs from the Wayback Machine

Finding it

The author started with a large list of domains and used Aquatone to work out which hosts were live and what their default pages looked like:

Bash
cat targets.txt | aquatone

From the resulting set, some targets were picked at random and scanned with Gobuster and Nmap. The report notes that mass-scanning tools could be used as well, but that this pass produced nothing. The pivot that worked was historical URL data: waybackurls was used to collect archived URLs for a target, and the output was filtered for URLs containing a query string:

Bash
waybackurls example.nl > test.txt

cat test.txt | grep “query=”

The grep keeps only lines that contain query=, which is a rough way of isolating endpoints that take parameters and are therefore candidates for reflected input. The author then tried XSS payloads against those endpoints. The report does not show the payloads, the affected hosts, the parameters or the responses; it only states that the attempt succeeded ("bingo").

Exploitation

The report gives no step-by-step exploitation detail. What it does state is the outcome of the sweep: three reflected XSS findings, two information leakage findings and one open redirection. Of these six, four were closed as duplicate or as not applicable because they were on static pages. Two reports were accepted.

Because the original does not include the requests, payloads or responses for any of the six findings, there is nothing further to reproduce here. The only technique documented in any detail is the waybackurls plus grep "query=" filter above, which is what surfaced the parameterised endpoints that were then tested.

Root cause

The report does not analyse the underlying code or configuration for any of the findings. For the reflected XSS, the implied cause is that a query parameter taken from the URL was echoed back into the response without adequate output encoding. For the open redirection, the report gives no mechanism. For the information leakage, the report says nothing about the mechanism. These are inferences from the finding categories, not statements made in the report.

Impact

The report does not assess impact per finding. In general terms, reflected XSS lets an attacker run script in the context of the affected government site when a victim follows a crafted link, and open redirection lets an attacker use the trusted domain to send users elsewhere. The information leakage findings are not described, so their impact cannot be stated. The author does not claim any specific data was exposed or any account was compromised.

Fix

It only records that two reports were considered valid.

Variants to test

The transferable technique here is mining archived URLs for parameterised endpoints and testing them. Concrete variations:

  1. Run waybackurls against every in-scope host, not just one, and deduplicate the output before filtering. A positive result is a larger set of unique URLs containing query strings that were not visible in the current site's navigation.
  2. Widen the filter beyond query=. Parameters named q, search, redirect, url, next, return, lang and id are common reflection and redirect sinks. A positive result is a parameter whose value appears verbatim in the response body or in a Location header.
  3. Test the same parameter with a harmless marker first, then with an XSS payload, and compare the encoding applied. A positive result is the marker appearing unencoded in an HTML, attribute or script context.
  4. For redirect parameters, supply an external URL and observe the Location header. A positive result is a 3xx response pointing at the external host rather than a relative path or an allowlisted domain.
  5. Check whether findings sit on static pages before reporting; the author lost four of six reports to duplicates or static-page rejections. A positive result here is confirming the endpoint is dynamic and not already covered by an existing report.

Closing

The author closes by thanking readers and promising more write-ups, and the page ends with the usual Medium app links.

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store From the original on medium.com
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 12 min read.

What happened, in plain words

A security researcher who goes by the name IamDEAD set out to find bugs in websites run by the Dutch government. This was their first public write-up, and it describes a fairly simple process: gather a big list of government web addresses, work out which ones are actually running, look through old archived copies of those sites for pages that accept input, and then try a well-known attack against those pages.

The result was six reported problems: three reflected cross-site scripting (XSS) findings, two information leakage findings and one open redirection. Four of the six were rejected, either because someone else had already reported the same thing (a duplicate) or because the affected page was static, meaning it does not change and cannot really be attacked in the way described. Two reports were accepted, and the author was awarded swag, which is the informal word for the branded merchandise (in this case a t-shirt) that some bug bounty programmes send to researchers as a thank-you.

The motivation was simple: the author had seen the swag in some blogs and wanted it. The phrase "hacked the Dutch government" was, in their words, cool enough to make the effort worthwhile.

A quick word on what a bug bounty or vulnerability disclosure programme is, since everything here depends on it. Governments and companies publish rules saying which of their systems you are allowed to test, how to report a problem, and what you might get in return. Testing outside those rules can be illegal, so the scope list is the single most important document. The Dutch government runs what is called coordinated vulnerability disclosure (CVD), and the report points to the NCSC's CVD report form for submitting findings.

Getting the list of targets

There were no accounts to create, no passwords to obtain and no special access of any kind. The only thing needed before starting was a list of web addresses that the government had said were fair game. The author found such lists in public repositories and gists (a gist is a small, shareable snippet of text hosted on GitHub) and points readers to them:

Findings were to be submitted through the NCSC's CVD report form at https://english.ncsc.nl/contact/reporting-a-vulnerability-cvd/cvd-report-form. The NCSC is the Dutch national cyber security centre; think of it as the office that receives reports and passes them to the right team.

The tools used were:

  • Aquatone, for host discovery and screenshots of default pages
  • Gobuster, for content discovery
  • Nmap, for scanning
  • waybackurls, for pulling historical URLs from the Wayback Machine

These are all command-line tools, meaning programs you run by typing their name into a terminal window rather than clicking buttons. A few concepts are worth explaining before the commands make sense.

A host is a single machine or website address on the internet, for example a name like example.nl. A domain is the broader name that hosts sit under. When you have hundreds of domain names, most of them will not respond at all, or will just show a placeholder page. Host discovery means checking each one to see whether something is actually running there.

The Wayback Machine is a public archive run by the Internet Archive that has been saving copies of web pages for years. If a page existed in 2015 and was deleted in 2018, the archive may still have a snapshot. That matters for security testing because old pages often still work even when nothing links to them any more, and old links often contain parameters that the current site has forgotten about.

A parameter (also called a query parameter) is the part of a web address after a question mark that passes a value to the site. In https://example.nl/search?query=shoes, the parameter is named query and its value is shoes. The site takes that value and does something with it, usually showing search results. Parameters are interesting to attackers because they are a direct channel for getting your own input into the site's response.

Finding it

The author started with a large list of domains and used Aquatone to work out which hosts were live and what their default pages looked like:

Bash
cat targets.txt | aquatone

Line by line:

  • cat targets.txt prints the contents of a file called targets.txt, which holds the list of domains, one per line. cat is short for concatenate and simply dumps a file's text to the screen.
  • The | symbol is a pipe. It takes whatever the left-hand command printed and feeds it as input to the command on the right, like connecting one hose to another.
  • aquatone reads that list, visits each address, records which ones respond, and takes a screenshot of each page it finds.

Why this step: with a huge list, you cannot visit everything by hand. Aquatone does the boring part automatically and gives you a visual overview, so you can spot which hosts are real applications and which are empty placeholders.

From the resulting set, some targets were picked at random and scanned with Gobuster and Nmap. Gobuster tries a list of common file and folder names against a site to see which ones exist, a bit like trying every key on a keyring to see which doors open. Nmap probes a machine to see which network services (such as a web server) are listening on it. The report notes that mass-scanning tools could be used as well, but that this pass produced nothing.

The approach that worked was historical URL data. waybackurls was used to collect archived URLs for a target, and the output was filtered for URLs containing a query string:

Bash
waybackurls example.nl > test.txt

cat test.txt | grep “query=”

Line by line:

  • waybackurls example.nl asks the Wayback Machine for every URL it has ever archived for the domain example.nl, and prints them one per line. example.nl here is a stand-in name; the report does not say which real domain was used.
  • > test.txt redirects that output into a file called test.txt instead of showing it on screen. The > symbol means "write to this file".
  • cat test.txt prints the file back out.
  • | grep “query=” pipes it into grep, a tool that searches text and keeps only the lines matching what you give it. Here it keeps only lines containing the characters query=, which is the tell-tale sign of a URL that carries a parameter.

Why this step: the Wayback Machine remembers URLs that the live site no longer advertises. Filtering for query= is a rough and quick way of isolating pages that accept input, because a URL with a parameter is a page that takes a value from the visitor and therefore has something to reflect back. Those pages are the candidates for reflected XSS.

Reflected XSS is the vulnerability class at the centre of this story, so here is what it means from zero. Cross-site scripting (XSS) is when a website takes something a visitor supplied and places it into the page without neutralising it, so that the visitor's browser treats it as code rather than as text. "Reflected" means the value comes in with the request and bounces straight back in the response; nothing is stored on the server. An everyday comparison: imagine a café that writes your name on your cup exactly as you say it. If you say "Alice" you get a cup for Alice. If you say something rude, the barista writes that on the cup too, and everyone who sees the cup reads it. The café failed to check what it was copying. In a browser, the "rude name" is a small piece of JavaScript, and because the browser believes it came from the trusted government site, it runs it with that site's privileges.

The author then tried XSS payloads against those endpoints. A payload here just means the specific piece of input you send to test whether the site mishandles it. The report does not show the payloads, the affected hosts, the parameters or the responses; it only states that the attempt succeeded ("bingo").

What came of it

The report gives no step-by-step exploitation detail. What it does state is the outcome of the sweep: three reflected XSS findings, two information leakage findings and one open redirection. Of these six, four were closed as duplicate or as not applicable because they were on static pages. Two reports were accepted.

A duplicate means someone else reported the same issue first, so credit goes to them. "Not applicable" here means the page was static: a fixed page with no server-side logic taking input, so the reported behaviour could not actually be exploited. Open redirection is when a site accepts a destination address from the URL and forwards the visitor there without checking it, so an attacker can craft a link on the trusted government domain that quietly sends people to a malicious site. The comparison is a trusted receptionist who will walk you to any address you name, including a stranger's house, because nobody gave them a list of approved destinations.

Because the original does not include the requests, payloads or responses for any of the six findings, there is nothing further to reproduce. The only technique documented in any detail is the waybackurls plus grep "query=" filter above, which is what surfaced the parameterised endpoints that were then tested.

Why the bugs existed

The report does not analyse the underlying code or configuration for any of the findings. For the reflected XSS, the implied cause is that a query parameter taken from the URL was echoed back into the response without adequate output encoding. Output encoding means converting characters that have special meaning in a web page (such as < and >) into harmless equivalents before displaying them, so the browser shows them as text instead of treating them as instructions. For the open redirection, the report gives no mechanism. For the information leakage, the report says nothing about the mechanism. These are inferences from the finding categories, not statements made in the report.

What the impact could be

The report does not assess impact per finding. In general terms, reflected XSS lets an attacker run script in the context of the affected government site when a victim follows a crafted link, which could let the attacker act as the victim on that site or show fake content under a trusted name. Open redirection lets an attacker use the trusted domain to send users elsewhere, which is useful for phishing because the first part of the link looks legitimate. The information leakage findings are not described, so their impact cannot be stated. The author does not claim any specific data was exposed or any account was compromised.

What was fixed

It only records that two reports were considered valid.

Ways to try the same approach

The transferable technique here is mining archived URLs for parameterised endpoints and testing them. Concrete variations:

  1. Run waybackurls against every in-scope host, not just one, and deduplicate the output before filtering. A positive result is a larger set of unique URLs containing query strings that were not visible in the current site's navigation.
  2. Widen the filter beyond query=. Parameters named q, search, redirect, url, next, return, lang and id are common reflection and redirect sinks. A positive result is a parameter whose value appears verbatim in the response body or in a Location header. The Location header is the part of a web server's reply that tells the browser where to go next when a page has moved.
  3. Test the same parameter with a harmless marker first, then with an XSS payload, and compare the encoding applied. A positive result is the marker appearing unencoded in an HTML, attribute or script context.
  4. For redirect parameters, supply an external URL and observe the Location header. A positive result is a 3xx response pointing at the external host rather than a relative path or an allowlisted domain. A 3xx response is the family of status codes a server uses to mean "look somewhere else".
  5. Check whether findings sit on static pages before reporting; the author lost four of six reports to duplicates or static-page rejections. A positive result here is confirming the endpoint is dynamic and not already covered by an existing report.

Closing

The author closes by thanking readers and promising more write-ups, and the page ends with the usual Medium app links.

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store From the original on medium.com
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

Glossary

  • Aquatone: a command-line tool that takes a list of hosts, checks which are live and captures screenshots of their pages.
  • Bug bounty / vulnerability disclosure programme: a scheme where an organisation publishes rules for testing its systems and a way to report problems, sometimes with a reward.
  • CVD (coordinated vulnerability disclosure): reporting a security problem privately to the owner, who fixes it before details become public.
  • Domain: a registered name on the internet, such as example.nl, under which websites and other services sit.
  • Duplicate: a report of a problem that someone else has already reported.
  • Gist: a small piece of text or code shared publicly on GitHub.
  • Gobuster: a command-line tool that tries lists of common file and folder names against a website to find hidden ones.
  • grep: a command-line tool that searches text and keeps only the lines matching a pattern.
  • Host: a single machine or website address on the internet.
  • Information leakage: a broad label for a site revealing information it should not, such as internal details in an error message.
  • Location header: the part of a web server's reply that tells the browser where to go next after a redirect.
  • Nmap: a command-line tool that probes a machine to see which network services are running on it.
  • Not applicable: a report rejected because the described behaviour cannot actually be exploited, for example on a static page.
  • Open redirection: a flaw where a site accepts a destination address from the URL and forwards visitors there without checking it.
  • Output encoding: converting characters with special meaning in a web page into harmless equivalents before displaying them.
  • Parameter (query parameter): the part of a web address after a question mark that passes a value to the site, as in ?query=shoes.
  • Payload: the specific input you send to test whether a site mishandles it.
  • Pipe (|): a shell symbol that feeds the output of one command into another.
  • Reflected XSS: cross-site scripting where the attacker's input bounces straight back in the response without being stored on the server.
  • Scope: the list of systems an organisation has authorised for testing.
  • Static page: a fixed page with no server-side logic taking input, so it cannot be exploited in the way described.
  • Swag: branded merchandise given as a thank-you, such as a t-shirt.
  • 3xx response: a family of HTTP status codes meaning the browser should look somewhere else.
  • Wayback Machine: a public archive of old copies of web pages, run by the Internet Archive.
  • waybackurls: a command-line tool that fetches every URL the Wayback Machine has archived for a domain.
  • XSS (cross-site scripting): a flaw where a site places visitor-supplied input into a page without neutralising it, so the browser runs it as code.

More from Dutch Government

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.