首页
社区
课程
招聘
[原创] 2019KCTF总决赛 第一题:无限流
2019-12-1 20:21 1471

[原创] 2019KCTF总决赛 第一题:无限流

2019-12-1 20:21
1471
放到IDA搜下字符串,即可定位到关键函数。
int __thiscall onclick(CWnd *this)
{
  struct CString *v1; // ST08_4
  CWnd *v2; // eax
  int v3; // eax
  char result[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] > '9' || Str[i] < '0' )         // 限制输入范围为整数
      error();
    else
      result[i] = v7[Str[i] - '0'];             // 取出对应位置的字符,并存放到result
  }
  result[i] = 0;
  return check(result);                         // 如果result为goluck!则成功
}

代码逻辑很清晰,flag就是 "goluck!" 的每个字符在 "cuk!ogl"的下标。
得到flag为:5461023

[培训]《安卓高级研修班(网课)》月薪三万计划,掌握调试、分析还原ollvm、vmp的方法,定制art虚拟机自动化脱壳的方法

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