Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1173080
  • 博文数量: 272
  • 博客积分: 3899
  • 博客等级: 中校
  • 技术积分: 4734
  • 用 户 组: 普通用户
  • 注册时间: 2012-06-15 14:53
文章分类

全部博文(272)

文章存档

2012年(272)

分类: 网络与安全

2012-06-26 17:18:26

昨天在FD上出来的这篇paper:



sehop是在新版本windows中加入保护seh的措施,微软有计划把这个方案做一个default的选项。

• Microsoft Windows 2008 SP0
• Microsoft Windows Vista SP1
• Microsoft Windows 7

作者通过构造fake SEH chains,绕过了合法性检查,执行shellcode成功。

SEH链构造的条件:
We have to take in consideration some constraints:
• SEH handler should point onto a non-SafeSEH module
• The page should be executable
• The SEH chain should not be altered and must end with a SEH structure containing a special 
value (0xFFFFFFFF as next SEH structure pointer and a specific value as SEH handler)
• All SEH structures should be 4-byte aligned
• Last SEH structure's handler should point right into ntdll to ntdll!FinalExceptionHandler routine
• All SEH pointers should point to stack locations

这篇paper前半部分都是讲经典的溢出覆盖SEH的利用方法,有经验的朋友可以直接从第7页看起。

作者利用的opcode是
XOR EAX, EAX
POP ESI
POP EBP
RET

原因见paper

整个流程如下:



但是作者也提到在ASLR和DEP的开启下,利用会很困难。

根据我的经验,对于ASLR,我们在两种情况下能够稳定利用:
1. 有内存信息泄露bug,能够读出内存中的内容
2. 能够反复暴力破解地址,而进程不会crash,或者进程crash了但会自动重新起来。

这篇paper还是给了我们许多想象空间,留个记号。
阅读(1344) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~