阅读背景:

将shellcode声明为char []数组和char *之间的区别?

来源:互联网 

Hi all,

大家好,

I'm trying to learn basic shellcoding and I've run across something curious that I hope someone can explain to me. I've compiled the following code two ways: declaring the shellcode as an array and as a char*. When I declare shellcode as an array, linux detects that I am trying to execute data and I get a segfault on the first instruction. However, when I declare shellcode as a char* all of the shellcode executes and I get a "Hello world!". How does the compiler treat these two declarations differently and why does one end in shellcode that lives in memory that is unprotected? Thanks in advance.I'm trying to learn basic shel




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: