📄 chap8-1-3.htm.primary
字号:
<html>
<head>
<title>Crack Tutorial</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style/css.css" type="text/css">
<link rel="stylesheet" href="../STYLE/Css.css" type="text/css">
</head>
<body bgcolor="white" text="#000000" link="#004080" vlink="#004080" background="../image/Back.gif">
<p><a href="../catalog.htm">目录</a>>>第8章</p>
<p align="center" class="shadow1Copy"><b class="p3">第8章 压缩与脱壳</b></p>
<table width="80%" border="0" cellspacing="0" cellpadding="3" align="center" bgcolor="#bcbcbc" bordercolor="#111111" class="shadow1">
<tr>
<td class="shadow1" width="20%">
<div align="center"><a href="Chap8-1.htm"><font color="#FFFFFF">第一节 PE文件格式</font></a></div>
</td>
<td class="shadow1" width="20%">
<div align="center"><a href="Chap8-2.htm"><font color="#FFFFFF">第二节 认识脱壳</font></a></div>
</td>
<td class="shadow1" width="20%">
<div align="center"><a href="Chap8-3-1.htm"><font color="#FFFFFF">第三节 自动脱壳</font></a></div>
</td>
<td class="shadow1" width="20%">
<div align="center"><a href="Chap8-4.htm"><font color="#FFFFFF">第四节 手动脱壳</font></a></div>
</td>
<td class="shadow1" width="20%">
<div align="center"><a href="Chap8-5.htm"><font color="#FFFFFF">第五节 脱壳高级篇</font></a></div>
</td>
</tr>
</table>
<p align="center"><span class="p9"><b>第一节 PE文件格式</b></span></p>
<table width="80%" border="1" align="center" bgcolor="#efefef" cellpadding="5" cellspacing="0" bordercolor="#111111">
<tr>
<td>1、<a href="Chap8-1-1.htm">PE文件格式一览 </a></td>
<td>2、<a href="Chap8-1-2.htm">检验PE文件的有效性 </a> </td>
<td><span class="p9"><span class="p9">3、<span class="p9"><a href="Chap8-1-3.htm">File
Header(文件头)</a></span></span></span></td>
<td>4、<a href="Chap8-1-4.htm">Optional Header</a></td>
</tr>
<tr>
<td>5、<a href="Chap8-1-5.htm">Section Table</a></td>
<td>6、<a href="Chap8-1-6.htm">Import Table</a></td>
<td>7、<a href="Chap8-1-7.htm">Export Table</a></td>
<td> </td>
</tr>
</table>
<h1 align="center"><font color="#000000" face="Arial, Helvetica, sans-serif">PE</font><font color="#000000">教程</font><font color="#000000" face="Arial, Helvetica, sans-serif">3:
File Header </font><font color="#000000">(文件头)</font></h1>
<p><font size="2" color="#000000">本课我们将要研究 </font><font size="2" face="MS Sans Serif" color="#000000">PE
header </font><font size="2" color="#000000">的 </font><font size="2" face="MS Sans Serif" color="#000000">file
header</font><font size="2" color="#000000">(文件头)部分。</font></p>
<p><font size="2" color="#000000">至此,我们已经学到了哪些东东,先简要回顾一下</font><font size="2" face="MS Sans Serif" color="#000000">:</font></p>
<ul>
<li><font size="2" face="MS Sans Serif" color="#000000">DOS MZ header </font><font size="2" color="#000000">又命名为<b>
</b></font><font color="#000000" size="2" face="MS Sans Serif"><b>IMAGE_DOS_HEADER</b>.</font><font size="2" color="#000000">。其中只有两个域比较重要</font><font size="2" face="MS Sans Serif" color="#000000">:
<b>e_magic</b> </font><font size="2" color="#000000">包含字符串</font><font size="2" face="MS Sans Serif" color="#000000">"MZ"</font><font size="2" color="#000000">,</font><font color="#000000" size="2" face="MS Sans Serif"><b>e_lfanew</b>
</font><font size="2" color="#000000">包含</font><font size="2" face="MS Sans Serif" color="#000000">PE
header</font><font size="2" color="#000000">在文件中的偏移量。</font></li>
<li><font size="2" color="#000000">比较</font><font color="#000000" size="2" face="MS Sans Serif"><b>e_magic</b>
</font><font size="2" color="#000000">是否为</font><font color="#000000" size="2" face="MS Sans Serif"><b>IMAGE_DOS_SIGNATURE</b></font><font size="2" color="#000000">以验证是否是有效的</font><font size="2" face="MS Sans Serif" color="#000000">DOS
header</font><font size="2" color="#000000">。比对符合则认为文件拥有一个有效的</font><font size="2" face="MS Sans Serif" color="#000000">DOS
header</font><font size="2" color="#000000">。</font></li>
<li><font size="2" color="#000000">为了定位</font><font size="2" face="MS Sans Serif" color="#000000">PE
header</font><font size="2" color="#000000">,移动文件指针到</font><font color="#000000" size="2" face="MS Sans Serif"><b>e_lfanew</b></font><font size="2" color="#000000">所指向的偏移。</font></li>
<li><font size="2" face="MS Sans Serif" color="#000000">PE header</font><font size="2" color="#000000">的第一个双字包含字符串</font><font size="2" face="MS Sans Serif" color="#000000">"PE\0\0"</font><font size="2" color="#000000">。该双字与</font><font color="#000000" size="2" face="MS Sans Serif"><b>IMAGE_NT_SIGNATURE</b></font><font size="2" color="#000000">比对,符合则认为</font><font size="2" face="MS Sans Serif" color="#000000">PE
header</font><font size="2" color="#000000">有效。</font></li>
</ul>
<p><font size="2" color="#000000">本课我们继续探讨关于 </font><font size="2" face="MS Sans Serif" color="#000000">PE
header </font><font size="2" color="#000000">的知识。 </font><font size="2" face="MS Sans Serif" color="#000000">PE
header </font><font size="2" color="#000000">的正式命名是 </font><font color="#000000" size="2" face="MS Sans Serif"><b>IMAGE_NT_HEADERS</b></font><font size="2" color="#000000">。再来回忆一下这个结构。</font></p>
<blockquote>
<p><font color="#000000" size="2" face="MS Sans Serif"><b>IMAGE_NT_HEADERS STRUCT
<br>
Signature dd ? <br>
FileHeader IMAGE_FILE_HEADER <> <br>
OptionalHeader IMAGE_OPTIONAL_HEADER32 <> <br>
IMAGE_NT_HEADERS ENDS </b></font></p>
</blockquote>
<p><font color="#000000" size="2" face="MS Sans Serif"><b>Signature</b> PE</font><font size="2" color="#000000">标记,值为</font><font size="2" face="MS Sans Serif" color="#000000">50h,
45h, 00h, 00h</font><font size="2" color="#000000">(</font><font size="2" face="MS Sans Serif" color="#000000">PE\0\0</font><font size="2" color="#000000">)。
<br>
</font><font color="#000000" size="2" face="MS Sans Serif"><b>FileHeader</b>
</font><font size="2" color="#000000">该结构域包含了关于</font><font size="2" face="MS Sans Serif" color="#000000">PE</font><font size="2" color="#000000">文件物理分布的一般信息。<br>
</font><font color="#000000" size="2" face="MS Sans Serif"><b>OptionalHeader
</b></font><font size="2" color="#000000">该结构域包含了关于</font><font size="2" face="MS Sans Serif" color="#000000">PE</font><font size="2" color="#000000">文件逻辑分布的信息。</font></p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -