-
-
[原创]2019看雪CTF 第六题:消失的岛屿
-
发表于: 2019-6-27 17:57 5872
-
用IDA分析程序
int __cdecl main(int argc, const char **argv, const char **envp) { int v3; // eax uint8_t bindata; // [esp+11h] [ebp-3Fh] const char *v6; // [esp+48h] [ebp-8h] char *v7; // [esp+4Ch] [ebp-4h] __main(); printf("please enter Serial:"); scanf(" %s", &bindata); if ( strlen((const char *)&bindata) > 0x31 ) puts("error"); v7 = (char *)calloc(1u, 0x400u); v3 = strlen((const char *)&bindata); base64_encode(&bindata, v7, v3); v6 = "!NGV%,$h1f4S3%2P(hkQ94=="; if ( !strcmp("!NGV%,$h1f4S3%2P(hkQ94==", v7) ) puts("Success"); else puts("Please Try Again"); free(v7); system("pause"); return 0; }
int __cdecl main(int argc, const char **argv, const char **envp) { int v3; // eax uint8_t bindata; // [esp+11h] [ebp-3Fh] const char *v6; // [esp+48h] [ebp-8h] char *v7; // [esp+4Ch] [ebp-4h] __main(); printf("please enter Serial:"); scanf(" %s", &bindata); if ( strlen((const char *)&bindata) > 0x31 ) puts("error"); v7 = (char *)calloc(1u, 0x400u); v3 = strlen((const char *)&bindata); base64_encode(&bindata, v7, v3); v6 = "!NGV%,$h1f4S3%2P(hkQ94=="; if ( !strcmp("!NGV%,$h1f4S3%2P(hkQ94==", v7) ) puts("Success"); else puts("Please Try Again"); free(v7); system("pause"); return 0; }
if ( !strcmp("!NGV%,$h1f4S3%2P(hkQ94==", v7) ) //和!NGV%,$h1f4S3%2P(hkQ94==比较,相同则成功
if ( !strcmp("!NGV%,$h1f4S3%2P(hkQ94==", v7) ) //和!NGV%,$h1f4S3%2P(hkQ94==比较,相同则成功
base64_encode(&bindata, v7, v3); //自定义的base64加密
进入base64_encode函数
base64_encode(&bindata, v7, v3); //自定义的base64加密
进入base64_encode函数
charEncrypt()做了一些操作
aTuvwxtulmnopqr[data]为自定义的映射表
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课
赞赏
看原图
赞赏
雪币:
留言: