How are buffer overflows used to exploit computers?

后端 未结 5 1632
不知归路
不知归路 2020-12-13 07:28

How are buffer overflows used to exploit computers?

How is one able to execute arbitrary code simply by causing stack or heap overflows?

I understand that

5条回答
  •  醉话见心
    2020-12-13 08:02

    The stack contains both data and return address when you jump into a subroutine. If you manage to put a specific address on the stack where the return address is, you can force the CPU to jump to a particular memory location, the one where y ou put your own code. That's for buffer overflows. Heap overflows is a bit different and more difficult to exploit.

    Stack overflows are just indication that you've run out of stack space (which is generally more limited, especially in the kernel).

提交回复
热议问题