<TABLE width=500>
+ C7 z& ]0 b4 ]/ _; x' f$ [<TBODY>
8 w( F! B# ^" J<TR>
8 A w! u1 W- G' w0 [+ O, B- p- v<TD><PRE>Method 01 1 ^) Z+ n/ h& {( h) d* B7 ~4 q
=========5 Z3 @$ q& ?# u" c, h$ L7 m) c
: G6 g: I" W; dThis method of detection of SoftICE (as well as the following one) is
: R4 A. f u5 N# gused by the majority of packers/encryptors found on Internet." M7 R0 F/ S$ O2 ~# b* Q% P. D
It seeks the signature of BoundsChecker in SoftICE
, U& n' U ] `! K3 C4 f
# n; j8 _2 T* d4 R" [5 a6 X3 c mov ebp, 04243484Bh ; 'BCHK' l$ u8 `9 N1 P0 G) T+ C
mov ax, 04h
9 _6 x+ C, V: s2 B- Q# b int 3 . i3 O) H/ \2 l4 b9 `' z4 M. P
cmp al,4
8 M7 g) b/ E( }1 g# r' W" C jnz SoftICE_Detected9 c6 v8 C# f& c6 z: q1 }
) \% N2 Q( h/ l9 R
___________________________________________________________________________; _& A A ]% e2 J6 |) Q v# O
' p6 n7 D- x& C. X4 @8 e: e
Method 02
' E" D) ?2 S" Q m e: i% q8 I/ J8 a=========# p/ P! z: m' y% Q
* h6 P7 u3 ?" OStill a method very much used (perhaps the most frequent one). It is used
. B1 W+ l0 N( y( {6 eto get SoftICE 'Back Door commands' which gives infos on Breakpoints,
$ C+ z- Q+ y2 S2 h& Qor execute SoftICE commands...
0 ]2 o, v0 I7 \& s4 a5 S& SIt is also used to crash SoftICE and to force it to execute any commands
* X/ N( T# }- n( J1 W(HBOOT...) :-((
. [+ D' u" a2 Z, ]) C' o2 J% d {0 ^1 m$ R9 D: ?& T
Here is a quick description:
) }; E" u9 v" W7 R1 ]-AX = 0910h (Display string in SIce windows)$ N+ E. ~5 ]" }+ w$ ^( p2 C- s; l
-AX = 0911h (Execute SIce commands -command is displayed is ds:dx): M6 T( M/ k6 ]
-AX = 0912h (Get breakpoint infos)& d- K0 d5 Z3 B8 x
-AX = 0913h (Set Sice breakpoints)9 T" ], l7 @8 z- X
-AX = 0914h (Remove SIce breakoints)
# N0 x( F; _0 V& y+ C
1 G9 w) n0 k7 ]1 B* p8 B8 [Each time you'll meet this trick, you'll see:. R! u) y) }3 `4 \. ?9 G* ~7 h
-SI = 4647h) i3 |7 r' Y1 w9 |" ?
-DI = 4A4Dh
2 `4 D6 G6 Q- NWhich are the 'magic values' used by SoftIce.; ]6 }4 v) g C+ k9 z' \
For more informations, see "Ralf Brown Interrupt list" chapter int 03h., x: b3 U7 r, d d
6 J& s; o3 k+ V7 F$ u5 _
Here is one example from the file "Haspinst.exe" which is the dongle HASP& o. ]0 `7 A0 w& X9 ?% [& t; g
Envelope utility use to protect DOS applications:
; V9 d& B! C" H; K" j; }+ P
( H1 V( a! }: O" |+ d' A/ T1 I$ ?7 x# g- h( k
4C19:0095 MOV AX,0911 ; execute command.
6 `3 z: P' d- b# @+ U4C19:0098 MOV DX,[BX] ; ds:dx point to the command (see below).$ V- p1 k/ Y1 ~& v' k4 G$ H
4C19:009A MOV SI,4647 ; 1st magic value.
! a1 p: Q9 x$ w Z4C19:009D MOV DI,4A4D ; 2nd magic value.
9 M Z" j& C1 v" |% H( c" e. {4C19:00A0 INT 3 ; Int call.(if SIce is not loaded, jmp to 00AD*)
" X1 j* R1 M% t& y$ h; p# E4C19:00A1 ADD BX,02 ; BX+2 to point to next command to execute0 a1 [4 T. e/ s/ \! f
4C19:00A4 INC CX
9 ~4 y8 J, C% R/ ]4 {! S) W4C19:00A5 CMP CX,06 ; Repeat 6 times to execute3 Q2 i1 B! x, a( b% T
4C19:00A8 JB 0095 ; 6 different commands.
1 i' T% n& Z- s, u+ H* N4C19:00AA JMP 0002 ; Bad_Guy jmp back.
" _2 P% B6 X6 u4C19:00AD MOV BX,SP ; Good_Guy go ahead :)
5 x0 ~6 y& h: Q' A) V3 r
) i( E9 G* P$ Z8 N5 _! ?7 mThe program will execute 6 different SIce commands located at ds:dx, which
1 [1 V# L n5 Uare: LDT, IDT, GDT, TSS, RS, and ...HBOOT.; o0 l- m1 y9 W5 I2 N
" C3 ^0 U* g u+ N
* the "jmp to 00ADh" is performed via an SEH if the debugger is not loaded.* ?# K1 }. y, G- X& a7 s
___________________________________________________________________________
4 V8 `* ]7 H. T1 p( v
& e! I6 E) [* E% ^( @4 R) x7 r8 ~( v5 E& c4 }4 o5 P4 l
Method 03 ~1 t; p1 J) [0 v
=========
% k$ o( N3 K8 I+ f+ B: q; L6 C4 O3 \# X# M3 |3 C) ^, z
Less used method. It seeks the ID of SoftICE VxD via the int 2Fh/1684h
/ }1 ^3 }% Z ?; Q" t0 R(API Get entry point)" @9 `1 b5 _0 `! w0 [' a( B$ F
1 ?, p) X1 f) [- O$ P
$ }8 S& F! {0 \* [
xor di,di
# l# E9 h; {" _1 J mov es,di$ Q8 m2 @) Y6 c/ G3 c
mov ax, 1684h
7 _ `- v; B1 r- T) d x mov bx, 0202h ; VxD ID of winice6 ^- f% z, }* m6 G* ~8 C
int 2Fh: x# v7 p" I. M4 T
mov ax, es ; ES:DI -> VxD API entry point* [0 s0 r5 D$ @7 `
add ax, di- M) y$ O5 Q- }, s8 f& m. U
test ax,ax# c: @2 D+ q+ \. H0 w, x
jnz SoftICE_Detected
5 q4 Y6 F8 V& r1 `' \( F! S
# B' v/ q. h' D- S4 m3 B3 U- @___________________________________________________________________________
0 |& P. |( L+ s. ~1 e- {4 L2 a; U' N; ?
Method 04
4 B8 L$ R$ y/ r$ E+ B$ E=========
3 \' Z; [" V; w( d7 O( t y, ]1 X
Method identical to the preceding one except that it seeks the ID of SoftICE
2 s' Y/ \# i. C3 k; s5 vGFX VxD.( S1 r: s" N* R0 o
; m& M ], M# }; @ xor di,di9 L+ b2 N+ ^4 F# T) F! B
mov es,di
5 T1 h I7 @. o( A* _" H2 i. } mov ax, 1684h # N. @9 O$ ]# p
mov bx, 7a5Fh ; VxD ID of SIWVID
7 p7 z" M& l6 o+ D5 ?( F int 2fh6 L% f) c! ~6 g0 A- O/ i# ^" d! U
mov ax, es ; ES:DI -> VxD API entry point
; y$ _, d2 W' ?: M& q add ax, di
+ N' I7 I4 \1 s+ | test ax,ax( j/ I Z% F2 K- D- k
jnz SoftICE_Detected9 F4 c0 f6 W, T/ |, \
! ?' r) c K$ O) e" N& @5 h1 |
__________________________________________________________________________+ W* i- o9 K2 K$ X1 F6 H7 H
5 i" W; y' ]3 A, P. b6 s. c* g
9 [# d# c/ a; A" t) O. O# t: m
Method 05+ L' X" H2 e) L0 |! H9 H/ U
=========4 \+ S+ D& K& s- ?$ l
' l7 S: B( _ r( B! B( L
Method seeking the 'magic number' 0F386h returned (in ax) by all system
/ p ~. k) W; Qdebugger. It calls the int 41h, function 4Fh.
2 \4 R" o: y2 Q1 x8 Y# ^3 i) K1 aThere are several alternatives.
$ e' J6 }0 l& m w k' C. X+ }7 o8 H& H u
The following one is the simplest:! @ e& n ?8 _
+ u# |# X6 Q: {. i' Y& ` mov ax,4fh
w7 ]' ?5 q$ K int 41h
, N7 I( Y5 C$ y) ` }' I% ]7 ?5 w cmp ax, 0F386! i0 ~5 w- l T% x1 c( A1 P9 D
jz SoftICE_detected
2 z1 U* ]: S. o( o9 o' L
0 Z; K( }! y1 b
+ i# p- u% N, l( T0 @" J% y: h& nNext method as well as the following one are 2 examples from Stone's ; W( j% @ i! L. j5 S7 U; ]
"stn-wid.zip" (www.cracking.net):
/ l* Q3 P7 L2 _* K7 S1 D9 ~
( X1 u, u/ C8 O8 q mov bx, cs
4 P" ?, U/ z7 N6 k lea dx, int41handler2' {( @+ s! {3 `, N) \1 Z, q
xchg dx, es:[41h*4]
) Z7 m! u X% \8 O7 w4 k xchg bx, es:[41h*4+2]4 P+ m3 N& w5 s, Y' m
mov ax,4fh
0 D+ E7 Y I" x( u int 41h3 O- K; F; c! e* t( i
xchg dx, es:[41h*4]+ K8 R& \9 q$ u7 E; c5 k' k
xchg bx, es:[41h*4+2]
; |8 m5 Q/ ?4 n- A; o cmp ax, 0f386h
6 e: s( c! r0 m jz SoftICE_detected
, m1 V9 s$ w0 Y+ ^6 J4 l5 K
! H$ X, `7 h, Zint41handler2 PROC& S5 s- Y4 N! |. w+ H, G+ E
iret
/ u8 y4 }" p+ c1 [0 a0 J2 i4 Rint41handler2 ENDP' E% r1 \/ R, V
/ b- L: U4 w& F5 O$ w5 o8 K9 P! M6 J0 Q% l, f6 Q# x
_________________________________________________________________________ ~5 ]3 A- Q% s( @' q
- I- b7 B$ B; d* Z( f6 Z0 O% W
+ P) y, J4 o4 _# }1 H5 jMethod 06
% y( H' H) S* G( k6 C+ ^=========
, B, W2 H/ q) i& [( K3 z# T; o' V) }% M! E
$ i- |. V; h& e% T6 s
2nd method similar to the preceding one but more difficult to detect:
5 C+ a) L% E0 a+ o; a( F& X3 A" F; T6 b
& P5 h3 F; H3 m9 s$ Uint41handler PROC% p" l6 B! X+ V+ j
mov cl,al" C8 P8 t8 s7 t
iret
* H+ N/ X: u0 ^# q: P% iint41handler ENDP7 [, U/ j) _8 t2 B; Y( Q1 L9 m
" {, h* p' N6 E3 l& x3 M) N
6 E( B- s. D# {( L- p xor ax,ax
' l F+ C7 A: o& |! D* M mov es,ax6 X2 L7 w d- ]9 f
mov bx, cs& `. e% y# `4 l$ [2 N# S
lea dx, int41handler
* Y! h: n7 S9 _1 d6 C/ ? xchg dx, es:[41h*4]5 v1 h# y) G* I2 V0 |2 K
xchg bx, es:[41h*4+2], m/ C4 e: N' H3 V) a e; ~
in al, 40h) l) ^* l( P7 J' }
xor cx,cx
) u: T5 Y; A; I( ]# B2 Z3 Y: q# D int 41h T" G9 b' \( R* Q3 x8 u) k. G
xchg dx, es:[41h*4], Q* l3 x+ i0 y( @6 @ L5 I9 J
xchg bx, es:[41h*4+2]: F5 X. r: l- M) x; q
cmp cl,al% d- E( m3 m! z
jnz SoftICE_detected K0 q0 H5 d# |, c" M% \& t1 |( `
( n$ R: l' F B! R
_________________________________________________________________________
# N3 A; v) @1 j1 w
' X, w; O5 p1 Q1 @5 ^6 |9 C3 t9 wMethod 07
' J! D1 O6 O! S, O! I=========) x* ~9 h- j* \" c- @+ A
4 `) D' z5 z# \( v. K/ k9 }Method of detection of the WinICE handler in the int68h (V86)% ]+ S! e& V' S! u% v) `& q9 `
' E6 `. h7 Y+ ~% i2 |( } mov ah,43h
4 f5 T3 m$ H" ^$ v int 68h. I3 D" @$ R k
cmp ax,0F386h. T h7 ?' s& u, J1 G0 v; l: E
jz SoftICE_Detected. x- g2 X5 k- u6 Q
) [( n- u4 y+ Y# Q5 x6 R" \. c+ l3 N$ |* e. H
=> it is not possible to set a BPINT 68 with softice but you can hook a 32Bit
5 a" e# b- N/ h e- ` app like this:- w. D; m5 _, v/ x4 H+ d" I
9 G, f& k8 d7 A- i7 H; o BPX exec_int if ax==683 K/ Q6 X) [4 B! \1 E
(function called is located at byte ptr [ebp+1Dh] and client eip is
$ |1 m i* X: w; T$ p8 N" D, O located at [ebp+48h] for 32Bit apps)# d6 w5 s; z- O! ]! j
__________________________________________________________________________* Y" \9 l0 _/ e$ i
g3 r. s+ L8 d; ]) \; Y
/ v5 _, p4 }2 P2 \5 \9 c1 sMethod 08
# `) _+ ]. ~9 D+ c; R/ V8 u! ]=========# y0 ?" I* s/ p- k3 w7 \
+ k3 I, F4 N9 [It is not a method of detection of SoftICE but a possibility to crash the. o' R7 \+ Q6 a6 d) m P
system by intercepting int 01h and int 03h and redirecting them to another: [3 m( Y0 Z7 I4 h4 C% y" |
routine.9 {- A( f% ?' R# e D% e) J
It calls int 21h functions 25h and 35h (set/get int vector) and ds:dx points$ X! p: ~7 ` t7 N- B$ I' B
to the new routine to execute (hangs computer...)7 i9 u% L4 O- g) U) O
5 k+ E9 | V% `* A mov ah, 25h
. c6 [$ e6 B( i+ @3 ?' X mov al, Int_Number (01h or 03h): M j) o$ U+ z5 W* ~) M0 D6 c: ~
mov dx, offset New_Int_Routine
" q8 O; J6 E5 E t1 B& e$ u int 21h
2 ~" r( }0 r" X4 F0 n8 s, T6 X) v& \, n' n" V
__________________________________________________________________________
6 D' h/ i- E7 f, z: m* L9 p8 F7 x0 L2 b U
Method 09
" S5 W, j& [# U- D/ |8 k" t=========
9 ^: b! z# S; s
9 D f; a8 x& s/ C* |6 w; ^) tThis method is closed to methods 03 and 04 (int 2Fh/1684h) but it is only5 G3 Q' z+ r6 X; o; k
performed in ring0 (VxD or a ring3 app using the VxdCall).
+ F6 i- x8 e' n8 Q9 s! cThe Get_DDB service is used to determine whether or not a VxD is installed
3 c' U8 `# F, J: f2 e& t: |3 g% Tfor the specified device and returns a Device Description Block (in ecx) for
3 u) n! @3 b! S' _& Z% n, U8 hthat device if it is installed.
9 \6 n: R6 n* q* ?9 ] }7 B' k0 T( O
mov eax, Device_ID ; 202h for SICE or 7a5Fh for SIWVID VxD ID9 f# d0 K* P7 y+ w
mov edi, Device_Name ; only used if no VxD ID (useless in our case ;-)* s( ^+ z& k u9 L, i! `
VMMCall Get_DDB* N/ f( ^# R; `$ w( D( ~0 {
mov [DDB], ecx ; ecx=DDB or 0 if the VxD is not installed% g8 {6 j! v1 s
2 N0 q7 \. I2 G
Note as well that you can easily detect this method with SoftICE:' E+ B# [' c: W" o
bpx Get_DDB if ax==0202 || ax==7a5fh
0 v! f- \) T' Z/ ~
5 l7 A- ~1 @4 V% R! n__________________________________________________________________________
5 `8 }( [; ~, \* p
' N/ K; ?: b6 f2 A+ M7 `Method 10
8 L2 G0 n4 E) ?. s+ o; ?, X$ n=========8 t; v( P1 ^# u7 H
- v- g& @7 d/ k* x/ V
=>Disable or clear breakpoints before using this feature. DO NOT trace with) Y+ S: h/ i: m. _3 b
SoftICE while the option is enable!!. t. p( R5 ?! Z. X1 ^% {
) l G, A1 p/ F1 U7 fThis trick is very efficient:5 I) A1 t% O1 M @& C
by checking the Debug Registers, you can detect if SoftICE is loaded
+ U0 V) r" W5 z; v(dr7=0x700 if you loaded the soft with SoftICE loader, 0x400 otherwise) or if
) D9 D9 R# \5 t/ N: M- P6 Athere are some memory breakpoints set (dr0 to dr3) simply by reading their
- F5 i8 q$ F4 s8 [4 a2 d* e& yvalue (in ring0 only). Values can be manipulated and or changed as well3 ]% P3 {) J, z. N" `
(clearing BPMs for instance)# z f# x$ _3 U
# ~9 y' J4 R# u__________________________________________________________________________2 ~3 f0 x! L/ |& z
* g3 U+ B ?! @; k. y% D. }
Method 11
$ u/ K9 M6 ?' e; r4 G K=========8 R: k: L/ O( R6 s/ U& D" Z3 A
+ o4 _4 q- l( ]$ J2 x7 R! GThis method is most known as 'MeltICE' because it has been freely distributed
3 x9 w3 z2 q9 gvia www.winfiles.com. However it was first used by NuMega people to allow0 H& p+ A# t$ z# j; f' H
Symbol Loader to check if SoftICE was active or not (the code is located
5 m! o$ e* }1 T# o& j: ginside nmtrans.dll).
! j' Z% v1 @/ B* y1 a; r X
/ O1 t4 W: K# pThe way it works is very simple:
7 ?* J) G# z& \' ]+ C# z+ iIt tries to open SoftICE drivers handles (SICE, SIWVID for Win9x, NTICE for+ f6 m) A6 t4 O
WinNT) with the CreateFileA API.
! b7 F# m! W8 {% ]: }+ _2 E; x* g0 m
Here is a sample (checking for 'SICE'):& l' Z2 q2 B G( y9 Y
, d( `" `# }5 e+ L: r
BOOL IsSoftIce95Loaded()
1 B; F1 a3 e& ^/ U{
8 O/ p2 e2 g% k; n$ w. l, w7 C) p HANDLE hFile; ) T0 P, Q/ h, c' k5 Q m3 Y X
hFile = CreateFile( "\\\\.\\SICE", GENERIC_READ | GENERIC_WRITE,3 Y3 t5 a J. j4 n9 j
FILE_SHARE_READ | FILE_SHARE_WRITE,
4 f7 d* D4 G" e' ~( } NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
" ~7 O$ ^$ s, { if( hFile != INVALID_HANDLE_VALUE )- h2 F( {8 e1 W9 g, j/ p
{
, b, g6 g& S0 d: F* u, |+ } CloseHandle(hFile);
8 o* E; v [7 R+ N* w3 G return TRUE;+ ^. Q, L( c! t7 r$ o O' a p
}
# T4 f% m% B; c7 v0 z return FALSE;
/ O4 Q( s- @5 E# n9 [0 a- i( l% [; E}
1 _8 H$ K5 R8 g2 |% g
+ A% L) K H' n2 t9 s2 {2 oAlthough this trick calls the CreateFileA function, don't even expect to be
5 B; D- \. _' e7 u$ n% eable to intercept it by installing a IFS hook: it will not work, no way!5 ]$ U8 n3 C. N) U3 j
In fact, after the call to CreateFileA it will get through VWIN32 0x001F! }9 h5 ~4 f& d/ D# v8 X/ ?# D
service _VWIN32_ReleaseWin32Mutex (via Kernel32!ORD_0001/VxDCall function)
3 K4 c# o9 ]1 L0 g) o( p: Rand then browse the DDB list until it find the VxD and its DDB_Control_Proc
0 e# H! ^. ]( y5 I V5 tfield.
( l; z3 q- H# X$ I$ J- F/ nIn fact, its purpose is not to load/unload VxDs but only to send a 2 w+ ^9 S0 F* ]
W32_DEVICEIOCONTROL (0x23) control message (DIOC_OPEN and DIOC_CLOSEHANDLE)0 `: P4 s9 A3 r7 X
to the VxD Control_Dispatch proc (how the hell a shareware soft could try' [! d, \0 ], R# }# t7 {
to load/unload a non-dynamically loadable driver such as SoftICE ;-).
; @+ \: Q! F" T s* O, ]: n3 ZIf the VxD is loaded, it will always clear eax and the Carry flag to allow
4 z8 ]; i G& \- Z" Lits handle to be opened and then, will be detected.; [. |* P F7 r! \' n7 J- ~, H
You can check that simply by hooking Winice.exe control proc entry point
" D- j6 X5 M) k% T# t2 pwhile running MeltICE.; T5 V( T6 X& w" h( @1 u1 _: c
) q% H2 I- g1 H: s# J Y! v) k7 e, U: A$ O) @
00401067: push 00402025 ; \\.\SICE
1 N, n) ], i" l4 V 0040106C: call CreateFileA6 _9 N$ m0 ` u0 |
00401071: cmp eax,-0011 ~" O9 t# `2 m
00401074: je 00401091; n% a7 S3 z' x f) B! w+ `
( I# m; c: T4 X0 z1 U
9 y) V+ m* F6 tThere could be hundreds of BPX you could use to detect this trick.
- h8 ?3 D# N5 i1 t6 L, [-The most classical one is:
; {3 i( ?) |4 u1 _ BPX CreateFileA if *(esp->4+4)=='SICE' || *(esp->4+4)=='SIWV' ||1 R" ^+ Y K7 U- P7 l5 f
*(esp->4+4)=='NTIC'
4 M+ D# Y0 ~4 a. N# W* y6 u. F% v1 D1 x
-The most exotic ones (could be very slooooow :-(
, R* F$ @& T, o/ U9 E$ y BPINT 30 if eax==002A001F && (*edi=='SICE' || *edi=='SIWV')
1 Q& m/ i: Q8 i; Q0 { D% `9 ^. o ;will break 3 times :-(
6 M9 D$ C1 C+ d. W. C8 T- E3 z# \* o% Y; t
-or (a bit) faster:
) K+ E' ]3 I2 r: s# W BPINT 30 if (*edi=='SICE' || *edi=='SIWV')
7 k( u; @! ^: l& Q4 D4 Y/ A" I- e5 ^' f, L6 N; E4 ? r
BPX KERNEL32!ORD_0001 if *edi=='SICE' || *edi=='SIWV'
' f5 c" y" f" N- L6 g3 k ;will break 3 times :-(
0 j" g, u" V* z! D3 f; V
, w" ~/ J% v6 r+ G* t-Much faster:2 e5 E6 x7 U' F) ^" U
BPX VMM_GetDDBList if eax->3=='SICE' || eax->3=='SIWV'
; F% w0 C0 O A9 i& c+ B6 s6 W& `2 z8 B6 M4 ]7 q
Note also that some programs (like AZPR3.00) use de old 16-bit _lopen
" y; T d" T4 K* F4 }% `, Qfunction to do the same job:- x. ]3 x5 r. u8 K. S
& y! a7 \& Q9 G, A& n+ x
push 00 ; OF_READ- K" ~' f2 j6 K. ^) ^9 ?& P
mov eax,[00656634] ; '\\.\SICE',0
( R2 ^* B8 D/ _# \2 T: O% @! H: | push eax# c/ {- r& t4 X, |$ e/ ?4 k* {4 ?
call KERNEL32!_lopen( M H) F" h% }2 R& N( q3 D
inc eax) O* S! F% p6 u" V/ @; ^( y
jnz 00650589 ; detected; k9 Q- ~; o/ L% G
push 00 ; OF_READ
5 Q, S8 J- P! M% n, S2 b; | mov eax,[00656638] ; '\\.\SICE'* C+ N7 t- h2 T' N0 ~5 y& X
push eax" d. ^- n1 H: u- y* x& ]
call KERNEL32!_lopen3 J- X$ I8 c5 E3 y) E- K5 j2 Y" y3 b
inc eax
& U( k. \& s! d7 u$ F" ?6 k4 K$ R# } jz 006505ae ; not detected
2 E! \' Y ^" e$ V
' s% b. a/ }: v& z* k
( t1 X, s5 h+ ~, j8 Z5 W" e__________________________________________________________________________! w( u. |. f% p, i% m
2 f0 b) \3 m. V; G2 I0 ~6 @& ?, jMethod 126 \! O! @/ j; x# l+ l) }4 S R
=========
' m( t0 l) \- x" A% T- P, T X9 \' T% h8 T( Z- ?# H
This trick is similar to int41h/4fh Debugger installation check (code 05
1 q# \6 c" l: F& 06) but very limited because it's only available for Win95/98 (not NT)$ R1 z4 p" }% K% l
as it uses the VxDCall backdoor. This detection was found in Bleem Demo.6 D V2 A: ~$ N% r: s: p* d8 |9 E& \
7 X" t- h# P6 Y, L9 N. J1 M4 @. H, F9 K
push 0000004fh ; function 4fh
2 e! w: F+ E3 m9 D9 [7 C6 \ push 002a002ah ; high word specifies which VxD (VWIN32)/ e( Y% \& ^9 q5 N* |( g* x
; low word specifies which service) f: ^; B& I; `* a5 C4 _* l, ~! _
(VWIN32_Int41Dispatch)0 I3 Y' l J2 \+ f% y/ v8 |/ D
call Kernel32!ORD_001 ; VxdCall/ T% L# p/ ?: [4 d. `
cmp ax, 0f386h ; magic number returned by system debuggers
* q" q. P" B2 j" ~( t jz SoftICE_detected
9 h" S" d p" N8 j& |) G. E( W' w1 b
Here again, several ways to detect it:
5 ~0 G) {6 ?" c' O# B
7 i& z0 S( u0 K$ q BPINT 41 if ax==4f
& H% x" j9 t2 L- y: [2 F- p
2 k) |4 E: ?3 L+ a BPINT 30 if ax==0xF386 ; SoftICE must be loaded for this one
9 \6 M @0 S& Q9 w' }( h* c' v' U
BPX Exec_PM_Int if eax==41 && edx->1c==4f && edx->10==002A002A
/ a* b) C; j; i% V+ M
% `8 b b, o \ BPX Kernel32!ord_0001 if esp->4==002A002A && esp->8==4f ; slooooow!3 X& a2 |; l. ]' N$ |* `
- V+ L- a2 G) `" N. }5 D; f( w
__________________________________________________________________________
. H) o5 @$ s( n) U3 [. f3 @. D9 C u
Method 13
2 c( J$ r" o# T0 r6 I* S& C, B( a=========9 F) ~" M4 r1 d9 P# H+ o& g3 C" l
8 U0 w$ \5 O; C$ b0 a9 ^" y
Not a real method of detection, but a good way to know if SoftICE is
; J7 {' }# B9 U D/ T) j% ninstalled on a computer and to locate its installation directory.6 {: d+ y6 n3 ?1 j* U
It is used by few softs which access the following registry keys (usually #2) :7 R5 U3 z: `3 J% N
$ h# s, r- ]+ w-#1: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion
# q/ {) a, z& ^. D5 w+ Y\Uninstall\SoftICE
^- c7 J7 N( U/ g4 k-#2: HKEY_LOCAL_MACHINE\Software\NuMega\SoftICE4 G* ]& p* t2 `4 j$ e1 X- ?$ a4 {
-#3: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion+ ^! V6 K: j5 a1 h
\App Paths\Loader32.Exe
* @4 W7 b4 V3 K {1 P) X$ B, Z# }. U( e( `! a
" s1 ]: ]$ Y, E. v w
Note that some nasty apps could then erase all files from SoftICE directory
( s* M& I3 [" `: L3 V- U(I faced that once :-(! ]; t% D: e4 U9 [, M2 p
6 Y% L* f4 d! q6 @1 J) T
Useful breakpoint to detect it:5 t }" H4 K- X0 ?
5 o9 ^' } b, Y2 r
BPX _regopenkey if *(esp->8+0x13)=='tICE' || *(esp->8+0x37)=='tICE'% z. W4 W/ ?2 c. t8 l [/ P
5 q* V# }) Y0 d4 u' ___________________________________________________________________________
& U# H9 q. g/ Z3 ^% f/ R* R. i. ?
+ V8 K, i; Y& h/ s$ w+ a W0 `! c. {. R+ F' m5 E
Method 14
/ }; y- M& q3 }0 D! t9 r$ |=========3 b, n) p, D; n7 Q
# c2 ~* V( _" {* m/ W6 \5 y& E+ @
A call to VMM 'Test_Debug_Installed' service. As the name says, its purpose
" g$ d3 H2 a q4 \: h6 ]% ]3 C2 p5 E, jis to determines whether a debugger is running on your system (ring0 only).
$ J$ T7 t- i% B5 ]8 ?" D- J: L2 ]
VMMCall Test_Debug_Installed
1 }+ J. ^3 N8 K9 M- H je not_installed, B" {6 S/ |6 E+ f* ?% ]0 l
! ~9 i7 i1 C O- L# E( o2 y
This service just checks a flag.& c& |( \ e! ^: {1 z; L
</PRE></TD></TR></TBODY></TABLE> |