Last updated
Last updated
Sizzle is an insane difficulty Windows box with an Active Directory environment. A writable directory in an SMB share allows to steal NTLM hashes which can be cracked to access the Certificate Services Portal. A self signed certificate can be created using the CA and used for PSRemoting. A SPN associated with a user allows a kerberoast attack on the box. The user is found to have Replication rights which can be abused to get Administrator hashes via DCSync.
Scope
IP Address: 10.10.10.103
Update hosts file with domain name, FQDN and computer name
DNS Enumeration
Zone transfer failed
I can't get any user from bruting kerberos.
No thing also from ldap
subdomain enumeration
Both links http://htb.local/
& https://htb.local/
lead to the same page
From wappalyzer
extension, the webapp runs with ASP.NET
technology on IIS
web server
Since we are dealing with IIS web server, I will try fuzzing for directories with ISS.fuzz
wordlist
/certsrv
requires http authentication
/certenroll
gives Access is denied
I can say that the machine has Certificate authority installed on the system.
Anonymous login is enabled along with guest account.
I will mount Department Shares
locally for easy exploring
ZZ_ARCHIVE
has several files & Users
has users' folders
I will try to write a file on each directory and see if I have write access to one of them.
I will then search for file.txt
and see if It was created successfully in any directory
So, I have Write
Access to ZZ_ARCHIVE
& Public
folders , I will try to put .scf
or .lnk
file to steal NTLMv2 hash if any user enter the shared folder.
The structure of the file looks like this.
Putting the file to the share.
I will start Responder
to listen for incoming connection
Get a hash
Starting hashcat
to crack the hash
Cracked successfully :)
Verify with cme
Although the credentials are valid, I can't access the machine with winRM
I will continue to enumerate the machine with this credentials including
Share Access
Bloodhound Collector
/certsrv
authentication
This time I have read access on CertEnroll
share
When viewing the share content, I find interesting files
Download them all
I will make Enumerate share access
done in my notes and switch to collect data with bloodhound.py
for further enumeration and go to /certsrv
page
I Uploaded the zip file to bloodhound and go to /certsrv
After Authenticated to webapp, It leads me to this page.
I will click on Request a Certificate
Click on advanced certificate request
It asks for Certificate signing request .csr
which can be signed with a private key, and I don't have one, So I will generate my private key and sign a .csr
file with it.
To login to the machine, I need to have certificate signed from
Certificate Authority (CA)
of the domain along with the private key with which the certificate singing request was signed.
Generate the key and csr files.
Paste the csr
Click on Download Certificate!
I will use evil-winrm
with the following options and enter passphrase when promoted:
-S
enable SSL
-c
accept Certificate file
-k
accept private key
From impacket
toolkit, I use GetUserSPN
to find account with Service Prinicpal Names
that can be kerberoasted
When I tried to perform kerberoasting attack from Linux, it failed, So I will attempt it from windows.
When I tried to upload any tool to the box and execute it, it failed, So there might be something preventing me.
We are in Constrained Language modelCLM
Also, after I Queried AppLocker
policy, I found that I can run programs in tmp
folder
Performing kerberoasting against mrlky
user with Rubeus.exe
Cracked :)
I will then upload RunasCs.exe
to the machine to get a shell as mrkly
Receive the connection with nc.
Get user flag
User Flag: b31ca0c7a5bcc77a55xxxxxxxxxxxxxx
From bloodhound, User Mlky
has DCync
rights, I can take over the domain by dumping ntds
database.
OR with secretsdump.py
Access the machine with psexec.py
Get administrator flag
Root Flag: c3d8011c9688feccaxxxxxxxxxxxxxxxx