empire
empire copied to clipboard
emp binary doesn't run on Alpine Linux based containers
Alpine Linux is the preferred base image for docker containers, and a lot of projects are migrating. Alpine always supported golang binaries.
However, looks like you are doing something strange and incompatible.
Tested : ( alpine image with wget and openssl installed )
wget https://github.com/remind101/empire/releases/download/v0.12.0/emp-Linux-x86_64
chmod +x emp-Linux-x86_64
./emp-Linux-x86_64
bash: ./emp-Linux-x86_64: No such file or directory
After some investigation, looks like your binary is not statically linked and strings are showing this:
strings emp-Linux-x86_64 | grep -e '^/' | grep lib
/lib64/ld-linux-x86-64.so.2
ls /lib64/ld-linux-x86-64.so.2
ls: /lib64/ld-linux-x86-64.so.2: No such file or directory
When symlinking that path to a ld-mucl, it starts acting normally
mkdir /lib64 ; ln -s /lib/ld-musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2
./emp-Linux-x86_64
Usage: emp <command> [-a <app or remote>] [options] [arguments]
Commands:
create create an app
apps ...
Thanks for reporting!
We don't do anything weird when building a release binary, so I'll have to dig into why we're not getting a statically linked binary.