failed to generate implants (format: shared) for alpine linux (musl)
version: v1.5.40 - c17c37857e54f0fa202c01cbd00a99a85f5f9f49
Describe the bug
can not generate shared format implants for alpine linux (or maybe any musl type, without glibc).
To Reproduce Steps to reproduce the behavior:
apk add gcompat build-base --no-cache(packaged go binary depends on glibc)- download sliver-linux_server
- generate command:
generate -o linux -f shared -R -d -m example.com, shows no errors and generates a shared library successfully. LD_PRELOAD=/RELEVANT_CONDUCTOR.so /bin/lserrors withSegmentation fault
also tested installing go from the alpine repo: apk add go. and linked the go root (ln -s /usr $SLIVER_ROOT_DIR/go) but didn't help.
Expected behavior the implant runs successfully.
Logs strace: strace.txt
Desktop (please complete the following information):
- OS: docker using
alpine:latestoralpine:3.18.2tried both locally and in vps. - Version
v1.5.40 - c17c37857e54f0fa202c01cbd00a99a85f5f9f49
Additional context implant generated on debian with glibc seems to work as expected. maybe a glibc related issue? couldn't find any similar issue, is it expected? do i must have glibc for shared format on the implant system?
That's a limitation of the Go toolchain as far as I know, nothing much we can do at this point. I think it might get better in the future, but it's out of our control for now.