Skip to content

Calling DetourCreateProcessWithDllsW crashes .NET applications compiled for Any-CPU #301

Open

Description

Describe the bug
Detour version: 4.0.1

I am using Detours to create new processes with a DLL loaded via DetourCreateProcessWithDlls() API. However, there is a specific .NET application that crashes shortly after launch. This application is using .NET Framework 2.0 and ClickOnce deployment model. It was compiled with Any CPU option and contains PE32 magic header while running as a 64 bit process on 64 bit CPU.

Has anyone experienced anything like this before? The application in question is proprietary ScreenConnect client and I do not have source code for it. I tried building a sample C# application using similar parameters but it did not crash.

Crash error

Faulting application name: ScreenConnect.WindowsClient.exe, version: 23.6.8.8644, time stamp: 0xf76f9523
Faulting module name: KERNELBASE.dll, version: 10.0.22621.2215, time stamp: 0x83983b0b
Exception code: 0xe0434352
Fault offset: 0x000000000006531c
Faulting process id: 0x0x164C
Faulting application start time: 0x0x1D9FA43E200E298
Faulting application path: C:\Users\mpak\AppData\Local\Apps\2.0\AA1N2LCV.23C\6HZ4P8A6.L92\scre..tion_25b0fbb6ef7eb094_0017.0006_f4fdb97c32013242\ScreenConnect.WindowsClient.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: fcad11ba-4ed5-4239-ad48-7cf640691c03
Faulting package full name: 
Faulting package-relative application ID: 

Additional context
I have also enabled DETOUR_TRACE macro and attaching the output here
detour_crash.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions