Disable the randomization of the stack in linux

Source: Internet
Author: User
Today, I finally found a method for shutting down linux's random processing of Stacks. I 've been struggling with this issue several times, but Baidu doesn't have any information, I had to use an early system such as ubuntu4 to learn how to mine vulnerabilities (no way, I can't deal with stack randomization as a beginner). today... today, I finally found a method for shutting down linux's random processing of Stacks. I 've been struggling with this issue several times, but Baidu doesn't have any information, I had to use an early system such as ubuntu4 to learn how to mine vulnerabilities (no way, I can't deal with the randomization of stacks as a beginner). I checked the materials today and found a solution by chance. ========================================================== ========================================================== ============= Getting started with buffer overflow light speed: "... your Kernel performs stack random processing. this mechanism is used to prevent overflow. it is very useful for security, but it brings a lot of trouble for you to learn. for the convenience of learning, run the following command to disable the kernel function: sudo root. however, echo 0>/proc/sys/kernel/randomize_va_space. if it is a RedHat series, you can disable it by using echo 0>/proc/sys/kernel/exec-shield-randomize.) "======================================================== ========================================================== ================ In ubuntu10.4, the experiment is as follows: more/proc/sys/kernel/randomize_va_space 2 This is the original value ==================== ============ try to use vi to write 0, tip: "/proc/sys/kernel/randomize_va_space" E667: Fsync failed Press ENTER or type command to continue. why? A: U cannot edit the/proc files with vi. if u want to change its value u can echo to that file like echo "20000000">/proc/sys/kernel ================ ==================================#echo 0>/proc/sys/kernel/randomize_va_space # more/proc/ sys/kernel/randomize_va_space 0 ================================== === Use the following program, check whether the modification is successful: more find_start.c # include Unsigned long find_start (void) {_ asm _ ("movl % esp, % eax");} int main () {printf ("0x % x \ n ", find_start ());}. /find_start 0xbffff738. /find_start 0xbffff738. /find_start 0xbffff738. /find_start 0xbffff738. /find_start 0xbffff738 is the same, indicating that the linux stack randomization function has been disabled.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.