I understand what buffer overflow is. As the literature says, "A buffer overflow occurs when a fixed-length buffer reaches its capacity and a process attempts to store data above and beyond that maximum limit." So, I am accessing areas of the memory which is beyond the data area, may be I am accessing the system area. Correct me if I am wrong, please see my question 1 at the end.

Also, I find this definition, "A root buffer overflow is a buffer overflow intended to attain root privileges to a system."

Now, my questions are,

  1. How come a user process writes in the system area of memory? Is not the OS capable of protecting itself or its memory area? Or may be I am mistaken.
  2. How come a root buffer overflow causes a process to attain root privileges to a system? Because, as my knowledge goes, you need to execute commands like su or sudo or some such and then provide a sacred password in order to attain this.

Yes, I have already taken a look at this question and the excellent answer.

  1. It doesn't write to the "system area" of memory. It's still in the user process's memory space. What the attacker generally tries to write to user memory is "shellcode" that essentially gets him a command prompt on the system. For a non-root process, this would be a non-root shell. However, such a shell is still useful as a basis towards further attacks. For example, there are sometimes kernel bugs that allow a local user to attain root privileges. In that case, a normal shell is a direct stepping stone to a root shell.
  2. Your term "root buffer overflow" most likely just means a buffer overflow attack on a program running as root. In that case, a successful attack would get you not just a shell, but a root shell.
  • 2
    root buffer overflow = buffer overflow that can be exploited to gain privilege escalation to run as root. lpr had some nasty ones back when. – Fiasco Labs Mar 8 '13 at 6:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.