发信人: Reinhard.bbs@bbs.sjtu.edu.cn (摘星的人), 信区: cnhacker
标  题: Soft-Ice 修改密技 -4 by 软蛀 -- Alex 整理(转寄)
发信站: 饮水思源站 (Fri Apr 25 19:11:00 1997)
转信站: Lilac!ustcnews!ustcnews!sjtunews!sjtubbs
出  处: bbs.sjtu.edu.cn


                                                             ┌┐┌┐∞
【 S-ICE 修改密技第四集 】                             软蛀  ┘└┘└┘
==========================================================================
    前一阵子有朋友问到 ,当应用程式呼叫 INT_07 ,会造成电脑当机 ,虽然已知是
S-ICE 的 INT_07  处理程式写错所造成 ,无奈它的处理程式又臭又长 ,根本看不懂
它在写什麽 ,所以改起来很困难。

    S-ICE 保护模式下的中断处理方式与一般保护模式处理方式一样 ,其方块图如下
所示:

┌—————┐┌—————┐                ┌—————┐┌—————┐
│PUSH  0000││PUSH  0001│ .............. │PUSH  00FE││PUSH  00FF│
└——┬——┘└——┬——┘      :        └——┬——┘└——┬——┘
      │            │            :              │            │
      │            │        共256个中断         │            │
      └——————┴——————┼———————┴——————┘
                                  │
                                  ↓
                         ┌—————————┐
                         │ 呼叫 V86 下的中断│
                         └—————————┘

下中断的处理程式 ,也就是说每个 PUSH 之後的 JMP 位址应该是相同的 ,不过S-ICE
在除错过程偶会用到单步追踪或硬体中断能力 ,而这个硬体中断的结果会触动 INT_1
 ,所以 S-ICE 对於 INT_1 有特别的处理程式 ,当然还有某些中断也有经过特别处理
过的 ,例如时间中断(8)、键盘中断(9)、一般保护异常(D) 都要加以处理 ,至於其它
没有特别用途的中断 ,当然就直接指向『呼叫 V86 下的中断』的程式 ,例如 INT_80
、INT_90.....知道了吗 ?





C:\>DXDEBUG S-ICE.EXE (v2.64)
DXDEBUG: 3.0 -- Copyright (C) 1986-91 Phar Lap Software, Inc.
Serial Number 1-17744
[80386 real mode]

