当前位置:网站首页>RE1 attack and defense world reverse

RE1 attack and defense world reverse

2022-07-07 23:18:00 Day-3

 Insert picture description here
This question has no shell , Throw in IDA Check the source code , The source code is confusing , After modification, it is shown as follows :

int __cdecl main(int argc, const char **argv, const char **envp)
{
    
  int v3; // eax
  char v5[32]; // [esp+0h] [ebp-44h] BYREF
  char v6[32]; // [esp+20h] [ebp-24h] BYREF

  *(__m128i *)v5 = _mm_loadu_si128((const __m128i *)&xmmword_633E34);
  *(_DWORD *)&v5[24] = 0;
  strcpy(&v5[16], "DUTCTF}");
  *(_WORD *)&v5[28] = 0;
  printf(" Welcome to DUTCTF yo \n");
  printf(&byte_633E60);
  printf(" Input flag Well :");
  scanf("%s", v6);
  v3 = strcmp(v5, v6);
  if ( v3 )
    v3 = v3 < 0 ? -1 : 1;
  if ( v3 )
    printf("flag Not quite right , Try again , Come on \n");
  else
    printf("flag get√\n");
  system("pause");
  return 0;
}

At this time, the code logic is relatively clear , It is to compare the content we input with the content it generates , The same is deemed to be submitted accurately flag, At this time, our task is to check v5 The content in , So we do dynamic debugging , It's easy to find flag.

 Insert picture description here

原网站

版权声明
本文为[Day-3]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207072038285320.html