上一篇 | 下一篇

多款杀毒软件存在严重漏洞可让黑客执行任意代码

发布: 2008-4-30 13:19 | 作者: 快乐天地 | 来源: www.2getherhappy.net | 查看: 4次

★快乐天地★超门户1V4u0~6X%sk

感谢AYANAMI REI的翻译。Core Security Technologies - CoreLabs Advisory★快乐天地★超门户US|W;^!k)t
http://www.coresecurity.com/corelabs/
★快乐天地★超门户yWP_o!s

★快乐天地★超门户 MNAcz7T9G

 

+jsU,LN@T★快乐天地★超门户7@;_ sGil

对多款杀毒软件和防火墙的SSDT Hook函数的参数验证不严
q'B5[*m1P.`'Q*报告信息*★快乐天地★超门户a FBb$vTq

uM lanJ8o!F标题:对多款杀毒软件和防火墙的SSDT Hook函数的参数验证不严★快乐天地★超门户KCW3r ]JD J \
报告ID: CORE-2008-0320★快乐天地★超门户Cb5wZXK1b9U
报告URL:http://www.coresecurity.com/?action=item&id=2249★快乐天地★超门户@T4dR b!os(g(b$ZwG
发布日期: 2008-04-28
p)i1HdXw最后更新日期: 2008-04-28★快乐天地★超门户)?kL-NY'dA
包含厂商: BitDefender, Comodo, Sophos和瑞星
v2og8qEUR] Xg$L发布模式: 协调发布(BitDefender, Comodo, Rising), 用户发布 (Sophos)★快乐天地★超门户B*H;]ow Hd0jl
*漏洞信息*

6qZ}p4pam2QPn

:p B}3V0M7w$ZC类别:无效内存参数★快乐天地★超门户3xt*|J8L:S
可远程利用:否★快乐天地★超门户.k"}xL(o3e
可本地利用:是
&T.Y2NhilJY'Q-C6IBugtraq ID:28741,28742,28743,28744
p(F&O$m'VZ+@n:^7IuCVE 名称:CVE-2008-1735, CVE-2008-1736, CVE-2008-1737, CVE-2008 -1738★快乐天地★超门户9z)eb5kB$o@?8G p}
*漏洞描述*★快乐天地★超门户I#fO@zq;@:@s E"}

*Yd{m{通过对多款杀毒软件和防火墙的(BitDefender Antivirus [1], Comodo  Firewall [2], Sophos Antivirus [3]和瑞星杀毒软件[4])的SSDT hook 函数的粗略检查发现可以导致拒绝服务(DOS),并可能执行代码攻击。 攻击者利用这些缺陷可以本地重启系统,关闭防火墙和杀毒软件保护。然 而,很多情况下它可能利用这些bug导致在特权内核模式下执行任意代码 。
c jYOtB
]e Hh4S5RPZc*漏洞影响版本*

~0fAlF)p★快乐天地★超门户_lR#HZX M+`

. BitDefender Antivirus 2008 Build 11.0.11
AK r+O"wa4J5g:rf k0z. Comodo Firewall Pro 2.4.18.184
s(c%kde3o. Sophos Antivirus 7.0.5★快乐天地★超门户[ Hv0fg+x)a*hzo,Dq
. 瑞星杀毒软件19.60.0.0 and 19.66.0.0
6M*D+g:i ?5R. 旧版本未测试,可能会被影响.
NaFR lw)hW:Pm2M*不受影响的版本*

*U%g{,H@★快乐天地★超门户;fd)R)YPT;K/b/w

. BitDefender Antivirus 2008版本可以通过自动更新更新至一月18号之 后的版本
d$RF9SppB w;B. Comodo Firewall Pro 3.0
5goOmJEH m:W. 瑞星杀毒软件20.38.20★快乐天地★超门户5]3yK&] d Ea
*厂商信息,解决方案和其他*★快乐天地★超门户.xN*_(Lz_OJ

cZ~:Qn n2l,Z*{(A.}|1) BITDEFENDER ANTIVIRUS (BID 28741, CVE-2008-1735)★快乐天地★超门户/~#id,ZE)H^CZ

$d-N0r6s'S根据BitDefender的说明,这个缺陷尚未被恶意程序利用,并且可通过自 动更新修正。这一问题的信息可以在BitDefender的网站上找到:http://kb.bitdefender.com/KB419-en–Security-vulnerability-in- BitDefender-2008.html★快乐天地★超门户#S3G){d5r5RQ
2) COMODO FIREWALL PRO (BID 28742, CVE-2008-1736)

P5K;j#[l0OZ★快乐天地★超门户 T4T!d+ir8^-k!^5F|

这个漏洞在Comodo Firewall Pro 3.0中被修正,新版本在http://www.personalfirewall.comodo.com/download_firewall.html下 载
h1T0j(m K3) SOPHOS ANTIVIRUS (BID 28743, CVE-2008-1737)

3nu3~LY★快乐天地★超门户+D5Jwv6Xe\

厂商声明:“在windows 2000,2003和XP下的Sophos Anti-Virus 7.x将 会受此漏洞影响。”不受影响的SOPHOS产品包括早起的SOPHOS windows杀 毒软件,SOPHOS飞windows平台杀毒软件和其他SOPHOS产品。★快乐天地★超门户2hc @&r.X

