码迷,mamicode.com
首页 > 其他好文 > 详细

Pwn_6 ROP(1)

时间:2018-02-23 23:44:59      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:round   gad   log   guard   blog   cti   tac   不可   编译器   

Protection

  • ASLR
  • DEP
  • PIE
  • StackGuard

ASLR

地址随机化

Address Space Layout Randomization,程序每次执行时,stack、heap、library的位置都不一样

$:ldd /bin/lib ldd命令 查看当前的binary用了哪些library

检查是否开启ASLR

DEP

data execution prevention数据执行保护,又称为NX

可写的不能执行,可执行的不可写

PIE

地址无关可执行文件

Stack Guard

编译器对stack overflow的一种保护机制,可以有效的防止缓冲区溢出攻击

 技术分享图片


ROP(Return Oriented Programming)是一种利用现有的程序片段组合出想要功能的技巧

可以使用ROP解除DEP限制,然后执行shellcode

可以使用ROP绕过ASLR限制、StackGuard和PIE


查看有哪些保护 gdb checksee.sh

ROP

使用ROP的关键

  • 查找gadget
  • 排列组合gadget

ROP类型

  • 控制寄存器做syscall
  • 使用原有程序里的function
  • 使用libc里的gadget或者function (绕过ASLR)

Pwn_6 ROP(1)

标签:round   gad   log   guard   blog   cti   tac   不可   编译器   

原文地址:https://www.cnblogs.com/rookieDanny/p/8463597.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!