Skip to content
Info disclosure Write-up Intermediate

How I hacked into a “Hacking Company” — Rare Scenario

A publicly accessible .git directory on a development subdomain exposed source code, database credentials, SMTP credentials, and the origin IP. The attacker used these to gain admin access, read sensitive data, and send emails from the company's mail server.

Gowtham_Naidu Follow

Published on infosecwriteups.com

After digging through the downloaded files, I found something interesting � and now you know, what most hackers will do right away 😁

Gowtham_Naidu, on infosecwriteups.com

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 development subdomain exposed its .git directory, allowing source code and secrets to be downloaded.

Impact

The attacker could modify the website, access sensitive company and client data, and send emails from the company's mail server.

What the attacker needed

Development subdomain with public .git; no authentication required

The fix

The issue was fixed after the author reported it, though the company did not respond directly.

How it was found

  1. Found development subdomain via crt.sh and FFUF.
  2. Noticed .git was publicly accessible on the development subdomain.
  3. Used GitTools to dump the .git repository.
  4. Ran Extractor to extract information from the dumped .git.
  5. Found SQL credentials and origin IP in the extracted files.
  6. Used SMTP credentials to send email from the company's mail server.

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 website's source code history and should never be public. If it is, anyone can download it and see secrets like passwords. Here, the attacker found such a folder and used the passwords inside to take over the company's systems.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Gowtham_Naidu

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.