내발자국[동호회]

MS IE 4.0 새로운 보안 문제와 패치

松巖 1998. 3. 6. 10:58
From: "Deyon Kim"
Newsgroups: han.comp.internet,han.comp.security
Subject: MS IE 4.0 새로운 보안 문제와 패치
Date: Wed, 12 Nov 1997 21:54:31 +0900
O

최신정보 (담당: 김환철 TWINGOLD, k2osc2) ()
제목 : [정보] IE 4.0 심각한 보안버그 및 패치
#11879/11880 보낸이:넷메이트(ipbomul1) 11/12 21:30

<인터넷 익스플로러 4.0 보안 버그 패치>

며칠전 발표된 익스플로러 4.0의 심각한 보안 버그와 오늘 발표된 MS의 패치 파일
소식입니다.

이번에 발견된 보안 관련 버그는 이전에 발견된 버그보다 더욱 심각한 것입니다.
11월 10일, L0PHT Heavy Industries라는 회사에서 발표한 바에 따르면 이것은
버퍼 오버런(Buffer-overrun)이라는 보안 버그입니다. 단, 이 버그는 윈도우
95에서 IE 4.0을 사용하는 경우에만 해당합니다. 혹시나 해서 멤피스 한글
1588에서 실험해 본 결과, 이런 문제는 나타나지 않았습니다.

<아래는 여기서 발표한 내용을 간단하게 요약한 글입니다.>

IE 4.0은 res://로 시작되는 새로운 URL 프로토콜을 인식할 수 있는데, 이것은
로컬 DLL 파일에 포함된 로컬 리소스에 액세스할 때 사용하는 프로토콜입니다. 이
URL은 익스플로러에서 최대 256 문자까지 인식이 가능합니다. 그런데 만약 이
어드레스가 256 문자를 넘어가게 되면 256문자까지는 버퍼에 저장을 하고, 나머지
문자, 즉 257번째 문자부터는 컴퓨터의 메모리에 이것을 저장하게 됩니다. 즉
스택에 저장이 됩니다. 이 상태에서 시스템에서 임의 코드를 실행하게 되면
버퍼는 이미 긴 링크 문자열 때문에 오버플로우가 일어나고, 이 명령은 다시
스택에 자리잡게 됩니다. 그런 다음, 이 명령을 실행시키게 됩니다.

그런데 문제는 이미 여기에 저장되어 있던 나머지 257번째 이후 문자에 웹 페이지
제작자가 악의적으로 바이러스 코드를 심어놓았다면 명령을 실행함과 동시에 이
코드가 작동하면서 시스템이 다운되거나 AUTOEXEC.BAT 파일을 수정해버리는 등의
다양한 방법으로 시스템을
망가뜨릴 수가 있다는 것입니다. 이 문제는 IE 4.0에 있는 시스템 보안 등급을
최상으로 설정해도 막을 수가 없습니다.

이전의 보안 버그는 단순히 타인의 시스템에 있는 자료를 열람만 할 수 있는
수준이었으나, 이번에 발견된 문제는 바이러스가 웹을 통해
자연스럽게 시스템에 침투하기 때문에 바이러스 검색 프로그램으로도 막기가
힘들며, 시스템 자체가 날아가 버릴 수 있다는 점에서 심각하다고 할 수
있습니다. 쉽게 생각해서 HTML 메일에다 이런 식으로 링크를 만들어 보내면
상대방이 윈도우 95에서 IE 4.0을 사용하고 있는 상태라면 간단하게 상대방의
시스템을 날려버릴 수가 있게 됩니다.

실제 이런 문제가 발생하는지 확인하고 싶은 분은
http://www.L0pht.com/advisories/areusure.html 로 접속해서 실험해보시기
바랍니다.

MS에서는 이런 버그가 발표된 지 하룻만에 오늘 패치 파일을 발표했습니다. <이하
생략>





From: "Deyon Kim"
Newsgroups: han.comp.internet,han.comp.security
Subject: Re: MS IE 4.0 새로운 보안 문제와 패치
Date: Wed, 12 Nov 1997 22:35:35 +0900

