一、查看文件类型PE32无壳尝试运行发现是游戏题,倒数10s后根据提示输入正确的按键,程序会输出新的内容,若没有及时输入相应按键或按错键,程序退出刚开始是练习部分再次倒数10s后进入真正的游戏部分依次键入空格、x、m、m、x、s后,跳出提示,相当于通过了第一关,游戏继续多次运行后发现,后续的关卡,需要输入的键位每次都不相同,猜测程序在第二关使用了随机数,完成游戏后得到提示得到flag为:no5c30416d6cf52638460377995c6a8cf5那么解题思路即为将按键输入的判断条件更改,改为即使输入的是错误的按键或不输入,程序也能继续运行。通过IDA找到条件判断的地址或直接通过x32dbg动态调试二、IDA静态分析打开字符串窗口,找到两个错误提示分别通过交叉引用跟进发现第一个错误提示的调用函数如下,看起来像程序前半的教学部分第二个错误提示的调用函数如下:分别查看其汇编代码将其中的jnz改为jz或je即可三、x32dbg动态调试搜索字符串找到错误提示并跟进分别将两处的jne跳转改为je按F9运行即可待程序运行一段时间后,得到flag为:no5c30416d6cf526384603
一、查看程序类型PE32 无壳,库中显示其为.NET库,故为C#编写的程序,用dnspy打开运行程序二、用dnspy打开1.定位关键代码段左侧导航栏再此程序中逐个查看,最终再02000003中找到关键代码段发现其定义个多个函数逐个分析2.查看各个函数(1)private static int ᜀ(int A_0, int A_1)定义了一个数组,将输入的两个参数异或后返回(2)private static string ᜀ(string A_0)srting()函数将传入的参数,进行MD5加密后返回(3)private static void ᜀ(string A_0, int A_1, ref string A_2)第65行,括号内的第一个单独的“.”,调用了第一个函数int()(可能因为dnspy反编译显示不完整)将输入字符串与上面定义的数组进行逐位异或,得到的结果通过第三个参数A_2返回(4)private static void ᜀ(string[] A_0)对字符串a= "CreateByTenshine"进行一系列处理+调用第二个函数string()进行md5加密后,最终与
一、常用快捷键命令 简写形式 说明backtrace bt、where 显示backtracebreak b 设置断点continue c、cont 继续执行delete d 删除断点finish 运行到函数结束info breakpoints 显示断点信息next n 执行下一行print p 显示表达式run r 运行程序step s 一次执行一行,包括函数内部x 显示内存内容until
1.OD(1)视图、查看相关:Alt+l 记录Alt+e 可执行模块Alt+m 内存Alt+c cpu(反汇编视图)Ctrl+p 补丁Alt+k 调用堆栈Alt+b 断点Alt+f5 设置窗口总在最前Alt+o 调试选项Alt+F3 - 关闭当前窗口。Ctrl+F4 - 关闭当前窗口。F5 - 最大化当前窗口或将当前窗口大小改为正常化。F6 - 切换到下一个窗口。Shift+F6 - 切换到前一个窗口。F10 - 打开与当前窗口或面板相关的快捷菜单。左方向键 - 显示窗口左方一个字节宽度的内容阿。Ctrl+左方向键 - 显示窗口左方一栏的内容。右方向键 - 显示窗口右方一个字节宽度的内容Ctrl+右方向键 - 显示窗口右方一栏的内容(2)调试、断点相关:f9 运行Ctrl+f9 执行到返回(retn指令处)Alt+f9 执行到用户代码f12 暂停f2 设断点Ctrl+f2 重新开始Alt+f2 关闭Shift+f2 设置条件断点f7 单步步入Ctrl+f7 自动步入Ctrl+f11 跟踪步入f8 单步步过Ctrl+f8 自动步过Ctrl+f12 跟踪步过Ctrl+t 设置run跟踪
Norman1z