• OD调试检测研究笔记(以E盾简化版作研究时写的笔记)


    一般代码比较重复和平常不一样的都是要注意下,因为不是检测OD就是结束进程
     
     
    83 C3 04 89 07 83 C7 04 8B 03 83 C3 04 89 07 83 C7 04 8B 03 83 C3 04 89 07 83 C7 04 8B 03 83 C3
    04 89 07 83 C7 04 8B 03 83 C3 04 89 07 83 C7 04 8B 03
     
     
     
     
     
    0040AA7A |. 83C3 04 add ebx,0x4
    0040AA7D |. 8907 mov dword ptr ds:[edi],eax ; kernel32.IsDebuggerPresent
    0040AA7F |. 83C7 04 add edi,0x4
    0040AA82 |. 8B03 mov eax,dword ptr ds:[ebx]
    0040AA84 |. 83C3 04 add ebx,0x4
    0040AA87 |. 8907 mov dword ptr ds:[edi],eax ; kernel32.IsDebuggerPresent
    0040AA89 |. 83C7 04 add edi,0x4
    0040AA8C |. 8B03 mov eax,dword ptr ds:[ebx]
    0040AA8E |. 83C3 04 add ebx,0x4
    0040AA91 |. 8907 mov dword ptr ds:[edi],eax ; kernel32.IsDebuggerPresent
    0040AA93 |. 83C7 04 add edi,0x4
    0040AA96 |. 8B03 mov eax,dword ptr ds:[ebx]
    0040AA98 |. 83C3 04 add ebx,0x4
    0040AA9B |. 8907 mov dword ptr ds:[edi],eax ; kernel32.IsDebuggerPresent
    0040AA9D |. 83C7 04 add edi,0x4
    0040AAA0 |. 8B03 mov eax,dword ptr ds:[ebx]
    0040AAA2 |. 83C3 04 add ebx,0x4
    0040AAA5 |. 8907 mov dword ptr ds:[edi],eax ; kernel32.IsDebuggerPresent
    0040AAA7 |. 83C7 04 add edi,0x4
    0040AAAA |. 8B03 mov eax,dword ptr ds:[ebx]
     
    OD检测api函数
     
    IsDebuggerPresent
    CheckRemoteDebuggerPresent
    NtQueryInformationProcess
    CsrGetProcessId+OpenProcess
    CloseHandle
    OutputDebugString
    UnhandledExceptionFilter
    OutputDebugStringA
    ZwSetInformationThread
    GetTickCount
    timeGetTime
     
     
     
    一般调试检测都是调用IsDebuggerPresent函数
     
     
    IsDebuggerPresent 函数
     
    确定调用进程是否由用户模式的调试器调试。
     
    语法
     
    BOOL WINAPI IsDebuggerPresent(void);
     
    参数
     
    该函数没有参数
     
    返回值
     
    如果当前进程运行在调试器的上下文,返回值为非零值。
     
    如果当前进程没有运行在调试器的上下文,返回值是零。
     
    下IsDebuggerPresent断点会在堆栈里可以回调到检测的call
     
     
     
    检测OD特征
     
    eax=002376A0, (ASCII "StrongOD,ODbgScript,ODDragAttach,OllyMachine,单步步入,单步步过,自动步入,自动步过,执行到返回,硬件断点")
    堆栈 ss:[0012F610]=76E90000 (kernel32.76E90000)
     
     
    0040ACBE /$ 55 push ebp
    0040ACBF |. 8BEC mov ebp,esp
    0040ACC1 |. 81EC 68000000 sub esp,0x68
    0040ACC7 |. C745 FC 00000>mov [local.1],0x0
    0040ACCE |. 68 08000000 push 0x8
    0040ACD3 |. E8 0ECF0100 call 验证测试.00427BE6
    0040ACD8 |. 83C4 04 add esp,0x4
    0040ACDB |. 8945 F8 mov [local.2],eax
    0040ACDE |. 8BF8 mov edi,eax
    0040ACE0 |. BE D5AB4A00 mov esi,验证测试.004AABD5
    0040ACE5 |. AD lods dword ptr ds:[esi]
    0040ACE6 |. AB stos dword ptr es:[edi]
    0040ACE7 |. AD lods dword ptr ds:[esi]
    0040ACE8 |. AB stos dword ptr es:[edi]
    0040ACE9 |. C745 F4 00000>mov [local.3],0x0
    0040ACF0 |. C745 F0 00000>mov [local.4],0x0
    0040ACF7 |. 68 08000000 push 0x8
     
    检测OD通用特征码:
     
    83 C4 04 89 45 ?? 8B F8 BE ?? ?? ?? 00 AD AB AD AB C7 45 ?? 00 00 00 00 C7 45 ?? 00 00 00 00 C7
    45 ?? 00 00 00 00
     
    一般尾部返回0
     
     
     
    GetStarupInfoA 检测启动项信息,可检测是否被调试
     
    GetMenu
     
    过E盾检测方法:
     
    可以下IsDebuggerPresent断点来到检测处
     
    用特征码进入到OD菜单检测处尾部
     
    0040B859 . C3 retn 返回0
     
    然后在ebp+8处修改为0(检测到调试为1)
     
    过菜单检测
     
    bp GetWindow 返回0
    0012F5E0 00010010 |hWnd = 00010010 (class='#32769')
     
     
     
    过驱动检测
    70 6C 75 67 69 6E 00 5C 3F 3F 5C 00 4F 6C 6C 79 64 62 67 2E 65 78 65
     
    0046BB33 70 6C 75 67 69 6E 00 5C 3F 3F 5C 00 4F 6C 6C 79 plugin.??.Olly
    0046BB43 64 62 67 2E 65 78 65 00 53 74 72 6F 6E 67 4F 44 dbg.exe.StrongOD
    0046BB53 2E 64 6C 6C 00 00 00 00 00 00 00 00 40 00 00 00 .dll........@...
     
     
    搜索特征码,然后全部nop 或者nop掉@
     
    0012F5E4 002ABE58 ASCII "??D:软件破解OD类吾爱破解专用版Ollydbg2015年7月2日更新吾爱破解专用版OllydbgpluginRockey5U.sys"
  • 相关阅读:
    内网穿透之 ssh 转发
    如何解决pytorch 编译时CUDA版本与运行时CUDA版本不对应
    如何监控GPU使用情况并杀死指定其中进程
    Screen 常用命令+VNC 启动停止命令总结
    C++快速文件输入输出
    Pycharm使用宝典
    Docker软件安装系列。
    Docker自动清理日志
    consul集群搭建说明
    jenkins搭建可以支持【FTP】上传功能的项目
  • 原文地址:https://www.cnblogs.com/Sendige/p/9600733.html
Copyright © 2020-2023  润新知