How I identified and reported vulnerabilities in Oracle and the rewards of responsible disclosure:From Backup Leak to Hall of Fame
A backup ZIP file was publicly accessible on a subdomain, containing SQL files with sensitive information. An attacker could download it to obtain that data.
Published on medium.com
Hello folks I hope you are doing well. I’m a Parag Bagul security Researcher and bug bounty hunter.
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
In 2022 I found a backup file leak on an Oracle website that exposed sensitive information. The affected host was labs.oracle.com, a subdomain of oracle.com. The report does not describe what the labs site normally does beyond being one of the subdomains discovered during enumeration.
The weakness class is information disclosure: a ZIP archive left on the web root contained .sql files. The report does not name the database, the tables or the contents of those files.
Setup
No accounts, roles or credentials were needed. The work was passive-to-active reconnaissance against the public oracle.com domain using two command-line tools:
subfinderfor subdomain enumerationhttpxfor probing which subdomains respond over HTTP
The only precondition is that the target domain resolves and that its subdomains are reachable from the internet.
Finding it
I started by enumerating subdomains of oracle.com, then filtered the results down to hosts that actually answered HTTP requests. One of the live hosts was labs.oracle.com.
The idea behind the next step is that developers sometimes save backup archives named after the subdomain, for example test.example.com/test.zip. I applied the same pattern to the labs host and requested labs.oracle.com/lab.zip in a browser. The server returned the archive, and inside it were .sql files containing sensitive information.
Exploitation
Step 1: enumerate subdomains
subfinder -d oracle.com -o domain.txt
subfinder takes the apex domain with -d and writes the discovered subdomains to domain.txt with -o.
Step 2: keep only live hosts
cat domain.txt |httpx > active.txt
The file is piped into httpx, which probes each host over HTTP and writes the ones that respond to active.txt. labs.oracle.com appeared in that list.
Step 3: request the backup archive
labs.oracle.com/lab.zip
Opening that URL in a browser returned a ZIP archive. Extracting it revealed .sql files with sensitive information.
Root cause
A backup archive was left reachable on the web root of the subdomain, and it was named after the subdomain itself (lab.zip for labs.oracle.com).
Impact
The archive exposed .sql files, which the report describes as sensitive information disclosure. Anyone who could reach the host and guess the filename could download the same archive. The report does not enumerate which data the SQL files contained, so the concrete blast radius beyond the file type is not stated.
Fix
The report gives a patch date but does not describe the change. The obvious remediation is to remove the archive from the web root and to stop serving backup artefacts from any publicly reachable path.
Timeline
| Event | Date |
|---|---|
| Report submitted | 08-AUG-2022 |
| Patch | 09-AUG-2022 |
| Added to Hall of Fame | 18-OCT-2022 |
The finding was acknowledged on Oracle's Hall of Fame.
Variants to test
When you find a live subdomain, try backup names derived from the host itself. For a host test.example.com, the report suggests these combinations:
test.example.com/test.zip
test.example.com/example.zip
test.example.com/test.example.zip
Then vary the extension:
test.example.com/test.rar
test.example.com/test.7z
test.example.com/test.tar
test.example.com/test.gz
test.example.com/test.bz2
test.example.com/test.xz
Finally, try the generic names developers give to source code backups:
sourcecode.zip
website_source.zip
website_backup.zip
website-source-code.zip
source.zip
backup.zip
code.zip
website-code.zip
website_code_backup.zip
source-code-backup.zip
website-files.zip
website-folder.zip
source-code.zip
code-backup.zip
website-code-backup.zip
website-src.zip
website-src-code.zip
website-src-backup.zip
src-code.zip
website-data-backup.zip
A positive result is an archive that downloads and unpacks rather than an error page. The report notes that this kind of guessing can be automated with Burp Suite Intruder or nuclei.
What happened, in plain words
In 2022 I found a file on an Oracle website that should never have been public. The file was a ZIP archive, the kind of compressed folder you download and unpack on your computer. Inside it were .sql files, which are files that hold database instructions and data. Because the archive was sitting on a public web address, anyone who guessed the file name could download it and read what was inside.
The website was labs.oracle.com, a subdomain of oracle.com. A subdomain is a smaller address that belongs to a main domain, the way a room number belongs to a building. The report does not describe what the labs site normally does, only that it was one of the subdomains I found while looking around.
This kind of mistake is called information disclosure: information that should be private is exposed to anyone who asks for it. The report does not name the database, the tables or the contents of the .sql files, so I cannot tell you what data was in them.
Setup
I did not need an account, a password or any special permission. Everything started from the public oracle.com domain, using two command-line tools. A command-line tool is a program you run by typing its name in a terminal window instead of clicking buttons.
subfinderfinds subdomains of a domain.httpxchecks which of those subdomains actually answer web requests.
The only precondition is that the target domain exists and that its subdomains can be reached from the internet.
Finding it
I started by listing subdomains of oracle.com, then narrowed the list down to the hosts that actually answered HTTP requests. HTTP is the language browsers and web servers use to talk to each other. One of the live hosts was labs.oracle.com.
The next step came from a habit I have seen in real projects: developers sometimes save backup archives named after the subdomain itself, for example test.example.com/test.zip. I applied the same pattern to the labs host and opened labs.oracle.com/lab.zip in a browser. The server returned the archive, and inside it were .sql files containing sensitive information.
Exploitation
Step 1: enumerate subdomains
subfinder -d oracle.com -o domain.txt
This line runs subfinder and tells it three things:
subfinderis the program being run.-d oracle.comsets the domain to search, hereoracle.com.-o domain.txtsets the output file, so the discovered subdomains are written todomain.txt.
Why this step: before you can check a subdomain, you need to know it exists. subfinder collects the names for you so you do not have to guess them one by one.
Step 2: keep only live hosts
cat domain.txt |httpx > active.txt
This line chains two programs together:
cat domain.txtprints the contents of the file with the subdomain list.- The
|symbol, called a pipe, passes that output to the next program instead of printing it on screen. httpxtakes each host and checks whether it answers over HTTP.> active.txtwrites the result to a new file calledactive.txt.
Why this step: a subdomain name can exist in DNS, the internet's address book, without a web server answering on it. httpx removes the dead entries so you only spend time on hosts that respond. labs.oracle.com appeared in that list.
Step 3: request the backup archive
labs.oracle.com/lab.zip
This is the address I opened in a browser. The browser asked the server for the file lab.zip on the host labs.oracle.com, and the server sent it back. Unpacking the archive showed .sql files with sensitive information.
Why this step: the name lab.zip matches the subdomain labs, which is the pattern I described above. If a developer saved a backup next to the site and named it after the site, this is the first name to try.
Root cause
A backup archive was left reachable on the web root of the subdomain, and it was named after the subdomain itself: lab.zip for labs.oracle.com. The web root is the folder a web server treats as the starting point for the site, so any file placed there can be requested by its path.
Impact
The archive exposed .sql files, which the report describes as sensitive information disclosure. Anyone who could reach the host and guess the filename could download the same archive. The report does not enumerate which data the SQL files contained, so the concrete blast radius beyond the file type is not stated.
Fix
The report gives a patch date but does not describe the change. The obvious remediation is to remove the archive from the web root and to stop serving backup artefacts from any publicly reachable path.
Timeline
| Event | Date |
|---|---|
| Report submitted | 08-AUG-2022 |
| Patch | 09-AUG-2022 |
| Added to Hall of Fame | 18-OCT-2022 |
The finding was acknowledged on Oracle's Hall of Fame, a public page where companies thank researchers who reported issues.
Variants to test
When you find a live subdomain, try backup names derived from the host itself. For a host test.example.com, the report suggests these combinations:
test.example.com/test.zip
test.example.com/example.zip
test.example.com/test.example.zip
Each line is a full address to try in a browser. The first uses the first part of the host name, the second uses the middle part, and the third uses the whole host name. The idea is that a developer may have named the backup after any of those pieces.
Then vary the extension. An extension is the part after the dot that tells you the file type, and different compression tools produce different ones:
test.example.com/test.rar
test.example.com/test.7z
test.example.com/test.tar
test.example.com/test.gz
test.example.com/test.bz2
test.example.com/test.xz
Each line keeps the same name and changes only the extension, because a backup may have been made with a different tool than the one you first guessed.
Finally, try the generic names developers give to source code backups:
sourcecode.zip
website_source.zip
website_backup.zip
website-source-code.zip
source.zip
backup.zip
code.zip
website-code.zip
website_code_backup.zip
source-code-backup.zip
website-files.zip
website-folder.zip
source-code.zip
code-backup.zip
website-code-backup.zip
website-src.zip
website-src-code.zip
website-src-backup.zip
src-code.zip
website-data-backup.zip
These are file names rather than full addresses, so you would put each one after a host you are testing. They are common labels people give to a copy of a site's code, and a backup left in the web root may carry one of them.
A positive result is an archive that downloads and unpacks rather than an error page. The report notes that this kind of guessing can be automated with Burp Suite Intruder or nuclei, two tools that send many requests for you instead of you typing each address by hand.
Glossary
- Subdomain: a smaller address that belongs to a main domain, such as
labs.oracle.comunderoracle.com. - Domain: the main name of a website, such as
oracle.com. - DNS: the internet's address book, which turns names into the addresses computers use.
- HTTP: the language browsers and web servers use to exchange requests and responses.
- HTTP request: a message a browser sends to a server asking for something, such as a page or a file.
- HTTP response: the message a server sends back, including a status code and the content.
- Status code: a number in the response that says what happened, for example
200for success. - Web root: the folder a web server treats as the starting point for a site, so files placed there can be requested by their path.
- Host: a single machine or site address on the internet, such as
labs.oracle.com. - Command-line tool: a program you run by typing its name in a terminal instead of clicking buttons.
- Terminal: a window where you type commands for the computer to run.
subfinder: a tool that finds subdomains of a domain.httpx: a tool that checks which hosts answer over HTTP.- Pipe (
|): a symbol that passes the output of one program to another. - Output redirection (
>): a symbol that writes a program's output to a file instead of the screen. - ZIP archive: a single file that holds other files in compressed form, which you unpack to read them.
- Compression: packing files into a smaller size, often with a tool that produces formats like ZIP, RAR, 7z, tar, gz, bz2 or xz.
- Extension: the part of a file name after the dot that tells you the file type, such as
.zipor.sql. .sqlfile: a file containing database instructions or data.- Database: an organised store of data that a website reads from and writes to.
- Information disclosure: a weakness where information that should be private is exposed to anyone who asks for it.
- Vulnerability: a weakness in a system that can be used to do something the owner did not intend.
- Backup file: a copy of data or code kept so it can be restored if the original is lost.
- Reconnaissance: the early stage of looking around a target to learn what exists before testing it.
- Enumeration: listing things one by one, such as all subdomains of a domain.
- Fuzzing: trying many variations of a name or input automatically to see which one works.
- Burp Suite Intruder: a tool that sends many variations of a request automatically.
- nuclei: a tool that runs many checks against a target automatically.
- Patch: a fix applied to a system after a problem is found.
- Hall of Fame: a public page where a company thanks researchers who reported issues.
- Responsible disclosure: reporting a weakness privately to the owner so it can be fixed before it is made public.