首页
社区
课程
招聘
[原创]去除ImmunityDebugger广告限制+JIT-debugging笔记
发表于: 2014-9-21 21:13 6238

[原创]去除ImmunityDebugger广告限制+JIT-debugging笔记

2014-9-21 21:13
6238
去除ImmunityDebugger广告限制+JIT-debugging笔记

目的:主要是为了去除烦人的广告+JIT-debugging的支持
工具:OD,IDA,ImmunityDebugger 1.85
过程:我们可以按照下面的思路分成5步来走

1.去除点击广告栏,启动IE弹出广告
程序启动了一个线程开启IE,通过ShellExecuteExA下断回到调用的位置
.text:004DF59E                 mov     [esp+10h+var_10], offset dword_658BDC
.text:004DF5A5                 call    sub_4DDEC0        ;nop掉
.text:004DF5AA                 jmp     loc_4DF3D2
这样就不会点击后启动IE了

2.去掉显示内容
默认第一次启动以后,右侧的广告栏会显示"Immunity: Consulting Services Manager"
我们把这个给改掉
.rdata:00615698 aImmunityConsul db 'Immunity: Consulting Services Manager',0
把00615698第一个字节改成0,这样就不会显示了,但是发现过了一段时间又有显示,是跟
Job下面的广告同步了,所以还要继续修改,我们需要下面去掉菜单的显示

3.去掉Jobs
.text:0044D7D8                 mov     [esp+97Ch+var_96C], offset aJobs ; "&Jobs"
.text:0044D7E0                 mov     [esp+97Ch+var_970], ebx
.text:0044D7E4                 mov     [esp+97Ch+var_974], 410h
.text:0044D7EC                 mov     [esp+97Ch+var_978], 8
.text:0044D7F4                 mov     [esp+97Ch+var_97C], eax
.text:0044D7F7                 call    InsertMenuA    ;nop掉
.text:0044D7FC                 sub     esp, 14h
.text:0044D7FF                 mov     [esp+97Ch+var_974], offset dword_658BDC
.text:0044D807                 mov     [esp+97Ch+var_978], 0
.text:0044D80F                 mov     [esp+97Ch+var_97C], offset sub_4DDF40
.text:0044D816                 call    _beginthread    ;nop掉,应该是刷新广告
.text:0044D81B                 mov     eax, ds:dword_6689A4
.text:0044D820                 mov     [esp+97Ch+var_970], 0
.text:0044D828                 mov     [esp+97Ch+var_974], 1D4C0h
.text:0044D830                 mov     [esp+97Ch+var_978], 0
.text:0044D838                 mov     [esp+97Ch+var_97C], eax
.text:0044D83B                 call    SetTimer      ;nop掉,没有用到
.text:0044D840                 sub     esp, 10h
.text:0044D843
.text:0044D843 loc_44D843:                             ; CODE XREF: sub_44D470+34Cj
.text:0044D843                 mov     edx, 1
.text:0044D848                 mov     eax, offset aAutoUpdate ; "Auto update"
.text:0044D84D                 call    sub_4438D0
.text:0044D852                 cmp     eax, 1
上面3处地方nop掉可

4.去除掉颜色
接下来,都干净了,就是一个颜色这块了.我采用搜索颜色的方式.
紫色通过取色器得到的16进制为:0x808000
全局搜索,得到一处
.text:0044D953                 mov     [esp+97Ch+var_978], 808000h
我们强制修改为
.text:0044D953                 mov     [esp+97Ch+var_978], 0C0C0C0h  ;灰色,与其他颜色保持一致

