IE7 0day Exploit Analysis

The exploit for this vulnerability has two parts:

A. JavaScript heap spray code and x86 Shellcode

B. A short of special XML/SPAN tag elements

IE7 0day Exploit Analysis_第1张图片

The first part of this exploit is a combination of the shellcode and heap spray technology, when it is running, it will be allocating memory blocks until it reaches address 0x0FFF0000, the size of each memory block is 1MB, the shellcode will be put into the address near the end of each block.

Heap spray:

IE7 0day Exploit Analysis_第2张图片

The second part is the trigger of this vulnerability. The issue occurred in mshtml.dll, IE uses this dll to handle the XML/SPAN tags. This exploit used the special character (hex:0x0a0a) to construct the value of SRC in the first label, like below:

IE5_0day_analysis2.png

When mshtml.dll is processing such special XML/SPAN tags, it will allocate a structural memory block to handle these elements. During the process, it will release the memory block that contains these elements but continue referring the block in the next process, with the leak of sanity checks, this vulnerability will be trigged. This is a common object point overwrite tricks.

IE5_0day_analysis3.png

Here is the working flow of this exploit:

<1> Overwrite object point -> call to 0x0a0a0a0a

IE7 0day Exploit Analysis_第3张图片

<2> Execute the shellcode

IE7 0day Exploit Analysis_第4张图片

<3>Download the malware

IE7 0day Exploit Analysis_第5张图片

你可能感兴趣的:(恶意代码分析)