diff --git a/docs/binary-exploitation/buffer-overflow.md b/docs/binary-exploitation/buffer-overflow.md index f321be04..e7af06c1 100644 --- a/docs/binary-exploitation/buffer-overflow.md +++ b/docs/binary-exploitation/buffer-overflow.md @@ -75,7 +75,7 @@ The remaining 152 bytes would continue clobbering values up the stack. How can we use this to pass the seemingly impossible check in the original program? Well, if we carefully line up our input so that the bytes that overwrite `secret` happen to be the bytes that represent 0x1337 in little-endian, we'll see the secret message. -A small Python one-liner will work nicely: `python -c "print 'A'*100 + '\x31\x13\x00\x00'"` +A small Python one-liner will work nicely: `python -c "print 'A'*100 + '\x37\x13\x00\x00'"` This will fill the `name` buffer with 100 'A's, then overwrite `secret` with the 32-bit little-endian encoding of 0x1337.