Results 1 to 10 of 28

Thread: Pro tips for hooking up the function

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Hm, I wonder if #0 is really the last executed opcode address (program counter, aka PC), since the backtrace should probably be a bit more similiar. Can you post the output of layout asm in gdb?


    Should look something like this:

    Code:
       ┌───────────────────────────────────────────────────────────────────────────┐
       │0x7ffff740d756 <__libc_start_main+214>  mov    0x39670b(%rip),%rax        #│
       │0x7ffff740d75d <__libc_start_main+221>  mov    0x8(%rsp),%rsi              │
       │0x7ffff740d762 <__libc_start_main+226>  mov    0x14(%rsp),%edi             │
       │0x7ffff740d766 <__libc_start_main+230>  mov    (%rax),%rdx                 │
       │0x7ffff740d769 <__libc_start_main+233>  callq  *0x18(%rsp)                 │
      >│0x7ffff740d76d <__libc_start_main+237>  mov    %eax,%edi                   │
       │0x7ffff740d76f <__libc_start_main+239>  callq  0x7ffff7427970 <exit>       │
       │0x7ffff740d774 <__libc_start_main+244>  xor    %edx,%edx                   │
       │0x7ffff740d776 <__libc_start_main+246>  jmpq   0x7ffff740d6b9 <__libc_start│
       │0x7ffff740d77b <__libc_start_main+251>  mov    0x39ca2e(%rip),%rax        #│
       │0x7ffff740d782 <__libc_start_main+258>  ror    $0x11,%rax                  │
       │0x7ffff740d786 <__libc_start_main+262>  xor    %fs:0x30,%rax               │
       │0x7ffff740d78f <__libc_start_main+271>  callq  *%rax                       │
       └───────────────────────────────────────────────────────────────────────────┘
    multi-thre process 3718 In: __libc_start_main     Line: ??   PC: 0x7ffff740d76d 
    #3  0x00007ffff7466eb5 in _IO_do_write () from /lib/x86_64-linux-gnu/libc.so.6
    #4  0x00007ffff74671ff in _IO_file_overflow ()
       from /lib/x86_64-linux-gnu/libc.so.6
    #5  0x0000000000408756 in ?? ()
    #6  0x0000000000403980 in ?? ()
    #7  0x00007ffff740d76d in __libc_start_main ()
       from /lib/x86_64-linux-gnu/libc.so.6
    (gdb)
    timescale 0.01

  2. The Following User Says Thank You to kung foo man For This Useful Post:

    Whiskas (12th May 2016)

  3. #2
    Private Whiskas's Avatar
    Join Date
    Jan 2015
    Posts
    84
    Thanks
    69
    Thanked 20 Times in 17 Posts
    Code:
       lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk
       x                                                                              x
       x                                                                              x
       x                                                                              x
       x                                                                              x
       x                                                                              x
       x                                                                              x
       x             [ No Assembly Available ]                                        x
       x                                                                              x
       x                                                                              x
       x                                                                              x
       x                                                                              x
       x                                                                              x
       x                                                                              x
       mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj
    multi-thre Thread 0xb7099 In:                            Line: ??   PC: 0xb76d9b42
    Cannot access memory at address 0xb76d9b42
    (gdb)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •