How to conduct buffer overflow in PHP/Python?

后端 未结 6 658
梦谈多话
梦谈多话 2020-12-11 05:18

Here is an example in c:

#include 
#include 

void bad() {
    printf(\"Oh shit really bad~!\\r\\n\");
}

void foo() {
    cha         


        
6条回答
  •  感情败类
    2020-12-11 05:52

    The fact that Python and PHP are interpreted like suggested by others isn't actually the point. The point is that almost all of the APIs and language semantics that they expose are heavily error-checked making it impossible to have exploitable undefined behavior. Even if you compile the languages, it would still be impossible. This doesn't mean that you couldn't expose unsafe APIs that can do whatever. In fact, using Pythons ctypes module, it should be possible to create a similar behavior, but significantly harder to do so by accident.

提交回复
热议问题