πSolid State
It was originally created for HackTheBox
1. Reconnaissance
Scanning the network to find vulnerable machine's IP
arp-scan -l root@j0zack
Interface: enp0s3, type: EN10MB, MAC: 08:00:27:9c:9d:c8, IPv4: 192.168.10.25
Starting arp-scan 1.9.7 with 256 hosts (https://github.com/royhills/arp-scan)
192.168.10.1 52:54:00:12:35:00 QEMU
192.168.10.2 52:54:00:12:35:00 QEMU
192.168.10.3 08:00:27:46:7f:87 PCS Systemtechnik GmbH
192.168.10.28 08:00:27:d4:af:6c PCS Systemtechnik GmbH
4 packets received by filter, 0 packets dropped by kernel
Ending arp-scan 1.9.7: 256 hosts scanned in 2.276 seconds (112.48 hosts/sec). 4 respondedWe find the IP of the vulnerable machine to be
192.168.10.28
2. Scanning
2.1 Nmap
Using
nmapto find the open ports and their services
We find open ports
22,25,80,110,119,4555with servicesssh,smtp,http,pop3,nntpand aApache Jamesrunning respectively.We do not find anything interesting in the webpage

2.2 James Remote Admin
Default credentials of James Remote Administration toll is
root : rootLogging in to the server via
ncand using the default credentials.
We find 5 users
We can use the
setpasswordcommand to reset all users passwords to123456
2.3 POP3
We can use
telnetto log in to thepop3servers to retrieve any useful information from the mails. (usermindygot some juicy info.)
We can log in as
mindywith the password123456and retrieve their mail.
We find 2 mails for
mindyGetting 1st mail
We find out that
mindyrecently joined the team and this is her welcome address mail.Getting 2nd mail
Here we get the ssh access credentials for
mindy
mindy : P@55W0rd1!2@
3. Initial Foothold
3.1 SSH
Using
sshto remotely log in asmindy
Here we find the
user.txtand also notice that we are using a restricted bash (rbash) with limited commandsIn order to spawn a regular bash shell to get its full functionality, we simply use
sshagain to login asmindyas well as specifybashat the end of the command.
Stabilizing the shell; We find 2 users
jamesandmindy
4. Privilege Escalation
4.1LinPeas
We can use the script LinPeas to find any vulnerabilities or potential privilege escalation vectors.
Downloading the script from its GitHub repository to
/tmpdirectory, making it executable and running it.
The script shows an interesting file
/opt/tmp.pywhich is writable
Viewing the file, we see that it is a script which is run by root to execute a command that removes every file and folders from the
/tmpdirectory at regular intervals.
Since the file is writable, we can modify it to include a
ncreverse shell ( make sure to change the IP)
We can open up a netcat listener and after a few moments, we get a shell as
root.
We can stabilize the shell and get the
root.txtfile
Last updated