-
Notifications
You must be signed in to change notification settings - Fork 536
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
LOAD_DLL_DEBUG_EVENT filename error #168
Comments
Interesting. Could you check the return value of GetFinalPathNameByHandleA, possibly it is failing and that's why you get the name of the previous DLL. Could you also check if the file handle (1st argument) is valid? |
OK,I try it now! |
As for your other question about the target method, |
the value of |
I see. The problem is that base_name is used later. However, we can do this:
As for the other error, I see |
To expand a bit on how catching the return from target function is supposed to work: When the target function is reached for the first time, its return address is overwritten with 0x0AF1 here https://github.com/googleprojectzero/winafl/blob/master/winaflpt.c#L912. When a return is attempted, this results in an exception which is caught in https://github.com/googleprojectzero/winafl/blob/master/winaflpt.c#L1128. |
Sorry to bother you again! I fix some error above and try to fuzz now! But strange error happen!
And it reports as follow
Process Monitor log as follow |
Hmm, yeah, currently WinAFL in PT mode does support module loading and unloading during iterations, but only if the module is always loaded on the same address (which is usually the case on Windows as ASLR only kicks in once per boot, unfortunately this is not the case here, not sure why). I could (and should) fix this (e.g. by also tracking the unload events and removing the module from section cache, but that would also mean having to clear the PT decoder cache and the performance would suffer greatly as a result. If it's only this one DLL that is causing problems, perhaps the easiest solution here would be to modify the DLL headers and force it to always load on the same address. |
Ok I figure out how to modify the DLL headers to force it to always load on the same address. |
Perhaps this tool will work? https://blog.didierstevens.com/2010/10/17/setdllcharacteristics/ |
ok! I try it Now! |
And if that doesn't work there is also EDITBIN https://docs.microsoft.com/en-us/cpp/build/reference/editbin-options?view=vs-2017 |
Hi, I was wondering if you managed to get the DLL to load on the fixed address and if that resolved your issues - it would also be useful to know for others who encounter the same problem. |
Sorry I went to holiday for few day! |
I see. That PT buffer size may indicate that a lot is happening inside your target function (for the sense of measure, PT buffer of 24MB could correspond to ~200 million basic blocks or possibly even more), which is not ideal for fuzzing. My suggestion would be to try to build a custom harness that fuzzes just the logic you want. See this blog post for some tips on doing that: https://research.checkpoint.com/50-adobe-cves-in-50-days/ Also, please note that the PT buffer size should be a power of 2, in your case it will probably be rounded down to 16MB. |
Hey all,
The text was updated successfully, but these errors were encountered: