先用die看一下是64位
丢到64位IDA
shift+f12看字符串
双击追踪关键字
Ctrl+x看那个函数引用了它
是main_0引用了它,双击跳转到主函数main_0
一眼看到{hello_world},是个假的flag
按tab键转伪代码
从下往上分析
sub_1400111D1肯定是printf之类的函数,到这里肯定就是真flag了
往上if ( !strncmp(Str1, Str2, v5) ),是一个判断语句,!strncmp(Str1, Str2, v5)为真输出this is the right flag!,这时说明strncmp(Str1, Str2, v5)的值为0,即Str1和Str2前v3位相等
双击Str2是
继续分析
这个循环是将Str2中,所有ascii值等于111('o')的字符,转化为ascii值为48('0')的字符
在ida中可以选中值按R,转化为字符
最终flag为:flag{hell0_w0rld}