[Binary Bomb – Phase 4

I hope it’s obvious that phase4 is checking that the first number is in the range 0..14 inclusive (see lines +44..+57) Then it invokes func4 with three arguments: the first number entered, 0 and 14 (lines +62..+85). Next it checks that the return value is 0x25 (37 decimal) on line +90 and that the second … Read more

What is the jmpq command doing in this example

From the GAS-manual: An Intel syntax indirect memory reference of the form is translated into the AT&T syntax where base and index are the optional 32-bit base and index registers, disp is the optional displacement, and scale, taking the values 1, 2, 4, and 8, multiplies index to calculate the address of the operand. (https://sourceware.org/binutils/docs/as/i386_002dMemory.html#i386_002dMemory) … Read more

GDB no such file or directory

I’m following these lessons from OpenSecurityTraining. I’ve reached the lab part where I’ve to train myself on a CMU Bomb. They provide a x86_64 compiled CMU Bomb that you can find here to train on : CMU Bomb x86-64 originally from a 32-bit bomb from CMU Labs for Computer Systems: A Programmer’s Perspective (CS:APP) 1st … Read more

“please check gdb is codesigned – see taskgated(8)” – How to get gdb installed with homebrew code signed?

This error occurs because OSX implements a pid access policy which requires a digital signature for binaries to access other processes pids. To enable gdb access to other processes, we must first code sign the binary. This signature depends on a particular certificate, which the user must create and register with the system. To create … Read more

gdb can’t access memory address error

When I type x/xw 0x208c it gives me back error which says Cannot access memory at address 0x208c The disassembly for your program says that it does something like this: In other words, the 0x208c is a value (8332) that your program has hard-coded in it, and is not a pointer. Therefore, GDB is entirely … Read more

gdb: No symbol “i” in current context

It has probably been optimised out of your compiled code as you only use feature_mask[i] within the loop. Did you specify an optimization level when you called your compiler? If you were using gcc, then just omit any -O options and try again.

gdb split view with code

It’s called the TUI (no kidding). Start for example with gdbtui or gdb -tui … Please also see this answer by Ciro Santilli. It wasn’t available in 2012 to the best of my knowledge, but definitely worth a look.

no debugging symbols found when using gdb

Some Linux distributions don’t use the gdb style debugging symbols. (IIRC they prefer dwarf2.) In general, gcc and gdb will be in sync as to what kind of debugging symbols they use, and forcing a particular style will just cause problems; unless you know that you need something else, use just -g.