Skip to content
Browse files


  • Loading branch information...
santosomar committed Jan 16, 2019
1 parent 34e86d5 commit d0fd618943d6e24234ca194ebea8c1016dab07a7
Showing with 13 additions and 0 deletions.
  1. +13 −0 buffer_overflow_example/
@@ -29,3 +29,16 @@ int main()

The `char buffer[20];` is a really bad idea. The rest will be demonstrated in the course.

You can compile this code or use the already-compiled binary [here](

For 32 bit systems you can use [gcc]( as shown below:
gcc vuln.c -o vuln -fno-stack-protector
For 64 bit systems

gcc vuln.c -o vuln -fno-stack-protector -m32
`-fno-stack-protector` disabled the stack protection. Smashing the stack is now allowed. `-m32` made sure that the compiled binary is 32 bit. You may need to install some additional libraries to compile 32 bit binaries on 64 bit machines.

0 comments on commit d0fd618

Please sign in to comment.
You can’t perform that action at this time.