-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Cross Compiling Implants
NOTE: Any platform can cross-compile a standalone executable to any other platform out of the box, you only need cross-compilers when using --format shared
or --format shellcode
.
- For MacOS, we recommend using https://github.com/tpoechtrager/osxcross by default Sliver will look in
/opt/osxcross
but you can override this via environment variables. - For Windows, install mingw from your local package manager:
apt install mingw-w64
Sliver automatically looks in the default paths for these cross compilers, once installed simply use the generate
command with the desired --os
and --arch
, check ~/.sliver/logs/sliver.log
for build errors. You can override any cross compiler location via the appropriate environment variables.
For Windows, install mingw from brew:
brew install mingw-w64
For Linux, we recommend musl-cross
to target 64-bit Linux, which can be installed via brew:
brew install FiloSottile/musl-cross/musl-cross
brew install mingw-w64
I'm not aware of any good options to target 32-bit Linux from MacOS. Sliver automatically looks in the default paths for these cross compilers, once installed simply use the generate
command with the desired --os
and --arch
, check ~/.sliver/logs/sliver.log
for build errors. You can override any cross compiler location via the appropriate environment variables.
Good luck.
"Bred as living shields, these slivers have proven unruly—they know they cannot be caught."