Security check diff between Everett and Whidbey

Security _Checks in Everett

Function prolog:

sub esp, 24h

mov eax, dword ptr =>[security_cookie (408040h)]

mov dword ptr[esp+20h], eax

Attacks Everett couldn't prevent

Attacks using parameters

Attacks against failure detection

typedef void (*func_ptr)(char*);

void ulnerable(char* cp, func_ptr fp)

{

      char buf[10];

      strcpy( buf, cp );

      fp( buf );

}

The stack should be something like this:

Security _checks in Whidbey

Function prolog:

sub esp, 24h

move eax, dword ptr ==> [security_cookie(408040h)]

xor     eax, esp

mov dword ptr[esp+20h], eax

Function epilog:

mov ecx, dword ptr[esp+20h]

xor ecx, esp

add esp, 24h

jmp _security_check_cookie

 The stack should like this:

Previous function’s stack frame

Function arguments

Return address

Frame pointer

Cookie

EH frame

Locally declared buffers

Local variables and copies of vulnerable parameters

Calle save registers

Garbage

 Do you notice "Frame pointer"? I'll discuss "Frame pointer omission optimization" in another thread

You can also refer to http://www.codeproject.com/tips/seccheck.asp

 

Previous function’s stack frame

Function arguments

Return address

Frame pointer

Cookie

EH frame

Locally declared buffers

Local variables

Callee save registers

Garbage

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值