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

Why is ldd mode dangerous? #3

Open
geofft opened this issue Jul 13, 2024 · 0 comments
Open

Why is ldd mode dangerous? #3

geofft opened this issue Jul 13, 2024 · 0 comments

Comments

@geofft
Copy link

geofft commented Jul 13, 2024

Isn't the whole point of this that you're about to execute the target binary anyway, and indeed that you did exec it and the kernel found the madness loader as the interpreter? Doesn't that mean you trust the binary already - how is it any more dangerous to run ldd on that binary?

I buy the argument that ldd should not be run on untrusted binaries that you're just looking at, the way that it is (hopefully) okay to run e.g. readelf on them, because the mechanisms used by ldd aren't designed to be robust against malicious binaries, and it's possible to get arbitrary code execution when you're not intending it. But that's precisely because ldd is reusing the mechanisms that are used when actually running the binary, no? And here we are intending arbitrary code execution.

(Or am I missing something?)

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

1 participant