하이텔 BOMUL 자료실에 RESBUFF.EXE라는 파일이 업로드되긴 했는데, 아마 영문 IE
4.0 전용인가봅니다. 지금 한글 IE 4.0에서는 Unable to patch this system이라는
에러 메세지만 나오고 끝나버립니다. 펜티엄칩 버그에 이어서 또 골치아픈 버그가
발견되었군요.

원래 이 기사에는 infect.htm이라는 "진짜로 문제를 일으키는 파일"이 uuencode로
붙어 있었으나 혹시 문제를 일으킬까봐 제가 임의로 그 부분은 삭제했습니다.
원본이 필요하신 분은 www.dejanews.com에서 키워드 "explorer buffer"로
찾아보시기 바랍니다. ;-)

Subject: L0pht Advisory: IE4.0
From: usura@sabotage.org (Alex de Joode)
Date: 1997/11/11
Message-ID: <6488v2$bq$2@news2.xs4all.nl>
Newsgroups: xs4ll.general,xs4all.www
[More Headers]

[ Article crossposted from list.bugtraq ]
[ Author was DilDog (dildog@L0PHT.COM) ]
[ Posted on 10 Nov 1997 23:16:21 +0100 ]

Document: L0pht Security Advisory
URL Origin: http://l0pht.com/advisories.html
Release Date: November 1st, 1997
Application: Microsoft Internet Explorer 4.0 Suite
Severity: Viewing remote HTML content can execute arbitrary native
code
Author: dildog@l0pht.com
Operating Sys: Windows 95
----------------------------------------------------------------------------
---
========
Scenario
========
The Microsoft Internet Explorer 4.0 Suite, including all programs supplied
with it that read and/or process HTML from either local machines, intranet
machines, or remote internet machines are subject to a buffer overflow in
the
HTML decoding process. The buffer overflow can cause the application to
page
fault, or in the worst case, execute arbitrary precompiled native code.
=======
Example
=======
1. Copy the supplied HTML file(s) into a location that is accessible via
the
target application.
2. Point to it. Look at it.
3. Click on the link. (or let someone click it for you)
4. Become aware of what happens to your machine.
5. Freak out and beg Microsoft to make the bad man stop.
=================
Technical Details
=================
The problem here lies in the deciphering of the URL line format itself.
The
base HTML library that is used by the Internet Explorer 4.0 Suite and the
following programs are vulnerable:
- Outlook Express (both mail and news)
- Windows Explorer
- Internet Explorer (different than regular explorer, really)
This problem, because it stems from a programming flaw in the HTML
decoding
system, is unaffected by the Explorer "Security Zones" feature. In other
words, if you turn on the highest security level for the zone from where
the
exploit HTML is being viewed, you are still vulnerable.
The critical problem here is a buffer overflow in the parsing of a
particular
new type of URL protocol. The "res://" type of URL is meant to allow
access
to a local resource embedded in a local DLL file. This is useful for
archiving entire websites into a DLL and is not, in its truest concept, a
security flaw.
For example, to read something out of the IE4.0 Tour (stored in a DLL) try
the following URL: res://ie4tour.dll/page1-6.htm
The buffer overflow is on the actual filename specified. To crash your
machine go ahead and try res://blahblahblah ... blahblah/ in your Internet
Explorer window where the amount of 'blah' equals 265 characters.
The function that goes through the filename and validates it is flawed on
Windows 95. Without checking the length, the filename is uppercased,
concatenated with '.DLL' if it isn't there already, and in the process,
copied into a fixed size buffer.
========
Solution
========
Currently, there is no solution available for this flaw. You can't set any
Internet Explorer options to avoid it, and you are not protected by any
level of zone security. Simply don't surf the web, read email or view
net news using Internet Explorer 4.0 until Microsoft puts up a hotfix.
============
Exploit Code
============

Here we go...
When constructing the exploit we want to try something useful.
Lets's start with appending text of your choice to AUTOEXEC.BAT...
(note that running native code lets you do pretty much anything you
want)
Note that the location of the exploit string in the stack is very
important
and it varies from target application to target application.
Constructing the exploit string:
Figure out stack location for exploit code...
App Loc
Internet Explorer 0x0057C144
Windows Explorer 0x0088A0F4
...
Yeah, I know that those locations have null bytes in them and you can't
put those (or lowercase letters, or CR/LF or 0x07 or anything like that)
in the exploit string... but we'll let microsoft fix that for us. Step
thru
the process to see IE add that extra null character for you. Will they
ever cease to amaze...
Put together what you wanna do, tack on the necessary jump addresses and
all that. That's it.

