Skip to content
Access control Write-up Beginner

From Recon to P1 (Critical) — An Easy Win

An internal portal allowed self-registration but only accepted email addresses from the company's own domain. By intercepting the registration request and changing the email to an external address, the attacker could create an account and log in to access sensitive customer and business information.

Harsh Bothra Follow

Published on medium.com

{{media:0}}

Harsh Bothra, 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 write-up of a private Bugcrowd program, referred to throughout as "target.com" to keep the organisation confidential. The scope was broad: *.target.com, with no specific application URL excluded. The issue found was rated P1 (critical) and consisted of an exposed registration page on an internal portal that let the researcher create an account with a non-corporate email address and log in to a portal holding customer and business data.

The affected asset was a subdomain, portal-intra.target.com, which the researcher judged to be intended for the company's internal use. The feature at the centre of the report is the portal's login and registration flow under the administration directory.

Setup

The researcher worked only with reconnaissance and a browser plus Burp Suite for request interception. No accounts, roles or credentials were provided in advance; the whole point of the exercise was to discover the attack surface first. The tools named in the report are:

  • Aquatone, Subfinder and Amass for subdomain enumeration. The researcher notes that running more than one tool matters because tools sometimes differ by two or three domains, so at least two should be run.
  • dirsearch for directory brute force.
  • Burp Suite to capture and modify the registration request.

Finding it

With a wildcard scope, the researcher began with subdomain discovery using the tools above. Reviewing the results, one subdomain stood out: portal-intra.target.com. Inspection suggested it was meant for internal company use, which made it worth pursuing.

Running dirsearch against it revealed a directory named administration. Visiting that directory exposed a login URL:

Text
portal-intra.target.com/administration/login.php

A few default credentials were tried against the login and failed. The next thought was whether the application also shipped a registration page, and further brute forcing found one:

Text
portal-intra.target.com/administration/reg.php

Exploitation

Step 1: Register with a corporate-looking address

A registration attempt was made, but the form rejected it: validation only allowed email addresses ending in @target.com. The registration page was therefore reachable, but the obvious path in was blocked by a check on the email domain.

Step 2: Intercept and change the email domain

The registration request was captured in Burp Suite. The email field was changed from [redacted] to the researcher's Gmail account, and the modified request was forwarded. The registration succeeded.

Step 3: Log in

With the account created, the researcher logged in to the intranet portal. The portal contained customer sensitive information, inventories, marketing plans and other critically sensitive business information.

The report was written up and submitted to the organisation on Bugcrowd.

Root cause

The registration form enforced the @target.com restriction on the email address, but the enforcement did not survive a modified request: changing the domain in Burp Suite and forwarding it produced a valid account. In other words, the domain check was not reliably applied at the point where the account was actually created, so the restriction could be bypassed by editing the request. The report does not describe the server-side implementation, so the exact location of the flaw (client-side only, or a server-side check that could be sidestepped) is not stated.

The deeper design problem is that an internal-use portal exposed a self-service registration endpoint at all.

Impact

An unauthenticated attacker who can reach portal-intra.target.com could register an account with a non-corporate email address and log in to the intranet portal. According to the report, that portal held customer sensitive information, inventories, marketing plans and critically sensitive business information. The researcher rated this a critical (P1) issue and describes it as an easy win achieved through reconnaissance alone.

Fix

The report does not state what the organisation changed. Based on the described behaviour, the registration endpoint should either be removed from the publicly reachable portal or enforce the corporate domain restriction on the request that creates the account.

Variants to test

  1. Wildcard scopes with internal-sounding subdomains. Enumerate with at least two tools and shortlist names such as portal-intra, admin, internal or staging. A positive result is a host that resolves and serves an application intended for staff.
  2. Directory brute force against discovered hosts. Look for paths such as administration, admin or login. A positive result is a login page or an administrative directory that is not linked from the main site.
  3. Registration endpoints next to login pages. When a login page is found, brute force for sibling registration pages. A positive result is a working sign-up form on an internal-facing application.
  4. Domain-restricted email validation. Register with a corporate-looking address, intercept the request and substitute a personal address. A positive result is a successful registration and login with the substituted address.
  5. Post-registration access. After creating an account, check what the new user can see. A positive result is access to customer data, inventories or business plans that a self-registered user should not reach.

Timeline

Event Date
Reported 19 April 2020
Triaged 21 April 2020
Accepted 21 April 2020

The researcher's own takeaways are to keep reconnaissance strong, to think outside the box when exploiting, and to shortlist juicy subdomains and run parallel recon on them (parameter search, directory brute force, CVE and exploit search).

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

What happened, in plain words

