EscapeTwo

Writeup for EscapeTwo lab on HackTheBox

Enumeration

  • We can use the credentials provided by the challenge:
    Pastedimage20250311093325.png
  • BloodHound extract:
    Pastedimage20250311093503.png

User flag

  • There isn’t anything we can do from the rose user in BloodHound, but one of the SMB shares is readable:
    Pastedimage20250311093932.png
  • 2 files are present, which probably contain information about the accounts:
    Pastedimage20250311094142.png
    Pastedimage20250311094257.png
  • However, their data look corrupted:
    Pastedimage20250311094435.png
    Pastedimage20250311094517.png
  • I tried a quite trivial way to recover the ata, which worked and returned some passwords:
    Pastedimage20250311094830.png
  • Now we can prepare a bruteforce attacks to get another account from the credentials we get:
    Pastedimage20250311095528.png
  • We get the password for Oscar user:
    Pastedimage20250311095839.png
  • We can also connect to MSSQL with one of the passwords:
    Pastedimage20250311102644.png
  • We get a reverse shell thanks to xp_cmdshell:
    Pastedimage20250311102754.png
  • I tried a few enumerations for Local Privilege Escalation, but it didn’t work. However, running Snaffler on the host returns a new password:
    Pastedimage20250311104337.png
  • I then tried to enumerate some stuff with the sql_svc account, but it wasn’t very successful. Then, I tried password spraying again with the new password, and it worked:
    Pastedimage20250311104926.png
  • This user can winrm on the server, and get the user flag:
    Pastedimage20250311110333.png

Domain Escalation through ESC4

  • Ryan has WriteOwner over ca_svc:
    Pastedimage20250311105145.png
  • Let’s abuse it. We start by setting ryan as owner of ca_svc:
    Pastedimage20250311105324.png
  • Next, we can give ryan FullControl over ca_svc, and then change its password:
    Pastedimage20250311105636.png
  • Next, we can enumerate ADCS (certipy find):
    Pastedimage20250311110055.png
  • ESC4 is an easy way to get Domain Admin on the server. We start by saving the template, and making it vulnerable:
    Pastedimage20250311111243.png
  • Then, we request a certificate with a custom SAN (Administrator):
    Pastedimage20250311111417.png
  • We can finally WinRM on the server to get the root flag:
    Pastedimage20250311111648.png
Last updated on May 24, 2025 00:00 UTC