<?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 Guim3x on Medium]]></title>
        <description><![CDATA[Stories by Guim3x on Medium]]></description>
        <link>https://medium.com/@guim3x.82?source=rss-e64e9fdedf4d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VHXC6EHHrowVVEIaSRW1kw.jpeg</url>
            <title>Stories by Guim3x on Medium</title>
            <link>https://medium.com/@guim3x.82?source=rss-e64e9fdedf4d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 17:44:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@guim3x.82/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[Anonymous Playground — TryHackMe CTF Writeup]]></title>
            <link>https://medium.com/@guim3x.82/anonymous-playground-tryhackme-f153e6bc24a5?source=rss-e64e9fdedf4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f153e6bc24a5</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[anonymous-thm]]></category>
            <category><![CDATA[anonymous-playground]]></category>
            <category><![CDATA[ctf-thm]]></category>
            <category><![CDATA[writeup]]></category>
            <dc:creator><![CDATA[Guim3x]]></dc:creator>
            <pubDate>Thu, 22 Dec 2022 22:54:54 GMT</pubDate>
            <atom:updated>2022-12-23T12:42:14.967Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Hello people! What’s up? Let’s go to see one of the forms to solve this challenge of TryHackMe considered of level hard. I took some time to understand it’s complexity and how I could to get the goals of the challenge.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*e4avnEW5uBtYhjFyoG2TMg.png" /></figure><blockquote>First of all, we will verify what ports are available in the IP f our target with the Network Mapper, known as <strong>nmap.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*d8_VbwSCBsq6jfKpDQ3s4g.png" /></figure><blockquote>The scanner results show us the ports 22 (ssh) and 80 (http) opened. So we’ll to look at Website. In paralel let’s go to use the gobuster to discover directories in the Web application.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_orDB7bqdfNzS6nrHtfpQ.png" /></figure><blockquote>The gobuster returned some directories, between them the “<strong>/robots.txt”</strong>. The “/robots.txt” is a file that is saved in root folder in the Website. It’s functionality is to indicate to the “robots” search engines (Google, Bing, DuckDuckGo, etc) which the pages there marked can’t be access by theses search engines.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*-IuvatMfTfeJqZi1jOAIUg.png" /></figure><blockquote>So, looking at the “/robots.txt”, we found one directory. Until here, that’s ok!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*8mGKgXOZJdUAMzlPtquhXA.png" /></figure><blockquote>Putting this directory in URL (http://10.10.19.158/zYdHuAKjP) something is revealed for us. An information saying we don’t have permission, that our access is denied. In this case, let’s go to see the “Inspect/Developer tools” (F12).</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*ROYFfId6YJFrogjhTjmJ_w.png" /></figure><blockquote>Moving to tab “Storage” in cookie section, we get some information from the browser. In this moment, a simple alteration in value from “denied” to “granted” will give us the permission enough for more one step. Change the value and refresh the page.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wqIUtSwG2wPHtTsQyo_v1Q.png" /></figure><blockquote>Now, we have this cypher… this it was my longer time to understand how was the cypher’s behavior. In the beginning, I could only see the pattern… one lowercase and one uppercase, like a pair!! Well, it was already some thing. In this part, I caught the hint from this challenge which said: <strong>‘zA’=’a’ </strong>. During this challenge I exposed very ideas, and I got one pertinent about it. Next topic I will explain!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*9VfMSFdKkwuPCjp2CTNkeQ.png" /></figure><blockquote>I did an explication using the notepad, and I hope that help you understand. If you get the examples in this note, you have the result of the cypher; however the challenge say to make a script in python. With this concept in mint, you’ll able to code a script easily.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*Cqac7MIs1I6xVzLXJbhw2A.png" /></figure><blockquote>I coded the script in python that translate the cypher in text.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*biN5NdthS1DpzGdn-4p5fg.png" /></figure><blockquote>When you use the script through the python3, you will get de credentials found. <strong>PS.: I didn’t achieve to separate the user from the password.. I believe that is not hard to see, because if you notice, the cypher in user is the same in password (hEzAdCfHzA::hEzAdCfHzA) → after the “::” is the password —&gt; See the picture below.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*ioMGcCTqyy4HCX9fSLtdYA.png" /></figure><blockquote>Translated with python script. PS.: In yellow color, it’s the password.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*ZAci7kgAxP8Mpl1Vh4_gNA.png" /></figure><blockquote>Good, now with the credentials in our hands, let’s go to access the ssh it was discovery during the nmap.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*Wc5D50otUMcZSwVLC57YZQ.png" /></figure><blockquote>Upon the enter into the target machine and exploring the folders, we found the first flag of the challenge. We can see also a file in txt extension, and by several times can have some instruction or important something. Let’s check!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*oj0mGgCuz1DXctwpqQ7Gbg.png" /></figure><blockquote>At the first moment and verifying the binary file, we can notice which the binary show a setuid; it means that we’ll have the execution from the binary through another user, where we can see execution from the file and the prompt that is “Who do you want to hack?” In this example, I used “magna123” only to confirm my intuition. There is no any result.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*os9nyOa90um8eNb3IGi0ag.png" /></figure><blockquote>Now we have to check out the binary of the hacktheworld. When I studied Assembly, I used for many times the gdb. In short explanation, the gdb as the radare2 are tools to investigate and perform the reverse engineering that allow us to debbuger binaries files. So, for this room, I solved to caugh the radare2 to get more knowledge about the tool. With some hours of study, isn’t hard to learn about the radare2. Follow below the links which helped me to understand how to handle the tool.<br><a href="https://github.com/radareorg/radare2">https://github.com/radareorg/radare2</a> <br><a href="https://github.com/ifding/radare2-tutorial">https://github.com/ifding/radare2-tutorial</a></blockquote><blockquote>First of all, we listed all the functions of the binary, where we see a interesting call “sym.call_bash”.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QcA3c2ncJSKQpYGZb5X6lA.png" /></figure><blockquote>In the picture below and analyzing the file, we see the sym.call_bash function run the<strong> /bin/bash</strong>, and it’s our goal; however we need to another user due the setuid <strong>(call sym.imp.setuid)</strong> is have been call in the binary. Let’s go to buffer overflow now!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T8td9ctsxxmEKjJFOdzsTA.png" /></figure><blockquote>To achieve sucessfull, we have to get a buffer overflow in the memory through the binary. A short explanation about the buffer overflow, it occurs when a execution programm tries to write data beyond which the memory allows, and it overloads the operational system, causing the possibility to execute arbitrary code. In the picture below, I putted the value “A” between 50 and 100 to overflow the bytes and verify what is the number to crash my memory. I used the python to print the events into the binary. So, let’s to do some tests!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*Ld8ooYxDXJWSYB5MFMa-_Q.png" /></figure><blockquote>It was found the <strong>“Segmentation fault (core dumped)” from 72 above</strong> that it crashed the binary. With this information, we perform the bytes in hex format to make the execution of the binary. It’s necessary to keep the shell when the binary be executed; therefore we have to use the command <strong>“cat”</strong> to keep the shell in execution. With the shell running, we can to take a tty shell in python.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Sh3RVu7CuckYEzRPBUzFQ.png" /></figure><blockquote>After to take the tty shell, exploring the folders you get the second flag.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*UQApsIMzmabClEVJ2PH-nA.png" /></figure><blockquote>Finally to get the last flag, we have to make a privilege escalation. Well, exploring the folders and read the files, we will find in “<strong>/etc”</strong> a crontab file. If we read this file, we get the information that a service runs minute by minute in /home/spooky. This give us an idea to do a malicious file with a reverse shell to escalate our privileges to root. The crontab file show us that all the services run as root. See below!</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*-QbMRWT4XPjEvJrmyYACAQ.png" /></figure><blockquote>To create a malicious payload, we go to /home/spooky and prepare our task. It’s a reverse shell in netcat and change for your IP and port. <strong>PS.: when created the payload, don’t forget to listen in other terminal to receive the connection.</strong> Done this, we will use the exploit Wildcard. Let’s go to understand about it. The first checkpoint execute action on each checkpoint. The second checkpoint show progress messages every numbers record (default 10). Follow below the link to study these exploits.<br><a href="https://www.hackingarticles.in/exploiting-wildcard-for-privilege-escalation/">https://www.hackingarticles.in/exploiting-wildcard-for-privilege-escalation/</a></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9IACpJn4mb5UQ5FMFFN-Mw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*W1VrvimWJ2JpGRcFczSs5g.png" /></figure><blockquote>Now we are root! Caugh the last flag to finish the challenge.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*bTCs843dlTFlKDdMVODA9g.png" /></figure><blockquote><strong>I thank you to read this writeup. I hope having help you some form, because for me have to write this article, was very difficult.. I think I don’t know how to explain very well, but it was my best, believe it!</strong></blockquote><blockquote><strong>See you later!</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f153e6bc24a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Commited — TryHackMe]]></title>
            <link>https://medium.com/@guim3x.82/commited-tryhackme-3187e67a0eff?source=rss-e64e9fdedf4d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3187e67a0eff</guid>
            <dc:creator><![CDATA[Guim3x]]></dc:creator>
            <pubDate>Tue, 06 Sep 2022 20:54:44 GMT</pubDate>
            <atom:updated>2022-09-06T20:54:44.032Z</atom:updated>
            <content:encoded><![CDATA[<h3>Commited — TryHackMe</h3><p>After started the machine, we have to unzip the file to extract the contents of the commited.zip .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/757/1*4lcZCEjEeYN4cBaPxcA1eA.png" /></figure><p>With the “ls -la” command, we will get the list of the files include the hidden files. The “-la” command its necessary due the paste “.git” to seem in the list. We will have to explore the “.git file”, because it is a very important directory where the developers upload their projects.</p><p>In the “.git file” and listing all the files, we will see others important files, where we have to get knowledge of each one. Although we know that the “branches” directory it’s interesting, but there isn’t nothing to do there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*PAj_MUrDPvmOE9I_VjpaaA.png" /></figure><p>To be more directy, what interested for us is the “logs” directory. So let’s go there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*z2-xglRrnDpoB1jTZdjhUA.png" /></figure><p>When we entry into the “logs” directory, let’s browse the folder in this sequence /refs/head , and listing all the files, we wll get 3 points: dbint, log and master. With the command “cat dbint”, we will get all the commits done in this branch. Looking at the DB check, we have the commit “3a8cc….b625&quot;, so copy this commit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5GKCb6-WN4VEukbci9CFbw.png" /></figure><p>Giving the command git show and paste the commit, we will have the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TEQ_FGjxd_1nxokIJsU9vg.png" /></figure><p>So, I hope to have aid you in this way!</p><p>Thanks!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3187e67a0eff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>