And now, UUENCODED to preserve freshness:
*************************************************************************
* MAKE SURE YOU RUN THIS EXPLOIT WITH __INTERNET__ EXPLORER, _NOT_ *
* REGULAR OL' WINDOWS EXPLORER. (put it on a website and download it or *
* click on the IE desktop icon (run iexplore.exe) and type in the name *
* of the file into the URL line) IT WON'T WORK OTHERWISE!!!! *
* (though it could be made to do so) *
*************************************************************************
A haiku:
Microsoft IE
Is there no security?
Not if you ask me.
dildog@l0pht.com (11/1/97)
----------------------------------------------------------------------------
---
For more L0pht (that's L - zero - P - H - T) advisories check out:
http://l0pht.com/advisories.html
--
Alex de Joode | usura@SABOTAGE.ORG | http://www.sabotage.org
Sabotage Internet: Your Internet Problem Provider.






From: "Deyon Kim"
Newsgroups: han.comp.internet,han.comp.security,han.comp.os.unix
Subject: MS IE의 또다른 보안 버그
Date: Sat, 22 Nov 1997 20:40:16 +0900

출처 : HiTEL/OSC/9/12019

최신정보 (담당: 김환철 TWINGOLD, k2osc2) ()
제목 : [정보] IE 4.0 보안버그 또다시 발견!
#12019/12019 보낸이:넷메이트(ipbomul1) 11/22 15:22

IE 4.0의 버퍼 오버런(Buffer-overrun) 보안 버그에 이어서 이번에 또다시 보안
버그가 발견되었습니다.

이번 것은 [Page Redirect]라는 버그입니다. 이 버그는 윈도우 95와 윈도 NT에서
IE 3.02와 4.0을 사용하는 경우, 그리고 유닉스에서 IE 4.0을 사용하는 경우에
해당하는 버그입니다.

버그의 내용은 사용자 ID와 비밀번호를 입력해야 접속할 수 있는 사이트에 접속할
경우, 이 내용을 입력하게 되면 해당 사이트의 다른 페이지로 접속할 때도 계속
이 사용자 정보를 사용하게 됩니다. 그런데 이 정보를 이렇게 다른 페이지에서
사용할 경우 ID와 비밀번호가 암호화되지 않은 상태에서 이것을 참조하기 때문에
이 과정에서 해커가 아주 쉽게 사용자의 ID와 비밀번호를 알아낼 수 있습니다.
암호화해도 그다지 어렵지 않게 알아낼 수 있지만 이 버그는 아예 아무런 암호화
기능이 작용하지 않기 때문에 거의 무방비 상태로 자신의 접속 정보가 타인에게
노출됩니다.

이 버그는 두 회사에서 발견했다고 하는데, MS에서는 어느 회사인지 밝히지 않고
있다고 합니다. MS에서는 아직 이런 버그로 인한 문제는 보고된 바 없다고 하지만
만일을 위해서 이 패치 파일을 설치해두시는 게 좋을 것 같습니다.

어쨌든 사소한 기능상의 문제가 아니라 보안과 관련된 허점이 계속 발견되고
있어, 보안이 중요한 환경에서 작업하는 사용자라면 IE 4.0의 사용을 신중히
재고하시는 게 좋을 것 같습니다.

패치 파일은 보물섬 자료실(Go bomul)에 있습니다.

--보물섬 창고지기였습니다.

P.S : 지금 이 파일을 막 받아서 실행해봤는데, 역시나... 영문 IE 4.0
전용입니다. 한글 IE 4.0을 사용하시는 분들은 좀 더 기다리시기 바랍니다.
저번에 buffer overflow 버그 패치도 마찬가지였지만, 항상 영문 버그가 발표된지
하루 정도가 지나야 한글판 패치가 나옵니다.