> ## Documentation Index
> Fetch the complete documentation index at: https://rootea.es/llms.txt
> Use this file to discover all available pages before exploring further.

# Safe

> Verified writeups for the Safe machine of Hack The Box

# Safe

<p className="machine-summary"><span className="prompt"><code>\$ tldr</code></span> BOF x64 ROP + libc leak → KeePass database crack</p>

<div className="machine-meta">
  | ·                | ·                                                                                                                                                                                                                                                                                                                                                                            |
  | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Operating system | Linux                                                                                                                                                                                                                                                                                                                                                                        |
  | Difficulty       | Easy                                                                                                                                                                                                                                                                                                                                                                         |
  | Vector           | <span className="vbadge vbadge-binary-exploitation">Binary</span>                                                                                                                                                                                                                                                                                                            |
  | IP               | `10.10.10.147`                                                                                                                                                                                                                                                                                                                                                               |
  | Retirement date  | 2019-10-26                                                                                                                                                                                                                                                                                                                                                                   |
  | Skills           | Information Leakage Buffer Overflow \[x64] \[ROP Attacks using PwnTools] \[NX Bypass] \[ASLR Bypass] Trying to hijack the argument to the system() function by loading our content in RDI \[Way 1] Leaking puts and libc address to make a system call with the argument loaded in RDI \[Way 2] \[EXTRA] Abusing keepass to obtain the root password \[Privilege Escalation] |
</div>

## Writeups

| Language | Author      | Format | Link                                                    |
| -------- | ----------- | ------ | ------------------------------------------------------- |
| 🇪🇸 ES  | **S4vitar** | Vídeo  | [Open](https://www.youtube.com/watch?v=jvoiMos46IY)     |
| 🇬🇧 EN  | **0xdf**    | Texto  | [Open](https://0xdf.gitlab.io/2019/10/26/htb-safe.html) |
| 🇬🇧 EN  | **IppSec**  | Vídeo  | [Open](https://www.youtube.com/watch?v=CO_g3wtC7rk)     |

## Skill resources

Curated documentation for each technique listed in the *Skills* column above. Sources: HackTricks, GTFOBins, PortSwigger, etc.

| Skill                       | Source     | Link                                                                                  |
| --------------------------- | ---------- | ------------------------------------------------------------------------------------- |
| Information Leakage         | HackTricks | [Open](https://book.hacktricks.wiki/en/pentesting-web/information-leak.html)          |
| Buffer Overflow (BoF / ROP) | HackTricks | [Open](https://book.hacktricks.wiki/en/binary-exploitation/stack-overflow/index.html) |

## If you liked this machine, try

* [Admirer](/en/htb/machines/linux/facil/admirer) — Linux, Easy
* [Haystack](/en/htb/machines/linux/facil/haystack) — Linux, Easy
* [Jail](/en/htb/machines/linux/insano/jail) — Linux, Insane
* [Luke](/en/htb/machines/linux/medio/luke) — Linux, Medium
* [October](/en/htb/machines/linux/medio/october) — Linux, Medium

***

## Comments & tips

Did the official writeup not work? Found a smarter trick? Share it here — comments live in [GitHub Discussions](https://github.com/FFuson/HTB_Writeups/discussions).

<div className="rootea-giscus-wrap" data-giscus-term="machine:safe" data-giscus-lang="en" />

*Last updated: 2026-06-07*

<script type="application/ld+json">
  {`{"@context":"https://schema.org","@type":"TechArticle","headline":"Safe — HTB Writeup Index","name":"Safe","url":"https://rootea.es/en/htb/machines/linux/facil/safe","inLanguage":"en","datePublished":"2019-10-26","dateModified":"2026-06-07","about":{"@type":"Thing","name":"Hack The Box (HTB)"},"keywords":"Information Leakage, Buffer Overflow (BoF / ROP)","isPartOf":{"@type":"WebSite","name":"rootea.es","url":"https://rootea.es"},"author":{"@type":"Organization","name":"rootea.es"},"proficiencyLevel":"Fácil"}`}
</script>

<script type="application/ld+json">
  {`{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://rootea.es/en"},{"@type":"ListItem","position":2,"name":"Linux","item":"https://rootea.es/en/htb/machines/linux/facil/index"},{"@type":"ListItem","position":3,"name":"Easy","item":"https://rootea.es/en/htb/machines/linux/facil/index"},{"@type":"ListItem","position":4,"name":"Safe","item":"https://rootea.es/en/htb/machines/linux/facil/safe"}]}`}
</script>
