Practicing buffer overflow attack in Ubuntu

前端 未结 5 1734
我在风中等你
我在风中等你 2021-02-10 00:02

I am trying to learn to use buffer overflow attack in Ubuntu. Unfortunately, I cannot turn off Address Space Layout Randomization (ASLR) feature in this OS, which is turned on b

相关标签:
5条回答
  • You can turn off ASLR for a particular process by launching with setarch

    For 32 bit programs:

    setarch i386 -R yourProgram
    

    For 64 bit programs:

    setarch x86_64 -R yourProgram
    
    0 讨论(0)
  • 2021-02-10 00:29

    to echo to files with root acces using sudo you can use the following code:

    echo "0" | sudo tee /proc/sys/kernel/randomize_va_space
    
    0 讨论(0)
  • You will need root perms before attempting it, and if I'm not mistaken, to restart once you've done it.

     sudo -i
     echo "0" > /proc/sys/kernel/randomize_va_space
    
    0 讨论(0)
  • 2021-02-10 00:33

    found it myself

    you have to compile this way:

    gcc -fno-stack-protector -z execstack -o OUTPUT INPUT.c

    0 讨论(0)
  • 2021-02-10 00:33

    gcc compile with -fno-stack-protector

    0 讨论(0)
提交回复
热议问题