随笔分类 -  glibc调试

摘要:先贴下人家的 改天自己逆一下 https://blog.csdn.net/Plus_RE/article/details/79265805 阅读全文
posted @ 2021-03-09 21:04 PYozo_free 阅读(359) 评论(0) 推荐(0)
摘要:之前我们简单的分析了libc-.2.23与libc-.2.29的ptmalloc 与 free 但是再libc-2.27以后,出现了一个新的结构体名为tache,此结构体跟fast bin有点像,主要是为了提高chunk 的利用效率(因为其直接指向的mem_content部分),但再安全上面没有fa 阅读全文
posted @ 2021-02-06 23:04 PYozo_free 阅读(271) 评论(0) 推荐(0)
摘要:上一篇我们介绍了malloc的分配 我们可以了解到再malloc时候,操作系统会跑到一个叫mstate的结构体里面取寻找满足条件的bin,如果没有满足条件的,就会调用top chunk来获取chunk,还不行,就会调用bk指针来将top chunk变大 这里我们来说一下free函数 源码分析 __l 阅读全文
posted @ 2021-02-05 22:26 PYozo_free 阅读(1328) 评论(0) 推荐(0)
摘要:写了几十道堆题了,但是在写堆题的时候,还是有很多不懂,所以打算自己逆一逆,来搞清楚大部分安全的条件 学习步骤大概是这样的:先看glibc堆内存管理,在自己逆一编,顺带一说,准备开始完结xp的学习和linux网络编程了 我这里借用了以前逆向fopen的函数 结构体介绍 struct malloc_st 阅读全文
posted @ 2021-01-27 19:11 PYozo_free 阅读(841) 评论(0) 推荐(0)
摘要:看着raycp师傅的文章分析,只剩最后两个函数了fwrite、fclose 源码样例 #include<stdio.h> #include<stdlib.h> int main(){ char *data=malloc(0x1000); FILE*fp=fopen("test","wb"); fwr 阅读全文
posted @ 2021-01-15 18:38 PYozo_free 阅读(891) 评论(0) 推荐(0)
摘要:源码样例 #include<stdio.h> int main(){ char data[20]; FILE*fp=fopen("test","rb"); fread(data,1,20,fp); return 0; } 源码分析 直接进入fread函数 29 _IO_size_t 30 _IO_f 阅读全文
posted @ 2021-01-15 00:06 PYozo_free 阅读(671) 评论(0) 推荐(0)
摘要:最近学习fsop,但一直没学的很明白,所以自己逆一下几个常用的函数 测试代码 #include<stdio.h> int main() { FILE*fp=fopen("test","wb"); char *ptr=malloc(0x20); return 0; } 通过分析进入fopen函数查看, 阅读全文
posted @ 2021-01-14 23:42 PYozo_free 阅读(937) 评论(0) 推荐(1)
摘要:https://www.jianshu.com/p/1a966b62b3d4 https://xuanxuanblingbling.github.io/ctf/tools/2020/03/20/gdb/ 或者这样编译 sudo gcc test.c -o test -Wl,-I /home/lukb 阅读全文
posted @ 2021-01-13 14:12 PYozo_free 阅读(246) 评论(0) 推荐(0)