Skip to content

Commit 6874299

Browse files
committed
Add some content for buffer overflow
1 parent f9e2844 commit 6874299

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

buffer_overflow/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Buffer Overflow
2+
3+
### Overview
4+
5+
One of the simplest "pwn" attacks is a buffer overflow. The idea is that a faulty program has allocated a buffer of a certain size, but allows you to write more than that size.
6+
7+
For example, `input_buffer` is only 16 bytes, but `gets` allows you to input as many characters as you want. So at some point you are writing over memory you are not supposed to, and we can use this to our advantage!
8+
9+
### The Stack
10+
11+
For many this may be the first time learning about the stack. Here is a diagram:
12+
13+
![Stack Diagram](https://eli.thegreenplace.net/images/2011/08/x64_frame_nonleaf.png)
14+
15+
Note that this is from: https://eli.thegreenplace.net/2011/09/06/stack-frame-layout-on-x86-64, you should check it out for a primer! But don't worry if some details go over your head.

0 commit comments

Comments
 (0)