编译时字符串加密,试一下强度
项目地址 https://github.com/llxiaoyuan/oxorany试一下强度如何
我可能有点投机取巧 {:301_998:} ds:=77260DC0 (KernelBa.SetConsoleTextAttribute)打个断点 追回去 上面的CMP 就是明文
本帖最后由 wtujoxk 于 2023-11-27 18:21 编辑
楼上给了密码,算法在这里。断点打在 00A64710,寄存器就是明码!
bool __thiscall sub_A64710(_DWORD *this, const char *a2)
{
const char *v2; // esi
_DWORD *v3; // edx
unsigned int v4; // edi
unsigned int v5; // edx
unsigned int v6; // edx
bool v7; // cf
unsigned __int8 v8; // al
unsigned __int8 v9; // al
unsigned __int8 v10; // al
int v11; // eax
v2 = a2;
v3 = this;
v4 = strlen(a2);
if ( this >= 0x10u )
this = (_DWORD *)*this;
v5 = v3;
if ( v5 != v4 )
return 0;
v7 = v5 < 4;
v6 = v5 - 4;
if ( v7 )
{
LABEL_7:
if ( v6 == -4 )
goto LABEL_16;
}
else
{
while ( *this == *(_DWORD *)v2 )
{
++this;
v2 += 4;
v7 = v6 < 4;
v6 -= 4;
if ( v7 )
goto LABEL_7;
}
}
v7 = *(_BYTE *)this < *v2;
if ( *(_BYTE *)this != *v2
|| v6 != -3
&& ((v8 = *((_BYTE *)this + 1), v7 = v8 < (unsigned int)v2, v8 != v2)
|| v6 != -2
&& ((v9 = *((_BYTE *)this + 2), v7 = v9 < (unsigned int)v2, v9 != v2)
|| v6 != -1 && (v10 = *((_BYTE *)this + 3), v7 = v10 < (unsigned int)v2, v10 != v2))) )
{
v11 = v7 ? -1 : 1;
return !v11;
}
LABEL_16:
v11 = 0;
return !v11;
} 这种加密没有密码是否很难破解 代码写得有点问题,if的时候,把input变量通过oxorany()再比较,这样就是逆向oxorany算法了,不然都是在test的时候去取寄存器得值,没意思 lvbuqing 发表于 2023-11-29 09:59
代码写得有点问题,if的时候,把input变量通过oxorany()再比较,这样就是逆向oxorany算法了,不然都是在tes ...
编译时字符串加密,只能应用于编译时常量啊{:1_937:}{:1_937:}
页:
[1]