Skip to content

Instantly share code, notes, and snippets.

@fgsahoward
Created June 11, 2018 15:23
Show Gist options
  • Save fgsahoward/ba53295a338d339a1599d07f7dc24db2 to your computer and use it in GitHub Desktop.
Save fgsahoward/ba53295a338d339a1599d07f7dc24db2 to your computer and use it in GitHub Desktop.
[howard@sterling shellcodes]$ gdb -q bin/shell3_64
Reading symbols from bin/shell3_64...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/howard/repos/bof/shellcodes/bin/shell3_64
Program received signal SIGSEGV, Segmentation fault.
0x0000000000400088 in system_call ()
(gdb) disas system_call
Dump of assembler code for function system_call:
0x000000000040007e <+0>: mov (%rsp),%r8
0x0000000000400082 <+4>: xor %r9,%r9
0x0000000000400085 <+7>: mov $0x41,%r9b
=> 0x0000000000400088 <+10>: xor %r9b,0x7(%r8)
0x000000000040008c <+14>: mov %r8,%rdi
0x000000000040008f <+17>: mov 0x8(%rsp),%r8
0x0000000000400094 <+22>: xor %r9,0x2(%r8)
0x0000000000400098 <+26>: mov %rsp,%rsi
0x000000000040009b <+29>: xor %rdx,%rdx
0x000000000040009e <+32>: xor %rax,%rax
0x00000000004000a1 <+35>: mov $0x3b,%al
0x00000000004000a3 <+37>: syscall
End of assembler dump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment