随笔分类 - 

1
摘要:UAF改top chunk size 之前我以为想改top chunk size要通过UAF并且加上edit的功能才可以实现。前几天我看到一个纯利用堆风水实现修改top chunk的方法才恍然大悟,在此记录一下。 举个例子,堆布局如下: add(0, 0x420, b'a') add(1, 0x42 阅读全文
posted @ 2022-08-08 08:55 狒猩橙 阅读(136) 评论(0) 推荐(1)
摘要:house of cat 本来很好的一题,结果在比赛前两天出了个house of apple,IO链相似,达成的效果一样。 from pwn import* context(os='linux',arch='amd64',log_level='debug') #s = process('house_ 阅读全文
posted @ 2022-08-03 13:40 狒猩橙 阅读(370) 评论(0) 推荐(0)
摘要:2022 鹏城杯 pwn rainbow_cat 我也不知道我是怎么搞出来的,学技术还得看winmt大师博客https://www.cnblogs.com/winmt/articles/16440009.html from pwn import* context(os='linux',arch='a 阅读全文
posted @ 2022-07-03 16:40 狒猩橙 阅读(225) 评论(2) 推荐(1)
摘要:####exp from pwn import* context.log_level = 'debug' context.arch = 'amd64' #s = process('./examination') s = remote('124.70.130.92',60001) libc = ELF 阅读全文
posted @ 2022-05-09 17:48 狒猩橙 阅读(78) 评论(0) 推荐(0)
摘要:house of storm 是一个结合了 unsorted bin 和 largebin attack 的危害性极高的组合漏洞。其效果是可以实现任意地址申请一个堆块,他的思想主要就是通过 unsorted bin 和 largebin attack 来伪造并链进一个 unsorted bin。 利 阅读全文
posted @ 2022-04-26 17:16 狒猩橙 阅读(249) 评论(2) 推荐(1)
摘要:largebin attack 由这个名字就可以看出是对 largebin 进行的操作,需要的条件是存在 UAF 或者可以构造出 UAF。实现的功能是: 1、任意地址写入一个大数字 2、实现任意地址分配(这个好像也叫 house of strom,以后另开一章来记) 关键源码: else { vic 阅读全文
posted @ 2022-03-16 13:24 狒猩橙 阅读(357) 评论(1) 推荐(1)
摘要:摆烂很长时间之后,终于下定决心来看点新的东西。正好 winmt 师傅前不久把他 pig 修好的附件发给我了,我就借此来学习一下新版本的 IO_FILE 及 house of pig。 新版本的 IO_FILE 利用的函数是老版本中喜欢用的 _IO_str_overflow,我们来看一下 glibc 阅读全文
posted @ 2022-03-11 12:16 狒猩橙 阅读(442) 评论(3) 推荐(1)
摘要:没有附件,只能对着别人文章硬看了。(哪个师傅有附件的话联系我一下,感激不尽) 从肥猫师傅本人的 文章 中得知使用 kiwi 的条件有两点: 1、能够触发 __malloc_assert 2、有任意写的能力,修改 _IO_helper_jumps 结构体 kiwi 的流程是 __malloc_asse 阅读全文
posted @ 2022-02-26 21:22 狒猩橙 阅读(535) 评论(0) 推荐(1)
摘要:看 glibc 2.32 源码: /* Safe-Linking: Use randomness from ASLR (mmap_base) to protect single-linked lists of Fast-Bins and TCache. That is, mask the "next 阅读全文
posted @ 2022-02-20 15:11 狒猩橙 阅读(220) 评论(0) 推荐(2)
摘要:2.27 之前的 off by null 的利用手法总体来说比较简单伪造一个 presize 即可,但是在 glibc 2.29的更新当中,unlink 里加入的 presize check 使得之前的利用手法不再有效,并且 off by null 的难度提高不少。 /* consolidate b 阅读全文
posted @ 2022-02-18 13:22 狒猩橙 阅读(317) 评论(0) 推荐(1)
摘要:tcache stashing unlink atttack 主要利用的是 calloc 函数会绕过 tcache 从smallbin 里取出 chunk 的特性。并且 smallbin 分配后,同大小的空闲块挂进会 tcache。这个攻击可实现两个效果: 1、任意地址上写一个较大的数(和unsor 阅读全文
posted @ 2022-02-16 10:38 狒猩橙 阅读(636) 评论(0) 推荐(1)
摘要:在 glibc 2.29 当中 tcache 增加了 key 字段,让原本的 tcache-dup 不像原来那么简单了。一般来说我们需要破坏 key 字段,才能继续进行 double free。而 house of botcake 采用的思想是避免出现 key 字段那么就无需覆盖。他是在填满 tca 阅读全文
posted @ 2022-02-08 22:37 狒猩橙 阅读(420) 评论(1) 推荐(1)
摘要:off-by-null + unlink from pwn import * context.arch = 'amd64' context.log_level = 'debug' s = process('./ciscn_2019_es_4') #s = remote('node4.buuoj.cn 阅读全文
posted @ 2022-01-29 17:03 狒猩橙 阅读(114) 评论(1) 推荐(1)
摘要:setcontext+orw 大致可以把2.27,2.29做为两个分界点。 我们先来讨论 2.27 及以下的 setcontext + orw 的写法。 首先 setcontext 是什么?了解过 SROP 的师傅应该知道 pwntools 自带了一款可以控制寄存器值的工具。模板如下: frame 阅读全文
posted @ 2022-01-26 19:39 狒猩橙 阅读(3264) 评论(1) 推荐(3)
摘要:House of force是一个堆的小利用技巧,要想利用它需要满足两个条件: 1、可以通过溢出修改 top chunk 的 size 2、分配堆的大小没有限制 通过把 top chunk 的size 改的很大,再malloc一个特定的size,使 top chunk 的位置 恰好在目标位置 -0x 阅读全文
posted @ 2022-01-09 09:39 狒猩橙 阅读(192) 评论(1) 推荐(1)
摘要:之前经常改 malloc_hook , realloc_hook,free_hook 为 one_gadget 来 get shell ,最近看到一种利用是改 exit hook(winmt师傅告诉我 其实没有exit hook,它是函数指针)。 改 exit_hook 有两种改法,一个是改为 on 阅读全文
posted @ 2022-01-05 17:29 狒猩橙 阅读(2541) 评论(2) 推荐(2)
摘要:Ζ一道Ubuntu 16 的unlink,就当复习了一下(摸了好长时间快忘得一干二净了) 主函数:发现show这个函数没用 1 int __cdecl __noreturn main(int argc, const char **argv, const char **envp) 2 { 3 int 阅读全文
posted @ 2022-01-04 10:30 狒猩橙 阅读(185) 评论(1) 推荐(1)
摘要:Ubuntu 18的 tcache double free没有加入 key 所以会简单很多 主函数: 1 int __cdecl __noreturn main(int argc, const char **argv, const char **envp) 2 { 3 int v3; // [rsp 阅读全文
posted @ 2022-01-02 23:04 狒猩橙 阅读(254) 评论(1) 推荐(1)
摘要:Ubuntu18.04的题 用到了两个特性: 一个是 calloc 的特点:不会分配 tcache chunk 中的 chunk 另一个是 tcache 的特点:在分配 fastbin 中的 chunk 时,若还有其他相同大小的 fastbin_chunk 并且 tcache 还没满时,会将其全部放 阅读全文
posted @ 2021-12-27 20:09 狒猩橙 阅读(156) 评论(1) 推荐(0)
摘要:推迟了好久的unlink今天终于把它看了一下。下面是从CTFwiki上拿过来的unlink过程的图片,感觉已经很详细了。 附上unlink的源码 1 #define unlink(P, BK, FD) \ 2 { \ 3 BK = P->bk; \ 4 FD = P->fd; \ 5 FD->bk 阅读全文
posted @ 2021-12-16 11:04 狒猩橙 阅读(305) 评论(1) 推荐(2)

1