winafl
winafl copied to clipboard
How to use syzygy?
I referred to https://github.com/googleprojectzero/winafl/blob/master/readme_syzygy.md ,but an error occurred:
D:\FuzzTools\winafl\bin32>instrument.exe --mode=afl --input-image=test_static.exe --output-image=test_static.instr.exe --force-decompose --multithread --cookie-check-hook
[0824/142620:INFO:application_impl.h(46)] Syzygy Instrumenter Version 0.8.32.0 (190dbfe).
[0824/142620:INFO:application_impl.h(48)] Copyright (c) Google Inc. All rights reserved.
[0824/142620:INFO:afl_instrumenter.cc(116)] Force decomposition mode enabled.
[0824/142620:INFO:afl_instrumenter.cc(122)] Thread-safe instrumentation mode enabled.
[0824/142620:INFO:afl_instrumenter.cc(128)] Cookie check hook mode enabled.
[0824/142620:INFO:pe_relinker_util.cc(336)] Input PDB not specified, searching for it.
[0824/142620:INFO:pe_relinker_util.cc(362)] Using default output PDB path: D:\FuzzTools\winafl\bin32\test_static.instr.exe.pdb
[0824/142620:INFO:pe_relinker.cc(138)] Input module : D:\FuzzTools\winafl\bin32\test_static.exe
[0824/142620:INFO:pe_relinker.cc(139)] Input PDB : .\test_static.pdb
[0824/142620:INFO:pe_relinker.cc(140)] Output module: D:\FuzzTools\winafl\bin32\test_static.instr.exe
[0824/142620:INFO:pe_relinker.cc(141)] Output PDB : D:\FuzzTools\winafl\bin32\test_static.instr.exe.pdb
[0824/142620:INFO:pe_relinker.cc(57)] Decomposing module: D:\FuzzTools\winafl\bin32\test_static.exe
[0824/142620:ERROR:pe_file_parser.cc(1175)] Unknown version of the IMAGE_LOAD_CONFIG_DIRECTORY structure (160 bytes), might be because you're using a new version of the Windows SDK.
[0824/142620:ERROR:pe_file_parser.cc(381)] Failed to parse data directory load config.
[0824/142620:ERROR:decomposer.cc(1084)] Unable to parse PE image.
[0824/142620:ERROR:pe_relinker.cc(66)] Unable to decompose module: D:\FuzzTools\winafl\bin32\test_static.exe
[0824/142620:ERROR:instrumenter_with_relinker.cc(124)] Failed to initialize relinker.
how to solve this?
Syzygy is not supported anymore. This means it doesn't support new compilers. I think this is the problem in your case:
Unknown version of the IMAGE_LOAD_CONFIG_DIRECTORY structure (160 bytes), might be because you're using a new version of the Windows SDK.
There are two possible solutions - get syzygy code and add support for your SDK's IMAGE_LOAD_CONFIG_DIRECTORY (this should not be difficult if you understand PE file structure) or build your application with an older compiler and SDK.
But you can encounter errors that aren't easy to fix like I did - https://github.com/google/syzygy/issues/61.