googleprojectzero / winafl

A fork of AFL for fuzzing Windows binaries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to load client library: import __dllonexit3 not found in msvcrt.dll

ifratric opened this issue · comments

This error started to appear on Windows 10 after v1809 in a 64-bit build. The cause appears to be related to the DynamoRIO drsyms library, which WinAFL uses to look up target_offset from method name.

Currently, there are these workarounds:

  • Download a recent DynamoRIO version (I tested with DynamoRIO-Windows-7.0.17914-0 from https://github.com/DynamoRIO/dynamorio/releases) and delete all instances of dbghelp.dll from your DynamoRIO directory

  • Create a build that doesn't use drsyms (I'll add a cmake option to disable it soon)

I added the -DUSE_DRSYSMS flag for explicitly enabling the Drsyms module.

Note that, when building with drsysms enabled and with recent DynamoRIO versions, I saw errors where the linker couldn't find certain .lib files. These errors can be resolved by opening the project in Visual Studio (using project files generated by cmake), going to project properties -> Linker -> Input and deleting the nonexistent files from "Additional Dependencies".