root@najam~#

Cyber Soldier | Software Engineer

8 July 2020

Not getting Shell on Mr.Robot CTF on TryHackMe?

by Najam Ul Saqib




Well, this was my first machine on THM and I pulled my hairs on not getting the shell when I was doing all the stuff just right.

It was Mr.Robot's CTF, I tried literally everything to get the shell, I tried PHP reverse shell, meterpreter session, metasploit's wp_admin module, malicious Wordpress plugins but of no avail.

I turned to TryHackMe's discord server to check what am I doing wrong, what came out was very funny and frustrating at the same time 😅

Lets take an example of PHP Reverse Shell, when you submit the PHP shell code in 404.php page, you have to configure two things, one is your IP(LHOST) and other is your Port. I was putting my eth0/wlan0's IP address into the LHOST and I was never getting anything back on netcat. As TryHackMe uses OpenVPN proxy to connect to their server so your eth0/wlan0's IP is not your LHOST, after connecting to OpenVPN, run IP address command and use the tun0 IP address, this is your listening host aka LHOST. Alternatively you can go on TryHackMe's Access Page, the IP mentioned there under "Internal Virtual IP Address" can also be used. This was a minor mistake but it wasted some hours of mine. Now you'll be able to listen on netcat and get a shell through PHP shell code. ❤
tags: mrrobot - ctf