> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/de/web/information-disclosure/information-disclosure-via-version-control-history.md).

# Informationsleck via Versionskontrollverlauf

### Informationspreisgabe in der Versionskontrollhistorie

**Beschreibung des Labs**

Dieses Lab gibt sensible Informationen über die Historie eines Versionskontroll-Repositorys preis. / Das Ziel ist es, das Passwort des Benutzers zu ermitteln **Administrator**, dann mit diesem Konto anmelden, um den Benutzer zu löschen **carlos**.

**Erste Analyse**

Beim Erkunden der Anwendung sehen wir das Vorhandensein eines Verzeichnisses **`.git`** das direkt über den Webserver zugänglich ist.

<figure><img src="/files/3ce83b7c2f4da9c78453611c02bb2d1999a6000f" alt=""><figcaption></figcaption></figure>

Dies deutet darauf hin, dass das vollständige Git-Repository öffentlich zugänglich ist, wodurch möglicherweise der Quellcode und die Historie der Änderungen abgerufen werden können.

**Ausnutzung**

**Extraktion des Git-Repositorys**/ Das Tool git-dumper wird verwendet, um den Inhalt des `.git` Verzeichnisses herunterzuladen:

```bash
git-dumper https://0a7800030384626580b39ee5001e00b1.web-security-academy.net/.git .git
```

<figure><img src="/files/3990d35f6e3efc9c7768defe806b0adeefb730d0" alt=""><figcaption></figcaption></figure>

**Analyse der Commit-Historie**/ Sobald das Repository lokal rekonstruiert wurde, wird die Commit-Historie eingesehen:

```bash
git log
```

Die Analyse zeigt, dass ein Commit die Entfernung eines Administratorpassworts enthält.

<figure><img src="/files/dc338720d2b6e8fe61b28ed123f24366cf81af62" alt=""><figcaption></figcaption></figure>

**Überprüfung der Unterschiede**/ Der genaue Inhalt dieses Commits wird überprüft, um die gelöschten Informationen zu identifizieren:

```bash
git log -p ab875bcd9cf3ea84ad6af9471521aea4c3a1852d
```

Die angezeigten Unterschiede machen es möglich, das Passwort des Benutzers zu finden **Administrator**.

* q0b3xu3ko6pqcqdjofrq

<figure><img src="/files/667c01fcf22dd15a373b80517acc24bdf07a1283" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/de/web/information-disclosure/information-disclosure-via-version-control-history.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
