An open API service indexing awesome lists of open source software.

https://github.com/gill-singh-a/portainer-remote-root-shell-exploit

A Simple Python Program that uses Requests Module to communicate with Docker API through Portainer and gets a Remote Root Shell on the Target Device
https://github.com/gill-singh-a/portainer-remote-root-shell-exploit

docker exploit portainer python3 ssh

Last synced: 9 months ago
JSON representation

A Simple Python Program that uses Requests Module to communicate with Docker API through Portainer and gets a Remote Root Shell on the Target Device

Awesome Lists containing this project

README

          

# Portainer Remote Root Shell Exploit
A Simple Python Program that uses Requests Module to communicate with Docker API through Portainer and gets a Remote Root Shell on the Target Device
## Requirements
Language Used = Python3

Modules/Packages used:
* socket
* os
* requests
* json
* paramiko
* getpass
* datetime
* optparse
* colorama
* multiprocessing
* time

Install the dependencies:
```bash
pip install -r requirements.txt
```
## Setup
After installing Docker on your local device, run the following commands as root user
```bash
docker pull ubuntu:20.04
docker save ubuntu:20.04 -o ubuntu_image.tar
chmod 666 ubuntu_image.tar
```
## Working
![Working of Exploit](assets/images/working.png)
## Result
After Successful Exploitation, we can directly ssh to the target device as root user.
### Note
To brute Force the Portainer Interface, we can use [Gill-Singh-A/Portainer-Brute-Force](https://github.com/Gill-Singh-A/Portainer-Brute-Force)

A Similar Exploit of Exposed Docker APIs : [Gill-Singh-A/Docker-API-Remote-Root-Shell-Exploit](https://github.com/Gill-Singh-A/Docker-API-Remote-Root-Shell-Exploit)

To know more about the Process of Exploitation see the Blog [Getting Remote Root Shell on Devices via Portainer](https://medium.com/the-first-digit/getting-remote-root-shell-on-devices-via-portainer-8daf9631bfc7) on [Medium](https://medium.com/@amansg22)