A security researcher tested a company's systems through a private bug bounty program on Bugcrowd. A bug bounty program is a deal in which an organisation says: if you find a security problem in our systems and report it responsibly, we will reward you and not punish you. "Private" means only selected researchers are invited, and the details are meant to stay confidential, so throughout the write-up the company is called "target.com".

Harsh Bothra
Harsh Bothra From the original on medium.com

The researcher was allowed to look at anything ending in *.target.com. The asterisk is a wildcard: it means every subdomain of target.com, not just the main website. A subdomain is a name that sits in front of the main domain, like shop.example.com or mail.example.com. Because the scope was so wide, the researcher started by finding as many subdomains as possible, then looked through them for one that seemed interesting.

One subdomain stood out: portal-intra.target.com. The word "intra" suggested an intranet, which is a website meant only for a company's own staff, like an internal noticeboard that the public is not supposed to see. The researcher ran dirsearch, found an administration directory with a login page, then brute forced and found a registration (sign-up) page. The sign-up form only accepted email addresses ending in @target.com, which is the company's own email domain. The researcher captured the sign-up request with a tool called Burp Suite, changed the email address to a personal Gmail address, and sent it on. The account was created, and the researcher could log in to the internal portal, which held customer information, inventories, marketing plans and other sensitive business data.

That is the whole story: no clever exploit code, just careful looking around (reconnaissance) plus one edited request. The researcher reported it on 19 April 2020; it was triaged (checked and confirmed as a real issue) and accepted on 21 April 2020, and rated P1, the most severe priority level.

The setup: what tools were used and why

The researcher did not have any account, password or special access to begin with. The entire job was to discover what was out there first. This first phase is called reconnaissance, often shortened to recon. Think of it like a burglar walking around a building writing down every door and window before trying any of them: nothing is broken yet, you are just making a map.

The tools named in the report are:

  • Aquatone, Subfinder and Amass: these find subdomains. You give one a domain name and it returns a list of subdomains that exist. The researcher notes that different tools sometimes miss two or three domains that another tool finds, so it is worth running at least two of them.
  • dirsearch: this tries a long list of common folder and file names against a website, one after another, and reports which ones exist. This is called directory brute force. "Brute force" here does not mean guessing passwords; it means trying many possibilities systematically.
  • Burp Suite: this sits between your browser and the website and lets you pause, read and edit the requests your browser sends before they reach the server. A request is simply the message your browser sends to a website, for example "please show me this page" or "here is my sign-up form, please create my account".

Finding it

Step 1: Find subdomains

Because the scope was *.target.com, the researcher ran the subdomain tools and reviewed the results. One host stood out:

Text
portal-intra.target.com

This line is just a hostname, the address of one particular server under the company's domain. The "portal-intra" part reads like "internal portal", so the researcher concluded it was meant for the company's own staff. That is exactly the kind of host worth investigating: staff-only systems often assume nobody outside will ever find them.

Step 2: Look for hidden folders

The researcher then ran dirsearch against that host. dirsearch works by asking the server for one common name after another, such as /admin, /backup or /login, and noting which ones answer. It found a folder called administration. Visiting it revealed a login page at this address:

Text
portal-intra.target.com/administration/login.php

Read this address from left to right: portal-intra.target.com is the server, /administration is the folder on that server, and login.php is the page inside it. The .php ending tells you the page is generated by a program written in the PHP programming language, but for our purposes it is simply the login form.

The researcher tried a few default credentials, meaning common username and password pairs that lazy setups sometimes leave in place, and they did not work. That is normal; it just means the front door was locked.

Step 3: Look for a sign-up page next to the login page

A locked front door makes you look for another way in. The researcher wondered whether the same application also had a registration page, and ran more brute forcing to check. It did:

Text
portal-intra.target.com/administration/reg.php

Again, read it in pieces: same server, same administration folder, and reg.php, a page whose name suggests "register". Finding a sign-up page on a system meant for staff is the moment the researcher describes as blood starting to pump: staff systems usually should not let strangers create accounts at all.

Exploitation

Step 1: Try to register and hit the email rule

The researcher filled in the registration form and tried to create an account, but it was rejected. The form only allowed email addresses ending in @target.com. This is a validation rule: a check that the data you typed meets some condition before it is accepted. Here the condition was "the email must belong to the company".

So the page existed, but the obvious way in was blocked by a rule about the email address.

Step 2: Catch the request and change the email

The researcher switched on Burp Suite, which records the requests the browser sends. When the sign-up form was submitted, the request was captured and could be edited before being passed on to the server. The email field was changed from [redacted] to the researcher's own Gmail address, and the edited request was forwarded. The registration succeeded.

