首页 > 其他 > 详细

Bypass DEP & ASLR

时间:2015-12-14 01:13:09      阅读:221      评论:0      收藏:0      [点我收藏+]

1.从libc中找到"/bin/sh"的地址

(gdb)find __libc_start_main,length,"/bin/sh"

2.安排缓冲区

‘a‘*length+addressOfSystem+addressOfExit+addressOfBinSh

3.PLT & GOT

延迟绑定:PLT第一次调用确定GOT地址,第二次直接使用。

利用libc中函数相对位置不变的特性。

分析libc.so可以得到pltofwrite,pltofsystem

缓冲区1:‘a‘*length+PLT_Write+myFunc+1+GOT_Write+4

gotofsystem=gotofwrite+(pltofsystem-pltofwrite)

bin_addr = write_addr - (libc.symbols[‘write‘] - next(libc.search(‘/bin/sh‘)))

缓冲区2:‘a‘*length+gotofsystem+addressofexit+bin_addr

Bypass DEP & ASLR

原文:http://www.cnblogs.com/xiaofool/p/5043927.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!