Tec*_*eks 18
您可以轻松生成您要查找的列表,如下所示:
int global_j = 0;
void main ()
{
char *h = malloc(10);
int j = 0;
printf ("Globals are : %p, text is %p, stack is %p, heap is %p\n",
&global_j, main, &j, h);
}
Run Code Online (Sandbox Code Playgroud)
在山狮上,这产生:
bash-3.2# ./a
Globals are : 0x10fa55020, text is 0x10fa54eb0, stack is 0x7fff501ab864, heap is 0x7f9b294000e0
bash-3.2# ./a
Globals are : 0x106bbe020, text is 0x106bbdeb0, stack is 0x7fff59042864, heap is 0x7f9752c000e0
bash-3.2# ./a
Globals are : 0x108673020, text is 0x108672eb0, stack is 0x7fff5758d864, heap is 0x7fecc34000e0
bash-3.2# ./a
Globals are : 0x1059d2020, text is 0x1059d1eb0, stack is 0x7fff5a22e864, heap is 0x7f8f81c000e0
Run Code Online (Sandbox Code Playgroud)
显示充足的随机对所有(注意,由于对准限制页内偏移量没有得到随机的,但你仍然得到一些16-20位的随机化,由4-5个十六进制数字,其变化暗示).
希望这可以帮助,
TG
没有PIE:
可执行 - 已修复
数据 - 修正
堆 - 每次执行随机化
堆栈 - 固定
库 - 每个设备启动随机化
链接器 - 固定
使用PIE:
可执行 - 每次执行随机化
数据 - 每次执行随机化
堆 - 每次执行随机(更多熵)
堆栈 - 每次执行随机化
库 - 每个设备启动随机化
链接器 - 每次执行随机化
归档时间: |
|
查看次数: |
2307 次 |
最近记录: |