GDB Help

Hello, I am at the “Attacking Applications Connecting to Services” section on the Attacking Common Applications Module. In this section they tell you to use gdb to examinate an elf file and put a breakpoint at a specific address, my concern is why does the address shown at the module have a different format than the one that i get. Furthermore, using the address that i get doesn’t work but using the one on the module does work.

Format of the address on the module:

My address:

In the module they tell you to put a breakpoint on the SQLDriverConnect@plt call address:

, but if i use mine i get the following error:
984a5a90bd6bbda7067c98f6c27e0541

I finished the module using the address format that they give you on the module, but I don’t know how i should be able to get that format. Any help? :frowning:

For others who may be unable to understand debuggers, at least for this exercise, try doing the following:

  1. set a breakpoint where it won’t work.
  2. type run to execute and get error
  3. type set disassembly intel
  4. type disas main
    Then you should be able to see the same info as in the screenshot.
1 Like

Hi dannoura, can you explain more about this topic?

I did run into the same issue. Think out of the box… use strings rather than gdb.

You can thank me later.

1 Like

gdb octopus_checker
# In GDB
file octopus_checker
set disasembly intel
disas main

Now it should spit out the correct addresses. I have nofucking clue why this ■■■■ works like that in this exercise. I messed around with reversing ■■■■ before this is the first time I had to respecify the file for the debugger to work…
Then again, I worked with Ghidra more than GDB so ye.

Retarded but it sometimes happens on this platform.

Still having the exact same issue here. Can confirm using the address they show on the module works, but still annoying.

Also encountered a problem where GDB refused to print the whole string associated with the register. The string was being cut short right before it revealed the credentials.

This command made it spit out the whole thing: print (char*)$rdx

you need to run before adding the breakpoint

run then add the breakpoint then run again

credit to discord user rami3l for the advice above. copying here for future users.