东莞网站建设都找菲凡网络,海南省城乡和建设厅网站首页,楼市最新消息2023,网页设计与制作课程内容前言
在主函数中找到了一个vm的译码器#xff0c;译码器主要是解释传入的opcode#xff0c;然后对我们输入的字符操作#xff0c;这里我们发现他是单字节比较的#xff0c;方法很多可以使用单字节映射#xff0c;也可以是使用符号化执行#xff0c;当然也可以硬着头皮去…前言
在主函数中找到了一个vm的译码器译码器主要是解释传入的opcode然后对我们输入的字符操作这里我们发现他是单字节比较的方法很多可以使用单字节映射也可以是使用符号化执行当然也可以硬着头皮去看
Angr import angr
import sysdef main(argv):path_to_binary f./signal.exeproject angr.Project(path_to_binary)initial_state project.factory.entry_state(add_options { angr.options.SYMBOL_FILL_UNCONSTRAINED_MEMORY,angr.options.SYMBOL_FILL_UNCONSTRAINED_REGISTERS})simulation project.factory.simgr(initial_state)def is_successful(state):stdout_output state.posix.dumps(sys.stdout.fileno())return bgood,The answer format is:flag {} in stdout_output # :booleandef should_abort(state):stdout_output state.posix.dumps(sys.stdout.fileno())return bwhat a shame... in stdout_outputsimulation.explore(findis_successful, avoidshould_abort)if simulation.found:solution_state simulation.found[0]print(solution_state.posix.dumps(sys.stdin.fileno()).decode())else:raise Exception(Could not find the solution)if __name__ __main__:main(sys.argv)
找到程序通过输出的话和不通过输出的话然后我们通过符号化执行判断出输入的值
Ponce
使用ponce的话就麻烦很多首先启动调试 将输入设置为符号化 到达判断点 这样就分析出了第一位我们可以修改EIP一步步来这样就可以得到所有的输入