How to recover a script protected by SHc?
How to decrypt a file * .sh.x?
Cryptographic aspects of the SHc tool are sufficiently robust?
The tool UnSHc allows to recover the original source code (*.sh) of any scripts encrypted via SHc (* .sh.x).
How to use UnSHc ?
[root@server:~/unshc]$ ./unshc.sh -h _ _ _____ _ _ | | | | / ___| | | | | | | |_ __ \ `--.| |_| | ___ | | | | '_ \ `--. \ _ |/ __| | |_| | | | /\__/ / | | | (__ \___/|_| |_\____/\_| |_/\___| --- UnSHc - The shc decrypter. --- Version: 0.6 ------------------------------ UnSHc is used to decrypt script encrypted with SHc Original idea from Luiz Octavio Duarte (LOD) Updated and modernized by Yann CAM - SHc : [http://www.datsi.fi.upm.es/~frosal/] - UnSHc : [https://www.asafety.fr/unshc-the-shc-decrypter/] ------------------------------ [*] Usage : ./unshc.sh [OPTIONS] <file.sh.x> -h | --help : print this help message -a OFFSET | --arc4 OFFSET : specify the arc4() offset arbitrarily (without 0x prefix) -d DUMPFILE | --dumpfile DUMPFILE : provide an object dump file (objdump -D script.sh.x > DUMPFILE) -s STRFILE | --stringfile STRFILE : provide a string dump file (objdump -s script.sh.x > STRFILE) -o OUTFILE | --outputfile OUTFILE : indicate the output file name [*] e.g : ./unshc.sh script.sh.x ./unshc.sh script.sh.x -o script_decrypted.sh ./unshc.sh script.sh.x -a 400f9b ./unshc.sh script.sh.x -d /tmp/dumpfile -s /tmp/strfile ./unshc.sh script.sh.x -a 400f9b -d /tmp/dumpfile -s /tmp/strfile -o script_decrypted.sh
Demonstration :
UnSHc is a project originally started in 2008 by Luiz Otavio Duarte (a.k.a. LOD) and brought up to date by ASafety to fix some bugs present and increase the use of new architectures.