1

I am currently having difficulties making a linux binary portable. I've tried with ELF Statifier via the following syntax:

statifier /bin/ls static-ls

then tried to run it on another machine which both are 64 bits but it gives me a Segmentation fault error. I've done some research on Google and it seems like it's a common issue. Now, I haven't found any resolution yet and was wondering if anyone had a solution?

I've also tried Ermine but since this is not a freeware (30 day free trial) I would prefer going with ELF Statifier or maybe another solution, I am very open to any suggestions as long as I can make a linux binary portable.

Thanks.

2
  • "I haven't found any resolution yet and was wondering if anyone had a solution?" - How do you expect Stack Overflow to help when you have not shared the error or crash information? Commented Nov 8, 2018 at 4:14
  • Specifically, which Linux distributions (or other operating systems) and architectures do you need to be supported by this? Dependent on your answer, there may be alternatives for ELF Statifier and Ermine. Commented Nov 9, 2018 at 9:57

1 Answer 1

2

This thread suggests segfaults could be caused by memory randomization.

The website of ELF Statifier confirms randomization is a problem:

Statified executables not always work on systems with stack or VDSO randomization. Unfortunately, I have yet to find a way to fix this. There is another solution: Ermine. Ermine, unlike statifier not affected by stack/VDSO randomization.

This thread suggests you could turn off randomization on the target platform as a workaround. Not something I would recommend, since randomization is a security measure; turning it off might make the system more vulnerable to exploits.

I guess this means ELF Statifier will not work without making a compromise to the security on the target systems.

Sign up to request clarification or add additional context in comments.

5 Comments

Hi, Thank you for taking the time to reply on this subject. I've tried the following: sudo echo 0 > /proc/sys/kernel/randomize_va_space But it didn't resolved the issue unfortunately. Ermine is not really a solution since it's not a freeware. Thanks
@Gerald According to this, sudo echo 0 > /proc/sys/kernel/randomize_va_space is not permanent; randomization will be back after reboot. Could that explain why the problem is still there on your machine?
I just tried it again and made sure that the content of /proc/sys/kernel/randomize_va_space was 0. Same result; Seg fault :(
I fear that in this case, there ain't no such thing as a free lunch.
Hehe well said. Thank you all for your time, it is very appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.