From 10c8687cb475300ed325d10d272681bbb8a256e6 Mon Sep 17 00:00:00 2001 From: Omar Santos Date: Mon, 22 Feb 2021 17:23:20 -0500 Subject: [PATCH] Update strcpy_example.md --- buffer_overflow_example/strcpy_example.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buffer_overflow_example/strcpy_example.md b/buffer_overflow_example/strcpy_example.md index 48b2526..85ae555 100644 --- a/buffer_overflow_example/strcpy_example.md +++ b/buffer_overflow_example/strcpy_example.md @@ -43,6 +43,8 @@ The local array `buffer[]` in `omarsucks()` has 12 bytes of memory. The `omarsuc It should be noted that stacks grow from high address to low address, but buffers still grow in the normal direction (i.e., from low to high). Therefore, when we copy data to `buffer[]`, we start from `buffer[0]`, and eventually to `buffer[11]`. If there are still more data to be copied, `strcpy()` will continue copying the data to the region above the buffer, treating the memory beyond the buffer as `buffer[12]`, `buffer[13]`, and so on. - +The following is the stack after exploitation: + +