Skip to content
Access control Write-up Intermediate

Unhiding the hidden

An internal administrator subdomain exposed a hidden admin module and its functionalities to unauthenticated users because the server sent flags like admin:false in responses and only enforced access control on the client side. An attacker could view admin pages and, combined with a missing CSRF token, potentially trick a real administrator into creating a new user.

I am Broot Follow

Published on medium.com

Bounty$530 View original

{{media:0}}

I am Broot, 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. 6 min read.

Context

This is an account of a first bug bounty engagement, paid $530, against a target the author calls domain.com. The interesting host was a subdomain, iambroot.domain.com, which served a plain login page on port 443. The page had no registration, no password reset and no contact form: just a username and password field, plus a message telling users to contact the administrator if they had login problems. Behind that login page sat an administrator module with more than 25 administrative functions, including creating new users with administrative privileges, modifying system entries and configurations, viewing and updating logs, and regenerating access tokens. Those functions were meant for internal administrators only.

The write-up is about how an unauthenticated user could reach that module and its individual screens, and how the missing request verification token made a CSRF attack possible in principle.

Setup

No accounts were used. The researcher worked entirely as an unauthenticated user. The tools mentioned are an open-source subdirectory enumeration tool, a network scan of the subdomain, and Burp, whose logs and interception features carry most of the story. No product versions are given.

The subdomain was reachable from the internet; the report notes it looked like it was intended for internal usage only.

Finding it

Step 1: Reconnaissance

Subdomain enumeration against domain.com turned up iambroot.domain.com. A quick network scan showed only ports 443 and 80 open, so the attack surface was the web application itself.

Step 2: Blackbox

Port 443 served the basic login page described above. The researcher tried some basic authentication bypass test cases, found nothing, and decided to move on, assuming a dead end. Before leaving, though, the Burp logs of traffic to and from the subdomain were reviewed, and one application response stood out.

Step 3: Unauthorized access to the administrator module

One of the responses returned when the domain was accessed contained a set of parameters that looked wrong for an unauthenticated visitor:

Text
"admin":"false", "allowDeploy":"false", "allowManage":"false"

The site was refreshed, the same request was captured in Burp, and the values in the response were changed to:

Text
"admin":"true", "allowDeploy":"true", "allowManage":"true"

A hidden administrator module then appeared on the screen. It exposed more than 25 administrator functionalities, but every attempt to open any of them redirected back to the login page.

Exploitation

Step 4: Unauthorized access to administrator functionalities

One of the functions was creating a new user. Accessing it redirected to the login page, so the request was intercepted again to inspect the server's response. The server was returning a 401 Unauthorized status code whenever an administrator function was accessed, and that response in turn triggered the request to the login page.

Image for post
Image for post From the original on medium.com

The screenshot shows that 401 Unauthorized response for the administrator function.

The same request was intercepted once more and the response was modified. The redirect to the login page no longer happened and the administrator function could be viewed.

The screenshot shows the modified response that let the function render.

Using the same approach, every functionality in the administrator module could be accessed. Submitting a form was different: the application redirected to the login page again. Modifying the response only bypassed client-side validation, and the server-side validation stopped the creation of a new user. The researcher describes this as a dead end: read-only access to the administrator module and its individual functions, with no form submissions and no unauthorised operations carried out. The one useful side effect was being able to see form submission requests before the server validated them, together with the 401 Unauthorized error the server sent back.

Step 5: Cross-Site Request Forgery (CSRF)

The application requests carried no request verification token, which could allow a CSRF attack. Knowing what the administrator form submission requests looked like, the researcher crafted a sample CSRF payload that would create a new user when a real administrator was tricked into executing it. The payload itself is not reproduced in the write-up.

Step 6: Responsible Disclosure

The observations were emailed to the company's security team as part of their vulnerability disclosure programme. The issues were fixed by:

  1. Applying server-side validation on all requests, so unauthenticated users can no longer view the administrator module and its functionalities.
  2. Adding a request verification token in the request headers.
  3. Removing public access to the entire subdomain, which looked like it was intended for internal usage only.

