我创建了 makin 是为了让初始恶意软件评估对我来说稍微容易一些,我认为它对其他人也很有用,它有助于揭示样本使用的调试器检测技术。
makin 将样本作为被调试进程打开,并注入 asho.dll(主模块在注入前重命名所有 dll),asho.dll 钩住了 ntdll.dll 和 kernelbase.dll 库中的几个函数,在参数检查之后,它会将相应的消息发送给调试器(makin.exe)。
makin 还会为 IDA Pro 生成一个脚本,用于在检测到的 API 处设置断点。
目前,makin 可以揭示以下技术:
ntdll.dll:
NtClose - 参考:The "Ultimate" Anti-Debugging Reference: 7.B.iiNtOpenProcess - 参考:The "Ultimate" Anti-Debugging Reference: 7.B.iNtCreateFile - 参考:The "Ultimate" Anti-Debugging Reference: 7.B.iii (Open itself)NtCreateFile - 参考:The "Ultimate" Anti-Debugging Reference: 7.B.iii (Open a driver)LdrLoadDll - 参考:The "Ultimate" Anti-Debugging Reference: 7.B.ivNtSetDebugFilterState - 参考:The "Ultimate" Anti-Debugging Reference: 7.D.viNtQueryInformationProcess - 参考:The "Ultimate" Anti-Debugging Reference: 7.D.viii.a, 7.D.viii.b, 7.D.viii.cNtQuerySystemInformation - 参考:kernelbase.dll:
IsDebuggerPresent - 参考:MSDNCheckRemoteDebuggerPresent - 参考:MSDNSetUnhandledExceptionFilter - 参考:The "Ultimate" Anti-Debugging Reference: D.xvRegOpenKeyExInternalW - 检查注册表键RegQueryValueExW - 检查注册表键值你可以通过编辑 checks.json 文件添加更多虚拟机检测,无需修改可执行文件。
目前就这些,你可以随意添加 :)

NtSetInformationThread - 参考:The "Ultimate" Anti-Debugging Reference 7.F.iiiNtCreateUserProcess - 参考:The "Ultimate" Anti-Debugging Reference 7.G.iNtCreateThreadEx - 参考:ntuery 博客文章NtSystemDebugControl - 参考:@waleedassar - pastebinNtYieldExecution - 参考:The "Ultimate" Anti-Debugging Reference 7.D.xiiiNtSetLdtEntries - 参考:ANTI-UNPACKER TRICKS: PART ONE - 2.1.2NtQueryInformationThread - 参考:ntquery - NtQueryInformationThreadNtCreateDebugObject 和 NtQueryObject - 参考:Anti-Debug NtQueryObjectRtlAdjustPrivilege - 参考:Using RtlAdjustPrivilege to detect debugger by insid3codeteamPEB->BeingDebugged - 一些程序不是调用 IsDebuggerPresent(),而是手动检查 PEB(进程环境块)中的 BeingDebugged 标志。PEB->NtGlobalFlag - 参考:al-khaserUserSharedData->KdDebuggerEnabled - 参考:al-khaser - SharedUserData_KernelDebuggerPROTECTED 句柄技巧 - 参考:al-khaser - HANDLE_FLAG_PROTECT_FROM_CLOSE