How One Bug Scored Me Double Rewards!
An unauthenticated PUT request to an endpoint on a forgotten subdomain returned group names when the groupid parameter was changed, and a similar request on another subdomain returned sensitive session data for any group and person. An attacker could disclose group names and access other users' video session data without authentication.
Published on anasbetis023.medium.com
Bug Bounty
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
This is a write-up of two related findings in a private HackerOne program, which the author refers to as redacted.com. The product is a video service: the main website offers video sessions and screensharing between users. Groups and persons are part of that model, and the server can be asked about them.
The behaviour that shaped the whole hunt is a wildcard-style resolution: any subdomain of the form anything.redacted.com resolves to the main login page at redacted.com/login. Because of that, the author considered classic subdomain enumeration largely pointless, since every name answers with the same login page.
Setup
The work was done against a private program on HackerOne. No accounts, roles or special tooling are described beyond a browser with an intercepting proxy, plus Shodan and Google dorking for discovery. The author does not give product versions or server software.
The precondition for the second finding is a subdomain that accepts the same PUT /offer request as the first one, and that additionally accepts a personid parameter.
Finding it
Discovery started with a Shodan dork:
ssl:redacted.com
Among the many results, one IP address led to the subdomain z2007.redacted.com. The name suggested an old, forgotten server.
On that host the author found a test page at z2007.redacted.com/agv/sampleAgent.html. The page issues a PUT /offer request, and its request body is what the author intercepted. The report shows the test page and the request body as screenshots but does not reproduce the body as text, so the exact JSON or form fields are not available here.
Exploitation
Step 1: probing the groupid parameter
The author intercepted the PUT /offer request from the test page and changed every value in the body to observe the responses. Almost all changes produced the same response. The exception was groupid: supplying a group id made the server respond with the corresponding group name.
That looked uninteresting at first. On reflection, the group name was data the author had not seen anywhere else on the site, so it was reported as "Information Disclosure [Group Name Manipulation]". The program accepted it, on the basis that the group name should not be disclosed without authentication, and paid a bounty of 100 USD.
Step 2: replaying the request against other subdomains
The reasoning after the first payout was that if one subdomain had the bug, another might too. The author collected subdomains through Google dorking and sent the same PUT /offer request to each of them. None of them responded usefully, and the search stopped there for a while.
Step 3: video.redacted.com and the personid parameter
A subdomain named video.redacted.com did accept the previous PUT requests. On this host the server accepted three parameters: groupid, isAnonymous, and a new one, personid.
The author gives the following URL:
https://video.redacted.net/offer?groupid=21582&isAnonymous=true&personid=1990018
The procedure was to request that URL, intercept it, change the method to PUT, and forward it. The browser then displayed a large amount of session data. By modifying groupid and personid, the author could obtain new session data each time, which amounts to registering a video session for anyone in any group.
This was reported as "IDOR Leads to Unauthorized Access to Sensitive Users Session Data" and was accepted, with a reward of 200 USD.
Outcome with the platform
The author notes that HackerOne support later banned the reward because the author lives in Syria and is therefore not eligible for rewards under certain US laws. The technical findings themselves were accepted by the program.
Root cause
The PUT /offer endpoint returned data for caller-supplied identifiers without the author being logged in. It trusts the caller-supplied groupid and returns the matching group name, and on video.redacted.com it trusts groupid together with personid and returns session data for those identifiers. This is a classic insecure direct object reference: the object identifier is the only thing standing between the caller and the data, and it is fully attacker-controlled.
The wildcard resolution made classic subdomain enumeration seem pointless to the author, so discovery moved to Shodan and Google dorking. Shodan, which indexes by certificate and address rather than by resolving names, surfaced the forgotten host instead.
Impact
On z2007.redacted.com, an unauthenticated caller could learn group names by supplying group ids. On video.redacted.com, an unauthenticated caller could obtain session data for arbitrary groupid and personid combinations, and could register a video session for anyone in any group. The identifiers in the example are numeric. The report does not describe the full contents of the returned session data beyond calling it sensitive users session data.
Fix
The report does not state what the program changed. A reasonable hardening step would be to require authentication on PUT /offer and check the caller against the requested groupid and personid before returning anything.
Variants to test
- Search certificate and address indexes for hosts under the target's domain, for example with a Shodan query on
ssl:example.com, and compare what you find with what DNS enumeration returns. A positive result is a host that serves something other than the main login page. - Look for test or sample pages under paths such as
/agv/sampleAgent.htmlthat issue API requests, then replay those requests with modified identifiers. A positive result is a response that varies with an identifier you supplied. - Take an endpoint that leaks one object (here a group name) and replay the same request against every other host in scope. A positive result is a host that accepts the request and returns richer data, as
video.redacted.comdid withpersonid. - Change the HTTP method on a read-style URL, for example from
GETtoPUT, and observe whether the server processes it. A positive result is a state-changing or data-returning response to a method the UI never uses. - Enumerate sequential numeric identifiers in
groupidandpersonidstyle parameters without authentication. A positive result is data for objects that do not belong to you.
What happened, in plain words
A security researcher found two bugs in a private bug bounty program on HackerOne. The program is for a video service where people can have video sessions and share their screens. The researcher calls the main site redacted.com.
The first bug let the server return a group name for a supplied group number without the author logging in. The second bug, on a different subdomain, returned session data for the group and person IDs supplied, and allowed registering a video session for anyone in any group. The first bug earned 100 USD and the second earned 200 USD. Later, HackerOne support took the money back because the researcher lives in Syria and US laws prevent paying rewards to people there.
This article explains how the researcher found the bugs, step by step, for someone who is new to security. You only need to know how to use a browser and a computer.
Background: what the product does and why subdomains mattered
The product is a video service. The main website lets users start video sessions and share their screens with each other. The server responds with group names for group IDs, and one subdomain also accepted a personid parameter.
A subdomain is a part of a web address that comes before the main domain. For example, in video.redacted.com, video is the subdomain and redacted.com is the main domain. Companies often put different services on different subdomains, like mail.example.com for email or shop.example.com for a store.
The researcher noticed something unusual: any subdomain of the form anything.redacted.com would show the same main login page at redacted.com/login. So if you tried foo.redacted.com or bar.redacted.com, you would always see the login page. Because of that, the researcher thought that using tools to find subdomains was useless, since every name gave the same result.
Finding the first bug
The researcher started by searching Shodan. Shodan is a search engine for internet-connected devices and servers. Instead of searching web pages, it searches information that servers expose, like the SSL certificates they use. An SSL certificate is what makes a website show a padlock and use HTTPS; it contains the domain name it was issued for.
The researcher used this Shodan search:
ssl:redacted.com
This asks Shodan to list servers whose SSL certificate mentions redacted.com. Among many results, one IP address led to the subdomain z2007.redacted.com. The name z2007 suggested an old, forgotten server. The author called it an old, forgotten server.
On that server, the researcher found a test page at z2007.redacted.com/agv/sampleAgent.html. A test page is a page meant for testing rather than for regular users. The page made a request to the server using the PUT method. The researcher intercepted that request.
Intercepting a request means using a tool that sits between your browser and the server, so you can see and change the request before it is sent. The researcher does not show the exact request body in text; it is only shown in screenshots, so we do not know the exact fields.
Step 1: probing the groupid parameter
The researcher took the intercepted PUT /offer request and changed every value in the body to see what happened. Almost all changes gave the same response. But when the researcher changed the groupid value, the server responded with the name of the group that matched that ID.
At first, this did not seem interesting. But then the researcher realised that the group name was information that was not shown anywhere else on the site. So the researcher reported it as "Information Disclosure [Group Name Manipulation]". Information disclosure means revealing data that should not be public. The program accepted the report because the group name should not be disclosed without logging in, and paid a bounty of 100 USD.
Step 2: trying the same request on other subdomains
After getting the first bounty, the researcher thought: if one subdomain has this bug, maybe another one does too. So the researcher used Google dorking to find more subdomains. Google dorking means using special search queries to find pages or information that are not easily found otherwise.
The researcher sent the same PUT /offer request to each subdomain found. None of them responded usefully, so the search stopped for a while.
Step 3: finding video.redacted.com and the personid parameter
Then the researcher found a subdomain called video.redacted.com that did accept the PUT request. On this server, the request accepted three parameters: groupid, isAnonymous, and a new one called personid.
A parameter is a piece of information you send to the server, usually in the URL or in the request body. For example, in a URL like example.com/page?name=John, name is a parameter with the value John.
The researcher gives this URL:
https://video.redacted.net/offer?groupid=21582&isAnonymous=true&personid=1990018
This URL has three parameters: groupid with value 21582, isAnonymous with value true, and personid with value 1990018. The researcher requested this URL, intercepted the request, changed the method to PUT, and forwarded it. The browser then showed a large amount of session data.
By changing the groupid and personid values, the researcher could get new session data each time. This meant the researcher could register a video session for anyone in any group. This is an example of an IDOR (Insecure Direct Object Reference). IDOR happens when a website uses an identifier (like a group ID or person ID) to decide what data to show, but does not check if the person asking is allowed to see that data. It is like a hotel giving you a room key based only on the room number you say, without checking if you are a guest.
The researcher reported this as "IDOR Leads to Unauthorized Access to Sensitive Users Session Data". The program accepted it and paid 200 USD.
What happened with the platform
Later, HackerOne support took back the reward because the researcher lives in Syria, and US laws prevent paying rewards to people in certain countries. The technical findings were still accepted by the program.
Why the bugs existed
The PUT /offer endpoint returned data for caller-supplied identifiers without the author being logged in. It trusted the groupid and returned the group name, and on video.redacted.com it trusted groupid and personid and returned session data. This is a classic IDOR: the only thing needed to get data was the identifier, and the caller could set it to anything.
The wildcard resolution made classic subdomain enumeration seem pointless to the author, so discovery moved to Shodan and Google dorking. Shodan, which indexes by certificate and IP address instead of by resolving names, found the forgotten server.
Impact
On z2007.redacted.com, anyone could learn group names by supplying group IDs. On video.redacted.com, anyone could get session data for any groupid and personid combination, and could register a video session for anyone in any group. The IDs in the example are numbers. The report does not describe the full contents of the session data beyond calling it sensitive users session data.
How to fix it
A reasonable hardening step would be to require authentication on PUT /offer and check the caller against the requested groupid and personid before returning anything.
Variants to test
- Search certificate and IP indexes for hosts under the target's domain, for example with a Shodan query on
ssl:example.com, and compare what you find with what DNS enumeration returns. A positive result is a host that serves something other than the main login page. - Look for test or sample pages under paths such as
/agv/sampleAgent.htmlthat make API requests, then replay those requests with modified identifiers. A positive result is a response that changes when you change an identifier you supplied. - Take an endpoint that leaks one object (here a group name) and replay the same request against every other host in scope. A positive result is a host that accepts the request and returns richer data, as
video.redacted.comdid withpersonid. - Change the HTTP method on a read-style URL, for example from
GETtoPUT, and see if the server processes it. A positive result is a state-changing or data-returning response to a method the UI never uses. - Enumerate sequential numeric identifiers in
groupidandpersonidstyle parameters without authentication. A positive result is data for objects that do not belong to you.
Glossary
- API: A way for two pieces of software to talk to each other. In a website, the front end (what you see) sends requests to an API on the server to get or change data.
- Bounty: A reward, usually money, given by a company to a security researcher who finds and reports a bug in their system.
- Bug bounty program: A program run by a company that invites researchers to find and report security bugs in exchange for rewards.
- Cookie: A small piece of data that a website stores in your browser, often used to remember who you are after you log in.
- DNS enumeration: The process of finding subdomains of a domain by querying DNS, the system that translates domain names to IP addresses.
- GET: An HTTP method used to ask a server for data, like loading a web page.
- HackerOne: A platform where companies run bug bounty programs and researchers submit reports.
- HTTP method: A word like GET, POST, or PUT that tells the server what kind of action you want to perform.
- IDOR (Insecure Direct Object Reference): A vulnerability where a website uses an identifier (like a user ID or group ID) to decide what data to show, but does not check if the person asking is allowed to see that data.
- Information disclosure: A vulnerability where a system reveals information that should not be accessible to the person asking.
- IP address: A number that identifies a device on the internet, like a postal address for computers.
- Parameter: A piece of information sent to a server, usually in the URL or in the request body, like
name=Johninexample.com/page?name=John. - PUT: An HTTP method used to send data to a server to create or update something.
- Request body: The part of an HTTP request that carries data, separate from the URL and headers.
- Shodan: A search engine for internet-connected devices and servers, which indexes information like SSL certificates and open ports.
- SSL certificate: A digital certificate that proves a website's identity and enables encrypted HTTPS connections.
- Subdomain: A part of a domain name that comes before the main domain, like
videoinvideo.example.com. - Token: A piece of data, often a string, that a server gives to a client to use as proof of identity or permission in later requests.
- Wildcard resolution: A DNS configuration where any subdomain of a domain resolves to the same address or page.