33.[WUSTCTF2020]level2
得到的 flag 请包上 flag{} 提交。
感谢 Iven Huang 师傅供题。
比赛平台:https://ctfgame.w-ais.cn/
发现有壳,先UPX脱壳,然后IDA32打开
找到main函数
flag{Just_upx_-d}
34.[HDCTF2019]Maze
得到的 flag 请包上 flag{} 提交。
也加了壳,脱壳后IDA打开,搜索字符串,然后跳转
将迷宫撸下来之后,发现长度为70,尝试7*10
现在需要找到移动方式,找到Go through the maze to get the flag,交叉引用跳转
根据看别的师傅(https://blog.csdn.net/Palmer9/article/details/104157882),这里是两个花指令,jnz跳转到了下一行代码,相当于没跳转、call near ptr 0EC85D78Bh调用了一个不是地址的地址,所以先nop填充掉第一个(nop两次)。
方法Edit > Patch program > Assemble(编辑 >修补程序 >汇编)
然后按d将call那行转换为字节数据,然后一个个nop掉调试
然后点到首行(00401000)按p键就可以反编译了
知道方式为adsw了,走迷宫
flag{ssaaasaassdddw}
35.[BJDCTF2020]BJD hamburger competition
得到的 flag 请包上 flag{} 提交。来源:https://github.com/BjdsecCA/BJDCTF2020
unity游戏…,正好在做mrctf2021,有个unity的,但是只会用CE开挂,正好碰到了这道题,尝试逆向的方法来做。
研究了一下发现,根本不会啊…,只能看师傅的wp了…
unity是用C#开发的,所以用dnSpy来进行分析,在BJD hamburger competition_Data\Managed文件夹中找到Assembly-CSharp.dll,反编译后找到flag条件的位置
public void Spawn()
{
FruitSpawner component = GameObject.FindWithTag("GameController").GetComponent<FruitSpawner>();
if (component)
{
if (this.audioSources.Length != 0)
{
this.audioSources[Random.Range(0, this.audioSources.Length)].Play();
}
component.Spawn(this.toSpawn);
string name = this.toSpawn.name;
if (name == "汉堡底" && Init.spawnCount == 0)
{
Init.secret += 997;
}
else if (name == "鸭屁股")
{
Init.secret -= 127;
}
else if (name == "胡罗贝")
{
Init.secret *= 3;
}
else if (name == "臭豆腐")
{
Init.secret ^= 18;
}
else if (name == "俘虏")
{
Init.secret += 29;
}
else if (name == "白拆")
{
Init.secret -= 47;
}
else if (name == "美汁汁")
{
Init.secret *= 5;
}
else if (name == "柠檬")
{
Init.secret ^= 87;
}
else if (name == "汉堡顶" && Init.spawnCount == 5)
{
Init.secret ^= 127;
string str = Init.secret.ToString();
if (ButtonSpawnFruit.Sha1(str) == "DD01903921EA24941C26A48F2CEC24E0BB0E8CC7")
{
this.result = "BJDCTF{" + ButtonSpawnFruit.Md5(str) + "}";
Debug.Log(this.result);
}
}
Init.spawnCount++;
Debug.Log(Init.secret);
Debug.Log(Init.spawnCount);
}
}
所以flag为flag{md5(1001)},md5之后提交
试了之后发现不对
点击ButtonSpawnFruit.Md5查看
看了一下,是将md5值大写(x2是小写,X2是大写)之后取前20位,所以得到flag
flag{B8C37E33DEFDE51CF91E}