Closed Invoke-Mimikatz closed 1 year ago
Hello, the issue here is running fetch in DllMain (DLL_PROCESS_ATTACH). There is a rule that you should not talk to any other DLLs during that procedure. In this case, calling fetch makes Puppy talk to the Windows HTTP DLL API. For more info on this see https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-best-practices?redirectedfrom=MSDN#general_best_practices
Thanks for providing a clear and excellent bug report. It made it very straightforward to identify the issue.
Hi,
I am trying to make an application with a DLL component that uses Puppy to fetch resources from the web. I've run into a bug in my code related to the
puppy.fetch()
function. This problem only seems to happen when thefetch()
function is used within code compiled as a DLL. When code execution hits a call tofetch()
, instead of succeeding or timing out,fetch()
seems to hang up program execution.A small bit of code I am using to demonstrate the problem:
Expected results of this code:
Actual results (when running as a DLL):
Since I thought this might be a problem with the Windows rundll32.exe binary, I wrote a small Nim DLL loader
This also has the same results and hangs up execution, showing only the message box before the call to
fetch()
, but not the followingMessageBox()