当前位置:网站首页>CTF reverse entry question - dice
CTF reverse entry question - dice
2022-07-06 17:22:00 【TiggerRun】
Topic delivery :Beat our dice game and get the flag
0x00 Check the shell

Use PEiD Make sure the program is not shelled
0x01 OD Dynamic debugging
After opening, I first F7 F8 Debugging for a while , No idea .
The string search method is used to locate .
You can know that this is a dice problem , And throw “3-1-3-3-7” To get Flag.
And this 5 The second roll of dice is written separately , Locate the position of the code according to each dice roll , Find out cmp Follow closely jnz, We can know that this judgment is used to judge whether the thrown value is the same as the value in the program .
0x02 NOP jnz( success )
Simply and violently jnz Jump command NOP fall , The program can continue to run ~ sweet !

0x03 Modify jump ( Failure )

Of course, the principle is to use string analysis
Pass the last judgment and jump , You can locate the logic of success in the blue box , Is it possible to make the program jump directly to run here ???
Jump address 0x004029AD
You can know at the next breakpoint , The program will ask us to enter , But when we modify the assembly directly here to jump , The program crashed before it finished , It may be that the required variables are not declared ???
I just want to jump when I make a judgment for the first time , In this way, the variables of the program may have been defined .
But the results flag It's empty. .
Cause analysis :
- The jump position is not early enough ,flag Not calculated yet …
- That the road is blocked ,flag According to the front 5 A function calculates ( We all know about anti crawler encryption , Such as a treasure js Calculate some parameters in a loop all the time , Not following the process is a dead end )
I thought I could see the logic of the program after the last dice roll .
The seventh mistake jumps to 0040270A
It is found that the last sentence of the code block is to jump to 00402870
Then change the jump address of the first wrong judgment to 00402870
At this time, the prompt … something wrong, Of course there are problems , We just left 1 A function . There is another one at the end cmp. Thinking about this jnz to nop When it's over OK Come on, ha ha ha .



The reality is cruel , Final flag Failed to come out , This shows that , This flag Is from the front 5 Functions are calculated separately !!!
Just shared ideas , Although this kind of thinking did not succeed flag
边栏推荐
- Compile homework after class
- Case: check the empty field [annotation + reflection + custom exception]
- Only learning C can live up to expectations top5 S1E8 | S1E9: characters and strings & arithmetic operators
- 汇编语言基础知识
- 【MMdetection】一文解决安装问题
- JVM之垃圾回收器上篇
- JVM garbage collector part 1
- Mongodb learning notes
- Login to verify the simple use of KOA passport Middleware
- 关于Stream和Map的巧用
猜你喜欢

Take you hand-in-hand to do intensive learning experiments -- knock the level in detail

逻辑运算指令

汇编语言段定义

The daemon thread starts redis and modifies the configuration file

JUnit unit test

Train 100 pictures for 1 hour, and the style of the photos changes at will. There is a demo at the end of the article | siggraph 2021
![Case: check the empty field [annotation + reflection + custom exception]](/img/50/47cb40e6236a0ba34362cdbf883205.png)
Case: check the empty field [annotation + reflection + custom exception]

微信防撤回是怎么实现的?

信息与网络安全期末复习(完整版)

复盘网鼎杯Re-Signal Writeup
随机推荐
Activit fragmented deadly pit
Login to verify the simple use of KOA passport Middleware
唯有学C不负众望 TOP1环境配置
JVM运行时数据区之程序计数器
Idea resolving jar package conflicts
Flink 解析(二):反压机制解析
Activiti目录(三)部署流程、发起流程
mysql的合计/统计函数
ByteDance overseas technical team won the championship again: HD video coding has won the first place in 17 items
Only learning C can live up to expectations top2 P1 variable
[CISCN 2021 华南赛区]rsa Writeup
The daemon thread starts redis and modifies the configuration file
Junit单元测试
PostgreSQL 14.2, 13.6, 12.10, 11.15 and 10.20 releases
唯有学C不负众望 TOP2 p1变量
GCC error: terminate called after throwing an instance of 'std:: regex_ error‘ what(): regex
Program counter of JVM runtime data area
Flink 解析(七):时间窗口
在 vi 编辑器中的命令模式下,删除当前光标处的字符使用 __ 命 令。
C# WinForm中DataGridView单元格显示图片