BUUCTF reverse:内涵的软件

1.查壳
BUUCTF reverse:内涵的软件_第1张图片无壳,32位程序
2.IDA分析
拖入IDA,找到main函数,F5反编译
BUUCTF reverse:内涵的软件_第2张图片

int __cdecl main(int argc, const char **argv, const char **envp)
{
  return main_0();
}
int __cdecl main_0()
{
  int result; // eax
  char v1; // [esp+4Ch] [ebp-Ch]
  const char *v2; // [esp+50h] [ebp-8h]
  int v3; // [esp+54h] [ebp-4h]

  v3 = 5;
  v2 = "DBAPP{49d3c93df25caad81232130f3d2ebfad}";
  while ( v3 >= 0 )
  {
    printf(aD, v3);
    sub_40100A();
    --v3;
  }
  printf(
    "\n"
    "\n"
    "\n"
    "这里本来应该是答案的,但是粗心的程序员忘记把变量写进来了,你要不逆向试试看:(Y/N)\n");
  v1 = 1;
  scanf("%c", &v1);
  if ( v1 == 89 )
  {
    printf(aOdIda);
    result = sub_40100A();
  }
  else
  {
    if ( v1 == 78 )
      printf(asc_425034);
    else
      printf("输入错误,没有提示.");
    result = sub_40100A();
  }
  return result;
}

flag直接出来了DBAPP{49d3c93df25caad81232130f3d2ebfad}

你可能感兴趣的:(CTF)