Why does this work? Because the browser is not the authority. A form on a web page is only a suggestion to your browser about what to send; anyone can change the message before it leaves, or use a tool like Burp Suite to rewrite it in flight. If the server trusts what the browser sends without re-checking it, the rule can be sidestepped. The everyday comparison: a bouncer who checks your invitation at the door but then lets anyone in who says "I'm on the list" without looking at the list again.

Step 3: Log in and see what is inside

With the account created, the researcher logged in to the intranet portal. According to the report, the portal contained customer sensitive information, inventories, marketing plans and other critically sensitive business information. The researcher wrote up the finding and submitted it to the organisation on Bugcrowd.

Why it was possible

The registration form enforced the @target.com rule on the email address, but that enforcement did not survive an edited request: changing the domain in Burp Suite and forwarding it produced a valid account. In plain terms, the check was not reliably applied at the moment the account was actually created, so the restriction could be bypassed by editing the message. The report does not describe how the server was built, so it does not say whether the check existed only in the browser or also on the server but could be avoided.

The deeper design problem is that an internal-use portal exposed a self-service registration page at all, meaning anyone who found it could try to sign up.

What the impact was

Someone who had not logged in before, and who could reach portal-intra.target.com, could register with a non-corporate email address and then log in to the intranet portal. According to the report, that portal held customer sensitive information, inventories, marketing plans and critically sensitive business information. The researcher rated this a critical (P1) issue and describes it as an easy win achieved through reconnaissance alone.

How it should be fixed

The report does not state what the organisation changed. Based on the behaviour described, the registration page should either be removed from the publicly reachable portal, or the corporate domain rule should be enforced at the moment the account is created.

Similar things to test

  1. Wide scopes with internal-sounding subdomains. Use at least two subdomain tools and shortlist names such as portal-intra, admin, internal or staging. A good result is a host that answers and serves an application meant for staff.
  2. Directory brute force on hosts you find. Look for paths such as administration, admin or login. A good result is a login page or an administrative folder that is not linked from the main site.
  3. Registration pages next to login pages. When you find a login page, brute force for a sign-up page beside it. A good result is a working registration form on an internal-facing application.
  4. Email rules based on the domain. Register with a corporate-looking address, capture the request and swap in a personal address. A good result is a successful registration and login with the swapped address.
  5. What a new account can see. After creating an account, check what it is allowed to view. A good result is access to customer data, inventories or business plans that a self-registered user should never reach.

Timeline

Event Date
Reported 19 April 2020
Triaged 21 April 2020
Accepted 21 April 2020

"Triaged" means the program's team looked at the report, confirmed the issue was real and in scope, and passed it on for fixing. "Accepted" means it was formally recognised as a valid finding.

The researcher's own takeaways are to keep reconnaissance strong, to think outside the box when exploiting, and to shortlist promising subdomains and run parallel recon on them: parameter search, directory brute force, CVE and exploit search. A CVE is a public catalogue number for a known software vulnerability, so searching for CVEs means checking whether the software you found has known holes.

Glossary

  • Bug bounty program: an arrangement where an organisation rewards people for finding and reporting security problems in its systems.
  • Private program: a bug bounty program open only to invited researchers, with details kept confidential.
  • Scope: the list of systems a researcher is allowed to test, for example *.target.com.
  • Wildcard: the * symbol, meaning "anything in this position", so *.target.com means every subdomain of target.com.
  • Subdomain: a name in front of a main domain, such as portal-intra in portal-intra.target.com.
  • Host / hostname: the address of one particular server or service on the internet.
  • Intranet: a website or network meant only for a company's own staff.
  • Reconnaissance (recon): the information-gathering phase of a security test, finding out what exists before trying to break anything.
  • Subdomain enumeration: systematically discovering which subdomains exist for a domain.
  • Directory brute force: trying a long list of common folder and file names against a website to see which exist.
  • Request: the message a browser sends to a website, such as "show me this page" or "create this account".
  • Burp Suite: a tool that sits between browser and website so you can pause, read and edit requests.
  • Intercept: to catch a request in Burp Suite before it reaches the server, so it can be changed.
  • Validation: a check that data entered into a form meets some rule before it is accepted.
  • Default credentials: common username and password pairs that are sometimes left unchanged on a system.
  • Bypass: getting around a security check without satisfying it.
  • P1 / critical: the most severe priority rating for a security issue.
  • Triaged: reviewed and confirmed as a real, in-scope issue by the program's team.
  • CVE: a public catalogue number for a known software vulnerability.
  • Parameter: a named value sent with a request, such as the email field in a sign-up form.

More by Harsh Bothra

View all

7 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.