Root cause

The application decided what to show in the browser from values in the response body (admin, allowDeploy, allowManage) and from the status code of individual function requests, and those client-side checks could be bypassed by editing responses. The server did reject the actual operations through server-side validation, which is why form submissions failed, but the interface trusted the response enough to render the administrator module and its screens once those values were edited in transit. In other words, the UI was gated by data the user could change, while the real check lived only on the operations themselves.

The CSRF exposure is separate: form submissions had no request verification token, so a request forged from another site would be indistinguishable from one made by the administrator.

Impact

As an unauthenticated user, the researcher could view the administrator module and all of its individual functionalities, read-only. No unauthorised operation was completed, because server-side validation rejected the submissions. The realistic damage comes from the CSRF chain: if a real administrator were tricked into executing the crafted payload, a new user would be created. The write-up does not state that this was demonstrated against a live administrator.

Fix

The company applied server-side validation on all requests, added a request verification token in the request headers, and removed public access to the subdomain. The first two address the client-side enforcement and the CSRF gap; the third removes the exposure of an internal-only host entirely.

Variants to test

  1. Boolean flags in JSON responses. Look for fields such as admin, isAdmin, allowManage or allowDeploy in responses to unauthenticated requests. A positive result is that flipping them in Burp makes a hidden menu or module appear.
  2. Status codes that drive redirects. Watch for 401 or 403 responses that the front end turns into a login redirect. A positive result is that changing the status code in the response renders the protected screen.
  3. Per-function checks. After the module renders, open each function individually; some may enforce the check only on the module itself. A positive result is a function screen that loads without a redirect.
  4. Form submissions without tokens. Submit administrator forms and inspect the request for a verification token. A positive result is a state-changing request that carries no token, which is the precondition for a CSRF payload.
  5. Internal-only subdomains. Enumerate subdomains and check whether ones that look internal are reachable from the internet. A positive result is a login page or admin interface answering publicly.
  6. Logs as a source of findings. Review proxy history for responses that differ from what the UI shows, as the original response here did. A positive result is any response containing authorisation data the client is not supposed to control.

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. 15 min read.

What happened, in plain words

A security researcher spent some time looking for a bug in a company's website. This was their first paid bug bounty engagement, and it earned them $530. The target is called domain.com in the write-up. While looking around, they found a subdomain, iambroot.domain.com, that showed nothing but a simple login page: a username box, a password box, and a note telling people to contact the administrator if they could not log in. No sign-up, no password reset, no contact form.

Behind that login page was an administrator area with more than 25 functions meant only for internal staff: creating new users with administrative privileges, changing system entries and configurations, viewing and updating logs, regenerating access tokens, and so on.

The researcher never had a valid account. They worked the whole time as an unauthenticated user, meaning someone the site does not recognise as logged in. What they discovered was that editing values the server sent back in a response, on the way from the server to the browser, made a hidden administrator menu appear. By flipping a few of them from false to true, a hidden administrator menu appeared. The server still refused to actually carry out any administrator action, so the researcher could look at the screens but not use them. Separately, the forms in that area had no request verification token, a small secret value that proves a form submission really came from the site itself. That gap opened the door to a cross-site request forgery (CSRF) attack: a trick that makes a logged-in administrator's browser send a request the administrator never intended. The researcher built a sample payload that would create a new user if a real administrator were lured into running it.

The company fixed three things: it started checking every request on the server, it added a request verification token to request headers, and it removed public access to the whole subdomain, which looked like it was only ever meant for internal use.

Below, each step is explained from scratch. If you can use a browser, you can follow it.

Some background before we start

A few ideas come up again and again, so here they are first.

What a web page really is. When you type an address into your browser, the browser sends a request to a server (a computer somewhere that holds the website). The server sends back a response. The response has two parts that matter here: a status code, which is a three-digit number saying how things went, and a body, which is the actual content, often written in a format called JSON. JSON is just text that lists names and values in pairs, a bit like a labelled form: "name":"value". Your browser reads the response and draws the page.

