Skip to content

ReAttach does not attach in time to allow debugging of DllMain's DLL_PROCESS_ATTACH #18

@fanaticlatic

Description

@fanaticlatic

I am writing some dll injection and have discovered ReAttach is unable to pick up the process between Windows calls:
CreateProcess(...); // creates the process to hook
and the end of:
CreateRemoteThread(...) // Calls the DllMain I wish to debug

When CreateRemoteThread runs my target apps DllMain call, it doesn't attach in time to handle the DLL_PROCESS_ATTACH. I am able to break on the DLL_THREAD_ATTACH/DETACH and DLL_PROCESS_DETACH.

The only way I can debug is to place a breakpoint in my injector application prior to the CreateRemoteThread function then either run ReAttach or use Visual Studios "Attach to Process".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions