Disclaimer
Everything in this article is for educational purposes only. I do not promote any illegal activities. I am not responsible for any damage caused by the misuse of this information.
While enumerating around on Shodan, I found some management interfaces of Russian gas stations. Later realized that they are accounting software used by gas stations.
I was lucky to find one with default credentials admin:admin
.
The gas station located in Moscow
and the company is Shell
.
Digging around led me to find a vulnerability in the software. The process
tab seems to be vulnerable to command injection. I tried to inject some commands and it worked.
In order to gain reverse shell over the internet, a public IP is required (at least that’s what I thought). Therefore, I used ngrok
to expose my local machine to the internet and point it back to my netcat
listener.
And Voila! Reverse shell is obtained.
Extra:
The system is running on an old Debian
version.
You can easily privilege escalate to root by exploiting the polkit’s pkexec CVE-2021-4034
With the root access, I want to have persistence on the system.
There are many other things that can be done, for example, exfiltrating sensitive data, pivoting to other systems, etc. But I will stop here. I do not want to cause any damage to the system or reveal any sensitive information.