What an API is. Many websites are built from two pieces: a front end (what you see and click) and a back end (the server that holds the data and does the work). They talk to each other through an API, which is simply a set of addresses on the server that accept requests and return data, usually as JSON. Think of a restaurant: the menu and the waiter are the front end, the kitchen is the back end, and the API is the order slip passed between them. If you can read or edit the order slip, you can learn a lot about the kitchen.

Status codes. 200 means fine. 401 Unauthorized means the server does not know who you are, or you have not proved it, so it refuses. 403 Forbidden means the server knows who you are but you are not allowed. These numbers are how the server tells the front end what happened.

Client side and server side. "Client side" means code running in your browser. "Server side" means code running on the company's machine. The client is under your control: you can edit what it receives and what it sends. The server is not. A golden rule of web security is that any check that matters must happen on the server, because checks in the browser can be bypassed.

What a proxy is, and what Burp is. A proxy sits between your browser and the server and lets you read and change every request and response. Burp Suite is a popular tool for this. It also keeps a log (history) of everything that passed through, which is useful later even if you did not notice something at the time. Think of a postal worker who opens every letter, can rewrite it, and keeps a copy of everything.

What a cookie or token is. After you log in, the server usually gives your browser a small piece of data, a cookie or a token, which the browser sends back with every later request so the server knows it is still you. It works like a wristband at an event: show it at the door and you get in without proving who you are again. If someone else gets your wristband, they can pretend to be you. That is why these values are sensitive and are redacted wherever they appear.

What CSRF is. Cross-site request forgery is a trick. You are logged in to a site, so your browser holds your wristband. You then visit a malicious page. That page quietly makes your browser send a request to the site you are logged in to, wristband and all. The site sees a valid request from a logged-in user and acts on it, even though you never meant to do anything. The usual defence is a request verification token: a random value the site puts into each form, which the malicious page cannot know, so the forged request is rejected.

What a bug bounty is. A company invites outside researchers to look for security problems and pays for good reports. This was the researcher's first such engagement.

Step 1: Reconnaissance

Reconnaissance means mapping out what a company has on the internet before attacking anything. The researcher started from domain.com and used an open-source subdirectory enumeration tool. That kind of tool tries a long list of common names in front of the main domain, such as mail.domain.com or dev.domain.com, and notes which ones exist. It found iambroot.domain.com.

A quick network scan of that subdomain followed, to see which doors (ports) were open. A port is a numbered channel on a server; port 80 is the usual one for plain web traffic and port 443 for encrypted web traffic (the padlock in your browser). Only 443 and 80 were open, so the web application itself was the place to look.

Why this step: you cannot test what you have not found, and a forgotten subdomain is often less protected than the main site.

Step 2: Blackbox

Blackbox testing means testing without any inside knowledge of the code, the way an outsider would. Port 443 served the plain login page described earlier: username, password, and a message to contact the administrator if login fails. There was no registration, no password reset and no contact form, so there was very little to interact with.

The researcher tried some basic authentication bypass test cases, meaning simple attempts to get past the login without valid credentials. Nothing worked, and they decided to move on, assuming a dead end.

Before leaving, though, they went through the Burp logs of traffic to and from the subdomain. This is the turning point of the whole story. One response stood out. Reading the history of what the site had already sent was enough to find the flaw, without any clever attack.

Why this step: when the visible page offers nothing, the traffic behind it often still does. Always check the logs.

Step 3: Unauthorized access to the administrator module

One of the responses the server sent when the domain was accessed contained a set of parameters that looked wrong for a visitor who is not logged in:

Text
"admin":"false", "allowDeploy":"false", "allowManage":"false"

Line by line: this is a fragment of JSON, the labelled-list format mentioned earlier. "admin":"false" says "this visitor is not an administrator". "allowDeploy":"false" says "this visitor may not deploy", that is, may not push changes or releases. "allowManage":"false" says "this visitor may not manage things". All three are flags, simple on/off switches, and all three were off. The front end was clearly reading these flags to decide what to show.

