当前位置:网站首页>BUUCTF--reverse1
BUUCTF--reverse1
2022-06-29 09:26:00 【X.IO】
reverse1
1.预处理
获得信息
64位文件
2.拖进IDA64,shift+F12
一眼可以看到flag的固有形式,试一下你会发现这并不是我们要的flag(虽然不是最终的flag,但肯定有关系),双击跟进
然后F5找到伪代码
分析一下伪代码,你会发现比较重要的一段就是
for ( (&v6 + 1) = 0; ; ++(&v6 + 1) )
{
v8 = (&v6 + 1);
v2 = j_strlen(Str2);
if ( v8 > v2 )
break;
if ( Str2[(signed __int64)(&v6 + 1)] == 111 )
Str2[(signed __int64)(&v6 + 1)] = 48;
}
如果能把这一段给分析透彻了,flag基本上就出来了。
这里你可以把(&v6 + 1)看作是J,它就是一个变量。
然后把J的值赋给v8
把Str2的长度赋值给v2
比较v8和v2
如果v8>v2就终止for循环
重点来了
如果str2中间这个东西等于111
就把48赋值给str2中间这个东西;
这里有两点需要注意
一:str2中间这个我们刚刚见过,就是那个拥有者flag皮囊的字符串{hello_world}
二:这里的111、48都是ASCII码。参照ASCII码表你会发现111表示字符o
48表示字符0.
所以最后的、真正的flag是。。。把o换成0;
flag{hell0_w0rld}
上面张图是19年的时候这道题的伪代码,相对来说比较简单,可以帮助我们更好的理解这道题。
边栏推荐
猜你喜欢

Installing and configuring wmware esxi 6.5.0 in VMware Workstation

Application of keil5 integrated development environment for single chip microcomputer

IIS server related error

Judgment of points inside and outside polygon

C#中Attribute(特性)

两个栈的模拟题

EDA and VHDL question bank

BUUCTF--新年快乐

MySQL InnoDB data length limit per row

这个开源项目超哇塞,手写照片在线生成
随机推荐
Nacos registry cluster
Web vulnerability manual detection and analysis
1099 build a binary search tree (30 points)
Virtual machine port scanning
Codeforces - 1151b thinking
September 23, 2020 left and right values reference std:: move()
2019-11-10 training summary
September 17, 2020 gateway business process has two tasks: referer certification and non commodity Templating
2020-9-14 introduction to advertising system
PGP在加密技术中的应用
Simulation problem of two stacks
Ural1517 freedom of choice [suffix array: longest common continuous substring]
1146 Topological Order (25 分)
QGIS mapping
This open source project is super wow, and handwritten photos are generated Online
Vmware的下载与安装(基本思路+详细过程)
走迷宫 bfs 中等+——最后的编程挑战
《CLR via C#》读书笔记-CLR寄宿与AppDomain
If I were in Beijing, where would it be better to open an account? In addition, is it safe to open an account online now?
Dynamic planning summary