文章预览
REVERSE easycpp2 flag: ayyctf{you_get_rand_num} 该程序没有去除符号, 保留了调试符号, 所以直接定位到了main函数: 逻辑不复杂: __int64 __fastcall main ( int argc, const char **argv) { std ::ostream *v2; // rax std :: string ::iterator __for_end; // [rsp+20h] [rbp-80h] BYREF std :: string ::iterator __for_begin; // [rsp+28h] [rbp-78h] BYREF uint8_t data[ 24 ]; // [rsp+30h] [rbp-70h] std :: string usr_input; // [rsp+50h] [rbp-50h] BYREF uint8_t enc_; // [rsp+7Fh] [rbp-21h] char *c; // [rsp+80h] [rbp-20h] std :: string *__for_range; // [rsp+88h] [rbp-18h] int rotate_count; // [rsp+94h] [rbp-Ch] int i; // [rsp+98h] [rbp-8h] int correct_num; // [rsp+9Ch] [rbp-4h] _main(); correct_num = 0 ; std :: string ::basic_string( _input); std :: operator >> < char >(refptr__ZSt3cin); *(_QWORD *)data = 0xB3B78DA987B3B3
………………………………