Skip to content

hfiref0x/WubbabooMark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WubbabooMark

Debugger Anti-Detection Benchmark

Build status Visitors

WubbabooMark is aimed to detect traces of usage of software debuggers or special software designed to hide debugger presence from the debugee by tampering with various aspects of the program environment.

The typical set of debuggers nowadays is actually limited to a few most popular solutions like Ghidra/IDA/OllyDbg/x32+x64dbg/WinDbg and so on. There is a special class of software designed to "hide" the debugger from being detected by the debugee. Debugger detection is usually used by another software class—software protectors (e.g. Themida/VMProtect/Obsidium/WinLicense). Sometimes, software that counteracts these detections is referred to as "anti-anti-debug" or similar. Personally, I find all of this "anti-anti" kind of annoying because we can continue and it will be "anti-anti-anti-..." with all sense lost somewhere in the middle.

What this "anti-anti" class of software actually does is create a landscape of additional detection vectors, while some of the most notorious pieces compromise operating system components’ integrity and security for the sake of being able to work. And all of them, absolutely all of them, bring multiple bugs due to the inability to correctly replicate the original behavior of hooked/emulated functions. Sounds scary? Not that scary, as most users of this software (they call themselves "reversers/crackers") know what they're doing and do it on purpose... right? Carelessly implemented targeted anti-detection methods against known and well reverse-engineered commercial protectors create a bunch of new artifacts. WubbabooMark uses publicly known, up-to-date, and enhanced methods to list those artifacts.

The continuous VMProtect drama generates (at the moment of writing this text in June 2023) a lot of fun, so I just can't stay away from it. Since VMProtect recently went "open-source" under the DGAF license, I had an opportunity to look closer at its "anti-" stuff. What VMProtect has under the hood clearly demonstrates the authors following mainstream "scene" trends with little original creativity in some aspects due to the limits of being a commercial product and software support requirements. Direct syscalls, Heaven’s Gate? What year is it now? However, reinventing this stuff even in 2018 seems to have doomed some of this so-called "anti-anti" software to death.

Anyway, we have some debuggers, some "tampering tools/plugins," etc. Let's see how good they are!

System Requirements

x64 Windows 10/11 and above.

Anything below Windows 10 is unsupported. Well, because those OSes were discontinued by Microsoft and mainstream industry. What a surprise! What a surprise! Forget stone age systems and move on.

Windows 11 preview/developer builds WARNING: since this program relies on completely undocumented stuff, there can be problems with the most recent versions that the program doesn't know about, resulting in false-positive detection or program crashes. Use at your own risk.

Implemented tests

(a short list, almost each actually does more but for readme technical details are too much)

  • Common set of tests
    • Presence of Windows policy allowing custom kernel signers
    • Detection of Windows kernel debugger by NtSystemDebugControl behavior.
    • Check for unnecessary process privileges enablement
  • Process Environment Block (PEB) Loader entries verification
    • Must be all authenticode signed, have valid names
  • Loaded Kernel Modules verification
    • Must be all authenticode signed, doesn't include anything from built-in blacklist
    • Detect lazy data tampering
  • Blacklisted Driver Device Objects
    • Lookup device object names in Object Manager namespace and compare them with blacklist
  • Windows Version Information
    • Detect l33t and other BS changes
    • Cross-compare version information from several system modules that are in KnownDlls
    • Cross-compare version information from PEB with data obtained through WMI
    • Validate system call (syscall) layout for PEB version
    • Validate system build number acceptable range
  • Running Processes
    • Check if process name is in blacklist
    • Cross-compare Native API query result with WMI data to detect processes hidden from the client
    • Detect lazy Native API data tampering
    • Check client against console host information
    • Application Compatibility (AppCompat) parent information
  • Client Threads
    • Verify that client threads' instruction pointers belong to visible modules
  • NTDLL mapping validation
    • Map NTDLL using several methods and cross-compare results
  • Examine program stack
    • Find code that doesn't belong to any loaded module
  • Validate Working Set (WS) information
    • Query WS and walk each page looking for suspicious flags
    • Use WS watch and look for page fault data
  • Perform Handle Tracing
    • Enable handle tracing for client, perform bait call and examine results
    • Check NtClose misbehavior
  • Validate NTDLL syscalls
    • Obtain system call data by various methods, use it and cross-compare results
  • Validate WIN32U syscalls
    • Obtain system call data and compare results
  • Detect Debugger presence
    • Process Debug Port with indirect syscall
    • Process Debug Handle with indirect syscall
    • Process Debug Flags with indirect syscall
    • DR registers
    • User Shared Data information
  • Examine system handle dump
    • Find debug objects and debug handles
    • Detect lazy Native API data tampering
    • Detect client handles with suspicious rights
  • Enumerate NtUser objects
    • Walk UserHandleTable to find objects whose owners are invisible to client API calls
  • Enumerate NtGdi objects
    • Walk GdiSharedHandleTable to find objects whose owners are invisible to client API calls
  • Enumerate Boot Configuration Data (That one requires client elevation)
    • Search for option enablements: TestMode, WinPEMode, DisableIntegrityChecks, KernelDebugger
  • Scan process memory regions
    • Search for regions with memory executable flags that don't belong to any loaded module