5.增加JIT-debugging
通过分析发现程序在设置JIT的时候是有代码的:
.text:0046C634 loc_46C634:                             ; CODE XREF: sub_46C4F0+117j
.text:0046C634                                         ; sub_46C4F0+11Ej
.text:0046C634                 mov     [esp+23Ch+var_230], offset aAedebugLdLd ; "-AEDEBUG %ld %ld"
.text:0046C63C                 mov     [esp+23Ch+var_234], offset byte_668C00
.text:0046C644                 mov     [esp+23Ch+var_238], offset aSS_22 ; "\"%s\" %s"
.text:0046C64C                 mov     [esp+23Ch+var_23C], esi ; char *
.text:0046C64F                 call    sprintf
.text:0046C654                 mov     [esp+23Ch+var_22C], esi
.text:0046C658                 mov     [esp+23Ch+var_230], 1
.text:0046C660                 mov     [esp+23Ch+var_234], 0
.text:0046C668                 mov     [esp+23Ch+var_238], offset aDebugger_0 ; "Debugger"
.text:0046C670                 mov     [esp+23Ch+var_14], eax
.text:0046C677                 mov     [esp+23Ch+var_228], eax
.text:0046C67B
.text:0046C67B loc_46C67B:                             ; CODE XREF: sub_46C4F0+9Ej
.text:0046C67B                 mov     eax, [esp+23Ch+var_10]
.text:0046C682                 mov     [esp+23Ch+var_23C], eax
.text:0046C685                 call    RegSetValueExA
但是byte_668C00始终为0,我们就需要在开始给它一个初始化.

我的修改如下,选择004B6187开始修改:
原始的部分:
.text:004B6187                 mov     edx, 70h        ; original src

修改后的:
.text:004B6187                 jmp     loc_5ECF70  ;Jmp to Fix JIT Bug
.text:004B618C ; ---------------------------------------------------------------------------
.text:004B618C
.text:004B618C loc_4B618C:                             ; CODE XREF: Preparefornewprocess+137315j
.text:004B618C                 jnz     loc_4B62F0

.text:005ECF70 loc_5ECF70:                             ; CODE XREF: Preparefornewprocess+4D7j
.text:005ECF70                 pusha
.text:005ECF71                 push    104h
.text:005ECF76                 push    offset byte_668C00
.text:005ECF7B                 push    0
.text:005ECF7D                 call    GetModuleFileNameA
.text:005ECF82                 cmp     eax, 0
.text:005ECF85                 jz      short loc_5ECF8E
.text:005ECF87                 nop
.text:005ECF88                 nop
.text:005ECF89                 nop
.text:005ECF8A                 nop
.text:005ECF8B                 nop
.text:005ECF8C                 jmp     short loc_5ECFBF
.text:005ECF8E ; ---------------------------------------------------------------------------
.text:005ECF8E
.text:005ECF8E loc_5ECF8E:                             ; CODE XREF: Preparefornewprocess+1372D5j
.text:005ECF8E                 call    GetLastError    ;增加的一些容错提示信息
.text:005ECF93                 push    eax
.text:005ECF94                 push    offset aErrorCodeAsRet ; "Error code (as returned by GetLastError"...
.text:005ECF99                 push    offset aLasterrS08lx ; "  LastErr %s (%08lX)"
.text:005ECF9E                 push    offset byte_693E98 ; char *
.text:005ECFA3                 call    sprintf
.text:005ECFA8                 add     esp, 10h
.text:005ECFAB                 push    0
.text:005ECFAD                 push    offset aImmunityDebu_6 ; "Immunity Debugger"
.text:005ECFB2                 push    offset byte_693E98
.text:005ECFB7                 push    0
.text:005ECFB9                 call    MessageBoxA
.text:005ECFBE                 nop
.text:005ECFBF
.text:005ECFBF loc_5ECFBF:                             ; CODE XREF: Preparefornewprocess+1372DCj
.text:005ECFBF                 popa
.text:005ECFC0                 mov     edx, 70h    ;写入替换的代码
.text:005ECFC5                 jmp     loc_4B618C  ;跳回继续执行

That's all

附件里面涵盖修改后的文件,以及着色方案(于OD一致)

It's made by dengkeng

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

上传的附件:
收藏
免费 3
支持
分享
最新回复 (4)
雪    币: 4
活跃值: (11)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
打开出错
2014-9-21 22:07
0
雪    币: 6515
活跃值: (3127)
能力值: ( LV3,RANK:30 )
在线值:
发帖
回帖
粉丝
3
去广告版就是好,呵呵
2014-9-21 22:20
0
雪    币: 12055
活跃值: (4768)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
多谢楼主分享
2014-9-21 23:11
0
雪    币: 2
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
我用的ImmunityDebugger一直没有显示广告,我从官网下载的。
2014-9-22 11:04
0
游客
登录 | 注册 方可回帖
返回
//