> 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/fr/web/information-disclosure/information-disclosure-via-version-control-history.md).

# Divulgation d’informations via l’historique du contrôle de version

### Divulgation d'informations dans l'historique du système de contrôle de version

**Description du laboratoire**

Ce laboratoire expose des informations sensibles via l'historique d'un dépôt de contrôle de version. / L'objectif est de récupérer le mot de passe de l'utilisateur **administrateur**, puis se connecter avec ce compte pour supprimer l'utilisateur **carlos**.

**Analyse initiale**

En explorant l'application, nous constatons la présence d'un répertoire **`.git`** accessible directement depuis le serveur web.

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

Cela indique que le dépôt Git complet est affiché publiquement, ce qui permet potentiellement de récupérer le code source et l'historique des modifications.

**Exploitation**

**Extraction du dépôt Git**/ L'outil git-dumper est utilisé pour télécharger le contenu du `.git` répertoire :

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

<figure><img src="/files/452b73cde17d9798e1cd7795236c005169033e90" alt=""><figcaption></figcaption></figure>

**Analyse de l'historique des commits**/ Une fois le dépôt reconstruit localement, l'historique des commits est consulté :

```bash
git log
```

L'analyse révèle qu'un commit contient la suppression d'un mot de passe administrateur.

<figure><img src="/files/5f14a3aa9ac4121922292e86fb5c048d879619f8" alt=""><figcaption></figcaption></figure>

**Inspection des différences**/ Le contenu exact de ce commit est examiné afin d'identifier les informations supprimées :

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

Les différences affichées permettent de trouver le mot de passe de l'utilisateur **administrateur**.

* q0b3xu3ko6pqcqdjofrq

<figure><img src="/files/6d4f94c77afe8d86549f2b77b7d53ba4ae84aea8" 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/fr/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.
