From Static domain to Account Takeover
A short walk through how a static page that looked empty led to leaking activation links and full account takeover.
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.
Context
The target here is a domain that presented itself as a static page. It barely qualified as a website: a single image, a disabled HTML form positioned off to the left, and nothing else. There were no directories worth brute forcing, nothing archived in the Wayback Machine, and nothing useful surfaced through search engines.
The interesting part is how this page relates to the main application. The main web application had its own legitimate registration form. When a registration submitted there failed validation, the site redirected the user to this static domain, where the flawed flow lived. So the "boring" static page was reachable from the main site simply by following an error path.
Setup
The work started during general reconnaissance, and the researcher registered a first test account during the process. The main tool was Burp, used to intercept and modify the validation and registration traffic. No versions or specific configuration details are given.
Finding it
The researcher almost moved on, but the disabled form caught their attention. Reading the page source to inspect input names is a habit when hunting for XSS or other client-side issues, and the raw HTML is the first place they look. The form had only three inputs: Name, Country and Email.
Exploitation
Step 1: Populating the disabled form through URL parameters
The researcher wanted to see whether the page would accept values straight from the URL, so they opened this:
https://sub.domain.com/index.html?name=test&country=test&email=test
With the values pre-filled, a Submit button appeared beneath the form. Clicking it produced an error: Invalid Country Code. Typing test into the country field had seemed reasonable at first, so the researcher assumed the server wanted a real country and tried a few names. Each one threw the same error. Reading the message carefully made the difference: it said country code, not country. The field wanted a code, not a name.
Step 2: Passing country validation
Entering US moved the flow on. The next message was Invalid Email Address.
Step 3: Intercepting the email validation
To see why the email was rejected, the researcher turned on Burp and watched the traffic. The flow first called /countryValidate and then /emailValidate. The email validator returned a plain JSON response:
{
"is_valid": false,
"reason": "domain"
}
Step 4: Flipping the validation response
In Burp, the researcher edited the validation response, flipped the value to "is_valid": true, dropped the reason field, and forwarded it to the browser. With the response now reporting that validation had passed, the browser carried on and submitted the registration request to /register. The error was gone and the request went through successfully. The only catch was that no confirmation code ever landed in the email inbox.
Step 5: Reading the activation link from the registration response
After forwarding the registration request, the researcher watched the server response in Burp. It included an activation link, in plain text, right in the body:
{
"activation_link": "https://auth.domain.com/activate?[redacted]"
}
Opening the activation link in the browser logged straight into the account, with no email inbox required. That was the first time the researcher saw the activation token being handed back to the client.
Step 6: Repeating the flow against an existing account
The next idea was to register with an email that already had an account on the site. The researcher used the first test account's email, the one registered earlier with the same technique. Working through the flow again, bypassing the country code and the validation step, the final request was sent and the response intercepted in Burp. The activation link was sitting right there in it. Opening it directly logged straight into the first account, just from knowing the email address. That was a full account takeover, with no interaction required from the victim.
Root cause
The core mistake is that the server returned the activation link, including the token, directly in the /register response body instead of delivering it only to the email address. Anyone who can drive the registration flow and knows a target email address receives a valid activation token for that account.
The validation step did not stop this because the client trusted the /emailValidate response, and that response could be edited in transit by the user. Flipping "is_valid" to true and removing reason was enough for the browser to proceed to /register. The report does not describe any server-side re-check of the email before issuing the token.
Impact
Anyone who can trigger this flow and knows a target email address can obtain a valid activation token and take over that account, with no interaction required from the victim. The researcher demonstrated this against their own first test account, logging straight into it after repeating the flow with its email address.
Fix
The report does not describe any fix that was applied. Based on the behaviour, the activation link should not be returned in the /register response body at all, and should be delivered only to the email address. The email validation result should also be enforced server-side at the point of registration, rather than trusted from a client-side response that the user can modify.
Variants to test
- Static or orphaned pages with disabled forms. Read the page source and look for input names, then try populating them through URL parameters. A positive result is a hidden Submit button appearing and the flow moving forward.
- Validation endpoints that return JSON verdicts. Watch for calls such as
/emailValidateor/countryValidateand try editing the response in Burp, flipping the validity flag and removing the reason. A positive result is the client proceeding to the next step. - Registration responses that include links or tokens. Inspect the
/registerresponse body for activation links, tokens or codes. A positive result is an activation link in plain text that logs you in without email. - Re-registration with an existing email. Repeat the flow using an email that already has an account. A positive result is a token for that existing account being returned.
- Error paths from the main application. Submit a registration on the main site that fails validation and follow the redirect. A positive result is landing on a separate domain that hosts the flawed flow.
What happened, in plain words
A security researcher was looking around the internet, the way people do when they hunt for bugs, and found a website that looked almost empty. It had one picture, a form that was greyed out and could not be used, and nothing else. Most people would have closed the tab. The researcher did not, and that decision led to a serious problem: anyone who knew your email address could take over your account on the main website, without you doing anything at all.
This article walks through that story slowly, for someone who has never done security work. Every technical word is explained the first time it appears, and there is a glossary at the end. The point is not to turn you into a hacker in five minutes, but to show you how a boring-looking page, a few small observations and one tool can add up to a real attack.
The setup: what the researcher was doing
Before the details, a few ideas you need.
Reconnaissance (often shortened to recon) means looking around a target before attacking it: finding which websites exist, what pages they have, what they are built with. It is like walking around a building before trying the doors, noting where the windows are and which ones look loose.
A static page is a web page that is just a fixed file. It does not change based on who you are, it does not look anything up in a database, and it does not remember you. A photo gallery page or a simple "about us" page is usually static. The opposite is a dynamic page, which is generated fresh each time, for example your bank statement page.
The Wayback Machine is a public archive that stores old copies of web pages. Researchers use it to see what a site looked like in the past, because old pages sometimes still exist on the server even after they are removed from the menu.
Brute forcing directories means trying a long list of common folder and file names against a website (like /admin, /backup, /test) to see if any of them exist and are reachable. It is like trying every key on a keyring on a door.
Burp (short for Burp Suite) is a tool that sits between your browser and the website. Normally your browser talks directly to the server. With Burp switched on, every request your browser sends and every response the server sends passes through Burp first, and you can read it, pause it, and change it before letting it continue. Think of it as a postal worker who lets you open, read and rewrite letters before delivering them.
A request is the message your browser sends to a server when you click a link or submit a form: "please give me this page" or "here is my registration data". A response is the server's reply. Both are just text, and Burp lets you see that text.
JSON is a common way for computers to exchange data as text. It looks like a list of labels and values in curly braces, for example {"name": "test"}. It is designed to be easy for programs to read, and it is also easy for a human to read once you know the shape.
An endpoint is a specific address on a server that does a specific job, like /register or /emailValidate. When you see a slash followed by a word, that is usually an endpoint.
An API is the set of endpoints a website's own pages use behind the scenes to talk to its server. When you fill in a form, your browser often does not send the whole page back; it sends a small request to an API endpoint, gets a short JSON answer, and updates the page. It is like a restaurant: the menu is the website, the kitchen is the server, and the waiter carrying orders back and forth is the API.
With those words in hand, here is what the researcher found.
Finding the page
The researcher was doing general reconnaissance and came across a domain that was completely static. It barely counted as a website: a single image, a disabled HTML form off to the left, and nothing else. There were no directories to brute force, nothing archived in the Wayback Machine, and nothing useful in search results.
A domain is a name like example.com that points to a server. A subdomain is a name in front of it, like sub.domain.com, which can point to a different server or a different part of the same one.
An HTML form is the part of a page with boxes you type into and a button you press to send the values. Disabled means the boxes and the button are greyed out and cannot be used: the browser refuses to let you type or click. It looks like a form that was switched off and forgotten.
It looked boring, and the researcher almost moved on. But the disabled form caught their attention, so they opened the page source to read the input names. Page source is the raw text the browser receives and turns into the page you see. You can view it in any browser with a right-click and "View page source", or with a keyboard shortcut. Reading it is a habit when hunting for XSS (cross-site scripting, a class of bug where a site lets an attacker's code run in other people's browsers), because the raw HTML is always the first place to look.
An input name is the label a form gives to each box, so the server knows which value is which. If a box is called email, the server receives email=... when the form is sent. Reading those names tells you what the server expects, even when the form is disabled on screen.
The form had only three inputs: Name, Country and Email.
Step 1: Filling in a disabled form through the URL
A URL parameter (also called a query string) is the part of a web address after a question mark. It is a list of name=value pairs separated by &. For example, ?name=test&country=test&email=test says "name is test, country is test, email is test". Many pages read these values and pre-fill their forms with them, because it is a convenient way to share a link with a form already partly filled in.
The researcher wanted to see whether this page would accept values straight from the URL, so they opened this:
https://sub.domain.com/index.html?name=test&country=test&email=test
Line by line:
https://is the secure version of the protocol browsers use to talk to websites. Thesstands for secure, meaning the traffic is encrypted.sub.domain.comis the address of the server. It is written here as a placeholder; the real name is not given./index.htmlis the specific file being requested.index.htmlis the conventional name for a website's main page.?marks the start of the parameters.name=testsets the Name box to the wordtest.&country=testsets the Country box totest.&email=testsets the Email box totest.
With the values pre-filled, a Submit button appeared beneath the form. That is already interesting: the form was disabled on screen, but the page still read the URL and switched itself on. The researcher clicked Submit and got an error: Invalid Country Code.
At first this seemed reasonable. They had typed test into the country field, so they assumed the server wanted a real country name and tried a few. Each one threw the same error. It was only when they actually read the message that it clicked: it said country code, not country. The field wanted a code, not a name.
A country code is the short two-letter abbreviation used in addresses and phone systems, like US for the United States or GB for the United Kingdom. The server was checking the format of the value, not whether the country existed.
Step 2: Passing the country check
Entering US moved the flow on. The next message was Invalid Email Address.
So the page had two checks in a row: first the country, then the email. The country check was easy to satisfy once the message was read properly. The email check was the interesting one, because the researcher's email was real, and it was still being rejected.
Step 3: Watching the email check with Burp
To see why the email was rejected, the researcher turned on Burp and watched the traffic. The flow first called /countryValidate and then /emailValidate.
Traffic here means the requests and responses flying between the browser and the server. Watching it in Burp shows you the hidden conversation behind the page: which endpoints are called, in what order, and what they answer.
The email validator returned a plain JSON response:
{
"is_valid": false,
"reason": "domain"
}
Line by line:
- The outer
{and}wrap a single JSON object, which is a set of labelled values. "is_valid": falseis a label calledis_validwith the valuefalse. In plain words: "this email is not valid"."reason": "domain"is a label calledreasonwith the valuedomain. In plain words: "the problem is with the domain part of the address", that is, the part after the@.
So the server was telling the browser "no", and giving a reason. The important question was: who acts on that answer? If the browser reads this JSON and decides whether to continue, then the browser is the one enforcing the rule. And anything the browser receives can be changed before the browser sees it, because Burp sits in the middle.
Step 4: Changing the answer in Burp
In Burp, the researcher edited the validation response, flipped the value to "is_valid": true, dropped the reason field, and forwarded it to the browser.
Intercepting means pausing a message inside Burp so you can edit it. Forwarding means releasing it so it continues to its destination. Here the destination was the browser, so the browser received a response that said the email was valid, even though the server had said the opposite.
With the response now reporting that validation had passed, the browser carried on and submitted the registration request to /register. The error was gone and the request went through successfully. The only catch was that no confirmation code ever landed in the email inbox.
The browser acted on the email validation response, and that response could be edited in transit. The browser asked "is this email valid?", got an answer, and then acted on whatever answer came back. Since the user controls their own browser and the traffic in between, the user can simply lie. It is like a bouncer who asks you "are you on the list?" and believes you when you say yes, instead of checking the list himself.
Step 5: The activation link in the response
After forwarding the registration request, the researcher watched the server response in Burp. It included an activation link, in plain text, right in the body:
{
"activation_link": "https://auth.domain.com/activate?[redacted]"
}
Line by line:
- The outer
{and}wrap a JSON object, the same shape as before. "activation_link"is the label. Its value is the link that follows.https://auth.domain.com/activateis the address of the page that activates an account.authsuggests an authentication server, the part of the system that handles logging in.?[redacted] is a URL parameter calledtoken. Its value starts witheyJhbGciand is cut off with...` in the report. The full value is not shown.
A token is a long, hard-to-guess string that acts as proof of identity. Think of it as a cloakroom ticket: whoever holds the ticket gets the coat, and the ticket is not something you can guess. An activation link is a link sent to a new user to prove they own the email address they registered with. Normally it arrives by email, and clicking it confirms the account.
Opening the activation link in the browser logged straight into the account, with no email inbox required. That was the first time the researcher saw the activation token being handed back to the client.
The client means the browser, the program on the user's side. The server is the machine that holds the data and makes the decisions. Handing the token back to the client is the mistake: the token was supposed to go only to the email address, so that only the person who controls that inbox could use it. Instead it went to whoever made the request, which is the person attacking.
Step 6: Taking over an existing account
Then the researcher had an idea: what if they tried to register with an email that already had an account on the site? They used their first test account's email, the one they had registered earlier with the same technique. They worked through the flow again, bypassing the country code and the validation step, and when they sent the final request and intercepted the response in Burp, the activation link was sitting right there in it. They opened it directly and were logged straight into the first account, just from knowing the email address.
That was a full account takeover, with no interaction required from the victim. Account takeover means logging in as someone else and having the same access they do. "No interaction required" means the victim does not have to click anything, open an email, or even be online. The attacker only needs to know the email address.
This is the moment the bug went from "a strange page" to "critical". Registering a new account and getting its own activation link is odd but limited. Getting the activation link for an account that already exists means you can log in as its owner.
Why it works: the root cause
The core mistake is that the server returned the activation link, including the token, directly in the /register response body instead of delivering it only to the email address. Anyone who can drive the registration flow and knows a target email address receives a valid activation token for that account.
The validation step did not stop this because the client trusted the /emailValidate response, and that response could be edited in transit by the user. Flipping "is_valid" to true and removing reason was enough for the browser to proceed to /register. The report does not describe any server-side re-check of the email before issuing the token.
Server-side means the check happens on the server, where the user cannot reach it. Client-side means the check happens in the browser, where the user is in full control. A rule that only exists client-side is a suggestion, not a rule.
How the static page connects to the main app
The main web application had its own, legitimate registration form. If you submit a registration there and it fails validation, the site redirects you to this static domain, where the flawed flow lives. So the "boring" static page is reachable from the main site simply by following an error path.
A redirect is the server telling your browser "the page you want is over there, go to this other address instead". An error path is the route a site takes when something goes wrong, for example when a form fails validation. Error paths are often less polished than the main flow, and that is exactly why they are worth following.
This detail matters because it explains how the page connects to the main site: a failed registration there redirects to it.
The full attack chain
- Spotted a static page that looked empty, with a disabled form.
- Populated the form through URL parameters, which revealed a Submit button.
- Passed country validation with a valid code (
US). - Intercepted the
/emailValidateresponse in Burp and flipped it to valid. - The client then submitted the registration to
/register. - The server returned an activation link directly in the response body.
- Opening that link logged straight into the new account.
- Repeating with an already-registered email leaked that account's token, granting full access.
Read the chain as a story: a page nobody would look at, a form that switched on when values came from the URL, a check that could be satisfied by reading the error message, a second check that could be edited in transit, and a server that handed out the key instead of posting it to the owner.
Impact
Anyone who can trigger this flow and knows a target email address can obtain a valid activation token and take over that account, with no interaction required from the victim. The researcher demonstrated this against their own first test account, logging straight into it after repeating the flow with its email address.
In plain terms: if you had an account on the main site, and someone knew the email address you registered with, they could log in as you. They would not need your password, and you would not have to do anything.
Fix
The report does not describe any fix that was applied. Based on the behaviour, the activation link should not be returned in the /register response body at all, and should be delivered only to the email address. The email validation result should also be enforced server-side at the point of registration, rather than trusted from a client-side response that the user can modify.
In everyday terms: post the key to the owner's house, do not hand it to whoever asks. And check the list yourself at the door, do not ask the visitor whether they are on it.
Variants to test
These are the same ideas generalised, so you can look for similar bugs elsewhere. Each one names what to look at and what a positive result looks like.
- Static or orphaned pages with disabled forms. Read the page source and look for input names, then try populating them through URL parameters. A positive result is a hidden Submit button appearing and the flow moving forward.
- Validation endpoints that return JSON verdicts. Watch for calls such as
/emailValidateor/countryValidateand try editing the response in Burp, flipping the validity flag and removing the reason. A positive result is the client proceeding to the next step. - Registration responses that include links or tokens. Inspect the
/registerresponse body for activation links, tokens or codes. A positive result is an activation link in plain text that logs you in without email. - Re-registration with an existing email. Repeat the flow using an email that already has an account. A positive result is a token for that existing account being returned.
- Error paths from the main application. Submit a registration on the main site that fails validation and follow the redirect. A positive result is landing on a separate domain that hosts the flawed flow.
Key takeaway
It took about an hour from first spotting the static page to leaking an activation link. The lesson is simple: do not ignore static domains. Read the source, try simple URL parameters, and inspect the network calls. A little persistence and some muscle memory for these steps will surface real issues hiding behind pages that look boring at first glance.
For a beginner, the most useful part is the habit, not the trick. Look at the raw page. Try the obvious parameters. Open the developer tools or Burp and read what the browser and server actually say to each other. Ask, for every check you see, whether the browser is deciding or the server is deciding. Most of the time the answer is fine. Occasionally it is not, and that is where the interesting bugs live.
Glossary
- Account takeover: logging in as another person and having the same access they do, usually without their password.
- Activation link: a link sent to a new user to prove they own the email address they registered with.
- API: the set of endpoints a website's pages use behind the scenes to talk to its server.
- Brute forcing directories: trying a long list of common folder and file names against a site to see which exist.
- Burp (Burp Suite): a tool that sits between browser and server so you can read, pause and edit the traffic.
- Client: the program on the user's side, usually the browser.
- Client-side: a check or action that happens in the browser, where the user is in control.
- Country code: the short two-letter abbreviation for a country, such as
US. - Disabled form: a form whose boxes and button are greyed out and cannot be used.
- Domain: a name like
example.comthat points to a server. - Dynamic page: a page generated fresh each time, often from a database.
- Endpoint: a specific address on a server that does a specific job, such as
/register. - Error path: the route a site takes when something goes wrong, such as a failed form submission.
- Forward (in Burp): releasing an intercepted message so it continues to its destination.
- HTML form: the part of a page with boxes to type into and a button to send the values.
- Input name: the label a form gives each box so the server knows which value is which.
- Intercept: pause a message inside a tool so you can read or edit it before it continues.
- JSON: a text format for exchanging data as labelled values in curly braces.
- Page source: the raw text the browser receives and turns into the page you see.
- Reconnaissance (recon): looking around a target before attacking, to find what exists and how it is built.
- Redirect: the server telling the browser to go to a different address instead.
- Request: the message a browser sends to a server.
- Response: the server's reply to a request.
- Server: the machine that holds the data and makes the decisions.
- Server-side: a check or action that happens on the server, out of the user's reach.
- Static page: a fixed page that does not change per user and does not look anything up.
- Subdomain: a name in front of a domain, like
subinsub.domain.com. - Token: a long, hard-to-guess string that acts as proof of identity, like a cloakroom ticket.
- Traffic: the requests and responses travelling between browser and server.
- URL parameter (query string): the
name=valuepairs after a?in a web address, separated by&. - Wayback Machine: a public archive of old copies of web pages.
- XSS (cross-site scripting): a class of bug where a site lets an attacker's code run in other people's browsers.