The researcher refreshed the site, captured the same request in Burp, and changed the values in the response to:

Text
"admin":"true", "allowDeploy":"true", "allowManage":"true"

Line by line: the same three labels, now set to true, meaning "yes" for each. The request going to the server was untouched; only the answer coming back was edited, in transit, before the browser saw it.

A hidden administrator module then appeared on the screen. It exposed more than 25 administrator functionalities. But every attempt to open any of them redirected back to the login page.

Why this step: the flags were the browser's only guide for what to display, and the browser's input can be edited. The result proved the interface trusted data the visitor could change. The redirects showed that something else, further in, was still checking.

Step 4: Unauthorized access to administrator functionalities

One of the functions was creating a new user. Opening it redirected to the login page, so the researcher intercepted that request too, to read the server's response. The server was returning a 401 Unauthorized status code whenever an administrator function was accessed, and that response in turn triggered the request to the login page.

Image for post
Image for post From the original on medium.com

The screenshot shows that 401 Unauthorized response for the administrator function. In plain terms: the front end asked the server for the function's screen, the server said "I do not know who you are", and the front end reacted by sending the browser to the login page.

The same request was intercepted once more and the response was modified. The redirect to the login page no longer happened, and the administrator function could be viewed.

The screenshot shows the modified response that let the function render. Changing the response in transit was enough to make the front end draw the screen.

Using the same approach, every functionality in the administrator module could be accessed. Submitting a form was different: the application redirected to the login page again. Modifying the response only bypassed client-side validation, and the server-side validation stopped the creation of a new user.

In plain words: the researcher could make the browser display the forms, but when a form was actually sent, the server checked for itself and refused. The browser-side check was bypassed; the server-side check was not. The researcher calls this a dead end: read-only access to the administrator module and its individual functions, with no form submissions and no unauthorised operations carried out. The one useful side effect was being able to see form submission requests before the server validated them, together with the 401 Unauthorized error the server sent back. Seeing those requests is what made the next step possible.

Why this step: after one successful edit, it is worth asking whether the same trick works elsewhere. Here it did, but only for viewing. The important lesson is the split between what the browser enforces and what the server enforces.

Step 5: Cross-Site Request Forgery (CSRF)

The application requests carried no request verification token, which could allow a CSRF attack. Recall the wristband comparison: a logged-in administrator's browser automatically attaches their credentials to requests. Without a token, a request forged from another site looks exactly like one the administrator made on purpose.

Knowing what the administrator form submission requests looked like, the researcher crafted a sample CSRF payload that would create a new user when a real administrator was tricked into executing it. The payload itself is not reproduced in the write-up, so there is nothing to copy here. The idea is a page the administrator visits, which silently sends the same request the administrator form would have sent.

Why this step: the read-only access from Step 4 was harmless on its own, but it revealed the exact shape of the requests. Combined with the missing token, that turned a viewing problem into a possible action problem.

Step 6: Responsible Disclosure

The observations were emailed to the company's security team as part of their vulnerability disclosure programme, the process for reporting problems privately so they can be fixed before anyone abuses them. The issues were fixed by:

  1. Applying server-side validation on all requests, so unauthenticated users can no longer view the administrator module and its functionalities.
  2. Adding a request verification token in the request headers.
  3. Removing public access to the entire subdomain, which looked like it was intended for internal usage only.

Why each fix matters: the first moves the decision from the browser, which the visitor controls, to the server, which they do not. The second gives the server a way to tell a genuine form submission from a forged one. The third removes the exposure entirely: a host meant for internal staff should not answer requests from the open internet at all.

Why it worked

The application decided what to show in the browser from values in the response body (admin, allowDeploy, allowManage) and from the status code of individual function requests, and those client-side checks could be bypassed by editing responses. The server did reject the actual operations through server-side validation, which is why form submissions failed, but the interface trusted the response enough to render the administrator module and its screens once those values were edited in transit. In other words, the UI was gated by data the user could change, while the real check lived only on the operations themselves.

The CSRF exposure is separate: form submissions had no request verification token, so a request forged from another site would be indistinguishable from one made by the administrator.

