https://upx.github.io/https://github.com/upx/upxUPX is a free, portable, extendable, high-performance executable packer for several executable formats.
UPX achieves an excellent compression ratio and offers very fast decompression. Your executables suffer no memory overhead or other drawbacks for most of the formats supported, because of in-place decompression. UPX strengths in a nutshell:
excellent compression ratio: typically compresses better than WinZip/zip/gzip, use UPX to decrease the size of your distribution!
very fast decompression: ~10 MB/sec on an ancient Pentium 133, ~200 MB/sec on an Athlon XP 2000+.
no memory overhead for your compressed executables because of in-place decompression.
safe: you can list, test and unpack your executables. Also, a checksum of both the compressed and uncompressed file is maintained internally.
universal: UPX can pack a number of executable formats.
portable: UPX is written in portable endian-neutral C++.
extendable: because of the class layout it's very easy to add new executable formats or new compression algorithms.
free: UPX is distributed with full source code under the GNU General Public License v2+, with special exceptions granting the free usage for commercial programs as stated in the UPX License Agreement.
You probably understand now why we call UPX the "Ultimate Packer for eXecutables".
Llevo usándolo desde 1996
Adjunto script y binario compilado x86_64
NO GIT VERSION SCRIPT
#
# upx/ucl bash compiler no git version and no zlib1g-dev deps
# by KAPITALSIN B23092021
#
# SCRIPT TESTED UNDER LINUX MINT 19.3 x85_64 GLIBC 2.27 AND ARCOLINUX GLIBC 2.33 x86_64
#
# NO GIT VERSION
#
# B23092021
# Added -N to wget
# Modified the command "cp -r lib/* ../../ucl-1.03/src/.libs/"
# Minor changes strip and renaming the compiled upx
#
sudo apt-get install libtool g++
wget -N https://github.com/upx/upx/releases/download/v3.96/upx-3.96-src.tar.xz
tar xvfa upx-3.96-src.tar.xz
cd upx-3.96-src
wget -N https://github.com/upx/upx-lzma-sdk/archive/refs/heads/master.zip -O lzmasdk.zip
unzip lzmasdk.zip && rm lzmasdk.zip
mv upx-lzma-sdk-master lzma
wget -N http://www.oberhumer.com/opensource/ucl/download/ucl-1.03.tar.gz
tar xvfa ucl-1.03.tar.gz && rm ucl-1.03.tar.gz
cd ucl-1.03
export CPPFLAGS="$CPPFLAGS -std=c90 -fPIC"
./configure --enable-static --disable-shared
unset CPPFLAGS
make -j$(nproc)
export UPX_UCLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ../src
wget -N https://fossies.org/linux/misc/zlib-1.2.11.tar.xz
tar xvfa zlib-1.2.11.tar.xz && rm zlib-1.2.11.tar.xz
cd zlib-1.2.11
./configure --static --prefix=$PWD
make -j4 install
cp zconf.h zlib.h ../../ucl-1.03/src/
cp zconf.h zlib.h ../../ucl-1.03/include
cp -r lib/* ../../ucl-1.03/src/.libs/
cd ..
sed -i 's/$(CHECK_WHITESPACE)//g' Makefile
rm -rf lzma-sdk
cp -r ../lzma lzma-sdk
make -j$(nproc) LDFLAGS="--static"
strip upx.out
mv upx.out ../../upx.396.bin
unset UPX_UCLDIR
GIT VERSION SCRIPT
#
# upx/ucl bash compiler
# by KAPITALSIN 2o21 B11092021
#
# B11092021
# ADDED DEPENDENCIES FOR BETTER COMPILATION
#
sudo apt-get install git zlib1g-dev libtool g++
git clone https://github.com/upx/upx.git
cd upx
git submodule update --init --recursive
wget http://www.oberhumer.com/opensource/ucl/download/ucl-1.03.tar.gz
tar xvfa ucl-1.03.tar.gz
cd ucl-1.03
export CPPFLAGS="$CPPFLAGS -std=c90 -fPIC"
./configure --enable-static --disable-shared
unset CPPFLAGS
make -j$(nproc)
export UPX_UCLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ../src
sed -i 's/.out/.git-$(UPX_VERSION_GITREV).bin/g' Makefile
make -j$(nproc) LDFLAGS="--static"
unset UPX_UCLDIR
strip upx.*.bin && ./upx*.bin --ultra-brute upx*.bin
mv upx*.bin ..