[2021 鹤城杯]easyecho
Stack SmashCanary保护,是在栈上插入一段随机数;进入函数后,也就是call完后会有push ebp,mov ebp,esp,最后来个mov esp。canary保护特殊在上述操作后会再加一个canary。最后函数leave ret前会检测一次,canary与原先值是否相同来判断是否被栈溢出覆盖返回地址了。 Stack Smash 就是利用 canary 检测的机制漏洞将栈上的__libc_argv[0] 内容将其输出 注意在libc2.23 后此机制无法使用1234567891011void __attribute__ ((noreturn)) __stack_chk_fail (void){ __fortify_fail ("stack smashing detected");}void __attribute__ ((noreturn)) internal_function __fortify_fail (const char *msg){ /* The loop is added only to keep...
tcache_perthread_struct
tcache_perthread_struct 是GLIBC从2.27开始引入的机制,用于 add 有限的 chuank 数量,可以申请的 size 过小无法 free 到unsorted bin。 tcache的结构体定义12345typedef struct tcache_perthread_struct{ char counts[TCACHE_MAX_BINS]; tcache_entry *entries[TCACHE_MAX_BINS];} tcache_perthread_struct; tcache_perthread_struct 在本质上是一个 0x250-0x290的堆结构 1234567891011pwndbg> x/20gx 0x4050000x405000: 0x0000000000000000 0x00000000000002510x405010: 0x0000000000000000 0x00000000000000000x405020: 0x0000000000000000 0x00000000000000000...
CVE-2022-26258
固件地址:http://www.dlinktw.com.tw/techsupport/download.ashx?file=2663 环境 Ubuntu18,(22 在模拟固件时会有问题) FirmAE 下载12345678# 从GitHub克隆项目git clone --recursive https://github.com/pr0v3rbs/FirmAE# 运行download.sh脚本,下载相关程序./download.sh#运行安装脚本./install.sh binwalk 下载123pip3 install git+https://github.com/ReFirmLabs/binwalk.gitcd binwalkpython3 setup.py install CVE-2022-26258 固件模拟无法转发至宿主机,所以在 Ubuntu18 中安装 bp 进行操作 可以参考以下师傅的文章https://blog.csdn.net/dustbinhoj/article/details/128587565 使用binwalk 进行解包1binwalk -Me...
侧信道爆破
侧信道攻击是一种非正常的攻击手段,是根据程序的反馈报错信息来参考的一种攻击方式 原理是讲 flag 文件中的字符读取到缓冲区,将文件中的字符一个字节一个字节的对比 使用前提: 1-输入的 shellcode 能够被执行 2-程序禁用了execve系统调用,和关闭了标准输出流才用必要进行使用,因为爆破所需要的时间较长 3-read、open、openat、readv、fread 都可以被使用,但是一定要确保可以打开文件并且 read 读取到 4-标准错误不能被关闭,我们需要更具系统的反馈信息进行循环判定 侧信道攻击其实是比较模板化的,基本可以套用以下公式 12345678910111213141516171819202122232425mov r12, 0x67616c66 ; 将字符串 "flag" 的 ASCII 值加载到寄存器 r12 中push r12 ; 将 r12 的值推送到栈上mov rdi, rsp ; 将栈上的地址赋给寄存器 rdixor esi, esi ; 将 es...
各大Linux的libc版本
libc版本的不同
系统调用号
pwn做题时调用函数需要使用的系统调用号
pwntools
函数使用

![[2021 鹤城杯]easyecho](https://misakiimg.oss-cn-shanghai.aliyuncs.com/img/17.jpg)




