A Story Of My First Bug Bounty
An exposed .env file on a Laravel subdomain contained AWS access keys and bucket details, allowing the attacker to list the contents of the S3 bucket. The attacker could access sensitive cloud storage data.
Published on medium.com
This is my first article. This article will talk about how I earned a first 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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the .env file was accidentally deployed to a publicly accessible web directory, exposing secrets.
What the attacker needed
Publicly accessible .env file; AWS credentials in the file
The fix
The .env file should be removed from the public web directory and access to it blocked.
How it was found
- Found subdomains of the target using a subdomain enumeration tool.
- Selected the subdomain backup.target.com and noticed it used Laravel.
- Checked for directory listing and found the .env file.
- Extracted AWS credentials and bucket name from the .env file.
- Configured AWS CLI with the extracted credentials.
- Listed the S3 bucket contents using the AWS CLI.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A configuration file meant to be private was left publicly accessible on a website. It held cloud login keys, so the finder could use those keys to look inside the company's cloud storage. This is like leaving a spare key under the doormat.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.