title: Understanding the causes of the stack overflow attack
body: <p>Go deeper into the causes of the vulnerability, such as a stack buffer overflow, I have a number of questions, which I find difficult to answer:</p>
  
  <ol>
  <li><p>Maybe a stupid question, but still, why in the OS, such as Windows, buffer recording on the stack occurs in the direction already recorded information:
  <a href="http://s27.postimg.org/udizo3itf/Stack_Overflow_2.png" rel="nofollow">http://s27.postimg.org/udizo3itf/Stack_Overflow_2.png</a> and not something like that: <a href="http://s18.postimg.org/q6kje5up5/Stack_Overflow_22.png" rel="nofollow">http://s18.postimg.org/q6kje5up5/Stack_Overflow_22.png</a>
  Then, if the allocated memory is not enough to contain the buffer, the program just crashes (an attempt to appeal to unallocated memory) and the return address from the function not overwrites.</p></li>
  <li><p>Does the stack overflow attack make sense only when the target program has the high permissions in the system? How this vulnerability helps attacker, for example, to create backdoor? If the stack overflow attack needs to inject shellcode, so it means that the attacker already gets system control and can do everything he want(stack overflow attack is unnecessary), or it means that the user has to do something that is needed for attacker(in this case, the attacker can persuade a user to run an executable file that does everything he needs - stack overflow attack is unnecessary).</p></li>
  </ol>
  
  <p>Please specify where my reasoning is wrong.</p>