堆溢出
主要是对tcache(用于存放free后的空闲堆块)进行对应的pwn
参考tcache运行实例[原创]tcache bin利用总结-Pwn-看雪-安全社区|安全招聘|kanxue.com
而任何堆块都呈现下面这种结构
1 | struct chunk |
有下列三种攻击方式
UAF Example:
1
2
3
4
5
6
7
8
9
10
11
12
13
14 int __cdecl main(int argc, const char **argv, const char **envp)
{
char *command; // [esp+8h] [ebp-10h]
char *s; // [esp+Ch] [ebp-Ch]
setbuf(stdin, 0);
setbuf(stdout, 0);
s = (char *)malloc(0x16u);
command = (char *)malloc(0x16u);
puts("Input:");
gets(s);
system(command);
return 0;
}
chunk extend
- 标题: 堆溢出
- 作者: runwu2204
- 创建于 : 2024-03-26 18:46:15
- 更新于 : 2024-09-17 02:10:43
- 链接: https://runwu2204.github.io/2024/03/26/Pwn/linux/heap/堆溢出/
- 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论