I have recently been expanding my knowledge into DLLS and have ran into something that I cant exactly wrap my head around correctly.
CreateRemoteThread(hProc, 0, 0, (LPTHREAD_START_ROUTINE)LoadLibraryA, loc, 0, 0);
When using CreateRemoteThread as apart of a DLL injector im supposed to put the threads start addr as the LoadLibrary function and I cant seem to understand how that will work because ASLR. If im passing in the injectors LoadLibrary addr that would be either invalid or a completely wrong addr in the target application right? But somehow this still works how is that?
I did some research for a few hours online reading some stackoverflow pages but couldn’t find any going into detail of how it works just some things about resolving from the functions related dll using relative offsets from the base addr of the dll. I still have no idea how it knows what function to resolve.