-
-
[原创]CTF2019 第一题:无限流[签到题]
-
发表于: 2019-12-1 16:13 1948
-
签到题,
把程序丢IDA里面,查看了一下字符串
来到
sub_401830
这个函数直接F5,伪代码为:
int __thiscall sub_401830(CWnd *this)
{
struct CString *v1; // ST08_4
CWnd *v2; // eax
int v3; // eax
char Str1[8]; // [esp+4Ch] [ebp-18h]
int i; // [esp+54h] [ebp-10h]
const char *v7; // [esp+58h] [ebp-Ch]
char *Str; // [esp+5Ch] [ebp-8h]
CWnd *v9; // [esp+60h] [ebp-4h]
v9 = this;
v1 = (CWnd *)((char *)this + 100);
v2 = CWnd::GetDlgItem(this, 1002);
CWnd::GetWindowTextA(v2, v1);
v3 = sub_401970((char *)v9 + 100);
Str = CString::GetBuffer((CWnd *)((char *)v9 + 100), v3);
if ( !strlen(Str) )
return CWnd::MessageBoxA(v9, "请输入password!", 0, 0);
v7 = "cuk!ogl";
for ( i = 0; Str[i]; ++i )
{
if ( Str[i] > 57 || Str[i] < 48 ) ;算法为大于等于0且下于等于9
ErrorShowMsgBoxAndExit();
else
Str1[i] = v7[Str[i] - 48];
}
Str1[i] = 0;
return ShowMsgBox(Str1);
}
{
struct CString *v1; // ST08_4
CWnd *v2; // eax
int v3; // eax
char Str1[8]; // [esp+4Ch] [ebp-18h]
int i; // [esp+54h] [ebp-10h]
const char *v7; // [esp+58h] [ebp-Ch]
char *Str; // [esp+5Ch] [ebp-8h]
CWnd *v9; // [esp+60h] [ebp-4h]
v9 = this;
v1 = (CWnd *)((char *)this + 100);
v2 = CWnd::GetDlgItem(this, 1002);
CWnd::GetWindowTextA(v2, v1);
v3 = sub_401970((char *)v9 + 100);
Str = CString::GetBuffer((CWnd *)((char *)v9 + 100), v3);
if ( !strlen(Str) )
return CWnd::MessageBoxA(v9, "请输入password!", 0, 0);
v7 = "cuk!ogl";
for ( i = 0; Str[i]; ++i )
{
if ( Str[i] > 57 || Str[i] < 48 ) ;算法为大于等于0且下于等于9
ErrorShowMsgBoxAndExit();
else
Str1[i] = v7[Str[i] - 48];
}
Str1[i] = 0;
return ShowMsgBox(Str1);
}
经过IDA简单的分析看出正确的密码为:goluck! ,
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课
赞赏
他的文章
- [求助]未知编码 1365
- [原创]CTF2019 第一题:无限流[签到题] 1949
- [原创]CTF晋级赛Q2 第一题 2262
- [原创]通过分析RTTI识别类及类之间的继承关系 6935
看原图
赞赏
雪币:
留言: