How I Got Access Into National Testing Agency Nta And Achieved Full Database Access
A Laravel application on an NTA subdomain exposed its .env configuration file, which contained database credentials. The author used those credentials to connect to the database and confirmed full read/write access.
While clearing out my drafts , came across a screenshot and the story I almost forgot .
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 web server was misconfigured to serve the .env file instead of blocking access to it.
Impact
The exposed credentials allowed full read/write access to the database, which could lead to data theft or modification.
What the attacker needed
None
How it was found
- Identify a subdomain built with Laravel using Wappalyzer.
- Try to access the .env file directly on that subdomain.
- Read the exposed database credentials from the .env file.
- Use a database tool to connect with those credentials and confirm access.
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 .env file is a configuration file that often holds secrets like database passwords. If a web server serves it publicly, anyone can read those secrets and use them to access the database directly.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.