1.用ida打开,
上面什么失败成功就不说了,但是倒数第二行的好像之前做过的maze。。看看这个**********
真的是迷宫,而且只能有一种路径,要不然flag就不一样了。
__int64 __fastcall sub_140001380(__int64 a1, __int64 a2)
{
__int64 v2; // rbx
__int64 v3; // rdi
__int64 v4; // rax
int v5; // ecx
__int16 *v6; // rsi
__int64 v7; // rbp
__int16 v8; // dx
char v9; // dl
CHAR *v10; // rcx
v2 = a2;
if ( *(_DWORD *)(a2 + 48) >= 0 )
{
v3 = *(_QWORD *)(a2 + 24);
v4 = *(_QWORD *)(a2 + 56) >> 3;
if ( (_DWORD)v4 )
{
v5 = dword_1400030E4;
v6 = (__int16 *)(v3 + 2);
v7 = (unsigned int)v4;
while ( *(_WORD *)(v3 + 4) )
{
LABEL_28:
v6 += 6;
if ( !--v7 )
goto LABEL_29;
}
aO[v5] = 46;
v8 = *v6;
if ( *v6 == 23 )
{
if ( v5 & 0xFFFFFFF0 )
{
v5 -= 16;
goto LABEL_21;
}
v5 += 208;
dword_1400030E4 = v5;
}
if ( v8 == 37 )
{
if ( (v5 & 0xFFFFFFF0) != 208 )
{
v5 += 16;
goto LABEL_21;
}
v5 -= 208;
dword_1400030E4 = v5;
}
if ( v8 == 36 )
{
if ( v5 & 0xF )
{
--v5;
goto LABEL_21;
}
v5 += 15;
dword_1400030E4 = v5;
}
if ( v8 != 38 )
goto LABEL_22;
if ( (v5 & 0xF) == 15 )
v5 -= 15;
else
++v5;
LABEL_21:
dword_1400030E4 = v5;
LABEL_22:
v9 = aO[v5];
if ( v9 == 42 )
{
v10 = "failed!\n";
}
else
{
if ( v9 != 35 )
{
LABEL_27:
aO[v5] = 111;
goto LABEL_28;
}
v10 = "success! flag is flag{md5(input)}\n";
}
dword_1400030E4 = 16;
DbgPrint(v10);
v5 = dword_1400030E4;
goto LABEL_27;
}
}
LABEL_29:
if ( *(_BYTE *)(v2 + 65) )
*(_BYTE *)(*(_QWORD *)(v2 + 184) + 3i64) |= 1u;
return *(unsigned int *)(v2 + 48);
}
判断v==23,36,37,38.
后面还要加减16,15.因为是迷宫,
这里需要学习一下sys文件
sys文件是驱动程序的可执行代码,其扩展名为。sys,驱动程序安装后保存在windows/system32/drivers目录中
这个就是键盘扫描码了
https://www.supfree.net/search.asp?id=6386这个网站可以在线查询
这个就是代表的是JKLI
有地图了,有起点,有终点
LKKKLLKLKKKLLLKKKLLLLLL
ida里面说了要md5
flag{403950a6f64f7fc4b655dea696997851}