【发布时间】:2018-12-28 12:37:46
【问题描述】:
我正在尝试学习如何使用缓冲区溢出来更改 esp 中的地址以运行 shell 代码;我已经定义了一个名为“SHELLCODE”的环境变量来存储 shell 代码的执行,但是每当我运行 getenv 函数来获取该环境变量的地址时,地址就会超时;
Onurcans-MacBook-Air:ArtofExploitation onurcanbektas$ ./genenv_exp SHELLCODE
SHELLCODE is at 0x7fff507b9bd5
Onurcans-MacBook-Air:ArtofExploitation onurcanbektas$ ./genenv_exp SHELLCODE
SHELLCODE is at 0x7fff5fb4abd5
Onurcans-MacBook-Air:ArtofExploitation onurcanbektas$ ./genenv_exp SHELLCODE
SHELLCODE is at 0x7fff54ca5bd5
Onurcans-MacBook-Air:ArtofExploitation onurcanbektas$ ./genenv_exp SHELLCODE
SHELLCODE is at 0x7fff5d633bd5
Onurcans-MacBook-Air:ArtofExploitation onurcanbektas$ ./genenv_exp SHELLCODE
SHELLCODE is at 0x7fff50bedbd5
Onurcans-MacBook-Air:ArtofExploitation onurcanbektas$ ./genenv_exp SHELLCODE
SHELLCODE is at 0x7fff5d5f9bd5
Onurcans-MacBook-Air:ArtofExploitation onurcanbektas$ ./genenv_exp SHELLCODE
SHELLCODE is at 0x7fff5bc6ebd5
Onurcans-MacBook-Air:ArtofExploitation onurcanbektas$ ./genenv_exp SHELLCODE
SHELLCODE is at 0x7fff5589bbd5
这是什么原因?如何防止这种情况发生?
【问题讨论】:
标签: shell buffer-overflow shellcode