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

kAFL 0.7+nyx Sleep() function issue :( #252

Open
bjloed opened this issue Oct 28, 2023 · 2 comments
Open

kAFL 0.7+nyx Sleep() function issue :( #252

bjloed opened this issue Oct 28, 2023 · 2 comments

Comments

@bjloed
Copy link

bjloed commented Oct 28, 2023

Hi, I'm currently using kAFL 0.7
When the Sleep() function includes the harness, the ntoskrnl crashes.
The reason for this is that if I run a harness without Sleep() function, it will work normally, but if I add Sleep() to the code that works normally, it will crash
What do you think the reason is?
Thanks

@Wenzel
Copy link
Collaborator

Wenzel commented Oct 30, 2023

Hi @bjloed,

thanks for opening an issue.
I have no idea why the Sleep() function would cause the Windows kernel to crash inside a harness.
But since you have a crash, you should be able to retrieve the crash dump and perform an initial analysis of the stacktrace.

This should give you a clue what happened.

@Wenzel
Copy link
Collaborator

Wenzel commented Oct 30, 2023

One more thing:

The Windows driver example locates the KeBugCheck() functions and inserts kAFL PANIC events instead.
https://intellabs.github.io/kAFL/tutorials/windows/driver/target.html#panic-handlers

However, Windows will create a crash dump inside the KeBugCheck() handler (according to this WRK repo):
https://github.com/mic101/windows/blob/master/WRK-v1.2/base/ntos/ke/bugcheck.c#L1146C15-L1146C15

So when running inside the kAFL harness, if a crash occurs, that IoWriteCrashDump() will not be reached.
Keep this in mind while debugging.

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

2 participants