shc v4.0.1 releases: Shell script compiler

Shell Script Compiler

A generic shell script compiler. Shc takes a script, which is specified on the command line and produces C source code. The generated source code is then compiled and linked to produce a stripped binary executable.

The compiled binary will still be dependent on the shell specified in the first line of the shellcode (i.e shebang) (i.e. #!/bin/sh), thus shc does not create completely independent binaries.

shc itself is not a compiler such as cc, it rather encodes and encrypts a shell script and generates C source code with the added expiration capability. It then uses the system compiler to compile a stripped binary which behaves exactly like the original script. Upon execution, the compiled binary will decrypt and execute the code with the shell -c option.

Changelog v4.0.1

Install

  1. git clone https://github.com/neurobin/shc.git
  2. ./configure
  3. make
  4. sudo make install

Usage

-e date
Expiration date in dd/mm/yyyy format [none]
-m message
message to display upon expiration ["Please contact your provider"]
-f script_name
File path of the script to compile
-i inline_option
Inline option for the shell interpreter i.e: -e
-x command
eXec command, as a printf format i.e: exec(\\'%s\\',@ARGV);
-l last_option
Last shell option i.e: --
-o outfile
output to the file specified by outfile
-r
Relax security. Make a redistributable binary which executes on different systems running the same operating system. You can release your binary with this option for others to use
-v
Verbose compilation
-D
Switch on debug exec calls
-U
Make binary to be untraceable (using strace, ptrace, truss, etc.)
-C
Display license and exit
-A
Display abstract and exit
-B
Compile for BusyBox
-h
Display help and exit

 

 

 

 

Copyright (C) neurobin

Source: https://github.com/neurobin/

Share