KCTF2022 第二题题解
KCTF2022 第二题题解解题第一部分输入一段字符串,然后用输入的字符串在下图进行一系列运算后,将运算的结果存入v39之中,然后进行一个sbox的初始化,和输入没有半毛钱关系,每次运行都是相同的数,所以可以动调然后取出。
接着用sbox和我们的输入进行了一系列运算,将结果存进int类型的v11中。
接下来是一个常规的字符串转数字存入内存的函数,不过这里的ascii大于0x39的字符是减55后存入内存。
然后下图的最下面的if判断需要满足,否则game over。向上看do while,发现和我们的输入有关的只有v39,也就是上面的那个运算的结果
这里通过爆破得出了v17的范围
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859#include <cstring>#include <iostream>using namespace std;int v3; // ebxint len; / ...
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment