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

# Offenlegung von Quellcode über Sicherungsdateien

### Quellcode-Offenlegung über Sicherungsdateien

**Beschreibung des Labs**

Dieses Lab legt den Quellcode der Anwendung über **Sicherungsdateien** offen, die in einem versteckten Verzeichnis gespeichert sind. / Ziel ist es, das **Passwort der Datenbank**, das im offengelegten Quellcode fest codiert ist.

**Ablaufphasen**

**Inhaltsentdeckung**/ Unter Verwendung von **Burp Suite** (Funktion Discover Content), analysieren wir die zugänglichen Pfade der Anwendung.

<figure><img src="/files/1e4528ab4809671f4fabf9f48968428832e9fad2" alt=""><figcaption></figcaption></figure>

**Identifizierung eines sensiblen Verzeichnisses**/ Die Analyse zeigt die Existenz eines versteckten Verzeichnisses namens **Sicherung**.

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

<figure><img src="/files/9f6ed786a0d9d00b8952c3887d69aa04ae647e02" alt=""><figcaption></figcaption></figure>

**Zugriff auf Sicherungsdateien**/ In diesem Verzeichnis ist eine Sicherungsdatei mit der Endung `.bk` zugänglich. / Sie enthält \*\*Java-Code\*\*, erläutert.

<figure><img src="/files/1021cf0428a6daa060952c21f4e6a0dd098e9960" alt=""><figcaption></figcaption></figure>

**Analyse des offengelegten Codes**/ Die Datei offenbart Anmeldedaten für eine **PostgreSQL** Datenbank, mit fest codierten Zugangsdaten.

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