Date: Sun, 9 May 1999 17:34:10 +0300 From: Georgi Guninski To: BUGTRAQ@netspace.org Subject: Bookmarks security vulnerabilities in both Internet Explorer 5.0 and Netscape Communicator 4.51 (Win95) There is a design flaw in both Internet Explorer 5.0 and Netscape Communicator 4.51 Win95 (guess all 4.x versions of both browsers are vulnerable too) in the way they handle bookmarks. The problem arises if the user bookmarks (adds to favorites) and later chooses a specially designed "javascript:" URL. When the bookmark is chosen later, the JavaScript code in it is executed in the context (the same domain and protocol) of the document opened prior to choosing the bookmark. So, the JavaScript code has access to documents in the same domain. An interesting case is choosing the bookmark when the active document is a local file (the protocol is "file:") - then the JavaScript code has access to local files and directories. The vulnerabilities are more serious for Internet Explorer 5.0. Some of the vulnerabilities are: For Internet Explorer 5.0: Reading local files if the filename is known; Reading files in the domain of the active document (even if the web server is blocked by a firewall); Reading links in the active document and in documents in the same domain; Web spoofing of documents in the domain of the active document; Demonstration is available at: http://www.nat.bg/~joro/favorites.html For Netscape Communcator 4.51: Browsing local directories; Reading local files in the directory of the active document; Reading links in the active document and in documents in the same domain; Web spoofing of documents in the domain of the active document; Demonstration is available at: http://www.nat.bg/~joro/bookmarks.html Workaround: Disable JavaScript or do not bookmark untrusted pages Georgi Guninski http://www.nat.bg/~joro http://www.whitehats.com/guninski ------------------------------------------------------------------------------- IE 5.0 "Favorites" vulnerability There is a design flaw in Internet Explorer 5.0 (guess 4.x is vulnerable too) in the way it handles favorites. This vulnerability allows reading local files and sending them to an arbitrary server.
If an user adds to favorites a specially designed "javascript:" URL, later opens a local file and then choose the URL from the Favorites, his local files may be read if the filename is known.
Probably there are more serious exploits.

Demonstration:

Reading AUTOEXEC.BAT
Reading file "c:\test.txt"
Workaround: Disable Javascript or do not add to favorites untrusted pages. ------------------------------------------------------------------------------- Netscape Communicator bookmark vulnerabilities There is a design flaw in Netscape Communicator 4.51/Win95 (guess all 4.x versions are vulnerable) in the way it handles bookmarks.
This allows at least browsing local directories, reading local files and sending them to an arbitrary server. Probably there are more serious exploits.
If the user bookmarks a specially designed "javascript:" URL, later open local file and then choose the bookmark, the bug is triggered.

Demonstration:
Browsing directories
Reading AUTOEXEC.BAT
Workaround: Disable Javascript or do not bookmark untrusted pages. ------------------------------------------------------------------------------- Date: Tue, 11 May 1999 21:59:32 -0700 From: Jim Reavis To: BUGTRAQ@netspace.org Subject: Re: Bookmarks security vulnerabilities in both Internet Explorer 5.0 and Netscape Communicator 4.51 (Win95) I did get this to work as described with IE 5.0 on Win 95. It failed until I re-read the directions and opened a local GIF with the "file:///" syntax versus "c:\" Using NT SP5, I got an access denied in a large dialog box that contained Georgi's code. He didn't mention NT in his original advisory, so I assume it is just Win 9X issue? Jim Reavis SecurityPortal.com - the focal point for security on the Net Jreavis@securityportal.com -----Original Message----- From: Russ [mailto:Russ.Cooper@RC.ON.CA] Sent: Monday, May 10, 1999 2:20 PM To: BUGTRAQ@NETSPACE.ORG Subject: Re: Bookmarks security vulnerabilities in both Internet Explorer 5.0 and Netscape Communicator 4.51 (Win95) I am unable to reproduce this on IE 5.0 with SP5. I get an error message stating "Cannot find server or DNS error" after following Georgi's instructions using TEST.TXT. Even pasting the entire script in the address box fails to reproduce his described effects. Cheers, Russ - NTBugtraq moderator