Microsoft Windows 9x IE5/Telnet Heap Overflow Vulnerability
BID:586
Info
Microsoft Windows 9x IE5/Telnet Heap Overflow Vulnerability
| Bugtraq ID: | 586 |
| Class: | Boundary Condition Error |
| CVE: | |
| Remote: | Yes |
| Local: | Yes |
| Published: | Aug 16 1999 12:00AM |
| Updated: | Aug 16 1999 12:00AM |
| Credit: | Posted to Bugtraq on August 16, 1999 by Jeremy Kothe <[email protected]> or <[email protected]>. |
| Vulnerable: |
Microsoft Windows 98 Microsoft Windows 95 |
| Not Vulnerable: | |
Discussion
Microsoft Windows 9x IE5/Telnet Heap Overflow Vulnerability
Windows 95 and 98 systems running IE4 or specific versions of IE5 (5.00.2314.1003 and 5.00.2314.1003IC) are susceptible to a remote vulnerability that allows the execution of arbitrary code on a target that views a malicious web page. This vulnerability is due to a combination of two different weaknesses:
First, the Windows 95 and 98 telnet.exe is vulnerable to a buffer overflow condition. While preparing the Connect Failed message box, there is an unchecked input buffer of 255 characters, and sending more than that will overwrite the heap.
Second, IE5 will start an instance of telnet.exe if passed any of the following URL types: rlogin:, telnet: or tn3270:. Earlier versions of IE5 allowed only two parameters to be passed in these URLs, but the most recent ones, listed above, will allow any number of parameters to be passed, up to a total of approximately 460 bytes. This is enough for an attacker to create a URL that will start an instance of telnet on the client machine, and pass it the overrun code he or she wants executed.
The exploit runs when the telnet window is closed.
Windows 95 and 98 systems running IE4 or specific versions of IE5 (5.00.2314.1003 and 5.00.2314.1003IC) are susceptible to a remote vulnerability that allows the execution of arbitrary code on a target that views a malicious web page. This vulnerability is due to a combination of two different weaknesses:
First, the Windows 95 and 98 telnet.exe is vulnerable to a buffer overflow condition. While preparing the Connect Failed message box, there is an unchecked input buffer of 255 characters, and sending more than that will overwrite the heap.
Second, IE5 will start an instance of telnet.exe if passed any of the following URL types: rlogin:, telnet: or tn3270:. Earlier versions of IE5 allowed only two parameters to be passed in these URLs, but the most recent ones, listed above, will allow any number of parameters to be passed, up to a total of approximately 460 bytes. This is enough for an attacker to create a URL that will start an instance of telnet on the client machine, and pass it the overrun code he or she wants executed.
The exploit runs when the telnet window is closed.
Exploit / POC
Microsoft Windows 9x IE5/Telnet Heap Overflow Vulnerability
Quoted verbatim from Jeremy Kothe's post to Bugtraq:
I have worked out an exploit which downloads and runs an arbitrary file, and have included the source for a Visual C++ program to create a binary file containing the exploit as a link. Add (for example) an html header and footer, and you have it.
Notes: The exploit uses URLDownloadToCacheFile and WinExec. Disassembling the binary file will show you the code (strings have been xor'ed with 0xFADE). Any comments on the exploit code would be appreciated.
Quoted verbatim from Jeremy Kothe's post to Bugtraq:
I have worked out an exploit which downloads and runs an arbitrary file, and have included the source for a Visual C++ program to create a binary file containing the exploit as a link. Add (for example) an html header and footer, and you have it.
Notes: The exploit uses URLDownloadToCacheFile and WinExec. Disassembling the binary file will show you the code (strings have been xor'ed with 0xFADE). Any comments on the exploit code would be appreciated.
Solution / Fix
Microsoft Windows 9x IE5/Telnet Heap Overflow Vulnerability
Solution:
Microsoft has released a patch that addresses this issue. It is available at:
Windows 95:
http://www.microsoft.com/windows95/downloads/contents/WUCritical/Telnet/Default.asp
Windows 98:
http://www.microsoft.com/windows98/downloads/contents/WUCritical/Telnet/Default.asp
Solution:
Microsoft has released a patch that addresses this issue. It is available at:
Windows 95:
http://www.microsoft.com/windows95/downloads/contents/WUCritical/Telnet/Default.asp
Windows 98:
http://www.microsoft.com/windows98/downloads/contents/WUCritical/Telnet/Default.asp