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

# Divulgación de información mediante el historial de control de versiones

### Divulgación de información en el historial de control de versiones

**Descripción del laboratorio**

Este laboratorio expone información sensible a través del historial de un repositorio de control de versiones. / El objetivo es recuperar la contraseña del usuario **administrator**, luego inicia sesión con esta cuenta para eliminar al usuario **carlos**.

**Análisis inicial**

Al explorar la aplicación, vemos la presencia de un directorio **`.git`** accesible directamente desde el servidor web.

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

Esto indica que el repositorio Git completo se muestra públicamente, lo que potencialmente permite recuperar el código fuente y el historial de los cambios.

**Explotación**

**Extracción del repositorio Git**/ Se utiliza la herramienta git-dumper para descargar el contenido del `.git` directorio:

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

<figure><img src="/files/0123989439539a288b38221b2295d19acae13151" alt=""><figcaption></figcaption></figure>

**Análisis del historial de commits**/ Una vez que el repositorio se ha reconstruido localmente, se consulta el historial del commit:

```bash
git log
```

El análisis revela que un commit contiene la eliminación de una contraseña de administrador.

<figure><img src="/files/04364d3d6c55d717b169a733e52df40b0bd5172d" alt=""><figcaption></figcaption></figure>

**Inspección de diferencias**/ Se revisa el contenido exacto de este commit para identificar la información eliminada:

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

Las diferencias mostradas permiten encontrar la contraseña del usuario **administrator**.

* q0b3xu3ko6pqcqdjofrq

<figure><img src="/files/d11653a0e221ed942914a3cecf71a7ad74b9598d" 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/es/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.
