Home Creators Posts Import Register Favorites Logout
haven't archived this post yet. have a subscription? use the importer!

Content

In this tutorial we analyze the anti-debug checks in BlackMatter ransomware with IDA Pro. We use static analysis to determine exactly what the checks are doing. 

BlackMatter sample:

Malshare Download 

Anti-debug feature explained:

Anti-Debug NtSetInformationThread

Anti-Debug NtGlobalFlag 


Files

Previews only

[Patreon] Analyzing BlackMatter Anti-Debug Tricks With IDA Pro

In this tutorial we analyze the anti-debug checks in BlackMatter ransomware with IDA Pro. Expand for more... ----- OALABS DISCORD https://discord.gg/6h5Bh5AMDU OALABS PATREON https://www.patreon.com/oalabs OALABS GITHUB https://github.com/OALabs UNPACME - AUTOMATED MALWARE UNPACKING https://www.unpac.me/#/ ----- BlackMatter sample: https://malshare.com/sample.php?action=detail&hash=22d7d67c3af10b1a37f277ebabe2d1eb4fd25afbd6437d4377400e148bcc08d6

Comments

Y G

I'm not quite understand how the second anti-debug detects the debugger. From the code, seems it check the thread number whether it's 0(false), if not then hide the main thread from debugger. The question is, will the main thread number to be changed when the executable loaded by debugger?

oalabs

I should have explained this better, there are some Windows tricks that are assumed with handles. Null for the main thread is translated into -2 for the current thread, or if a valid handle is passed in (not null) then they use the handle that was passed. In this case they are passing null that is translated into -2 for current thread. You can see the cast here in the POC code https://anti-debug.checkpoint.com/techniques/interactive.html#ntsetinformationthread