Kerentanan Information Sensitive/disclosure (git exposure) pada W
A publicly reachable .git directory on a government website exposed the full source code and sensitive data from the repository. An attacker could read commit history, source code and any credentials stored in the repository.
Published on medium.com
Hello guys welcome back to my write up channels , perkenalkan , nama saya Muhammad Sava Alfarisy , mahasiswa Teknologi Informasi Universitas Tidar , sebenarnya kerentanan ini sudah saya temukan berbulan bulan lalu , namun hari ini , saya akan share pengalaman saya mendapatkan kerentanan pada website mabes TNI , dan…
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 .git directory was deployed to the production web root and the web server was not configured to deny access to it.
Impact
The exposed repository could leak source code, intellectual property and credentials, giving a foothold for further attacks such as remote code execution or data exfiltration.
What the attacker needed
None
The fix
The report says the issue was fixed; the recommended fix is to remove the .git directory from production and block access to it in the web server configuration.
How it was found
- Enumerate subdomains of the target and probe them for live hosts.
- Find a host returning HTTP 200 and open it in a browser.
- Notice the exposed .git directory on that host.
- Use a git-dumping tool to download the repository contents.
- Open the dumped files and observe source code and sensitive data.
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.
Every website is built from files kept in a version-control system called Git, which stores its history in a hidden folder named .git. If that folder is left reachable on the live server, anyone can download it and rebuild the site's source code, including any passwords or keys that were committed by mistake.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.