Infiltrator

Recon

nmap_scan.log|h-50%_styled
└─$ grep infil /etc/hosts
10.129.146.214  infiltrator.htb dc01.infiltrator.htb    hostmaster.infiltrator.htb

DNS

HTTP (80)

Writeup.png

Subdomain and directory enumeration came empty handed, the website is most likely just static website hosted on HTML. Search, email and contact wasn't working (most probably).

Kerberos

Kerbrute

namebusterarrow-up-right was used to generate different combinations of usernames for AD.

AS-REP

Something interesting happens if we try to password spray!

https://book.hacktricks.xyz/windows-hardening/active-directory-methodology/asreproastarrow-up-right

Get the hashes

Crack available hash

Creds: l.clark:WAT?watismypass!

SMB

Perform RID brute just to be safe that we covered all users, evil-winrm didn't work.

LDAP

Creds: K.turner:MessengerApp@Pass!

For ???, doesn't work for smb!

Also very useful command:

Writeup-1.png

Bloodhound

Writeup-3.png
Writeup-4.png

Clark doesn't have anything interesting, but the group he belongs to has another user.

D.anderson.ccache

We are able to forge kerberos tickets and not only ours.

Writeup-2.png
Writeup-5.png
Writeup-6.png

Chain of attack

After following the Outbound permissions on each connection we end up with a chain like:

Writeup-7.png

dacledit

Now chain becomes like:

Writeup-8.png

pywhisker && certipy-ad

Same steps from Mist box.

AddSelf

AddSelf, similar to AddMember. While AddMember is WriteProperty access right on the target's Member attribute, AddSelf is a Self access right on the target's Member attribute, allowing the attacker to add itself to the target grouparrow-up-right, instead of adding arbitrary principals. srcarrow-up-right

https://www.thehacker.recipes/ad/movement/dacl/addmemberarrow-up-right

ForceChangePassword

https://www.thehacker.recipes/ad/movement/dacl/forcechangepasswordarrow-up-right

M.harris.ccache

Due to some error in HTB infrastructure the commands had to be executed quickly.....

Note: If you get Cannot find KDC for realm "INFILTRATOR.HTB", you may need to update /etc/resolv.conf with box IP (first entry) or /etc/kerb5.conf

evil-winrm (m.harris)

User.txt

Privilege Escalation

Internal AD Enumeration

harris doesn't have any outbound permissions.

evil-winrm was very unstable for some reason, so I switched to ConPtyShell.

Enumerate with winPeas

Output Messenger (k.turner)

Before we begin the certificate shinanigans let's go back to k.turner password. I discarded the network output of winPeas, but it actually has interesting information.

https://support.outputmessenger.com/server-install-faq/arrow-up-right

Writeup-9.png

Install the official app for linux:

Time to proxify the connections!


From the future: Handling ports was annoying so just automate it


Creds: k.turner:MessengerApp@Pass!:127.0.0.1

Writeup-10.png
Writeup-11.png

Hidden Files

Previously winPeas found hidden directory in /Users:

MySQL

Unintended path

You can just read files, lmao

Output Messenger (m.harris)

Creds: m.harris:D3v3l0p3r_Pass@1337!:127.0.0.1

Writeup-12.png

I think Download button broke because I didn't have Storage Folder specified, we can use Download History to get files. still doesn't work because the app kinda died 💀 Box restart to the rescue.

Writeup-13.png

Decompile the exe with ILSpy or similar, the app is written in C#

evil-winrm (winrm_svc)

Creds: winrm_svc:WinRm@$svc^!^P

Nothing much in users directory, but we can login via chat app again

Writeup-14.png
Writeup-16.png

The only other user that has access to the chat is probably A.walker

Chat Logs

Winpeas showed something interesting again in home directory.

Writeup-17.png

The winrm_svc user has an interesting node too:

Writeup-18.png

https://support.outputmessenger.com/chat-room-api/#Retrieving_a_chat_roomarrow-up-right

Writeup-19.png

Hidden chat logs

Creds: O.martinez:m@rtinez@1996!

The app was acting wacky, and luckily there was a web interface we could use. When going through the chats we see some messages we haven't seen before.

Writeup-20.png

Bruteforce Try

idk My password is a combination of my name and birth year, like username + birthday which is 1999!!

First try at bruteforce:

She did complain about some site popping up and her calendar is full of their domain, dns poisoning to steal the user hash?

Writeup-21.png

Windows Client

Run Application

For whatever the fucking reason, you need to download Windows client and then you have access to new task.

Writeup-22.png

First sync the calendar, then setup new Run Application and run the revshell that exists on remote system (MIGHT ALSO NEED TO EXIST ON YOUR WINDOWS)

Writeup-24.png

Reverse Shell

Writeup-23.png
Writeup-25.png

https://www.thehacker.recipes/ad/movement/dacl/forcechangepasswordarrow-up-right

This didn't work 🤔

Since the box is revolved around app check for something interesting.

Network Capture

Download the file

Writeup-26.png

BitLocker

Zip is password protected so crack the password:

Writeup-27.png
Writeup-28.png

Recovery key:

Hmmm.... There's also some kind of authorization password

Writeup-30.png

Connection errors

I decided to upgrade to persistent shell because the connection was not acting nicely.

And at this moment my box died 🎉

Previous I had luck dependent method work, so this time I restarted the box, switch network adapter from NAT to Bridged and setup ligolo-ngarrow-up-right

Writeup-29.png

Lol, I had problems setting it up so I just went back to Chisel, which works very nicely!

Setup chisel on remote, and when you connect to Chat server specify the IP of your attacker box (~kali). Access chain like: Host -> Kali -> Victim

Drives Enumeration

Get drives available on system:

Martinez Password

Writeup-31.png

Creds: O.martinez:M@rtinez_P@ssw0rd!

RDP

We can now finally RDP as Martinez.

The drive can be found via explorer at E: and you need to use the Recovery Code, then we can find interesting files in Administrator's home.

Writeup-32.png

Note: I exfiltrated file via simple PHP server https://gist.github.com/taterbase/2688850arrow-up-right (php -S 0.0.0.0:80 and mkdir uploads)

Exfiltrate the file and check contents

Dump the passwords via secretsdump:

Pass-the-hash method only works for Clark? (the foothold user)

Rubeus only gives tickets for Clark and Anderson...

NTDS database can be parsed into SQLite version: https://www.thehacker.recipes/ad/movement/credentials/dumping/ntds#ntds-directory-parsing-and-extractionarrow-up-right

In the user_accounts table we find lan_managment description which contains the password!

Writeup-33.png

lan_managment

Creds: lan_managment:l@n_M@an!1331

winrm doesn't work, but smb confirms the password is valid.

Enumerate AD again with bloodhound:

Note: You might need to add victim server to /etc/resolv.conf

Writeup-34.png

https://www.netexec.wiki/ldap-protocol/dump-gmsaarrow-up-right

infiltrator_svc$

Creds: infiltrator_svc$:52dfec373c144cb8d50334cb73934612

Nothing new from this loot:

ESC4

https://github.com/ly4k/Certipy?tab=readme-ov-file#esc4arrow-up-righthttps://www.thehacker.recipes/ad/movement/adcs/access-controls#certificate-templates-esc4arrow-up-right

Note: certipy-ad req took like forever to work because of template probably didn't work or it's the box. Make sure to run template and then req few times!!!

Administrator

Root.txt

Last updated