<TABLE width=500>8 M. s; f* o7 S8 E# f, V* g
<TBODY>8 o7 B7 T3 V- c, W2 C/ }) v
<TR>
2 ]+ j) l8 _7 P6 d$ z<TD><PRE>Method 01
: F& J' e1 ?" N7 g; I4 \=========. O7 \' h) c% M9 `, ]( F
% {( _7 S% l- J5 zThis method of detection of SoftICE (as well as the following one) is
& H2 L$ x/ ?+ X* S7 l" z" Uused by the majority of packers/encryptors found on Internet.
4 |7 N5 F" w0 \+ a& J% z' v! BIt seeks the signature of BoundsChecker in SoftICE* l- }3 Y6 ?" }. }- O5 ^. i/ A0 b
9 s! \2 j6 I) O! x) s4 c
mov ebp, 04243484Bh ; 'BCHK'
, p3 S9 x1 P- {3 K mov ax, 04h ?, v7 L) v( G" k9 _! x2 b" R
int 3
1 P0 a5 L! t5 i4 ]" @/ P9 F) F cmp al,46 L; y- ]& ~( m
jnz SoftICE_Detected
7 }9 e5 G0 j3 s4 }; [" @% G& M) Z
5 t$ r0 A: S! a$ l% I___________________________________________________________________________1 w% s5 k; \9 }4 R, L
2 W1 `- A9 j1 X/ \3 H' sMethod 029 {+ q1 t8 D4 q9 e- n
=========( F) K: m/ S) E1 e5 J5 ?: J2 }
0 q% X" d% u0 H2 j- X3 c7 U6 HStill a method very much used (perhaps the most frequent one). It is used
. M) s3 r4 S! o/ d! V& _to get SoftICE 'Back Door commands' which gives infos on Breakpoints,
5 B- l% V k1 h# c; Por execute SoftICE commands...! H1 O g/ O6 k0 ?' B
It is also used to crash SoftICE and to force it to execute any commands
. U) l" [+ M1 b- s4 p& Q5 y(HBOOT...) :-((
5 c& ]6 N, f9 P3 n* ?1 t, z. ~' A
8 m9 z: {. h, n6 Q2 H3 X( oHere is a quick description:
; T( P' f* ^$ t3 }8 ~! W4 W A-AX = 0910h (Display string in SIce windows)
8 u% f7 z5 {+ p5 J7 H; t9 h-AX = 0911h (Execute SIce commands -command is displayed is ds:dx)& Y5 d8 h3 P- u d3 P
-AX = 0912h (Get breakpoint infos)" R/ t3 N6 y) T4 t& B! S. v
-AX = 0913h (Set Sice breakpoints)1 M/ S$ L6 D3 a* X" p9 J) |' a4 S+ P8 P
-AX = 0914h (Remove SIce breakoints)
7 ?* y, Z, y" x
9 w6 C- ` z. c2 ^Each time you'll meet this trick, you'll see:
) m0 H* O% z1 F) q# N6 Y-SI = 4647h+ c3 C7 Z {$ {/ y/ H& m! ?
-DI = 4A4Dh
: B- t6 W1 M; X, J: d- CWhich are the 'magic values' used by SoftIce.7 E* @4 _7 p0 O7 T2 S3 i* T6 C
For more informations, see "Ralf Brown Interrupt list" chapter int 03h." q$ j7 R' O& ]9 B" M. r) S
' P2 \+ R2 q2 N* \* H1 P& W7 g+ SHere is one example from the file "Haspinst.exe" which is the dongle HASP
: P! j) t/ I. N" J& J) J# Y* QEnvelope utility use to protect DOS applications:
9 g# |. `3 h! q8 @3 }$ I2 p( s
4 ?7 e7 ^8 M4 l+ N. o' u$ n( Q9 C/ \! {+ Y# T) ]0 ?( S
4C19:0095 MOV AX,0911 ; execute command.
$ U7 R8 ~/ `# ]; W0 j3 m4C19:0098 MOV DX,[BX] ; ds:dx point to the command (see below).* F# R7 Y# r' T$ Y/ L' y/ ^
4C19:009A MOV SI,4647 ; 1st magic value.* u" W3 U6 G! X
4C19:009D MOV DI,4A4D ; 2nd magic value.
$ W8 n2 z3 t$ T8 @4C19:00A0 INT 3 ; Int call.(if SIce is not loaded, jmp to 00AD*)- @' J1 \8 l6 ?. w$ N5 E2 C
4C19:00A1 ADD BX,02 ; BX+2 to point to next command to execute5 T; i) q7 a% |3 J
4C19:00A4 INC CX
: Y- ~6 G& P# X* ]; r4C19:00A5 CMP CX,06 ; Repeat 6 times to execute/ L3 V* \9 {7 }& v; [# a$ ]
4C19:00A8 JB 0095 ; 6 different commands.
/ I, A" `6 j j O4C19:00AA JMP 0002 ; Bad_Guy jmp back.' H. t# y7 W0 l4 U) T
4C19:00AD MOV BX,SP ; Good_Guy go ahead :)9 o4 u/ p, w0 g& g2 l. m# H
/ I# {5 I% u9 R. iThe program will execute 6 different SIce commands located at ds:dx, which
* f, W3 `& f( ^ ~* H) k6 ]are: LDT, IDT, GDT, TSS, RS, and ...HBOOT.+ B _. W P3 c8 E0 Q! O6 T
% A1 Z5 h5 { J/ S# @) i5 h* the "jmp to 00ADh" is performed via an SEH if the debugger is not loaded.
' ^2 B ~- ^, P7 Y0 g3 D, ` Y___________________________________________________________________________$ }$ J; z' r h0 @
. d1 x# S- m8 O6 Q6 g, v0 J- D: q" C$ a+ Z2 U( o
Method 03! `: ]4 S$ K; h2 B- a# Y
=========8 }, P$ D) ` u% a' \) }7 P' g
. Y6 S& ?$ O( r0 u
Less used method. It seeks the ID of SoftICE VxD via the int 2Fh/1684h
( {/ H5 _7 K& R& S) H(API Get entry point)0 b7 p7 N; `6 c3 H
$ a* I, _8 y$ D/ O5 Z
/ P" w3 U$ C. T* S xor di,di
9 {4 f* D( k ~& k1 M mov es,di
2 B! ^- x H4 K mov ax, 1684h & F6 @: i. F5 D9 b7 p
mov bx, 0202h ; VxD ID of winice
9 T& L% S1 g! t& Z int 2Fh1 f7 E( `, s) j) u" _9 l7 m
mov ax, es ; ES:DI -> VxD API entry point
: L5 [0 x* V2 W" X0 o add ax, di* }. Y ~0 }3 M5 G
test ax,ax
0 {3 T$ M _4 m; _& W jnz SoftICE_Detected
( S* J7 o2 i( U- l* \1 }# b
1 N1 }. _8 l, k- s___________________________________________________________________________
* ~0 @' }7 Y7 C% A+ ]6 A# N! [; `9 P( ?' |2 d o. E% z
Method 043 V2 O; c3 I: }) ]
=========
" e" K% m; e) d, T- V% l
. N5 H! z1 @' @4 hMethod identical to the preceding one except that it seeks the ID of SoftICE1 j3 ?+ t9 [" y6 L& Y6 ]/ ~
GFX VxD.. D0 u7 u4 j; N) Z- s! q }) Y
0 C/ M- C- R9 _' W/ o. |! h xor di,di
( }, }/ P) W9 v: {, N mov es,di( h* @3 j0 R! `
mov ax, 1684h
$ p0 ?/ e0 l# K" l; _4 g) H6 x mov bx, 7a5Fh ; VxD ID of SIWVID0 |& G4 L8 U( L/ T" B; q
int 2fh
# X; b! m/ c) H7 j mov ax, es ; ES:DI -> VxD API entry point7 U( j( B$ h/ Z1 m/ l
add ax, di7 `& j" F) r0 H& Z
test ax,ax
( ~/ c& S% l- t, N9 W jnz SoftICE_Detected
( s" Z6 S& o/ e9 J4 q" M: j$ M: O1 B2 D. t* E1 Y w
__________________________________________________________________________
) P& m. s4 N! ?$ c; {; w' `0 f. |3 ]3 J7 F# n h$ M# Z: i+ w* j
/ U1 D& M: s5 w5 |, c2 {2 {, |# n
Method 05
' l3 L) ? D' W8 U: b" E! }=========
- Z; }* O0 n: l
1 P% ]. P* R5 H( [Method seeking the 'magic number' 0F386h returned (in ax) by all system+ P1 H" d4 V7 O# R9 U
debugger. It calls the int 41h, function 4Fh.
" @* I7 F( s2 o9 }& T2 FThere are several alternatives.
* H( X8 @. a0 _& z4 k( i% k/ M7 |1 G$ S
The following one is the simplest:
0 D$ Y, e, y, H' c+ ]( r& T
$ ^# n Z& _& u/ E. n8 ^0 V mov ax,4fh# O" ^" O- P3 h$ m* R9 \
int 41h
$ J5 i |( g) o& ?. c) A cmp ax, 0F386
" D1 c$ e% M3 N; s& z jz SoftICE_detected
4 M! M: y7 r; B f$ B" Q: l& c% E$ F) E) |; F
* R/ C% t# A. m+ j) {- W4 _* A1 ~Next method as well as the following one are 2 examples from Stone's
& f# f2 e* T0 p4 s4 R"stn-wid.zip" (www.cracking.net):
3 D5 z* e* i, C8 C# W! ?- l% Q: x4 q' i& j0 C6 g1 x
mov bx, cs$ X" d! g, I3 W9 X; v+ Z4 w2 K
lea dx, int41handler2
* R( c+ x% R: Y z8 E6 ]% E xchg dx, es:[41h*4]# M& M/ B& R8 t S! p2 w
xchg bx, es:[41h*4+2]( C4 {: C e p) |, y3 p
mov ax,4fh- w. S0 @! c# b$ _3 s
int 41h5 q. |0 L% I0 d& _7 E
xchg dx, es:[41h*4]3 t7 s8 Q* h+ ?5 E
xchg bx, es:[41h*4+2]8 M" {# |3 w6 l) O2 a
cmp ax, 0f386h
4 C4 l. V+ y0 Q6 _% o7 n" H& z, \ jz SoftICE_detected
6 [+ k g3 ?, g
! _' D# s7 o* Z G) i1 {8 f# iint41handler2 PROC
- G* K5 _5 W" d6 `9 t# O iret! R3 z n) c6 T/ K
int41handler2 ENDP
- U6 N a- X o, G8 m9 M% H- |9 Y, l$ H. l& a- Z& ?$ \: W5 w3 E
d! F: z" f' l/ K, Y2 X
_________________________________________________________________________! e- _- J( s0 T4 S6 V
# A7 ?$ g6 E* d
& Z$ q) H2 F5 r z# n9 p6 Q. TMethod 06" K i/ I$ D1 m
=========3 z L" \; l& W7 A* D! z& p
( F R) a/ f0 s: z
7 g9 Q$ V+ S0 u# A7 o+ R7 _2nd method similar to the preceding one but more difficult to detect:
& `. [6 `0 J/ e# s
@0 R I. A+ Z/ v0 P% d/ D. ?+ `6 |' |
int41handler PROC
+ l% ~8 F% c6 I8 N mov cl,al; F) G* n7 P3 ^
iret1 {; f! m' K2 F4 X2 K$ S) S8 @# O
int41handler ENDP/ t+ M& Q* `; ]
! m Q' m2 a% \6 K! M8 D
: z5 \9 l$ u: G2 A: N m
xor ax,ax* N5 U$ ^" `, Z' w
mov es,ax
; y( ?5 q' o& E% F& x+ s. A9 o mov bx, cs! S6 L* y! I) v' h0 Q
lea dx, int41handler7 c F& K# u! f( D
xchg dx, es:[41h*4]- r6 q3 ~0 U4 F) B
xchg bx, es:[41h*4+2]" O( V _9 w( S+ |& c! ~4 r* \
in al, 40h
9 e# E- S" [* ^5 _+ v+ U- j6 b xor cx,cx! Y6 w* C$ J1 A0 w/ k9 z9 M9 J
int 41h
; u) a f1 w' H9 l% ~6 U+ B xchg dx, es:[41h*4]! _, }9 c% V0 r0 ~
xchg bx, es:[41h*4+2]# S9 [+ G4 x4 f7 ^8 w$ X# Z
cmp cl,al. k' U& [% t7 l5 @
jnz SoftICE_detected& `7 s% U% \2 \; b
% `1 `8 W( [; Q, U O( [
_________________________________________________________________________( ~. c6 P( F. W- ]+ X0 ~) D% Z
/ h4 X/ B! C5 v6 BMethod 07
# u7 V8 x d( ]2 P1 I6 M=========3 `& q3 _ @1 [7 ~
7 m0 ^( {, ?3 E. U( b; a4 ?: J1 HMethod of detection of the WinICE handler in the int68h (V86)5 h7 A" V7 i9 g: o. E5 j% |
l( v7 r& ^' W4 q# i& M( W8 W
mov ah,43h
' ^. P& j) A4 Q! a' A2 c int 68h
4 c5 T( O. d9 A cmp ax,0F386h( r# I9 W! d7 o" o6 n
jz SoftICE_Detected: A4 b# D# V3 P8 r+ ~: H8 s! {
6 f' i$ n L+ ~8 D0 ~# n" K5 E u
# }% t+ D" i* g8 J9 a: y1 S
=> it is not possible to set a BPINT 68 with softice but you can hook a 32Bit
( o" B+ i3 n. N& i app like this:/ z1 V& F# x+ z8 t" g5 p1 a
, g( {9 V9 S w9 C: |. E( f
BPX exec_int if ax==680 D2 N! r# w$ r1 ?% k- f
(function called is located at byte ptr [ebp+1Dh] and client eip is
2 n- I4 O' v7 t( ?. g; y3 G located at [ebp+48h] for 32Bit apps)- @3 T* L- M% d7 Y1 U" Q' b- E6 |
__________________________________________________________________________" ^# e0 P7 O. Q5 R. v
0 |3 p; R+ ?, v
N, ~; ]6 J7 m& yMethod 08" {% O3 s0 V. k& ~
=========4 v: k6 w* k4 q4 ^7 W
, d4 u4 W8 o8 W7 A J7 j, Z* o
It is not a method of detection of SoftICE but a possibility to crash the
; D2 Z6 _8 H. T: A9 } I2 Isystem by intercepting int 01h and int 03h and redirecting them to another
! b& Y4 a- H7 ~routine./ ^; V! v" J" g( I$ n
It calls int 21h functions 25h and 35h (set/get int vector) and ds:dx points
) p, V- H7 F8 ~- Y* `to the new routine to execute (hangs computer...)) i/ g* R" f+ V$ ?, t. r
' q% i4 i' t; ]3 F6 \) b mov ah, 25h
( H( l- m3 e& m P/ Q; [; r7 p mov al, Int_Number (01h or 03h); J' Y0 `! ~, u7 Q
mov dx, offset New_Int_Routine. G9 v6 [* K: \
int 21h% _1 D, S$ l# T' \6 a8 }
) p |: {. N- c* s
__________________________________________________________________________7 Y( O3 y) U4 K2 X
, {. L# X, U" O! _Method 09
1 P d9 K1 l2 y- u=========
% S4 u% y0 j7 n n6 H2 H; q# W& o
" p& J5 b' i' M! g2 B4 d/ lThis method is closed to methods 03 and 04 (int 2Fh/1684h) but it is only! y+ M3 y6 L6 y, }0 V0 H& }
performed in ring0 (VxD or a ring3 app using the VxdCall)./ \) ^: L3 g0 \2 F# d, g
The Get_DDB service is used to determine whether or not a VxD is installed
5 u7 u- g1 Y* |; c# C9 T8 mfor the specified device and returns a Device Description Block (in ecx) for, b+ G/ b( M8 z# f0 S2 x
that device if it is installed.
5 b7 b& y; E- Q3 H
, c i0 |0 W/ h, P mov eax, Device_ID ; 202h for SICE or 7a5Fh for SIWVID VxD ID
1 T, f" t8 k" E, @' `9 z4 v4 \ mov edi, Device_Name ; only used if no VxD ID (useless in our case ;-)
! s7 o/ ]& ]. r+ I; a VMMCall Get_DDB
9 W @! Z; ]4 e* [# q3 W1 y+ w mov [DDB], ecx ; ecx=DDB or 0 if the VxD is not installed! j# e+ ~9 j9 E# n
- b2 p' f# Q# P4 ?
Note as well that you can easily detect this method with SoftICE:2 S/ C K* C9 W$ E
bpx Get_DDB if ax==0202 || ax==7a5fh
$ H3 h6 I( m! P$ E, Q/ B
# Q1 G. y' s9 @2 q8 a) e, S__________________________________________________________________________( _) n1 @& ~8 C1 Z4 ]) w. f$ z- m
' ^5 V$ m5 j, v) k: a
Method 10
# {( _5 ^6 e' n& H8 U1 }# C8 Q=========7 i. o; ?2 B0 w, Q4 A! F7 f
* V+ |. O2 k g
=>Disable or clear breakpoints before using this feature. DO NOT trace with
" C* Y+ M! i: c4 I8 ` SoftICE while the option is enable!!
/ P7 |6 [+ _; @1 K& n( m) ~/ @; T' ^! @* m; w, ~3 Z* w1 {
This trick is very efficient:
% q: L' y. {+ b1 Dby checking the Debug Registers, you can detect if SoftICE is loaded' J L% b! U) e( _
(dr7=0x700 if you loaded the soft with SoftICE loader, 0x400 otherwise) or if; @3 g, P! [; Z% y7 s" S9 M
there are some memory breakpoints set (dr0 to dr3) simply by reading their# p; L F) F5 O# U
value (in ring0 only). Values can be manipulated and or changed as well9 m1 J0 K6 z$ T1 E. G2 y
(clearing BPMs for instance)
# _/ `" h6 k+ z+ S3 B9 X1 f2 f" n& S/ X0 c7 |3 {- W
__________________________________________________________________________
2 E8 E( D7 ~* a w4 d) Q7 b
: G) h9 T" o1 A; J3 C' WMethod 11/ A c% ]3 R3 c$ r) W
=========
. a( [% \( h3 W! F! }" E% J, [5 q
This method is most known as 'MeltICE' because it has been freely distributed# d; \0 G: ]3 [6 p, V
via www.winfiles.com. However it was first used by NuMega people to allow: q6 {3 n, j$ F: x8 V8 L* i/ B
Symbol Loader to check if SoftICE was active or not (the code is located& ]- l4 \5 V" y. m3 }3 b( f( d
inside nmtrans.dll).
5 m0 \" b0 z/ l" ^* j
7 d, Q9 o4 o V9 N! ^2 ]The way it works is very simple:# t& l* A8 \. l
It tries to open SoftICE drivers handles (SICE, SIWVID for Win9x, NTICE for
+ C, ~: @% k0 tWinNT) with the CreateFileA API.
( n# o5 V/ a: d+ D+ A" s; t- y% Y& X0 k; |
Here is a sample (checking for 'SICE'):* V5 C1 ?# h: a+ U9 f6 t3 j
1 h- h7 o) J W
BOOL IsSoftIce95Loaded()+ d5 p4 r% ]- j. X) e
{. s+ l3 E/ Y. Q: u0 {
HANDLE hFile;
/ v. E/ v* ?: \, O" k hFile = CreateFile( "\\\\.\\SICE", GENERIC_READ | GENERIC_WRITE,- W' M, b3 m0 y1 V* u. i' l
FILE_SHARE_READ | FILE_SHARE_WRITE,4 {7 E4 {6 R. |$ F0 M& i
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);' `) a, z4 N9 A v% e9 ^& k
if( hFile != INVALID_HANDLE_VALUE )9 Y0 r" e; b" b: ?' q
{/ f9 p: l) `: f$ A
CloseHandle(hFile);
+ ^& M, E& U9 @" B, Y; P return TRUE;
4 F; p, [+ e: T# f }
- K% ^7 I& V# T2 I return FALSE;
# K. q* I9 K$ [! O2 G- Q}
6 ]4 d% F2 G, P r- f; I, @& ^4 W0 G4 @: K
Although this trick calls the CreateFileA function, don't even expect to be* V0 s; D4 \' I
able to intercept it by installing a IFS hook: it will not work, no way!
; J! \! u) G4 B% l) s5 ]% }In fact, after the call to CreateFileA it will get through VWIN32 0x001F
0 i7 L. x! q: B& Q& R' Z; qservice _VWIN32_ReleaseWin32Mutex (via Kernel32!ORD_0001/VxDCall function)
- u2 W0 X7 a! H7 ^. G2 Fand then browse the DDB list until it find the VxD and its DDB_Control_Proc/ g! d3 s( x H/ T1 r4 G/ }5 d
field.% M+ F% @! ^. A
In fact, its purpose is not to load/unload VxDs but only to send a
$ B9 i4 _ j& i- M3 T; UW32_DEVICEIOCONTROL (0x23) control message (DIOC_OPEN and DIOC_CLOSEHANDLE)( F s5 Y5 i. F& @
to the VxD Control_Dispatch proc (how the hell a shareware soft could try5 _) w: b+ \4 P
to load/unload a non-dynamically loadable driver such as SoftICE ;-).% A5 G( R; M( C; [1 p4 j% ]" L
If the VxD is loaded, it will always clear eax and the Carry flag to allow) V; j' _) a' F
its handle to be opened and then, will be detected.
: R+ N1 b8 v& c+ U' l4 M5 W7 nYou can check that simply by hooking Winice.exe control proc entry point2 \% s& d9 G& \% y4 m, j% O
while running MeltICE.3 E7 F9 }/ Q' X- J
3 I- d3 L2 [: V9 r$ }
; r" y4 d2 V6 B8 N
00401067: push 00402025 ; \\.\SICE& G. \- u. v2 g
0040106C: call CreateFileA$ D% q; _6 N( o4 @$ f* F
00401071: cmp eax,-001
! h) G# I& f+ @- z7 m& Z5 j8 E 00401074: je 00401091
! i. y: e s# J8 X4 H! i, ?
3 U. |% [- X) Y/ }4 t9 u0 _4 @% M4 u5 ~2 \ I
There could be hundreds of BPX you could use to detect this trick.; Y* L1 R" d% H
-The most classical one is:
) k# W! X; `! t& z BPX CreateFileA if *(esp->4+4)=='SICE' || *(esp->4+4)=='SIWV' ||6 U2 H5 J5 S! Z# \4 V+ T
*(esp->4+4)=='NTIC'0 b3 B+ ~! Y" u- \0 ?7 j9 p
: U' y6 M2 [1 i- {1 O" G
-The most exotic ones (could be very slooooow :-(
6 R& x6 l3 {* B: p BPINT 30 if eax==002A001F && (*edi=='SICE' || *edi=='SIWV')
, o: d. F4 n" p8 L! V, R* ^ ;will break 3 times :-(
; M- q5 i0 V% P8 P8 w1 c5 H
8 [. Y& X5 x3 s% Z, n. b; ?-or (a bit) faster:
( w& v& i0 G- R. P/ E BPINT 30 if (*edi=='SICE' || *edi=='SIWV')6 d9 P& b$ m) H& d
$ S1 O% R. t+ R- a+ M9 T% v BPX KERNEL32!ORD_0001 if *edi=='SICE' || *edi=='SIWV'
5 c% a+ C% X K; K ;will break 3 times :-(. l9 O# x8 L; e; S/ i% g: D! s) |; o
G" d, o- q \-Much faster:
' [3 {! H& i4 C4 R! C( l& [ BPX VMM_GetDDBList if eax->3=='SICE' || eax->3=='SIWV'
3 C% `; H6 H+ y) s! ^" \8 G+ b% ?# {4 K8 Y! Z# k5 b: N
Note also that some programs (like AZPR3.00) use de old 16-bit _lopen2 V* }- H) ~1 Y' C# \$ ]2 V6 \
function to do the same job:9 V5 ^: a3 p$ y7 ?
% e/ t; H; u& ?; d6 c& M/ v$ J t push 00 ; OF_READ5 Q5 K7 x, i& F* P! x }$ s
mov eax,[00656634] ; '\\.\SICE',0. w- q3 l: d. z% c6 \
push eax9 Q4 L4 H. t- y; F! J+ v
call KERNEL32!_lopen
; m }# S# ] w" o6 o# o/ d inc eax
/ N6 B- S' \! i0 { jnz 00650589 ; detected
0 _4 b5 e' L3 Q1 s% U8 Q push 00 ; OF_READ6 U) S+ ~3 X& `2 f6 _5 S, ^# j
mov eax,[00656638] ; '\\.\SICE' Z, g9 Q$ r$ |
push eax9 E! r# F3 d# \3 u, A( x
call KERNEL32!_lopen6 U" s( U& G; M. c2 v
inc eax9 S/ Q6 K0 p3 e
jz 006505ae ; not detected% X; o& k* @% `- \2 g
& Q% |. u5 J. i: f' z4 ^" r. ^0 L% e) G* P/ H8 e* R9 M8 I
__________________________________________________________________________
; e, o. z, f) T1 ^4 Y6 Z/ s# D7 M; D3 O r
Method 12
A2 `! N: w2 p0 {/ R( q=========
$ o3 B: m; E& G% H/ S: R+ l ?! K- r% `+ b+ q* ?
This trick is similar to int41h/4fh Debugger installation check (code 05
8 ?) }- X9 Z8 a' e, f* {& 06) but very limited because it's only available for Win95/98 (not NT)2 N9 X, I$ a5 b0 H0 f
as it uses the VxDCall backdoor. This detection was found in Bleem Demo.( t' X4 ^1 X, d; B( a- ~3 h
+ Y! S5 `; H; t7 }- `& I push 0000004fh ; function 4fh
l# l D( P/ _* x* j' h push 002a002ah ; high word specifies which VxD (VWIN32)* C# _* K6 m" e
; low word specifies which service+ U. k8 D. }! [( g) S, x
(VWIN32_Int41Dispatch)) {) E5 j4 x5 s& N8 |5 }
call Kernel32!ORD_001 ; VxdCall
0 L! H- Y7 u5 [# p! k cmp ax, 0f386h ; magic number returned by system debuggers4 Z+ o% W: H# S5 C$ `, Z
jz SoftICE_detected. Y7 [: r g. z
& p5 ?7 {+ G$ ], o; m( Z6 O& s) sHere again, several ways to detect it:3 E2 F) K' D* `; m6 P
( w- N2 G- W- L2 k; t5 t BPINT 41 if ax==4f
- K- V3 X2 p) ?* ?2 ]. t# ? Q0 I9 T8 h1 q+ L9 y# U
BPINT 30 if ax==0xF386 ; SoftICE must be loaded for this one: f) [9 x7 n- n
' ?& z9 |! I2 R4 e; F BPX Exec_PM_Int if eax==41 && edx->1c==4f && edx->10==002A002A
( u0 u0 m+ O6 D$ [$ o5 G S, V: Z2 h2 d8 ^
BPX Kernel32!ord_0001 if esp->4==002A002A && esp->8==4f ; slooooow!/ j% T/ c9 F" q$ P6 w
5 W# ^. \/ d7 Q2 V1 G" G__________________________________________________________________________
1 M* b3 t8 @, P0 f9 R* C$ B0 k; U' |* }8 v% l( n4 k$ u6 Y, G
Method 13( R% U# b4 p, T/ H2 ]
=========+ [% `" z6 Y p/ T$ \
- D# }; ~ M# g# nNot a real method of detection, but a good way to know if SoftICE is0 l8 \* b. P2 t" P1 S8 ~! p
installed on a computer and to locate its installation directory.* u5 c" S3 [& P1 j" p
It is used by few softs which access the following registry keys (usually #2) :
. z" ~* q/ K( \, j! P! G4 P' P1 T2 ?, z; O
-#1: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion, U# O4 M/ m) q% g% f* B1 |( E
\Uninstall\SoftICE# Z# `/ M5 J3 u
-#2: HKEY_LOCAL_MACHINE\Software\NuMega\SoftICE
' ]4 b3 D' r: s8 I. D-#3: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion e$ P8 B$ G. B7 i! w1 R
\App Paths\Loader32.Exe% u# T/ |% L8 t' c$ i
' e" X$ {7 L6 x4 l% f1 g1 R0 Z8 @) G+ |6 T+ I4 M
Note that some nasty apps could then erase all files from SoftICE directory u2 [& R% h/ E$ y6 y
(I faced that once :-(/ D( }5 c2 J6 G& T' a$ k' \
b* _/ f( A f4 f: U
Useful breakpoint to detect it:4 M, ^) p7 [( Z; a+ m
0 A! i- X, ]( _3 o
BPX _regopenkey if *(esp->8+0x13)=='tICE' || *(esp->8+0x37)=='tICE'* b9 L1 o2 h% S0 e- x6 z8 ~
- V( i) m4 ]2 H ?& Y__________________________________________________________________________
, C& f1 C' U% U8 ?2 Q8 ^% y; B' P& G
7 |$ I4 ~$ C9 E7 e' b$ ]Method 14 / g8 k, B7 r: T+ Z; I# U
=========7 S% X3 ?! f6 X9 ]" b U% }0 o
/ r$ q* o7 i) w% t& uA call to VMM 'Test_Debug_Installed' service. As the name says, its purpose
8 F& u9 _+ q4 G. V/ o2 Z* f! ^( Eis to determines whether a debugger is running on your system (ring0 only).
( L2 S [- i! |7 P& l/ M
3 P- ^. r1 k( b/ T VMMCall Test_Debug_Installed9 d2 N& W& y$ x
je not_installed
' ^ ^! {. Z; ^
' V( b% r% z+ D* NThis service just checks a flag.
$ @8 @! a1 |. ~" e+ g4 i5 [6 h</PRE></TD></TR></TBODY></TABLE> |