root@kali:~/ohm/canary# gcc -fstack-protector -g -o bypass bypass.c 
root@kali:~/ohm/canary# gdb bypass 
GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from bypass...done.
(gdb) break bypass.c :9
Breakpoint 1 at 0x7ff: file bypass.c, line 9.
(gdb) run AAAAAAAAAAA
Starting program: /root/ohm/canary/bypass AAAAAAAAAAA

Breakpoint 1, check_serial (serial=0x7fffffffe4b5 'A' <repeats 11 times>)
    at bypass.c:9
9	  if (strcmp(serial_buff, "SN123456") == 0) flag = 1;
(gdb) x/32xw $rsp
0x7fffffffe050:	0x000000c2	0x00000000	0xffffe4b5	0x00007fff
0x7fffffffe060:	0x00000001	0x00000000	0xf7abe905	0x00000000
0x7fffffffe070:	0x41414141	0x41414141	0x00414141	0x00005555
0x7fffffffe080:	0xf7de70e0	0x00007fff	0x34f4e300	0x9eefd453
0x7fffffffe090:	0xffffe0b0	0x00007fff	0x55554883	0x00005555
0x7fffffffe0a0:	0xffffe198	0x00007fff	0x00000000	0x00000002
0x7fffffffe0b0:	0x555548b0	0x00005555	0xf7a3fa87	0x00007fff
0x7fffffffe0c0:	0x00000000	0x00000000	0xffffe198	0x00007fff
(gdb) 

