Jump to content
View in the app

A better way to browse. Learn more.

DecodeHub - Reverse Engineering, Crackmes, Software & Coding

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Anti-BSOD DLL – NtRaiseHardError / RtlAdjustPrivilege Hook

Featured Replies

  • Founder

This DLL is used to prevent applications from forcing a Blue Screen of Death on purpose.
Some protected software uses BSOD as an anti-debug or anti-tamper method. This DLL blocks that behavior by hooking a couple of native APIs from ntdll.dll.

The idea is simple: stop the crash before it happens.


Used APIs

RtlAdjustPrivilege
This function is usually called to enable sensitive privileges like SeShutdownPrivilege.
Most forced BSOD techniques need this privilege first. If it fails, the crash chain breaks.

NtRaiseHardError
This API is responsible for raising critical system errors.
With the right parameters, it can be abused to intentionally crash the system.


Typical Forced BSOD Flow

What many protectors do is basically this:

RtlAdjustPrivilege(SeShutdownPrivilege, TRUE)
then
NtRaiseHardError(STATUS_ASSERTION_FAILURE, …)

Result: system crash (BSOD)

This is not a bug, it’s done on purpose.


What This DLL Does

RtlAdjustPrivilege is hooked and always denied.
So even if the application tries to enable crash-related privileges, it fails.

NtRaiseHardError is also hooked.
When it gets called, nothing happens. The function just returns and the crash is skipped.

Because of this, the application loses its ability to force a BSOD.


Why Detours

Microsoft Detours is used to hook the functions safely at runtime.
It replaces the original function pointers and restores them when the DLL is unloaded.
Nothing permanent is changed.


How It Works in Practice

The DLL is injected into the target process.
On process attach, the hooks are installed.
Any call to RtlAdjustPrivilege or NtRaiseHardError inside that process gets intercepted.
The system never crashes.


Notes

This is user-mode only.
Kernel drivers that trigger BSODs are not affected.
Some protectors may detect hooks like this.
It only affects the injected process, not the whole system.


Short Summary

This DLL prevents intentional BSODs by blocking privilege escalation and neutralizing NtRaiseHardError calls.
It’s mainly useful when dealing with software that uses forced crashes as a protection or anti-debug technique.

AntiBlueScreenOfDeath.zip

PROFESSIONAL

6d538d11ecfced46f459ee300b5e80ec_ChatGPT_Image_25_Kas_2025_00_57__c0451a.png

  • Replies 10
  • Views 313
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • kernel seviye ileri bir yöntemdir farklı şekilde kancalama yapabilir ama bunu denemende fayda var eğer user moddaki mantığı kullanıyorsa engeller bunu dll olarak derle hedef exe ye inject et

  • Hayatimda gordugum en sacma sey. Bir adamin programina dll injectliyebiliyorsan zaten buna gerek kalmaz. O adam dll injectlerken seni yakalayip bsod atar zaten. Programini daha dll injectiondan koruya

8 minutes ago, cambaz said:

This DLL is used to prevent applications from forcing a Blue Screen of Death on purpose.
Some protected software uses BSOD as an anti-debug or anti-tamper method. This DLL blocks that behavior by hooking a couple of native APIs from ntdll.dll.

The idea is simple: stop the crash before it happens.


Used APIs

RtlAdjustPrivilege
This function is usually called to enable sensitive privileges like SeShutdownPrivilege.
Most forced BSOD techniques need this privilege first. If it fails, the crash chain breaks.

NtRaiseHardError
This API is responsible for raising critical system errors.
With the right parameters, it can be abused to intentionally crash the system.


Typical Forced BSOD Flow

What many protectors do is basically this:

RtlAdjustPrivilege(SeShutdownPrivilege, TRUE)
then
NtRaiseHardError(STATUS_ASSERTION_FAILURE, …)

Result: system crash (BSOD)

This is not a bug, it’s done on purpose.


What This DLL Does

RtlAdjustPrivilege is hooked and always denied.
So even if the application tries to enable crash-related privileges, it fails.

NtRaiseHardError is also hooked.
When it gets called, nothing happens. The function just returns and the crash is skipped.

Because of this, the application loses its ability to force a BSOD.


Why Detours

Microsoft Detours is used to hook the functions safely at runtime.
It replaces the original function pointers and restores them when the DLL is unloaded.
Nothing permanent is changed.


How It Works in Practice

The DLL is injected into the target process.
On process attach, the hooks are installed.
Any call to RtlAdjustPrivilege or NtRaiseHardError inside that process gets intercepted.
The system never crashes.


Notes

This is user-mode only.
Kernel drivers that trigger BSODs are not affected.
Some protectors may detect hooks like this.
It only affects the injected process, not the whole system.


Short Summary

This DLL prevents intentional BSODs by blocking privilege escalation and neutralizing NtRaiseHardError calls.
It’s mainly useful when dealing with software that uses forced crashes as a protection or anti-debug technique.

AntiBlueScreenOfDeath.zip

Hocam user mode only yazmışsınızda kernel tarafından bir icotl ile dead spaceace offset tarama yaparsak yine blue screen alıyor muyuz? bunu engellemiyor sanırım?

Edited by null1

  • Author
  • Founder
1 minute ago, null1 said:

Hocam user mode only yazmışsınızda kernel tarafından bir icotl ile dead space deadspace yaparsak yine blue screen alıyor muyuz? bunu engellemiyor sanırım?

kernel seviye ileri bir yöntemdir farklı şekilde kancalama yapabilir ama bunu denemende fayda var eğer user moddaki mantığı kullanıyorsa engeller bunu dll olarak derle hedef exe ye inject et

PROFESSIONAL

6d538d11ecfced46f459ee300b5e80ec_ChatGPT_Image_25_Kas_2025_00_57__c0451a.png

Hayatimda gordugum en sacma sey. Bir adamin programina dll injectliyebiliyorsan zaten buna gerek kalmaz. O adam dll injectlerken seni yakalayip bsod atar zaten. Programini daha dll injectiondan koruyamayan adaminda boyle bsod trap gibi seyleri koymasi da gulunc oluyor.

Edited by hern0s

Arbitrary Remote Process Code Execution Using KernelCallbackTable 
https://hern0s-dev.github.io/

spacer.png

  • Author
  • Founder
34 minutes ago, hern0s said:

Hayatimda gordugum en sacma sey. Bir adamin programina dll injectliyebiliyorsan zaten buna gerek kalmaz. O adam dll injectlerken seni yakalayip bsod atar zaten. Programini daha dll injectiondan koruyamayan adaminda boyle bsod trap gibi seyleri koymasi da gulunc oluyor.

herkes senin gibi düşünse piyasa kan giren olur herkes pro değil :D

PROFESSIONAL

6d538d11ecfced46f459ee300b5e80ec_ChatGPT_Image_25_Kas_2025_00_57__c0451a.png

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Important Information

Terms of Use

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.