t Mh3te+Ki{.u这个漏洞只有在实时行为分析开启状态才可以利用。它需要用户将web浏 览器的安全设置调整到默认级别以下或者允许从网页上启动ActiveX或 Java Applet。

(IR nxD P"z(B

/p-w_GMm2eq^可以使用以下方法避免漏洞被利用:★快乐天地★超门户4Q TAXD-T'UQC0CE

'Gpl0S.m2FOea. 使用默认的安全设置或较高级别的最新版本Web浏览器。作为通用的安 全管理,我们不建议用户下载ActiveX或者Java Applets,除非你信任他 的内容。

2lygNq6[)b

1HiGwR|:ML$Vb. 关闭Sophos Anti-Virus的实时行为分析功能。(用户仍会受到Sophos 行为遗传分析和其他方式的对抗恶意软件的保护手段的保护。)★快乐天地★超门户]F$j'w W-[r?

★快乐天地★超门户$v/^"c2j6lqM

N.B. 如果攻击程序被放出,Sophos将会部署保护以对抗攻击程序。

{Dv1Its9l

:T8J4wuta^漏洞的修复需要用户重新启动终端。鉴于为非紧急漏洞,为了尽量不打扰 我们的客户,Sophos将会尽早的在一个需要重新启动的产品中包含这个修 正。
7C4J cN-})sZV4) RISING ANTIVIRUS (BID 28744, CVE-2008-1738)

WHV8NMh#E?xa★快乐天地★超门户rexx;g~

瑞星杀毒软件的修正版可以在http://rsdownload.rising.com.cn/for_down/rsfree/ravolusrfree.exe下载

8ld4Uw'yCRV$J'W~★快乐天地★超门户f l T s n7j#wJ

所有的瑞星用户都可以通过自动更新更新到修补过的版本。★快乐天地★超门户6|4e|;P*~N}+A7b
*荣誉归功于*

,q3g+Jcusu

