RouterSpace
In my opinion, one of the most annoying machines just to set up and the exploits required are quite disappointing.
In my opinion, one of the most annoying machines just to set up and the exploits required are quite disappointing.
Nmap scan:
Port 80 reveals a page advertising an application:
The intended method is to do dynamic analysis of the machine and run the application in an emulator (which is annoying because anbox
is not as easy to install anymore and genymotion
doesn't seem to work with my machine).
Instead, I will be doing static analysis to solve it. First, we need to decompile it with apktool
.
With in the assets
file, there's an index.android.bundle
file. This file contains all the JS code used in the entire application, so it's really long but probably has the information I need within it.
Within it, there's this function:
This looks like a request, and it is to http://routerspace.htb/api/v4/monitoring/router/dev/check/deviceAccess
. This means that we can probably access the application from the website. We can see n/json
, which means they are probably sending JSON POST requests. We also see 0.0.0.0
, which is looks like an IP address.
We can test for RCE or injection, and find that RCE works.
We can get a reverse shell from or we can put our public key into the authorized_keys
file.
Then, we can ssh
in as paul
.
This machine is running an outdated version of sudo
.
We can use this repository to exploit it:
Transfer the files over scp
.
Then, make
and run it to get a root shell.