Off the Path: the Treasure Hunt for New Process Injection Techniques

Mathilde Venault

Mathilde Venault

CrowdStrike


Abstract

LoadLibrary() is a Windows API fundamental; so fundamental that no one ever questioned how it works, until now.

Most of the time, LoadLibrary() receives an absolute path of the resource to load. That path is built upstream by what we call a "path builder": an API resolving a system directory, a module querying its own file path, strings in global variables... Poking at their internals, we discovered that many of these path builders can be hijacked, forcing LoadLibrary() to use a compromised path. All it takes is the ability to write into a target process to then turn LoadLibrary() into a threadless process injection primitive: corrupt the path, and the target loads the DLL of your choice.

But LoadLibrary() can also be called with just a library name, in which case the API itself is responsible for the path resolution. If the path builders can't be trusted to resolve the path, surely LoadLibrary() can do that safely? Spoilers: it can't.

One hijack led to the next, and what started as a single finding grew into a whole family of techniques which we call "Off the Path." In this talk, we'll retrace this treasure hunt, demonstrate the techniques live, and share our methodology so you can find the next one. Time to venture off the path!

Speaker Info

Mathilde Venault

Mathilde Venault (@MathildeVenault) is a security researcher at CrowdStrike, where she specializes in threat detection through malware analysis, adversary tradecraft research, and reverse engineering of Windows internals. She has delivered workshops and presented at conferences including Black Hat USA, REcon, 44CON, SinCon, and c0c0n, driven by a passion for documenting what Microsoft won't. True to her French roots, she's always down to turn any conference hallway into a dinner table — bread and cheese non-negotiable.

Organizer

Organizer Logo

Partner Company

Partner Company Logo