gcc關閉地址隨機化,attach 進程時候發(fā)現(xiàn)函數(shù)地址變化,。
我在測試一個題目,,出現(xiàn) Got EOF while reading in interactive 現(xiàn)象。
我所編譯得文件已經(jīng)關閉了地址隨機化,,在exp 運行過程中還是發(fā)現(xiàn)了地址變化,。詳細如下:
1;我編譯得命令:
gcc -m32 -fno-stack-protector -no-pie -o test test.c
2,;checksec 查尋如下:

3,;使用gdb調(diào)試,print 函數(shù)地址

4,;編寫exp ,,運行發(fā)現(xiàn)錯誤

5;調(diào)整exp ,,進行調(diào)試,,代碼如下:

6;調(diào)試發(fā)現(xiàn),,在exp執(zhí)行過程中system 得地址已經(jīng)改變

7,;補充說明:python使用得是PyCharm 生成得虛擬運行環(huán)境。
8,;源碼:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void vulnerable_function()
{
char buf[128];
read(STDIN_FILENO, buf, 256);
}
int main(int argc, char** argv)
{
vulnerable_function();
write(STDOUT_FILENO, "Hello, World\n", 13);
}
請問:為什么會產(chǎn)生如此現(xiàn)象,?