01 2022 档案

摘要: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 狒猩橙 阅读(122) 评论(1) 推荐(1)
摘要:setcontext+orw 大致可以把2.27,2.29做为两个分界点。 我们先来讨论 2.27 及以下的 setcontext + orw 的写法。 首先 setcontext 是什么?了解过 SROP 的师傅应该知道 pwntools 自带了一款可以控制寄存器值的工具。模板如下: frame 阅读全文
posted @ 2022-01-26 19:39 狒猩橙 阅读(3422) 评论(1) 推荐(3)
摘要:FSOP 是 File Stream Oriented Programming 的缩写。所有的 _IO_FILE 结构会由 _chain 字段连接形成一个链表,由 _IO_list_all 来维护。而 FSOP 的核心思想就是劫持通过 _IO_list_all 的值来伪造链表和其中的 _IO_FIL 阅读全文
posted @ 2022-01-19 20:24 狒猩橙 阅读(821) 评论(1) 推荐(1)
摘要:_fileno 是 stdin 文件里的一个字段,在 x64 系统里,偏移为 0x70。 以下是 IO_FILE 结构体: struct _IO_FILE { int _flags; /* High-order word is _IO_MAGIC; rest is flags. */ #define 阅读全文
posted @ 2022-01-14 10:09 狒猩橙 阅读(334) 评论(1) 推荐(1)
摘要:House of force是一个堆的小利用技巧,要想利用它需要满足两个条件: 1、可以通过溢出修改 top chunk 的 size 2、分配堆的大小没有限制 通过把 top chunk 的size 改的很大,再malloc一个特定的size,使 top chunk 的位置 恰好在目标位置 -0x 阅读全文
posted @ 2022-01-09 09:39 狒猩橙 阅读(203) 评论(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 狒猩橙 阅读(2596) 评论(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 狒猩橙 阅读(198) 评论(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 狒猩橙 阅读(270) 评论(1) 推荐(1)