Program can be configured for which tests you want to try. Go to menu "Probes -> Settings", apply changes and start scan. Note settings are saved to the registry and read upon program load.

Output Examples

  • Clean scan

  • Wubbaboos found scan

How To Run Test And Don't Ask Questions Next

  1. Download or compile from source "Skilla.exe"
    • If you want to compile it yourself: Use Microsoft Visual Studio 2019 and above with a recent Windows SDK installed. Compile configuration is "Release", not "Debug".
    • If you want to download a precompiled binary, it is in the Bin folder of this repository.
  2. Load your debugger, set up your tampering plugins, load "Skilla.exe".
  3. Run the program in the debugger and watch the output. If something crashed, including your debugger, it is your own fault (maybe~).
  4. Look for results. Normally, there should be nothing detected—literally ZERO wubbaboos in the list.
  5. If you want to repeat the test, there is no need to restart "Skilla.exe" or repeat (2)(3)—go to the menu and use "File -> Scan".

Did you find something that looks like a false positive or a bug? Feel free to report it in the issues section! You can save the generated report using the "Probes -> Save As ..." menu. The file will be saved in comma-separated values (CSV) format.

False positives

Antimalware/anticheat software may cause false positives due to the way these software classes work. Make sure you understand what you do. This is not an AV/EDR benchmark nor a testing tool.

Driver Bugs

While encountering random BSODs from the best and funniest "super hide" software, I was about to make a fuzzer test just because every driver I compiled contained improper handling of syscalls it intercepts. However, since authors of this software don't care and usage of all these drivers is limited to a small group of masochists, this idea was dropped at an early stage. Well, what can I say—never use anything from that super hiding stuff on a live machine or you risk losing your data due to a sudden bugcheck.

Virtual Machine Detection

Not an aim of this tool and will never be added. This tool will work fine with a VM.

Links

Here I would like to put some useful links, enjoy.

Debuggers first!

Debugger Anti-Detection

Debugger Detection

Here I should put some links to what is now reinvented wheels about debuggers detection that you can easily find in the world wide web. It is mostly a time-machine to when Windows XP was all new and shiny.

Project Name

Wubbaboo is a mischievous spirit from Cognosphere videogame Honkai Star Rail. It likes to hide in unexpected places and does a lot of pranks just like the software class we are testing.

No wubbaboos were harmed during tests!

Support

If you find this project interesting, you can buy me a coffee

BTC (Bitcoin): bc1qzkvtpa0053cagf35dqmpvv9k8hyrwl7krwdz84q39mcpy68y6tmqsju0g4

Authors

  • (c) 2023 - 2025 WubbabooMark Project

License

MIT

About

Debugger Anti-Detection Benchmark

Resources

License

Stars

Watchers

Forks

Packages

No packages published