-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
profile generate new -f shared -o lin failure to create .so #1473
Comments
Can you pull the errors from For better stability, I'd recommend setting up an external builder. |
Thanks moloch, i will try to get some logs for you ASAP. |
It looks like it did need or want an external musl gcc, let me see if i can brew install that and get a shared beacon compiled...
|
OK back with a solution in os: sliver:
back to os to verify:
So it looks like we have this external dependency outside of the official brew tree to build shared linux libs on macos arm64, at least for now. Leave this open, or document it and close? Either way thanks, but let me confirm the compiled .so actually works aswell, I can do that later today. Thanks, |
Also i actually am rereading this, i did not even notice the generated beacon name lmaooooooooo |
Just tried this again and the result is the same as I remembered: cross-compiled Linux shared libraries built from MacOS (at least with an ARM64 processor) targeting an amd64 architecture don't work:
|
Ok found a workaround, it's just musl-cross setting the wrong libc path in DT_NEED:
The good thing is you can just use patchelf to patch that:
The annoying part is you'll need to know beforehand what name to put in there (might not be |
Describe the bug
profile generate new -f shared -o lin failure to create .so
changing the os param to windows makes a .dll
To Reproduce
sliver > profiles new beacon -a amd64 -Z r -o lin -b https://1.2.3.4 -k 1234 -j 12 -f shared name1_shared
[*] Saved new implant profile (beacon) name1_shared
sliver > profiles generate name1_shared
[] Generating new linux/amd64 beacon implant binary (1m0s)
[] Symbol obfuscation is enabled
[!] rpc error: code = Unknown desc = exit status 1
sliver > update
[*] Client v1.5.41 - f2a3915 - darwin/amd64
Compiled at 2023-07-11 14:35:13 -0700 PDT
Compiled with go version go1.20.5 darwin/amd64
[*] Server v1.5.41 - f2a3915 - darwin/amd64
Compiled at 2023-07-11 14:35:13 -0700 PDT
Checking for updates ... done!
[*] No new releases.
Expected behavior
sliver > profiles generate name2_shared
[] Generating new linux/amd64 beacon implant binary (1m0s)
[] Symbol obfuscation is enabled
[] Build completed in 26s
[] Implant saved to /FILE/PATH/WORKING_LIBFILE.so
Desktop (please complete the following information):
[*] Client v1.5.41 - f2a3915 - darwin/amd64
Compiled at 2023-07-11 14:35:13 -0700 PDT
Compiled with go version go1.20.5 darwin/amd64
[*] Server v1.5.41 - f2a3915 - darwin/amd64
Compiled at 2023-07-11 14:35:13 -0700 PDT
Additional context
windows works
The text was updated successfully, but these errors were encountered: