s*i 发帖数: 388 | 1 自己也用过好几个exploit的程序,搞fedora获得root。但是不知道那些牛人们,用
buffer
overflow来attack的人是怎么计算出要覆盖的内存地址的阿?
难道那些heap ram地址不是动态的么?怎么能那么精准的计算出需要覆盖的位置阿? |
s********k 发帖数: 6180 | 2 我知道的buffer overflow都是在stack上作文章,不是heap。比如写个子函
数开个byte a[10],最后用指针指向*(a+11),当然这个是最简单的,不过原理
应该就是这样。
还有就是现在的编译器基本都有功能避免buffer overflow,VC,GCC只需要
在编译选项中设定一下就可以了
人们,用
位置阿?
【在 s*i 的大作中提到】 : 自己也用过好几个exploit的程序,搞fedora获得root。但是不知道那些牛人们,用 : buffer : overflow来attack的人是怎么计算出要覆盖的内存地址的阿? : 难道那些heap ram地址不是动态的么?怎么能那么精准的计算出需要覆盖的位置阿?
|
t****t 发帖数: 6806 | 3 why it's heap? buffer overflow usually happens on stack.
and why you think it's "dynamic"?
【在 s*i 的大作中提到】 : 自己也用过好几个exploit的程序,搞fedora获得root。但是不知道那些牛人们,用 : buffer : overflow来attack的人是怎么计算出要覆盖的内存地址的阿? : 难道那些heap ram地址不是动态的么?怎么能那么精准的计算出需要覆盖的位置阿?
|
t****t 发帖数: 6806 | 4 it's not avoid buffer overflow, it's avoid execution on data segment. and
CPU provided the function, not compiler.
【在 s********k 的大作中提到】 : 我知道的buffer overflow都是在stack上作文章,不是heap。比如写个子函 : 数开个byte a[10],最后用指针指向*(a+11),当然这个是最简单的,不过原理 : 应该就是这样。 : 还有就是现在的编译器基本都有功能避免buffer overflow,VC,GCC只需要 : 在编译选项中设定一下就可以了 : : 人们,用 : 位置阿?
|
s********k 发帖数: 6180 | 5 是CPU提供的?我怎么记得是compiler?或者compiler告诉CPU?能详细讲讲
CPU怎么避免的吗?另外如果只是个单片机之类的,CPU也有这个功能?
data segment. and
【在 t****t 的大作中提到】 : it's not avoid buffer overflow, it's avoid execution on data segment. and : CPU provided the function, not compiler.
|
s*i 发帖数: 388 | 6 well, technically both heap and stack are growing towards each other, so
there
is no much difference wrt exploit.
u can
int *p = malloc(10); //heap
p[11] = 100;
or
int p[10]; //stack
p[11] = 100;
and basically u r gonna access some other place.
"dynamic" means, if your executable is complicated enough, each time the OS
is
gonna allocate different place in the ram to it. not "fix".
【在 t****t 的大作中提到】 : why it's heap? buffer overflow usually happens on stack. : and why you think it's "dynamic"?
|
t****t 发帖数: 6806 | 7 堆栈上溢出了会冲掉返回地址, 堆上溢出有什么用?
至于每次是不是分配不同的地址, 你为什么不写个程序把地址打印出来看看?
【在 s*i 的大作中提到】 : well, technically both heap and stack are growing towards each other, so : there : is no much difference wrt exploit. : u can : int *p = malloc(10); //heap : p[11] = 100; : or : int p[10]; //stack : p[11] = 100; : and basically u r gonna access some other place.
|
t****t 发帖数: 6806 | 8 google DEP
【在 s********k 的大作中提到】 : 是CPU提供的?我怎么记得是compiler?或者compiler告诉CPU?能详细讲讲 : CPU怎么避免的吗?另外如果只是个单片机之类的,CPU也有这个功能? : : data segment. and
|
M**u 发帖数: 10158 | 9 主要就是写一堆binary,把return address给覆盖了之类
【在 s********k 的大作中提到】 : 我知道的buffer overflow都是在stack上作文章,不是heap。比如写个子函 : 数开个byte a[10],最后用指针指向*(a+11),当然这个是最简单的,不过原理 : 应该就是这样。 : 还有就是现在的编译器基本都有功能避免buffer overflow,VC,GCC只需要 : 在编译选项中设定一下就可以了 : : 人们,用 : 位置阿?
|