root@kali:~/ohm/bypass# 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 :8
Breakpoint 1 at 0x77d: file bypass.c, line 8.
(gdb) run AAAAAAAAAA
Starting program: /root/ohm/bypass/bypass AAAAAAAAAA

Breakpoint 1, check_serial (serial=0x7fffffffe4b7 "AAAAAAAAAA") at bypass.c:8
8	  strcpy(serial_buff, serial);
(gdb) next
9	  if (strcmp(serial_buff, "SN123456") == 0) flag = 1;
(gdb) x/x serial_buff
0x7fffffffe070:	0x41414141
(gdb) x/x &flag
0x7fffffffe08c:	0x00000000
(gdb) print 0x7fffffffe08c - 0x7fffffffe070
$1 = 28
(gdb) x/32xw $rsp
0x7fffffffe060:	0x00000001	0x00000000	0xffffe4b7	0x00007fff
0x7fffffffe070:	0x41414141	0x41414141	0x55004141	0x00005555
0x7fffffffe080:	0xf7de70e0	0x00007fff	0x00000000	0x00000000
0x7fffffffe090:	0xffffe0b0	0x00007fff	0x55554800	0x00005555
0x7fffffffe0a0:	0xffffe198	0x00007fff	0x00000000	0x00000002
0x7fffffffe0b0:	0x55554830	0x00005555	0xf7a3fa87	0x00007fff
0x7fffffffe0c0:	0x00000000	0x00000000	0xffffe198	0x00007fff
0x7fffffffe0d0:	0x00040000	0x00000002	0x555547b3	0x00005555
(gdb) 

