Hackthebox - Explore

  • Android

Explore

Nmap

Port 2222

  • If we lookup for exploit for this specific Banana studio ssh service, we find this exploit. Seems to have been made for this specific box. So I will not use it. Plus it seems to require a password for ssh authentication so not really useful anyway.

Port 5555

If we search about this port, it turns out to be adb service. We can find out more about it here. Let's install adb if we do not have it yet sudo apt install android-tools-adb

  • adb connect 10.10.10.247:5555

  • Kinda stuck here so moving to another port

ES File explorer

  • This one is an http port. Let's look it up and see if we find anything.

  • We find this exploit

  • Looking at the code we can see we have the following commands for the exploit

  • So I tried the following commands (output is stripped for more readability)

  • Bingo here! we have a creds.jpg image. Let's download it

get file
  • mv out.dat creds.jpg we rename the outfile xdg-open creds.jpg we open it

creds

And we get a password along with a user name. kristi:Kr1sT!5h@Rp3xPl0r3!

  • ssh kristi@10.10.10.247 -P 2222 let's try to ssh with the creds provided

  • It works

ssh port
  • We can find the user find in sdcard

user flag

Privilege escalation

  • Let's make an ssh tunnel ssh -NL 5556:localhost:5554 -L 5557:localhost:5555 -p 2222 kristi@10.10.10.247 this way we can use adb through this tunnel (I followed this tutorial for the setup)

  • In another tab we run killall adb

  • and then adb devices we see our target is listed

adb devices
  • Now let's try to root with adb root it works

adb root
  • Let's search the root flag find / -type f -name "root.txt" 2>/dev/null

root flag

Last updated