Skip to content
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

Entrypoint trap trimed out: the forkserver injection failed, or the target process never reached its entrypoint. #17

Open
newuser54 opened this issue Mar 4, 2022 · 6 comments

Comments

@newuser54
Copy link

newuser54 commented Mar 4, 2022

Hi, i want to use winnie but i have an error following the walkthrough for the toy_example sample.

CMD Used: afl-fuzz -i in -o out -t 1000 -I 1000 -- -bbfile basicblocks.bb -- -harness harness.dll -no_minidumps -debug -- toy_example.exe @@

-debug option returns:


Winnie 1.00 -- Forkserver-based Windows fuzzer
Based on WinAFL 1.16b and AFL 2.43b
[+] You have 4 CPU cores and 2 runnable tasks (utilization: 50%).
[+] Try parallel jobs - see docs\parallel_fuzzing.txt.
[*] Checking CPU core loadout...
[+] Found a free CPU core, binding to #0.
[*] Setting up output directories...
[+] Output directory exists but deemed OK to reuse.
[*] Deleting old session data...
[+] Output dir cleanup successful.
[*] Scanning 'in'...
[+] No auto-generated dictionary tokens to reuse.
[*] Creating hard links for all input files...
[*] Using fullspeed (fault-based) instrumentation.
[*] Attempting dry run with 'id_000000'...
[*] Debug mode enabled

  cmd: toy_example.exe out\.cur_input
  PEB=0x000000000021D000, Base address=0x0000000000030000
  Binname: toy_example.exe, OEP: 0000000000001435
  Entrypoint = 0000000000031435


[-] PROGRAM ABORT : Entrypoint trap trimed out: the forkserver injection failed, or the target process never reached its entrypoint.

         Location : spawn_child_with_injection(), D:\WORK\codes\winnie\afl-fuzz\forkserver.c:448

BB File generated with IDA Pro 7.5 using the script provided

Compilation of Winnie and the toy example:

Windows 10 19044.1526
CSRSS Offsets generated successfully

Used Visual Studio 2019
Used SDK 10.0.22000
Used MSVC v142

No errors during compilation

I've tried to disable windows binary protections from settings but nothing.

Thanks and Regards!

@qriosa qriosa mentioned this issue Mar 7, 2022
Closed
@stong
Copy link
Member

stong commented Mar 10, 2022

Could you compile in Debug mode and run it? There should be some more output I think

@kmackinley
Copy link

I'm having the same issue. The only additional information that came out of compiling in debug mode is:

TRACE: Watchdog timeout

Otherwise, it is identical to OP's output above.

@HE-UMU
Copy link

HE-UMU commented May 4, 2022

Hi, I am facing the same problem.

cmd: toy_example.exe out.cur_input
PEB=0x000000000028B000, Base address=0x0000000000030000
Binname: toy_example.exe, OEP: 0000000000001438
Entrypoint = 0000000000031438
TRACE: Watchdog timeout

[-] PROGRAM ABORT : Entrypoint trap trimed out: the forkserver injection failed, or the target process never reached its entrypoint.

     Location : spawn_child_with_injection(), e:\winnie\afl-fuzz\forkserver.c:448

@Vulmatch
Copy link

Vulmatch commented Sep 26, 2022

@HE-UMU @kmackinley @newuser54
I figured it out. It is because the DLL injection works only when 32bit injects 32 exe or 64 bit inject 64bit. In this repo, the author by default sets the toy_example project to x86. Recompile both afl-fuzzer and toy_example.exe with x64 works.

However, I am facing another bug: "Failed to set process affinity" pops up in the forkserver.exe. Still working on this issue.

@Vulmatch
Copy link

Ohhhh, finally it worked. I configured the virtual machine to contain 4 cores rather than one core and the problem solved. This is really a damn awesome project!

@stong
Copy link
Member

stong commented Oct 1, 2022

@LeoLiu-2020 Thank you!

I will update the documentation to specify the machine must be multicore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants