shc+upx加密bash shell脚本

1、安装shc
make
echo “y” |make install
2、安装ucl
tar zvxf ./ucl-1.03.tar.gz -C /opt/
./configure && make && make install (centos)
./configure CPPFLAGS=”$CPPFLAGS -std=c90 -fPIC” (ubuntu/debian)
3、安装lzma
mkdir -p /opt/lzma
tar jxf lzma443.tar.bz2 -C /opt/lzma
4、安装upx
export UPX_UCLDIR=/opt/ucl-1.03
export UPX_LZMADIR=/opt/lzma/
export UPX_LZMA_VERSION=0x443
make all &>/dev/null
mv ../upx-3.95-src /opt/upx
mkdir
5、安装glibc-static
yum -y install glibc-static (centos)
apt-get install libc6-dev (ubuntu/debian)

6、shc加密脚本
CFLAGS=-static /usr/local/bin/shc -T -r -f “”
7、upx加壳
/opt/upx/src/upx.out “.x”
8、添加boot防止反编译

for ((i = 1; i < 11; i++)); do dd if=/dev/urandom bs=17238 count=1 >>".x"; done &>/dev/null

hexdump -ve '1/1 "%.2x"' "${FFF1}.x" | sed 's/546869732066696c65206973207061636b6564207769746820746865205550582065786563757461626c65207061636b657220687474703a2f2f7570782e73662e6e6574/746e616562716769626236747976776665726e66777a4e6361787a676f7971677a68643563776563706673746e4b7768716d676e747278637a69746175676e696f6d766d/g;s/55505820332e393520436f707972696768742028432920313939362d323031382074686520555058205465616d2e20416c6c205269676874732052657365727665642e/65757463626e7a7877696b71757474627461756f5770776878616a6732697571743070716e69666e6e6f694470676d74716c6b6c6d6764636f6e706e6765776478706e/g;s/555058/647870/g' | xxd -r -p >"<二进制文件>.exe"


9、产出结果:”<二进制文件>.exe”

10、安装包:

Categories: 系统运维