<TABLE width=500>
5 o: b- ]2 W0 F<TBODY>: T$ S- L2 w0 A: v, `. R N' R
<TR>/ p; b. N+ W4 J2 @1 B: P
<TD><PRE>Method 01 + I- ~4 K k5 k+ B; _- f
=========, a# |* q2 L( F& e v* j2 L2 k
+ P) u1 n2 z0 p* ?* T- KThis method of detection of SoftICE (as well as the following one) is
X; q0 h; B/ A4 O) @+ _: Y" D" gused by the majority of packers/encryptors found on Internet.; V( z. [! u& Q; ~1 U( j
It seeks the signature of BoundsChecker in SoftICE* R8 s8 s D6 o! i
8 l( v) \9 t) n' d0 Z
mov ebp, 04243484Bh ; 'BCHK'+ l# u7 `$ h4 D
mov ax, 04h
& L& A+ p7 V3 P; b! K3 j) { int 3 , J2 l' ]: T8 T3 W* Q% k. I
cmp al,4
) B- O9 u5 I2 \% ~ jnz SoftICE_Detected
: H0 n: K1 b4 a# \7 A
- w4 }+ \3 Y3 |: S% P___________________________________________________________________________: P# d7 T5 J+ Q$ h9 P( Q
t2 X& u @# b; Q; ?
Method 023 f; G, Q3 w' ]# C6 R" \: ^7 ~
=========5 a3 ?4 o6 P& e& G+ }
4 k0 P0 l3 n+ a% `5 pStill a method very much used (perhaps the most frequent one). It is used
F5 |4 I \) P( W5 I, dto get SoftICE 'Back Door commands' which gives infos on Breakpoints,
* N( _ \3 l$ [or execute SoftICE commands...
5 z8 c( A0 O* |5 i% i, @It is also used to crash SoftICE and to force it to execute any commands
8 z$ y I: Z- ~, T L(HBOOT...) :-(( 6 |6 e6 i$ e1 I. l9 _4 Q& l! q1 M
! {! B$ v4 u6 |
Here is a quick description:0 N$ i2 i8 h6 i9 Y: ?" i
-AX = 0910h (Display string in SIce windows)1 q* {& z4 e( H9 ^) k
-AX = 0911h (Execute SIce commands -command is displayed is ds:dx)- u h' Y7 j7 w1 i) ~' [' i, i, k
-AX = 0912h (Get breakpoint infos)( x) h! B- c o
-AX = 0913h (Set Sice breakpoints)
) e/ X$ j n3 D" {- F5 I-AX = 0914h (Remove SIce breakoints)
. M8 i3 d1 ?7 P- g# D. V6 ~: e
Each time you'll meet this trick, you'll see:
0 Z) i# \6 w) j; s2 J-SI = 4647h( b8 Z& D7 L4 _/ D
-DI = 4A4Dh
( M" |6 N9 j0 R pWhich are the 'magic values' used by SoftIce.# o- n0 J' C4 O P1 N( h8 V+ S
For more informations, see "Ralf Brown Interrupt list" chapter int 03h.
/ ]* f6 q- F+ F% _- ]% \
9 G9 d& {4 t$ {* h: tHere is one example from the file "Haspinst.exe" which is the dongle HASP9 I; t6 k" @: M0 m! y4 g& t
Envelope utility use to protect DOS applications: A9 [+ p: u6 Q' {* O
$ x5 D$ b; a/ e5 A5 B$ i. X
e9 G2 |& o& H7 o* b4 o! A! J4 r7 n4C19:0095 MOV AX,0911 ; execute command.
( h+ H" C$ u$ B$ b( M4C19:0098 MOV DX,[BX] ; ds:dx point to the command (see below).9 C$ Q' U0 `- T" r. T3 ?# o9 A$ S B
4C19:009A MOV SI,4647 ; 1st magic value.4 n l5 |- E8 [2 O& I4 f
4C19:009D MOV DI,4A4D ; 2nd magic value.
; ^+ \8 }4 N" c; l4C19:00A0 INT 3 ; Int call.(if SIce is not loaded, jmp to 00AD*); F1 M: Y2 i0 O* d
4C19:00A1 ADD BX,02 ; BX+2 to point to next command to execute7 Y; m+ O0 @! B0 ]! B
4C19:00A4 INC CX
: E" ^/ A8 L4 V! f4C19:00A5 CMP CX,06 ; Repeat 6 times to execute' d" b2 k% g P$ L' O$ a1 V1 U
4C19:00A8 JB 0095 ; 6 different commands.1 P* L; I( q; ?% q4 T5 q
4C19:00AA JMP 0002 ; Bad_Guy jmp back.
7 e- @6 t3 b/ U; J6 d0 c( m5 W4C19:00AD MOV BX,SP ; Good_Guy go ahead :)
0 N+ ?( J6 i) d6 v( c% w/ Q7 j* q1 |% m5 @" h. Y
The program will execute 6 different SIce commands located at ds:dx, which
2 r, {8 S# P0 \+ U! `: O$ A* _: m0 Fare: LDT, IDT, GDT, TSS, RS, and ...HBOOT.; |$ ^# f* E6 v+ q
F# S/ v2 \% d; }8 U
* the "jmp to 00ADh" is performed via an SEH if the debugger is not loaded.' ~7 k/ b; U. U9 k) E$ a: I
___________________________________________________________________________' }8 j' \8 X9 {( p. S" o
* x( c6 D0 z1 O+ e! s$ s& a9 ?1 O$ `8 W; \8 P/ a: l( ]% p' f
Method 03
7 z6 u1 k4 _0 M/ C3 J: Y/ l=========
6 [' v3 i* p' o @) @% c! W d0 Q7 W. a& T
Less used method. It seeks the ID of SoftICE VxD via the int 2Fh/1684h
7 z- w1 n' u' Q7 l(API Get entry point)3 J9 _% z! @# C) G" ^ I7 T
4 u% Z8 [' I u; V
, B% \/ t4 v, ^! p5 ] xor di,di7 U9 O4 Y3 ]6 j
mov es,di( U$ s6 v* o2 @2 B" T$ d0 f, Y$ K
mov ax, 1684h
" h% ~* N3 s1 L$ N! H9 M- l mov bx, 0202h ; VxD ID of winice3 O% X. t" F0 D( W1 n
int 2Fh( n4 e- `# o1 M; c) ]% x
mov ax, es ; ES:DI -> VxD API entry point. B; I- _# c; D5 a" d D+ B% L" ~
add ax, di
3 y' U% v- R3 B6 ]0 ] test ax,ax+ M- G2 O; _, c+ Q
jnz SoftICE_Detected4 s% b$ q2 Q& e9 k
" `- U3 c- w u9 V0 }# t- S
___________________________________________________________________________ f$ e7 z8 t. N6 ^9 c( y- W, Y
. o6 \( m5 h9 y; \; L" @: J
Method 044 |, I3 h' k3 b) Q
=========$ F w1 M9 @; i& w
+ }% |$ P, ?$ a J- x1 ] FMethod identical to the preceding one except that it seeks the ID of SoftICE2 E. ?4 h1 D2 u I h9 S0 }7 {+ {, { C: S
GFX VxD.5 Q9 L# d3 d0 [+ Q
' D& H. L+ V) y4 ]# c xor di,di0 {; K2 H" l6 T f, u8 S
mov es,di. N" G$ g4 d( g/ @- h' z
mov ax, 1684h
3 o' d8 e* p* ?6 [% _ mov bx, 7a5Fh ; VxD ID of SIWVID5 s7 @: M7 U* @( J9 q
int 2fh5 J% T5 O& O- i5 o6 k# y; w0 S
mov ax, es ; ES:DI -> VxD API entry point0 d$ h3 C/ J+ q$ z* E# p
add ax, di! _0 U. r: C- {* p( T
test ax,ax/ J/ N( l" O* \% G E3 ^
jnz SoftICE_Detected+ t b8 `0 V$ y; |7 @- c _5 M
# x9 `. u" S2 m6 a: A, p' x( h) g
__________________________________________________________________________
' \' ?3 w# ?! n& g2 j. @$ x
( [9 Z8 ^, j; _0 G
9 P% [ X% |! g' i. p1 y, x- }: EMethod 05+ s8 a6 K# ]( L: o
=========
! k" P8 D; J) u5 u1 O# J" h) S" c# ~# s0 W- ?
Method seeking the 'magic number' 0F386h returned (in ax) by all system+ Z0 ?2 p Z- k$ x! R: N
debugger. It calls the int 41h, function 4Fh.
; K2 I( ~8 ?- c2 E" E" AThere are several alternatives.
4 R ?4 }/ |" s4 S! G" e. c% X9 Z2 Q- T7 b$ d: x4 P
The following one is the simplest:# S" x- g6 G8 c; n) b. F
7 _* O% q, N. d7 O( B* l0 Z3 }- y- u
mov ax,4fh9 \+ l2 @9 _& M) Z
int 41h% q3 _4 v: A1 u' l6 b' `7 M) P: |
cmp ax, 0F386- @ J4 y R. n2 G1 Q7 n% Y5 C
jz SoftICE_detected
2 h* k) s( l. s4 t
8 ]; J* P6 [% c0 K% C# u) x( C$ g: a
9 V$ ]+ {: e# v9 S: rNext method as well as the following one are 2 examples from Stone's $ n& w8 z( p. l$ D
"stn-wid.zip" (www.cracking.net):* I' Z! `+ h$ a/ z: A( t1 }2 }& h
# Q9 ]( s2 ]- Y( @8 g
mov bx, cs6 F$ M! L) v3 ~0 A/ }& O8 t' W
lea dx, int41handler2, [1 G! \! N" ~+ t
xchg dx, es:[41h*4]
2 X' Z. d: j/ q" { xchg bx, es:[41h*4+2]
1 C$ O& V/ g3 a& j0 G/ m1 { mov ax,4fh! c! P$ F, f. v9 B
int 41h3 D$ i" ]( {5 ]3 ]' `
xchg dx, es:[41h*4]# t5 e7 K& }) T! [1 H
xchg bx, es:[41h*4+2]
" e7 c" F7 J& a$ v cmp ax, 0f386h2 j2 n. V. c$ N( L% L
jz SoftICE_detected8 ~9 Y/ D, k$ _) R
. n/ o* y9 n0 mint41handler2 PROC
3 o' W( A0 @7 D# S iret
' \0 G( [/ ]- Nint41handler2 ENDP& I# p9 g+ G# d# j) U4 r% k
. q! y4 t$ p! g' p
0 \0 f4 W4 E9 V0 K( v: z_________________________________________________________________________+ p4 x6 u! F3 R9 n" J0 H$ h
' e6 r, m; a+ V: } Q$ P( `0 q# r
) _2 |% \, M8 |6 tMethod 06( D: A) l0 y& {8 |
=========
. Y; U/ u T; ? `# ~1 B, `
9 j/ P/ W* [2 u, h) S* }4 m9 G8 d
$ N2 t( P0 K. E; y2nd method similar to the preceding one but more difficult to detect:
* d8 ]) L; K/ u. S" ~7 U# j
& r# W. p3 D+ ]: N" b) ~+ \0 W1 ~3 D1 \
int41handler PROC
- H7 B/ u% j0 } mov cl,al
4 \$ P7 [% z4 R- U; j' S& D' s iret8 M0 N' H/ G8 d- y# G
int41handler ENDP
1 R5 C2 P; Y+ r |5 U; f; {6 \. A% {7 n" g7 g
1 k3 H9 p P1 |4 m: ?
xor ax,ax9 `; m( b! s v7 W) S5 X V
mov es,ax# n; z0 Q9 }% A! x6 s* j- G
mov bx, cs
2 t* P8 q6 J- K. ? v, P lea dx, int41handler; [( ]* N" c) c8 \, w) h' G
xchg dx, es:[41h*4]
& h5 K! s6 }% \7 L; b/ | xchg bx, es:[41h*4+2]
1 M# Q; ?* r ?7 a in al, 40h( e# A! k) z, F% Z
xor cx,cx0 _/ u* M7 m1 Q$ [" l5 r
int 41h
h0 Z& L0 O4 M) ?: A xchg dx, es:[41h*4]6 {1 _3 r1 X4 P' T8 k* D
xchg bx, es:[41h*4+2]
8 g Z) d: i( S# z cmp cl,al; ^! h( D# G! t& U9 ]7 Y# |2 }+ U5 m
jnz SoftICE_detected& y& u. q, m& r
I$ }6 z0 [* _" w
_________________________________________________________________________; D5 O% w. Y8 _' X$ y
: L5 \9 u7 ^; ~* L9 VMethod 07
0 L ~( Z& N7 b6 s% b! I=========
* d- h; k& o o: W! E+ @. G/ _# Q N- h3 k( O% R" ?4 V
Method of detection of the WinICE handler in the int68h (V86); P, f0 ?! u b h
$ P; k$ A! @/ f0 W mov ah,43h
% x. O @3 u& i; H$ c6 |3 N int 68h
9 u$ I1 s; V5 m1 M" d" F. _+ { cmp ax,0F386h' [7 a1 \( I5 f+ ^, d; R, ^' k' G
jz SoftICE_Detected& z) R6 I9 t- @1 E3 S) n0 Z% q
$ M' S% i2 S5 f6 Q; u
# F; C6 x+ F/ k+ N- _' }
=> it is not possible to set a BPINT 68 with softice but you can hook a 32Bit
2 p0 @+ e+ t0 D" _4 _ app like this:
. C7 z1 [3 m9 h7 |8 ^- S. m: F5 {, x% z! x9 G
BPX exec_int if ax==68
2 Y/ a9 W9 O, N$ g, ~5 ` (function called is located at byte ptr [ebp+1Dh] and client eip is
J8 Q1 z' w) R) u located at [ebp+48h] for 32Bit apps)
6 q1 V5 ]# `) E( g" j9 F__________________________________________________________________________* _) G. }- E( |! p
1 E) B: A$ |& [- p \! h, C3 J+ ~3 @4 e) ]1 T0 B8 r
Method 08
' ]' S e; o2 \9 M2 K: m=========
/ }8 L0 n- A' `# }
; n" s% J3 @! n2 J2 \It is not a method of detection of SoftICE but a possibility to crash the) y: k& N4 }% a% ?/ D3 B
system by intercepting int 01h and int 03h and redirecting them to another: M, V, v+ i7 Z* n, s ~9 d% r0 {
routine." y3 \+ i/ Y/ s2 y4 n P
It calls int 21h functions 25h and 35h (set/get int vector) and ds:dx points
) m2 } M# X/ nto the new routine to execute (hangs computer...)4 [( Q- E& ^ F) r( N4 A/ W: I
) R4 U5 \- r4 T* |, ?0 p; r
mov ah, 25h
8 w. U3 w5 g& r/ y, i mov al, Int_Number (01h or 03h)
! ^; P {0 g- V( i mov dx, offset New_Int_Routine
: f3 j% ] i$ B int 21h) w( X6 B$ }# A- F0 J9 `
% }1 \/ |0 W1 v5 ~0 F9 X8 k+ l; B$ \4 O
__________________________________________________________________________
% q8 B: x3 F# }( A6 J& _- t7 R, u3 E% a
) S! M8 F( K6 }4 r3 Z; HMethod 098 ]9 T9 G3 Q7 x' l
=========1 X5 X$ H3 |2 H5 {
4 M \/ j( L* E# XThis method is closed to methods 03 and 04 (int 2Fh/1684h) but it is only" m2 x. i3 \1 S4 W0 i8 A
performed in ring0 (VxD or a ring3 app using the VxdCall).6 K3 M! q* X) F
The Get_DDB service is used to determine whether or not a VxD is installed( b2 M# B) V% o( m( S" K7 }
for the specified device and returns a Device Description Block (in ecx) for
: `& |3 _/ B) W' Rthat device if it is installed.
/ _: Q' P$ M) F f! ^' M9 c% K6 b. ]# r% l& T
mov eax, Device_ID ; 202h for SICE or 7a5Fh for SIWVID VxD ID
8 f" m# s8 P. ]7 ?9 R mov edi, Device_Name ; only used if no VxD ID (useless in our case ;-)
8 M8 R, p; o4 [* q VMMCall Get_DDB
* P: t% @; A+ w) G; ^ mov [DDB], ecx ; ecx=DDB or 0 if the VxD is not installed5 Q0 r- O/ b4 |0 F1 y+ m
. A6 C/ R0 @, C7 j5 v# pNote as well that you can easily detect this method with SoftICE:
( X, r8 J- N M3 }9 f+ @ bpx Get_DDB if ax==0202 || ax==7a5fh/ ]; S' s3 |& z; w+ ]% a2 M2 `- a
% d6 e8 W2 q$ ?* r4 R$ L& k! }
__________________________________________________________________________
- T0 y& l9 P4 {1 N0 S( a& B
- a# \% Y' |* q8 P, w8 CMethod 10% o) m; q& I; d& ]5 K
=========1 E+ R) Z* U$ b& w, R
" E! I$ Z$ R) q=>Disable or clear breakpoints before using this feature. DO NOT trace with
& h' N+ j/ q; v2 J SoftICE while the option is enable!!
7 h: J8 G) O, \ }$ @. e4 @- J. {! v5 Q- X6 |
This trick is very efficient:- x6 P) @2 `! }8 F0 t( D2 Y: z
by checking the Debug Registers, you can detect if SoftICE is loaded
0 c: J7 i- H% [; r$ a4 i) w" X R6 v(dr7=0x700 if you loaded the soft with SoftICE loader, 0x400 otherwise) or if
9 N" H6 b0 G& Q% othere are some memory breakpoints set (dr0 to dr3) simply by reading their6 q$ G2 J6 W) w
value (in ring0 only). Values can be manipulated and or changed as well
* E4 u3 W7 W, o" M" g, F; E* I(clearing BPMs for instance): A+ z7 u0 M/ q I3 E! @. y) ~
: C* T' [* i* K" v' f* w
__________________________________________________________________________( t" ?; E r. ?* h
; J- w8 B" P" a8 V# T$ p* U' O
Method 115 y( n2 _# U e6 k
=========/ A5 o9 m& y5 [/ I4 h
+ ^6 ^% A7 s% i0 N. n* F* L
This method is most known as 'MeltICE' because it has been freely distributed
$ q' n% v. Q- d: @. n: t$ @& Z9 o- fvia www.winfiles.com. However it was first used by NuMega people to allow
. D, `+ k1 Y0 p j) k* W2 k* |! T* oSymbol Loader to check if SoftICE was active or not (the code is located
^" u% i. E: S w! e" S% Linside nmtrans.dll). O# X" G: [ t
. L5 p0 Y# u+ w! C r
The way it works is very simple:8 g* A+ L" i6 D$ z
It tries to open SoftICE drivers handles (SICE, SIWVID for Win9x, NTICE for
3 I% o0 F6 y/ E* [% [% O- W" ]; d0 xWinNT) with the CreateFileA API.0 J$ l+ m" F4 ]: u
1 W" D6 V2 d# l _& h6 S7 C7 ^Here is a sample (checking for 'SICE'):
- ?, Z' Q, j( H' W. B9 e f9 L7 { y& }1 _1 U- M, |' X
BOOL IsSoftIce95Loaded()
+ }7 ` ?' q H! T{/ s0 t% B& I2 _ ]7 ?3 a; j3 g
HANDLE hFile; ) v, ~$ |9 P/ F
hFile = CreateFile( "\\\\.\\SICE", GENERIC_READ | GENERIC_WRITE,; Z( ?) S. v- C
FILE_SHARE_READ | FILE_SHARE_WRITE,1 }7 `% H% e' q! a
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
" d7 m$ S; b5 E# \' J if( hFile != INVALID_HANDLE_VALUE )! ?- {( Y3 [3 q7 Y7 F
{ m) ?6 ]9 @1 v: d- r. V2 X
CloseHandle(hFile);! e! g Q4 r1 s. z W
return TRUE;
9 C7 ^. A9 H* f' e% i }3 Y5 J3 ~& Q, G7 Q( @* Y9 [
return FALSE;
4 h- Y1 D' S! Q}. a/ V8 `3 l* I) h9 X4 E+ c8 ^; d
y" u, R. l6 {- W- U- d$ K7 GAlthough this trick calls the CreateFileA function, don't even expect to be q2 n) [5 K, k$ v
able to intercept it by installing a IFS hook: it will not work, no way!
( R" z. C! t" f( p; NIn fact, after the call to CreateFileA it will get through VWIN32 0x001F; P# D4 q/ u- P1 u) y
service _VWIN32_ReleaseWin32Mutex (via Kernel32!ORD_0001/VxDCall function)
# v$ A* z d% U- X) _and then browse the DDB list until it find the VxD and its DDB_Control_Proc" G) ~7 p2 G( e& V9 n
field.
% f8 y8 y7 n9 o% C m' F0 rIn fact, its purpose is not to load/unload VxDs but only to send a
6 M# i# Y1 d3 WW32_DEVICEIOCONTROL (0x23) control message (DIOC_OPEN and DIOC_CLOSEHANDLE)
" u1 u. ^: y4 j8 Jto the VxD Control_Dispatch proc (how the hell a shareware soft could try8 w4 Z% |+ O% u+ Z: N
to load/unload a non-dynamically loadable driver such as SoftICE ;-).+ t1 [6 N% M1 U/ b1 J0 r- Q2 a% d
If the VxD is loaded, it will always clear eax and the Carry flag to allow, p; R( Q9 n* x' [7 @" E. D
its handle to be opened and then, will be detected.
0 U% S4 J( w" |+ \4 l3 a, {% I6 yYou can check that simply by hooking Winice.exe control proc entry point
5 \& _) j& ^ w* o- p w8 hwhile running MeltICE.
+ J9 i4 ], E6 z) ^/ x- C1 T# A# R
( t0 F! H4 Z' ]9 @1 l5 u! H
0 N; K6 }3 k8 P/ m 00401067: push 00402025 ; \\.\SICE
( G% f% u, w2 Y" V' |: E( Q 0040106C: call CreateFileA; h1 \" d- s) g& F/ L- y
00401071: cmp eax,-001: E; c% z/ d$ O7 M# R
00401074: je 004010917 j3 V# ?8 \ u$ z" W5 D6 h" P, N
* x, E6 n0 k' S
- {& V" u9 b m3 c" BThere could be hundreds of BPX you could use to detect this trick. G: V8 Y% W& J) G+ W, E
-The most classical one is:
' ^+ @4 q$ `: o7 \' Y) D: r BPX CreateFileA if *(esp->4+4)=='SICE' || *(esp->4+4)=='SIWV' ||
; J' P+ T! ~4 R' j *(esp->4+4)=='NTIC'
2 B G3 a- e$ ]. F1 V$ w
' R7 K, N/ P) R-The most exotic ones (could be very slooooow :-( g$ b7 A% _8 }* n" R; q6 k/ T0 p
BPINT 30 if eax==002A001F && (*edi=='SICE' || *edi=='SIWV')
' W, ?5 }. d. O9 `( c ;will break 3 times :-(
1 O/ o2 ^7 b+ l* e
) X" j! k' C9 A; W-or (a bit) faster: 3 Z1 X3 m( n L6 m6 }3 D* ]1 A
BPINT 30 if (*edi=='SICE' || *edi=='SIWV')
, H7 C3 s! I) `0 \
* w4 a" h. A& A BPX KERNEL32!ORD_0001 if *edi=='SICE' || *edi=='SIWV'
/ |& O0 M2 [. b4 E ;will break 3 times :-(* E8 ~1 Q# d. q: E
0 k+ q8 S+ o d" O
-Much faster:
* ^6 ~- `% e9 `3 d1 e& [ BPX VMM_GetDDBList if eax->3=='SICE' || eax->3=='SIWV'
9 R3 G Q4 H4 [7 v) k8 T( b- P6 f ?2 n8 V
Note also that some programs (like AZPR3.00) use de old 16-bit _lopen
! |3 M7 T& h) ^4 Q) x- ?# Pfunction to do the same job:
$ A# q. y- T3 h
! O+ V, M# l5 O* |+ c. I# a- p/ l push 00 ; OF_READ, `7 F! n! H2 m+ p8 x
mov eax,[00656634] ; '\\.\SICE',0
2 m! C5 w% e2 j. h, Y3 q push eax6 b. o$ x! V$ n: j5 b2 F
call KERNEL32!_lopen1 H1 b! {6 v, {+ D8 T, Y
inc eax
* U( [6 |# w5 e' U/ x; {: k jnz 00650589 ; detected3 W8 l& H+ M: X9 |; U7 ^
push 00 ; OF_READ
+ _5 y" t8 B% |' ?/ Y& k' f mov eax,[00656638] ; '\\.\SICE'
' S. _0 q0 S. { push eax q* y ?# v+ s& Y2 E$ e
call KERNEL32!_lopen9 p1 c% F* s# ?# F( K
inc eax% O0 \* m( x/ t: ~- v |9 Y
jz 006505ae ; not detected
) {2 b0 o5 b' ^( J6 i
8 Q) K- I$ i4 n1 t. F- l5 N
& j# q1 M# Y% |2 ~' D3 w0 i__________________________________________________________________________
# T% B" j8 G, J2 `4 ~% o2 m( |" W, ]
Method 12
( _: x' a" a7 r: }# j=========8 V' G9 q: Z6 U% W; L ^! t( R
. H3 Y9 i2 B3 [" m" TThis trick is similar to int41h/4fh Debugger installation check (code 05
3 j% a( }7 q: c& G/ @& 06) but very limited because it's only available for Win95/98 (not NT)
4 X d3 D* Y% t/ Has it uses the VxDCall backdoor. This detection was found in Bleem Demo.- C, t( b2 x1 [4 R' [
7 B' q. W; u% f. | push 0000004fh ; function 4fh
) D# `# b) j: N) v7 Y2 B push 002a002ah ; high word specifies which VxD (VWIN32)
7 W0 ^! |5 G0 i, P5 l; {- O ; low word specifies which service! v9 _: r- W0 {* C4 f
(VWIN32_Int41Dispatch)* b# B5 ], G! C2 S
call Kernel32!ORD_001 ; VxdCall
6 i+ v" M9 d) {& q cmp ax, 0f386h ; magic number returned by system debuggers
; i5 _( b9 E: {8 M" D% Y jz SoftICE_detected) s. G# j0 o9 S! ? X& \" M' e5 z
" B, L! o; {1 H9 G9 NHere again, several ways to detect it:% X! B) w* F' G6 ~3 X. m' \
& f# |/ u D! h2 S' F; k8 e BPINT 41 if ax==4f
% D$ v7 [- y6 d B, {- D, ?
; _. v, {) i8 j' z' Z& B BPINT 30 if ax==0xF386 ; SoftICE must be loaded for this one1 W& @+ c% n) z% w0 B3 E
: N/ f4 |9 X$ @3 i2 n- M
BPX Exec_PM_Int if eax==41 && edx->1c==4f && edx->10==002A002A8 c# W. \ B6 d" a! Z/ g( P
D0 A" d+ v" \( R
BPX Kernel32!ord_0001 if esp->4==002A002A && esp->8==4f ; slooooow!
$ ~' u0 m8 B P3 m6 d- K" P/ P: m1 s& j( K1 w5 [% J" R
__________________________________________________________________________
8 G- E; G1 G& T! u' k6 v1 b' Q3 x: E; w' V
Method 13! p1 k% r3 X1 ] z
=========
$ @+ ]8 M& s5 i) A5 A2 y* t
2 b& ~+ i9 f/ ]+ `! a5 ONot a real method of detection, but a good way to know if SoftICE is
1 j k! S% \0 w+ P# o2 t% xinstalled on a computer and to locate its installation directory.
! Z/ h8 Z5 W/ a) q3 v7 ?It is used by few softs which access the following registry keys (usually #2) :; m/ y5 g% R1 i1 Y6 k$ ?3 J
. Y" M, s* V! J0 J4 `3 N# [
-#1: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion- b7 _3 }$ t; ^, J
\Uninstall\SoftICE [: e) v9 s0 Z C; v, b
-#2: HKEY_LOCAL_MACHINE\Software\NuMega\SoftICE8 _, g! B$ g! A4 C
-#3: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion
' P& l/ n: {- Z2 S+ X3 n7 ~- o\App Paths\Loader32.Exe3 t0 R' `/ c/ Z* ?8 C4 ^7 |0 J6 S
" h8 v! T% }. n) V
* U6 M0 D# [, \, I- FNote that some nasty apps could then erase all files from SoftICE directory
& j1 ~/ ~& e1 j5 I/ b" V(I faced that once :-(
, J0 v2 {( l! q6 G/ L! }) }6 H/ }3 O+ x
Useful breakpoint to detect it:# u) k5 O4 [- l5 u* J
* W: D5 S: L; N$ O9 Q BPX _regopenkey if *(esp->8+0x13)=='tICE' || *(esp->8+0x37)=='tICE'
5 g3 h) ^) ~: e3 A$ d* ~' M9 {4 B: K- y) u) }& N ~7 y
__________________________________________________________________________- t8 o" M: ?* c: ~8 w
5 w5 Y2 T% R( U/ g' L& w- |5 P
4 w. T: B; S! f H
Method 14
( L1 m1 S- z* i. \% z& u=========
' U1 v+ L7 p7 K- R) J# Z" f. A- c' e- N* L( r
A call to VMM 'Test_Debug_Installed' service. As the name says, its purpose
, Z3 Z# b' e. P1 G5 y% T. o$ Ris to determines whether a debugger is running on your system (ring0 only).' B* U. K/ q3 `9 i
9 t2 r/ J& f& }5 b$ _ VMMCall Test_Debug_Installed
5 J q4 u2 q6 ~7 a( z3 Q- P5 L je not_installed
$ n! Z1 J: X% z/ Q W9 l' D( M( K. r* x' K2 m; T0 J
This service just checks a flag.+ r* P0 n3 [8 |; C
</PRE></TD></TR></TBODY></TABLE> |