首页
社区
课程
招聘
[原创]CTF2019 第一题:无限流[签到题]
2019-12-1 16:13 1520

[原创]CTF2019 第一题:无限流[签到题]

2019-12-1 16:13
1520
签到题,
把程序丢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);
}

经过IDA简单的分析看出正确的密码为:goluck! ,


[CTF入门培训]顶尖高校博士及硕士团队亲授《30小时教你玩转CTF》,视频+靶场+题目!助力进入CTF世界

收藏
点赞0
打赏
分享
最新回复 (0)
游客
登录 | 注册 方可回帖
返回