Haze
A hard active directory windows machine
Enumeration
This is the
nmapresult below :-
┌──(krrish㉿krrish)-[~/hackthebox/haze]
└─$ nmapAutomator -H 10.129.232.50 -t All
Running all scans on 10.129.232.50
Host is likely running Windows
---------------------Starting Port Scan-----------------------
PORT STATE SERVICE
53/tcp open domain
88/tcp open kerberos-sec
135/tcp open msrpc
139/tcp open netbios-ssn
389/tcp open ldap
445/tcp open microsoft-ds
464/tcp open kpasswd5
593/tcp open http-rpc-epmap
636/tcp open ldapssl
3268/tcp open globalcatLDAP
3269/tcp open globalcatLDAPssl
5985/tcp open wsman
8000/tcp open http-alt
8088/tcp open radan-http
8089/tcp open unknown
---------------------Starting Script Scan-----------------------
PORT STATE SERVICE VERSION
53/tcp open domain Simple DNS Plus
88/tcp open kerberos-sec Microsoft Windows Kerberos (server time: 2025-12-31 03:08:23Z)
135/tcp open msrpc Microsoft Windows RPC
139/tcp open netbios-ssn Microsoft Windows netbios-ssn
389/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: haze.htb, Site: Default-First-Site-Name)
|_ssl-date: TLS randomness does not represent time
| ssl-cert: Subject: commonName=dc01.haze.htb
| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:<unsupported>, DNS:dc01.haze.htb
| Not valid before: 2025-03-05T07:12:20
|_Not valid after: 2026-03-05T07:12:20
445/tcp open microsoft-ds?
464/tcp open kpasswd5?
593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
636/tcp open ssl/ldap Microsoft Windows Active Directory LDAP (Domain: haze.htb, Site: Default-First-Site-Name)
|_ssl-date: TLS randomness does not represent time
| ssl-cert: Subject: commonName=dc01.haze.htb
| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:<unsupported>, DNS:dc01.haze.htb
| Not valid before: 2025-03-05T07:12:20
|_Not valid after: 2026-03-05T07:12:20
3268/tcp open ldap Microsoft Windows Active Directory LDAP (Domain: haze.htb, Site: Default-First-Site-Name)
| ssl-cert: Subject: commonName=dc01.haze.htb
| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:<unsupported>, DNS:dc01.haze.htb
| Not valid before: 2025-03-05T07:12:20
|_Not valid after: 2026-03-05T07:12:20
|_ssl-date: TLS randomness does not represent time
3269/tcp open ssl/ldap Microsoft Windows Active Directory LDAP (Domain: haze.htb, Site: Default-First-Site-Name)
|_ssl-date: TLS randomness does not represent time
| ssl-cert: Subject: commonName=dc01.haze.htb
| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:<unsupported>, DNS:dc01.haze.htb
| Not valid before: 2025-03-05T07:12:20
|_Not valid after: 2026-03-05T07:12:20
5985/tcp open http Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)
|_http-title: Not Found
|_http-server-header: Microsoft-HTTPAPI/2.0
8000/tcp open http Splunkd httpd
|_http-server-header: Splunkd
| http-robots.txt: 1 disallowed entry
|_/
| http-title: Site doesn't have a title (text/html; charset=UTF-8).
|_Requested resource was http://10.129.232.50:8000/en-US/account/login?return_to=%2Fen-US%2F
8088/tcp open ssl/http Splunkd httpd
| http-robots.txt: 1 disallowed entry
|_/
|_http-server-header: Splunkd
| ssl-cert: Subject: commonName=SplunkServerDefaultCert/organizationName=SplunkUser
| Not valid before: 2025-03-05T07:29:08
|_Not valid after: 2028-03-04T07:29:08
|_http-title: 404 Not Found
|_ssl-date: TLS randomness does not represent time
8089/tcp open ssl/http Splunkd httpd
|_http-server-header: Splunkd
|_ssl-date: TLS randomness does not represent time
| http-robots.txt: 1 disallowed entry
|_/
|_http-title: splunkd
| ssl-cert: Subject: commonName=SplunkServerDefaultCert/organizationName=SplunkUser
| Not valid before: 2025-03-05T07:29:08
|_Not valid after: 2028-03-04T07:29:08
Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows
Host script results:
| smb2-time:
| date: 2025-12-31T03:09:08
|_ start_date: N/A
|_clock-skew: 8h00m07s
| smb2-security-mode:
| 3.1.1:
|_ Message signing enabled and required
---------------------Starting Full Scan------------------------
PORT STATE SERVICE
53/tcp open domain
88/tcp open kerberos-sec
135/tcp open msrpc
139/tcp open netbios-ssn
389/tcp open ldap
445/tcp open microsoft-ds
464/tcp open kpasswd5
593/tcp open http-rpc-epmap
636/tcp open ldapssl
3268/tcp open globalcatLDAP
3269/tcp open globalcatLDAPssl
5985/tcp open wsman
8000/tcp open http-alt
8088/tcp open radan-http
8089/tcp open unknown
9389/tcp open adws
47001/tcp open winrm
49664/tcp open unknown
49665/tcp open unknown
49666/tcp open unknown
49667/tcp open unknown
49669/tcp open unknown
49674/tcp open unknown
64855/tcp open unknown
64857/tcp open unknown
64860/tcp open unknown
64872/tcp open unknown
64885/tcp open unknown
64904/tcp open unknownTried doing guest login in
smbwith the help ofnxcbut it didn't work

