反调试技术总结

总结了一下网上的反调试技术,记录一下

一、使用WindowsAPI :
  1.IsDebuggerPresent
  2.CheckRemoteDebuggerPresent ->call NtInformationProcess( 2参数ProcessInformationClass)
  3.NTQueryObject(2参数ObjectInformationClass)检查调试对象
  4.NTQuerySystemInformation( 1参数SystemInformationClass)
  5.ZwSetInformationThread(2参数ThreadInformationClass)设置ThreadHideFromDebugger,使线程与调试器强制分离
二、手动检测数据结构
  1.IsDebuggerPresent 查看peb
  2.ProcessHeap  查看PEB结构的0x18处 ProcessHeap中的ForceFlags和Flags
  3.检测NTGlobalFlag
三、检测调试器:
  1.注册表项:
      SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug(32位系统)
      SOFTWARE\Wow6432Node\Microsoft\WindowsNT\CurrentVersion\AeDebug(64位系统)
  2.窗口检测:
      FindWindow  EnumWindow
  3.进程检测
  4.检测父进程
  5.是否有SeDebugPrivilege权限
  6.检测时间差
      使用rdtsc指令
      使用QueryPerformanceCounter和GetTickCount
  7.断点检测
      软件断点
      硬件断点
  8.执行代码校验和检查
四、干扰调试器
  1.使用TLS回调
  2.使用异常
      int 3
      int 2d
      设TF单步异常
      汇编插入异常
五、加密,加花
 
 
详解见相关博客:http://bbs.pediy.com/thread-212371.htm
     http://blog.csdn.net/qq_32400847/article/details/52798050

转载于:https://www.cnblogs.com/HsinTsao/p/7492806.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
## Features ### Anti-debugging attacks - IsDebuggerPresent - CheckRemoteDebuggerPresent - Process Environement Block (BeingDebugged) - Process Environement Block (NtGlobalFlag) - ProcessHeap (Flags) - ProcessHeap (ForceFlags) - NtQueryInformationProcess (ProcessDebugPort) - NtQueryInformationProcess (ProcessDebugFlags) - NtQueryInformationProcess (ProcessDebugObject) - NtSetInformationThread (HideThreadFromDebugger) - NtQueryObject (ObjectTypeInformation) - NtQueryObject (ObjectAllTypesInformation) - CloseHanlde (NtClose) Invalide Handle - SetHandleInformation (Protected Handle) - UnhandledExceptionFilter - OutputDebugString (GetLastError()) - Hardware Breakpoints (SEH / GetThreadContext) - Software Breakpoints (INT3 / 0xCC) - Memory Breakpoints (PAGE_GUARD) - Interrupt 0x2d - Interrupt 1 - Parent Process (Explorer.exe) - SeDebugPrivilege (Csrss.exe) - NtYieldExecution / SwitchToThread - TLS callbacks ### Anti-Dumping - Erase PE header from memory - SizeOfImage ### Timing Attacks [Anti-Sandbox] - RDTSC (with CPUID to force a VM Exit) - RDTSC (Locky version with GetProcessHeap & CloseHandle) - Sleep -> SleepEx -> NtDelayExecution - Sleep (in a loop a small delay) - Sleep and check if time was accelerated (GetTickCount) - SetTimer (Standard Windows Timers) - timeSetEvent (Multimedia Timers) - WaitForSingleObject -> WaitForSingleObjectEx -> NtWaitForSingleObject - WaitForMultipleObjects -> WaitForMultipleObjectsEx -> NtWaitForMultipleObjects (todo) - IcmpSendEcho (CCleaner Malware) - CreateWaitableTimer (todo) - CreateTimerQueueTimer (todo) - Big crypto loops (todo) ### Human Interaction / Generic [Anti-Sandbox] - Mouse movement - Total Physical memory (GlobalMemoryStatusEx) - Disk size using DeviceIoControl (IOCTL_DISK_GET_LENGTH_INFO) - Disk size using GetDiskFreeSpaceEx (TotalNumberOfBytes) - Mouse (Single click / Double click) (todo) - DialogBox (todo) - Scrolling (todo) - Execution after reboot (todo) - Count of processors (Win32/Tinba - Win32/Dyre) - Sandbox k

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值