root@kali:~/ohm/tcp_bind# gdb bypass_server 
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_server...done.
(gdb) break bypass_server.c :14
Breakpoint 1 at 0xa5c: file bypass_server.c, line 14.
(gdb) run
Starting program: /root/ohm/tcp_bind/bypass_server 
Waiting for a client...
Accepted a connection from [127.0.0.1, 60114]

Breakpoint 1, check_serial (serial=0x555555757260 "AAAAAAAA")
    at bypass_server.c:14
14	    if (strcmp(serial_buff, "SN123456") == 0) flag = 1;
(gdb) x/80xw $rsp
0x7fffffffdf10:	0xf7fd7490	0x00007fff	0x55757260	0x00005555
0x7fffffffdf20:	0x41414141	0x41414141	0x0000ea00	0x00000000
0x7fffffffdf30:	0x55554920	0x00005555	0xffffe190	0x00007fff
0x7fffffffdf40:	0x00000000	0x00000000	0x00000000	0x00000000
0x7fffffffdf50:	0xffffe0b0	0x00007fff	0xf7a73de4	0x00007fff
0x7fffffffdf60:	0x00000020	0x00000030	0xffffe040	0x00007fff
0x7fffffffdf70:	0xffffdf80	0x00007fff	0xbf46e100	0x52927e4a
0x7fffffffdf80:	0x00000000	0x00000000	0x00000000	0x00000000
0x7fffffffdf90:	0xf7fd7490	0x00007fff	0x0000ead2	0x00000000
0x7fffffffdfa0:	0x00000001	0x00000000	0xffffdd87	0x00007fff
0x7fffffffdfb0:	0x00000018	0x00000000	0xf7a97c4e	0x00007fff
0x7fffffffdfc0:	0x0000007c	0x00000077	0x00000018	0x00000000
0x7fffffffdfd0:	0x00000018	0x00000000	0xf7dd3680	0x00007fff
0x7fffffffdfe0:	0x00000001	0x00000000	0x55554cd1	0x00005555
0x7fffffffdff0:	0xf7dcf2a0	0x00007fff	0xf7a8c637	0x00007fff
0x7fffffffe000:	0x00000000	0x00000000	0x00000000	0x00000000
0x7fffffffe010:	0xffffe0b0	0x00007fff	0xf7b263d6	0x00007fff
0x7fffffffe020:	0x0000ead2	0x00000000	0xf7ffe170	0x00000000
0x7fffffffe030:	0xffffe0b0	0x00007fff	0x55554b9a	0x00005555
0x7fffffffe040:	0xffffe198	0x00007fff	0x00f0b5ff	0x00000001
(gdb) x/x serial_buff
0x7fffffffdf20:	0x41414141
(gdb) x/x &flag
0x7fffffffe02c:	0x00000000
(gdb) print 0x7fffffffe02c - 0x7fffffffdf20
$1 = 268
(gdb) print 0x7fffffffe038 - 0x7fffffffdf20
$2 = 280
(gdb) 

