From cbd4599e382f64b1564062d5375b6299a47a3fc5 Mon Sep 17 00:00:00 2001 From: rootTHC <57636391+rootTHC@users.noreply.github.com> Date: Fri, 24 Jan 2020 16:11:14 +0000 Subject: [PATCH] Update README.md shar hacks. --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 66c1de0..59818ae 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Got tricks? Send them to root@thc.org or submit a pull request. 1. [uuencode](#feu-anchor) 1. [openssl](#feo-anchor) 1. [xxd](#fex-anchor) + 1. [Multiple binaries](#xeb-anchor) 1. [File transfer using screen from REMOTE to LOCAL](#ftsrl-anchor) 1. [File transfer using screen from LOCAL to REMOTE](#ftslr-anchor) 5. [Reverse Shell / Dumb Shell](#rs-anchor) @@ -195,6 +196,27 @@ Decode: ``` $ xxd -p -r >issue.net-COPY ``` + +**4.iii. File Encoding - Multiple Binaries** + +Method 1: Using *shar* to create a self extracting shell script with binaries inside: +``` +$ shar *.png *.c >stuff.shar +``` +Transfer *stuff.shar* to the remote system and execute it: +``` +$ chmod 700 stuff.shar +$ ./stuff.shar +``` + +Method 1: Using *tar* +``` +$ tar cfz - *.png *.c | openssl base64 >stuff.tgz.b64 +``` +Transfer *stuff.tgz.b64* to the remote system and execute: +``` +$ openssl base64 -d | tar xfz - +``` **4.iv. File transfer - using *screen* from REMOTE to LOCAL**