LD_PRELOAD Code Injection

The cluster focuses on techniques for injecting or modifying code in running processes and binaries using LD_PRELOAD, ptrace, dynamic linker hacks, and similar methods, with discussions on bypassing protections and attacker countermeasures.

📉 Falling 0.4x Security
2,531
Comments
20
Years Active
5
Top Authors
#616
Topic ID

Activity Over Time

2007
1
2008
3
2009
19
2010
31
2011
74
2012
54
2013
63
2014
110
2015
126
2016
158
2017
157
2018
143
2019
208
2020
193
2021
203
2022
242
2023
280
2024
258
2025
195
2026
13

Keywords

JIT ARM openonload.org CreateThread PC CDE NTDLL ASCII DllMain ASLR code executable modify program memory process kernel binaries notepad patch

Sample Comments

ddtaylor • May 3, 2021 • View on HN

Can't an attacker modify the executable to not do that?

pjdkoch • Feb 10, 2023 • View on HN

I was expecting LD_PRELOAD trickery.

striking • Aug 21, 2017 • View on HN

I wonder if some sneaky LD_PRELOAD hacks could make this possible.

megous • May 13, 2022 • View on HN

How? Dynamic linker hacks don't count.

koenigdavidmj • Feb 11, 2014 • View on HN

I'm guessing that this only works with dynamically linked binaries, similar to LD_PRELOAD-based solutions?

tbarbugli • Aug 11, 2014 • View on HN

Would be nice to know how this actually works; docs dont say much about how the tool injects the code into the running process.

max_k • Mar 7, 2022 • View on HN

Yes. But you can also inject code into libc.so.6, and all running processes will have it.

jannes • Feb 18, 2019 • View on HN

What do you mean? There are many examples of people using LD_PRELOAD to patch the behaviour of other's binaries.

kaladin-jasnah • Apr 23, 2024 • View on HN

Is this akin to using LD_PRELOAD on Linux to hook something like __libc_start_main and modifying specific data in one of the data sections of the ELF binary or something?

briffle • Oct 17, 2023 • View on HN

yes, by manipulating running code from another process. I'm actually quite amazed no AV software immediately stopped it.