-u ds:4377
3EEC:00004377 6A00                     PUSH     Word Ptr 0
3EEC:00004379 E9F4D6                   JMP      1A70
3EEC:0000437C 6A01                     PUSH     Word Ptr 1
3EEC:0000437E E9C7D8                   JMP      1C48
3EEC:00004381 6A02                     PUSH     Word Ptr 2
3EEC:00004383 E98ADC                   JMP      2010
3EEC:00004386 6A03                     PUSH     Word Ptr 3
3EEC:00004388 E9D6DC                   JMP      2061
3EEC:0000438B 6A04                     PUSH     Word Ptr 4
3EEC:0000438D E9E0D6                   JMP      1A70
3EEC:00004390 6A05                     PUSH     Word Ptr 5
3EEC:00004392 E9DBD6                   JMP      1A70
3EEC:00004395 6A06                     PUSH     Word Ptr 6
3EEC:00004397 E943DF                   JMP      22DD
3EEC:0000439A 6A07                     PUSH     Word Ptr 7
3EEC:0000439C E975E0                   JMP      2414
3EEC:0000439F 6A08                     PUSH     Word Ptr 8
3EEC:000043A1 E97BE1                   JMP      251F
3EEC:000043A4 6A09                     PUSH     Word Ptr 9
3EEC:000043A6 E91605                   JMP      48BF
3EEC:000043A9 6A0A                     PUSH     Word Ptr A
3EEC:000043AB E9C4D5                   JMP      1972
3EEC:000043AE 6A0B                     PUSH     Word Ptr B
3EEC:000043B0 E9BFD5                   JMP      1972
3EEC:000043B3 6A0C                     PUSH     Word Ptr C
3EEC:000043B5 E9EFE2                   JMP      26A7
3EEC:000043B8 6A0D                     PUSH     Word Ptr D
3EEC:000043BA E92FE3                   JMP      26EC
3EEC:000043BD 6A0E                     PUSH     Word Ptr E
3EEC:000043BF E9C5EA                   JMP      2E87
3EEC:000043C2 6A0F                     PUSH     Word Ptr F
3EEC:000043C4 E9ABD5                   JMP      1972
3EEC:000043C7 6A10                     PUSH     Word Ptr 10
3EEC:000043C9 E95BED                   JMP      3127
3EEC:000043CC 6A11                     PUSH     Word Ptr 11
3EEC:000043CE E99FD6                   JMP      1A70
3EEC:000043D1 6A12                     PUSH     Word Ptr 12
3EEC:000043D3 E99AD6                   JMP      1A70
3EEC:000043D6 6A13                     PUSH     Word Ptr 13
3EEC:000043D8 E9D3ED                   JMP      31AE
3EEC:000043DB 6A14                     PUSH     Word Ptr 14
3EEC:000043DD E990D6                   JMP      1A70
3EEC:000043E0 6A15                     PUSH     Word Ptr 15
3EEC:000043E2 E9C5EE                   JMP      32AA
3EEC:000043E5 6A16                     PUSH     Word Ptr 16
3EEC:000043E7 E986D6                   JMP      1A70
3EEC:000043EA 6A17                     PUSH     Word Ptr 17
3EEC:000043EC E981D6                   JMP      1A70
3EEC:000043EF 6A18                     PUSH     Word Ptr 18
3EEC:000043F1 E97CD6                   JMP      1A70
3EEC:000043F4 6A19                     PUSH     Word Ptr 19
3EEC:000043F6 E977D6                   JMP      1A70
3EEC:000043F9 6A1A                     PUSH     Word Ptr 1A
3EEC:000043FB E972D6                   JMP      1A70
3EEC:000043FE 6A1B                     PUSH     Word Ptr 1B
3EEC:00004400 E96DD6                   JMP      1A70
3EEC:00004403 6A1C                     PUSH     Word Ptr 1C
3EEC:00004405 E968D6                   JMP      1A70
3EEC:00004408 6A1D                     PUSH     Word Ptr 1D
3EEC:0000440A E963D6                   JMP      1A70
3EEC:0000440D 6A1E                     PUSH     Word Ptr 1E
3EEC:0000440F E95ED6                   JMP      1A70
3EEC:00004412 6A1F                     PUSH     Word Ptr 1F
3EEC:00004414 E959D6                   JMP      1A70
3EEC:00004417 6A20                     PUSH     Word Ptr 20
3EEC:00004419 E954D6                   JMP      1A70
3EEC:0000441C 6A21                     PUSH     Word Ptr 21
3EEC:0000441E E9C4EF                   JMP      33E5
3EEC:00004421 6A22                     PUSH     Word Ptr 22
3EEC:00004423 E94AD6                   JMP      1A70
3EEC:00004426 6A23                     PUSH     Word Ptr 23
3EEC:00004428 E945D6                   JMP      1A70
3EEC:0000442B 6A24                     PUSH     Word Ptr 24
3EEC:0000442D E940D6                   JMP      1A70
3EEC:00004430 6A25                     PUSH     Word Ptr 25
3EEC:00004432 E93BD6                   JMP      1A70
3EEC:00004435 6A26                     PUSH     Word Ptr 26
3EEC:00004437 E936D6                   JMP      1A70
3EEC:0000443A 6A27                     PUSH     Word Ptr 27
3EEC:0000443C E931D6                   JMP      1A70
3EEC:0000443F 6A28                     PUSH     Word Ptr 28
3EEC:00004441 E92CD6                   JMP      1A70
3EEC:00004444 6A29                     PUSH     Word Ptr 29
3EEC:00004446 E927D6                   JMP      1A70
3EEC:00004449 6A2A                     PUSH     Word Ptr 2A
3EEC:0000444B E922D6                   JMP      1A70
3EEC:0000444E 6A2B                     PUSH     Word Ptr 2B
3EEC:00004450 E91DD6                   JMP      1A70
3EEC:00004453 6A2C                     PUSH     Word Ptr 2C
3EEC:00004455 E918D6                   JMP      1A70
3EEC:00004458 6A2D                     PUSH     Word Ptr 2D
3EEC:0000445A E913D6                   JMP      1A70
3EEC:0000445D 6A2E                     PUSH     Word Ptr 2E
3EEC:0000445F E90ED6                   JMP      1A70
3EEC:00004462 6A2F                     PUSH     Word Ptr 2F
3EEC:00004464 E909D6                   JMP      1A70
3EEC:00004467 6A30                     PUSH     Word Ptr 30
3EEC:00004469 E904D6                   JMP      1A70
3EEC:0000446C 6A31                     PUSH     Word Ptr 31
3EEC:0000446E E9FFD5                   JMP      1A70
3EEC:00004471 6A32                     PUSH     Word Ptr 32
3EEC:00004473 E9FAD5                   JMP      1A70
3EEC:00004476 6A33                     PUSH     Word Ptr 33
3EEC:00004478 E9F5D5                   JMP      1A70
3EEC:0000447B 6A34                     PUSH     Word Ptr 34
3EEC:0000447D E9F0D5                   JMP      1A70
3EEC:00004480 6A35                     PUSH     Word Ptr 35
3EEC:00004482 E9EBD5                   JMP      1A70
3EEC:00004485 6A36                     PUSH     Word Ptr 36
3EEC:00004487 E9E6D5                   JMP      1A70
3EEC:0000448A 6A37                     PUSH     Word Ptr 37
3EEC:0000448C E9E1D5                   JMP      1A70

    查过书本以後 ,我们已知道 INT_7 会触动的原因除了应用程式直接呼叫以外 ,
只有在未插入浮点运算器的情形下才会发生这个中断 ,平常是给模拟程式用的 ,例如
Q387即为一例 ,可是如果我们的电脑已安装有浮点运算器的话 ,这个中断就不再需要
其它的特殊处理了 ,於是我们就可以把它改成跳到『呼叫 V86 下的中断』。

    讲了半天 ,笔者都没有提到如何改才能闪过 INT_07 的缺陷 ,其实只要您了解笔
者上面所写的文章 ,你应该知道要如何去改掉这个缺陷 ,笔者不想供布的原因是不想
让各位不劳而获 ,如果你不去动动头脑 ,你根本不会进步 ,同时也可以避免信又被引
来引去。

--


                                                    沉默的人
                                                 Reinhard Young

※ 来源:·饮水思源站 bbs.sjtu.edu.cn·[FROM: 202.96.210.121]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:211.024毫秒