Skip to content
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

Segfault if compile the .c source code #1

Closed
FrancescoLucarini opened this issue Nov 4, 2022 · 6 comments
Closed

Segfault if compile the .c source code #1

FrancescoLucarini opened this issue Nov 4, 2022 · 6 comments

Comments

@FrancescoLucarini
Copy link

Hey Milo do you have any clue why the binary crashes despite the fact that gcc doesn't warn about anything?

@Milo-D
Copy link
Owner

Milo-D commented Nov 5, 2022

Hi Francesco,

could you send me the steps to reproduce this problem ? Thanks.

@FrancescoLucarini
Copy link
Author

gcc -o sandbox sabdbox.c

./sandbox

Segmentation Fault
IMG20221105084038.jpg

@FrancescoLucarini
Copy link
Author

If I run
./patch.sh
./sandbox

./sandbox: /home/heap-nman/test/house_of_gods/Libc.so.6: version 'GLIBC_2.34' not found (required by ./sandbox)

@Milo-D
Copy link
Owner

Milo-D commented Nov 6, 2022

You need to compile the sandbox in an older environment. I was using a 17.10 Ubuntu VM in order to compile it. That's the reason why this repository comes with a prebuilt binary :)

Edit: patch the binary's runpath and interpreter with patch.sh after every recompilation of sandbox in order to use custom libc and ld.

@FrancescoLucarini
Copy link
Author

Oh ok thanks did you used any special flag on gcc or is actually like the mine the command?

@Milo-D
Copy link
Owner

Milo-D commented Nov 6, 2022

Nope, I did not use any special flags for compilation.

Feel free to close the issue if you have no further questions.

@Milo-D Milo-D closed this as completed Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants