Hooking BaseThreadInitThunk To Detect DLL Injection
Transcript
Machine-transcribed by YouTube. Expect errors in names, commands and version numbers.
So, the first thing that you need to know is whenever a new thread is created, base thread in it thunk is called. That's why we're hooking this function, right? The reason why is because right here, I'll show you a real world example. Right here, we're allocating memory. This is where our DLL path goes, right? We allocate memory in the process, we write the string to the memory, we create a thread, we call load library, that's the start address, which is load library, then we pass in the address of our string, so then inside the process load library gets called, your DLL gets loaded in, right?