Then in the
nmapresult I saw the port8000and it hadsplunkrunning on this linkhttp://dc01.haze.htb:8000/en-US/account/login?return_to=%2Fen-US%2F

Another thing we see that is port
8089and so I go onto the website but it does not work inhttp, so we switch tohttps,https://haze.htb:8089/but unfortunately my website is not loading in the browser , so let's try with curl

so the
splunkversion is9.2.1, so let's findCVEfor that , the reason i switched forcveas I didn't get valid credentials throughbruteforcingand default credentialsfound this
CVE-2024-36991and this was a path traversal vulnerability , can read more about that in this blog
https://www.vicarius.io/vsociety/posts/exploiting-path-traversal-in-splunk-cve-2024-36991
this exploit on
githuballows us to read the/etc/passwd

but these hashes didn't cracked
Foothold & user.txt
We need to find some another way to get some creds , so let's start by reading how does authentication works in the
splunkwhere are sensitive files are stored
so there is a
splunk.secretfile that is used to encrypt / decrypt passwords in the.conf(configuration) files . To know more about this refer to sources below they are good to have some knowledge
https://community.splunk.com/t5/Knowledge-Management/What-is-the-splunk-secret-file-and-is-it-possible-to-change-it/m-p/331207#M6092
https://help.splunk.com/en/data-management/splunk-enterprise-admin-manual/9.1/configuration-file-reference/9.1.5-configuration-file-reference/authentication.conf
https://help.splunk.com/en/splunk-enterprise/get-started/install-and-upgrade/9.2/install-splunk-enterprise-on-windows/install-on-windows
To get these lets look at the initial payload that is being used to read
/etc/passwdwhich is/en-US/modules/messaging/C:../C:../C:../C:../C:../etc/passwdThis was the payload with the curl command to get
/etc/passwd

Just change the path in the
/etc/, you can get the proper path from the above sources



Now the main task is to crack the hashes and I haven't seen this
$7$hash format , so let's google and try to decrypt that


Here we can use this tool
splunksecretsto decrypt this , the installation guide is inside the repo

Then we can just enumerate the domain with
--rid-bruteand--shares


Ok lets go on for more enumeration with the usernames we have

with this we can see that user
mark.adamshas the same password as thepaul.taylor
Let's take the bloodhound dump and see what we can get from there & remember to do
sudo ntpdate haze.htb, and usemark.adamsas user to take dump and below is the reason for that

In bloodhound I saw that
mark.adamsis a member ofGMSA_MANAGERSbut nothing after that alsomark.adamsdoes not have anyOutbound Object Control

With the help of
bloodyADI tried to get more onto the writable by themark.adamsand found this

This attribute
msDS-GroupMSAMembershiptells us that if a requestor has permission to retrieve the password for a group MSA and we can write
more enumeration on from on that attribute
msDS-GroupMSAMembership

To update write that to our user we can use the below command & the
SIDis of the our usermark.adams


When I saw in bloodhound for this user
Haze-IT-Backup$Outbound Object Controlthere was one and nothing after the group owning so decided to take the bloodhound dump again with theHaze-IT-Backup$hash


To exploit this the commands are below :-
So what are we doing is making the user
Haze-IT-Backup$owner ofSupport_Servicesgroup then giving the right to add members (WriteMembers) , then addingHaze-IT-Backup$toSupport_Servicesgroup then performingshadowCredentialsattack


Let's grab the
user.txtfromedward.martin

For root
In bloodhound we can see that the user
edward.martinis a member ofBACKUP_REVIEWERSgroup

Further we can see that there is backup folder in
C:\directory , so let's download that and find something juicy

Investigating the backup I found two things that is
splunk.secretand a customauthentication.conf

let's use the same tool
splunksecretsto decrypt the password

The passwords don't work for some reason on any user

Trying this password on the
splunkwebsite and it worked with usernameadmin:Sp1unkadmin@2k24

Exploring more in the
splunkenterprise didn't gave nothing so looked for some reverse shell through it

https://github.com/0xjpuff/reverse_shell_splunk
Edit the
run.ps1, delete therun.pyand edit theinputs.conf


upload the
reverse_shell_splunk.splhere and wait for the reverse shell
This way we can get a reverse shell from
splunkand now just we have to abuseSeImpersonatePrivilege


used
sweetpotato.exeto addmark.adamsin the Administrators group
Let's get the
hashdumpand access to administrator shell

Shell of Administator

Pwn3d the machine !!
Last updated
