How a ‘.git’ file Leads to Zendesk Panel Takeover
An exposed .git directory on a UAT middleware host allowed the entire source code to be downloaded, and a PHP file in it contained plain-text Zendesk API credentials. Using those credentials, the author logged into the Zendesk admin panel with full access.
Published on sl4x0.medium.com
Greetings, hackers! In my recent Pentest Engagement at BugSwagger, join me as I discovered the ‘.git’ path that let me take over the Zendesk panel of the admin.
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 a publicly reachable UAT web server, and secrets were hard-coded in plain text in a source file.
Impact
An attacker could take over the Zendesk admin panel, giving full access to support tickets and settings.
What the attacker needed
Publicly reachable .git directory; no authentication needed to download it
How it was found
- Run a tool against the target host's .git path to download the repository.
- Inspect the downloaded source and find a PHP file containing Zendesk credentials.
- Log in to the Zendesk login page with those credentials.
- Confirm full admin panel 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 .git folder is part of a code repository and is sometimes accidentally left on a public web server. If it is reachable, anyone can download the project's history and files. Here the source code included a file with a username and password for the company's Zendesk support system, so the author could log in as an administrator.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.