34C3 CTF 部分pwn writeup

已有 9 条评论
  1. Aaron Aaron

    你博客的RSS无法订阅,feedburner显示RSS源无效

    1. 试下其他订阅工具呢

  2. p4nda p4nda

    求问大佬,在调试tcache时,static __thread tcache_perthread_struct *tcache这种thread-local变量,如何用gdb查看其变量的值呢?
    每次都提示:
    Cannot find thread-local storage for process 25588, shared library /lib/x86_64-linux-gnu/libc.so.6:
    Cannot find thread-local variables on this target

    1. tcache好像是glibc 2.26才开始有,一般情况下是有个tcache符号的,p tcache,要看指定线程对应的tcache,可以thread命令切过去再查看

      1. p4nda p4nda

        我用thread 跳转过去,然后再p tcache 还是提示那个东西... 怕不是个假的gdb。不过我想到了另外一种方法,这个*tache变量是个指针,真正的数据是在初始化时用_int_malloc直接分配的,我找了这个分配区分配的第一个内存块就找到实际的 tache_perthread_struct结构体了。还是膜bird师傅...

        1. 可能符号去了也说不定,tcache好像是在开头的

          1. p4nda p4nda

            tcache那个指针是__thread变量,可能在TLS段,因为我看了一下libc.so.6那部分对tcache指针的访问是用 *MK_FP(__FS__, 64LL)。然后指针的内容使用_int_malloc申请的,所以真正的tcache结构在堆中。但是__thread变量咋看,我用gdb调试的时候显示FS寄存器的值是0...

  3. menglong menglong

    bird大佬太强啦!

  4. Seriously many of good material.

添加新评论