']3?Y/`)R-o0P这些漏洞(除了瑞星)是被Core Security Technologies的Damian  Saura, Anibal Sacco, Dario Menichelli, Norberto Kueffner, Andres  Blancoy Rodrigo Carvalho在bugweek 2007时发现的。瑞星漏洞是被Core
W,@v[A A UR\Security Technologies exploit writers team的Anibal Sacco发现的。★快乐天地★超门户~/H ["{:D2gy9T0tl
*技术描述/poc代码*

%y?q'z9b(z+?j★快乐天地★超门户R9~n'V!je

我们发现BitDefender Antivirus, 瑞星杀毒软件, Comodo★快乐天地★超门户3j \v+B7W6Vp{-rxF$@
Firewall和Sophos Antivirus并没有在使用hook函数时验证参数,导致程序试图转向无效内存,导致BSOD(Blue Screen of Death)。

/oWPIV

R-{|K8j K在我们的测试中,我们使用了内核hook探测工具BSODhook [5]去寻找任何形式的未被充分验证的SSDT hook参数。从Matousec的文件[6]:

y4I8["T Z:v~dp8Y

,k)v&WIF,@“Hooking kernel functions by modifying the System Service Descriptor★快乐天地★超门户r7HJhc4Cq-n
Table (SSDT) is a very popular method of implementation of additional
4aTuY)F0t"psecurity features and is used frequently by personal firewalls and other★快乐天地★超门户 p,fa'~*_9X!G
security and low-level software. Although undocumented and despised by★快乐天地★超门户 Juh~y} t
Microsoft, this technique can be implemented in a correct and stable
.X/Ny5YBQ[Q SRway. However, many software vendors do not follow the rules and★快乐天地★超门户1|k&O bQ7Z o+u
recommendations for kernel-mode code writing and many drivers that★快乐天地★超门户vUe?9ujbX
implement SSDT hooking do not properly validate the parameters of the★快乐天地★超门户1q@G }n,@ufZ
hooking functions.”

-B_|mm)bcyd★快乐天地★超门户 t#La*yY[Vu

“Hooking SSDT functions requires extra caution. SSDT function handlers
&T"Q.}9Y!U1eare executed in the kernel mode but their callers are executed in the
Oo.knKI8?(xFuser mode. Hence all function arguments come from the user mode. This is
n u.K2Pr1hdwhy it is necessary to validate these arguments properly. Otherwise a★快乐天地★超门户'R:e L+_8x?E6U+]`7`
simple user call can easily crash the whole system. This bug usually★快乐天地★超门户 P8H0L!P oH hd9i/M
results in a system crash. However, it may happen that this bug is even
g[UG ?OMJmore dangerous and may lead to the execution of an arbitrary code in the★快乐天地★超门户by5a(gX0O$o7fl
privileged kernel mode.”★快乐天地★超门户Rz;n h3Wf2qd"o

5MA4J a9idRQ[A local DoS attack, despite not being a very sophisticated intrusion
0O!bxxr-B EH;i(tattack, could be used as an accessory under several scenarios. It is
{"o9pC?commonly used by viruses as added feature, when the specific AV is★快乐天地★超门户 n5Z@`%i ]'`_cM b*f
detected on the infected machine, crashing the system just to annoy. Or★快乐天地★超门户8x6g4_'a ^\,V
by a human attacker, after a succesful remote intrusion with★快乐天地★超门户 E\8Xqse fgH.a o
unprivileged credentials to make a computer resource unavailable to its★快乐天地★超门户(_yyY:f+e"k
intended users. Besides, this could be a very valuable resource when
3i ff.C*s S-i|trying to fake some service that answers broadcasts request like a DHCP,
f4LHc5C \Qallowing to start the service in another location replacing the original
6h p5P*W+t$dmone.★快乐天地★超门户(\]#L*d qt*kz2a?p

★快乐天地★超门户+j:d1?9qAc

1) BITDEFENDER ANTIVIRUS (BID 28741, CVE-2008-1735)★快乐天地★超门户"a:t,W6Z9_q-zfeL+C

3XB b5f U8U_!c z g ^BitDefender fails to validate the pointer to the ‘CLIENT_ID’ structure
Ks&o } z%Pprovided to ‘NtOpenProcess’. So, if we pass an invalid pointer, we will
x7W])Js,Vbhja:Ncrash the whole system.★快乐天地★超门户Oyb3b p#}+b

★快乐天地★超门户4}Lf!L7X%Y,f`ng

/———–

;H v Va3c As%U★快乐天地★超门户2HV)^y GT

NtOpenProcess(PHANDLE ProcessHandle,★快乐天地★超门户8c*Ck]-H zn
ACCESS_MASK AccessMask,★快乐天地★超门户:hPQ0_g5p7Y-@
POBJECT_ATTRIBUTES ObjectAttributes,
2Wb0JC0r1n-C`5gPCLIENT_ID ClientId )

zc/?$L w/I#nQPv

+B8YV+C[7R;jba.text:00010ADE push 0Ch★快乐天地★超门户5L@1XjU1{2Iqtl
.text:00010AE0 push offset stru_114E8
.|%] v[t Cwd.text:00010AE5 call __SEH_prolog★快乐天地★超门户0P;q+{8\2S'S
.text:00010AEA call KeGetCurrentThread
T4Q@X n(F'd0i.text:00010AEF xor ebx, ebx
?.zD_a2F0~8n lSd&g.text:00010AF1 cmp [eax+140h], bl
&Rn |g d He$H.text:00010AF7 jz short loc_10B0D★快乐天地★超门户E"t@`}/M0I
.text:00010AF9 call PsGetCurrentProcessId
t8QcXL+Oc*E'Q.text:00010AFE call PsGetCurrentProcessId★快乐天地★超门户W8l#W5{ \beh} \
.text:00010B03 push eax
4lSw4ZLX.text:00010B04 call sub_10724★快乐天地★超门户Fx.wL%u|4d
.text:00010B09 test eax, eax
lhWXGg-z.text:00010B0B jnz short loc_10B12★快乐天地★超门户'f"y&~ g4jc
.text:00010B0D
2MC&F1SrS.text:00010B0D loc_10B0D: ; CODE XREF: sub_10ADE+19_j★快乐天地★超门户bt;i6Z0Z"T/r;G
.text:00010B0D push [ebp+ClientId]
;[I|)Hei3S.text:00010B10 jmp short loc_10B73★快乐天地★超门户b2q.U.Z^3@%X-r\

/{pZ%N5U9Q6j [.text:00010B12★快乐天地★超门户+]1N2LKzv
.text:00010B12 loc_10B12: ; CODE XREF: sub_10ADE+2D_j★快乐天地★超门户zK;f[ p^'s*{
.text:00010B12 mov edi, [ebp+ClientId]
-}_}e"do.K.text:00010B15 cmp edi, ebx ; Little check to avoid a
-qUI_[9c G5^Null Pointer★快乐天地★超门户"pfe s_u6l

.r H^ R^?k- ———–/

'Mlpx;j? Y$['^

'|X.lt.AH4NvHere it gets the pointer to the ‘ClientId’ value, and if it is non zero★快乐天地★超门户 W:WJ2m-rEmBg'V
(’!= 0′) it does not care where it is pointing to.★快乐天地★超门户4b-D*ds3Y.H2i O#h\

★快乐天地★超门户&x;QWx$a

/———–

)} hD$\G V1k-k_★快乐天地★超门户px~o5D;nO

.text:00010B17 jnz short loc_10B1C★快乐天地★超门户f9SSy$Gk/`
.text:00010B19 push ebx★快乐天地★超门户*J/a*~t!i^y*g e;f
.text:00010B1A jmp short loc_10B73

?.k:U/Q)Q@1l l★快乐天地★超门户7v\w@0U Ve [

.text:00010B1C
/iG yv0t0wV:D.text:00010B1C loc_10B1C: ; CODE XREF: sub_10ADE+39_j★快乐天地★超门户'F.\*j2|u4]i/^H
.text:00010B1C mov [ebp+ms_exc.disabled], ebx★快乐天地★超门户/oN M z+f?i
.text:00010B1F mov esi, [edi] ; Here it crashes

l)R.[tk+X★快乐天地★超门户k JYfs2n2G5Rq

- ———–/

*a5Dj N Yj A

RGfH&U0Z6NIt access to that memory, and if that is invalid memory the system will★快乐天地★超门户DQ$?$j3Ws_zn
crash.★快乐天地★超门户\rx&[ j UX)B

Hs5a7`3r fCj/———–

{F NT0p y★快乐天地★超门户3\q;VF ~7K0ya

.text:00010B21 mov [ebp+var_1C], esi
;M|w(nqy[.c.text:00010B24 or [ebp+ms_exc.disabled], 0FFFFFFFFh
(?%T#nHi~.text:00010B28 jmp short loc_10B3B
XK/uMCNV#P.text:00010B28 sub_10ADE endp

} Te$sQe[W★快乐天地★超门户|4R1INV8] E-a

- ———–/★快乐天地★超门户6E `7uC7|)VJL

★快乐天地★超门户 jl%a%ril&E{.i

2) COMODO FIREWALL PRO (BID 28742, CVE-2008-1736)★快乐天地★超门户i*e?m[S"IMW

1ia+wYe)@`RIn Comodo there are problems in the arguments validation of
7}?4~r Q-F:hsfY7x5M‘NtDeleteFile’, ‘NtCreateFile’ and ‘NtSetThreadContext’ functions.
r7aadV‘NtDeleteFile’ receives just one parameter, a pointer to an
}d!N ?2a)Bq5i‘OBJECT_ATTRIBUTES’ structure. These attributes would include the
^@M5Ry‘ObjectName’ and the ‘SECURITY_DESCRIPTOR’, for example. This is the
;I__$T&N u&eNhook placed by Comodo at ‘NtDeleteFile’.

(_)N_E k r

$N[-p_C'C/———–★快乐天地★超门户.g%D~xz

★快乐天地★超门户f%g AO7cs_+R?0SCn

NTDeleteFile (POBJECT_ATTRIBUTES ObjectAttributes)★快乐天地★超门户J*a(B.r"m2~KxX

★快乐天地★超门户|(Q8V\j

.text:0001ACB0 push 1Ch
(J{J%M.z.text:0001ACB2 push offset stru_1E3F0★快乐天地★超门户n{Pt0a
.text:0001ACB7 call __SEH_prolog
#jtZ#CV6@ @.text:0001ACBC xor ebx, ebx★快乐天地★超门户n v;_.vZ u
.text:0001ACBE inc ebx
9~c)yy(Q3`*I1sT MQ A.text:0001ACBF mov [ebp+var_1C], ebx★快乐天地★超门户M6d(ER7ozU}
.text:0001ACC2 xor esi, esi
(e8W4[(H2[lc.|6nK(~.text:0001ACC4 mov [ebp+var_24], esi★快乐天地★超门户/T]b3R q"Te
.text:0001ACC7 mov [ebp+var_20], ebx
Nh{A$}$OW5Y*o.text:0001ACCA mov [ebp+var_28], esi
4J2X$[begbsT+q p.text:0001ACCD mov [ebp+ms_exc.disabled], esi
-Bit.J:g.text:0001ACD0 call ds:ExGetPreviousMode★快乐天地★超门户s.q3v,K7jh9~
.text:0001ACD6 mov edi, [ebp+ObjectAttributes]★快乐天地★超门户 Ihg i&X~&LK

r"rQ{`(t'L1E- ———–/

5Jn}"lYm5l,E

8g|$Z!Z-x4jI\vGHere it does a lot of ‘ProbeForRead’ checks to see if the pointers of★快乐天地★超门户P!@`b#T+v&yf6j
the structure are valid. Nice! (’EDI’ still has a pointer to the
V9][4B;};e‘OBJECT_ATTRIBUTES’ structure)★快乐天地★超门户XEzOkClK h(o

★快乐天地★超门户,n;q?;o%p([

/———–

vK%tZ5e.N★快乐天地★超门户l3AM%}6LR

….
|Q5xP oL zu!I.text:0001AD25 push edi ; ObjectAttributes
$r @Q&R\$z!@ s.text:0001AD26 call sub_1A692 ; Here it passes the
,Sl+p[fyavg,VOBJECT_ATTRIBUTES structure pointer to the next function.

%FTG[1T(z'{#S★快乐天地★超门户|)kh0U;K0R)bs"M

sub_1A692
+dP-rCR+IXw%G&D.text:0001A692 push 28h
*@n1h8s%~C.text:0001A694 push offset stru_1E3C0
_6X Ip4\*ql l7V.text:0001A699 call __SEH_prolog
:s#GWM`L7^wv.text:0001A69E xor edi, edi★快乐天地★超门户&d[6H}{B/Ro ak'@
….
T4W1~'D-@!P_/{9brH.text:0001A6B3 mov [ebp+ms_exc.disabled], edi
6U8]:c1ubx+Mk.text:0001A6B6 push 72747052h ; Tag
X jpD?5U0va5Q.text:0001A6BB mov ebx, 400h★快乐天地★超门户E`._5gwb&N
.text:0001A6C0 push ebx ; NumberOfBytes★快乐天地★超门户Hh*_Ak+k*\R
.text:0001A6C1 push 1 ; PoolType★快乐天地★超门户X9U*W2i3o?q2W7c
.text:0001A6C3 call ds:ExAllocatePoolWithTag ; Allocates memory to★快乐天地★超门户/Tx1S gRB!q0C
hold the data retrieved by ZwQueryObject
"x6e,Q;Ew?FX E4}.text:0001A6C9 mov esi, eax
R8X%I6JZ:s.text:0001A6CB mov [ebp+var_28], esi
*u)b` Qv)sl.c8Wz0].text:0001A6CE cmp esi, edi★快乐天地★超门户8t$tHlX Y
.text:0001A6D0 jz short loc_1A74F★快乐天地★超门户3A#NEIM8J H

n;]&\C0oq n.text:0001A6D2 mov edi, [ebp+ObjectAttributes]
hV ~J[Vtd:tf9m.text:0001A6D5 mov eax, [edi+OBJECT_ATTRIBUTES.RootDirectory] ;
I M:xO@"aHHere, the code retrieves the RootDirectory’s field value from the
#{-sn8~0uEstructure, controled by us.★快乐天地★超门户P.I6H\ r^:gN,]!O
.text:0001A6D8 test eax, eax★快乐天地★超门户YU+l"w;GJ
.text:0001A6DA jz short loc_1A71B

'g2eX YTv+s#W]0H★快乐天地★超门户e.f b d$w

.text:0001A6DC push 0 ; ReturnLength
c:p;n T_:zVB.text:0001A6DE push ebx ; ObjectInformationLength
}]x.dc.text:0001A6DF push esi ; ObjectInformation★快乐天地★超门户 X n#o Y\j"n0J R
; buffer where ZwQueryObject will put the object information★快乐天地★超门户(S$ks](O1a(I6ae

'? ~z+celbi.text:0001A6E0 push 1 ; ObjectInformationClass★快乐天地★超门户 I(Wk}3__ {r
; Specifies an OBJECT_INFORMATION_CLASS value that determines the type★快乐天地★超门户&J BT|"Cs
; of information returned in the ObjectInformation buffer. It’s using
o$TY:GE4D3A; an undocumented type (OBJECT_NAME_INFORMATION) which returns an
s&Ss{1v&ac-~zUNICODE_STRING structure
VL!` ~P;s*Cz%W.text:0001A6E2 push eax ; ObjectHandle
+H(|SG~'ks; Now, the user-controlled handle ‘ll be used here to identify the★快乐天地★超门户PQU%v.OV6p'@[j2rI
object by ZwQueryObject,★快乐天地★超门户x+~)No8fP s
.text:0001A6E3 call ds:ZwQueryObject★快乐天地★超门户at EG!{ X%K'b$v
.text:0001A6E9 mov [ebp+var_20], eax
#L8SJ~9H9r(V.text:0001A6EC test eax, eax
!j.]fEPGQ.text:0001A6EE jl short loc_1A746★快乐天地★超门户1ac*s:Ij#xz O)Jc

★快乐天地★超门户DY,i2? `J#jf5{

- ———–/★快乐天地★超门户-r{'LOL9`}5FeF

★快乐天地★超门户MzP5C0J;wFn

Here is where the problem shows up. The code does not properly validates
B}U#h0|m T~}6uthe data retrieved by ‘ZwQueryObject’, expecting an ‘UNICODE_STRING’★快乐天地★超门户6d|VU,k#v(R
structure. But it is possible to make multiple calls to the function★快乐天地★超门户%p6r6hsk~
using different handlers to obtain a null structure crashing the system★快乐天地★超门户 qf \&Op+l}
when the code tries to dereference its ‘Buffer’ field.

:AG9dErCe(nT3n hS

ab;ck6[Bu}/———–★快乐天地★超门户jY-@r NE5O

★快乐天地★超门户z:w*rf]@cI

.text:0001A6F0 movzx eax, [esi+UNICODE_STRING.Length]
-Aq|!mMP ps.text:0001A6F3 shr eax, 1★快乐天地★超门户'~*n;rP b,L(X'| \_
.text:0001A6F5 mov ecx, [esi+UNICODE_STRING.Buffer]
rRbqB.text:0001A6F8 movzx eax, word ptr [ecx+eax*2-2] ; Here is the problem★快乐天地★超门户7n)@6d5[X%U
.text:0001A6FD mov [ebp+var_30], eax
f(Cd-y;N ^E&iC.text:0001A700 cmp ax, 5Ch★快乐天地★超门户#w([1z&~&Mg4m
.text:0001A704 jz short loc_1A725

pj kN4b★快乐天地★超门户)T_2g!^/@:[_,~ P X

- ———–/★快乐天地★超门户pW[ Fw}

★快乐天地★超门户(}[(v0z3]i#Y

3) SOPHOS ANTIVIRUS (BID 28743, CVE-2008-1737)

~^:U3x2ot5X★快乐天地★超门户+Is.Ho!PzT

Insufficient argument validation of hooked SSDT functions on Sophos lead★快乐天地★超门户.U#OF1a3d(t]1H X
to a DoS. An attacker, utilizing this flaw, would be able to locally
LP V4DfOk/zreboot the whole system shutting down the Firewall or AV protection.★快乐天地★超门户|n7Nyl{m4|j"yV
Although neither the vendor nor Core Security has found a means of
-z D7kg'G G3jS$p.Caexploiting the flaw to execute arbitrary code, it has not been possible★快乐天地★超门户8?$X([_+_,Us
to rule this out.

4Y{I+\c%x★快乐天地★超门户KX;gR{|"H

In Sophos AV there is a problem in the arguments validation of★快乐天地★超门户K1U\%K'Kx
‘NtCreateKey’ function.

T1{ MK$dS

p4m)m:ChF:N/———–★快乐天地★超门户cw)k1D;y ?%a

B7FRK-f7kint __cdecl NtCreateKeyHook(PHANDLE pKeyHandle,★快乐天地★超门户zZT+p3DSGE
ACCESS_MASK DesiredAccess,
8n o:VE*e)yPOBJECT_ATTRIBUTES ObjectAttributes,
/y&SHa?$@H Ik `oULONG TitleIndex,PUNICODE_STRING Class,★快乐天地★超门户T+m@8C/L&lLz&Y
ULONG CreateOptions,★快乐天地★超门户-K8N&j MW]5?HF
PULONG Disposition)

-PfD:c^X7Q★快乐天地★超门户yX-Z&~!D-Q}t/}

[…]★快乐天地★超门户+a a6o*qO'NC6]j
.text:0001C01C push 4 ; Alignment★快乐天地★超门户,f n&\+RbH2I;~'@
.text:0001C01E push 18h ; Length
*kX0t GIgm G#}.text:0001C020 mov esi, [ebp+ObjectAttributes]
of-M h?7L9|.text:0001C023 push esi ; Address
x0^#Zn-@"g\ ^,Y.text:0001C024 call ds:ProbeForRead

^G hJ,o+C ?/M★快乐天地★超门户ex&c p`Q.B)R

- ———–/

:[8c8`!x[5Q★快乐天地★超门户:@B g |rb

Here it checks for ‘ObjectAttributes’ to be pointing to a valid address.

Y NSPh-dd9j$@★快乐天地★超门户~U5` @aBFK D Vh;iP

/———–

.Q5~Yr(v

4c'}.B2k0iq B.text:0001C02A mov eax, [esi+OBJECT_ATTRIBUTES.RootDirectory]★快乐天地★超门户@M+O1h%r.`-~$v&[
.text:0001C02D mov [ebp+Handle], eax★快乐天地★超门户1q\T"I2D PQ"A
.text:0001C030 mov esi, [esi+OBJECT_ATTRIBUTES.ObjectName]★快乐天地★超门户-?4i'ua{r+U
.text:0001C033 mov [ebp+pUnicodeString], esi★快乐天地★超门户7d0@n-~B'lr_a

★快乐天地★超门户"H;W.~pZ q

- ———–/★快乐天地★超门户 ^ \ Z1Ef}0SR2g

4XsJ9\;I/?(v&qNow, it gets from ‘OBJECT_ATTRIBUTES’ a handle and a pointer to an
g8pz4Ao0e s;X‘UNICODE_STRING’ structure.★快乐天地★超门户E0_%a6N\8E;o]L

★快乐天地★超门户6J DG.Y)VK'^

/———–

xz2Rt+N*]z L

,[pz3_xR \ c.text:0001C095 push 4★快乐天地★超门户b]K Y;IWNe\2~ w
.text:0001C097 push 8★快乐天地★超门户2D%K#e#~?6H1^ J{
.text:0001C099 push esi
kh7N!B:@.text:0001C09A mov ebx, ds:ProbeForRead
W bO8f Qeg4o9L.text:0001C0A0 call ebx ; ProbeForRead, it checks the★快乐天地★超门户0Y\!NM'h | A!D
pointer before the dereference.★快乐天地★超门户x1j%u~/K

X#m:a Bl.text:0001C0A2 mov eax, dword ptr [esi+UNICODE_STRING.Length]
-Gm-U[ hQ:MsK%|.text:0001C0A4 mov dword ptr [ebp+stUnicodeString.Length], eax
6i:s5R Q I+k4e.text:0001C0A7 mov esi, [esi+UNICODE_STRING.Buffer] ; And gets★快乐天地★超门户ZR|4c{
from the UNICODE_STRING structure★快乐天地★超门户O,jj ov \h4~!H
; a pointer to the unicode buffer.★快乐天地★超门户FUC*ARi;XEC:Tf
.text:0001C0AA mov [ebp+stUnicodeString.Buffer], esi★快乐天地★超门户,h Wtc{2q!Z5~
.text:0001C0AD push 2 ; Alignment
d{]\S+@7P(p(\1a.text:0001C0AF shr eax, 10h★快乐天地★超门户k'~,AvNx-iH&]
.text:0001C0B2 push eax ; Length★快乐天地★超门户6d4DZ;o5?1K#Yqvum
.text:0001C0B3 push esi ; Address★快乐天地★超门户#i'GiAJ0_w`
.text:0001C0B4 call ebx ; ProbeForRead

m#zRs RE ii4R★快乐天地★超门户wf;y YIG jN(x5RY4Z

- ———–/

0wCSh6hx-q,R i8f★快乐天地★超门户:fLIw s

It does the check, but here is the problem

n4Q$F(j#CW(O!y

8]F:h A l9u/———–

lS7i;} J&`★快乐天地★超门户 \'B`r~-?

.text:0001C0B6 push gdwValue★快乐天地★超门户7x}8tM a\d-bv
.text:0001C0BC lea eax, [ebp+stUnicodeString]★快乐天地★超门户$eAQ p}%\
.text:0001C0BF push eax★快乐天地★超门户*v{V7?8i P2`
.text:0001C0C0 push [ebp+Object]
\eo,T m k.text:0001C0C3 call sub_1cb40

UM1_@9i4gh"R2SY!f

Q#},` j |MM3y?- ———–/★快乐天地★超门户rm g2G,Sxa&i

★快乐天地★超门户f-R"d w*Hg

The problem relies in the function not properly checking the ‘Length’★快乐天地★超门户?+M[B e
field of the ‘UNICODE_STRING’ structure. When doing the check,★快乐天地★超门户`X:n'j%ZC:Bv%w"A
‘ProbeForRead’ receives the length field of the structure as a parameter★快乐天地★超门户e^$nl$MO/TR
without any kind of validation.

Y8t)f'@P&W[★快乐天地★超门户#RgA_Ss

So, if we set this field to 0, ‘ProbeForRead’ will not raise any★快乐天地★超门户$m!s)rB \(Q4]
exception even though we were passing it an invalid address. And it will★快乐天地★超门户,uG$e1|*O
crash when trying to access to the desired invalid memory.

H6zw-c+Wg;ZJ

x qp vl7[/———–

3_?lJui&n0O;y4|Au

/DZ!s[ADsub_1cb40

e&lUF&a

KAaPr"I9V[…]★快乐天地★超门户HzQk+~s+Y [
.text:0001CB5E xor esi, esi★快乐天地★超门户%Rcs1}2DQER Y.R
.text:0001CB60 mov [ebp+ms_exc.disabled], esi
{-xw[_]MI&u.text:0001CB63 mov edi, [ebp+pUnicodeString]
%W8b/k C] u#P A.text:0001CB66 mov eax, [edi+UNICODE_STRING.Buffer]

1XR/r/j$R1a★快乐天地★超门户]A!s;~EM&C:v

- ———–/★快乐天地★超门户\"U"}4x;Y#J

j.\(HE V(|6AAnd here is where it will crash:★快乐天地★超门户 e LI#x8s8zQ

★快乐天地★超门户4l EVxT

/———–★快乐天地★超门户0xNtt.n"rl#{

ir0j3t3hhHt.text:0001CB69 cmp word ptr [eax], ‘\’ ; Reference the first
c$f$AD(S&npointed byte

`T%rwE

4nAc+wW sjO- ———–/★快乐天地★超门户p?n9\Q-Q

★快乐天地★超门户*]c;p0g~8F fH2}

4) RISING ANTIVIRUS (BID 28744, CVE-2008-1738)

V6L"m dm.M!u*jm![

b?.X6Z$p;y`FIn Rising antivirus the code of the ‘NtOpenProcess’ hook does not
UwPO@ EA,l!Vvalidates if the pointer to the structure★快乐天地★超门户n3^k`$Nk?9w-V-Lt

7]I#L _.x$`#Q;YP!{/———–★快乐天地★超门户 {w y-Yx c

★快乐天地★超门户ev"}7h|iy*Y

typedef struct _CLIENT_ID {
)A`mU0sAHANDLE UniqueProcess;★快乐天地★超门户y~8f _KH^H,w
HANDLE UniqueThread;}

%m;W @.K,[.k t7U★快乐天地★超门户l,x-P0h!d

- ———–/

0kL3@ RF$pz2i

0t Vt e'B$jis really pointing to mapped memory. So, when the code tries to★快乐天地★超门户X [0QtzK?K}HeZ
dereference the pointer to check the ‘CLIENT_ID->UniqueProcess’ value,
n,[v(} P%F B b)iif it is pointing to invalid memory, will crash.

+ozu#pOsk

%J.|cxGD/———–

.| p?1m,Hm#`7F★快乐天地★超门户"]z)fa~ ?8XB

NtOpenProcess( OUT PHANDLE ProcessHandle,★快乐天地★超门户+Nj.F5h2S
IN ACCESS_MASK AccessMask,★快乐天地★超门户*fPR]*q?X%r/J~4I
IN POBJECT_ATTRIBUTES ObjectAttributes,
x bHw8[0zYIN PCLIENT_ID ClientId )

4LZ?kyeA

&Mc\4L nqi!mt!U.text:00010EAA push ebp★快乐天地★超门户 H&kZ Y7X
.text:00010EAB mov ebp, esp
*W^1uT5J C a.text:00010EAD push esi
o,E0_L.A,i.text:00010EAE mov esi, offset Addend★快乐天地★超门户 o4iUAg ag
.text:00010EB3 push edi★快乐天地★超门户Y,D$T0UB|8EZ
.text:00010EB4 mov ecx, esi ; Addend★快乐天地★超门户;i Ii/f'[gdNab
.text:00010EB6 call ds:InterlockedIncrement★快乐天地★超门户'g~!F&UR%t
.text:00010EBC call PsGetCurrentProcessId
QQ,h(l {8|.p3N8F.text:00010EC1 cmp eax, dword_11C8C★快乐天地★超门户v2^Uys{
.text:00010EC7 jnz short loc_10ECE
V;T0z3r6T.hI ~.text:00010EC9
dcn]$a7h.text:00010EC9 loc_10EC9: ; CODE XREF: sub_10EAA+37_j★快乐天地★超门户wWyK(N&\8ii
.text:00010EC9 push [ebp+ClientId]★快乐天地★超门户B7V6nbZ
.text:00010ECC jmp short loc_10EF0

i(D8\ Vq-Y

"MS3e I K&@.text:00010ECE
B g+r6P:i.text:00010ECE loc_10ECE: ; CODE XREF: sub_10EAA+1D_j
J@L,J,E'A}(b3o'O.text:00010ECE call PsGetCurrentProcessId★快乐天地★超门户_(P*@-l@:OK
.text:00010ED3 mov ecx, dword_11C80
G|!j[u"v*^.text:00010ED9 push eax
4k@ T'Mv#L`O;j.text:00010EDA call sub_11070
Uo!Y*K$t.text:00010EDF test al, al★快乐天地★超门户'I o0os'\&l^R
.text:00010EE1 jnz short loc_10EC9★快乐天地★超门户m7t&W[et+HFS#b R
.text:00010EE3 call PsGetCurrentProcessId★快乐天地★超门户8HD R+|Y%L
.text:00010EE8 mov edi, [ebp+ClientId] ; Here is the bug, if★快乐天地★超门户U3UK u!p] kHm
ClientId is pointing to an invalid address
Nk|0W4m2O e n.text:00010EEB cmp eax, [edi] ; it will crash.
'h2l)uLyq+}.text:00010EED jnz short loc_10F0D★快乐天地★超门户 oo$hd)^

★快乐天地★超门户{U)T!o2b(]r5L^ e

- ———–/★快乐天地★超门户U%U*a/M!E]$yG.uh

★快乐天地★超门户.m-A3{!x`s

*Report Timeline*

&b0K(@qpd

qNZ$l)If F!`q V. 2008-01-11: Core Security Technologies found a security vulnerability★快乐天地★超门户 PMO\5E8Q6D&?Dd
in BitDefender antivirus.★快乐天地★超门户;h-KV t\;|0HK
. 2008-01-14: BitDefender team is contacted by Core.★快乐天地★超门户-E'fOr}0N
. 2008-01-15: BitDefender team asks Core for technical description of★快乐天地★超门户m;EH:D"F^8{~(Y
the vulnerability.
H,\i3f"d!}"s. 2008-01-15: Technical details are sent to BitDefender team by Core.★快乐天地★超门户PEaUz'f"u1Q
. 2008-01-22: BitDefender notifies Core that a fix has been produced and★快乐天地★超门户6~-G-e-H{@%e
the flaw was corrected through automatic updates.
upwn&n[*{X1Q. 2008-02-04: According to the original schedule, the CORE-2008-0320
Rd6F0Wcadvisory would be released at this date, but similar flaws in other★快乐天地★超门户,K"l"\^e+A7m)T r
antivirus products were discovered by Core exploit writers team.
P,Z([C+k1UgConsidering all BitDefender users are patched, Core Security★快乐天地★超门户b$`2yJGf$Ykf3lNk
Technologies does not release the advisory and continues the research of★快乐天地★超门户])[_On K'O-T
this issue in other products.★快乐天地★超门户c)r|T[4}Y
. 2008-03-20: Core analyzes similar vulnerabilities in Comodo Firewall,★快乐天地★超门户zS_q#@8w D@
Sophos Antivirus and Rising Antivirus.
)d"j8R~6Iw4[7]. 2008-03-25: Core notifies the Comodo, Sophos and Rising teams of the
$Z4Z(Xl1hxUvulnerabilities.★快乐天地★超门户;oJd1\a:R(e?
. 2008-03-27: Comodo team asks Core for technical description of the★快乐天地★超门户 N){2iAi
vulnerability.★快乐天地★超门户Ha S`\ ~
. 2008-03-27: Technical details are sent to Comodo team by Core.
lL rt;N E. 2008-03-31: Rising team asks Core for technical description of the
}QLsthNmBevulnerability.★快乐天地★超门户:N:J!g"zO)^ DJY
. 2008-04-01: Technical details are sent to Rising team by Core.★快乐天地★超门户m~tK5L9`p8P
. 2008-04-02: Rising team inform Core that the flaw has been fixed in★快乐天地★超门户 {Ik J!m3EN"L
the Rising AV 2008 version.★快乐天地★超门户|JR3Jl/an
. 2008-04-02: Sophos team asks Core for technical description of the★快乐天地★超门户q5Vdt q"h nq n
vulnerability.
k.p'A l)]2u#~;w2s;v1V. 2008-04-07: Technical details are sent to Sophos team by Core.
y+Pj#m7].vp. 2008-04-11: Sophos team informs that the flaw is found in one of the
*|TJ8D IZantivirus drivers, and fixing it will require a reboot for all of Sophos
(N3u n6I/\2]PWindows customers. Sophos would like to fix the bug in the next major
olkR2Y)Y&h;Smversion (second quarter 2009), in particular considering the fact that
X_j:uN,T'RFu'N"Hathey were unable to come up with any practical use of this vulnerability.★快乐天地★超门户Qda+o.H`d(Ok
. 2008-04-14: Comodo notifies Core that a fix has been produced.★快乐天地★超门户!OM$U DY ty
. 2008-04-14: Sophos informs Core that they will be able to release a
fX7w V/y9n6k[#Lfix to the vulnerability at the end of October 2008.★快乐天地★超门户b$F{b{R,e]
. 2008-04-21: Core responds that they will reschedule the publication to★快乐天地★超门户-kL-G;|*B m$B l|
April 24th, 2008. Since the vulnerability is not critical, and has been
!ZJJU W.g ` }9vfound using publicly available tools, like the other vulnerabilities
7S9UD k&w4V'~ _.U`6mincluded in the advisory, Core doesn’t see a reason to postpone the
EJ(Jo!c.pEkMf0]publication of the Sophos bug until October 2008.
/k(U hNZd m}. 2008-04-21: Sophos asks Core not to release details of the
J2Zgym&PW&dvulnerability until a fix is available, and not to publish Proof of
_4v8h5}~1zPConcept code. Sophos informs that they do not believe that arbitrary★快乐天地★超门户*O3t(a!aP{T&l
code execution is possible.
;p)A x?D1g@. 2008-04-24: Core responds that the advisory does not contain Proof of
#c%bVB%B1f ^.?6mConcept code. Core confirms its intention of publishing the advisory,
r\})fE6z']including the technical description, but decides to postpone it to April★快乐天地★超门户4P*V*px`BOB IQ
28th, to give the participants more time to coordinate the release of
l:i+[a0t)I3kg6[Upublic information.
bA9|:Tb[v(N. 2008-04-25: Sophos provides additional information, included in the★快乐天地★超门户;w L3eW/jv9tn3`H
“vendor information” section of the advisory.★快乐天地★超门户4QZ-fzui
. 2008-04-28: CORE-2008-0320 advisory is published.

&^&S:i\&Y"S;H:a

pr@$Ce&Pw*References*★快乐天地★超门户U/ojpg2yK;r*L

uND?pe B!gm[1] http://www.bitdefender.com★快乐天地★超门户2~|^ z$x!_;a
[2] http://www.comodo.com
JR*mh-ZcK[3] http://www.sophos.com
"K3k![P/@VF$[J[4] http://www.rising-global.com
_tB/k3B%Xb[5] http://www.matousec.com/downloads
:m \Ig"ZgFM[6]★快乐天地★超门户6iBu|f
http://www.matousec.com/info/articles/plague-in-security-software-driver
7bs%a P2d6_s.php

5}uoM\_

+MKP+K"Y+b0vf*About CoreLabs*

d+RBqR7@'MZg'`★快乐天地★超门户[rg)U Hd,r

CoreLabs, the research center of Core Security Technologies, is charged
;o'Hw}f:G&[.ewith anticipating the future needs and requirements for information★快乐天地★超门户K'iP1l6WS:c
security technologies. We conduct our research in several important★快乐天地★超门户I5ypF9mt
areas of computer security including system vulnerabilities, cyber★快乐天地★超门户!L Pt,Xx-e
attack planning and simulation, source code auditing, and cryptography.
g6I'm0i aOur results include problem formalization, identification of
'w C;AImT4q&evulnerabilities, novel solutions and prototypes for new technologies.
%~)PiB9FxoCoreLabs regularly publishes security advisories, technical papers,
#l8Ue$N;s RBN2\0|0M r sproject information and shared software tools for public use at:★快乐天地★超门户 C8k[ G/x:^ Uz6`
http://www.coresecurity.com/corelabs/.

~${\4gAVf_★快乐天地★超门户'AC1z6g'n

*About Core Security Technologies*

0?9Ci)@6h-A'E

lzVdbN!aA_Core Security Technologies develops strategic solutions that help★快乐天地★超门户 ux+u y9NA
security-conscious organizations worldwide develop and maintain a
F1P b7\J!z8Mproactive process for securing their networks. The company’s flagship★快乐天地★超门户u)a6z#e2~1D$L
product, CORE IMPACT, is the most comprehensive product for performing
i@h:n&hB*]enterprise security assurance testing. CORE IMPACT evaluates network,
@:k9l+cO!B p-bendpoint and end-user vulnerabilities and identifies what resources are★快乐天地★超门户1Q7i&| wC
exposed. It enables organizations to determine if current security
v)r5|\L'x6C.[investments are detecting and preventing attacks. Core Security
`5Id K"x9sNTechnologies augments its leading technology solution with world-class
CvD-cqdisecurity consulting services, including penetration testing and software
,n ]qE9|Z1t2Eisecurity auditing. Based in Boston, MA and Buenos Aires, Argentina, Core
X%~*ebb M9JSecurity Technologies can be reached at 617-399-6980 or on the Web at★快乐天地★超门户a4X~'m@/^
http://www.coresecurity.com.

uc E9\mB ]2y

X5ad%gh4H*Disclaimer*★快乐天地★超门户Y ?[-]5u0G"D$w

★快乐天地★超门户(R/R+K4K7|7g2A yz

The contents of this advisory are copyright (c) 2008 Core Security★快乐天地★超门户h:Z*h*~%v4q|1|"mt
Technologies and (c) 2008 CoreLabs, and may be distributed freely
%Z~#?%A YJ0tdprovided that no fee is charged for this distribution and proper credit★快乐天地★超门户/Zi cPP$g
is given.

6CR$O t+Z[

TAG: 黑客 杀毒软件 漏洞 代码

字号: | 推荐给好友

 

评分:0

我来说两句

seccode