> 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/source-code-disclosure-via-backup-files.md).

# Divulgación del código fuente mediante archivos de copia de seguridad

### Divulgación del código fuente mediante archivos de respaldo

**Descripción del laboratorio**

Este laboratorio expone el código fuente de la aplicación a través de **archivos de respaldo** almacenados en un directorio oculto. / El objetivo es identificar y enviar la **contraseña de la base de datos**, que está codificada de forma fija en el código fuente revelado.

**Etapas de la operación**

**Descubrimiento de contenido**/ Usando **Burp Suite** (función Descubrir contenido ), analizamos las rutas accesibles de la aplicación.

<figure><img src="/files/4c5f29891abb76d205d17abb7deb15b2811de74f" alt=""><figcaption></figcaption></figure>

**Identificación de un directorio sensible**/ El análisis revela la existencia de un directorio oculto llamado **backup**.

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

<figure><img src="/files/4a558169573cd567cbc71a9bd13a12b16ef5b7a0" alt=""><figcaption></figcaption></figure>

**Acceso a archivos de respaldo**/ En este directorio, un archivo de respaldo con una extensión `.bk` es accesible. / Contiene \*\*código Java\*\* explicado.

<figure><img src="/files/600b3f14b30e1b0aed4e6f80130c8d8810303e09" alt=""><figcaption></figcaption></figure>

**Análisis del código divulgado**/ El archivo revela información de acceso a una **PostgreSQL** base de datos, con credenciales codificadas de forma fija.

<figure><img src="/files/804a6179d9a7840fbfe3f951c14c5bdf5b15ddf9" alt=""><figcaption></figcaption></figure>

```java
        ConnectionBuilder connectionBuilder = ConnectionBuilder.from(
                "org.postgresql.Driver",
                "postgresql",
                "localhost",
                5432,
                "postgres",
                "postgres",
                "eq77s9j4j4sa5a3m9iymzi9e2m8e68sj"
        ).withAutoCommit();
```


---

# 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/source-code-disclosure-via-backup-files.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.
