The danger of world writable NFS shares
A web directory with directory listing disabled but individual file access allowed exposed a configuration file that revealed an NFS server with world-writable shares. Attackers could mount these shares, read sensitive data such as customer emails and credentials, and backdoor scripts to gain code execution on internal servers.
medium.com
Published on medium.com
Disclaimer: to prevent information leaks for this company, most of the evidence/screenshots here were recreated from the real ones as closely as possible.
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
Impact
Attackers could read over 11 million customer emails, plaintext credentials, SQL dumps, and payment information, and could backdoor scripts to gain code execution on internal servers, leading to further compromise.
What the attacker needed
Network access to the NFS server; knowledge of the NFS server address
The fix
The NFS shares should be restricted to authorised hosts and users, and write access should be removed.
How it was found
- Use gobuster to find a directory that returns 403.
- Bruteforce subdirectories until finding a configuration file.
- Read the configuration file to obtain the NFS server address.
- Enumerate exported shares with showmount.
- Mount all shares locally.
- Search the mounted shares for sensitive information.
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 web server had a folder where you couldn't see a list of files, but if you knew a file's name you could still open it. One such file contained details of a file-sharing server that let anyone read and write files without a password, so the testers could download private data and plant malicious code.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.