-
Notifications
You must be signed in to change notification settings - Fork 535
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
Documented build commands do not generate winafl.dll #412
Comments
Hi, I just built WinAFL on a new machine and verified everything's building correctly (Windows 11, VS 2022, DynamoRIO 10.0.0). winafl.dll should be output in the same directory as the .exe files (but that being said, it's possible it ended up in another subdirectory inside the build directory, so a file search can't hurt). Most likely, however, is that the build system couldn't find DynamoRIO cmake files in the location pointed to by -DDynamoRIO_DIR cmake flag (or the flag is misspelled or missing). You can try using absolute rather than relative directory here as that's less error-prone.
This file was outdated and thus removed. It is now always recommended to build your own WinAFL.
Please note that the "timeout" issues in WinAFL likely indicate incorrect usage (as also indicated by FAQ) and not an issue with WinAFL itself, hence why a lot of them get left open. |
Using the absolute path to the DynamoRIO cmake files seems to have done the trick regarding building the DLL. Thank you. It might be worth adding some explicit mention to the documentation that winafl.dll is only built if DynamoRIO support is correctly enabled in the build process. There wasn't anything in the build output or the docs that made me think those two things were directly related. |
Normally, I'd except this error to trigger: |
Weird, yeah, didn't get that one. FWIW, now that I have the DLL, I was able to determine that the reason for the underlying timeout in my case was that I was giving the offset in memory for the -target_offset option, as opposed to the offset in the image itself. Now that I know it's expecting the offset in that form, I can use the tooltip in Ghidra to retrieve the actual value (Ghidra calls it the "Imagebase Offset"), but if I were using any other tool, I wouldn't have a great idea where to retrieve it from. Would it be practical to add a -target_address alternative that would accept the function's memory address instead of offset in the file, or at least display something like "the -target_offset value is greater than the size of the target binary on disk. Please verify that you're specifying the offset of the function in the file, not its address in memory"? I imagine this might be the cause of a lot of the mysterious timeout issues new users report. |
It isn't practical to take an absolute address because, due to ASLR, it's going to change each time the OS is rebooted and potentially even for each run. There is an alternative to |
This is outside my area of expertise but I think something changed in cmake because there's a warning that states For anyone who cares, my build steps are documented at https://github.com/goldstar611/winafl-releases/blob/master/.github/workflows/build_and_release.yml#L53-L57 |
I compile the winafl in Windows 10, Visual Studio 2022: And after, I copy the winafl directory to the win11-arm64 computer.I run this: The timeout error happened yet: [-] PROGRAM ABORT : Test case 'id_000000' results in a timeout |
And I run this: |
I fuzz my test.exe in windows 10,Visual Studio 2022,it runs normal.When I move it and winafl to win11arm virtual machine,it resluts in a timeout.So,is it a bug in win11? |
The troubleshooting steps for winafl involve running the DynamoRIO tool drrun.exe with winafl.dll. However, when I follow the build instructions in the README.md, there is no winafl.dll file generated. All of the binaries are generated, and they appear to work at least superficially, but there is no winafl.dll.
There used to be a version of winafl.dll included in the repo, but it was deleted in December 2022:
fc4361a#diff-58e5d6f1761f2f5be820b8f1f7913d109cc142ea8d05b0131e6f505ca60eda45
I looked in the cmake files and didn't find an obvious way to compel it to create the DLL either.
Were the steps dependent on that file?
I'm trying to run the troubleshooting steps because I'm having the same timeout issue discussed in the following open issues, some of which have been around for over a year:
#408
#402
#368
#278
I'm using Windows 10, Visual Studio 2022.
The text was updated successfully, but these errors were encountered: