A Brief Introduction to the Underlying Mechanisms of Linux Program Execution

A Brief Introduction to the Underlying Mechanisms of Linux Program Execution

🌟 1. Program Startup: From “Forking” to “Transforming” Forking After entering a command, the Shell instantlyforks a child process, where the parent and child share resources, but throughCopy-On-Write (COW) optimization—only when data is modified do they “split”, saving time and effort! Transforming (execve) The child process calls<span>execve</span> to replace its genes: the kernel parses the … Read more

Linux x86 Buffer Overflow Level 3: Simple Buffer Overflow, Bypassing DEP and ASLR Protection via ROP

Linux x86 Buffer Overflow Level 3: Simple Buffer Overflow, Bypassing DEP and ASLR Protection via ROP

Preparation Work Enable ASLR and DEP protection. sudo -s echo 2 > /proc/sys/kernel/randomize_va_space To enable DEP protection, simply remove the<span>-z execstack</span> option when compiling with gcc. <span>gcc -m32 -fno-stack-protector -o level3 level3.c</span> Randomized Base Address The following shows the maps situation when running level3 multiple times. First Run $ cat /proc/22020/maps 56652000-56653000 r–p 00000000 08:03 … Read more