stack pivot

简介:

【转】http://www.2cto.com/article/201411/356646.html


当ROP链执行时,攻击者的最终目标是将shellcode重新放置在可执行的内存区域以绕过DEP保护。为了做到这一点,攻击者将调用一些类似VirtualAlloc的API函数。这些被攻击者用于绕过DEP的API是有限的。

由于原始程序的堆栈被切换为指向攻击者控制的数据,因此栈指针不再指向栈限以内。

程序栈限的信息被存储在TEB中。


1 : 020 > !teb
TEB at 7ffda000
ExceptionList: 0220f908
StackBase: 02210000
StackLimit: 02201000


如果栈指针不满足下面的条件,我们认为这是一个stack pivot:

if(esp>StackLimit&&esp<StackBase)














本文转自fatshi51CTO博客,原文链接:http://blog.51cto.com/duallay/1901136 ,如需转载请自行联系原作者







相关文章
LeetCode 215. Kth Largest Element in an Array
在未排序的数组中找到第 k 个最大的元素。请注意,你需要找的是数组排序后的第 k 个最大的元素,而不是第 k 个不同的元素。
59 0
【1051】Pop Sequence (stack)
出栈是否合法要满足:(1)能出栈(2)不超过栈的限制容量。 思路:模拟,将1~n依次入栈,在入栈中——如果入栈的元素恰好等于出栈序列当前等待出栈的元素,就让栈顶元素出栈,同时把出栈序列当前等待出栈的元素位置标记后移1位。 ——举个栗子:出栈顺序为3 2 1 7 5 6 4时,1入
90 0
[LeetCode]--61. Rotate List
Given a list, rotate the list to the right by k places, where k is non-negative. For example: Given 1-&gt;2-&gt;3-&gt;4-&gt;5-&gt;NULL and k = 2, return 4-&gt;5-&gt;1-&gt;2-&gt;3-&gt;NULL
1022 0
[LeetCode]--155. Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) – Push element x onto stack. pop() – Removes the element on top of the stack. to
1028 0