googleprojectzero / winafl

A fork of AFL for fuzzing Windows binaries
Apache License 2.0
2.36k stars 533 forks source link

Unable to load client library: winafl.dll: library initializer failed.. #446

Closed yosiimich closed 3 months ago

yosiimich commented 3 months ago
drrun.exe -c "C:\Users\yosim\Desktop\winafl-master\winafl-master\build32\bin\Release\winafl.dll" -debug -target_module harness.exe -coverage_module HncBD100.dll -target_method fuzzme -fuzz_iterations 10 -nargs 1 -- C:\Users\yosim\Desktop\fuzzing\harness\harness\harness.exe "C:\Users\yosim\Desktop\in\2.wmf"

I want to excute drrun but error occured

Unable to load client library: winafl.dll: library initializer failed..

I build winalf in x86_x64 Cross Tools Command Prompt for VS 2022 with this commands

cmake -G"Visual Studio 17 2022" -A Win32 .. -DDynamoRIO_DIR=C:\Users\yosim\Desktop\DynamoRIO-Windows-10.93.19937\DynamoRIO-Windows-10.93.19937\cmake -DINTELPT=1 -DUSE_DRSYMS=1 -DUSE_COLOR=1
ifratric commented 3 months ago

Hm, I'm not sure this will make a difference, but since you are building a 32-bit version have you tried building in x86 native command prompt? I don't see above which version of drrun.exe you are using, it should also be 32-bit for 32-bit winafl.dll. And just in case you can doublecheck that winafl.dll exists in the specified path.

yosiimich commented 3 months ago

I don't know why, but winafl wasn't working because it was on the C:\Users\yosim\desktop. I successfully excuted drrun by changing the folder location to the C:\ !!