Skip to content

Test case 'id_000000' results in a timeout #451

@Deepak-Biswakarma-2310

Description

@Deepak-Biswakarma-2310

GitHub Issue: Problem with Fuzz Testing Using WinAFL and DynamoRIO

Description

I am performing fuzz testing on a sample C++ program using WinAFL and DynamoRIO. The program was compiled using Visual Studio Community 2022, generating the .exe and .pdb files. To provide input for fuzzing, I created a binary file named image.img with the following Python script:

import struct

# Define the data
header = b"IMAG"  # 4-byte header
width = 20        # Integer (4 bytes)
height = 30       # Integer (4 bytes)
data = b"ABCDEFGHIJ"  # 10 bytes of data

# Create binary data using struct
binary_data = struct.pack("4sii10s", header, width, height, data)

# Write to a file
with open("image.img", "wb") as f:
    f.write(binary_data)

print("image.img file has been created.")

After debugging my configuration, the dry run of the fuzzing process was successful. However, when executing the final fuzzing command, I encountered the following error:

Error Screenshot

Error


Environment Details

  • Operating System: Windows 11
  • Compiler: Visual Studio Community 2022
  • WinAFL Version: Latest
  • DynamoRIO Version: Windows-7.1.0-1 (bin32 used for 32-bit fuzzing)
  • Fuzz Command:
    afl-fuzz.exe -i inImage -o outImage -t 5000 -D C:\fuzzing\DynamoRIO-Windows-7.1.0-1\bin32 -- -coverage_module samplefuzzprogram.exe -target_module samplefuzzprogram.exe -target_offset 0xffdff000 -fuzz_iterations 5000 -call_convention cdecl -nargs 1 -covtype edge -- samplefuzzprogram.exe @@

Steps Taken

  1. Verified that the compiled program runs without errors.

  2. Ensured image.img conforms to the structure expected by the ProcessImage function.

  3. Performed a dry run with:

    C:\fuzzing\DynamoRIO-Windows-11.0.20049\bin32\drrun.exe -c winafl.dll -debug -target_module samplefuzzprogram.exe -target_offset <calculated_offset> -- samplefuzzprogram.exe image.img

    This was successful and produced no errors.

  4. When running the afl-fuzz command, the error mentioned above was encountered.


Request

Could someone help identify where the problem might be in the configuration or execution? Specifically:

  1. Is there a misstep in the fuzzing command?
  2. Could there be an issue with the calculated offset or the call convention?
  3. Are there any additional debugging steps I should take to resolve the issue?

Any guidance on resolving this error would be greatly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions