Skip to content

Using the characteristics of static DLL loading to modify the EntryPoint and change function arguments.

License

Notifications You must be signed in to change notification settings

Charles4852/EpHook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DLL Entry Point Modification via lpReserved in DllMain

In static DLL loading, the lpReserved argument of DllMain is of type PCONTEXT.
This PCONTEXT contains context data used by ntdll!RtlUserThreadStart
to start execution at the program's EntryPoint.

Since the argument of RtlUserThreadStart is RCX = exe.entrypoint,
modifying lpReserved->Rcx or lpReserved->Rip allows changing the EntryPoint.

About

Using the characteristics of static DLL loading to modify the EntryPoint and change function arguments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published