Impact

As an unauthenticated user, the researcher could view the administrator module and all of its individual functionalities, read-only. No unauthorised operation was completed, because server-side validation rejected the submissions. The realistic damage comes from the CSRF chain: if a real administrator were tricked into executing the crafted payload, a new user would be created. The write-up does not state that this was demonstrated against a live administrator.

Fix

The company applied server-side validation on all requests, added a request verification token in the request headers, and removed public access to the subdomain. The first two address the client-side enforcement and the CSRF gap; the third removes the exposure of an internal-only host entirely.

Variants to test

If you want to look for similar problems on sites you are allowed to test, these are the patterns to watch for.

  1. Boolean flags in JSON responses. Look for fields such as admin, isAdmin, allowManage or allowDeploy in responses to unauthenticated requests. A positive result is that flipping them in Burp makes a hidden menu or module appear.
  2. Status codes that drive redirects. Watch for 401 or 403 responses that the front end turns into a login redirect. A positive result is that changing the status code in the response renders the protected screen.
  3. Per-function checks. After the module renders, open each function individually; some may enforce the check only on the module itself. A positive result is a function screen that loads without a redirect.
  4. Form submissions without tokens. Submit administrator forms and inspect the request for a verification token. A positive result is a state-changing request that carries no token, which is the precondition for a CSRF payload.
  5. Internal-only subdomains. Enumerate subdomains and check whether ones that look internal are reachable from the internet. A positive result is a login page or admin interface answering publicly.
  6. Logs as a source of findings. Review proxy history for responses that differ from what the UI shows, as the original response here did. A positive result is any response containing authorisation data the client is not supposed to control.

Glossary

  • API: the set of addresses on a server through which the front end and back end exchange data, usually as JSON.
  • Authentication: proving who you are, for example with a username and password.
  • Authorisation: deciding what a proven user is allowed to do.
  • Blackbox testing: testing a system with no inside knowledge of its code, as an outsider would.
  • Boolean flag: an on/off value, true or false, used to switch a behaviour.
  • Bug bounty: a programme where a company pays outside researchers for reporting security problems.
  • Burp Suite: a proxy tool that lets you read and edit requests and responses between browser and server, and keeps a history of them.
  • Client side: code running in your browser, which you control and can edit.
  • Cookie: a small piece of data a site stores in your browser and receives back on later requests, often used to recognise a logged-in user.
  • CSRF (cross-site request forgery): tricking a logged-in user's browser into sending a request the user did not intend.
  • CSRF payload: the crafted page or request used to carry out a CSRF attack.
  • Enumeration: systematically trying names or paths to discover what exists, such as subdomains.
  • Front end / back end: the part of a site you see and click, and the server that holds the data and does the work.
  • JSON: a text format of labelled values, "name":"value", commonly used for data between browser and server.
  • Parameter: a named value in a request or response, such as admin or allowManage.
  • Port: a numbered channel on a server; 80 for plain web traffic, 443 for encrypted web traffic.
  • Proxy: a tool or service that sits between browser and server and can read and change the traffic.
  • Reconnaissance: the mapping-out phase, finding hosts, subdomains and open ports before testing.
  • Request verification token: a random value placed in a form or header so the server can tell a genuine submission from a forged one.
  • Response: what the server sends back to a request, including a status code and a body.
  • Server side: code running on the company's machine, which the visitor cannot edit.
  • Status code: a three-digit number in a response saying how the request went, such as 200, 401 or 403.
  • Subdomain: a name in front of a main domain, such as iambroot.domain.com under domain.com.
  • Token: a value used to prove identity or authenticity, such as a session token or a request verification token.
  • Unauthenticated: not logged in; the site does not know who you are.
  • Vulnerability disclosure programme: a company's process for receiving security reports privately so problems can be fixed.
  • 401 Unauthorized: a status code meaning the server does not accept that you are who you claim, or that you have not proved it.
  • 403 Forbidden: a status code meaning the server knows who you are but you are not allowed to do this.

More by I am Broot

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.