新年快乐
0x01
Exeinfo PE Check
1 2
| UPX -> Markus & Laszlo ver. [ 3.91 ] <- from file. ( sign like UPX packer ) , Overlay : 2E6669... Nothing discovered
|
32位 UPX壳
脱壳
脱壳器下载UPX: the Ultimate Packer for eXecutables - Homepage
1 2 3 4 5 6 7 8 9 10
| upx.exe -d 新年快乐.exe Ultimate Packer for eXecutables Copyright (C) 1996 - 2023 UPX 4.0.2 Markus Oberhumer, Laszlo Molnar & John Reiser Jan 30th 2023
File size Ratio Format Name -------------------- ------ ----------- ----------- 27807 <- 21151 76.06% win32/pe 新年快乐.exe
Unpacked 1 file.
|
1 2
| Dev C++ v5.0 - v5.5 / Mingw32 / GNU C v4.x - [ libgcj-13.dll ] , Overlay : 2E6669... Nothing discovered
|
脱壳成功
0x02
IDA
分析主函数 _main()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| int __cdecl main(int argc, const char **argv, const char **envp) { int result; _WORD Str2[8]; char v5[30];
__main(); strcpy((char *)Str2, "HappyNewYear!"); Str2[7] = 0; memset(v5, 0, sizeof(v5)); printf("please input the true flag:"); scanf("%s", &Str2[7]); if ( !strncmp((const char *)&Str2[7], (const char *)Str2, strlen((const char *)Str2)) ) result = puts("this is true flag!"); else result = puts("wrong!"); return result; }
|
flag为 flag{HappyNewYear}