2008년 10월 24일
Microsoft 긴급 보안업데이트 (MS08-067)와 관련 자료
바쁜 관계로 가져다만 놓습니다. 긴급이니 빠른 패치를 요하네요.
---------------------------------------------------------------------------------------------------------------------
Microsoft 보안업데이트 (MS08-067)
■ 개 요
MS社는 10월24일 MS 윈도우의 Server Service에서 악성코드 유포, 시스템 장악 등 해킹에 악용 가능한 보안취약점 1건(긴급)을 발표하였는 바, 각급기관은 해당 시스템에 대한 MS社의 보안 업데이트를 조속히 설치하시기 바랍니다.
■ 보안 업데이트에 포함된 취약점 및 관련 사이트
1. Server Service 취약점으로 인한 원격코드실행 문제(긴급, 958644)
o 설 명
MS 윈도우의 Server Service에서 원격코드 실행이 가능한 취약점이 존재하여 공격자는 조작된 RPC 요청을 전달하는 방식으로 공격, 악성코드 유포 등 취약 시스템을 완전히 장악할 수 있다.
* Server Service : MS 윈도우에서 파일, 폴더 및 주변장치 등을 공유하기 위해 지원하는 기능
* RPC : RPC(Remote Procedure Call) : 한 프로그램에서 네트워크의 다른 컴퓨터에 있는 프로그램의 서비스를 요청하는데 사용하는 프로토콜
o 관련 취약점
- Server Service Vulnerability(CVE-2008-4250)
o 영향 받는 소프트웨어
- Microsoft Windows 2000 SP4
- Microsoft Windows XP SP2, SP3
- Microsoft Windows XP Professional x64 Edition, SP2
- Microsoft Windows Server 2003 SP1, SP2
- Microsoft Windows Server 2003 SP1, SP2 for Itanium-based Systems
- Microsoft Windows Server 2003 x64 Edition, SP2
- Windows Vista, SP1
- Windows Vista x64 Edition
- Windows Server 2008, x64 Edition, Itanium-based Systems
o 해결책
- MS社에서 발표한 해당 취약점에 대한 보안패치를 적용한다.
- 보안패치를 긴급히 설치할 수 없는 경우 TCP 139, 445 포트가 반드시 필요한지 여부를 확인하고 방화벽에서 임시로 차단한다.
* TCP 139, 445 포트 : Server Service의 초기화에 사용되는 포트
o 관련사이트
→ 영문 : http://www.microsoft.com/technet/security/bulletin/MS08-067.mspx
→ 한글 : http://www.microsoft.com/korea/technet/security/bulletin/MS08-067.mspx
■ 참고정보
Microsoft Update
→ http://update.microsoft.com/microsoftupdate/v6/default.aspx?ln=ko
--------------------------------------------------------------------------------------------------------------------
관련 내용에 대해 해외에서 좀 더 상세하게 나온 내용
링크 : http://blogs.technet.com/swi/archive/2008/10/23/More-detail-about-MS08-067.aspx
More detail about MS08-067, the out-of-band netapi32.dll security update
Today Microsoft released a security update that fixes a remote code execution vulnerability in the Windows Server Service. This is a serious vulnerability and we have seen targeted attacks using this vulnerability to compromise fully-patched Windows XP and Windows Server 2003 computers so we have released the fix "out of band" (not on the regular Patch Tuesday). Due to the serious nature of the vulnerability and the threat landscape requiring an out-of-band release, you probably have questions about your own organization's risk level, what actions you can take to protect yourself, and why newer platforms are at reduced risk. We hope to answer those questions in this blog post.
Which platforms are at higher risk?
An unauthenticated attacker can trigger this vulnerability remotely for code execution on Windows Server 2000, Windows XP and Windows 2003. By default, Windows Vista and Windows Server 2008 require authentication. However, the attacker must be able to reach the RPC interface to exploit the vulnerability. In the default out-of-the-box scenario, the interface is not reachable due to the firewall enabled by default on Windows XP SP2, Windows Vista, and Windows Server 2008. Unfortunately, either one of the following two conditions exposes the RPC endpoint:
1) Firewall is disabled
2) Firewall is enabled but file/printer sharing is also enabled.
When File/Printer Sharing is enabled on Windows Vista and Windows Server 2008, the firewall only expose the RPC interface to the network type shared. For example, if a printer is shared on a network type ‘Private’, the firewall will block incoming RPC connections if the computer switches over to a network type ‘Public’. If you then choose to share the printer on the network type ‘Public’, Vista and Windows Server 2008 will prompt to ask if you really want to enable “File and Printer Sharing” for ALL public networks.
For more information about file/printer sharing, visit the following URLs:
- for Vista http://technet.microsoft.com/en-us/library/bb727037.aspx
- for XP http://www.microsoft.com/windowsxp/using/security/learnmore/sp2firewall.mspx
The following picture illustrates the risk for each platform in more detail.
More about mitigations (DEP, ASLR, /GS)
On Vista and Windows Server 2008, the combination of Address Space Layout Randomization (ASLR, http://blogs.msdn.com/michael_howard/archive/2006/05/26/address-space-layout-randomization-in-windows-vista.aspx) and Data Execution Protection (DEP, http://support.microsoft.com/kb/875352/EN-US/ ) will make the exploitation of this vulnerability more difficult. ASLR will randomize the base address of modules, heaps, stacks, PEB, TEBs, etc. making difficult the return into known locations. Known DEP bypass techniques will not be applicable on these platforms because of the presence of ASLR.
Regarding /GS protection, the stack frame of the function that contained the overflowed buffer was protected with a stack frame boundary cookie. However, due to the nature of this particular vulnerability, the exploit code is able to take advantage of another stack frame that was not meant to be protected by the /GS security cookie. The /GS security cookie is only emitted for functions meeting certain criteria.
UAC mitigates even when the prompting is disabled
As mentioned above, Windows Vista and Windows Server 2008 by default require authentication. But the security callback on the RPC interface has not been changed on the more recent platforms. Instead, the UAC and integrity level hardening work introduced with Vista is forcing the authentication requirement. The anonymous user connects with integrity level "Untrusted" while the named pipe requires at least a "Low" integrity level. Since "Untrusted" is lower than "Low" integrity level, the access check fails. Note that disabling the UAC prompt does not disable the integrity level access check. In other words, regardless of whether the UAC prompt is enabled or disabled, the integrity level check will be performed. The integrity level check will fail on Vista and Windows Server 2008 if the user connects anonymously. See http://msdn.microsoft.com/en-us/library/bb625963.aspx for more information.
There is a non-default scenario where a non-domain-joined Windows Vista and Windows Server 2008 can be exploited anonymously. If the feature “Password Protected Sharing” is disabled, anonymous connections come in at “Medium” integrity level. Because "Medium" integrity level is a higher integrity level than "Low", the integrity level check will succeed. This would allow Windows Vista and Windows Server 2008 to be exploited anonymously. This feature could be disabled through Vista’s Network Sharing Center in the “Sharing and Discovery” section.
Most perimeter firewalls will block exploit attempts from outside your organization
If you are behind a perimeter firewall that filters inbound connections to TCP ports 139 and 445, you will not be reachable from the Internet. This is a common home user scenario. In this scenario, only the machines in your local LAN will have the ability to exploit this vulnerability.
How you can protect yourself
You should apply the security update as soon as you can. This is the best way you can protect yourself. While you are testing the update and preparing your deployment process, you may choose to use one or more of the workarounds listed in the security bulletin. (http://www.microsoft.com/technet/security/Bulletin/MS08-067.mspx) We have researched several options that range from turning off the affected component to limiting the exposure to authenticated users.
There is one other workaround option that we didn't include in the bulletin because it is not a supported scenario. The Server service exposes the vulnerable code over an RPC named pipe. The access control list for the named pipe is specified in the netapi32.dll code. It can be changed for any current Windows session. When Windows is rebooted, the ACL will get reset to the default value. However, if you were to change the ACL on every boot after the service is started, the window of attack for anonymous users would be very small. We have developed a simple tool that can remove the ANONYMOUS access control entry is the named pipe's access control list. (Please remember that this is not a supported scenario.) Here's what it looks like when run:
C:\>chacl.exe \\.\pipe\srvsvcopening up \\.\pipe\srvsvcGot back 3 ACE entriesFound an entry for ANONYMOUS LOGON. Deleting it...deleted that ACESetting new DACL changes...DoneC:\>chacl.exe \\.\pipe\browseropening up \\.\pipe\browserGot back 3 ACE entriesFound an entry for ANONYMOUS LOGON. Deleting it...deleted that ACESetting new DACL changes...Done
We have attached the chacl.c source code at the bottom of this blog post.
Greetz
A great deal of investigation in a short amount of time went into this case. We'd like to publicly thank all the engineers who helped provide definitive answers (some requiring hours of debugging) to these hard technical questions.
- Bruce Dang, Fermin J. Serna, Damian Hasse, Andrew Roths and Jonathan Ness from the SVRD team
- Matt Miller and other members from the Microsoft Security Engineering Science Team
- David Kruse, Tassaduq Basu, and Jon Schwartz from the core file system, networking, and kernel teams (respectively)
- Carlos Trueba Salinas from the Windows Sustained Engineering team
Posting is provided "AS IS" with no warranties, and confers no rights.
Attachment(s): chacl.c
--------------------------------------------------------------------------------------------------------------------
상기 내용을 정리한 내용입니다. (From 쎄랍@nchovy)
오늘 MS08-067 긴급 패치가 발표되었습니다. 이번 취약점(CVE-2008-4250)은 Server Service가 RPC 요청을 제대로 처리하지 못해서 발생한 것으로, 2003/XP/2000/NT 운영체제에서 긴급, 2008/Vista 운영체제에서 중요 등급에 해당합니다.
비스타와 2008 서버에서는 주소 공간 레이아웃 랜덤화 (ASLR)와 데이터 실행 방지 (DEP) 때문에 익스플로잇이 어렵습니다. 게다가 UAC prompt를 꺼놓더라도 명명된 파이프(named pipe)를 사용하려고 할 때 UAC가 무결성 점검을 수행하므로 공격을 어렵게 합니다.
이미 익스플로잇(Win32/MS08067.gen!A)이 발견된 상태이고, 웜으로 발전할 가능성이 크므로 최대한 빨리 대응하시기 바랍니다. 마이크로소프트는 2주 전 XP 시스템을 대상으로 한 맬웨어의 공격을 분석하던 도중 이번 취약점을 발견했다고 합니다. 이 맬웨어 식별자는 TrojanSpy:Win32/Gimmiv.A와 TrojanSpy:Win32/Gimmiv.A.dll 입니다.
패치를 빨리 적용하시고, 외부에서 접근하지 못하도록 방화벽에서 139, 445 포트를 반드시 차단하시기 바랍니다. 다른 임시 대응책으로는 Computer Browser 서비스를 중지하는 방안이 있고, 비스타/2008의 경우에는 RPC 식별자를 기준으로 필터링이 가능합니다.
Computer Browser 서비스를 중지하게 되면 자신의 컴퓨터에 있는 파일이나 프린터를 공유할 수 없게 되지만, 다른 시스템의 공유 파일이나 프린터는 계속 사용할 수 있습니다.
비스타와 2008 서버의 경우에는 윈도우 기본 방화벽을 이용해서 RPC 식별자를 필터링할 수 있습니다. 이번 취약점에 관련해서는 UUID 4b324fc8-1670-01d3-1278-5a47bf6ee188를 차단하시면 됩니다. 설정하려면 아래와 같이 진행하시면 됩니다.
netsh
먼저 위의 명령어를 쳐서 네트워크 쉘로 전환합니다.
netsh>rpc
netsh rpc>filter
netsh rpc filter>add rule layer=um actiontype=block
netsh rpc filter>add condition field=if_uuid matchtype=equal data=4b324fc8-1670-01d3-1278-5a47bf6ee188
netsh rpc filter>add filter
netsh rpc filter>quit
이렇게 치고 나면 방화벽 차단 정책이 설정됩니다. 다음 명령으로 제대로 설정되었는지 확인합니다.
netsh rpc filter show filter
제대로 설정되었다면 아래와 같은 화면이 보일 것입니다.
Listing all RPC Filters.
---------------------------------
filterKey: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
displayData.name: RPCFilter
displayData.description: RPC Filter
filterId: 0x12f79
layerKey: um
weight: Type: FWP_EMPTY Value: Empty
action.type: block
numFilterConditions: 1
filterKey는 랜덤하게 생성되는 식별자이니 신경쓰지 않으셔도 됩니다. 방화벽을 설정한 이후에 SMB 프로토콜에 의존하는 응용프로그램은 제대로 동작하지 않을 수 있습니다.
원래대로 되돌리려면 아래 명령으로 방화벽 정책을 삭제합니다.
netsh rpc filter delete filter xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx는 위에서 확인했던 filterKey입니다.
명명된 파이프의 접근을 제한하는 방법
공식적인 방법은 아니지만, SVRD에서 소개한 또 다른 임시 대응 방안이 하나 있습니다. 서버 서비스의 취약 지점을 공격하려면 명명된 파이프(named pipe)를 이용해야 합니다. 기본 접근 제한 정책은 netapi32.dll에 정의되어 있는데, advapi32.dll을 이용해서 명명된 파이프의 접근 제한을 변경할 수 있습니다. 다만, 현재 윈도우 세션에 적용되는 것 뿐이라 윈도우 재부팅 될 때마다 다시 설정해야 하는 문제가 있을 뿐입니다. RPC에 관련된 명명된 파이프에 익명 사용자가 접근할 수 없도록 제한하면, 익명 사용자로 공격하는게 아주 힘들어집니다. chacl.c 소스를 컴파일해서 아래와 같이 실행하면 됩니다.
C:\>chacl.exe \\.\pipe\srvsvc
opening up \\.\pipe\srvsvc
Got back 3 ACE entries
Found an entry for ANONYMOUS LOGON. Deleting it...
deleted that ACE
Setting new DACL changes...
Done
C:\>chacl.exe \\.\pipe\browser
opening up \\.\pipe\browser
Got back 3 ACE entries
Found an entry for ANONYMOUS LOGON. Deleting it...
deleted that ACE
Setting new DACL changes...
Done
이글루스 가든 - professional secur...
# by | 2008/10/24 11:10 | Hacking&Security | 트랙백(2)





제목 : MS08-067 긴급 패치
오늘 MS08-067 긴급 패치가 발표되었습니다. 이번 취약점(CVE-2008-4250)은 Server Service가 RPC 요청을 제대로 처리하지 못해서 발생한 것으로, 2003/XP/2000/NT 운영체제에서 긴급, 2008/Vista 운영체제에서 중요 등급에 해당합니다. 비스타와 2008 서버에서는 주소 공간 레이아웃 랜덤화 (ASLR)와 데이터 실행 방지 (DEP) 때문에 익스플로잇이 어렵습니다. 게다가 UAC prompt를 꺼놓더라......more
제목 : MS08-067 긴급 보안패치 필요 - 악성코드 유..
유포 중인 샘플 긴급 업데이트 진행 중 현재 일본사이트에서 총 9개의 변종이 유포 중에 있다.(Zero-Day 공격이었지만 MS 패치가 긴급으로 발표된 상태이다.) http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4250 http://blogs.technet.com/mmpc/archive/2008/10/23/get-protected-now.aspx http://blogs.technet.c......more