readme

来自「this gives details of the network progra」· 代码 · 共 29 行

TXT
29
字号
Some files that demonstrate buffer overflow and stack smashing.execls: just shows how to use the exec() system call (it exec's /bin/ls).ov.c: a function that modifies the return address to point to a string.      The string actually holds a small version of execls. Once the subroutine      returns, it execs /bin/ls instead.vulnerable.c: a program with an overflowable buffer. This program reads from  standard input and then stuffs whatever it got into a string. If we give   it the right string (that is too large for the buffer and happens to  hold a program and substitute return-address - we can turn the program  into /bin/ls!genpgm.c: a program that prints out a string that happens to be what we needto mess up the vulnerable program (to make it exec /bin/ls). genpgm needs anoffset specified as a command line parameter - it adds this offset to thefixed number it assumes is the address of the buffer it is overflowing (used to replace the return address on the stack). Usage:genpgm 16 | ./vulnerable16 seems to work.Note that genpgm and vulnerable are tuned to a specific OS(Linux),compiler, libraries, etc. These won't work withoutmodification on other machines/versions of Linux, etc.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?