Adds a thankyou for Davide
Fix typo
A set of Dockerfiles to statically cross-compile various "hacker tools" using musl-cross-make and abusing Docker. This is a work in progress, and more tools and libraries will be added over time.
Run make MUSL_TARGET=some_target_tuple
to compile everything. Tested targets so far:
aarch64-linux-musl
mips-linux-muslsf
mipsel-linux-muslsf
x86_64-linux-musl
But others are very likely to work. Building everything currently needs about 2GB of disk per target and it helps to have a big machine with NVMe storage and plenty of RAM. A complete build for a single architecture currently takes about 15 minutes on a Ryzen 4750U, or a bit less on an Apple M1.
You can build individual binaries by specifying the recipe name as an argument to make
. Dependency resolution will be handled automatically.
To validate that all your binaries came out right, run make check
. This will list any binaries in the output
directory which don't seem to have been statically linked.
If the GNU mirror is being wonky you can add GNU_SITE=https://mirror.fsmg.org.nz/gnu/
to the make
invocation as well. You may want to specify a better local mirror.
More tools and documentation will be added over time.
These are the tools that build cleanly without too many caveats and are generally usable.
busybox-1.33.1
curl-7.79.1
dropbear-2020.81
(dropbear
, dropbearclient
and dropbearkey
)e2fsprogs-1.47.0
fuzzotron-9e86436
(fuzzotron
and replay
)loggedfs-0.9
microsocks-1.0.3
ngrep-2a9603b
nmap-7.90
(some extra functionality is missing as it requires additional data files)openssh-8.8p1
(ssh
, scp
, sftp
and ssh-keygen
)openssl-0.9.8zh
(insecure, not for general use)openssl-1.1.1k
parted-3.4
socat-1.8.0.0
strace-6.1
stunnel-5.72
tcpdump-4.99.1
These are tools which have significant caveats.
git-2.33.0
(git-...
binary needs to be renamed to just git
to work, generally this isn't very useful because even when compiled statically it's not very standalone due to all the scripts and helpers required)nsjail-3.1
(currently only builds on 64 bit ARM, 32 and 64 bit x86 due to using Google's static protoc
compiler binaries)These libraries are built automatically as required by the above tools.
musl-cross-make-0.9.10
(including musl-1.2.4
)expat-2.4.1
fuse-2.9.9
gettext-0.21
(not currently required for anything)kafel-20200831
(as part of nsjail-3.1
)libcurl-7.79.1
(as part of curl-7.79.1
)libnl-3.2.25
libpcap-1.10.1
libssl-0.9.8zh
(as part of openssl-0.9.8zh
, don't use this, just here for compatibility)libssl-1.1.1k
(as part of openssl-1.1.1k
)libuuid-1.47.0
(as part of e2fsprogs-1.47.0
)libxml2-2.9.12
ncurses-6.2
pcre-8.45
protobuf-3.21.1
(C++ support only)readline-8.1
zlib-1.3.1
There are numerous projects and approaches for building static tool binaries, but this one is mine. Sometimes you just find yourself on a little-endian softfloat MIPS box and you really need a specific tool!
Some goals of the project:
socat
has OpenSSL
)And yet to be added:
These people have contributed code and fixes:
E-mail michael@hotplate.co.nz. I'd love to receive your improvements. No, I don't really know how to use Docker.