Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zucler opened this issue Oct 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@zucler
Copy link

zucler commented Oct 10, 2023

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

@zucler zucler added the bug Something isn't working label Oct 10, 2023
@zucler zucler changed the title <header>: Calling DetourCreateProcessWithDllsW crashes .NET applications compiled for Any-CPU Calling DetourCreateProcessWithDllsW crashes .NET applications compiled for Any-CPU Oct 10, 2023
@sonyps5201314
Copy link
Contributor

try #141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants