BUUCTF 新年快乐

http://ethereal.prohitime.top/demo/


查了一下壳,upx
脱壳,然后生成了一个.bak文件

把.exe文件拖进IDA中(不是新生成的那个)

int __cdecl main(int argc, const char **argv, const char **envp)
{
  int result; // eax
  char v4; // [esp+12h] [ebp-3Ah]
  __int16 v5; // [esp+20h] [ebp-2Ch]
  __int16 v6; // [esp+22h] [ebp-2Ah]

  sub_401910();
  strcpy(&v4, "HappyNewYear!");
  v5 = 0;
  memset(&v6, 0, 0x1Eu);
  printf("please input the true flag:");
  scanf("%s", &v5);
  if ( !strncmp((const char *)&v5, &v4, strlen(&v4)) )
    result = puts("this is true flag!");
  else
    result = puts("wrong!");
  return result;
}

flag{HappyNewYear!}

 posted on 2020-04-26 21:07  My_serendipity  阅读(821)  评论(0编辑  收藏  举报