Files
fzu-product/.vitepress/dist/assets/技术资源汇总(杭电支持版)_6.计算机安全_6.2.1基础工具的使用.md.DLiapAz1.js

27 lines
23 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as s,c as a,o as i,a4 as t}from"./chunks/framework.DtvhUNIn.js";const x=JSON.parse('{"title":"基础工具的使用","description":"","frontmatter":{},"headers":[],"relativePath":"技术资源汇总(杭电支持版)/6.计算机安全/6.2.1基础工具的使用.md","filePath":"技术资源汇总(杭电支持版)/6.计算机安全/6.2.1基础工具的使用.md"}'),e={name:"技术资源汇总(杭电支持版)/6.计算机安全/6.2.1基础工具的使用.md"},p=t(`<h1 id="基础工具的使用" tabindex="-1">基础工具的使用 <a class="header-anchor" href="#基础工具的使用" aria-label="Permalink to &quot;基础工具的使用&quot;"></a></h1><p>IDA pro交互式反编译器专业版是二进制安全研究人员必备的反汇编、反编译工具功能繁多而强大反编译结果清晰明了。</p><p>IDA pro 是收费软件,价格极其昂贵,一套完全版人民币 10W 左右因此可以到各大网站下载破解版注意到一些知名网站下载比如吾爱破解等防止下载的软件包含病毒。在编写此文时IDA pro 更新到了 8.3,网上能找到的最新的版本为 7.7。本文由于版权原因,不提供下载链接。</p><h2 id="简易使用方法" tabindex="-1">简易使用方法 <a class="header-anchor" href="#简易使用方法" aria-label="Permalink to &quot;简易使用方法&quot;"></a></h2><blockquote><p>本文档仅作快速入门,更加细节的内容还请读者查阅其他资料以及多加实践。</p><p>另外在任何使用上操作的问题,都可以在群里提问!</p></blockquote><h3 id="_0x00-ida-简单介绍" tabindex="-1">0x00 IDA 简单介绍 <a class="header-anchor" href="#_0x00-ida-简单介绍" aria-label="Permalink to &quot;0x00 IDA 简单介绍&quot;"></a></h3><p><img src="https://cdn.xyxsw.site/image-20220809113855166.png" alt=""></p><p>IDA 是一款交互式反汇编和反编译工具,其支持文件类型和文件平台丰富。</p><p>可静态分析也可动态调试,可以说是二进制手的吃饭工具了</p><h3 id="_0x01-启动界面" tabindex="-1">0x01 启动界面 <a class="header-anchor" href="#_0x01-启动界面" aria-label="Permalink to &quot;0x01 启动界面&quot;"></a></h3><p><img src="https://cdn.xyxsw.site/image-20220809114834244.png" alt=""></p><div class="language-txt vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">txt</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>NEW打开 IDA 同时弹出对话框选择要打开的文件</span></span>
<span class="line"><span>Go单独打开 ida打开界面将文件拖入</span></span>
<span class="line"><span>Previous或者下面的列表项快速打开之前的的文件</span></span></code></pre></div><p>这里选择 Go 键,打开以后,将文件拖入</p><p><img src="https://cdn.xyxsw.site/image-20220809124156697.png" alt=""></p><p><img src="https://cdn.xyxsw.site/image-20220809124408179.png" alt=""></p><p>这里按我们的默认选项点击 OK 即可</p><h3 id="_0x02-关闭界面" tabindex="-1">0x02 关闭界面 <a class="header-anchor" href="#_0x02-关闭界面" aria-label="Permalink to &quot;0x02 关闭界面&quot;"></a></h3><p><img src="https://cdn.xyxsw.site/image-20220809125554853.png" alt=""></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>第一个选项:就是不打包数据包文件,那么这些数据库文件就会分开这放。</p><p>第二个选项及图中选项:就是把这几个数据库文件打包为 1 个 (如.i64 文件),下次打开我们分析的文件的时候,打开这个文件即可。</p><p>第三个选项:不会删掉数据库文件,而是打包压缩到存储的文件里面去了。</p><p>下面两个选项 第一个选项:回收垃圾,如果打包文件太大了,可以选用这个选项,清理不必要的内存</p><p>最后一个选项:当分析时候写错了,选中最后一个,最后一次打开的操作不保留了。(解决错误操作)</p></div><h3 id="_0x03-主界面-ida-view-pseudocode" tabindex="-1">0x03 主界面 - IDA View&amp;Pseudocode <a class="header-anchor" href="#_0x03-主界面-ida-view-pseudocode" aria-label="Permalink to &quot;0x03 主界面 - IDA View&amp;Pseudocode&quot;"></a></h3><p>反汇编代码的图表窗口</p><p><img src="https://cdn.xyxsw.site/image-20220809130857159.png" alt=""></p><p>按<strong>空格键</strong>切换成文本结构的反汇编</p><p><img src="https://cdn.xyxsw.site/image-20220809130940294.png" alt=""></p><p>按<strong>F5</strong>进行反编译跳转至<code>Pseudocode</code>(伪代码) 界面</p><p><img src="https://cdn.xyxsw.site/image-20220809131038284.png" alt=""></p><p>然后就可以分析代码逻辑了</p><p>直接点击函数名可以进入到对应函数内部查看函数逻辑</p><h3 id="_0x04-主界面-hex-view" tabindex="-1">0x04 主界面 - Hex View <a class="header-anchor" href="#_0x04-主界面-hex-view" aria-label="Permalink to &quot;0x04 主界面 - Hex View&quot;"></a></h3><p>十六进制窗口 (不太常用)</p><p><img src="https://cdn.xyxsw.site/image-20220809132027773.png" alt=""></p><h3 id="_0x05-主界面-structures" tabindex="-1">0x05 主界面-Structures <a class="header-anchor" href="#_0x05-主界面-structures" aria-label="Permalink to &quot;0x05 主界面-Structures&quot;"></a></h3><p>结构体窗口</p><p><img src="https://cdn.xyxsw.site/image-20220809132130778.png" alt=""></p><h3 id="_0x06-主界面-enums" tabindex="-1">0x06 主界面-Enums <a class="header-anchor" href="#_0x06-主界面-enums" aria-label="Permalink to &quot;0x06 主界面-Enums&quot;"></a></h3><p>枚举类型界面</p><p><img src="https://cdn.xyxsw.site/image-20220809132242739.png" alt=""></p><h3 id="_0x07-主界面-imports" tabindex="-1">0x07 主界面-Imports <a class="header-anchor" href="#_0x07-主界面-imports" aria-label="Permalink to &quot;0x07 主界面-Imports&quot;"></a></h3><p>导入表</p><p>可以查看当前模块用了哪些模块的哪些函数</p><p><img src="https://cdn.xyxsw.site/image-20220809132327043.png" alt=""></p><h3 id="_0x08-主界面-exports" tabindex="-1">0x08 主界面-Exports <a class="header-anchor" href="#_0x08-主界面-exports" aria-label="Permalink to &quot;0x08 主界面-Exports&quot;"></a></h3><p>导出表</p><p><img src="https://cdn.xyxsw.site/image-20220809151050575.png" alt=""></p><h3 id="_0x09-主界面-strings" tabindex="-1">0x09 主界面-Strings <a class="header-anchor" href="#_0x09-主界面-strings" aria-label="Permalink to &quot;0x09 主界面-Strings&quot;"></a></h3><p>按<code>Shift+F12</code>转到<code>String</code>界面,该操作会搜索程序中的字符串数据并展示</p><p><img src="https://cdn.xyxsw.site/image-20220809153126737.png" alt=""></p><p>按<code>Ctrl+F</code>后输入想要检索的字符可以快速搜索字符串</p><p><img src="https://cdn.xyxsw.site/image-20220809153408536.png" alt=""></p><h3 id="_0x0a-其他界面-functions" tabindex="-1">0x0a 其他界面-Functions <a class="header-anchor" href="#_0x0a-其他界面-functions" aria-label="Permalink to &quot;0x0a 其他界面-Functions&quot;"></a></h3><p>罗列了程序中用到的所有函数,包括底层调用的库的函数</p><p>其中一般来说<code>main</code>是程序的主要函数</p><p><img src="https://cdn.xyxsw.site/image-20220809151328885.png" alt=""></p><h3 id="_0x0b-其他界面-output" tabindex="-1">0x0b 其他界面-Output <a class="header-anchor" href="#_0x0b-其他界面-output" aria-label="Permalink to &quot;0x0b 其他界面-Output&quot;"></a></h3><p>程序的输出信息都会展示在这里</p><p>其中包括插件的加载信息、插件/脚本运行时的输出等</p><p>另外还可以直接在下面输入 python 语句,方便在 ida 使用过程中简单的数据处理</p><p><img src="https://cdn.xyxsw.site/image-20220809151536894.png" alt=""></p><h3 id="_0x0c-其他界面-导航栏" tabindex="-1">0x0c 其他界面 - 导航栏 <a class="header-anchor" href="#_0x0c-其他界面-导航栏" aria-label="Permalink to &quot;0x0c 其他界面 - 导航栏&quot;"></a></h3><p>一个二进制文件包括不同的区块,这里显示程序的不同类型数据,不同的颜色代表二进制文件中不同的块</p><p><img src="https://cdn.xyxsw.site/image-20220809151815243.png" alt=""></p><h3 id="_0x0d-常用快捷键" tabindex="-1">0x0d 常用快捷键 <a class="header-anchor" href="#_0x0d-常用快捷键" aria-label="Permalink to &quot;0x0d 常用快捷键&quot;"></a></h3><blockquote><p>边用边记,多打打就会记住了!</p><p>只记录了部分</p></blockquote><ul><li><p><code>;</code> 为当前指令添加注释</p></li><li><p><code>/</code> 在伪代码中添加注释</p></li><li><p><code>g</code> 跳转到任意地址</p></li><li><p><code>Esc</code> 返回到跳转前的位置</p></li><li><p><code>n</code> 定义或修改名称,常用来修改函数和变量的名字</p></li><li><p><code>A</code> 按照 ASCII 显示数据</p></li><li><p><code>D</code> 分别按字节、字、双字来显示数据</p></li><li><p><code>F5</code>反编译汇编代码,得到 C 伪代码</p></li><li><p><code>Shift+F12</code> 搜索程序中的字符串</p></li><li><p><code>Alt+t</code> 搜索程序中的指令</p></li><li><p><code>Ctrl+x</code> 查看变量和函数的引用</p></li><li><p><code>Y</code> 修改变量/函数类型</p></li><li><p><code>F2</code>快速下断点</p></li></ul><h3 id="_0x0e-常用插件" tabindex="-1">0x0e 常用插件 <a class="header-anchor" href="#_0x0e-常用插件" aria-label="Permalink to &quot;0x0e 常用插件&quot;"></a></h3><blockquote><p>具体安装和使用不在此展开了</p></blockquote><ul><li><a href="https://github.com/polymorf/findcrypt-yara" target="_blank" rel="noreferrer">Find Crypt</a> -- 寻找常用加密算法中的常数(需要安装 <a href="https://github.com/VirusTotal/yara-python" target="_blank" rel="noreferrer">yara-python</a></li><li><a href="https://github.com/keystone-engine/keypatch" target="_blank" rel="noreferrer">Keypatch</a> -- 基于 Keystone 的 Patch 二进制文件插件</li><li><a href="https://github.com/P4nda0s/LazyIDA" target="_blank" rel="noreferrer">LazyIDA: Make your IDA Lazy!</a> -- 快速 Dump 内存数据</li><li><a href="https://github.com/aliyunav/Finger" target="_blank" rel="noreferrer">Finger</a> -- 函数签名识别插件</li><li><a href="https://gitlab.com/eshard/d810" target="_blank" rel="noreferrer">D810</a> -- 去混淆插件</li></ul><h2 id="_0x10-ida-python" tabindex="-1">0x10 IDA Python <a class="header-anchor" href="#_0x10-ida-python" aria-label="Permalink to &quot;0x10 IDA Python&quot;"></a></h2><p>IDA 提供可与其交互的 IDA Python 接口,可以使用 Python 做很多的辅助操作</p><p><img src="https://cdn.xyxsw.site/image-20220809154742462.png" alt=""></p><p>可以参考这篇文章了解常用的接口</p><p><a href="https://4nsw3r.top/2022/02/11/IDA%20Python%20%E5%B8%B8%E7%94%A8%E5%87%BD%E6%95%B0/" target="_blank" rel="noreferrer">IDA Python 常用函数 | 4nsw3r&#39;s Blog</a></p><h2 id="_0x11-ida-动态调试" tabindex="-1">0x11 IDA 动态调试 <a class="header-anchor" href="#_0x11-ida-动态调试" aria-label="Permalink to &quot;0x11 IDA 动态调试&quot;"></a></h2><blockquote><p>暂时只对 Windows 和 Linux 下的文件调试做介绍Mac 和 Android 下的文件调试有待读者后续探索</p></blockquote><h3 id="调试-windows-下的文件" tabindex="-1">调试 Windows 下的文件 <a class="header-anchor" href="#调试-windows-下的文件" aria-label="Permalink to &quot;调试 Windows 下的文件&quot;"></a></h3><p>可以先在汇编代码或伪代码界面下断点,然后<code>F9</code>选择调试器,这里直接选<code>Local Windows Debugger</code></p><p><img src="https://cdn.xyxsw.site/image-20220809160044665.png" alt=""></p><p>之后就可以用 F7(单步不跳过执行)/F8(单步跳过执行)/F9(继续执行,遇到断点停止) 进行调试</p><p><img src="https://cdn.xyxsw.site/image-20220809163138453.png" alt=""></p><h3 id="调试-linux-下的文件" tabindex="-1">调试 Linux 下的文件 <a class="header-anchor" href="#调试-linux-下的文件" aria-label="Permalink to &quot;调试 Linux 下的文件&quot;"></a></h3><p>可以先在汇编代码或伪代码界面下断点</p><p><img src="https://cdn.xyxsw.site/image-20220809155352920.png" alt=""></p><p>由于 Linux 下文件调试比较特殊,需要远程起一个服务器运行服务端,这里可以使用<strong>Vmware</strong>或者**WSL2(Windows subsystem Linux)**进行调试</p><p>因篇幅有限,在这里直接贴篇链接供大家学习并选择调试方式</p><ul><li>Vmware 调试 <a href="https://bbs.kanxue.com/thread-247830.htm" target="_blank" rel="noreferrer">IDA 动态调试 ELF</a></li><li>WSL 调试(安装好 WSL 直接运行 ida dbgsrv 目录下 linux_server 文件即可以)</li></ul><p>后面是一样的调试步骤</p><h2 id="_0x12-一个简单程序的分析" tabindex="-1">0x12 一个简单程序的分析 <a class="header-anchor" href="#_0x12-一个简单程序的分析" aria-label="Permalink to &quot;0x12 一个简单程序的分析&quot;"></a></h2><h3 id="源代码" tabindex="-1">源代码 <a class="header-anchor" href="#源代码" aria-label="Permalink to &quot;源代码&quot;"></a></h3><div class="language-c vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">c</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">#include</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &lt;stdio.h&gt;</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">#include</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &lt;string.h&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">void</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> change</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">char*</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> for</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">int</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> i </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">; i </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> strlen</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(str) ; i</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">++</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
<span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[i] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[i] </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> int</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> check</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">char*</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> str</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">){</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> strcmp</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(str, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;ek\`fzHC@^0r^m/s^b/lo0dw2c|&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">==</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 0</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">int</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> main</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> char</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> input</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">100</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">];</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> scanf</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">%100s</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, input);</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> change</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(input);</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">check</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(input)) {</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> printf</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;You are right</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> else</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> printf</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;You are wrong</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\\n</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">);</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h4 id="分析历程" tabindex="-1">分析历程 <a class="header-anchor" href="#分析历程" aria-label="Permalink to &quot;分析历程&quot;"></a></h4><h5 id="将程序拖入-ida" tabindex="-1">将程序拖入 IDA <a class="header-anchor" href="#将程序拖入-ida" aria-label="Permalink to &quot;将程序拖入 IDA&quot;"></a></h5><p><img src="https://cdn.xyxsw.site/image-20220809173439491.png" alt=""></p><p><img src="https://cdn.xyxsw.site/image-20220809173548998.png" alt=""></p><h5 id="f5-分析查看伪代码" tabindex="-1">F5 分析查看伪代码 <a class="header-anchor" href="#f5-分析查看伪代码" aria-label="Permalink to &quot;F5 分析查看伪代码&quot;"></a></h5><p><img src="https://cdn.xyxsw.site/image-20220809173627488.png" alt=""></p><p>发现有<code>change</code>和<code>check</code>的自定义函数</p><p>按<code>n</code>修改一下变量名</p><p><img src="https://cdn.xyxsw.site/image-20220809174001600.png" alt=""></p><p><img src="https://cdn.xyxsw.site/image-20220809174015603.png" alt=""></p><p>分别进入里面查看函数逻辑</p><h5 id="查看函数逻辑" tabindex="-1">查看函数逻辑 <a class="header-anchor" href="#查看函数逻辑" aria-label="Permalink to &quot;查看函数逻辑&quot;"></a></h5><p>change 函数</p><p><img src="https://cdn.xyxsw.site/image-20220809174035800.png" alt=""></p><p>check 函数</p><p><img src="https://cdn.xyxsw.site/image-20220809174058831.png" alt=""></p><h6 id="静态分析逻辑" tabindex="-1">静态分析逻辑 <a class="header-anchor" href="#静态分析逻辑" aria-label="Permalink to &quot;静态分析逻辑&quot;"></a></h6><p>change 函数是对输入字符串的每一个字节进行修改</p><p>然后在 check 函数进行比较</p><h6 id="动态分析逻辑" tabindex="-1">动态分析逻辑 <a class="header-anchor" href="#动态分析逻辑" aria-label="Permalink to &quot;动态分析逻辑&quot;"></a></h6><p>在 change 函数进入前下好断点</p><p>随意的进行一些输入</p><p><img src="https://cdn.xyxsw.site/image-20220809174913326.png" alt=""></p><p>然后断下来</p><p><img src="https://cdn.xyxsw.site/image-20220809174957987.png" alt=""></p><p>F7 进入函数进行单步不跳过调试</p><p><img src="https://cdn.xyxsw.site/image-20220809175413448.png" alt=""></p><p>遇到类似<code>strlen</code>等库函数可以 F8 单步调试跳过</p><p><img src="https://cdn.xyxsw.site/image-20220809175459668.png" alt=""></p><p>可以发现输入字符串的每一个字节的 Ascii 值都减小了 1</p><h5 id="脚本编写" tabindex="-1">脚本编写 <a class="header-anchor" href="#脚本编写" aria-label="Permalink to &quot;脚本编写&quot;"></a></h5><p>试试写一个脚本解出这道题吧!</p>`,121),n=[p];function h(l,r,d,o,k,c){return i(),a("div",null,n)}const E=s(e,[["render",h]]);export{x as __pageData,E as default};