Aero HTB Walkthrough

Nov 5, 2024    #box   #htb   #medium   #windows   #ldap   #active-directory   #cve-2023-38146   #themebleed   #cve-2023-28252   #persistence  

Aero Hack The Box Walkthrough/Writeup:

How I use variables & Wordlists:

1. Enumeration:

NMAP:

Basic Scans:

kali in HTB/BlogEntriesMade/Aero/scans/nmap  šŸ£ main  3GiB/7GiB | 0B/1GiB with /usr/bin/zsh
šŸ•™ 08:23:55 zsh āÆ sudo nmap $box -sU -Pn -oA UDPbasicScan
[sudo] password for kali:
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-11-04 08:24 GMT
Stats: 0:01:53 elapsed; 0 hosts completed (1 up), 1 undergoing UDP Scan
UDP Scan Timing: About 56.00% done; ETC: 08:27 (0:01:29 remaining)
Nmap scan report for 10.129.229.128
Host is up.
All 1000 scanned ports on 10.129.229.128 are in ignored states.
Not shown: 1000 open|filtered udp ports (no-response)

Nmap done: 1 IP address (1 host up) scanned in 201.42 seconds

Comprehensive Scans:

Web 80:

Dirbusting the webserver using ffuf:

Running whatweb

kali in HTB/BlogEntriesMade/Aero/scans/nmap  šŸ£ main  4GiB/7GiB | 0B/1GiB with /usr/bin/zsh  took 2m55s
šŸ•™ 08:33:15 zsh āÆ whatweb $box
http://10.129.229.128 [200 OK] Bootstrap, Cookies[.AspNetCore.Antiforgery.SV5HtsIgkxc], Country[RESERVED][ZZ], Email[[email protected]], HTTPServer[Microsoft-IIS/10.0], HttpOnly[.AspNetCore.Antiforgery.SV5HtsIgkxc], IP[10.129.229.128], Microsoft-IIS[10.0], Script, Title[Aero Theme Hub], X-Frame-Options[SAMEORIGIN], X-Powered-By[ARR/3.0]

Web-site Enumeration:

Discovering the upload portal:

Discovering ThemeBleed CVE-2023-38146 exploit:

2. Foothold:

Building the ThemeBleed CVE-2023-38146 Reverse Shell DLL:

Running the ThemeBleed Exploit to get a reverse shell:

Enumerating as sam.emerson:

Exfiltrating the CVE-2023-28252_Summary.pdf using base64 encoding:

3. Privilege Escalation:

Researching CVE-2023-28252 (CLFS) Vulnerability:

So as it looks like this host is vulnerable to this specific exploit (well its implied) lets find a POC.

4. Persistence:

Trying to dump creds with mimikatz:

Using invoke-mimikatz.ps1 with a download cradle to dump hashes:

Download Cradle Primer:

What is a Download Cradle?

In essence, a download cradle is a lightweight script or command that reaches out to the internet/host, downloads a file, and often executes it directly in memory. And that is why they work so well, as nothing is written to disk and instead runs in memory they are harder to detect:

How Do Attackers Use Download Cradles:

There are multiple ways to leverage download cradles in various stages of an attack. The most common is often during initial access or lateral movement phases. Here are some common scenarios:

Why Download Cradles are Effective:
Detecting and Stopping Download Cradles:

While theyā€™re sneaky, download cradles can be detected with the right strategies:

Creating a new user who is part of the administrators group:

Living off the land persistence:

Creating a registry key for a back-door:

Registry Backdoor Command Breakdown:

Creating a scheduled task back-door:

Version 1: Using nc64.exe to connect back to our attack host periodically:
Version 2: Using a base64 encoded PowerShell reverse shell and download cradle to connect back to our attack host:

Lessons Learned:

What did I learn?

  1. This box was great as means to learn about the CVE’s in question. However what I enjoyed more was figuring out ways to achieve persistence with such little open on the host. With only port 80 being open creating a consistent means of re-entering the host was interesting to me and a good exercise
  2. Learning about the CVE’s CVE-2023-38146 & CVE-2023-28252 was very interesting.
  3. I wrote two deep dives to understand these attacks more.

What silly mistakes did I make?

  1. Not a huge amount this time to be honest, which is fun. Might actually be improving.

Sign off:

Remember, folks as always: with great power comes great pwnage. Use this knowledge wisely, and always stay on the right side of the law!

Until next time, hack the planet!

ā€“ Bloodstiller

ā€“ Get in touch bloodstiller at proton dot me



Next: Sauna HTB Walkthrough