Windbg常见问题-指令解法大全
本帖最后由 元始天尊 于 2015-11-15 20:12 编辑 <br /><br /><html><head>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=Generator content="Microsoft Word 15 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 5 4 2 2 2 2 2 4;}
@font-face
{font-family:Courier;
panose-1:2 7 4 9 2 2 5 2 4 4;}
@font-face
{font-family:"Tms Rmn";
panose-1:2 2 6 3 4 5 5 2 3 4;}
@font-face
{font-family:Helv;
panose-1:2 11 6 4 2 2 2 3 2 4;}
@font-face
{font-family:"New York";
panose-1:2 4 5 3 6 5 6 2 3 4;}
@font-face
{font-family:System;
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
{font-family:Batang;
panose-1:2 3 6 0 0 1 1 1 1 1;}
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:PMingLiU;
panose-1:2 1 6 1 0 1 1 1 1 1;}
@font-face
{font-family:"MS Gothic";
panose-1:2 11 6 9 7 2 5 8 2 4;}
@font-face
{font-family:Dotum;
panose-1:2 11 6 0 0 1 1 1 1 1;}
@font-face
{font-family:黑体;
panose-1:2 1 6 9 6 1 1 1 1 1;}
@font-face
{font-family:MingLiU;
panose-1:2 1 6 9 0 1 1 1 1 1;}
@font-face
{font-family:Mincho;
panose-1:2 2 6 9 4 3 5 8 3 5;}
@font-face
{font-family:Gulim;
panose-1:2 11 6 0 0 1 1 1 1 1;}
@font-face
{font-family:Century;
panose-1:2 4 6 3 5 7 5 2 3 3;}
@font-face
{font-family:"Angsana New";
panose-1:2 2 6 3 5 4 5 2 3 4;}
@font-face
{font-family:"Cordia New";
panose-1:2 11 3 4 2 2 2 2 2 4;}
@font-face
{font-family:Mangal;
panose-1:0 0 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Latha;
panose-1:2 0 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Sylfaen;
panose-1:1 10 5 2 5 3 6 3 3 3;}
@font-face
{font-family:Vrinda;
panose-1:0 0 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Raavi;
panose-1:2 0 5 0 0 0 0 0 0 0;}
@font-face
{font-family:Shruti;
panose-1:2 0 5 0 0 0 0 0 0 0;}
@font-face
{font-family:Sendnya;
panose-1:0 0 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Gautami;
panose-1:2 0 5 0 0 0 0 0 0 0;}
@font-face
{font-family:Tunga;
panose-1:0 0 4 0 0 0 0 0 0 0;}
@font-face
{font-family:"Estrangelo Edessa";
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Arial Unicode MS";
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Calibri Light";
panose-1:2 15 3 2 2 2 4 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Microsoft YaHei UI";
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:Cambria;
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
h1
{mso-style-link:"标题 1 Char";
margin-top:17.0pt;
margin-right:0cm;
margin-bottom:16.5pt;
margin-left:0cm;
text-align:center;
line-height:240%;
page-break-after:avoid;
font-size:26.0pt;
font-family:"Calibri",sans-serif;}
h2
{mso-style-link:"标题 2 Char";
margin-top:13.0pt;
margin-right:0cm;
margin-bottom:13.0pt;
margin-left:0cm;
text-align:center;
line-height:173%;
page-break-after:avoid;
font-size:18.0pt;
font-family:"Cambria",serif;}
h3
{mso-style-link:"标题 3 Char";
margin-top:13.0pt;
margin-right:0cm;
margin-bottom:13.0pt;
margin-left:0cm;
text-align:justify;
text-justify:inter-ideograph;
line-height:173%;
page-break-after:avoid;
font-size:14.0pt;
font-family:"Calibri",sans-serif;}
h4
{mso-style-link:"标题 4 Char";
margin-top:14.0pt;
margin-right:0cm;
margin-bottom:14.5pt;
margin-left:0cm;
text-align:justify;
text-justify:inter-ideograph;
line-height:156%;
page-break-after:avoid;
font-size:14.0pt;
font-family:"Cambria",serif;}
p.MsoToc1, li.MsoToc1, div.MsoToc1
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
p.MsoToc2, li.MsoToc2, div.MsoToc2
{margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:21.0pt;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
p.MsoToc3, li.MsoToc3, div.MsoToc3
{margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:42.0pt;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
p.MsoToc4, li.MsoToc4, div.MsoToc4
{margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:63.0pt;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
p.MsoToc5, li.MsoToc5, div.MsoToc5
{margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:84.0pt;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
p.MsoToc6, li.MsoToc6, div.MsoToc6
{margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:105.0pt;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
p.MsoToc7, li.MsoToc7, div.MsoToc7
{margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:126.0pt;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
p.MsoToc8, li.MsoToc8, div.MsoToc8
{margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:147.0pt;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
p.MsoToc9, li.MsoToc9, div.MsoToc9
{margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:168.0pt;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
p.MsoHeader, li.MsoHeader, div.MsoHeader
{mso-style-link:"页眉 Char";
margin:0cm;
margin-bottom:.0001pt;
text-align:center;
layout-grid-mode:char;
border:none;
padding:0cm;
font-size:9.0pt;
font-family:"Calibri",sans-serif;}
p.MsoFooter, li.MsoFooter, div.MsoFooter
{mso-style-link:"页脚 Char";
margin:0cm;
margin-bottom:.0001pt;
layout-grid-mode:char;
font-size:9.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-link:"批注框文本 Char";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
font-size:9.0pt;
font-family:"Calibri",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
text-indent:21.0pt;
font-size:10.5pt;
font-family:"Calibri",sans-serif;}
p.MsoTocHeading, li.MsoTocHeading, div.MsoTocHeading
{margin-top:24.0pt;
margin-right:0cm;
margin-bottom:0cm;
margin-left:0cm;
margin-bottom:.0001pt;
line-height:115%;
page-break-after:avoid;
font-size:14.0pt;
font-family:"Cambria",serif;
color:#365F91;
font-weight:bold;}
span.Char
{mso-style-name:"页眉 Char";
mso-style-link:页眉;}
span.Char0
{mso-style-name:"页脚 Char";
mso-style-link:页脚;}
span.2Char
{mso-style-name:"标题 2 Char";
mso-style-link:"标题 2";
font-family:"Cambria",serif;
font-weight:bold;}
span.1Char
{mso-style-name:"标题 1 Char";
mso-style-link:"标题 1";
font-weight:bold;}
span.Char1
{mso-style-name:"批注框文本 Char";
mso-style-link:批注框文本;}
span.3Char
{mso-style-name:"标题 3 Char";
mso-style-link:"标题 3";
font-weight:bold;}
span.4Char
{mso-style-name:"标题 4 Char";
mso-style-link:"标题 4";
font-family:"Cambria",serif;
font-weight:bold;}
span.msoIns
{mso-style-name:"";
text-decoration:underline;
color:teal;}
span.msoDel
{mso-style-name:"";
text-decoration:line-through;
color:red;}
.MsoChpDefault
{font-family:"Calibri",sans-serif;}
/* Page Definitions */
@page WordSection1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
layout-grid:15.6pt;}
div.WordSection1
{page:WordSection1;}
@page WordSection2
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
layout-grid:15.6pt;}
div.WordSection2
{page:WordSection2;}
@page WordSection3
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection3
{page:WordSection3;}
@page WordSection4
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection4
{page:WordSection4;}
@page WordSection5
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection5
{page:WordSection5;}
@page WordSection6
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection6
{page:WordSection6;}
@page WordSection7
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection7
{page:WordSection7;}
@page WordSection8
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection8
{page:WordSection8;}
@page WordSection9
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection9
{page:WordSection9;}
@page WordSection10
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection10
{page:WordSection10;}
@page WordSection11
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection11
{page:WordSection11;}
@page WordSection12
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection12
{page:WordSection12;}
@page WordSection13
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection13
{page:WordSection13;}
@page WordSection14
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection14
{page:WordSection14;}
@page WordSection15
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection15
{page:WordSection15;}
@page WordSection16
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection16
{page:WordSection16;}
@page WordSection17
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection17
{page:WordSection17;}
@page WordSection18
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection18
{page:WordSection18;}
@page WordSection19
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection19
{page:WordSection19;}
@page WordSection20
{size:595.3pt 841.9pt;
margin:1.0cm 1.0cm 1.0cm 1.0cm;
layout-grid:15.6pt;}
div.WordSection20
{page:WordSection20;}
/* List Definitions */
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
-->
</style>
</head>
<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>
<div class=WordSection1 style='layout-grid:15.6pt'>
<h1> </h1>
<h1> </h1>
<h1><a name="_Toc435300796">Windbg</a><span style='font-family:宋体'>常见问题</span>-<span
style='font-family:宋体'>指令解法大全</span></h1>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-size:12.0pt'> </span></p>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-size:12.0pt'> </span></p>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-size:12.0pt'> </span></p>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-size:12.0pt'> </span></p>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-size:16.0pt'>Windbg common commands for common problems</span></p>
<p class=MsoNormal> </p>
<p class=MsoNormal> </p>
<p class=MsoNormal> </p>
<p class=MsoNormal> </p>
<p class=MsoNormal> </p>
<p class=MsoNormal> </p>
<p class=MsoNormal> </p>
<p class=MsoNormal> </p>
<p class=MsoNormal> </p>
<p class=MsoNormal> </p>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-size:14.0pt'> </span></p>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-size:14.0pt'>By lichao89047</span></p>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-size:14.0pt'>QQ:571652571</span></p>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-size:14.0pt'>2015/11/8</span></p>
</div>
<span style='font-size:10.5pt;font-family:"Calibri",sans-serif'><br clear=all
style='page-break-before:always'>
</span>
<div class=WordSection2 style='layout-grid:15.6pt'>
<p class=MsoTocHeading><span style='font-family:宋体'>目录</span></p>
<p class=MsoToc1><span lang=EN-US><a href="#_Toc435300796">Windbg<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>常见问题</span></span>-<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>指令解法大全</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>1</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300797"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>写在前面的话</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>5</span></a></span></p>
<p class=MsoToc1><span lang=EN-US><a href="#_Toc435300798"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>初级篇</span></span>——Windbg<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>基本用法</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>6</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300799"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>程序逻辑</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>7</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300800">Windbg<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>和</span></span>C<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>语法区别</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>7</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300801">as<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>宏定义</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>8</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300802"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>变量和操作符</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>9</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300803"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>正则表达式</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>9</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300804"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>命令流程控制</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>10</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300805"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>汇编</span></span>&<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>反汇编</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>11</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300806"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>怎样打印某函数调用关系</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>11</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300807"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>怎样显示函数指令数?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>12</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300808"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何在</span></span>X64<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>系统中实现</span></span>64<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>位执行模式<span lang=EN-US>和虚拟</span></span></span>86<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>执行模式</span></span>(wow)<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>切换</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>12</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300809"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何强制为</span></span>16<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>位反汇编?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>13</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300810"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何爆搜某种模式的反汇编指令?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>14</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300811"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何在由任意地址正确反汇编该地址附近的指令?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>14</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300812"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>怎样查找某地址附近的符号</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>15</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300813"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>指令执行</span></span>&<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>跟踪</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>16</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300814"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>怎样执行</span></span>/<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>跟踪到本函数或上级函数返回?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>16</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300815"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>怎样执行</span></span>/<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>跟踪到指定地址?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>16</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300816"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>怎样执行</span></span>/<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>跟踪到下一个分支指令?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>16</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300817"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何跟踪某函数执行过的所<span lang=EN-US>有子函数?</span></span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>16</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300818"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>回溯栈</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>18</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300819"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看</span></span>wow64<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>进程回溯栈?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>18</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300820"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>断点设置</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>19</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300821"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何在物理地址下断?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>19</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300822"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何对照</span></span>IDA<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>地址下断?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>19</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300823"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何在针对线程</span></span>/<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>进程下断?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>20</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300824">Ntfs<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>文件操作断点</span></span><span
style='color:windowtext;text-decoration:none'> </span>
<span lang=EN-US style='font-family:宋体'><span lang=EN-US>(不通用形式)</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>20</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300825"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何对形如</span></span>Gen*<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>的函数下断?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>20</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300826"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何对</span></span>pe<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>所有导出函数下断?</span></span><span
style='color:windowtext;text-decoration:none'> </span> <span
lang=EN-US style='font-family:宋体'><span lang=EN-US>(不通用形式)</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>20</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300827"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何在驱<span lang=EN-US>动入口下断?</span></span></span><span
style='color:windowtext;text-decoration:none'> </span>
<span lang=EN-US style='font-family:宋体'><span lang=EN-US>(不通用形式)</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>21</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300828"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何正确地下字符串断点?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>21</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300829"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>异常</span></span>&<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>事件</span></span><span style='color:
windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>22</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300830"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何在加载模块后暂停在</span></span>Windbg<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>中?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>22</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300831"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>线程进程</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>23</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300832"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何设置内核态进程</span></span>/<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>线程上下文?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>24</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300833"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何暂停</span></span>/<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>恢复线程执行?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>25</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300834"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何切换到可执行进程</span></span>/<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>线程?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>25</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300835"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何遍历模块?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>26</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300836"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何遍历进程?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>26</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300837"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何遍历线程?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>26</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300838"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何遍历寄存器?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>27</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300839"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何遍历系统句柄表?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>27</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300840"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何列出所有进程</span></span>EPROCESS<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>地址?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>27</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300841"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何对模块排序</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>27</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300842"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何获取进程名、进程</span></span>ID <span
lang=EN-US style='font-family:宋体'><span lang=EN-US>对应的进程对象</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>28</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300843">PE<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>相关</span></span><span style='color:
windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>30</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300844"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看某映像</span></span>(sys exe dll)<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>的版本号、时间、公司等信息?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>30</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300845"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何显示</span></span>pe<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>头信息?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>30</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300846"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查找内存中的</span></span>PE<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>头?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>31</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300847"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>符号</span></span>{<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>结构体</span></span>,<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>函数</span></span>,...}<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>查看</span></span><span style='color:
windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>32</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300848"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何列出以</span></span>T<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>开头的模块以查看他们的基址?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>32</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300849"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看所有前缀<span lang=EN-US>为</span></span></span>Rtl<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>的符号?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>32</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300850"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看</span></span>SEH<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>链</span></span><span style='color:windowtext;
display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>33</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300851"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看系统中断表</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>33</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300852"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看</span></span>I/O<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>请求包?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>33</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300853"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>指定基址如何查看结构体成员数值?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>33</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300854"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何打印内核单向</span></span>/<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>双向链<span lang=EN-US>表?</span></span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>34</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300855"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何获取某结构体大小?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>34</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300856"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何打印</span></span>STRING, ANSI_STRING,
UNICODE_STRING<span lang=EN-US style='font-family:宋体'><span lang=EN-US>结构?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>34</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300857"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何打印符号数组?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>34</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300858"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看进程环境块</span></span>PEB<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>结构?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>34</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300859"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看线程环境块</span></span>TEB<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>结构?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>35</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300860"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看内核进程控制块?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>36</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300861"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何打印系统服务表</span></span>SSDT, SSSDT?<span
style='color:windowtext;display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>37</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300862"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何打印用户态回调表</span></span>KernelCallbackTable?<span
style='color:windowtext;display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>38</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300863"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看系统中断表?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>39</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300864"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看指定地址所属模块?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>39</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300865"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>句柄和对象</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>40</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300866"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何根据</span></span><span lang=EN-US><span
lang=EN-US> </span></span><span lang=EN-US style='font-family:宋体'><span
lang=EN-US>基址、名称获取对象</span></span>(OBJECT)<span lang=EN-US style='font-family:
宋体'><span lang=EN-US>信息?</span></span><span style='color:windowtext;display:
none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>40</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300867"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看驱动对象、设备对象、文件对象信息?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>40</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300868"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何根据句柄获取对象信息?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>40</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300869"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看</span></span>Job<span lang=EN-US
style='font-family:宋体'><span lang=EN-US>对象?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>41</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300870"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何显示所有</span></span>ObjectType<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>类型名?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>41</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300871"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>注册表信息</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>42</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300872"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看注册表项键值?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>42</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300873"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>内存操作</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>43</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300874"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>查看物理内存使用</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>43</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300875"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>查看虚拟内存使用</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>43</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300876"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何获取</span></span>Fs:<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>所在地址?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>44</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300877"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看某虚拟内存地址对应的物理内存地址?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>44</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300878"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看某物<span lang=EN-US>理内存地址对应的虚拟内存地址?</span></span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>45</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300879"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看地址所在虚拟内存位于哪个模块?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>45</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300880"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何读写内存?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>46</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300881"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何以固定字节模式填充内存?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>47</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300882"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何拷贝虚拟内存块?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>47</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300883"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何比较虚拟内存块?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>47</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300884"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何将文件内容读取到调试器内存</span></span>/<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>从调试器内存写入文件?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>47</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300885"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何搜索内存?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>47</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300886"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看虚拟地址信息?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>48</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300887"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看内存池信息?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>48</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300888"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看内存堆信息?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>48</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300889"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何显示虚拟内存块及访问权限</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>48</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300890"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>特殊调试法</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>50</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300891"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何用内核态调试器控制用户态调试器进程联合调试?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>50</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300892"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何控制目标系统?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>52</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300893"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何在调试程序时无缝切换调试器?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>52</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300894"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何调试当前调试器?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>52</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300895"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何用应用程序控制调试器?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>52</span></a></span></p>
<p class=MsoToc2><span lang=EN-US><a href="#_Toc435300896"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>其他</span></span><span style='color:
windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>54</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300897"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何查看最耗费时间片的线程?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>54</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300898"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何快速替换驱动文件</span></span>?<span
style='color:windowtext;text-decoration:none'> </span>
<span lang=EN-US style='font-family:宋体'><span lang=EN-US>是否对</span></span>exe
dll<span lang=EN-US style='font-family:宋体'><span lang=EN-US>有效??</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>54</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300899"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>读写</span></span>gflag<span
style='color:windowtext;display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>55</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300900"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>分析蓝屏</span></span>dump<span
style='color:windowtext;display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>55</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300901"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>显示当前使用的系统定时器</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>55</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300902"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>命令:</span></span>!mapped_file<span
style='color:windowtext;display:none;text-decoration:none'>. </span><span
style='color:windowtext;display:none;text-decoration:none'>55</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300903"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>清屏</span></span><span style='color:
windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>56</span></a></span></p>
<p class=MsoToc1><span lang=EN-US><a href="#_Toc435300904"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>中级篇</span></span>——Windbg<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>插件编写</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>57</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300905"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何输出</span></span><span lang=EN-US><span
lang=EN-US>pdb</span></span><span lang=EN-US style='font-family:宋体'><span
lang=EN-US>中所有结构体?</span></span><span style='color:windowtext;display:none;
text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>57</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300906"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何扩展</span></span><span lang=EN-US><span
lang=EN-US>a</span></span><span lang=EN-US style='font-family:宋体'><span
lang=EN-US>指令为</span></span><span lang=EN-US><span lang=EN-US>64</span></span><span
lang=EN-US style='font-family:宋体'><span lang=EN-US>位汇编?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>57</span></a></span></p>
<p class=MsoToc3><span lang=EN-US><a href="#_Toc435300907"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>如何实现内存访问断点?</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>57</span></a></span></p>
<p class=MsoToc1><span lang=EN-US><a href="#_Toc435300908"><span lang=EN-US
style='font-family:宋体'><span lang=EN-US>高级篇</span></span>——Windbg<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>的</span></span>Bug<span
lang=EN-US style='font-family:宋体'><span lang=EN-US>及命令实现</span></span><span
style='color:windowtext;display:none;text-decoration:none'>... </span><span
style='color:windowtext;display:none;text-decoration:none'>58</span></a></span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
</div>
<span lang=EN-US style='font-size:10.5pt;font-family:"Calibri",sans-serif'><br
clear=all style='page-break-before:always'>
</span>
<div class=WordSection3 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300797"><span style='font-family:宋体'>写在前面的话</span></a></h2>
<p class=MsoNormal><span lang=EN-US> Windbg</span><span
style='font-family:宋体'>符号设置:</span></p>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>设置系统变量</span><span lang=EN-US>_NT_SYMBOL_PATH</span><span
style='font-family:宋体'>为</span><span lang=EN-US>SRV*e:\symbol*http://msdl.microsoft.com/download/symbols
e:\symbol</span><span style='font-family:宋体'>设置为你要存储</span><span lang=EN-US>pdb</span><span
style='font-family:宋体'>符号文件的目录</span></p>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>设置交互式插件扩展:</span></p>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>将</span><span lang=EN-US>winxp</span><span
style='font-family:宋体'>目录下的插件</span><span lang=EN-US>Kdexts.dll</span><span
style='font-family:宋体'>,拷贝到</span><span lang=EN-US>winext</span><span
style='font-family:宋体'>下,即可开启</span><span lang=EN-US>amli</span><span
style='font-family:宋体'>模式,可交互</span></p>
<p class=MsoNormal><span lang=EN-US> Windbg</span><span
style='font-family:宋体'>是微软提供的强大的调试诊断工具,可进行应用态和内核态调试,采用命令行形式控制目标。</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>本书先对常用指令进行介绍,之后带入自己学习开发</span><span
lang=EN-US>Windbg</span><span style='font-family:宋体'>插件过程,最后对已有命令进行分析以找到使其失效的方式。</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
</div>
<span lang=EN-US style='font-size:10.5pt;font-family:"Calibri",sans-serif'><br
clear=all style='page-break-before:always'>
</span>
<div class=WordSection4 style='layout-grid:15.6pt'>
<h1><a name="_Toc435300798"><span style='font-family:宋体'>初级篇——</span>Windbg</a><span
style='font-family:宋体'>基本用法</span></h1>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection5 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300799"><span style='font-family:宋体'>程序逻辑</span></a></h2>
<h3><a name="_Toc435300800"><span lang=EN-US>Windbg</span></a><span
style='font-family:宋体'>和</span><span lang=EN-US>C</span><span style='font-family:
宋体'>语法区别</span></h3>
<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
style='margin-left:84.15pt;border-collapse:collapse;border:none'>
<tr>
<td width=138 valign=top style='width:69.2pt;border:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US> </span></p>
</td>
<td width=369 valign=top style='width:184.3pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>Windbg</span></p>
</td>
<td width=326 valign=top style='width:163.0pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>C</span></p>
</td>
</tr>
<tr>
<td width=138 valign=top style='width:69.2pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span style='font-family:宋体'>自由变量</span></p>
</td>
<td width=369 valign=top style='width:184.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>@$t1, @$t2, @$t3,, @$t19</span></p>
</td>
<td width=326 valign=top style='width:163.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>Int i,j,k,.....</span></p>
</td>
</tr>
<tr>
<td width=138 valign=top style='width:69.2pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span style='font-family:宋体'>赋值</span></p>
</td>
<td width=369 valign=top style='width:184.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>r@$t1=0;r@$t2=@$t1</span></p>
</td>
<td width=326 valign=top style='width:163.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>i=0;j=i</span></p>
</td>
</tr>
<tr>
<td width=138 valign=top style='width:69.2pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span style='font-family:宋体'>解引用</span></p>
</td>
<td width=369 valign=top style='width:184.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>Poi(@$t1)</span></p>
</td>
<td width=326 valign=top style='width:163.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>*(int*)i</span></p>
</td>
</tr>
<tr>
<td width=138 valign=top style='width:69.2pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span style='font-family:宋体'>宏定义</span></p>
</td>
<td width=369 valign=top style='width:184.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>as Name Val</span></p>
</td>
<td width=326 valign=top style='width:163.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>#define Name Val</span></p>
</td>
</tr>
<tr>
<td width=138 valign=top style='width:69.2pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span style='font-family:宋体'>打印字符串</span></p>
</td>
<td width=369 valign=top style='width:184.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>.echo str</span></p>
</td>
<td width=326 valign=top style='width:163.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>puts(str)</span></p>
</td>
</tr>
<tr>
<td width=138 valign=top style='width:69.2pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span style='font-family:宋体'>格式化输出</span></p>
</td>
<td width=369 valign=top style='width:184.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>.printf “%?%?%?”,arg1,args,...</span></p>
</td>
<td width=326 valign=top style='width:163.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>printf(“%?%?%?”,arg1,arg2,...)</span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span lang=EN-US>% </span><span
style='font-family:宋体'>指针</span></p>
<p class=MsoNormal><span lang=EN-US>%ma ASCII</span><span
style='font-family:宋体'>字符串</span></p>
<p class=MsoNormal><span lang=EN-US>%mu UNICODE</span><span
style='font-family:宋体'>字符串</span></p>
<p class=MsoNormal><span lang=EN-US>%msa ANSI_STRING</span><span
style='font-family:宋体'>字符串</span></p>
<p class=MsoNormal><span lang=EN-US>%msu UNICODE_STRING</span><span
style='font-family:宋体'>字符串</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>格式化输出:</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.formats
</span><span style='font-family:宋体'>表达式</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> .formats 1c407e62</span></p>
<p class=MsoNormal><span lang=EN-US>Evaluate expression:</span></p>
<p class=MsoNormal><span lang=EN-US> Hex:
1c407e62</span></p>
<p class=MsoNormal><span lang=EN-US> Decimal: 473988706</span></p>
<p class=MsoNormal><span lang=EN-US> Octal: 03420077142</span></p>
<p class=MsoNormal><span lang=EN-US> Binary: 00011100 01000000
01111110 01100010</span></p>
<p class=MsoNormal><span lang=EN-US> Chars: .@~b</span></p>
<p class=MsoNormal><span lang=EN-US> Time: Mon Jan 07 15:31:46
1985</span></p>
<p class=MsoNormal><span lang=EN-US> Float: low 6.36908e-022
high 0</span></p>
<p class=MsoNormal><span lang=EN-US> Double: 2.34182e-315</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>预设宏:</span></p>
<p class=MsoNormal><span lang=EN-US>$ntnsym ntoskrnl</span><span
style='font-family:宋体'>基址</span></p>
<p class=MsoNormal><span lang=EN-US>$ntwsym ntdll</span><span
style='font-family:宋体'>基址</span></p>
<p class=MsoNormal><span lang=EN-US>$ntsym </span><span
style='font-family:宋体'>根据用户态</span><span lang=EN-US>/</span><span
style='font-family:宋体'>内核态自动选择</span><span lang=EN-US>$ntnsym/$ntwsym</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>? </span><span style='font-family:宋体'>计算普通</span><span
lang=EN-US>masm</span><span style='font-family:宋体'>表达式</span></p>
<p class=MsoNormal><span lang=EN-US>?? </span><span style='font-family:宋体'>计算</span><span
lang=EN-US>C++</span><span style='font-family:宋体'>表达式</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> ??
((_PEB*)0x7f2cf000)->ImageBaseAddress</span></p>
<p class=MsoNormal><span lang=EN-US>void * 0x001f0000</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>显示所有寄存器</span><span lang=EN-US>
r</span></p>
<p class=MsoNormal><span style='font-family:宋体'>显示寄存器</span><span lang=EN-US>
r@</span><span style='font-family:宋体'>寄存器名</span></p>
<p class=MsoNormal><span style='font-family:宋体'>修改寄存器</span><span lang=EN-US> r@</span><span
style='font-family:宋体'>寄存器名</span><span lang=EN-US>=</span><span
style='font-family:宋体'>值</span></p>
<p class=MsoNormal><span style='font-family:宋体'>读写</span><span lang=EN-US>MSR</span><span
style='font-family:宋体'>寄存器</span><span lang=EN-US> wrmsr rdmsr</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<h3><a name="_Toc435300801"><span lang=EN-US>as</span></a><span
style='font-family:宋体'>宏定义</span></h3>
<p class=MsoListParagraph style='margin-left:18.0pt;text-indent:-18.0pt'><span
lang=EN-US>①<span style='font:7.0pt "Times New Roman"'> </span></span><span
style='font-family:宋体'>如何使用</span><span lang=EN-US>as</span><span
style='font-family:宋体'>进行宏定义?</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> as
</span><span style='font-family:宋体'>宏名</span><span lang=EN-US> </span><span
style='font-family:宋体'>字符串</span></p>
<p class=MsoNormal><span lang=EN-US> as
/ma </span><span style='font-family:宋体'>宏名</span><span lang=EN-US>
ASCII</span><span style='font-family:宋体'>字符串地址</span></p>
<p class=MsoNormal><span lang=EN-US> as
/mu </span><span style='font-family:宋体'>宏名</span><span lang=EN-US> UNICODE</span><span
style='font-family:宋体'>字符串地址</span></p>
<p class=MsoNormal><span lang=EN-US> as
/msa </span><span style='font-family:宋体'>宏名</span><span lang=EN-US>
ANSI_STRING</span><span style='font-family:宋体'>字符串地址</span></p>
<p class=MsoNormal><span lang=EN-US> as
/msu </span><span style='font-family:宋体'>宏名</span><span lang=EN-US>
UNICODE_STRING</span><span style='font-family:宋体'>字符串地址</span></p>
<p class=MsoNormal><span lang=EN-US> as
/x </span><span style='font-family:宋体'>宏名</span><span
lang=EN-US> </span><span
style='font-family:宋体'>表达式</span></p>
<p class=MsoNormal><span lang=EN-US> as /f </span><span
style='font-family:宋体'>宏名</span><span lang=EN-US> </span><span
style='font-family:宋体'>文件</span><span lang=EN-US> </span><span
style='font-family:宋体'>宏代文件内容</span></p>
<p class=MsoNormal><span lang=EN-US> as /c </span><span
style='font-family:宋体'>宏名</span><span lang=EN-US> </span><span
style='font-family:宋体'>命令</span><span lang=EN-US> </span><span
style='font-family:宋体'>宏代命令结果</span></p>
<p class=MsoListParagraph style='margin-left:18.0pt;text-indent:-18.0pt'><span
lang=EN-US>②<span style='font:7.0pt "Times New Roman"'> </span></span><span
style='font-family:宋体'>如何控制是否开启</span><span lang=EN-US>as</span><span
style='font-family:宋体'>宏定义展开?</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.block
{</span><span style='font-family:宋体'>命令</span><span lang=EN-US>}</span></p>
<p class=MsoNormal><span lang=EN-US>as</span><span style='font-family:宋体'>定义的宏,必须和展开所在表达式用</span><span
lang=EN-US>block</span><span style='font-family:宋体'>分开</span></p>
<p class=MsoListParagraph style='margin-left:18.0pt;text-indent:-18.0pt'><span
lang=EN-US>③<span style='font:7.0pt "Times New Roman"'> </span></span><span
style='font-family:宋体'>如何控制</span><span lang=EN-US>as</span><span
style='font-family:宋体'>宏定义展开结果,结果用</span><span lang=EN-US>result</span><span
style='font-family:宋体'>表示</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> ${</span><span
style='font-family:宋体'>宏名</span><span lang=EN-US>}</span><span
style='font-family:宋体'>等价于</span><span lang=EN-US>c</span><span
style='font-family:宋体'>语言:</span></p>
<p class=MsoNormal><span lang=EN-US>#ifdef</span><span style='font-family:宋体'>宏名</span></p>
<p class=MsoNormal><span lang=EN-US> result=</span><span
style='font-family:宋体'>宏展开</span></p>
<p class=MsoNormal><span lang=EN-US>#else</span></p>
<p class=MsoNormal><span lang=EN-US> result=${/n:</span><span
style='font-family:宋体'>宏名</span><span lang=EN-US>}</span><span
style='font-family:宋体'>——字符串本身</span></p>
<p class=MsoNormal><span lang=EN-US>#endif</span></p>
<p class=MsoNormal><span lang=EN-US> ${/d:</span><span
style='font-family:宋体'>宏名</span><span lang=EN-US>} </span><span
style='font-family:宋体'>等价于</span><span lang=EN-US>c</span><span
style='font-family:宋体'>语言:</span></p>
<p class=MsoNormal><span lang=EN-US>#ifdef</span><span style='font-family:宋体'>宏名</span></p>
<p class=MsoNormal><span lang=EN-US> result=1</span></p>
<p class=MsoNormal><span lang=EN-US>#else</span></p>
<p class=MsoNormal><span lang=EN-US> result=0</span></p>
<p class=MsoNormal><span lang=EN-US>#endif</span></p>
<p class=MsoNormal><span lang=EN-US> ${/f:</span><span
style='font-family:宋体'>宏名</span><span lang=EN-US>} </span><span
style='font-family:宋体'>等价于</span><span lang=EN-US>c</span><span
style='font-family:宋体'>语言:</span></p>
<p class=MsoNormal><span lang=EN-US>#ifdef</span><span style='font-family:宋体'>宏名</span></p>
<p class=MsoNormal><span lang=EN-US> result=</span><span
style='font-family:宋体'>宏展开</span></p>
<p class=MsoNormal><span lang=EN-US>#else</span></p>
<p class=MsoNormal><span lang=EN-US> result=</span><span
style='font-family:宋体'>空字符串</span></p>
<p class=MsoNormal><span lang=EN-US>#endif</span></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt'><span
lang=EN-US>${/n:</span><span style='font-family:宋体'>宏名</span><span lang=EN-US>} </span><span
style='font-family:宋体'>等价于</span><span lang=EN-US>c</span><span
style='font-family:宋体'>语言:</span></p>
<p class=MsoNormal><span lang=EN-US>#ifdef</span><span style='font-family:宋体'>宏名</span></p>
<p class=MsoNormal><span lang=EN-US> result=</span><span
style='font-family:宋体'>宏名</span></p>
<p class=MsoNormal><span lang=EN-US>#else</span></p>
<p class=MsoNormal><span lang=EN-US> result=${/n:</span><span
style='font-family:宋体'>宏名</span><span lang=EN-US>}</span><span
style='font-family:宋体'>——字符串本身</span></p>
<p class=MsoNormal><span lang=EN-US>#endif</span></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt'><span
lang=EN-US>${/n:</span><span style='font-family:宋体'>宏名</span><span lang=EN-US>} </span><span
style='font-family:宋体'>等价于</span><span lang=EN-US>c</span><span
style='font-family:宋体'>语言:</span></p>
<p class=MsoNormal><span lang=EN-US>#ifdef</span><span style='font-family:宋体'>宏名</span></p>
<p class=MsoNormal><span lang=EN-US> result=</span><span
style='font-family:宋体'>宏名</span></p>
<p class=MsoNormal><span lang=EN-US>#else</span></p>
<p class=MsoNormal><span lang=EN-US> result=${/n:</span><span
style='font-family:宋体'>宏名</span><span lang=EN-US>}</span><span
style='font-family:宋体'>——字符串本身</span></p>
<p class=MsoNormal><span lang=EN-US>#endif</span></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt'><span
lang=EN-US>${/v:</span><span style='font-family:宋体'>宏名</span><span lang=EN-US>} </span><span
style='font-family:宋体'>等价于:</span><span lang=EN-US>${/n:</span><span
style='font-family:宋体'>宏名</span><span lang=EN-US>}</span><span
style='font-family:宋体'>——字符串本身</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>提示:有了</span><span
lang=EN-US>as </span><span style='font-family:宋体'>和</span> <span lang=EN-US>${}</span><span
style='font-family:宋体'>的控制,就能控制多种字符串格式转换为</span><span lang=EN-US>ascii</span><span
style='font-family:宋体'>字符串,因此多数情况下命令只支持</span><span lang=EN-US>ascii</span><span
style='font-family:宋体'>字符串即可</span></p>
<h3><a name="_Toc435300802"><span style='font-family:宋体'>变量和操作符</span></a></h3>
<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
style='margin-left:5.4pt;border-collapse:collapse;border:none'>
<tr>
<td width=539 valign=top style='width:269.3pt;border:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>$exentry</span></p>
</td>
<td width=525 valign=top style='width:262.3pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>进程入口点地址</span></p>
</td>
</tr>
<tr>
<td width=539 valign=top style='width:269.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>$proc</span></p>
</td>
<td width=525 valign=top style='width:262.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>PEPROCESS</span><span
style='font-family:宋体'>地址</span></p>
</td>
</tr>
<tr>
<td width=539 valign=top style='width:269.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>$thread</span></p>
</td>
<td width=525 valign=top style='width:262.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>PETHREAD</span><span
style='font-family:宋体'>地址</span></p>
</td>
</tr>
<tr>
<td width=539 valign=top style='width:269.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>$peb</span></p>
</td>
<td width=525 valign=top style='width:262.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>PEB</span><span
style='font-family:宋体'>地址</span></p>
</td>
</tr>
<tr>
<td width=539 valign=top style='width:269.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>$teb</span></p>
</td>
<td width=525 valign=top style='width:262.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>TEB</span><span
style='font-family:宋体'>地址</span></p>
</td>
</tr>
<tr>
<td width=539 valign=top style='width:269.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>$tpid</span></p>
</td>
<td width=525 valign=top style='width:262.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>当前线程所属进程</span><span lang=EN-US>Id</span></p>
</td>
</tr>
<tr>
<td width=539 valign=top style='width:269.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>$tid</span></p>
</td>
<td width=525 valign=top style='width:262.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>当前线程</span><span lang=EN-US>Id</span></p>
</td>
</tr>
<tr>
<td width=539 valign=top style='width:269.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>$bp</span><span
style='font-family:宋体'>断点号</span></p>
</td>
<td width=525 valign=top style='width:262.3pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>该断点地址</span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>数进制:</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>默认接受十六进制数,若输入十进制则需要在前面加</span><span
lang=EN-US>0n </span></p>
<p class=MsoNormal><span lang=EN-US>Masm</span><span style='font-family:宋体'>和</span><span
lang=EN-US>c++</span><span style='font-family:宋体'>表达式对照表:</span></p>
<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
style='margin-left:5.4pt;border-collapse:collapse;border:none'>
<tr>
<td width=156 valign=top style='width:78.0pt;border:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>Masm</span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>C++</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>Masm</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>C++</span></p>
</td>
</tr>
<tr>
<td width=156 valign=top style='width:78.0pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>not</span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>!</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>dwo</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>*(DWORD*)</span></p>
</td>
</tr>
<tr>
<td width=156 valign=top style='width:78.0pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>hi</span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>HIWORD()</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>qwo</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>*(ULONGLONG*)</span></p>
</td>
</tr>
<tr>
<td width=156 valign=top style='width:78.0pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>low</span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>LOWORD()</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>poi</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>*(PVOID*)</span></p>
</td>
</tr>
<tr>
<td width=156 valign=top style='width:78.0pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>by</span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>*(BYTE*)</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>wo</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>*(WORD*)</span></p>
</td>
</tr>
<tr>
<td width=156 valign=top style='width:78.0pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>=</span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>==</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>and</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>&</span></p>
</td>
</tr>
<tr>
<td width=156 valign=top style='width:78.0pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>Xor</span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>^</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>or</span></p>
</td>
<td width=170 valign=top style='width:3.0cm;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>|</span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>Masm</span><span style='font-family:宋体'>库函数:</span></p>
<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
style='margin-left:5.4pt;border-collapse:collapse;border:none'>
<tr>
<td width=227 valign=top style='width:4.0cm;border:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US> </span></p>
</td>
<td width=344 valign=top style='width:171.85pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
</tr>
<tr>
<td width=227 valign=top style='width:4.0cm;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>$iment(Address)</span></p>
</td>
<td width=344 valign=top style='width:171.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>由映像基址获取模块入口点地址</span></p>
</td>
</tr>
<tr>
<td width=227 valign=top style='width:4.0cm;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>$scmp(“str1”,”str2”)</span></p>
</td>
<td width=344 valign=top style='width:171.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>strcmp</span></p>
</td>
</tr>
<tr>
<td width=227 valign=top style='width:4.0cm;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>$sicmp(“str1,”str2”)</span></p>
</td>
<td width=344 valign=top style='width:171.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>stricmp</span></p>
</td>
</tr>
<tr>
<td width=227 valign=top style='width:4.0cm;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>$spat(“str1”,”pattern”)</span></p>
</td>
<td width=344 valign=top style='width:171.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>匹配正则表达式</span></p>
</td>
</tr>
<tr>
<td width=227 valign=top style='width:4.0cm;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>$vvalid(Address,Length)</span></p>
</td>
<td width=344 valign=top style='width:171.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>探测一块内存有效性</span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>支持的</span><span lang=EN-US>c++</span><span
style='font-family:宋体'>宏:</span></p>
<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
style='margin-left:5.4pt;border-collapse:collapse;border:none'>
<tr>
<td width=411 valign=top style='width:205.55pt;border:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>#CONTAINING_RECORD(Address, Type, Field)</span></p>
</td>
<td width=354 valign=top style='width:177.2pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span style='font-family:宋体'>内核</span><span lang=EN-US>LIST_ENTRY</span><span
style='font-family:宋体'>结构常用宏</span></p>
</td>
</tr>
<tr>
<td width=411 valign=top style='width:205.55pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>#FIELD_OFFSET(Type, Field)</span></p>
</td>
<td width=354 valign=top style='width:177.2pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>&(((type*)0)->member)</span><span
style='font-family:宋体'>取成员偏移</span></p>
</td>
</tr>
<tr>
<td width=411 valign=top style='width:205.55pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>#RTL_CONTAINS_FIELD (Struct, Size, Field)</span></p>
</td>
<td width=354 valign=top style='width:177.2pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span style='font-family:宋体'>探测成员是否存在</span></p>
</td>
</tr>
<tr>
<td width=411 valign=top style='width:205.55pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span lang=EN-US>#RTL_FIELD_SIZE(Type, Field)</span></p>
</td>
<td width=354 valign=top style='width:177.2pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal><span style='font-family:宋体'>由成员名返回成员大小</span></p>
</td>
</tr>
</table>
<h3><a name="_Toc435300803"><span style='font-family:宋体'>正则表达式</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>若命令可以用正则表达式,则下列规则成立:</span></p>
<p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US>* </span><span
style='font-family:宋体'>代</span><span lang=EN-US>0~</span><span
style='font-family:宋体'>∞个字符</span></p>
<p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US>? </span><span
style='font-family:宋体'>代</span><span lang=EN-US>1</span><span style='font-family:
宋体'>个字符</span></p>
<p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US>[] </span><span
style='font-family:宋体'>代</span><span lang=EN-US>1</span><span style='font-family:
宋体'>个字符,该字符可以是“</span><span lang=EN-US>[]</span><span style='font-family:宋体'>”之间的任何一个,“</span><span
lang=EN-US>-</span><span style='font-family:宋体'>”符可以指定范围,例如“</span><span
lang=EN-US>a-z</span><span style='font-family:宋体'>”</span></p>
<p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US># </span><span
style='font-family:宋体'>代</span><span lang=EN-US>0~∞</span><span
style='font-family:宋体'>个字符的前缀</span></p>
<p class=MsoNormal style='text-indent:10.5pt'><span lang=EN-US>+ </span><span
style='font-family:宋体'>代</span><span lang=EN-US>1~</span><span
style='font-family:宋体'>∞个字符</span></p>
<h3><a name="_Toc435300804"><span style='font-family:宋体'>命令流程控制</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>判断逻辑:</span></p>
<p class=MsoNormal><span lang=EN-US>.if (</span><span style='font-family:宋体'>条件</span><span
lang=EN-US>) {</span><span style='font-family:宋体'>命令</span><span lang=EN-US>}</span></p>
<p class=MsoNormal><span lang=EN-US>.if (</span><span style='font-family:宋体'>条件</span><span
lang=EN-US>) {</span><span style='font-family:宋体'>命令</span><span lang=EN-US>} .else{</span><span
style='font-family:宋体'>命令</span><span lang=EN-US>}</span></p>
<p class=MsoNormal><span lang=EN-US>.if (</span><span style='font-family:宋体'>条件</span><span
lang=EN-US>) {</span><span style='font-family:宋体'>命令</span><span lang=EN-US>}
.elsif(</span><span style='font-family:宋体'>条件</span><span lang=EN-US>){</span><span
style='font-family:宋体'>命令</span><span lang=EN-US>}</span></p>
<p class=MsoNormal><span lang=EN-US>.if (</span><span style='font-family:宋体'>条件</span><span
lang=EN-US>) {</span><span style='font-family:宋体'>命令</span><span lang=EN-US>}
.elsif(</span><span style='font-family:宋体'>条件</span><span lang=EN-US>){</span><span
style='font-family:宋体'>命令</span><span lang=EN-US>} .else{</span><span
style='font-family:宋体'>命令</span><span lang=EN-US>}</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>循环逻辑:</span></p>
<p class=MsoNormal><span lang=EN-US>.for(</span><span style='font-family:宋体'>命令</span><span
lang=EN-US>;</span><span style='font-family:宋体'>条件</span><span lang=EN-US>;</span><span
style='font-family:宋体'>命令</span><span lang=EN-US>){</span><span
style='font-family:宋体'>命令</span><span lang=EN-US>}</span></p>
<p class=MsoNormal><span lang=EN-US>.foreach (</span><span style='font-family:
宋体'>变量</span><span lang=EN-US> {</span><span style='font-family:宋体'>命令</span><span
lang=EN-US>1}){</span><span style='font-family:宋体'>命令</span><span lang=EN-US>2} </span><span
style='font-family:宋体'>对命令</span><span lang=EN-US>1</span><span
style='font-family:宋体'>执行的每一条结果</span><span lang=EN-US>(</span><span
style='font-family:宋体'>空格或换行分开</span><span lang=EN-US>)</span><span
style='font-family:宋体'>,执行命令</span><span lang=EN-US>2</span></p>
<p class=MsoNormal><span lang=EN-US>.foreach /s (</span><span style='font-family:
宋体'>变量</span> <span lang=EN-US>“</span><span style='font-family:宋体'>字符串</span><span
lang=EN-US>”){</span><span style='font-family:宋体'>命令</span><span lang=EN-US>} </span><span
style='font-family:宋体'>对字符串每条子串</span><span lang=EN-US> (</span><span
style='font-family:宋体'>空格或换行分开</span><span lang=EN-US>)</span><span
style='font-family:宋体'>,执行命令</span><span lang=EN-US>2</span></p>
<p class=MsoNormal><span lang=EN-US>.foreach /f (</span><span style='font-family:
宋体'>变量</span> <span lang=EN-US>“</span><span style='font-family:宋体'>文件路径</span><span
lang=EN-US>”){</span><span style='font-family:宋体'>命令</span><span lang=EN-US>} </span><span
style='font-family:宋体'>对文件中每条字符串</span><span lang=EN-US> (</span><span
style='font-family:宋体'>空格或换行分开</span><span lang=EN-US>)</span><span
style='font-family:宋体'>,执行命令</span><span lang=EN-US>2</span></p>
<p class=MsoNormal><span lang=EN-US>.while(</span><span style='font-family:
宋体'>条件</span><span lang=EN-US>) {</span><span style='font-family:宋体'>命令</span><span
lang=EN-US>}</span></p>
<p class=MsoNormal><span lang=EN-US>.do{</span><span style='font-family:宋体'>命令</span><span
lang=EN-US>}(</span><span style='font-family:宋体'>条件</span><span lang=EN-US>)</span></p>
<p class=MsoNormal><span lang=EN-US>.break </span><span
style='font-family:宋体'>用于</span><span lang=EN-US>.for .while .do</span><span
style='font-family:宋体'>中打破循环</span></p>
<p class=MsoNormal><span lang=EN-US>.continue </span><span
style='font-family:宋体'>用于</span><span lang=EN-US>.for .while .do</span><span
style='font-family:宋体'>中跳过本次循环</span></p>
<p class=MsoNormal><span lang=EN-US>j </span><span style='font-family:宋体'>表达式</span>
<span style='font-family:宋体'>命令</span><span lang=EN-US>1; </span><span
style='font-family:宋体'>命令</span><span lang=EN-US>2 </span><span
style='font-family:宋体'>等价于:</span><span lang=EN-US>.if (</span><span
style='font-family:宋体'>表达式</span><span lang=EN-US>!=0) {</span><span
style='font-family:宋体'>命令</span><span lang=EN-US>1} .else{</span><span
style='font-family:宋体'>命令</span><span lang=EN-US>2}</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令</span><span lang=EN-US>; z(</span><span
style='font-family:宋体'>表达式</span><span lang=EN-US>) </span><span
style='font-family:宋体'>等价于:</span><span lang=EN-US>.do{</span><span
style='font-family:宋体'>命令</span><span lang=EN-US>}(</span><span
style='font-family:宋体'>表达式</span><span lang=EN-US>!=0)</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>异常处理:</span></p>
<p class=MsoNormal><span lang=EN-US>.catch{</span><span style='font-family:
宋体'>命令</span><span lang=EN-US>} </span><span
style='font-family:宋体'>相当于</span><span lang=EN-US>c</span><span
style='font-family:宋体'>语言的:</span></p>
<p class=MsoNormal><span lang=EN-US>try{</span><span style='font-family:宋体'>命令</span><span
lang=EN-US>}</span></p>
<p class=MsoNormal><span lang=EN-US>catch(...){}</span></p>
<p class=MsoNormal><span lang=EN-US>{}</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>.leave </span><span style='font-family:
宋体'>从</span><span lang=EN-US>.catch</span><span style='font-family:宋体'>块中跳出</span></p>
</div>
<span lang=EN-US style='font-size:10.5pt;font-family:"Calibri",sans-serif'><br
clear=all style='page-break-before:always'>
</span>
<div class=WordSection6 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300805"><span style='font-family:宋体'>汇编</span><span
lang=EN-US>&</span></a><span style='font-family:宋体'>反汇编</span></h2>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> u
</span><span style='font-family:宋体'>地址</span> <span lang=EN-US>[</span><span
style='font-family:宋体'>长度</span><span lang=EN-US>] </span><span
style='font-family:宋体'>反汇编之后代码</span></p>
<p class=MsoNormal><span lang=EN-US> Ub</span><span
style='font-family:宋体'>地址</span> <span lang=EN-US>[</span><span
style='font-family:宋体'>长度</span><span lang=EN-US>] </span><span
style='font-family:宋体'>反汇编之前代码</span></p>
<p class=MsoNormal><span lang=EN-US> Up</span><span
style='font-family:宋体'>地址</span> <span lang=EN-US>[</span><span
style='font-family:宋体'>长度</span><span lang=EN-US>] </span><span
style='font-family:宋体'>从物理地址反汇编</span></p>
<p class=MsoNormal><span lang=EN-US> Uf
</span><span style='font-family:宋体'>地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>反汇编当前函数</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> a
</span><span style='font-family:宋体'>地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>在指定地址处写入汇编</span><span lang=EN-US> 16</span><span
style='font-family:宋体'>位</span></p>
<h3><a name="_Toc435300806"><span style='font-family:宋体'>怎样打印某函数调用关系</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>uf
/c /D </span><span style='font-family:宋体'>地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>打印当前函数对其他函数的调用</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> uf /c /D 0x804fa5e6</span></p>
<p class=MsoNormal><span lang=EN-US>nt!KeDelayExecutionThread (804fa5e6)</span></p>
<p class=MsoNormal><span lang=EN-US> nt!KeDelayExecutionThread+0x8f
(804fa675):</span></p>
<p class=MsoNormal><span lang=EN-US> call to
nt!KiUnlockDispatcherDatabase (80542748)</span></p>
<p class=MsoNormal><span lang=EN-US> nt!KeDelayExecutionThread+0xe9
(804fa6cf):</span></p>
<p class=MsoNormal><span lang=EN-US> call to
nt!KiInsertTreeTimer (80500f62)</span></p>
<p class=MsoNormal><span lang=EN-US> nt!KeDelayExecutionThread+0x116
(804fa6fc):</span></p>
<p class=MsoNormal><span lang=EN-US> call to
nt!KiSetPriorityThread (80501bba)</span></p>
<p class=MsoNormal><span lang=EN-US> nt!KeDelayExecutionThread+0x12f
(804fa715):</span></p>
<p class=MsoNormal><span lang=EN-US> call to
nt!KiFindReadyThread (80501894)</span></p>
<p class=MsoNormal><span lang=EN-US> nt!KeDelayExecutionThread+0x19f
(804fa785):</span></p>
<p class=MsoNormal><span lang=EN-US> call to
nt!KiActivateWaiterQueue (804fc02a)</span></p>
<p class=MsoNormal><span lang=EN-US> nt!KeDelayExecutionThread+0x1c4
(804fa7aa):</span></p>
<p class=MsoNormal><span lang=EN-US> call to nt!KiSwapThread
(80501ca0)</span></p>
<p class=MsoNormal><span lang=EN-US> nt!KeDelayExecutionThread+0x1de
(804fa7c4):</span></p>
<p class=MsoNormal><span lang=EN-US> call to
nt!KiComputeWaitInterval (804fa504)</span></p>
<p class=MsoNormal><span lang=EN-US> nt!KeDelayExecutionThread+0x1e6
(804fa7cc):</span></p>
<p class=MsoNormal><span lang=EN-US> call to
hal!KeRaiseIrqlToDpcLevel (806d3298)</span></p>
<p class=MsoNormal><span lang=EN-US> nt!KeDelayExecutionThread+0x26a
(804fa850):</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>call to nt!KiUnlockDispatcherDatabase
(80542748)</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US># </span><span
style='font-family:宋体'>函数名</span><span lang=EN-US> </span><span
style='font-family:宋体'>起始地址</span><span lang=EN-US> l</span><span
style='font-family:宋体'>长度</span><span lang=EN-US> </span><span
style='font-family:宋体'>打印在某段地址范围内代码对该函数的引用</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> # IopCreateFile 840554ae l10000</span></p>
<p class=MsoNormal><span lang=EN-US>nt!NtCreateFile+0x2f:</span></p>
<p class=MsoNormal><span lang=EN-US>840554dd
e87340ffff call
nt!IopCreateFile (84049555)</span></p>
<p class=MsoNormal><span lang=EN-US>nt!IoCreateFileEx+0x99:</span></p>
<p class=MsoNormal><span lang=EN-US>84081442 e80e81fcff
call nt!IopCreateFile (84049555)</span></p>
<p class=MsoNormal><span lang=EN-US>nt!NtOpenFile+0x25:</span></p>
<p class=MsoNormal><span lang=EN-US>84084c97
e8b948fcff call
nt!IopCreateFile (84049555)</span></p>
<h3><a name="_Toc435300807"><span style='font-family:宋体'>怎样显示函数指令数?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>uf /i
/m </span><span style='font-family:宋体'>地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> uf /i ntcreatefile</span></p>
<p class=MsoNormal><span lang=EN-US>21 instructions scanned</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>nt!NtCreateFile:</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f2fc
8bff mov
edi,edi</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f2fe
55
push ebp</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f2ff
8bec
mov ebp,esp</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f301
33c0
xor eax,eax</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f303
50
push eax</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f304
50
push eax</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f305
50
push eax</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f306
ff7530
push dword ptr </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f309
ff752c
push dword ptr </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f30c
ff7528
push dword ptr </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f30f
ff7524
push dword ptr </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f312
ff7520
push dword ptr </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f315
ff751c
push dword ptr </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f318
ff7518
push dword ptr </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f31b
ff7514
push dword ptr </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f31e
ff7510
push dword ptr </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f321
ff750c
push dword ptr </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f324
ff7508
push dword ptr </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f327
e860d8ffff call nt!IoCreateFile
(8056cb8c)</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f32c
5d
pop ebp</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>8056f32d
c22c00
ret 2Ch</span></p>
<h3><a name="_Toc435300808"><span style='font-family:宋体'>如何在</span><span
lang=EN-US>X64</span></a><span style='font-family:宋体'>系统中实现</span><span
lang=EN-US>64</span><span style='font-family:宋体'>位执行模式和虚拟</span><span
lang=EN-US>86</span><span style='font-family:宋体'>执行模式</span><span lang=EN-US>(wow)</span><span
style='font-family:宋体'>切换</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!sw</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> .load wow64exts</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> !sw</span></p>
<p class=MsoNormal><span lang=EN-US>Switched to Guest (WoW) mode</span></p>
<p class=MsoNormal><span lang=EN-US>0:000:x86> ? .</span></p>
<p class=MsoNormal><span lang=EN-US>Evaluate expression: 1995360060 = 76eec73c</span></p>
<p class=MsoNormal><span lang=EN-US>0:000:x86> !sw</span></p>
<p class=MsoNormal><span lang=EN-US>Switched to Host mode</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> ? .</span></p>
<p class=MsoNormal><span lang=EN-US>Evaluate expression: 1994597202 =
00000000`76e32352</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> .load wow64exts</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> u .</span></p>
<p class=MsoNormal><span lang=EN-US>wow64cpu!CpupSyscallStub+0x2:</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76e32352
c3
ret</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76e32353
cc
int 3</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76e32354
b80d0000c0 mov
eax,0C000000Dh</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76e32359
e93ef0ffff jmp
wow64cpu!CpuSetContext+0x15c (00000000`76e3139c)</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76e3235e 488b876c010000
mov rax,qword ptr </span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76e32365 48898370010000
mov qword ptr ,rax</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76e3236c 488b8774010000
mov rax,qword ptr </span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76e32373 48898378010000
mov qword ptr ,rax</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> !sw</span></p>
<p class=MsoNormal><span lang=EN-US>Switched to Guest (WoW) mode</span></p>
<p class=MsoNormal><span lang=EN-US>0:000:x86> u 00000000`76e32352</span></p>
<p class=MsoNormal><span lang=EN-US>wow64cpu!CpupSyscallStub+0x2:</span></p>
<p class=MsoNormal><span lang=EN-US>76e32352
c3
ret</span></p>
<p class=MsoNormal><span lang=EN-US>76e32353
cc
int 3</span></p>
<p class=MsoNormal><span lang=EN-US>76e32354
b80d0000c0 mov
eax,0C000000Dh</span></p>
<p class=MsoNormal><span lang=EN-US>76e32359 e93ef0ffff jmp
wow64cpu!CpuSetContext+0x15c (76e3139c)</span></p>
<p class=MsoNormal><span lang=EN-US>76e3235e
48
dec eax</span></p>
<p class=MsoNormal><span lang=EN-US>76e3235f 8b876c010000
mov eax,dword ptr </span></p>
<p class=MsoNormal><span lang=EN-US>76e32365
48
dec eax</span></p>
<p class=MsoNormal><span lang=EN-US>76e32366 898370010000
mov dword ptr ,eax</span></p>
<p class=MsoNormal><span style='font-family:宋体'>提示:也可手动修改</span><span
lang=EN-US>cs</span><span style='font-family:宋体'>以达到相同效果</span></p>
<h3><a name="_Toc435300809"><span style='font-family:宋体'>如何强制为</span><span
lang=EN-US>16</span></a><span style='font-family:宋体'>位反汇编?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>ur </span><span
style='font-family:宋体'>地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> u .</span></p>
<p class=MsoNormal><span lang=EN-US>nt!ExpInterlockedPopEntrySListEnd+0x8:</span></p>
<p class=MsoNormal><span lang=EN-US>80542e37
c3
ret</span></p>
<p class=MsoNormal><span lang=EN-US>nt!ExInterlockedPushEntrySList:</span></p>
<p class=MsoNormal><span lang=EN-US>80542e38
8f0424
pop dword ptr </span></p>
<p class=MsoNormal><span lang=EN-US>80542e3b
90
nop</span></p>
<p class=MsoNormal><span lang=EN-US>nt!InterlockedPushEntrySList:</span></p>
<p class=MsoNormal><span lang=EN-US>80542e3c
53
push ebx</span></p>
<p class=MsoNormal><span lang=EN-US>80542e3d
55
push ebp</span></p>
<p class=MsoNormal><span lang=EN-US>80542e3e
8be9
mov ebp,ecx</span></p>
<p class=MsoNormal><span lang=EN-US>80542e40
8bda
mov ebx,edx</span></p>
<p class=MsoNormal><span lang=EN-US>80542e42
8b5504
mov edx,dword ptr </span></p>
<p class=MsoNormal><span lang=EN-US>kd> ur .</span></p>
<p class=MsoNormal><span lang=EN-US>nt!ExpInterlockedPopEntrySListEnd+0x8:</span></p>
<p class=MsoNormal><span lang=EN-US>80542e37
c3
ret</span></p>
<p class=MsoNormal><span lang=EN-US>nt!ExInterlockedPushEntrySList:</span></p>
<p class=MsoNormal><span lang=EN-US>80542e38
8f04
pop word ptr </span></p>
<p class=MsoNormal><span lang=EN-US>80542e3a
2490
and al,90h</span></p>
<p class=MsoNormal><span lang=EN-US>nt!InterlockedPushEntrySList:</span></p>
<p class=MsoNormal><span lang=EN-US>80542e3c
53
push bx</span></p>
<p class=MsoNormal><span lang=EN-US>80542e3d
55
push bp</span></p>
<p class=MsoNormal><span lang=EN-US>80542e3e
8be9
mov bp,cx</span></p>
<p class=MsoNormal><span lang=EN-US>80542e40
8bda
mov bx,dx</span></p>
<p class=MsoNormal><span lang=EN-US>80542e42
8b5504
mov dx,word ptr </span></p>
<h3><a name="_Toc435300810"><span style='font-family:宋体'>如何爆搜某种模式的反汇编指令?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>#
</span><span style='font-family:宋体'>查找模式</span><span lang=EN-US> </span><span
style='font-family:宋体'>起始地址</span><span lang=EN-US> [l</span><span
style='font-family:宋体'>长度</span><span lang=EN-US>]</span></p>
<p class=MsoNormal><span style='font-family:宋体'>参数:查找模式为正则表达式,可以匹配该处反汇编代码,或其对应的</span><span
lang=EN-US>16</span><span style='font-family:宋体'>进制机器码</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> u .</span></p>
<p class=MsoNormal><span lang=EN-US>ntdll!LdrpDoDebuggerBreak+0x2b:</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bad
6c
ins byte ptr es:,dx</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bae
006900
add byte ptr ,ch</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bb1
6300
arpl word ptr ,ax</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bb3
68006b0069 push 69006B00h</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bb8
006e00 add
byte ptr ,ch</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bbb
670000
add byte ptr ,al</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bbe
0000
add byte ptr ,al</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bc0
00f9
add cl,bh</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>匹配反汇编:</span><span lang=EN-US>push
69006B00h</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> # push*69 .</span></p>
<p class=MsoNormal><span lang=EN-US>ntdll!LdrpDoDebuggerBreak+0x31:</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bb3 68006b0069
push 69006B00h</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>匹配机器码:</span><span lang=EN-US>68006b0069</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> # 68*6b .</span></p>
<p class=MsoNormal><span lang=EN-US>ntdll!LdrpDoDebuggerBreak+0x31:</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bb3
68006b0069 push 69006B00h</span></p>
<h3><a name="_Toc435300811"><span style='font-family:宋体'>如何在由任意地址正确反汇编该地址附近的指令?</span></a></h3>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>问题描述:假设知道某地址</span><span
lang=EN-US>840554b2</span><span style='font-family:宋体'>,如下左边是该地址处反汇编,右边是正确的指令地址反汇编,显然该处不是一条指令的开始地址,此时如何仅由该地址得到正确的函数反汇编?传统的方式是前向反汇编,试探法,这里介绍另一种方法,在知道函数起始地址的前提下:</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.dml_flow
</span><span style='font-family:宋体'>函数起始地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>目标地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span lang=EN-US>kd> u 840554b2</span></p>
<p class=MsoNormal><span lang=EN-US>nt!NtCreateFile+0x4:</span></p>
<p class=MsoNormal><span lang=EN-US>840554b2
ec
in al,dx 840554ae
8bff mov
edi,edi</span></p>
<p class=MsoNormal><span lang=EN-US>840554b3
51
push ecx 840554b0
55
push ebp</span></p>
<p class=MsoNormal><span lang=EN-US>840554b4
33c0
xor eax,eax 840554b1
8bec
mov ebp,esp</span></p>
<p class=MsoNormal><span lang=EN-US>840554b6
50
push eax 840554b3
51
push ecx</span></p>
<p class=MsoNormal><span lang=EN-US>840554b7
6a20
push 20h 840554b4
33c0
xor eax,eax</span></p>
<p class=MsoNormal><span lang=EN-US>840554b9 50 push
eax 840554b6
50
push eax</span></p>
<p class=MsoNormal><span lang=EN-US>840554ba
50
push eax 840554b7
6a20
push 20h</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> .dml_flow nt!NtCreateFile 840554b2</span></p>
<p class=MsoNormal><span lang=EN-US>
<No previous node>
</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>
</span></p>
<p class=MsoNormal><span lang=EN-US>
nt!NtCreateFile (840554ae):</span></p>
<p class=MsoNormal><span lang=EN-US>
840554ae mov
edi,edi
</span></p>
<p class=MsoNormal><span lang=EN-US>
840554b0 push
ebp
</span></p>
<p class=MsoNormal><span lang=EN-US>
840554b1 mov
ebp,esp
</span></p>
<p class=MsoNormal><span lang=EN-US>
840554b3 push
ecx
</span></p>
<p class=MsoNormal><span lang=EN-US>
840554b4 xor
eax,eax
</span></p>
<p class=MsoNormal><span lang=EN-US>
840554b6 push
eax
</span></p>
<p class=MsoNormal><span lang=EN-US>
840554b7 push
20h
</span></p>
<p class=MsoNormal><span lang=EN-US>
840554b9 push
eax
</span></p>
<p class=MsoNormal><span lang=EN-US>
840554ba push
eax
</span></p>
<p class=MsoNormal><span lang=EN-US>
840554bb push
eax </span></p>
<h3><a name="_Toc435300812"><span style='font-family:宋体'>怎样查找某地址附近的符号</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>ln </span><span
style='font-family:宋体'>地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> ln nt!ntcreatefile-1</span></p>
<p class=MsoNormal><span lang=EN-US>Browse module</span></p>
<p class=MsoNormal><span lang=EN-US>Set bu breakpoint</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>(84055482)
nt!SeValidateSecurityQos+0x2b | (840554ae)
nt!NtCreateFile</span></p>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection7 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300813"><span style='font-family:宋体'>指令执行</span><span
lang=EN-US>&</span></a><span style='font-family:宋体'>跟踪</span></h2>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>指令跟踪</span><span lang=EN-US>(trace)</span><span
style='font-family:宋体'>和指令执行</span><span lang=EN-US>(execute)</span><span
style='font-family:宋体'>的区别在于对待函数调用指令</span><span lang=EN-US>(call)</span><span
style='font-family:宋体'>,跟踪会导致步入,而执行会导致步过</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>t [=</span><span
style='font-family:宋体'>开始地址</span><span lang=EN-US>] [</span><span
style='font-family:宋体'>跟踪指令数</span><span lang=EN-US>] </span><span
style='font-family:宋体'>执行指令</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>t [=</span><span
style='font-family:宋体'>开始地址</span><span lang=EN-US>] [</span><span
style='font-family:宋体'>跟踪指令数</span><span lang=EN-US>] </span><span
style='font-family:宋体'>跟踪指令</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>g [=</span><span
style='font-family:宋体'>开始地址</span><span lang=EN-US>] [</span><span
style='font-family:宋体'>目标地址</span><span lang=EN-US>] </span><span
style='font-family:宋体'>执行到某地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>gc </span><span
style='font-family:宋体'>从条件断点处开始执行</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>gu </span><span
style='font-family:宋体'>执行到上一级函数</span></p>
<h3><a name="_Toc435300814"><span style='font-family:宋体'>怎样执行</span><span
lang=EN-US>/</span></a><span style='font-family:宋体'>跟踪到本函数或上级函数返回?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>tt n
</span><span style='font-family:宋体'>跟踪到返回</span><span lang=EN-US> n</span><span
style='font-family:宋体'>级</span><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>pt n
</span><span style='font-family:宋体'>执行到返回</span><span lang=EN-US>n</span><span
style='font-family:宋体'>级</span></p>
<h3><a name="_Toc435300815"><span style='font-family:宋体'>怎样执行</span><span
lang=EN-US>/</span></a><span style='font-family:宋体'>跟踪到指定地址?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>ta [=</span><span
style='font-family:宋体'>开始地址</span><span lang=EN-US>] </span><span
style='font-family:宋体'>结束地址</span><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>pa [=</span><span
style='font-family:宋体'>开始地址</span><span lang=EN-US>] </span><span
style='font-family:宋体'>结束地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> ta =kifastcallentry kifastcallentry+60</span></p>
<p class=MsoNormal><span lang=EN-US>nt!KiFastCallEntry+0x5:</span></p>
<p class=MsoNormal><span lang=EN-US>83e95325
6a30
push 30h</span></p>
<p class=MsoNormal><span lang=EN-US>nt!KiFastCallEntry+0x7:</span></p>
<p class=MsoNormal><span lang=EN-US>83e95327
0fa1
pop fs</span></p>
<p class=MsoNormal><span lang=EN-US>nt!KiFastCallEntry+0x9:</span></p>
<p class=MsoNormal><span lang=EN-US>83e95329
8ed9
mov ds,cx</span></p>
<p class=MsoNormal><span lang=EN-US>nt!KiFastCallEntry+0xb:</span></p>
<p class=MsoNormal><span lang=EN-US>83e9532b
8ec1 mov es,cx</span></p>
<p class=MsoNormal><span lang=EN-US>nt!KiFastCallEntry+0xd:</span></p>
<p class=MsoNormal><span lang=EN-US>83e9532d 648b0d40000000
mov ecx,dword ptr fs:</span></p>
<p class=MsoNormal><span lang=EN-US>nt!KiFastCallEntry+0x14:</span></p>
<p class=MsoNormal><span lang=EN-US>83e95334
8b6104
mov esp,dword ptr </span></p>
<p class=MsoNormal><span lang=EN-US>nt!KiFastCallEntry+0x17:</span></p>
<p class=MsoNormal><span lang=EN-US>83e95337
6a23
push 23h</span></p>
<p class=MsoNormal><span lang=EN-US>nt!KiFastCallEntry+0x19:</span></p>
<h3><a name="_Toc435300816"><span style='font-family:宋体'>怎样执行</span><span
lang=EN-US>/</span></a><span style='font-family:宋体'>跟踪到下一个分支指令?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>分支指令:指令可根据环境不同执行到不同的</span><span
lang=EN-US>eip</span><span style='font-family:宋体'>,比如条件跳转指令</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>th n
</span><span style='font-family:宋体'>跟踪到第</span><span lang=EN-US>n</span><span
style='font-family:宋体'>分支指令</span><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>ph n
</span><span style='font-family:宋体'>执行到第</span><span lang=EN-US>n</span><span
style='font-family:宋体'>分支指令</span></p>
<h3><a name="_Toc435300817"><span style='font-family:宋体'>如何跟踪某函数执行过的所有子函数?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>wt</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> wt</span></p>
<p class=MsoNormal><span lang=EN-US>Tracing testdriver2!func to return address
f89cb070</span></p>
<p class=MsoNormal><span lang=EN-US>
8 0 [ 0] testdriver2!func</span></p>
<p class=MsoNormal><span lang=EN-US>
7 0 [ 1] nt!ExAllocatePool</span></p>
<p class=MsoNormal><span lang=EN-US> 89 0
[ 2] nt!ExAllocatePoolWithTag</span></p>
<p class=MsoNormal><span lang=EN-US>
5 0 [ 3]
hal!KeRaiseIrqlToDpcLevel</span></p>
<p class=MsoNormal><span lang=EN-US> 197 5
[ 2] nt!ExAllocatePoolWithTag</span></p>
<p class=MsoNormal><span lang=EN-US> 9 202
[ 1] nt!ExAllocatePool</span></p>
<p class=MsoNormal><span lang=EN-US> 13 211 [ 0]
testdriver2!func</span></p>
<p class=MsoNormal><span lang=EN-US> 85 0
[ 1] nt!ExFreePoolWithTag</span></p>
<p class=MsoNormal><span lang=EN-US> 19 296 [ 0]
testdriver2!func</span></p>
<p class=MsoNormal><span lang=EN-US>315 instructions were executed in 7 events
(0 from other threads)</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>Function
Name
Invocations MinInst MaxInst AvgInst</span></p>
<p class=MsoNormal><span lang=EN-US>hal!KeRaiseIrqlToDpcLevel
1
5 5 5</span></p>
<p class=MsoNormal><span lang=EN-US>nt!ExAllocatePool
1 9
9 9</span></p>
<p class=MsoNormal><span lang=EN-US>nt!ExAllocatePoolWithTag
1 197 197
197</span></p>
<p class=MsoNormal><span lang=EN-US>nt!ExFreePoolWithTag
1
85 85 85</span></p>
<p class=MsoNormal><span lang=EN-US>testdriver2!func
1 19
19 19</span></p>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection8 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300818"><span style='font-family:宋体'>回溯栈</span></a></h2>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>回溯栈用来记录每一级函数返回地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>k </span><span
style='font-family:宋体'>显示当前线程回溯栈</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>kb </span><span
style='font-family:宋体'>显示当前线程回溯栈并打印前</span><span lang=EN-US>3</span><span
style='font-family:宋体'>个</span><span lang=EN-US>(</span><span style='font-family:
宋体'>可能的</span><span lang=EN-US>)</span><span style='font-family:宋体'>参数</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!stacks </span><span
style='font-family:宋体'>打印所有进程的所有线程回溯栈</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!uniqstack </span><span
style='font-family:宋体'>打印当前进程所有线程回溯栈</span></p>
<h3><a name="_Toc435300819"><span style='font-family:宋体'>如何查看</span><span
lang=EN-US>wow64</span></a><span style='font-family:宋体'>进程回溯栈?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!k</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> .load wow64exts</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> !k</span></p>
<p class=MsoNormal><span lang=EN-US>Walking Native Stack... </span></p>
<p class=MsoNormal><span lang=EN-US> #
Child-SP
RetAddr Call Site</span></p>
<p class=MsoNormal><span lang=EN-US>00 00000000`00e7e928 00000000`76e32318
wow64cpu!CpupSyscallStub+0x2</span></p>
<p class=MsoNormal><span lang=EN-US>01 00000000`00e7e930 00000000`76df219a wow64cpu!Thunk0Arg+0x5</span></p>
<p class=MsoNormal><span lang=EN-US>02 00000000`00e7e9e0 00000000`76df20d2
wow64!RunCpuSimulation+0xa</span></p>
<p class=MsoNormal><span lang=EN-US>03 00000000`00e7ea30 00007fff`10093a15
wow64!Wow64LdrpInitialize+0x172</span></p>
<p class=MsoNormal><span lang=EN-US>04 00000000`00e7ef70 00007fff`10072f1e
ntdll!LdrpInitializeProcess+0x1591</span></p>
<p class=MsoNormal><span lang=EN-US>05 00000000`00e7f290 00007fff`0ffe8ece
ntdll!_LdrpInitialize+0x89ffe</span></p>
<p class=MsoNormal><span lang=EN-US>06 00000000`00e7f300 00000000`00000000
ntdll!LdrInitializeThunk+0xe</span></p>
<p class=MsoNormal><span lang=EN-US>Walking Guest (WoW) Stack... </span></p>
<p class=MsoNormal><span lang=EN-US> # ChildEBP RetAddr </span></p>
<p class=MsoNormal><span lang=EN-US>00 00f7f868 76f1ce1b
ntdll_76eb0000!NtTerminateProcess+0xc</span></p>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection9 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300820"><span style='font-family:宋体'>断点设置</span></a></h2>
<p class=MsoNormal><span lang=EN-US>bp </span><span
style='font-family:宋体'>设置软件断点</span></p>
<p class=MsoNormal><span lang=EN-US>bm </span><span
style='font-family:宋体'>设置已加载符号断点</span><span lang=EN-US> (/a </span><span
style='font-family:宋体'>强制下断</span><span lang=EN-US>)</span></p>
<p class=MsoNormal><span lang=EN-US>bu </span><span
style='font-family:宋体'>设置未加载符号断点</span></p>
<p class=MsoNormal><span lang=EN-US>ba </span><span
style='font-family:宋体'>设置硬件断点</span></p>
<p class=MsoNormal><span lang=EN-US>bl </span><span
style='font-family:宋体'>列举断点</span></p>
<p class=MsoNormal><span lang=EN-US>bd </span><span
style='font-family:宋体'>禁用断点</span></p>
<p class=MsoNormal><span lang=EN-US>be </span><span
style='font-family:宋体'>启用断点</span></p>
<p class=MsoNormal><span lang=EN-US>bc </span><span
style='font-family:宋体'>清除断点</span><span lang=EN-US> </span></p>
<h3><a name="_Toc435300821"><span style='font-family:宋体'>如何在物理地址下断?</span></a></h3>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>如果在加载</span><span
lang=EN-US>pe</span><span style='font-family:宋体'>时采用了文件内存映射,那么一块物理内存会映射到不同虚拟内存,因此如果对方映射了多个相同的</span><span
lang=EN-US>PE</span><span style='font-family:宋体'>往往需要在不同虚拟地址下断,这里提出一种物理内存手动下断方式</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !pte 840554ae</span></p>
<p class=MsoNormal><span lang=EN-US>
VA 840554ae</span></p>
<p class=MsoNormal><span lang=EN-US>PDE at
C0602100 PTE
at C04202A8</span></p>
<p class=MsoNormal><span lang=EN-US>contains 00000000001DA063 contains
0000000004055121</span></p>
<p class=MsoNormal><span lang=EN-US>pfn 1da
---DA--KWEV pfn 4055 -G--A--KREV</span></p>
<p class=MsoNormal><span style='font-family:宋体'>找到</span><span lang=EN-US>ntcreatefile</span><span
style='font-family:宋体'>的物理地址</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !db 40554ae</span></p>
<p class=MsoNormal><span lang=EN-US># 40554ae 8b ff 55 8b ec 51 33 c0-50 6a 20
50 50 50 ff 75 ..U..Q3.Pj PPP.u</span></p>
<p class=MsoNormal><span lang=EN-US># 40554be 30 ff 75 2c ff 75 28 ff-75 24 ff
75 20 ff 75 1c 0.u,.u(.u$.u .u.</span></p>
<p class=MsoNormal><span lang=EN-US># 40554ce ff 75 18 ff 75 14 ff 75-10 ff 75
0c ff 75 08 e8 .u..u..u..u..u..</span></p>
<p class=MsoNormal><span lang=EN-US># 40554de 73 40 ff ff 59 5d c2 2c-00 90 90
90 90 90 6a 40 s@..Y].,......j@</span></p>
<p class=MsoNormal><span lang=EN-US># 40554ee 68 28 42 e6 83 e8 70 51-e2 ff 8b
75 0c 8b 86 88 h(B...pQ...u....</span></p>
<p class=MsoNormal><span lang=EN-US># 40554fe 00 00 00 89 45 cc 8b 86-50 01 00
00 89 45 d0 8d ....E...P....E..</span></p>
<p class=MsoNormal><span lang=EN-US># 405550e 7d d8 89 7d d4 c6 45 e2-00 3b 75
08 74 33 8d 8e }..}..E..;u.t3..</span></p>
<p class=MsoNormal><span lang=EN-US># 405551e 70 02 00 00 8b 11 83 e2-fe 8d 42
02 8b f8 8b d9 p.........B.....</span></p>
<p class=MsoNormal><span style='font-family:宋体'>手动修改为软件断点</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !eb 40554ae cc</span></p>
<p class=MsoNormal><span lang=EN-US>kd> g</span></p>
<p class=MsoNormal><span lang=EN-US>Break instruction exception - code 80000003
(first chance)</span></p>
<p class=MsoNormal><span lang=EN-US>nt!NtCreateFile:</span></p>
<p class=MsoNormal><span lang=EN-US>840554ae
cc
int 3</span></p>
<p class=MsoNormal><span style='font-family:宋体'>中断后,需要手动改回物理内存</span></p>
<h3><a name="_Toc435300822"><span style='font-family:宋体'>如何对照</span><span
lang=EN-US>IDA</span></a><span style='font-family:宋体'>地址下断?</span></h3>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>若当前符号在</span><span
lang=EN-US>IDA</span><span style='font-family:宋体'>中地址为</span><span lang=EN-US>Va1</span><span
style='font-family:宋体'>,</span><span lang=EN-US>IDA View</span><span
style='font-family:宋体'>菜单</span> <span lang=EN-US>-> Open subviews ->
Segments </span><span style='font-family:宋体'>中,查找到第一个节的虚拟地址</span><span
lang=EN-US>Va1Begin</span><span style='font-family:宋体'>,使用</span><span
lang=EN-US>lm</span><span style='font-family:宋体'>指令找到在当前内存中,该模块起始地址</span><span
lang=EN-US>Va2Begin</span><span style='font-family:宋体'>,则</span><span
lang=EN-US>Va2=Va1 – Va1Begin + Va2Begin</span><span style='font-family:宋体'>为所求</span></p>
<h3><a name="_Toc435300823"><span style='font-family:宋体'>如何在针对线程</span><span
lang=EN-US>/</span></a><span style='font-family:宋体'>进程下断?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> bp
/p EPROCESS</span><span style='font-family:宋体'>地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>针对进程下断</span></p>
<p class=MsoNormal><span lang=EN-US> bp
/t ETHREAD</span><span style='font-family:宋体'>地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>针对线程下断</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<h3><a name="_Toc435300824"><span lang=EN-US>Ntfs</span></a><span
style='font-family:宋体'>文件操作断点</span><span lang=EN-US> </span><span
style='font-family:宋体'>(不通用形式)</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>拦截创建</span><span lang=EN-US>/</span><span
style='font-family:宋体'>打开文件</span></p>
<p class=MsoNormal><span lang=EN-US> bp Ntfs!NtfsCommonCreate "du
poi(poi(poi(poi(esp+8)+0x60)+0x18)+0x34);.echo \"FILE_CREATE_OR_OPEN
\n\";gc"</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>拦截普通删除</span></p>
<p class=MsoNormal><span lang=EN-US> bp Ntfs!NtfsCommonSetInformation
".if poi(poi(poi(esp+8)+0x60)+0x8)==0xD {du
poi(poi(poi(poi(esp+8)+0x60)+0x18)+0x34);.echo \"NORMAL_DELETE \n\"}
.else {gc}"</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span><span style='font-family:宋体'>拦截</span><span
lang=EN-US>NtDeleteFile</span></p>
<p class=MsoNormal><span lang=EN-US> bp Ntfs!NtfsCommonCreate ".if
(poi(poi(poi(esp+8)+0x60)+0x8)&0x1000)!=0 {du
poi(poi(poi(poi(esp+8)+0x60)+0x18)+0x34);.echo \"FILE_DELETE_ON_CLOSE
\n\"};gc"</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>拦截设置文件</span></p>
<p class=MsoNormal><span lang=EN-US>bp Ntfs!NtfsCommonSetInformation
".printf \"%d,%d\\n\",poi(poi(poi(esp+8)+0x60)),poi(poi(poi(esp+8)+0x60)+0x8);gc"</span></p>
<h3><a name="_Toc435300825"><span style='font-family:宋体'>如何对形如</span><span
lang=EN-US>Gen*</span></a><span style='font-family:宋体'>的函数下断?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>bm
/a </span><span style='font-family:宋体'>符号</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>用户态</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> bm /a ml64!Gen*</span></p>
<p class=MsoNormal><span lang=EN-US> 1: 00000000`00c733c0
@!"ml64!genIntReloc"</span></p>
<p class=MsoNormal><span lang=EN-US> 2: 00000000`00c73694
@!"ml64!genDataDef"</span></p>
<p class=MsoNormal><span lang=EN-US> 3: 00000000`00c7160c
@!"ml64!GenCodeJump"</span></p>
<p class=MsoNormal><span lang=EN-US> 4: 00000000`00c9a354
@!"ml64!genPrologue"</span></p>
<p class=MsoNormal><span lang=EN-US> 5: 00000000`00c73ef4
@!"ml64!GenCodeRet"</span></p>
<p class=MsoNormal><span lang=EN-US> 6: 00000000`00c9a620
@!"ml64!genEpilogue"</span></p>
<p class=MsoNormal><span lang=EN-US> 7: 00000000`00c73a60
@!"ml64!genNormReloc"</span></p>
<p class=MsoNormal><span lang=EN-US> 8: 00000000`00c71008
@!"ml64!GenCodeLoop"</span></p>
<p class=MsoNormal><span lang=EN-US> 9: 00000000`00c71710
@!"ml64!GenREXPrefix"</span></p>
<p class=MsoNormal><span lang=EN-US> 10: 00000000`00cda6d0
@!"ml64!genmcBuffT"</span></p>
<p class=MsoNormal><span lang=EN-US> 11: 00000000`00c71940
@!"ml64!GenCodeNormal"</span></p>
<p class=MsoNormal><span lang=EN-US> 12: 00000000`00c73434
@!"ml64!genReloc"</span></p>
<p class=MsoNormal><span lang=EN-US> 13: 00000000`00c98ffc
@!"ml64!genProEpiMacroCall"</span></p>
<p class=MsoNormal><span lang=EN-US> 14: 00000000`00c73d00 @!"ml64!GenCodeString</span></p>
<h3><a name="_Toc435300826"><span style='font-family:宋体'>如何对</span><span
lang=EN-US>pe</span></a><span style='font-family:宋体'>所有导出函数下断?</span><span
lang=EN-US> </span><span
style='font-family:宋体'>(不通用形式)</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> 1.
lm</span><span style='font-family:宋体'>获取基址</span><span lang=EN-US> base</span></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt'><span
lang=EN-US>2. </span><span style='font-family:宋体'>解析导出表</span><span lang=EN-US>
r@$t1=base+poi(base+poi(base+0x3c)+0x78)</span></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt'><span
lang=EN-US>3.</span><span style='font-family:宋体'>遍历导出函数</span><span lang=EN-US>
.for(r@$t2=0;@$t2<poi(@$t1+0x18);r@$t2=@$t2+1) {bp
base+poi(base+poi(@$t1+0x1c)+4*@$t2)}</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<h3><a name="_Toc435300827"><span style='font-family:宋体'>如何在驱动入口下断?</span><span
lang=EN-US> </span></a><span
style='font-family:宋体'>(不通用形式)</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:在驱动加载之前,下断</span><span
lang=EN-US>bp nt!MmLoadSystemImage "du
poi(poi(esp+4)+4);r@$t1=poi(esp+0x18);gu;bp
poi(@$t1)+poi(poi(@$t1)+poi(poi(@$t1)+0x3c)+0x28)"</span></p>
<h3><a name="_Toc435300828"><span style='font-family:宋体'>如何正确地下字符串断点?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>假设内存如下:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> db .</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bad 6c 00 69 00 63 00 68 00-6b
00 69 00 6e 00 67 00 l.i.c.h.k.i.n.g.</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bbd 00 00 00 00 f9 ff c3 90-90
90 90 fe ff ff ff 00 ................</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bcd 24 00 7b 00 74 00 32 00-7d
00 00 00 ff ff ff b0 $.{.t.2.}.......</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bdd 3b f6 76 b4 3b f6 76 90-90
90 90 90 8b ff 55 8b ;.v.;.v.......U.</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bed ec 81 ec 3c 02 00 00 a1-50
32 fb 76 33 c5 89 45 ...<....P2.v3..E</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bfd fc 53 56 8b 35 a0 f0 fa-76
8b d9 57 6a 2a 58 66 .SV.5...v..Wj*Xf</span></p>
<p class=MsoNormal><span lang=EN-US>76f63c0d 89 85 dc fd ff ff 33 ff-89
bd ea fd ff ff 66 89 ......3.......f.</span></p>
<p class=MsoNormal><span lang=EN-US>76f63c1d bd ee fd ff ff c7 85 e0-fd
ff ff a8 b7 ef 76 c7 ..............v.</span></p>
<p class=MsoNormal><span style='font-family:宋体'>匹配写法:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> .block{as /mu ${/v:tn2}
76f63bad};? $scmp("${tn2}","lichking")</span></p>
<p class=MsoNormal><span lang=EN-US>Evaluate expression: 0 = 00000000</span></p>
<p class=MsoNormal><span style='font-family:宋体'>注意:一定要有</span><span lang=EN-US>.block</span><span
style='font-family:宋体'>,对于</span><span lang=EN-US>as</span><span
style='font-family:宋体'>语句必须用</span><span lang=EN-US>block</span><span
style='font-family:宋体'>隔开才能展开</span></p>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection10 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300829"><span style='font-family:宋体'>异常</span><span
lang=EN-US>&</span></a><span style='font-family:宋体'>事件</span></h2>
<p class=MsoNormal><span lang=EN-US>sxe </span><span style='font-family:宋体'>事件异常名</span><span
lang=EN-US> </span><span
style='font-family:宋体'>开启事件异常捕获</span></p>
<p class=MsoNormal><span lang=EN-US>sxd </span><span style='font-family:宋体'>事件异常名</span><span
lang=EN-US> </span><span
style='font-family:宋体'>关闭事件异常捕获</span></p>
<p class=MsoNormal><span style='font-family:宋体'>异常码:</span></p>
<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0 width=1063
style='width:531.6pt;margin-left:-.25pt;border-collapse:collapse;border:none'>
<tr>
<td width=152 valign=top style='width:75.9pt;border:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>asrt</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>av</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>dz</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>c000008e</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>eh</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>gp</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>ii</span></p>
</td>
</tr>
<tr>
<td width=152 valign=top style='width:75.9pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>断言错误</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>访问异常</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>整数除</span><span lang=EN-US>0</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>浮点除</span><span lang=EN-US>0</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>c++</span><span
style='font-family:宋体'>异常</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>页保护错误</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>指令错误</span></p>
</td>
</tr>
<tr>
<td width=152 valign=top style='width:75.9pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>iov</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>isc</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>sbo</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>sov</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>aph</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>3c</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>chhc</span></p>
</td>
</tr>
<tr>
<td width=152 valign=top style='width:75.9pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>整数溢出</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>非法系统调用</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>栈缓冲区溢出</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>栈溢出</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>程序停止响应</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>子进程退出</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>非法句柄</span></p>
</td>
</tr>
<tr>
<td width=152 valign=top style='width:75.9pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>wos</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>wob</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>ssessec</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>bpebpec</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>ccecc</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
</tr>
<tr>
<td width=152 valign=top style='width:75.9pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>wow64</span><span
style='font-family:宋体'>单步异常</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>wow64</span><span
style='font-family:宋体'>断点异常</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>单步异常</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>断点异常</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>ctrl+c;ctrl+break</span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=152 valign=top style='width:75.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>事件码:</span></p>
<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
style='border-collapse:collapse;border:none'>
<tr>
<td width=136 valign=top style='width:67.9pt;border:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>ser</span></p>
</td>
<td width=136 valign=top style='width:67.8pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>cpr</span></p>
</td>
<td width=136 valign=top style='width:67.9pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>epr</span></p>
</td>
<td width=134 valign=top style='width:67.2pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>ct</span></p>
</td>
<td width=134 valign=top style='width:67.2pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>et</span></p>
</td>
<td width=135 valign=top style='width:67.25pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>ld</span></p>
</td>
<td width=135 valign=top style='width:67.35pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>ud</span></p>
</td>
<td width=131 valign=top style='width:65.5pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>out</span></p>
</td>
</tr>
<tr>
<td width=136 valign=top style='width:67.9pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>系统错误</span></p>
</td>
<td width=136 valign=top style='width:67.8pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>进程创建</span></p>
</td>
<td width=136 valign=top style='width:67.9pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>进程退出</span></p>
</td>
<td width=134 valign=top style='width:67.2pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>线程创建</span></p>
</td>
<td width=134 valign=top style='width:67.2pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>线程退出</span></p>
</td>
<td width=135 valign=top style='width:67.25pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>加载模块</span></p>
</td>
<td width=135 valign=top style='width:67.35pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>卸载模块</span></p>
</td>
<td width=131 valign=top style='width:65.5pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>调试输出</span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.eventlog </span><span
style='font-family:宋体'>打印最近的异常和事件</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.lastevent </span><span
style='font-family:宋体'>打印上次异常和事件</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<h3><a name="_Toc435300830"><span style='font-family:宋体'>如何在加载模块后暂停在</span><span
lang=EN-US>Windbg</span></a><span style='font-family:宋体'>中?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> sxe
ld [</span><span style='font-family:宋体'>模块名</span><span lang=EN-US>]</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:菜单</span><span lang=EN-US>Debug->Event
Filters</span><span style='font-family:宋体'>,设置</span><span lang=EN-US>Load
module Enabled, Handled</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection11 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300831"><span style='font-family:宋体'>线程进程</span></a></h2>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span></p>
<table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
style='border-collapse:collapse;border:none'>
<tr>
<td width=153 valign=top style='width:76.3pt;border:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>命令</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>|</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>|*</span></p>
</td>
<td width=156 valign=top style='width:78.0pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>|.</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>|#</span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border:solid windowtext 1.0pt;
border-left:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>|n</span></p>
</td>
</tr>
<tr>
<td width=153 valign=top style='width:76.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>显示进程</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>所有进程</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>所有进程</span></p>
</td>
<td width=156 valign=top style='width:78.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>当前活动进程</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>触发异常进程</span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>n</span><span
style='font-family:宋体'>号进程</span></p>
</td>
</tr>
<tr>
<td width=153 valign=top style='width:76.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>命令</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>~</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>~*</span></p>
</td>
<td width=156 valign=top style='width:78.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>~.</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>~#</span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>~n</span></p>
</td>
</tr>
<tr>
<td width=153 valign=top style='width:76.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>显示线程</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>所有线程</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>所有线程</span></p>
</td>
<td width=156 valign=top style='width:78.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>当前活动线程</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>触发异常线程</span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>n</span><span
style='font-family:宋体'>号线程</span></p>
</td>
</tr>
<tr>
<td width=153 valign=top style='width:76.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>命令</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>|ns</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=156 valign=top style='width:78.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
</tr>
<tr>
<td width=153 valign=top style='width:76.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>设置当前进程</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>n</span><span
style='font-family:宋体'>号进程</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=156 valign=top style='width:78.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
</tr>
<tr>
<td width=153 valign=top style='width:76.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>命令</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>~ns</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=156 valign=top style='width:78.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
</tr>
<tr>
<td width=153 valign=top style='width:76.3pt;border:solid windowtext 1.0pt;
border-top:none;padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span
style='font-family:宋体'>设置当前线程</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US>n</span><span
style='font-family:宋体'>号线程</span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=156 valign=top style='width:78.0pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=156 valign=top style='width:77.95pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
<td width=142 valign=top style='width:70.85pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
padding:0cm 5.4pt 0cm 5.4pt'>
<p class=MsoNormal align=center style='text-align:center'><span lang=EN-US> </span></p>
</td>
</tr>
</table>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>~ns </span><span
style='font-family:宋体'>切换当前处理器为</span><span lang=EN-US>n</span><span
style='font-family:宋体'>号处理器</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.process </span><span
style='font-family:宋体'>查看当前进程</span><span lang=EN-US>PEPROCESS</span><span
style='font-family:宋体'>地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> .process</span></p>
<p class=MsoNormal><span lang=EN-US>Implicit process is now 00000000`7ecf7000</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!process </span><span
style='font-family:宋体'>查看指定进程信息</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !process 81e2dda0</span></p>
<p class=MsoNormal><span lang=EN-US>Failed to get VAD root</span></p>
<p class=MsoNormal><span lang=EN-US>PROCESS 81e2dda0 SessionId: 0
Cid: 0624 Peb: 7ffde000 ParentCid: 02a4</span></p>
<p class=MsoNormal><span lang=EN-US> DirBase: 08a40220
ObjectTable: e24b1dc8 HandleCount: 269.</span></p>
<p class=MsoNormal><span lang=EN-US> Image: vmtoolsd.exe</span></p>
<p class=MsoNormal><span lang=EN-US> VadRoot 00000000 Vads 0
Clone 0 Private 1279. Modified 5. Locked 0.</span></p>
<p class=MsoNormal><span lang=EN-US> DeviceMap e10086e8</span></p>
<p class=MsoNormal><span lang=EN-US>
Token
e24b8570</span></p>
<p class=MsoNormal><span lang=EN-US>
ElapsedTime
00:19:03.573</span></p>
<p class=MsoNormal><span lang=EN-US>
UserTime
00:00:00.203</span></p>
<p class=MsoNormal><span lang=EN-US>
KernelTime
00:00:01.515</span></p>
<p class=MsoNormal><span lang=EN-US>
QuotaPoolUsage
143628</span></p>
<p class=MsoNormal><span lang=EN-US>
QuotaPoolUsage 9472</span></p>
<p class=MsoNormal><span lang=EN-US> Working Set Sizes
(now,min,max) (3054, 50, 345) (12216KB, 200KB, 1380KB)</span></p>
<p class=MsoNormal><span lang=EN-US> PeakWorkingSetSize
3092</span></p>
<p class=MsoNormal><span lang=EN-US>
VirtualSize
87 Mb</span></p>
<p class=MsoNormal><span lang=EN-US>
PeakVirtualSize
88 Mb</span></p>
<p class=MsoNormal><span lang=EN-US>
PageFaultCount
4446</span></p>
<p class=MsoNormal><span lang=EN-US>
MemoryPriority
BACKGROUND</span></p>
<p class=MsoNormal><span lang=EN-US>
BasePriority
13</span></p>
<p class=MsoNormal><span lang=EN-US> CommitCharge
2366</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>
THREAD 818aeda8 Cid 0624.0628 Teb: 7ffdd000 Win32Thread: e17ca2e0
WAIT: (Executive) UserMode Non-Alertable</span></p>
<p class=MsoNormal><span lang=EN-US>
82129c6c NotificationEvent</span></p>
<p class=MsoNormal><span lang=EN-US>
IRP List:</span></p>
<p class=MsoNormal><span lang=EN-US>
81d36b80: (0006,0094) Flags: 00000900 Mdl: 00000000</span></p>
<p class=MsoNormal><span lang=EN-US>
Not impersonating</span></p>
<p class=MsoNormal><span lang=EN-US>
DeviceMap
e10086e8</span></p>
<p class=MsoNormal><span lang=EN-US>
Owning
Process
0
Image: <Unknown></span></p>
<p class=MsoNormal><span lang=EN-US>
Attached Process
81e2dda0 Image:
vmtoolsd.exe</span></p>
<p class=MsoNormal><span lang=EN-US>
Wait Start TickCount
1367 Ticks: 15662
(0:00:04:04.718)</span></p>
<p class=MsoNormal><span lang=EN-US>
Context Switch Count
57
IdealProcessor:
0
LargeStack</span></p>
<p class=MsoNormal><span lang=EN-US>
UserTime
00:00:00.031</span></p>
<p class=MsoNormal><span lang=EN-US>
KernelTime
00:00:00.078</span></p>
<p class=MsoNormal><span lang=EN-US>
Win32 Start Address 0x004060d0</span></p>
<p class=MsoNormal><span lang=EN-US>
Start Address 0x7c810705</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.thread </span><span
style='font-family:宋体'>查看当前线程</span><span lang=EN-US>PETHREAD</span><span
style='font-family:宋体'>地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> .thread</span></p>
<p class=MsoNormal><span lang=EN-US>Implicit thread is now 00000000`7ecfb000</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!thread
PETHREAD</span><span style='font-family:宋体'>地址</span><span lang=EN-US>
!thread </span><span style='font-family:宋体'>线程</span><span lang=EN-US>Id </span><span
style='font-family:宋体'>查看指定线程信息</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !thread 818c4020</span></p>
<p class=MsoNormal><span lang=EN-US>THREAD 818c4020 Cid 0624.0648
Teb: 7ffdc000 Win32Thread: e17e2c90 RUNNING on processor 0</span></p>
<p class=MsoNormal><span lang=EN-US>Not impersonating</span></p>
<p class=MsoNormal><span lang=EN-US>DeviceMap
e10086e8</span></p>
<p class=MsoNormal><span lang=EN-US>Owning
Process
0
Image: <Unknown></span></p>
<p class=MsoNormal><span lang=EN-US>Attached
Process 81e2dda0
Image: vmtoolsd.exe</span></p>
<p class=MsoNormal><span lang=EN-US>Wait Start
TickCount
17004 Ticks: 25
(0:00:00:00.390)</span></p>
<p class=MsoNormal><span lang=EN-US>Context Switch
Count
2744
IdealProcessor:
0
LargeStack</span></p>
<p class=MsoNormal><span lang=EN-US>UserTime
00:00:00.093</span></p>
<p class=MsoNormal><span lang=EN-US>KernelTime
00:00:01.421</span></p>
<p class=MsoNormal><span lang=EN-US>Win32 Start Address 0x77dc3539</span></p>
<p class=MsoNormal><span lang=EN-US>Start Address 0x7c8106f9</span></p>
<p class=MsoNormal><span lang=EN-US>Stack Init b2b48000 Current b2b47ba8 Base
b2b48000 Limit b2b43000 Call 0</span></p>
<p class=MsoNormal><span lang=EN-US>Priority 15 BasePriority 15
PriorityDecrement 0 DecrementCount 0</span></p>
<p class=MsoNormal><span lang=EN-US>ChildEBP RetAddr Args to
Child </span></p>
<p class=MsoNormal><span lang=EN-US>b2b47be0 805462e1 00000000 b2b47d64
00000100 nt!ExpInterlockedPopEntrySListEnd+0x8 (FPO: )</span></p>
<p class=MsoNormal><span lang=EN-US>b2b47c3c 8056bed3 00000000 ffdff120
704f6f49 nt!ExAllocatePoolWithTag+0x3e1 (FPO: )</span></p>
<h3><a name="_Toc435300832"><span style='font-family:宋体'>如何设置内核态进程</span><span
lang=EN-US>/</span></a><span style='font-family:宋体'>线程上下文?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.process
PEPROCESS</span><span style='font-family:宋体'>地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>设置当前进程上下文</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !process 0 0 smss.exe</span></p>
<p class=MsoNormal><span lang=EN-US>Failed to get VAD root</span></p>
<p class=MsoNormal><span lang=EN-US>PROCESS 81c38da0 SessionId:
none Cid: 0220 Peb: 7ffd4000 ParentCid: 0004</span></p>
<p class=MsoNormal><span lang=EN-US> DirBase: 08a40020
ObjectTable: e13bde58 HandleCount: 19.</span></p>
<p class=MsoNormal><span lang=EN-US> Image: smss.exe</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>kd> .process 81c38da0</span></p>
<p class=MsoNormal><span lang=EN-US>Implicit process is now 81c38da0</span></p>
<p class=MsoNormal><span lang=EN-US>WARNING: .cache forcedecodeuser is not
enabled</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.thread
PETHREAD</span><span style='font-family:宋体'>地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>设置当前线程上下文</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.context
</span><span style='font-family:宋体'>用户态上下文地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>设置当前进程用户态上下文</span><span lang=EN-US>(</span><span
style='font-family:宋体'>属于进程上下文</span><span lang=EN-US>)</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !process 0 0</span></p>
<p class=MsoNormal><span lang=EN-US>**** NT ACTIVE PROCESS DUMP ****</span></p>
<p class=MsoNormal><span lang=EN-US>PROCESS fe5039e0 SessionId: 0
Cid: 0008 Peb: 00000000 ParentCid: 0000</span></p>
<p class=MsoNormal><span lang=EN-US> DirBase: 00030000
ObjectTable: fe529b68 TableSize: 50.</span></p>
<p class=MsoNormal><span lang=EN-US> Image: System</span></p>
<p class=MsoNormal><span lang=EN-US>PROCESS fe3c0d60 SessionId: 0
Cid: 0208 Peb: 7ffdf000 ParentCid: 00d4</span></p>
<p class=MsoNormal><span lang=EN-US> DirBase: 0011f000 ObjectTable:
fe3d0f48 TableSize: 30.</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>Image: regsvc.exe</span></p>
<p class=MsoNormal><span lang=EN-US>kd> .context 0011f000</span></p>
<h3><a name="_Toc435300833"><span style='font-family:宋体'>如何暂停</span><span
lang=EN-US>/</span></a><span style='font-family:宋体'>恢复线程执行?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>~</span><span
style='font-family:宋体'>线程号</span><span lang=EN-US>n (</span><span
style='font-family:宋体'>通过将挂起计数减一达到在系统中暂停该线程执行的效果</span><span lang=EN-US>)</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>~</span><span
style='font-family:宋体'>线程号</span><span lang=EN-US>m (</span><span
style='font-family:宋体'>通过将挂起计数加一达到在系统中恢复该线程执行的效果</span><span lang=EN-US>)</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>~</span><span
style='font-family:宋体'>线程号</span><span lang=EN-US>f (</span><span
style='font-family:宋体'>通过将冻结计数减一达到在调试器中暂停该线程执行的效果</span><span lang=EN-US>)</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>~</span><span
style='font-family:宋体'>线程号</span><span lang=EN-US>u (</span><span
style='font-family:宋体'>通过将冻结计数加一达到在调试器中恢复该线程执行的效果</span><span lang=EN-US>)</span></p>
<h3><a name="_Toc435300834"><span style='font-family:宋体'>如何切换到可执行进程</span><span
lang=EN-US>/</span></a><span style='font-family:宋体'>线程?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.process
/p /r /i PEPROCESS</span><span style='font-family:宋体'>地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核调试</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !process 0 0 smss.exe</span></p>
<p class=MsoNormal><span lang=EN-US>Failed to get VAD root</span></p>
<p class=MsoNormal><span lang=EN-US>PROCESS 81c38da0 SessionId:
none Cid: 0220 Peb: 7ffd4000 ParentCid: 0004</span></p>
<p class=MsoNormal><span lang=EN-US> DirBase: 08a40020
ObjectTable: e13bde58 HandleCount: 19.</span></p>
<p class=MsoNormal><span lang=EN-US> Image: smss.exe</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>kd> .process /p /r /i 81c38da0</span></p>
<p class=MsoNormal><span lang=EN-US>You need to continue execution (press 'g'
<enter>) for the context</span></p>
<p class=MsoNormal><span lang=EN-US>to be switched. When the debugger breaks in
again, you will be in</span></p>
<p class=MsoNormal><span lang=EN-US>the new process context.</span></p>
<p class=MsoNormal><span lang=EN-US>kd> g</span></p>
<p class=MsoNormal><span lang=EN-US>Break instruction exception - code 80000003
(first chance)</span></p>
<p class=MsoNormal><span lang=EN-US>nt!RtlpBreakWithStatusInstruction:</span></p>
<p class=MsoNormal><span lang=EN-US>80528bec cc
int 3</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.thread
/p /r PETHREAD</span><span style='font-family:宋体'>地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核调试</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> .thread /p /r 805537c0</span></p>
<p class=MsoNormal><span lang=EN-US>Implicit thread is now 805537c0</span></p>
<p class=MsoNormal><span lang=EN-US>Implicit process is now 80553a20</span></p>
<p class=MsoNormal><span lang=EN-US>.cache forcedecodeuser done</span></p>
<p class=MsoNormal><span lang=EN-US>Loading User Symbols</span></p>
<h3><a name="_Toc435300835"><span style='font-family:宋体'>如何遍历模块?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!for_each_module </span></p>
<p class=MsoNormal><span style='font-family:宋体'>选项:</span><span lang=EN-US>@#FileVersion
@#ProductVersion @#ModuleIndex @#ModuleName @#ImageName @#Base @#Size @#End</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !for_each_module .echo @#ModuleIndex
: @#Base @#End @#ModuleName @#ImageName @#LoadedImageName</span></p>
<p class=MsoNormal><span lang=EN-US>00 : 01000000 01060000 ntsd C:\Program
Files\Debugging Tools for Windows (x86)\ntsd.exe ntsd.exe</span></p>
<p class=MsoNormal><span lang=EN-US>01 : 01400000 016f9000 ext C:\Program
Files\Debugging Tools for Windows (x86)\winext\ext.dll ext.dll</span></p>
<p class=MsoNormal><span lang=EN-US>02 : 01800000 0181d000 uext C:\Program
Files\Debugging Tools for Windows (x86)\winext\uext.dll uext.dll</span></p>
<p class=MsoNormal><span lang=EN-US>03 : 01900000 01975000 exts C:\Program
Files\Debugging Tools for Windows (x86)\WINXP\exts.dll exts.dll</span></p>
<p class=MsoNormal><span lang=EN-US>04 : 02000000 0239b000 dbgeng C:\Program
Files\Debugging Tools for Windows (x86)\dbgeng.dll dbgeng.dll</span></p>
<p class=MsoNormal><span lang=EN-US>05 : 03000000 03141000 dbghelp C:\Program
Files\Debugging Tools for Windows (x86)\dbghelp.dll dbghelp.dll</span></p>
<h3><a name="_Toc435300836"><span style='font-family:宋体'>如何遍历进程?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!for_each_process </span></p>
<p class=MsoNormal><span style='font-family:宋体'>选项:</span><span lang=EN-US>@#Process</span><span
style='font-family:宋体'>为</span><span lang=EN-US>EPROCESS</span><span
style='font-family:宋体'>结构</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !for_each_process dt _EPROCESS
ImageFileName @#Process</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_EPROCESS</span></p>
<p class=MsoNormal><span lang=EN-US> +0x174 ImageFileName :
"System"</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_EPROCESS</span></p>
<p class=MsoNormal><span lang=EN-US> +0x174 ImageFileName :
"smss.exe"</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_EPROCESS</span></p>
<p class=MsoNormal><span lang=EN-US> +0x174 ImageFileName :
"autochk.exe"</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_EPROCESS</span></p>
<p class=MsoNormal><span lang=EN-US> +0x174 ImageFileName :
"csrss.exe"</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_EPROCESS</span></p>
<p class=MsoNormal><span lang=EN-US> +0x174 ImageFileName :
"winlogon.exe"</span></p>
<h3><a name="_Toc435300837"><span style='font-family:宋体'>如何遍历线程?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!for_each_thread
“” </span></p>
<p class=MsoNormal><span style='font-family:宋体'>选项:</span><span lang=EN-US>@#Thread</span><span
style='font-family:宋体'>为</span><span lang=EN-US>ETHREAD</span><span
style='font-family:宋体'>结构</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!list
-t nt!_LIST_ENTRY.Flink -x "dt nt!_KTHREAD
@@(#CONTAINING_RECORD(@$extret,nt!_KTHREAD,ThreadListEntry))" poi(
EPROCESS</span><span style='font-family:宋体'>地址</span><span lang=EN-US>
+@@(#FIELD_OFFSET(nt!_KPROCESS,ThreadListHead))) </span><span
style='font-family:宋体'>手动遍历</span></p>
<h3><a name="_Toc435300838"><span style='font-family:宋体'>如何遍历寄存器?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!for_each_register
“” </span></p>
<p class=MsoNormal><span style='font-family:宋体'>选项:</span><span lang=EN-US>@#RegisterName
@#RegisterValue</span></p>
<h3><a name="_Toc435300839"><span style='font-family:宋体'>如何遍历系统句柄表?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!list
-t nt!_LIST_ENTRY.Flink -x "dt nt!_HANDLE_TABLE
@@(#CONTAINING_RECORD(@$extret,nt!_HANDLE_TABLE,</span></p>
<p class=MsoNormal><span lang=EN-US>HandleTableList))"
nt!HandleTableListHead </span><span
style='font-family:宋体'>手动遍历</span></p>
<h3><a name="_Toc435300840"><span style='font-family:宋体'>如何列出所有进程</span><span
lang=EN-US>EPROCESS</span></a><span style='font-family:宋体'>地址?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>dml_proc
</span><span style='font-family:宋体'>或</span><span lang=EN-US> !process</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !dml_proc</span></p>
<p class=MsoNormal><span lang=EN-US>Address PID Image file name</span></p>
<p class=MsoNormal><span lang=EN-US>821b9660 4 System
</span></p>
<p class=MsoNormal><span lang=EN-US>81c1cca8 2c0
smss.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81c3d660 2e0
autochk.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81cde760 304
csrss.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81f5c758 324 winlogon.exe
</span></p>
<p class=MsoNormal><span lang=EN-US>81f16628 350 services.exe
</span></p>
<p class=MsoNormal><span lang=EN-US>81dfdc08 360
lsass.exe </span></p>
<p class=MsoNormal><span lang=EN-US>8200f020 444 vmacthlp.exe
</span></p>
<p class=MsoNormal><span lang=EN-US>81d7eda0 454 svchost.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81c46890 490 BaiduHips.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81f0eda0 4b0 BaiduSdSvc.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81e7e410 500
QQPXRTP.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81f5f638 510
logonui.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81f253c0 5f4
svchost.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81b73890 648
svchost.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81dff898 6dc
svchost.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81e27020 780 userinit.exe
</span></p>
<p class=MsoNormal><span lang=EN-US>81bf7578 7f4 svchost.exe
</span></p>
<p class=MsoNormal><span lang=EN-US>81d2a020 f0 ZhuDongFangYu.e</span></p>
<p class=MsoNormal><span lang=EN-US>81b78da0 148 explorer.exe
</span></p>
<p class=MsoNormal><span lang=EN-US>81394890 2e4
spoolsv.exe </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<h3><a name="_Toc435300841"><span style='font-family:宋体'>如何对模块排序</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>lmDksm </span><span
style='font-family:宋体'>按模块名排序</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> lmDksm</span></p>
<p class=MsoNormal><span lang=EN-US>start
end module name</span></p>
<p class=MsoNormal><span lang=EN-US>b2ae3000 b2b05000
360AntiHacker
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>b2a21000 b2a38000
360boost
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>b2f44000 b2f7a000
360Box
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>b2e95000 b2ee6700
360netmon
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>b2a38000 b2a6d000
360qpesv
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>f8211000 f821d000
360reskit (deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>b2f1a000 b2f43900
360SelfProtection
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>f84e7000 f8514500
ACPI
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>b2dca000 b2debb80
afd
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>f870a000 f8714580
agp440
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>f8466000 f847d900
atapi
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>f8d21000 f8d21c00 audst</span><span
style='font-family:宋体'>进程</span><span lang=EN-US> (pdb
symbols)
d:\symcachel\audstub.pdb\6B3BF8F0C8834E7E8EFE53B7A91E2A3F1\audstub.pdb</span></p>
<p class=MsoNormal><span lang=EN-US>b2a6d000 b2a9a000
BAPIDRV
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>f8ab2000 f8ab5f00 BATTC (deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!dml_proc </span><span
style='font-family:宋体'>按进程对象地址排序</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !dml_proc</span></p>
<p class=MsoNormal><span lang=EN-US>Address PID Image file name</span></p>
<p class=MsoNormal><span lang=EN-US>821b97c0 4
System </span></p>
<p class=MsoNormal><span lang=EN-US>81dd1c80 264
smss.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81ce0950 284
autochk.exe </span></p>
<p class=MsoNormal><span lang=EN-US>82015878 2a4
csrss.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81d5f7a0 2c4 winlogon.exe
</span></p>
<p class=MsoNormal><span lang=EN-US>81c225d0 2f0 services.exe
</span></p>
<p class=MsoNormal><span lang=EN-US>820be4b0 300
lsass.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81689020 3d4 vmacthlp.exe
</span></p>
<p class=MsoNormal><span lang=EN-US>81d5b2d8 3e4
svchost.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81f536f8 41c
logonui.exe </span></p>
<p class=MsoNormal><span lang=EN-US>816995f0 43c
QQPCNTP.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81fbe500 484
svchost.exe </span></p>
<p class=MsoNormal><span lang=EN-US>81c0ba60 538
svchost.exe </span></p>
<h3><a name="_Toc435300842"><span style='font-family:宋体'>如何获取进程名、进程</span><span
lang=EN-US>ID </span></a><span style='font-family:宋体'>对应的进程对象</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!process
0 Flags </span><span style='font-family:宋体'>进程名</span><span lang=EN-US> </span><span
style='font-family:宋体'>根据进程名获取进程对象</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !process 0 0 explorer.exe</span></p>
<p class=MsoNormal><span lang=EN-US>Failed to get VAD root</span></p>
<p class=MsoNormal><span lang=EN-US>PROCESS 81ce8bd0 SessionId: 0
Cid: 0780 Peb: 7ffde000 ParentCid: 06a8</span></p>
<p class=MsoNormal><span lang=EN-US> DirBase: 13e40220
ObjectTable: e2417298 HandleCount: 431.</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>Image: explorer.exe</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!process
</span><span style='font-family:宋体'>进程</span><span lang=EN-US>Id </span><span
style='font-family:宋体'>根据进程</span><span lang=EN-US>ID</span><span
style='font-family:宋体'>获取进程对象</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !process 4</span></p>
<p class=MsoNormal><span lang=EN-US>Searching for Process with Cid == 4</span></p>
<p class=MsoNormal><span lang=EN-US>PROCESS 865e6690 SessionId:
none Cid: 0004 Peb: 00000000 ParentCid: 0000</span></p>
<p class=MsoNormal><span lang=EN-US> DirBase: 00185000
ObjectTable: 8a001940 HandleCount: 1543.</span></p>
<p class=MsoNormal><span lang=EN-US> Image: System</span></p>
<p class=MsoNormal><span lang=EN-US> VadRoot 86c8a630 Vads 7
Clone 0 Private 3. Modified 6964. Locked 64.</span></p>
<p class=MsoNormal><span lang=EN-US> DeviceMap 8a009fc8</span></p>
<p class=MsoNormal><span lang=EN-US>
Token
8a0010b0</span></p>
<p class=MsoNormal><span lang=EN-US>
ElapsedTime
00:00:46.509</span></p>
<p class=MsoNormal><span lang=EN-US>
UserTime
00:00:00.000</span></p>
<p class=MsoNormal><span lang=EN-US>
KernelTime
00:00:00.577</span></p>
<p class=MsoNormal><span lang=EN-US>
QuotaPoolUsage 0</span></p>
<p class=MsoNormal><span lang=EN-US>
QuotaPoolUsage 0</span></p>
<p class=MsoNormal><span lang=EN-US> Working Set Sizes
(now,min,max) (154, 0, 0) (616KB, 0KB, 0KB)</span></p>
<p class=MsoNormal><span lang=EN-US>
PeakWorkingSetSize
1562</span></p>
<p class=MsoNormal><span lang=EN-US> VirtualSize
1 Mb</span></p>
<p class=MsoNormal><span lang=EN-US>
PeakVirtualSize
7 Mb</span></p>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection12 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300843"><span lang=EN-US>PE</span></a><span
style='font-family:宋体'>相关</span></h2>
<h3><a name="_Toc435300844"><span style='font-family:宋体'>如何查看某映像</span><span
lang=EN-US>(sys exe dll)</span></a><span style='font-family:宋体'>的版本号、时间、公司等信息?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>Lm</span><span
style='font-family:宋体'>指令</span><span lang=EN-US>v</span><span
style='font-family:宋体'>选项可以显示版本信息,这样很方便的查找当前加载模块是不是预期模块</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> lmvm nt*</span></p>
<p class=MsoNormal><span lang=EN-US>start
end module name</span></p>
<p class=MsoNormal><span lang=EN-US>804d8000 806d0480
nt (pdb
symbols)
d:\symcachel\ntkrnlpa.pdb\30B5FB31AE7E4ACAABA750AA241FF3311\ntkrnlpa.pdb</span></p>
<p class=MsoNormal><span lang=EN-US> Loaded symbol image
file: ntkrnlpa.exe</span></p>
<p class=MsoNormal><span lang=EN-US> Image path: ntkrnlpa.exe</span></p>
<p class=MsoNormal><span lang=EN-US> Image name: ntkrnlpa.exe</span></p>
<p class=MsoNormal><span lang=EN-US>
Timestamp: Mon Apr 14 02:31:06 2008
(4802516A)</span></p>
<p class=MsoNormal><span lang=EN-US>
CheckSum: 002050D3</span></p>
<p class=MsoNormal><span lang=EN-US>
ImageSize: 001F8480</span></p>
<p class=MsoNormal><span lang=EN-US> File
version: 5.1.2600.5512</span></p>
<p class=MsoNormal><span lang=EN-US> Product version:
5.1.2600.5512</span></p>
<p class=MsoNormal><span lang=EN-US> File
flags: 0 (Mask 3F)</span></p>
<p class=MsoNormal><span lang=EN-US> File
OS: 40004 NT Win32</span></p>
<p class=MsoNormal><span lang=EN-US> File
type: 1.0 App</span></p>
<p class=MsoNormal><span lang=EN-US> File
date: 00000000.00000000</span></p>
<p class=MsoNormal><span lang=EN-US>
Translations: 0804.04b0</span></p>
<p class=MsoNormal><span lang=EN-US>
CompanyName: Microsoft Corporation</span></p>
<p class=MsoNormal><span lang=EN-US>
ProductName: Microsoft(R) Windows(R) Operating
System</span></p>
<p class=MsoNormal><span lang=EN-US>
InternalName: ntkrnlpa.exe</span></p>
<p class=MsoNormal><span lang=EN-US> OriginalFilename:
ntkrnlpa.exe</span></p>
<p class=MsoNormal><span lang=EN-US>
ProductVersion: 5.1.2600.5512</span></p>
<p class=MsoNormal><span lang=EN-US>
FileVersion: 5.1.2600.5512 (xpsp.080413-2111)</span></p>
<p class=MsoNormal><span lang=EN-US> FileDescription:
NT Kernel & System</span></p>
<p class=MsoNormal><span lang=EN-US>
LegalCopyright: (C) Microsoft Corporation. All rights reserved.</span></p>
<h3><a name="_Toc435300845"><span style='font-family:宋体'>如何显示</span><span
lang=EN-US>pe</span></a><span style='font-family:宋体'>头信息?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!dh,
!lmi</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>里:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> !dh 001f0000</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>File Type: EXECUTABLE IMAGE</span></p>
<p class=MsoNormal><span lang=EN-US>FILE HEADER VALUES</span></p>
<p class=MsoNormal><span lang=EN-US> 14C machine (i386)</span></p>
<p class=MsoNormal><span lang=EN-US> 7
number of sections</span></p>
<p class=MsoNormal><span lang=EN-US>55C5B5A9 time date stamp Sat Aug 08
15:54:17 2015</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> 0 file
pointer to symbol table</span></p>
<p class=MsoNormal><span lang=EN-US> 0
number of symbols</span></p>
<p class=MsoNormal><span lang=EN-US> E0 size of
optional header</span></p>
<p class=MsoNormal><span lang=EN-US> 102
characteristics</span></p>
<p class=MsoNormal><span lang=EN-US>
Executable</span></p>
<p class=MsoNormal><span lang=EN-US>
32 bit word machine</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>OPTIONAL HEADER VALUES</span></p>
<p class=MsoNormal><span lang=EN-US> 10B magic #</span></p>
<p class=MsoNormal><span lang=EN-US> 10.00 linker version</span></p>
<p class=MsoNormal><span lang=EN-US> 3200 size of code</span></p>
<p class=MsoNormal><span lang=EN-US> 3A00 size of initialized
data</span></p>
<p class=MsoNormal><span lang=EN-US> 0 size
of uninitialized data</span></p>
<p class=MsoNormal><span lang=EN-US> 11069 address of entry point</span></p>
<p class=MsoNormal><span lang=EN-US> 1000 base of code</span></p>
<p class=MsoNormal><span lang=EN-US>
----- new -----</span></p>
<h3><a name="_Toc435300846"><span style='font-family:宋体'>如何查找内存中的</span><span
lang=EN-US>PE</span></a><span style='font-family:宋体'>头?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>检测</span><span lang=EN-US>PE</span><span
style='font-family:宋体'>可以用于查找内核重载,内存映射文件等</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.imgscan
/l /v /r </span><span style='font-family:宋体'>起始地址</span> <span lang=EN-US>l</span><span
style='font-family:宋体'>搜索长度</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> .imgscan /l /v /r 80b9f000 88db6000</span></p>
<p class=MsoNormal><span lang=EN-US>*** Checking 80b9f000 - 88db6000</span></p>
<p class=MsoNormal><span lang=EN-US>MZ at 80b9f000 - size 2a000</span></p>
<p class=MsoNormal><span lang=EN-US> Name: kdvm.dll</span></p>
<p class=MsoNormal><span lang=EN-US> Loaded kdvm.dll module</span></p>
<p class=MsoNormal><span lang=EN-US>MZ at 80bfe000</span></p>
<p class=MsoNormal><span lang=EN-US>MZ at 83e0a000 - size 410000</span></p>
<p class=MsoNormal><span lang=EN-US> Name: ntoskrnl.exe</span></p>
<p class=MsoNormal><span lang=EN-US> Loaded ntoskrnl.exe module</span></p>
<p class=MsoNormal><span lang=EN-US>MZ at 8421a000 - size 37000</span></p>
<p class=MsoNormal><span lang=EN-US> Name: HAL.dll</span></p>
<p class=MsoNormal><span lang=EN-US> Loaded HAL.dll module</span></p>
<p class=MsoNormal><span lang=EN-US>MZ at 86b1d000 - size 26d00</span></p>
<p class=MsoNormal><span lang=EN-US>MZ at 8708b000 - size 26d00</span></p>
<p class=MsoNormal><span lang=EN-US>MZ at 87454000 - size 88000</span></p>
<p class=MsoNormal><span lang=EN-US> Name: MZ?</span></p>
<p class=MsoNormal><span lang=EN-US> Loaded MZ? module</span></p>
<p class=MsoNormal><span lang=EN-US>MZ at 88c00000 - size 18000</span></p>
<p class=MsoNormal><span lang=EN-US> Name: rasl2tp.exe</span></p>
<p class=MsoNormal><span lang=EN-US> Loaded rasl2tp.exe module</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection13 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300847"><span style='font-family:宋体'>符号</span><span
lang=EN-US>{</span></a><span style='font-family:宋体'>结构体</span><span lang=EN-US>,</span><span
style='font-family:宋体'>函数</span><span lang=EN-US>,...}</span><span
style='font-family:宋体'>查看</span></h2>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.reload </span><span
style='font-family:宋体'>重新加载符号信息</span></p>
<p class=MsoNormal><span style='font-family:宋体'>选项:</span><span lang=EN-US>/f </span><span
style='font-family:宋体'>强制加载</span><span lang=EN-US> /user
</span><span style='font-family:宋体'>用户态模块</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<h3><a name="_Toc435300848"><span style='font-family:宋体'>如何列出以</span><span
lang=EN-US>T</span></a><span style='font-family:宋体'>开头的模块</span><span
lang=EN-US>=</span><span style='font-family:宋体'>?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>lm m
</span><span style='font-family:宋体'>模块名</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> lm m T*</span></p>
<p class=MsoNormal><span lang=EN-US>start
end module name</span></p>
<p class=MsoNormal><span lang=EN-US>b1d28000 b1d4d000
TAOKernelXP
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>b1d75000 b1d8ec80
TAOAccelerator
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>b2ce8000 b2d0a700
TFsFlt (deferred) </span></p>
<p class=MsoNormal><span lang=EN-US>b2d0b000 b2d33580
TSDefenseBt
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>b2d34000 b2d65160
TSKsp
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>b2d8c000 b2da2980
TSSysKit
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>b2e3c000 b2e94380
tcpip
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>f8515000 f8531c00 TsFltMgr
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>f889a000 f88a3f00
termdd (pdb
symbols)
d:\symcachel\termdd.pdb\C04E4855F20641ECB654BB1AD575B8611\termdd.pdb</span></p>
<p class=MsoNormal><span lang=EN-US>f8992000 f8996a80
TDI (pdb
symbols)
d:\symcachel\tdi.pdb\545742C029D24374BD687966638629EB1\tdi.pdb</span></p>
<p class=MsoNormal><span lang=EN-US>f8a6a000 f8a6f380
TS888
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>f8a8a000 f8a8f500
TDTCP (deferred) </span></p>
<h3><a name="_Toc435300849"><span style='font-family:宋体'>如何查看所有前缀为</span><span
lang=EN-US>Rtl</span></a><span style='font-family:宋体'>的符号?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>x</span><span
style='font-family:宋体'>指令</span><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>选项:</span><span lang=EN-US>/1</span><span
style='font-family:宋体'>只显示符号名</span> <span lang=EN-US> /2</span><span
style='font-family:宋体'>只显示地址</span><span lang=EN-US> (</span><span
style='font-family:宋体'>与</span><span lang=EN-US>.foreach</span><span
style='font-family:宋体'>搭配是极好的</span><span lang=EN-US>)</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> x nt!rtl*</span></p>
<p class=MsoNormal><span lang=EN-US>805e1284 nt!RtlFreeHotPatchData = <no
type information></span></p>
<p class=MsoNormal><span lang=EN-US>8052aa00 nt!RtlDelete = <no type
information></span></p>
<p class=MsoNormal><span lang=EN-US>8052b612 nt!RtlpVerCompare = <no type
information></span></p>
<p class=MsoNormal><span lang=EN-US>80529d14 nt!RtlNumberOfSetBits = <no
type information></span></p>
<p class=MsoNormal><span lang=EN-US>805d3842 nt!RtlValidAcl = <no type
information></span></p>
<p class=MsoNormal><span lang=EN-US>8069d942 nt!RtlInitializeRangeListPackage =
<no type information></span></p>
<p class=MsoNormal><span lang=EN-US>805d2c72 nt!RtlInitializeUnicodePrefix =
<no type information></span></p>
<p class=MsoNormal><span lang=EN-US>805d40c0 nt!RtlCreateAtomTable = <no
type information></span></p>
<p class=MsoNormal><span lang=EN-US>8052dfbc nt!RtlpTraceDatabaseAllocate =
<no type information></span></p>
<p class=MsoNormal><span lang=EN-US>8052b3ce nt!RtlDeleteElementGenericTableAvl
= <no type information></span></p>
<p class=MsoNormal><span lang=EN-US>805d4e4a nt!RtlpCopyRangeListEntry = <no
type information></span></p>
<p class=MsoNormal><span lang=EN-US>805e0532 nt!RtlGetSetBootStatusData =
<no type information></span></p>
<p class=MsoNormal><span lang=EN-US>80543548 nt!RtlLargeIntegerShiftLeft =
<no type information></span></p>
<p class=MsoNormal><span lang=EN-US>805dc642 nt!RtlpGenerateInheritAcl = <no
type information></span></p>
<p class=MsoNormal><span lang=EN-US>8052d7ec nt!RtlLargeIntegerDivide = <no
type information></span></p>
<p class=MsoNormal><span lang=EN-US>805da254 nt!RtlLengthSid = <no type
information></span></p>
<p class=MsoNormal><span lang=EN-US>8052e702 nt!RtlUnwind = <no type
information></span></p>
<h3><a name="_Toc435300850"><span style='font-family:宋体'>如何查看</span><span
lang=EN-US>SEH</span></a><span style='font-family:宋体'>链</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!exchain </span><span
style='font-family:宋体'>打印异常链</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> !exchain</span></p>
<p class=MsoNormal><span lang=EN-US>0012fea8: Prymes!_except_handler3+0
(00407604)</span></p>
<p class=MsoNormal><span lang=EN-US> CRT scope 0, filter:
Prymes!dzExcepError+e6 (00401576)</span></p>
<p class=MsoNormal><span lang=EN-US>
func: Prymes!dzExcepError+ec (0040157c)</span></p>
<p class=MsoNormal><span lang=EN-US>0012ffb0: Prymes!_except_handler3+0
(00407604)</span></p>
<p class=MsoNormal><span lang=EN-US> CRT scope 0, filter:
Prymes!mainCRTStartup+f8 (004021b8)</span></p>
<p class=MsoNormal><span lang=EN-US>
func: Prymes!mainCRTStartup+113 (004021d3)</span></p>
<p class=MsoNormal><span lang=EN-US>0012ffe0: KERNEL32!GetThreadContext+1c
(77ea1856)</span></p>
<h3><a name="_Toc435300853"><span style='font-family:宋体'>指定基址如何查看结构体成员数值?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>dt
[-b] </span><span style='font-family:宋体'>模块名</span><span lang=EN-US>!</span><span
style='font-family:宋体'>结构名</span> <span style='font-family:宋体'>子成员名</span> <span
style='font-family:宋体'>基址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>选项:</span><span lang=EN-US>-b </span><span
style='font-family:宋体'>打印子结构体</span><span lang=EN-US> </span><span
style='font-family:宋体'>子成员名可以用通配符</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> dt _FILE_OBJECT</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_FILE_OBJECT</span></p>
<p class=MsoNormal><span lang=EN-US> +0x000
Type :
Int2B</span></p>
<p class=MsoNormal><span lang=EN-US> +0x002
Size :
Int2B</span></p>
<p class=MsoNormal><span lang=EN-US> +0x004
DeviceObject : Ptr32 _DEVICE_OBJECT</span></p>
<p class=MsoNormal><span lang=EN-US> +0x008
Vpb
: Ptr32 _VPB</span></p>
<p class=MsoNormal><span lang=EN-US> +0x00c
FsContext : Ptr32 Void</span></p>
<p class=MsoNormal><span lang=EN-US> +0x010
FsContext2 : Ptr32 Void</span></p>
<p class=MsoNormal><span lang=EN-US> +0x014 SectionObjectPointer :
Ptr32 _SECTION_OBJECT_POINTERS</span></p>
<p class=MsoNormal><span lang=EN-US> +0x018 PrivateCacheMap :
Ptr32 Void</span></p>
<p class=MsoNormal><span lang=EN-US> +0x01c
FinalStatus : Int4B</span></p>
<p class=MsoNormal><span lang=EN-US> +0x020 RelatedFileObject :
Ptr32 _FILE_OBJECT</span></p>
<p class=MsoNormal><span lang=EN-US> +0x024
LockOperation : UChar</span></p>
<p class=MsoNormal><span lang=EN-US> +0x025
DeletePending : Uchar</span></p>
<p class=MsoNormal><span lang=EN-US>kd> dt _FILE_OBJECT Size</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_FILE_OBJECT</span></p>
<p class=MsoNormal><span lang=EN-US> +0x002 Size : Int2B</span></p>
<p class=MsoNormal><span style='font-family:宋体'>注意:常用该命令打印系统符号中的结构体,或者在有源码的情况下查看变量,直接</span><span
lang=EN-US>dt </span><span style='font-family:宋体'>变量即可</span></p>
<h3><a name="_Toc435300854"><span style='font-family:宋体'>如何打印内核单向</span><span
lang=EN-US>/</span></a><span style='font-family:宋体'>双向链表?</span></h3>
<p class=MsoNormal><span lang=EN-US>!list</span></p>
<p class=MsoNormal><span lang=EN-US>!slist</span></p>
<p class=MsoNormal><span lang=EN-US>!lookaside</span></p>
<p class=MsoNormal><span lang=EN-US>!pplookaside</span></p>
<h3><a name="_Toc435300855"><span style='font-family:宋体'>如何获取某结构体大小?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>1.
dt –v </span><span style='font-family:宋体'>结构体</span> <span lang=EN-US> 2.
?? sizeof(</span><span style='font-family:宋体'>结构体</span><span lang=EN-US>)</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> dt -v _PEB</span></p>
<p class=MsoNormal><span lang=EN-US>teststack!_PEB</span></p>
<p class=MsoNormal><span lang=EN-US>struct _PEB, 71 elements, 0x230 bytes</span></p>
<p class=MsoNormal><span lang=EN-US> +0x000 InheritedAddressSpace :
UChar</span></p>
<p class=MsoNormal><span lang=EN-US> +0x001
ReadImageFileExecOptions : UChar</span></p>
<p class=MsoNormal><span lang=EN-US> +0x002
BeingDebugged : UChar</span></p>
<p class=MsoNormal><span lang=EN-US> +0x003
SpareBool : UChar</span></p>
<p class=MsoNormal><span lang=EN-US> +0x004
Mutant : Ptr32 to
Void</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>0:000> ?? sizeof(_PEB)</span></p>
<p class=MsoNormal><span lang=EN-US>unsigned int 0x230</span></p>
<h3><a name="_Toc435300856"><span style='font-family:宋体'>如何打印</span><span
lang=EN-US>STRING, ANSI_STRING, UNICODE_STRING</span></a><span
style='font-family:宋体'>结构?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> ds
</span><span style='font-family:宋体'>地址</span><span lang=EN-US> !str</span><span
style='font-family:宋体'>地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>打印</span><span lang=EN-US>ANSI_STRING </span></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt'><span
lang=EN-US>dS </span><span style='font-family:宋体'>地址</span><span lang=EN-US> !ustr
</span><span style='font-family:宋体'>地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>打印</span><span lang=EN-US>UNICODE_STRING</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> .printf (</span><span
style='font-family:宋体'>见前述章节</span><span lang=EN-US>)</span></p>
<h3><a name="_Toc435300858"><span style='font-family:宋体'>如何查看进程环境块</span><span
lang=EN-US>PEB</span></a><span style='font-family:宋体'>结构?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.process </span><span
style='font-family:宋体'>获取</span><span lang=EN-US>_PEB</span><span
style='font-family:宋体'>基址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>dt
_PEB @$peb </span><span style='font-family:宋体'>查看当前进程信息</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> dt _PEB</span></p>
<p class=MsoNormal><span lang=EN-US>teststack!_PEB</span></p>
<p class=MsoNormal><span lang=EN-US> +0x000 InheritedAddressSpace :
UChar</span></p>
<p class=MsoNormal><span lang=EN-US> +0x001
ReadImageFileExecOptions : UChar</span></p>
<p class=MsoNormal><span lang=EN-US> +0x002
BeingDebugged : UChar</span></p>
<p class=MsoNormal><span lang=EN-US> +0x003
SpareBool : UChar</span></p>
<p class=MsoNormal><span lang=EN-US> +0x004
Mutant : Ptr32 Void</span></p>
<p class=MsoNormal><span lang=EN-US> +0x008 ImageBaseAddress :
Ptr32 Void</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.process </span><span
style='font-family:宋体'>获取</span><span lang=EN-US>_EPROCESS</span><span
style='font-family:宋体'>基址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>dt _EPROCESS
@$proc </span><span
style='font-family:宋体'>或</span><span lang=EN-US> !process @$proc </span><span
style='font-family:宋体'>查看当前进程信息</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> dt _EPROCESS @$proc</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_EPROCESS</span></p>
<p class=MsoNormal><span lang=EN-US> +0x000
Pcb
: _KPROCESS</span></p>
<p class=MsoNormal><span lang=EN-US> +0x06c
ProcessLock : _EX_PUSH_LOCK</span></p>
<p class=MsoNormal><span lang=EN-US> +0x070
CreateTime : _LARGE_INTEGER 0x0</span></p>
<p class=MsoNormal><span lang=EN-US> +0x078
ExitTime : _LARGE_INTEGER 0x0</span></p>
<p class=MsoNormal><span lang=EN-US> +0x080
RundownProtect : _EX_RUNDOWN_REF</span></p>
<p class=MsoNormal><span lang=EN-US> +0x084 UniqueProcessId :
0x00000004 Void</span></p>
<p class=MsoNormal><span lang=EN-US> +0x088 ActiveProcessLinks :
_LIST_ENTRY [ 0x81dd1d08 - 0x8055b1d8 ]</span></p>
<h3><a name="_Toc435300859"><span style='font-family:宋体'>如何查看线程环境块</span><span
lang=EN-US>TEB</span></a><span style='font-family:宋体'>结构?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.thread </span><span
style='font-family:宋体'>获取</span><span lang=EN-US>_TEB</span><span
style='font-family:宋体'>基址</span><span lang=EN-US> x86</span><span
style='font-family:宋体'>下为</span><span lang=EN-US>FS:</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>dt _TEB
@$teb </span><span style='font-family:宋体'>查看当前线程信息</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> dt _TEB @$teb</span></p>
<p class=MsoNormal><span lang=EN-US>teststack!_TEB</span></p>
<p class=MsoNormal><span lang=EN-US> +0x000
NtTib :
_NT_TIB</span></p>
<p class=MsoNormal><span lang=EN-US> +0x01c EnvironmentPointer :
(null) </span></p>
<p class=MsoNormal><span lang=EN-US> +0x020
ClientId : _CLIENT_ID</span></p>
<p class=MsoNormal><span lang=EN-US> +0x028 ActiveRpcHandle :
(null) </span></p>
<p class=MsoNormal><span lang=EN-US> +0x02c ThreadLocalStoragePointer
: 0x7fe6f02c Void</span></p>
<p class=MsoNormal><span lang=EN-US> +0x030 ProcessEnvironmentBlock
: 0x7fe69000 _PEB</span></p>
<p class=MsoNormal><span lang=EN-US> +0x034
LastErrorValue : 0</span></p>
<p class=MsoNormal><span lang=EN-US> +0x038
CountOfOwnedCriticalSections : 0</span></p>
<p class=MsoNormal><span lang=EN-US> +0x03c CsrClientThread :
(null) </span></p>
<p class=MsoNormal><span lang=EN-US> +0x040 Win32ThreadInfo :
(null)</span></p>
<p class=MsoNormal><span style='font-family:宋体'>注意:第一个元素为</span><span
lang=EN-US>TIB</span><span style='font-family:宋体'>结构</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.thread </span><span
style='font-family:宋体'>获取</span><span lang=EN-US>_ETHREAD</span><span
style='font-family:宋体'>基址</span> <span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> 1.
dg fs</span><span style='font-family:宋体'>获取</span><span lang=EN-US>_TEB</span><span
style='font-family:宋体'>基址</span><span lang=EN-US> (x86)</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> dg fs</span></p>
<p class=MsoNormal><span lang=EN-US>
P Si Gr Pr Lo</span></p>
<p class=MsoNormal><span lang=EN-US>Sel
Base Limit
Type l ze an es ng Flags</span></p>
<p class=MsoNormal><span lang=EN-US>---- -------- -------- ---------- - -- --
-- -- --------</span></p>
<p class=MsoNormal><span lang=EN-US>0053 7fe6f000 00000fff Data RW Ac 3 Bg By
P Nl 000004f3 </span></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt'><span
lang=EN-US>2. dt _PEB 7fe6f000</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>dt _ETHREAD
@$thread </span><span style='font-family:宋体'>查看当前线程信息</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> dt _ETHREAD @$thread</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_ETHREAD</span></p>
<p class=MsoNormal><span lang=EN-US> +0x000
Tcb
: _KTHREAD</span></p>
<p class=MsoNormal><span lang=EN-US> +0x1c0
CreateTime : _LARGE_INTEGER
0x0e88cf0d`f3bc51d0</span></p>
<p class=MsoNormal><span lang=EN-US> +0x1c0 NestedFaultCount : 0y00</span></p>
<p class=MsoNormal><span lang=EN-US> +0x1c0
ApcNeeded : 0y0</span></p>
<p class=MsoNormal><span lang=EN-US> +0x1c8
ExitTime : _LARGE_INTEGER
0x81be01e8`81be01e8</span></p>
<p class=MsoNormal><span lang=EN-US> +0x1c8
LpcReplyChain : _LIST_ENTRY [ 0x81be01e8 - 0x81be01e8 ]</span></p>
<p class=MsoNormal><span lang=EN-US> +0x1c8
KeyedWaitChain : _LIST_ENTRY [ 0x81be01e8 - 0x81be01e8 ]</span></p>
<p class=MsoNormal><span lang=EN-US> +0x1d0 ExitStatus
: 0n0</span></p>
<p class=MsoNormal><span lang=EN-US> +0x1d0
OfsChain : (null) </span></p>
<p class=MsoNormal><span lang=EN-US> +0x1d4
PostBlockList : _LIST_ENTRY [ 0x81be01f4 - 0x81be01f4 ]</span></p>
<h3><a name="_Toc435300860"><span style='font-family:宋体'>如何查看内核进程控制块?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!pcr </span><span
style='font-family:宋体'>基址</span><span lang=EN-US> x86</span><span
style='font-family:宋体'>下为</span><span lang=EN-US>FS:</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !pcr</span></p>
<p class=MsoNormal><span lang=EN-US>KPCR for Processor 0 at ffdff000:</span></p>
<p class=MsoNormal><span lang=EN-US> Major 1 Minor 1</span></p>
<p class=MsoNormal><span lang=EN-US> NtTib.ExceptionList:
b1b8c528</span></p>
<p class=MsoNormal><span lang=EN-US>
NtTib.StackBase: b1b8cdf0</span></p>
<p class=MsoNormal><span lang=EN-US>
NtTib.StackLimit: b1b8a000</span></p>
<p class=MsoNormal><span lang=EN-US> NtTib.SubSystemTib:
00000000</span></p>
<p class=MsoNormal><span lang=EN-US>
NtTib.Version: 00000000</span></p>
<p class=MsoNormal><span lang=EN-US>
NtTib.UserPointer: 00000000</span></p>
<p class=MsoNormal><span lang=EN-US>
NtTib.SelfTib: 00000000</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>
SelfPcr: ffdff000</span></p>
<p class=MsoNormal><span lang=EN-US>
Prcb: ffdff120</span></p>
<p class=MsoNormal><span lang=EN-US>
Irql: 00000000</span></p>
<p class=MsoNormal><span lang=EN-US>
IRR: 00000000</span></p>
<p class=MsoNormal><span lang=EN-US>
IDR: ffffffff</span></p>
<p class=MsoNormal><span lang=EN-US>
InterruptMode: 00000000</span></p>
<p class=MsoNormal><span lang=EN-US>
IDT: 8003f400</span></p>
<p class=MsoNormal><span lang=EN-US>
GDT: 8003f000</span></p>
<p class=MsoNormal><span lang=EN-US>
TSS: 80042000</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>
CurrentThread: 81be0020</span></p>
<p class=MsoNormal><span lang=EN-US>
NextThread: 00000000</span></p>
<p class=MsoNormal><span lang=EN-US>
IdleThread: 805537c0</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>
DpcQueue:</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> 1.
dg fs</span><span style='font-family:宋体'>获取</span><span lang=EN-US>_KPCR</span><span
style='font-family:宋体'>基址</span><span lang=EN-US> (x86)</span></p>
<p class=MsoNormal><span lang=EN-US>kd> dg fs</span></p>
<p class=MsoNormal><span lang=EN-US>
P Si Gr Pr Lo</span></p>
<p class=MsoNormal><span lang=EN-US>Sel
Base Limit
Type l ze an es ng Flags</span></p>
<p class=MsoNormal><span lang=EN-US>---- -------- -------- ---------- - -- --
-- -- --------</span></p>
<p class=MsoNormal><span lang=EN-US>0030 ffdff000 00001fff Data RW Ac 0 Bg Pg
P Nl 00000c93</span></p>
<p class=MsoNormal><span lang=EN-US> 2.
dt _KPCR ffdff000</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> dt _KPCR ffdff000</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_KPCR</span></p>
<p class=MsoNormal><span lang=EN-US> +0x000
NtTib :
_NT_TIB</span></p>
<p class=MsoNormal><span lang=EN-US> +0x01c
SelfPcr : 0xffdff000
_KPCR</span></p>
<p class=MsoNormal><span lang=EN-US> +0x020
Prcb :
0xffdff120 _KPRCB</span></p>
<p class=MsoNormal><span lang=EN-US> +0x024
Irql :
0 ''</span></p>
<p class=MsoNormal><span lang=EN-US> +0x028
IRR
: 0</span></p>
<p class=MsoNormal><span lang=EN-US> +0x02c
IrrActive : 0</span></p>
<p class=MsoNormal><span lang=EN-US> +0x030
IDR
: 0xffffffff</span></p>
<p class=MsoNormal><span lang=EN-US> +0x034
KdVersionBlock : 0x80546b38 Void</span></p>
<p class=MsoNormal><span lang=EN-US> +0x038
IDT
: 0x8003f400 _KIDTENTRY</span></p>
<p class=MsoNormal><span lang=EN-US> +0x03c
GDT
: 0x8003f000 _KGDTENTRY</span></p>
<p class=MsoNormal><span style='font-family:宋体'>注意:第三个成员为</span><span
lang=EN-US>_KPRCB</span><span style='font-family:宋体'>结构</span></p>
<h3><a name="_Toc435300861"><span style='font-family:宋体'>如何打印系统服务表</span><span
lang=EN-US>SSDT, SSSDT?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> dps
nt!KiServiceTable l0x200</span></p>
<p class=MsoNormal><span lang=EN-US> dps
poi(KeServiceDescriptorTable) l0x200</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:</span><span lang=EN-US>SSDT</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> dps poi(KeServiceDescriptorTable)
l0x200</span></p>
<p class=MsoNormal><span lang=EN-US>80502b9c 8059a9f4
nt!NtAcceptConnectPort</span></p>
<p class=MsoNormal><span lang=EN-US>80502ba0 805e7e74 nt!NtAccessCheck</span></p>
<p class=MsoNormal><span lang=EN-US>80502ba4 805eb6ba
nt!NtAccessCheckAndAuditAlarm</span></p>
<p class=MsoNormal><span lang=EN-US>80502ba8 805e7ea6
nt!NtAccessCheckByType</span></p>
<p class=MsoNormal><span lang=EN-US>80502bac 805eb6f4
nt!NtAccessCheckByTypeAndAuditAlarm</span></p>
<p class=MsoNormal><span lang=EN-US>80502bb0 805e7edc
nt!NtAccessCheckByTypeResultList</span></p>
<p class=MsoNormal><span lang=EN-US>80502bb4 805eb738
nt!NtAccessCheckByTypeResultListAndAuditAlarm</span></p>
<p class=MsoNormal><span lang=EN-US>80502bb8 805eb77c
nt!NtAccessCheckByTypeResultListAndAuditAlarmByHandle</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoListParagraph style='margin-left:32.15pt;text-indent:-18.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
</span></span><span style='font-family:宋体'>获取</span><span lang=EN-US>csrss</span><span
style='font-family:宋体'>进程对象</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !process 0 0 csrss.exe</span></p>
<p class=MsoNormal><span lang=EN-US>Failed to get VAD root</span></p>
<p class=MsoNormal><span lang=EN-US>PROCESS 82015878 SessionId: 0
Cid: 02a4 Peb: 7ffd8000 ParentCid: 0264</span></p>
<p class=MsoNormal><span lang=EN-US> DirBase: 14700060
ObjectTable: e1672920 HandleCount: 482.</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>Image: csrss.exe</span></p>
<p class=MsoListParagraph style='margin-left:32.15pt;text-indent:-18.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>
</span></span><span style='font-family:宋体'>将该进程设置为当前上下文</span></p>
<p class=MsoNormal><span lang=EN-US>kd> .process 82015878</span></p>
<p class=MsoNormal><span lang=EN-US>Implicit process is now 82015878</span></p>
<p class=MsoNormal><span lang=EN-US>WARNING: .cache forcedecodeuser is not
enabled</span></p>
<p class=MsoListParagraph style='margin-left:32.15pt;text-indent:-18.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>
</span></span><span style='font-family:宋体'>读取</span><span lang=EN-US>sssdt</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:</span><span lang=EN-US>SSSDT</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> dps
poi(nt!KeServiceDescriptorTableShadow+0x10)</span></p>
<p class=MsoNormal><span lang=EN-US>bf99ce80 bf937330
win32k!NtGdiAbortDoc</span></p>
<p class=MsoNormal><span lang=EN-US>bf99ce84 bf9489d2
win32k!NtGdiAbortPath</span></p>
<p class=MsoNormal><span lang=EN-US>bf99ce88 bf882d2f
win32k!NtGdiAddFontResourceW</span></p>
<p class=MsoNormal><span lang=EN-US>bf99ce8c bf94054d
win32k!NtGdiAddRemoteFontToDC</span></p>
<p class=MsoNormal><span lang=EN-US>bf99ce90 bf949fe9 win32k!NtGdiAddFontMemResourceEx</span></p>
<p class=MsoNormal><span lang=EN-US>bf99ce94 bf9375c4
win32k!NtGdiRemoveMergeFont</span></p>
<p class=MsoNormal><span lang=EN-US>bf99ce98 bf937669
win32k!NtGdiAddRemoteMMInstanceToDC</span></p>
<p class=MsoNormal><span lang=EN-US>bf99ce9c bf83affa
win32k!NtGdiAlphaBlend</span></p>
<p class=MsoNormal><span lang=EN-US>bf99cea0 bf949910
win32k!NtGdiAngleArc</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<h3><a name="_Toc435300862"><span style='font-family:宋体'>如何打印用户态回调表</span><span
lang=EN-US>KernelCallbackTable?</span></a></h3>
<p class=MsoListParagraph style='margin-left:32.15pt;text-indent:-18.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
</span></span><span style='font-family:宋体'>获取</span><span lang=EN-US>csrss</span><span
style='font-family:宋体'>进程对象</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !process 0 0 csrss.exe</span></p>
<p class=MsoNormal><span lang=EN-US>Failed to get VAD root</span></p>
<p class=MsoNormal><span lang=EN-US>PROCESS 82015878 SessionId: 0
Cid: 02a4 Peb: 7ffd8000 ParentCid: 0264</span></p>
<p class=MsoNormal><span lang=EN-US> DirBase: 14700060
ObjectTable: e1672920 HandleCount: 482.</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>Image: csrss.exe</span></p>
<p class=MsoListParagraph style='margin-left:32.15pt;text-indent:-18.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>
</span></span><span style='font-family:宋体'>将该进程设置为当前上下文</span></p>
<p class=MsoNormal><span lang=EN-US>kd> .process 82015878</span></p>
<p class=MsoNormal><span lang=EN-US>Implicit process is now 82015878</span></p>
<p class=MsoNormal><span lang=EN-US>WARNING: .cache forcedecodeuser is not
enabled</span></p>
<p class=MsoListParagraph style='margin-left:32.15pt;text-indent:-18.0pt'><span
lang=EN-US>3.<span style='font:7.0pt "Times New Roman"'>
</span></span><span style='font-family:宋体'>加载用户态模块</span><span lang=EN-US>user32.dll</span></p>
<p class=MsoNormal><span lang=EN-US>kd> .reload</span></p>
<p class=MsoNormal><span lang=EN-US>Connected to Windows XP 2600 x86 compatible
target at (Sun Nov 8 22:55:03.842 2015 (UTC + 8:00)), ptr64 FALSE</span></p>
<p class=MsoNormal><span lang=EN-US>Loading Kernel Symbols</span></p>
<p class=MsoNormal><span lang=EN-US>...............................................................</span></p>
<p class=MsoNormal><span lang=EN-US>................................................................</span></p>
<p class=MsoNormal><span lang=EN-US>...............</span></p>
<p class=MsoNormal><span lang=EN-US>Loading User Symbols</span></p>
<p class=MsoNormal><span lang=EN-US>..............</span></p>
<p class=MsoNormal><span lang=EN-US>Loading unloaded module list</span></p>
<p class=MsoNormal><span lang=EN-US>.............</span></p>
<p class=MsoListParagraph style='margin-left:32.15pt;text-indent:-18.0pt'><span
lang=EN-US>4.<span style='font:7.0pt "Times New Roman"'>
</span></span><span style='font-family:宋体'>从</span><span lang=EN-US>user32.dll</span><span
style='font-family:宋体'>获取符号</span></p>
<p class=MsoNormal><span lang=EN-US>kd> x user32!*apfnDispatch*</span></p>
<p class=MsoNormal><span lang=EN-US>77d12970 USER32!apfnDispatch
= <no type information></span></p>
<p class=MsoNormal><span lang=EN-US>kd> dds apfnDispatch</span></p>
<p class=MsoNormal><span lang=EN-US>77d12970 77d27f3c USER32!__fnCOPYDATA</span></p>
<p class=MsoNormal><span lang=EN-US>77d12974 77d587b3
USER32!__fnCOPYGLOBALDATA</span></p>
<p class=MsoNormal><span lang=EN-US>77d12978 77d28ec8 USER32!__fnDWORD</span></p>
<p class=MsoNormal><span lang=EN-US>77d1297c 77d2b149
USER32!__fnNCDESTROY</span></p>
<p class=MsoNormal><span lang=EN-US>77d12980 77d5876c USER32!__fnDWORDOPTINLPMSG</span></p>
<p class=MsoNormal><span lang=EN-US>77d12984 77d5896d
USER32!__fnINOUTDRAG</span></p>
<p class=MsoNormal><span lang=EN-US>77d12988 77d3b84d
USER32!__fnGETTEXTLENGTHS</span></p>
<p class=MsoNormal><span lang=EN-US>77d1298c 77d58c42
USER32!__fnINCNTOUTSTRING</span></p>
<p class=MsoNormal><span lang=EN-US>77d12990 77d285c1
USER32!__fnINCNTOUTSTRINGNULL</span></p>
<p class=MsoNormal><span lang=EN-US>77d12994 77d58b0f
USER32!__fnINLPCOMPAREITEMSTRUCT</span></p>
<p class=MsoNormal><span lang=EN-US>77d12998 77d2ce26
USER32!__fnINLPCREATESTRUCT</span></p>
<p class=MsoNormal><span lang=EN-US>77d1299c 77d58b4d
USER32!__fnINLPDELETEITEMSTRUCT</span></p>
<p class=MsoNormal><span lang=EN-US>77d129a0 77d4feec
USER32!__fnINLPDRAWITEMSTRUCT</span></p>
<p class=MsoNormal><span lang=EN-US>77d129a4 77d58b8b
USER32!__fnINLPHELPINFOSTRUCT</span></p>
<p class=MsoNormal><span lang=EN-US>77d129a8 77d58b8b
USER32!__fnINLPHELPINFOSTRUCT</span></p>
<h3><a name="_Toc435300863"><span style='font-family:宋体'>如何查看系统中断表?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!idt
[</span><span style='font-family:宋体'>中断号</span><span lang=EN-US>] </span><span
style='font-family:宋体'>输出所有可用中断号</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !idt -a</span></p>
<p class=MsoNormal><span lang=EN-US>Dumping IDT: 8003f400</span></p>
<p class=MsoNormal><span lang=EN-US>287937b900000000: 8053f1ac
nt!KiTrap00</span></p>
<p class=MsoNormal><span lang=EN-US>287937b900000001: 8053f324
nt!KiTrap01</span></p>
<p class=MsoNormal><span lang=EN-US>287937b900000002: Task
Selector = 0x0000</span></p>
<p class=MsoNormal><span lang=EN-US>287937b900000003: 8053f6f4
nt!KiTrap03</span></p>
<p class=MsoNormal><span lang=EN-US>287937b900000004: 8053f874
nt!KiTrap04</span></p>
<p class=MsoNormal><span lang=EN-US>287937b900000005: 8053f9d0
nt!KiTrap05</span></p>
<p class=MsoNormal><span lang=EN-US>287937b900000006: 8053fb44
nt!KiTrap06</span></p>
<p class=MsoNormal><span lang=EN-US>287937b900000007: 805401ac
nt!KiTrap07</span></p>
<p class=MsoNormal><span lang=EN-US>287937b900000029: 00000000
</span></p>
<p class=MsoNormal><span lang=EN-US>287937b90000002a: 8053e9ee
nt!KiGetTickCount</span></p>
<p class=MsoNormal><span lang=EN-US>287937b90000002b: 8053eaf0
nt!KiCallbackReturn</span></p>
<p class=MsoNormal><span lang=EN-US>287937b90000002c: 8053ec90
nt!KiSetLowWaitHighThread</span></p>
<p class=MsoNormal><span lang=EN-US>287937b90000002d: 8053f5d0
nt!KiDebugService</span></p>
<p class=MsoNormal><span lang=EN-US>287937b90000002e: 8053e491
nt!KiSystemService</span></p>
<p class=MsoNormal><span lang=EN-US>287937b90000002f: 80541790
nt!KiTrap0F</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<h3><a name="_Toc435300864"><span style='font-family:宋体'>如何查看指定地址所属模块?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>lm a
</span><span style='font-family:宋体'>地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> lm m ntdll</span></p>
<p class=MsoNormal><span lang=EN-US>Browse full module list</span></p>
<p class=MsoNormal><span lang=EN-US>start
end module name</span></p>
<p class=MsoNormal><span lang=EN-US>7c920000 7c9b6000
ntdll (pdb
symbols)
e:\symbol\ntdll.pdb\99192024C5EB4830AC602195086637082\ntdll.pdb</span></p>
<p class=MsoNormal><span lang=EN-US>kd> lm a 7c920010</span></p>
<p class=MsoNormal><span lang=EN-US>Browse full module list</span></p>
<p class=MsoNormal><span lang=EN-US>start
end module name</span></p>
<p class=MsoNormal><span lang=EN-US>7c920000 7c9b6000
ntdll (pdb
symbols)
e:\symbol\ntdll.pdb\99192024C5EB4830AC602195086637082\ntdll.pdb</span></p>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection14 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300865"><span style='font-family:宋体'>句柄和对象</span></a></h2>
<h3><a name="_Toc435300866"><span style='font-family:宋体'>如何根据</span> </a><span
style='font-family:宋体'>基址、名称获取对象</span><span lang=EN-US>(OBJECT)</span><span
style='font-family:宋体'>信息?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> !object
</span><span style='font-family:宋体'>对象地址</span></p>
<p class=MsoNormal><span lang=EN-US> !object
</span><span style='font-family:宋体'>对象路径</span><span lang=EN-US> </span><span
style='font-family:宋体'>对象路径可以对照</span><span lang=EN-US>winobj</span><span
style='font-family:宋体'>对象目录结构</span></p>
<p class=MsoNormal><span lang=EN-US> !object
</span><span style='font-family:宋体'>对象类型名</span><span lang=EN-US> Driver
Device Directory Port Key SymbolicLink Event WaitablePort File.....</span><span
style='font-family:宋体'>需要设置</span><span lang=EN-US>gflag</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !object e100a478</span></p>
<p class=MsoNormal><span lang=EN-US>Object: e100a478 Type: (821ed420)
Directory</span></p>
<p class=MsoNormal><span lang=EN-US> ObjectHeader: e100a460
(old version)</span></p>
<p class=MsoNormal><span lang=EN-US> HandleCount: 0
PointerCount: 7</span></p>
<p class=MsoNormal><span lang=EN-US> Directory Object:
e10010e0 Name: ArcName</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !object \</span></p>
<p class=MsoNormal><span lang=EN-US>Object: e10010e0 Type: (821ed420)
Directory</span></p>
<p class=MsoNormal><span lang=EN-US> ObjectHeader: e10010c8
(old version)</span></p>
<p class=MsoNormal><span lang=EN-US> HandleCount: 0
PointerCount: 40</span></p>
<p class=MsoNormal><span lang=EN-US> Directory Object:
00000000 Name: \</span></p>
<p class=MsoNormal><span lang=EN-US> 126 symbolic links
snapped through this directory</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> Hash Address
Type
Name</span></p>
<p class=MsoNormal><span lang=EN-US> ---- -------
----
----</span></p>
<p class=MsoNormal><span lang=EN-US> 00 e100a478
Directory
ArcName</span></p>
<p class=MsoNormal><span lang=EN-US>
8213b5a8
Device
Ntfs</span></p>
<p class=MsoNormal><span lang=EN-US> 01 e13af030
Port
SeLsaCommandPort</span></p>
<p class=MsoNormal><span lang=EN-US> 02 820b9738
Device
FatCdrom</span></p>
<p class=MsoNormal><span lang=EN-US> 03 e1011490
Key
\REGISTRY</span></p>
<p class=MsoNormal><span lang=EN-US> 05 e14ef870
Port
ThemeApiPort</span></p>
<p class=MsoNormal><span lang=EN-US> 06 e2385460
Port
XactSrvLpcPort</span></p>
<p class=MsoNormal><span lang=EN-US> 09 e152a490
Directory NLS</span></p>
<p class=MsoNormal><span lang=EN-US> 10 e1008660
SymbolicLink
DosDevices</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !object \Driver</span></p>
<p class=MsoNormal><span lang=EN-US>Object: e12bf480 Type: (821ed420)
Directory</span></p>
<p class=MsoNormal><span lang=EN-US> ObjectHeader: e12bf468
(old version)</span></p>
<p class=MsoNormal><span lang=EN-US> HandleCount: 0
PointerCount: 83</span></p>
<p class=MsoNormal><span lang=EN-US> Directory Object:
e10010e0 Name: Driver</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> Hash Address
Type
Name</span></p>
<p class=MsoNormal><span lang=EN-US> ---- -------
----
----</span></p>
<p class=MsoNormal><span lang=EN-US> 00 81c051f8
Driver
Beep</span></p>
<p class=MsoNormal><span lang=EN-US>
8213b2a8
Driver
NDIS</span></p>
<p class=MsoNormal><span lang=EN-US>
81e45a08
Driver
KSecDD</span></p>
<p class=MsoNormal><span lang=EN-US> 01 81d5ec40
Driver
FsVga</span></p>
<p class=MsoNormal><span lang=EN-US>
81e73b10
Driver
Raspti</span></p>
<p class=MsoNormal><span lang=EN-US>
81cb9610
Driver
es1371</span></p>
<p class=MsoNormal><span lang=EN-US>
81cb9498
Driver
Mouclass</span></p>
<p class=MsoNormal><span lang=EN-US> 02 81d5e898
Driver
vmx_svga</span></p>
<p class=MsoNormal><span lang=EN-US> 03 81ce5030
Driver
Fips</span></p>
<p class=MsoNormal><span lang=EN-US>
81c35880
Driver
Kbdclass</span></p>
<p class=MsoNormal><span lang=EN-US> 04 81ee86e8
Driver
VgaSave</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !object \Device</span></p>
<p class=MsoNormal><span lang=EN-US>Object: e100d748 Type: (821ed420)
Directory</span></p>
<p class=MsoNormal><span lang=EN-US> ObjectHeader: e100d730
(old version)</span></p>
<p class=MsoNormal><span lang=EN-US> HandleCount: 0
PointerCount: 274</span></p>
<p class=MsoNormal><span lang=EN-US> Directory Object:
e10010e0 Name: Device</span></p>
<p class=MsoNormal><span lang=EN-US> 11 symbolic links
snapped through this directory</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> Hash Address
Type
Name</span></p>
<p class=MsoNormal><span lang=EN-US> ---- -------
---- ----</span></p>
<p class=MsoNormal><span lang=EN-US> 00 81fd59e8
Device
KsecDD</span></p>
<p class=MsoNormal><span lang=EN-US>
8213a030
Device
Ndis</span></p>
<p class=MsoNormal><span lang=EN-US>
81fbaa98
Device
Beep</span></p>
<p class=MsoNormal><span lang=EN-US>
e13c3ac8
SymbolicLink
ScsiPort2</span></p>
<p class=MsoNormal><span lang=EN-US>
821e7850 Device 00000032</span></p>
<p class=MsoNormal><span lang=EN-US>
821e8610
Device
00000025</span></p>
<p class=MsoNormal><span lang=EN-US>
821e92b0
Device
00000019</span></p>
<p class=MsoNormal><span lang=EN-US> 01 81e44060
Device
Netbios</span></p>
<p class=MsoNormal><span lang=EN-US>
821e7610
Device
00000033</span></p>
<p class=MsoNormal><span lang=EN-US>
821e83d0 Device 00000026</span></p>
<p class=MsoNormal><span lang=EN-US> 02 81c2ff18
Device
Ip</span></p>
<p class=MsoNormal><span lang=EN-US>
81c6e5d0
Device
KSENUM#000</span></p>
<h3><a name="_Toc435300867"><span style='font-family:宋体'>如何查看驱动对象、设备对象、文件对象信息?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!drvobj
[</span><span style='font-family:宋体'>对象基址</span><span lang=EN-US>] !devobj
[</span><span style='font-family:宋体'>对象基址</span><span lang=EN-US>] !fileobj
[</span><span style='font-family:宋体'>对象基址</span><span lang=EN-US>] </span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<h3><a name="_Toc435300868"><span style='font-family:宋体'>如何根据句柄获取对象信息?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!handle
[</span><span style='font-family:宋体'>句柄</span><span lang=EN-US> [</span><span
style='font-family:宋体'>标志位</span><span lang=EN-US> [PEPROCESS [</span><span
style='font-family:宋体'>类型名</span><span lang=EN-US>]]]]</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span style='font-family:宋体'>获取对象基址</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !handle 00cc</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>Failed to get VAD root</span></p>
<p class=MsoNormal><span lang=EN-US>PROCESS 81bf9ba0 SessionId: 0
Cid: 0c44 Peb: 7ffdb000 ParentCid: 0884</span></p>
<p class=MsoNormal><span lang=EN-US> DirBase: 14700820
ObjectTable: e17d6430 HandleCount: 169.</span></p>
<p class=MsoNormal><span lang=EN-US> Image: 360Safe.exe</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>Handle table at e17d6430 with 169 entries
in use</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>00cc: Object: e1604668 GrantedAccess:
00020019 Entry: e118e198</span></p>
<p class=MsoNormal><span lang=EN-US>Object: e1604668 Type: (821b2708) Key</span></p>
<p class=MsoNormal><span lang=EN-US> ObjectHeader: e1604650
(old version)</span></p>
<p class=MsoNormal><span lang=EN-US>
HandleCount: 1 PointerCount: 1</span></p>
<p class=MsoNormal><span lang=EN-US>
Directory Object: 00000000 Name:
\REGISTRY\MACHINE\SYSTEM\CONTROLSET001\CONTROL\NLS\LOCALE\ALTERNATE SORTS</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>因为是</span><span lang=EN-US>Key</span><span
style='font-family:宋体'>类型,对应结构为</span><span lang=EN-US>_CM_KEY_BODY</span></p>
<p class=MsoNormal><span lang=EN-US>kd> dt _CM_KEY_BODY e1604668</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_CM_KEY_BODY</span></p>
<p class=MsoNormal><span lang=EN-US> +0x000
Type :
0x6b793032</span></p>
<p class=MsoNormal><span lang=EN-US> +0x004 KeyControlBlock :
0xe13f6698 _CM_KEY_CONTROL_BLOCK</span></p>
<p class=MsoNormal><span lang=EN-US> +0x008
NotifyBlock : (null) </span></p>
<p class=MsoNormal><span lang=EN-US> +0x00c
ProcessID : 0x00000c44 Void</span></p>
<p class=MsoNormal><span lang=EN-US> +0x010
Callers : 0</span></p>
<p class=MsoNormal><span lang=EN-US> +0x014
CallerAddress : 0x004f0053 Void</span></p>
<p class=MsoNormal><span lang=EN-US> +0x03c
KeyBodyList : _LIST_ENTRY [ 0xe13f66c8 -
0xe182860c ]</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>注意:</span><span lang=EN-US>!handle</span><span
style='font-family:宋体'>会显示所有进程所有句柄</span></p>
<h3><a name="_Toc435300870"><span style='font-family:宋体'>如何显示所有</span><span
lang=EN-US>ObjectType</span></a><span style='font-family:宋体'>类型名?</span></h3>
<p class=MsoNormal><span lang=EN-US>.foreach (addr {x /q /0 nt!*ObjectType})
{dt _object_type Name poi(${addr})}</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_OBJECT_TYPE</span></p>
<p class=MsoNormal><span lang=EN-US> +0x040 Name : _UNICODE_STRING
"SymbolicLink"</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_OBJECT_TYPE</span></p>
<p class=MsoNormal><span lang=EN-US> +0x040 Name : _UNICODE_STRING
"Semaphore"</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_OBJECT_TYPE</span></p>
<p class=MsoNormal><span lang=EN-US> +0x040 Name : _UNICODE_STRING
"Controller"</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_OBJECT_TYPE</span></p>
<p class=MsoNormal><span lang=EN-US> +0x040 Name : _UNICODE_STRING
"Key"</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_OBJECT_TYPE</span></p>
<p class=MsoNormal><span lang=EN-US> +0x040 Name : _UNICODE_STRING
"EventPair"</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_OBJECT_TYPE</span></p>
<p class=MsoNormal><span lang=EN-US> +0x040 Name : _UNICODE_STRING
"DebugObject"</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_OBJECT_TYPE</span></p>
<p class=MsoNormal><span lang=EN-US> +0x040 Name : _UNICODE_STRING
"Desktop"</span></p>
<p class=MsoNormal><span lang=EN-US>nt!_OBJECT_TYPE</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>ObpTypeObjectType</span><span
style='font-family:宋体'>链表</span></p>
<p class=MsoNormal><span style='font-family:宋体'>。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection15 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300871"><span style='font-family:宋体'>注册表信息</span></a></h2>
<h3><a name="_Toc435300872"><span style='font-family:宋体'>如何查看注册表项键值?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!dreg</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>!dreg
System\CurrentControlSet\Services\Tcpip!*</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!reg</span></p>
<p class=MsoNormal><span lang=EN-US>.......................</span></p>
<p class=MsoNormal><span lang=EN-US>............................</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!regkcb</span></p>
<p class=MsoNormal><span lang=EN-US>.........................</span></p>
<p class=MsoNormal><span lang=EN-US>................................</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection16 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300873"><span style='font-family:宋体'>内存操作</span></a></h2>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!db,
!dc, !dd, !dp, !dq, !du, !dw </span><span style='font-family:宋体'>分别按不同类型读取物理内存</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>db,
dc, dd, dp, dq, du, dw </span><span style='font-family:宋体'>分别按不同类型读取虚拟内存</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>用户态</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> dds l[</span><span
style='font-family:宋体'>元素个数</span><span lang=EN-US>] </span><span
style='font-family:宋体'>作为</span><span lang=EN-US>4</span><span
style='font-family:宋体'>字节地址数组打印</span></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt'><span
lang=EN-US>dqs l[</span><span style='font-family:宋体'>元素个数</span><span
lang=EN-US>] </span><span style='font-family:宋体'>作为</span><span lang=EN-US>8</span><span
style='font-family:宋体'>字节地址数组打印</span></p>
<p class=MsoNormal style='margin-left:21.0pt;text-indent:21.0pt'><span
lang=EN-US>dps l[</span><span style='font-family:宋体'>元素个数</span><span
lang=EN-US>] </span><span style='font-family:宋体'>根据指针大小自动判断</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>用户态</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span style='font-family:宋体'>读取虚拟地址</span></p>
<p class=MsoNormal><span lang=EN-US>kd> db f8da6000 </span></p>
<p class=MsoNormal><span lang=EN-US>f8da6000 4d 5a 90 00 03 00 00 00-04
00 00 00 ff ff 00 00 MZ..............</span></p>
<p class=MsoNormal><span lang=EN-US>f8da6010 b8 00 00 00 00 00 00 00-40
00 00 00 00 00 00 00 ........@.......</span></p>
<p class=MsoNormal><span lang=EN-US>f8da6020 00 00 00 00 00 00 00 00-00
00 00 00 00 00 00 00 ................</span></p>
<p class=MsoNormal><span lang=EN-US>f8da6030 00 00 00 00 00 00 00 00-00
00 00 00 d0 00 00 00 ................</span></p>
<p class=MsoNormal><span lang=EN-US>f8da6040 0e 1f ba 0e 00 b4 09 cd-21
b8 01 4c cd 21 54 68 ........!..L.!Th</span></p>
<p class=MsoNormal><span lang=EN-US>f8da6050 69 73 20 70 72 6f 67 72-61
6d 20 63 61 6e 6e 6f is program canno</span></p>
<p class=MsoNormal><span lang=EN-US>f8da6060 74 20 62 65 20 72 75 6e-20
69 6e 20 44 4f 53 20 t be run in DOS </span></p>
<p class=MsoNormal><span lang=EN-US>f8da6070 6d 6f 64 65 2e 0d 0d 0a-24
00 00 00 00 00 00 00 mode....$.......</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>由虚拟地址转换物理地址</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !pte f8da6000 </span></p>
<p class=MsoNormal><span lang=EN-US>
VA f8da6000</span></p>
<p class=MsoNormal><span lang=EN-US>PDE at
C0603E30 PTE
at C07C6D30</span></p>
<p class=MsoNormal><span lang=EN-US>contains 0000000001034163 contains
0000000007FB9163</span></p>
<p class=MsoNormal><span lang=EN-US>pfn 1034
-G-DA--KWEV pfn 7fb9 -G-DA--KWEV</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>读取物理地址</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !db 7FB9000</span></p>
<p class=MsoNormal><span lang=EN-US># 7fb9000 4d 5a 90 00 03 00 00 00-04 00 00
00 ff ff 00 00 MZ..............</span></p>
<p class=MsoNormal><span lang=EN-US># 7fb9010 b8 00 00 00 00 00 00 00-40 00 00
00 00 00 00 00 ........@.......</span></p>
<p class=MsoNormal><span lang=EN-US># 7fb9020 00 00 00 00 00 00 00 00-00 00 00
00 00 00 00 00 ................</span></p>
<p class=MsoNormal><span lang=EN-US># 7fb9030 00 00 00 00 00 00 00 00-00 00 00
00 d0 00 00 00 ................</span></p>
<p class=MsoNormal><span lang=EN-US># 7fb9040 0e 1f ba 0e 00 b4 09 cd-21 b8 01
4c cd 21 54 68 ........!..L.!Th</span></p>
<p class=MsoNormal><span lang=EN-US># 7fb9050 69 73 20 70 72 6f 67 72-61 6d 20
63 61 6e 6e 6f is program canno</span></p>
<p class=MsoNormal><span lang=EN-US># 7fb9060 74 20 62 65 20 72 75 6e-20 69 6e
20 44 4f 53 20 t be run in DOS </span></p>
<p class=MsoNormal><span lang=EN-US># 7fb9070 6d 6f 64 65 2e 0d 0d 0a-24 00 00
00 00 00 00 00 mode....$.......</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>可以看出,内容是相同的</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!eb,
!ed </span><span style='font-family:宋体'>分别按不同类型写入物理内存</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态调试</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>e,
ea, eb, ed, eD, ef, ep, eq, eu, ew, eza </span><span style='font-family:宋体'>分别按不同类型写入虚拟内存</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>用户态调试</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span style='font-family:宋体'>写入字节:</span><span lang=EN-US>eb
f8da6000 90 90 90 90 90</span></p>
<p class=MsoNormal><span style='font-family:宋体'>写入字符串:</span><span lang=EN-US>ea
f8da6000 "my ass" eu
f8da6000 "my ass"</span></p>
<h3><a name="_Toc435300874"><span style='font-family:宋体'>查看物理内存使用</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!memusage</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !memusage</span></p>
<p class=MsoNormal><span lang=EN-US> loading PFN database</span></p>
<p class=MsoNormal><span lang=EN-US>loading (100% complete)</span></p>
<p class=MsoNormal><span lang=EN-US>Compiling memory usage data (99% Complete).</span></p>
<p class=MsoNormal><span lang=EN-US>
Zeroed: 40657 (162628 kb)</span></p>
<p class=MsoNormal><span lang=EN-US>
Free: 3646 ( 14584 kb)</span></p>
<p class=MsoNormal><span lang=EN-US>
Standby: 54142 (216568 kb)</span></p>
<p class=MsoNormal><span lang=EN-US>
Modified: 957 ( 3828 kb)</span></p>
<p class=MsoNormal><span lang=EN-US>
ModifiedNoWrite: 0 ( 0
kb)</span></p>
<p class=MsoNormal><span lang=EN-US>
Active/Valid: 31555 (126220 kb)</span></p>
<p class=MsoNormal><span lang=EN-US>
Transition: 0 ( 0 kb)</span></p>
<p class=MsoNormal><span lang=EN-US>
SLIST/Bad: 0 ( 0 kb)</span></p>
<p class=MsoNormal><span lang=EN-US>
Unknown: 0 ( 0 kb)</span></p>
<p class=MsoNormal><span lang=EN-US>
TOTAL: 130957 (523828 kb)</span></p>
<p class=MsoNormal><span lang=EN-US> Building kernel map</span></p>
<p class=MsoNormal><span lang=EN-US> Finished building kernel map</span></p>
<p class=MsoNormal><span lang=EN-US>Scanning PFN database - (100% complete) </span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> Usage Summary (in Kb):</span></p>
<p class=MsoNormal><span lang=EN-US>Control Valid Standby Dirty Shared Locked
PageTables name</span></p>
<p class=MsoNormal><span lang=EN-US>8164b4a0 12
0 0 0
0 0 mapped_file( qqpcrtp_qmhipspolicyeng.log )</span></p>
<p class=MsoNormal><span lang=EN-US>820b7d38
148 24
0 4 0
0 mapped_file( SysEvent.Evt )</span></p>
<p class=MsoNormal><span lang=EN-US>820f6728
332 0
0 0 0
0 mapped_file( $LogFile )</span></p>
<p class=MsoNormal><span lang=EN-US>81fe7d78
4 0
0 0 0
0 mapped_file( $MftMirr )</span></p>
<p class=MsoNormal><span lang=EN-US>81f98ae0 3956
1352 0
0 0 0 mapped_file( $Mft )</span></p>
<p class=MsoNormal><span lang=EN-US>8208f160
640 0
0 0 0
0 mapped_file( $BitMap )</span></p>
<p class=MsoNormal><span lang=EN-US>81e46098
4 0
0 0 0
0 mapped_file( $Mft )</span></p>
<p class=MsoNormal><span lang=EN-US>81e462a8 12
0 0 0
0 0 mapped_file( $Directory )</span></p>
<p class=MsoNormal><span lang=EN-US>81c63208
0 8
0 0 0
0 mapped_file( No name for file )</span></p>
<p class=MsoNormal><span lang=EN-US>81e46ae0
4 0
0 0 0
0 mapped_file( $Directory )</span></p>
<p class=MsoNormal><span lang=EN-US>821e3090
32 0
0 0 0 0
mapped_file( No name for file )</span></p>
<p class=MsoNormal><span lang=EN-US>81c63270
16 0
0 0 0
0 mapped_file( $Directory )</span></p>
<p class=MsoNormal><span lang=EN-US>81cf0230
328 0
0 0 0
0 mapped_file( $Directory )</span></p>
<p class=MsoNormal><span lang=EN-US>8219d4a8
304 72 0
276 0 0 mapped_file(
ntdll.dll )</span></p>
<h3><a name="_Toc435300875"><span style='font-family:宋体'>查看虚拟内存使用</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!vm</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !vm</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>*** Virtual Memory Usage ***</span></p>
<p class=MsoNormal><span lang=EN-US> Physical
Memory: 130940 ( 523760 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> Page
File: \??\C:\pagefile.sys</span></p>
<p class=MsoNormal><span lang=EN-US>
Current: 786432 Kb Free Space: 784332
Kb</span></p>
<p class=MsoNormal><span lang=EN-US>
Minimum: 786432 Kb
Maximum: 1572864 Kb</span></p>
<p class=MsoNormal><span lang=EN-US> Available
Pages: 98445 ( 393780 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> ResAvail
Pages: 96643 (
386572 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> Locked
IO Pages: 1105
( 4420 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> Free
System PTEs: 226165 ( 904660 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> Free
NP PTEs: 28139
( 112556 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> Free
Special NP: 0
( 0 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> Modified
Pages: 957
( 3828 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> Modified
PF Pages: 957
( 3828 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> NonPagedPool
Usage: 3481 ( 13924 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> NonPagedPool
Max: 32768 ( 131072 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> PagedPool
0 Usage: 4660 ( 18640 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> PagedPool
1 Usage: 693
( 2772 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> PagedPool
2 Usage: 712
( 2848 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> PagedPool
Usage: 6065 (
24260 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> PagedPool
Maximum: 65536 ( 262144 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> Session
Commit: 526
( 2104 Kb)</span></p>
<p class=MsoNormal><span lang=EN-US> Shared
Commit: 2984
( 11936 Kb)</span></p>
<h3><a name="_Toc435300876"><span style='font-family:宋体'>如何获取</span><span
lang=EN-US>Fs:</span></a><span style='font-family:宋体'>所在地址?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>dg </span><span
style='font-family:宋体'>段选择子</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> dg @fs</span></p>
<p class=MsoNormal><span lang=EN-US>
P Si Gr Pr Lo</span></p>
<p class=MsoNormal><span lang=EN-US>Sel
Base Limit
Type l ze an es ng Flags</span></p>
<p class=MsoNormal><span lang=EN-US>---- -------- -------- ---------- - -- --
-- -- --------</span></p>
<p class=MsoNormal><span lang=EN-US>0053 7fe6f000 00000fff Data RW Ac 3 Bg By
P Nl 000004f3</span></p>
<h3><a name="_Toc435300877"><span style='font-family:宋体'>如何查看某虚拟内存地址对应的物理内存地址?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!pte
</span><span style='font-family:宋体'>虚拟地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>获取</span><span lang=EN-US>page table entry (PTE) </span><span
style='font-family:宋体'>和</span><span lang=EN-US>page directory entry (PDE)</span><span
style='font-family:宋体'>信息</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !pte 804d8000</span></p>
<p class=MsoNormal><span lang=EN-US>
VA 804d8000</span></p>
<p class=MsoNormal><span lang=EN-US>PDE at
C0602010 PTE
at C04026C0</span></p>
<p class=MsoNormal><span lang=EN-US>contains 0000000000AEE023 contains
00000000004D8063</span></p>
<p class=MsoNormal><span lang=EN-US>pfn aee
----A--KWEV pfn 4d8 ---DA—KWEV</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> !vtop
PFN </span><span style='font-family:宋体'>虚拟地址</span></p>
<p class=MsoNormal><span lang=EN-US> !vtop
0 </span><span style='font-family:宋体'>虚拟地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>使用当前进程</span><span lang=EN-US>PFN</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !process 0 0</span></p>
<p class=MsoNormal><span lang=EN-US>**** NT ACTIVE PROCESS DUMP ****</span></p>
<p class=MsoNormal><span lang=EN-US>....</span></p>
<p class=MsoNormal><span lang=EN-US>PROCESS ff779190 SessionId: 0
Cid: 04fc Peb: 7ffdf000 ParentCid: 0394</span></p>
<p class=MsoNormal><span lang=EN-US> DirBase: 098fd000 ObjectTable:
e1646b30 TableSize: 8.</span></p>
<p class=MsoNormal><span lang=EN-US> Image: MyApp.exe</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !vtop 98fd 12f980</span></p>
<p class=MsoNormal><span lang=EN-US>Pdi 0 Pti 12f</span></p>
<p class=MsoNormal><span lang=EN-US>0012f980 09de9000 pfn(09de9)</span></p>
<h3><a name="_Toc435300878"><span style='font-family:宋体'>如何查看某物理内存地址对应的虚拟内存地址?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!pte2va
PTE</span><span style='font-family:宋体'>地址</span><span lang=EN-US> </span><span
style='font-family:宋体'>查看</span><span lang=EN-US>PTE</span><span
style='font-family:宋体'>对应虚拟内存基址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !pte2va C04026C0</span></p>
<p class=MsoNormal><span lang=EN-US>804d8000</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!ptov
DirBase </span><span
style='font-family:宋体'>查看某进程物理内存到虚拟内存映射表</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>1: kd> .process</span></p>
<p class=MsoNormal><span lang=EN-US>Implicit process is now 852b4040</span></p>
<p class=MsoNormal><span lang=EN-US>1: kd> !process 852b4040 1</span></p>
<p class=MsoNormal><span lang=EN-US>PROCESS 852b4040 SessionId:
none Cid: 0004 Peb: 00000000 ParentCid: 0000</span></p>
<p class=MsoNormal><span lang=EN-US> DirBase: 00185000
ObjectTable: 83203000 HandleCount: 663.</span></p>
<p class=MsoNormal><span lang=EN-US> Image: System</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>...</span></p>
<p class=MsoNormal><span lang=EN-US>1: kd> !ptov 185000</span></p>
<p class=MsoNormal><span lang=EN-US>X86PtoV: pagedir 185000, PAE enabled.</span></p>
<p class=MsoNormal><span lang=EN-US>15e11000 10000</span></p>
<p class=MsoNormal><span lang=EN-US>549e6000 20000</span></p>
<p class=MsoNormal><span lang=EN-US>...</span></p>
<p class=MsoNormal><span lang=EN-US>60a000 210000</span></p>
<p class=MsoNormal><span lang=EN-US>40b000 211000</span></p>
<p class=MsoNormal><span lang=EN-US>...</span></p>
<p class=MsoNormal><span lang=EN-US>54ad3000 25f000</span></p>
<p class=MsoNormal><span lang=EN-US>548d3000 260000</span></p>
<p class=MsoNormal><span lang=EN-US>...</span></p>
<p class=MsoNormal><span lang=EN-US>d71000 77510000</span></p>
<p class=MsoNormal><span lang=EN-US>...</span></p>
<h3><a name="_Toc435300879"><span style='font-family:宋体'>如何查看地址所在虚拟内存位于哪个模块?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!address
</span><span style='font-family:宋体'>地址</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> !address 77c00000</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>Usage:
Image</span></p>
<p class=MsoNormal><span lang=EN-US>Base
Address: 77c00000</span></p>
<p class=MsoNormal><span lang=EN-US>End
Address:
77c01000</span></p>
<p class=MsoNormal><span lang=EN-US>Region
Size:
00001000</span></p>
<p class=MsoNormal><span lang=EN-US>State:
00001000 MEM_COMMIT</span></p>
<p class=MsoNormal><span lang=EN-US>Protect:
00000002 PAGE_READONLY</span></p>
<p class=MsoNormal><span lang=EN-US>Type:
01000000 MEM_IMAGE</span></p>
<p class=MsoNormal><span lang=EN-US>Allocation
Base: 77c00000</span></p>
<p class=MsoNormal><span lang=EN-US>Allocation Protect:
00000080 PAGE_EXECUTE_WRITECOPY</span></p>
<p class=MsoNormal><span lang=EN-US>Image
Path:
ntdll.dll</span></p>
<p class=MsoNormal><span lang=EN-US>Module
Name: ntdll</span></p>
<p class=MsoNormal><span lang=EN-US>Loaded Image
Name: C:\WINDOWS\SYSTEM32\ntdll.dll</span></p>
<p class=MsoNormal><span lang=EN-US>Mapped Image
Name: </span></p>
<p class=MsoNormal><span lang=EN-US>More info:
lmv m ntdll</span></p>
<p class=MsoNormal><span lang=EN-US>More
info:
!lmi ntdll</span></p>
<p class=MsoNormal><span lang=EN-US>More
info:
ln 0x77c00000</span></p>
<p class=MsoNormal><span lang=EN-US>More
info:
!dh 0x77c00000</span></p>
<h3><a name="_Toc435300881"><span style='font-family:宋体'>如何以固定字节模式填充内存?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>填充虚拟地址</span><span
lang=EN-US> f </span><span style='font-family:
宋体'>地址</span><span lang=EN-US> l</span><span style='font-family:宋体'>长度</span> <span
style='font-family:宋体'>字节</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>填充物理地址</span><span
lang=EN-US> fp </span><span style='font-family:
宋体'>地址</span><span lang=EN-US> l</span><span style='font-family:宋体'>长度</span> <span
style='font-family:宋体'>字节</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:</span><span lang=EN-US>f </span><span
style='font-family:宋体'>内核态</span><span lang=EN-US>/</span><span
style='font-family:宋体'>用户态</span><span lang=EN-US> fp </span><span
style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> f f8a9b05b l0x100 0x12</span></p>
<p class=MsoNormal><span lang=EN-US>Filled 0x100 bytes</span></p>
<h3><a name="_Toc435300882"><span style='font-family:宋体'>如何拷贝虚拟内存块?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>m </span><span
style='font-family:宋体'>源地址</span> <span lang=EN-US>l</span><span
style='font-family:宋体'>长度</span> <span style='font-family:宋体'>目的地址</span></p>
<h3><a name="_Toc435300883"><span style='font-family:宋体'>如何比较虚拟内存块?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>c</span><span
style='font-family:宋体'>源地址</span> <span lang=EN-US>l</span><span
style='font-family:宋体'>长度</span> <span style='font-family:宋体'>目的地址</span></p>
<h3><a name="_Toc435300884"><span style='font-family:宋体'>如何将文件内容读取到调试器内存</span><span
lang=EN-US>/</span></a><span style='font-family:宋体'>从调试器内存写入文件?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>注意这里的读写没有</span><span
lang=EN-US>pe</span><span style='font-family:宋体'>映射之类的操作,而是二进制读写</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.readmem
</span><span style='font-family:宋体'>文件路径</span><span lang=EN-US> </span><span
style='font-family:宋体'>加载基址</span><span lang=EN-US> l</span><span
style='font-family:宋体'>长度</span><span lang=EN-US> </span><span
style='font-family:宋体'>将文件内容拷贝到被调试目标内存</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.writemem
</span><span style='font-family:宋体'>文件路径</span><span lang=EN-US> </span><span
style='font-family:宋体'>加载基址</span><span lang=EN-US> l</span><span
style='font-family:宋体'>长度</span><span lang=EN-US> </span><span
style='font-family:宋体'>从调试目标内存拷贝到文件</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> .writemem 1234.bin 00000000`76eb0000
l0x20000</span></p>
<p class=MsoNormal><span lang=EN-US>Writing 20000
bytes................................................................</span></p>
<h3><a name="_Toc435300885"><span style='font-family:宋体'>如何搜索内存?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>虚拟内存</span></p>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>命令:</span><span lang=EN-US>s [-[Type]] </span><span
style='font-family:宋体'>搜索基址</span> <span style='font-family:宋体'>长度</span> <span
style='font-family:宋体'>搜索模式</span><span lang=EN-US> </span><span
style='font-family:宋体'>按给定模式搜索内存</span></p>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>命令:</span><span lang=EN-US>s -[]v </span><span
style='font-family:宋体'>搜索基址</span> <span style='font-family:宋体'>长度</span> <span
style='font-family:宋体'>对象实例</span><span lang=EN-US> </span><span
style='font-family:宋体'>搜索内存块与给定对象的类虚表相同的对象实例</span></p>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>命令:</span><span lang=EN-US>s -[]sa</span><span
style='font-family:宋体'>搜索基址</span> <span style='font-family:宋体'>长度</span><span
lang=EN-US> </span><span
style='font-family:宋体'>搜索</span><span lang=EN-US>ASCII</span><span
style='font-family:宋体'>字符串</span></p>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>命令:</span><span lang=EN-US>s -[]su</span><span
style='font-family:宋体'>搜索基址</span> <span style='font-family:宋体'>长度</span><span
lang=EN-US> </span><span
style='font-family:宋体'>搜索</span><span lang=EN-US>UNICODE</span><span
style='font-family:宋体'>字符串</span></p>
<p class=MsoNormal><span style='font-family:宋体'>物理内存</span></p>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>命令:</span><span lang=EN-US>!search </span><span
style='font-family:宋体'>目标值</span> <span lang=EN-US>[</span><span
style='font-family:宋体'>波动偏差</span> <span lang=EN-US>[</span><span
style='font-family:宋体'>起始</span><span lang=EN-US>PFN [</span><span
style='font-family:宋体'>结束</span><span lang=EN-US>PFN]]]</span></p>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>参数:目标值范围</span><span lang=EN-US>0~0xFFFFFFFFFFFFFFFF</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> db 76f63bad</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bad 6c 00 69 00 63 00 68 00-6b
00 69 00 6e 00 67 00 l.i.c.h.k.i.n.g.</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bbd 00 00 00 00 f9 ff c3 90-90
90 90 fe ff ff ff 00 ................</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bcd 24 00 7b 00 74 00 32 00-7d
00 00 00 ff ff ff b0 $.{.t.2.}.......</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bdd 3b f6 76 b4 3b f6 76 90-90
90 90 90 8b ff 55 8b ;.v.;.v.......U.</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bed ec 81 ec 3c 02 00 00 a1-50
32 fb 76 33 c5 89 45 ...<....P2.v3..E</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bfd fc 53 56 8b 35 a0 f0 fa-76
8b d9 57 6a 2a 58 66 .SV.5...v..Wj*Xf</span></p>
<p class=MsoNormal><span lang=EN-US>76f63c0d 89 85 dc fd ff ff 33 ff-89
bd ea fd ff ff 66 89 ......3.......f.</span></p>
<p class=MsoNormal><span lang=EN-US>76f63c1d bd ee fd ff ff c7 85 e0-fd
ff ff a8 b7 ef 76 c7 ..............v.</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> s -u 76f63bad l10000
"lichking"</span></p>
<p class=MsoNormal><span lang=EN-US>76f63bad 006c 0069 0063 0068 006b
0069 006e 0067 l.i.c.h.k.i.n.g.</span></p>
<h3><a name="_Toc435300887"><span style='font-family:宋体'>如何查看内存池信息?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!pool
</span><span style='font-family:宋体'>地址</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !pool e1001050 </span></p>
<p class=MsoNormal><span lang=EN-US> e1001000 size: 40
previous size: 0 (Allocated) MmDT</span></p>
<p class=MsoNormal><span lang=EN-US> e1001040 size: 10
previous size: 40 (Free)
Mm </span></p>
<p class=MsoNormal><span lang=EN-US>*e1001050 size: 10 previous
size: 10 (Allocated) *ObDi</span></p>
<p class=MsoNormal><span lang=EN-US> e1001060 size: 10
previous size: 10 (Allocated) ObDi</span></p>
<p class=MsoNormal><span lang=EN-US> e1001070 size: 10
previous size: 10 (Allocated) Symt</span></p>
<p class=MsoNormal><span lang=EN-US> e1001080 size: 40
previous size: 10 (Allocated) ObDm</span></p>
<p class=MsoNormal><span lang=EN-US> e10010c0 size: 10
previous size: 40 (Allocated) ObDi</span></p>
<h3><span style='font-family:宋体'>如何查找指定</span><span lang=EN-US>Tag</span><span
style='font-family:宋体'>的内存池?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!poolfind
Tag</span><span style='font-family:宋体'>字符串</span><span lang=EN-US>/Tag</span><span
style='font-family:宋体'>值</span><span lang=EN-US> [</span><span
style='font-family:宋体'>选项</span><span lang=EN-US>] [-x “</span><span
style='font-family:宋体'>命令</span><span lang=EN-US>”]</span></p>
<p class=MsoNormal><span style='font-family:宋体'>参数:选项</span></p>
<p class=MsoNormal><span lang=EN-US> -nonpaged </span><span
style='font-family:宋体'>非分页内存</span><span lang=EN-US> -paged </span><span
style='font-family:宋体'>分页内存</span></p>
<p class=MsoNormal><span lang=EN-US> -global </span><span
style='font-family:宋体'>全局池</span><span lang=EN-US> -session </span><span
style='font-family:宋体'>会话池</span></p>
<p class=MsoNormal><span lang=EN-US> -small -large</span></p>
<p class=MsoNormal><span lang=EN-US> -process tag</span><span
style='font-family:宋体'>值作为</span><span lang=EN-US>EPROCESS</span><span
style='font-family:宋体'>指针</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US> !poolfind
Mm*
- Find all Mm allocations in nonpaged pool.</span></p>
<p class=MsoNormal><span lang=EN-US> !poolfind MmSt
-paged - Find MmSt allocations in paged
pool.</span></p>
<p class=MsoNormal><span lang=EN-US> !poolfind Gla1
-session - Find Gla1 allocations in session pool.</span></p>
<p class=MsoNormal><span lang=EN-US> !poolfind -tag "AB
C" - Find pool tag which contains a
space.</span></p>
<p class=MsoNormal><span lang=EN-US> !poolfind -x "dt nt!_MDL
@$extret" Mdl - Find and print MDL allocations.</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>kd> !poolfind * -nonpaged</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>*** CacheSize too low - increasing to 51 MB</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>Max cache size
is : 53657600 bytes (0xccb0 KB) </span></p>
<p class=MsoNormal><span lang=EN-US>Total memory in cache : 8917
bytes (0x9 KB) </span></p>
<p class=MsoNormal><span lang=EN-US>Number of regions cached: 32</span></p>
<p class=MsoNormal><span lang=EN-US>81 full reads broken into 93 partial reads</span></p>
<p class=MsoNormal><span lang=EN-US> counts: 56 cached/37
uncached, 60.22% cached</span></p>
<p class=MsoNormal><span lang=EN-US> bytes : 4456 cached/7109
uncached, 38.53% cached</span></p>
<p class=MsoNormal><span lang=EN-US>** Transition PTEs are implicitly decoded</span></p>
<p class=MsoNormal><span lang=EN-US>** Prototype PTEs are implicitly decoded</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>Scanning large pool allocation table for
tag 0x2020202a (* ) (afc00000 : b0000000)</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>86619000 : tag XPPH, size
0x79e8, Nonpaged pool</span></p>
<p class=MsoNormal><span lang=EN-US>866209f0 : tag Frag,
size 0, Nonpaged pool</span></p>
<p class=MsoNormal><span lang=EN-US>86620a00 : tag IdeP,
size 0x600, Nonpaged pool</span></p>
<p class=MsoNormal><span lang=EN-US>87a1e000 : tag Cont, size
0xa000, Nonpaged pool</span></p>
<h3><span style='font-family:宋体'>如何查看内存池使用情况?</span></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!poolused
</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0: kd> !poolused</span></p>
<p class=MsoNormal><span lang=EN-US> Sorting by Tag</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> Pool Used:</span></p>
<p class=MsoNormal><span lang=EN-US>
NonPaged
Paged</span></p>
<p class=MsoNormal><span lang=EN-US> Tag
Allocs Used
Allocs Used</span></p>
<p class=MsoNormal><span lang=EN-US> 1394
1
520
0 0UNKNOWN pooltag '1394', please
update pooltag.txt</span></p>
<p class=MsoNormal><span lang=EN-US> 1MEM
1 3368
0 0UNKNOWN pooltag '1MEM', please
update pooltag.txt</span></p>
<p class=MsoNormal><span lang=EN-US> 2MEM
1 3944
0 0UNKNOWN pooltag '2MEM', please
update pooltag.txt</span></p>
<p class=MsoNormal><span lang=EN-US> 3MEM
3
248
0 0UNKNOWN pooltag '3MEM', please
update pooltag.txt</span></p>
<p class=MsoNormal><span lang=EN-US> 8042
4 3944
0 0PS/2 kb and mouse , Binary:
i8042prt.sys</span></p>
<p class=MsoNormal><span lang=EN-US> AGP
1
344
2 384UNKNOWN pooltag 'AGP ', please update
pooltag.txt</span></p>
<p class=MsoNormal><span lang=EN-US> AcdN
2 1072
0 0TDI AcdObjectInfoG </span></p>
<p class=MsoNormal><span lang=EN-US> AcpA
3
192
1 504ACPI Pooltags , Binary: acpi.sys</span></p>
<p class=MsoNormal><span lang=EN-US> AcpB
0
0
4 576ACPI Pooltags , Binary: acpi.sys</span></p>
<p class=MsoNormal><span lang=EN-US> AcpD
40 13280
0 0ACPI Pooltags , Binary: acpi.sys</span></p>
<p class=MsoNormal><span lang=EN-US> AcpF
6 240 0
0ACPI Pooltags , Binary: acpi.sys</span></p>
<p class=MsoNormal><span lang=EN-US> AcpM
0
0
1 128ACPI Pooltags , Binary: acpi.sys</span></p>
<p class=MsoNormal><span lang=EN-US> AcpO
4
208
0 0ACPI Pooltags , Binary: acpi.sys</span></p>
<h3><a name="_Toc435300888"><span style='font-family:宋体'>如何查看内存堆信息?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!heap</span></p>
<p class=MsoNormal><span style='font-family:宋体'>参数</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<h3><a name="_Toc435300889"><span style='font-family:宋体'>如何显示虚拟内存块及访问权限</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!vadump
–v </span><span
style='font-family:宋体'>显示所有虚拟内存块及访问权限</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> !vadump -v</span></p>
<p class=MsoNormal><span lang=EN-US>BaseAddress:
00000000</span></p>
<p class=MsoNormal><span lang=EN-US>AllocationBase: 00000000</span></p>
<p class=MsoNormal><span lang=EN-US>RegionSize:
00010000</span></p>
<p class=MsoNormal><span lang=EN-US>State:
00010000 MEM_FREE</span></p>
<p class=MsoNormal><span lang=EN-US>Protect:
00000001 PAGE_NOACCESS</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>BaseAddress:
00010000</span></p>
<p class=MsoNormal><span lang=EN-US>AllocationBase: 00010000</span></p>
<p class=MsoNormal><span lang=EN-US>AllocationProtect: 00000004
PAGE_READWRITE</span></p>
<p class=MsoNormal><span lang=EN-US>RegionSize:
00001000</span></p>
<p class=MsoNormal><span lang=EN-US>State:
00001000 MEM_COMMIT</span></p>
<p class=MsoNormal><span lang=EN-US>Protect:
00000004 PAGE_READWRITE</span></p>
<p class=MsoNormal><span lang=EN-US>Type:
00020000 MEM_PRIVATE</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!vprot
[</span><span style='font-family:宋体'>虚拟地址</span><span lang=EN-US>] </span><span
style='font-family:宋体'>显示某地址所属虚拟内存块及访问权限</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> !vprot 7ffe1000</span></p>
<p class=MsoNormal><span lang=EN-US>BaseAddress:
7ffe1000</span></p>
<p class=MsoNormal><span lang=EN-US>AllocationBase: 7ffe0000</span></p>
<p class=MsoNormal><span lang=EN-US>AllocationProtect: 00000002
PAGE_READONLY</span></p>
<p class=MsoNormal><span lang=EN-US>RegionSize:
0000f000</span></p>
<p class=MsoNormal><span lang=EN-US>State:
00002000 MEM_RESERVE</span></p>
<p class=MsoNormal><span lang=EN-US>Type:
00020000 MEM_PRIVATE</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection17 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300890"><span style='font-family:宋体'>特殊调试法</span></a></h2>
<h3><a name="_Toc435300891"><span style='font-family:宋体'>如何用内核态调试器控制用户态调试器进程联合调试?</span></a></h3>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>用内核态调试器控制远程用户态调试器,此外还可以在远程机器执行</span><span
lang=EN-US>shell</span><span style='font-family:宋体'>命令、</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>准备工作:在远程机器</span><span
lang=EN-US>(</span><span style='font-family:宋体'>或</span><span lang=EN-US>vmware</span><span
style='font-family:宋体'>虚拟机</span><span lang=EN-US>)</span><span
style='font-family:宋体'>上安装</span><span lang=EN-US>windbg</span><span
style='font-family:宋体'>,并把环境变量</span><span lang=EN-US>path</span><span
style='font-family:宋体'>设置为该目录</span><span lang=EN-US>(</span><span
style='font-family:宋体'>必须能找到</span><span lang=EN-US>ntsd.exe)</span><span
style='font-family:宋体'>,之后重启机器即可</span></p>
<p class=MsoNormal style='text-indent:18.0pt'><span style='font-family:宋体'>操作步骤:</span></p>
<p class=MsoListParagraph style='margin-left:18.0pt;text-indent:-18.0pt'><span
lang=EN-US>1.<span style='font:7.0pt "Times New Roman"'>
</span></span><span style='font-family:宋体'>在本地主机建立远程内核态调试</span></p>
<p class=MsoListParagraph style='margin-left:18.0pt;text-indent:-18.0pt'><span
lang=EN-US>2.<span style='font:7.0pt "Times New Roman"'>
</span></span><span lang=EN-US>!bpid [</span><span style='font-family:
宋体'>进程</span><span lang=EN-US>Id] </span><span
style='font-family:宋体'>命令用户态调试器附加调试进程</span><span lang=EN-US> </span><span
style='font-family:宋体'>例子如下:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> !bpid 0794 </span></p>
<p class=MsoNormal><span lang=EN-US>Finding winlogon.exe (0)...</span></p>
<p class=MsoNormal><span lang=EN-US>Waiting for winlogon.exe to break.
This can take a couple of minutes...</span></p>
<p class=MsoNormal><span lang=EN-US>Break instruction exception - code 80000003
(first chance)</span></p>
<p class=MsoNormal><span lang=EN-US>Stepping to g_AttachProcessId check...</span></p>
<p class=MsoNormal><span lang=EN-US>Break into process 794 set. The next
break should be in the desired process.</span></p>
<p class=MsoNormal><span lang=EN-US>Microsoft (R) Windows Debugger Version
6.12.0002.633 X86</span></p>
<p class=MsoNormal><span lang=EN-US>Copyright (c) Microsoft Corporation. All
rights reserved.</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>*** wait with pending attach</span></p>
<p class=MsoNormal><span lang=EN-US>Symbol search path is: *** Invalid ***</span></p>
<p class=MsoNormal><span lang=EN-US>****************************************************************************</span></p>
<p class=MsoNormal><span lang=EN-US>* Symbol loading may be unreliable without
a symbol search
path. *</span></p>
<p class=MsoNormal><span lang=EN-US>* Use .symfix to have the debugger choose a
symbol
path.
*</span></p>
<p class=MsoNormal><span lang=EN-US>* After setting your symbol path, use
.reload to refresh symbol locations. *</span></p>
<p class=MsoNormal><span lang=EN-US>****************************************************************************</span></p>
<p class=MsoNormal><span lang=EN-US>Executable search path is: </span></p>
<p class=MsoNormal><span lang=EN-US>ModLoad: 01000000 010f1000
C:\WINDOWS\Explorer.EXE</span></p>
<p class=MsoNormal><span lang=EN-US>ModLoad: 7c920000 7c9b6000
C:\WINDOWS\system32\ntdll.dll</span></p>
<p class=MsoNormal><span lang=EN-US>ModLoad: 7c800000 7c91e000
C:\WINDOWS\system32\kernel32.dll</span></p>
<p class=MsoNormal><span lang=EN-US> (794.f04): Break instruction
exception - code 80000003 (first chance)</span></p>
<p class=MsoNormal><span lang=EN-US>eax=7ffde000 ebx=00000001 ecx=00000002
edx=00000003 esi=00000004 edi=00000005</span></p>
<p class=MsoNormal><span lang=EN-US>eip=7c92120e esp=0327ffcc ebp=0327fff4
iopl=0 nv up ei pl zr na pe nc</span></p>
<p class=MsoNormal><span lang=EN-US>cs=001b ss=0023 ds=0023
es=0023 fs=0038
gs=0000
efl=00000246</span></p>
<p class=MsoNormal><span lang=EN-US>*** ERROR: Symbol file could not be
found. Defaulted to export symbols for C:\WINDOWS\system32\ntdll.dll - </span></p>
<p class=MsoNormal><span lang=EN-US>ntdll!DbgBreakPoint:</span></p>
<p class=MsoNormal><span lang=EN-US>7c92120e
cc
int 3</span></p>
<p class=MsoNormal><span lang=EN-US>0:025></span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>可见,本地内核态调试器已经勾住了远程用户态调试器的输入输出,此时进入用户态调试模式,在这种模式下,可以通过</span><span
lang=EN-US>.shell</span><span style='font-family:宋体'>命令对远程机器资源进行访问,如下所示:</span></p>
<p class=MsoNormal><span lang=EN-US>0:025> .shell</span></p>
<p class=MsoNormal><span lang=EN-US>.shell</span></p>
<p class=MsoNormal><span lang=EN-US>Microsoft Windows XP [°?±? 5.1.2600]</span></p>
<p class=MsoNormal><span lang=EN-US>(C) °?è¨?ùóD 1985-2001 Microsoft Corp.</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>C:\WINDOWS\system32><.shell waiting 1
second(s) for process></span></p>
<p class=MsoNormal><span lang=EN-US><.shell process may need input></span></p>
<p class=MsoNormal><span lang=EN-US>ir</span></p>
<p class=MsoNormal><span lang=EN-US>dir</span></p>
<p class=MsoNormal><span lang=EN-US><.shell waiting 1 second(s) for
process></span></p>
<p class=MsoNormal><span lang=EN-US> ?y?</span><span style='font-family:
宋体'>ˉ</span><span lang=EN-US>?</span><span style='font-family:宋体'>÷</span><span
lang=EN-US> C ?D</span><span style='font-family:宋体'>μ</span><span lang=EN-US>??</span><span
style='font-family:宋体'>í</span><span lang=EN-US>??</span><span
style='font-family:宋体'>ó</span><span lang=EN-US>D</span><span style='font-family:
宋体'>±ê</span><span lang=EN-US>???</span><span style='font-family:宋体'>£</span></p>
<p class=MsoNormal><span lang=EN-US> ?íμ?DòáDo?ê? BCE9-44CC</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> C:\WINDOWS\system32 μ?????</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>2015-11-08 12:50
<DIR> .</span></p>
<p class=MsoNormal><span lang=EN-US>2015-11-08 12:50
<DIR> ..</span></p>
<p class=MsoNormal><span lang=EN-US>2015-05-17
18:33
1,570 $winnt$.inf</span></p>
<p class=MsoNormal><span lang=EN-US>2015-05-17 22:58
<DIR> 1025</span></p>
<p class=MsoNormal><span lang=EN-US>2015-05-17 22:58
<DIR> 1028</span></p>
<p class=MsoNormal><span lang=EN-US>2015-05-17 22:58
<DIR> 1031</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>此时已经进入了</span><span lang=EN-US>shell</span><span
style='font-family:宋体'>控制模式,要退出该模式用</span><span lang=EN-US>exit</span><span
style='font-family:宋体'>命令即可</span><span lang=EN-US>(+Enter)</span><span
style='font-family:宋体'>,如下所示:</span></p>
<p class=MsoNormal><span lang=EN-US>C:\WINDOWS\system32><.shell waiting 1
second(s) for process></span></p>
<p class=MsoNormal><span lang=EN-US><.shell process may need input>exit</span></p>
<p class=MsoNormal><span lang=EN-US>exit</span></p>
<p class=MsoNormal><span lang=EN-US>exit</span></p>
<p class=MsoNormal><span lang=EN-US><.shell waiting 1 second(s) for
process></span></p>
<p class=MsoNormal><span lang=EN-US>.shell: Process exited</span></p>
<p class=MsoNormal><span lang=EN-US>Press ENTER to continue</span></p>
<p class=MsoNormal><span lang=EN-US><.shell process may need input></span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US>0:025></span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>现在回到了用户态调试模式,如果要返回内核态调试模式,可以用</span><span
lang=EN-US>.sleep 1000</span><span style='font-family:宋体'>,并迅速手动暂停内核调试器,这样就回到了内核调试器模式,如下所示:</span></p>
<p class=MsoNormal><span lang=EN-US>0:025> .sleep 10000</span></p>
<p class=MsoNormal><span lang=EN-US>.sleep 10000</span></p>
<p class=MsoNormal><span lang=EN-US>Break instruction exception - code 80000003
(first chance)</span></p>
<p class=MsoNormal><span lang=EN-US>*******************************************************************************</span></p>
<p class=MsoNormal><span lang=EN-US>*
*</span></p>
<p class=MsoNormal><span lang=EN-US>* You are seeing this message
because you pressed
either
*</span></p>
<p class=MsoNormal><span lang=EN-US>*
CTRL+C (if you run console kernel debugger)
or,
*</span></p>
<p class=MsoNormal><span lang=EN-US>*
CTRL+BREAK (if you run GUI kernel
debugger),
*</span></p>
<p class=MsoNormal><span lang=EN-US>* on your debugger machine's
keyboard. *</span></p>
<p class=MsoNormal><span lang=EN-US>*
*</span></p>
<p class=MsoNormal><span lang=EN-US>*
THIS IS NOT A BUG OR A SYSTEM
CRASH
*</span></p>
<p class=MsoNormal><span lang=EN-US>*
*</span></p>
<p class=MsoNormal><span lang=EN-US>* If you did not intend to break into the
debugger, press the "g" key, then *</span></p>
<p class=MsoNormal><span lang=EN-US>* press the "Enter" key
now. This message might immediately reappear. If it *</span></p>
<p class=MsoNormal><span lang=EN-US>* does, press "g" and
"Enter"
again.
*</span></p>
<p class=MsoNormal><span lang=EN-US>* *</span></p>
<p class=MsoNormal><span lang=EN-US>*******************************************************************************</span></p>
<p class=MsoNormal><span lang=EN-US>nt!RtlpBreakWithStatusInstruction:</span></p>
<p class=MsoNormal><span lang=EN-US>80528bec
cc
int 3</span></p>
<h3><a name="_Toc435300892"><span style='font-family:宋体'>如何控制目标系统?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US>.shell </span><span
style='font-family:宋体'>在目标系统执行命令行</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US>.breakin </span><span
style='font-family:宋体'>从用户态中断到内核态调试器</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US>.crash </span><span
style='font-family:宋体'>在目标系统崩溃</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US>.reboot </span><span
style='font-family:宋体'>重启目标系统</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<h3><a name="_Toc435300893"><span style='font-family:宋体'>如何在调试程序时无缝切换调试器以及实现多调试器?</span></a></h3>
<p class=MsoListParagraph style='margin-left:18.0pt;text-indent:-18.0pt'><span
lang=EN-US>①<span style='font:7.0pt "Times New Roman"'> </span></span><span
style='font-family:宋体'>从</span><span lang=EN-US>windbg</span><span
style='font-family:宋体'>无缝切换到</span><span lang=EN-US>windbg</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>适用于用户态调试。以</span><span
lang=EN-US>InstDrv.exe</span><span style='font-family:宋体'>为例,现有一个</span><span
lang=EN-US>Windbg.exe</span><span style='font-family:宋体'>,命名为</span><span
lang=EN-US>A</span><span style='font-family:宋体'>,之后的</span><span lang=EN-US>Windbg</span><span
style='font-family:宋体'>命名为</span><span lang=EN-US>B</span></p>
<p class=MsoNormal><span lang=EN-US>A</span><span style='font-family:宋体'>附加调试</span><span
lang=EN-US>InstDrv.exe</span><span style='font-family:宋体'>,假设断在</span><span
lang=EN-US>NtCreateFile</span><span style='font-family:宋体'>,</span></p>
<p class=MsoNormal><span lang=EN-US>0:004> g</span></p>
<p class=MsoNormal><span lang=EN-US>Breakpoint 0 hit</span></p>
<p class=MsoNormal><span lang=EN-US>ntdll!NtCreateFile:</span></p>
<p class=MsoNormal><span lang=EN-US>00007fff`10061720
4c8bd1
mov r10,rcx</span></p>
<p class=MsoNormal><span style='font-family:宋体'>现在想将这个暂停状态接管给</span><span
lang=EN-US>B</span><span style='font-family:宋体'>,则以</span><span lang=EN-US>windbg
–pe –p pid</span><span style='font-family:宋体'>为参数启动</span><span lang=EN-US>B</span><span
style='font-family:宋体'>:</span></p>
<p class=MsoNormal><span lang=EN-US>.....</span></p>
<p class=MsoNormal><span lang=EN-US>Loading Wow64 Symbols</span></p>
<p class=MsoNormal><span lang=EN-US>.........................................</span></p>
<p class=MsoNormal><span lang=EN-US>(5cbc.468c): Wake debugger - code 80000007
(first chance)</span></p>
<p class=MsoNormal><span lang=EN-US>No .natvis files found at C:\Program Files
(x86)\Windows Kits\10\Debuggers\x64\Visualizers.</span></p>
<p class=MsoNormal><span lang=EN-US>ntdll!NtCreateFile+0x1:</span></p>
<p class=MsoNormal><span lang=EN-US>00007fff`10061721
8bd1
mov edx,ecx</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>之后再使用</span><span
lang=EN-US>windbg –pe –p </span><span style='font-family:宋体'>进程</span><span
lang=EN-US>Id</span><span style='font-family:宋体'>附加,之后对</span><span lang=EN-US>A</span><span
style='font-family:宋体'>执行</span><span lang=EN-US>g</span><span
style='font-family:宋体'>后关闭,此时控制权交给</span><span lang=EN-US>B</span><span
style='font-family:宋体'>,完成了无缝替换</span><span lang=EN-US>Windbg</span><span
style='font-family:宋体'>调试</span></p>
<p class=MsoListParagraph style='margin-left:18.0pt;text-indent:-18.0pt'><span
lang=EN-US>②<span style='font:7.0pt "Times New Roman"'> </span></span><span
style='font-family:宋体'>从</span><span lang=EN-US>ollydbg</span><span
style='font-family:宋体'>无缝切换到</span><span lang=EN-US>windbg</span></p>
<p class=MsoNormal style='text-indent:18.0pt'><span style='font-family:宋体'>先使用</span><span
lang=EN-US>ollydbg</span><span style='font-family:宋体'>附加</span><span
lang=EN-US>InstDrv.exeF9</span><span style='font-family:宋体'>运行,之后使用</span><span
lang=EN-US>windbg –pe –p </span><span style='font-family:宋体'>进程</span><span
lang=EN-US>Id</span><span style='font-family:宋体'>附加,停在初始断点后执行</span><span
lang=EN-US>g</span><span style='font-family:宋体'>:</span></p>
<p class=MsoNormal><span lang=EN-US>.....</span></p>
<p class=MsoNormal><span lang=EN-US>Loading Wow64 Symbols</span></p>
<p class=MsoNormal><span lang=EN-US>....................................................</span></p>
<p class=MsoNormal><span lang=EN-US>(e84.422c): Wake debugger - code 80000007
(first chance)</span></p>
<p class=MsoNormal><span lang=EN-US>No .natvis files found at C:\Program Files
(x86)\Windows Kits\10\Debuggers\x64\Visualizers.</span></p>
<p class=MsoNormal><span lang=EN-US>wow64win!NtUserGetMessage+0xa:</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76e65a2a
c3
ret</span></p>
<p class=MsoNormal><span lang=EN-US>0:000> g</span></p>
<p class=MsoNormal><span lang=EN-US>(e84.227c): WOW64 breakpoint - code
4000001f (first chance)</span></p>
<p class=MsoNormal><span lang=EN-US>First chance exceptions are reported before
any exception handling.</span></p>
<p class=MsoNormal><span lang=EN-US>This exception may be expected and handled.</span></p>
<p class=MsoNormal><span lang=EN-US>ntdll_76eb0000!NtQueryInformationProcess:</span></p>
<p class=MsoNormal><span lang=EN-US>76eec600
cc
int 3</span></p>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>此时将</span><span lang=EN-US>Ollydbg</span><span
style='font-family:宋体'>关闭即可,此时关闭并不会导致进程退出,之后便可以只用</span><span lang=EN-US>Windbg</span><span
style='font-family:宋体'>进行调试。</span></p>
<p class=MsoListParagraph style='margin-left:18.0pt;text-indent:-18.0pt'><span
lang=EN-US>③<span style='font:7.0pt "Times New Roman"'> </span></span><span
style='font-family:宋体'>多个</span><span lang=EN-US>windbg</span><span
style='font-family:宋体'>调试同一个进程</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>使用对于多调试器原理相同,均使用</span><span
lang=EN-US>-pe</span><span style='font-family:宋体'>进行附加即可,停在初始断点</span><span
lang=EN-US>wow64win!NtUserGetMessage+0xa</span><span style='font-family:宋体'>,便执行</span><span
lang=EN-US>g</span><span style='font-family:宋体'>即可成功接管进程。多个调试器使用的时候一定要小心,很容易导致内存损坏的问题。</span></p>
<p class=MsoListParagraph style='margin-left:18.0pt;text-indent:-18.0pt'><span
lang=EN-US>④<span style='font:7.0pt "Times New Roman"'> </span></span><span
style='font-family:宋体'>一个</span><span lang=EN-US>ollydbg</span><span
style='font-family:宋体'>多个</span><span lang=EN-US>windbg</span><span
style='font-family:宋体'>调试同一个进程</span></p>
<p class=MsoNormal style='margin-left:18.0pt'><span style='font-family:宋体'>与③类似,只不过</span><span
lang=EN-US>Ollydbg</span><span style='font-family:宋体'>必须第一个附加该进程</span></p>
<h3><a name="_Toc435300894"><span style='font-family:宋体'>如何调试当前调试器?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.dbgdbg</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span><span
lang=EN-US>/</span><span style='font-family:宋体'>内核态</span></p>
<h3><a name="_Toc435300895"><span style='font-family:宋体'>如何用应用程序控制调试器?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.ocommand
</span><span style='font-family:宋体'>命令标志前缀</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span style='font-family:宋体'>用户程序代码为:</span><span
lang=EN-US>OutputDebugStringA("test .echo </span><span style='font-family:
宋体'>应用程序控制调试器</span><span lang=EN-US>;lm");</span></p>
<p class=MsoNormal><span lang=EN-US>Windbg</span><span style='font-family:宋体'>先执行命令:</span><span
lang=EN-US>.ocommand test</span></p>
<p class=MsoNormal><span style='font-family:宋体'>在执行用户代码时,会输出以下信息并暂停:</span></p>
<p class=MsoNormal><span style='font-family:宋体'>应用程序控制调试器</span></p>
<p class=MsoNormal><span lang=EN-US>start
end
module name</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`009c0000
00000000`009e3000 ConsoleApplication2 C (private pdb symbols)
C:\Users\Administrator\Documents\Visual Studio
2015\Projects\ConsoleApplication2\Debug\ConsoleApplication2.pdb</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`0f100000
00000000`0f273000 ucrtbased
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`57e40000
00000000`57ef9000 MSVCP140D
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`58030000
00000000`5804c000 VCRUNTIME140D
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`74630000 00000000`74684000
bcryptPrimitives
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`74690000
00000000`7469a000 CRYPTBASE
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`746a0000
00000000`746be000 SspiCli
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`74760000
00000000`747dc000 ADVAPI32 (deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76170000
00000000`7622a000 RPCRT4
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76480000
00000000`764c1000 sechost
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76860000
00000000`76937000 KERNELBASE
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76b80000 00000000`76c43000
msvcrt
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76ca0000
00000000`76de0000 KERNEL32
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76de0000
00000000`76e2b000 wow64
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76e30000
00000000`76e39000 wow64cpu (deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76e40000
00000000`76ea8000 wow64win
(deferred)
</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76eb0000
00000000`7701e000 ntdll_76eb0000 (pdb
symbols)
e:\symbol\wntdll.pdb\8C67971C1474490580FC7B7918183B462\wntdll.pdb</span></p>
<p class=MsoNormal><span lang=EN-US>00007fff`0ffd0000 00007fff`1017c000
ntdll (pdb
symbols)
e:\symbol\ntdll.pdb\FA53ECC41AEA4238870E88A34FDA3C6C1\ntdll.pdb</span></p>
<p class=MsoNormal><span lang=EN-US>wow64!Wow64NotifyDebugger+0x1d:</span></p>
<p class=MsoNormal><span lang=EN-US>00000000`76df0309 65488b042530000000
mov rax,qword ptr gs: gs:00000000`00000030=????????????????</span></p>
</div>
<b><span lang=EN-US style='font-size:18.0pt;line-height:173%;font-family:"Cambria",serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection18 style='layout-grid:15.6pt'>
<h2><a name="_Toc435300896"><span style='font-family:宋体'>其他</span></a></h2>
<h3><a name="_Toc435300897"><span style='font-family:宋体'>如何查看最耗费时间片的线程?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!runaway
7</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:用户态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>0:001> !runaway 7</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> User Mode Time</span></p>
<p class=MsoNormal><span lang=EN-US> Thread
Time</span></p>
<p class=MsoNormal><span lang=EN-US> 0:55c
0:00:00.0093</span></p>
<p class=MsoNormal><span lang=EN-US> 1:1a4
0:00:00.0000</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> Kernel Mode Time</span></p>
<p class=MsoNormal><span lang=EN-US> Thread
Time</span></p>
<p class=MsoNormal><span lang=EN-US> 0:55c
0:00:00.0140</span></p>
<p class=MsoNormal><span lang=EN-US> 1:1a4
0:00:00.0000</span></p>
<p class=MsoNormal><span lang=EN-US> </span></p>
<p class=MsoNormal><span lang=EN-US> Elapsed Time</span></p>
<p class=MsoNormal><span lang=EN-US> Thread
Time</span></p>
<p class=MsoNormal><span lang=EN-US> 0:55c
0:00:43.0533</span></p>
<p class=MsoNormal><span lang=EN-US> 1:1a4
0:00:25.0876</span></p>
<h3><a name="_Toc435300898"><span style='font-family:宋体'>如何快速替换系统启动型驱动文件</span><span
lang=EN-US>? </span></a></h3>
<p class=MsoNormal><span lang=EN-US> Windbg</span><span
style='font-family:宋体'>提供了一种方式替换要启动加载的驱动,这样就免去了为了测试驱动而手动替换虚拟机文件的麻烦。</span></p>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US> .kdfiles
–m </span><span style='font-family:宋体'>旧文件路径</span> <span style='font-family:
宋体'>新文件路径</span><span lang=EN-US> </span><span
style='font-family:宋体'>指定文件路径替换</span></p>
<p class=MsoNormal><span lang=EN-US> .kdfiles
Map</span><span style='font-family:宋体'>文件</span><span lang=EN-US> </span><span
style='font-family:宋体'>指定映射文件替换</span></p>
<p class=MsoNormal><span style='font-family:宋体'>选项:</span><span lang=EN-US> </span><span
style='font-family:宋体'>旧文件:文件必须位于目标机器上,路径根据驱动启动类型不同可以是</span><span lang=EN-US>\Systemroot\....</span><span
style='font-family:宋体'>或</span><span lang=EN-US>\??\c:\....</span><span
style='font-family:宋体'>类似格式</span></p>
<p class=MsoNormal><span lang=EN-US> </span><span
style='font-family:宋体'>新文件:可以是本机文件或网络文件</span></p>
<p class=MsoNormal><span lang=EN-US> Map</span><span
style='font-family:宋体'>文件:格式如下</span><span lang=EN-US>(d:\Map_Files\mymap.ini)</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US>map</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US>\Systemroot\system32\drivers\videoprt.sys</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US>e:\MyNewDriver\binaries\videoprt.sys</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US>map</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US>\Systemroot\system32\mydriver.sys</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US>\\myserver\myshare\new_drivers\mydriver0031.sys</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US># Here is a
comment</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US>map</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US>\??\c:\windows\system32\beep.sys</span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span lang=EN-US><a
href="file:///\\myserver\myshare\new_drivers\new_beep.sys">\\myserver\myshare\new_drivers\new_beep.sys</a></span></p>
<p class=MsoNormal style='margin-left:10.5pt'><span style='font-family:宋体'>之后通过设置环境变量</span><span
lang=EN-US>_NT_KD_FILES</span><span style='font-family:宋体'>,或</span><span
lang=EN-US>.kdfiles</span><span style='font-family:宋体'>命令设置</span><span
lang=EN-US>map</span><span style='font-family:宋体'>文件</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:远程调试</span></p>
<p class=MsoNormal><span style='font-family:宋体'>触发时机:系统尝试加载被替换模块时</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal><span lang=EN-US>kd> .kdfiles d:\Map_Files\mymap.ini</span></p>
<p class=MsoNormal><span lang=EN-US>KD file associations loaded from
'd:\Map_Files\mymap.ini'</span></p>
<h3><a name="_Toc435300899"><span style='font-family:宋体'>读写</span><span
lang=EN-US>gflag</span></a></h3>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>!gflag</span></p>
<h3><a name="_Toc435300900"><span style='font-family:宋体'>分析蓝屏</span><span
lang=EN-US>dump</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>.dump
</span><span style='font-family:宋体'>选项</span><span lang=EN-US> dmp</span><span
style='font-family:宋体'>文件名</span><span lang=EN-US> </span><span
style='font-family:宋体'>创建内存转储文件</span></p>
<p class=MsoNormal><span style='font-family:宋体'>选项:</span><span lang=EN-US>/m </span><span
style='font-family:宋体'>创建</span><span lang=EN-US>minidump /f
</span><span style='font-family:宋体'>创建</span><span lang=EN-US>full dump</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>!analyze –v</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>从内存文件映射地址获取文件名</span></p>
<h3><a name="_Toc435300901"><span style='font-family:宋体'>显示当前使用的系统定时器</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>命令:</span><span lang=EN-US>!timer</span></p>
<p class=MsoNormal><span style='font-family:宋体'>适用范围:内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>例:</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>kd> !timer</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>Dump system
timers</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>Interrupt time:
b77af511 00000020 </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>List
Timer Interrupt Low/High Fire
Time
DPC/thread</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>PROCESSOR 0
(nt!_KTIMER_TABLE 83f35680)</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> 0
870e1870 ce024890 00000020
thread 870e17e0 </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> 1
869ffb00 c6e108a8 00000020
thread 869ffa70 </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> 2
8858d590 3b094108 00008f0d [ 5/13/2016 22:01:06.813]
thread 8858d500 </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> 8
86ab1610 d9fc34f1 00000020
thread 86ab1580 </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> 10
88a91608 0f3b27d5 0000002f
thread 88a89a18 </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> 12
88988310 bd748dd0 00000020
thread 88987780 </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> 16
885ba518 7aa15e20 00000022
thread 885ba488 </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> 20
884316f8 aae6c787 0000005e
thread 88434030 </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> 22
8863c188 adf6f3bb 00000021
thread 885fad48 </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> 23
83f44860 9169c708 00000021
nt!ExpTimeRefreshDpcRoutine (DPC @ 83f448a0) </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> 25
8660f890 2d74bb94 0000002c
thread 8660f800 </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> 29
86f401d8 P c25f9f00 00000020
afd!AfdCheckLookasideLists (DPC @ 86f40200) </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>
888220c0 c723dc01 00000020
thread 88822030</span></p>
<h3><a name="_Toc435300902"><span style='font-family:宋体'>命令:</span><span
lang=EN-US>!mapped_file</span></a></h3>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>0:000>
!mapped_file 4121ec </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>Mapped file name
for 004121ec: '\Device\HarddiskVolume2\CODE\TimeTest\Debug\TimeTest.exe'</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>开启调试子进程</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>命令:</span><span
lang=EN-US>.childdbg 1/0 1</span><span
style='font-family:宋体'>开启</span><span lang=EN-US> 2</span><span
style='font-family:宋体'>关闭</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>Windbg</span><span
style='font-family:宋体'>插件相关:</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>插件要放在</span><span
lang=EN-US>windbg</span><span style='font-family:宋体'>根目录或插件文件夹中,加载后可以用命令“</span><span
lang=EN-US>!</span><span style='font-family:宋体'>插件名</span><span lang=EN-US>.help</span><span
style='font-family:宋体'>”来查看帮助,“</span><span lang=EN-US>!</span><span
style='font-family:宋体'>导出函数”来使用功能。</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>命令:</span><span
lang=EN-US>.load </span><span style='font-family:宋体'>插件</span><span lang=EN-US>dll</span><span
style='font-family:宋体'>名</span><span lang=EN-US> </span><span
style='font-family:宋体'>加载插件</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>命令:</span><span
lang=EN-US>.unload </span><span style='font-family:宋体'>插件</span><span
lang=EN-US>dll</span><span style='font-family:宋体'>名</span><span lang=EN-US> </span><span
style='font-family:宋体'>卸载插件</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<h3><a name="_Toc435300903"><span class=3Char><span style='font-family:宋体'>清屏</span></span></a></h3>
<p class=MsoNormal style='text-indent:21.0pt'><span style='font-family:宋体'>命令:</span><span
lang=EN-US>.cls</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>!htrace</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>!obtrace</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>!memlist</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>!irp !irpfind</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>!processirps</span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US> </span></p>
</div>
<b><span style='font-size:26.0pt;line-height:240%;font-family:"Calibri",sans-serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection19 style='layout-grid:15.6pt'>
<h1><a name="_Toc435300904"><span style='font-family:宋体'>中级篇——</span>Windbg</a><span
style='font-family:宋体'>插件编写</span></h1>
<h3><a name="_Toc435300905"><span style='font-family:宋体'>如何输出</span></a>pdb<span
style='font-family:宋体'>中所有结构体?</span></h3>
<p class=MsoNormal> </p>
<h3><a name="_Toc435300906"><span style='font-family:宋体'>如何扩展</span></a>a<span
style='font-family:宋体'>指令为</span>64<span style='font-family:宋体'>位汇编?</span></h3>
<h3><a name="_Toc435300907"><span style='font-family:宋体'>如何实现内存访问断点?</span></a></h3>
<p class=MsoNormal><span style='font-family:宋体'>内核态</span></p>
<p class=MsoNormal><span style='font-family:宋体'>用户态</span></p>
<p class=MsoNormal> </p>
<h3><span style='font-family:宋体'>如何实现快速传输文件?</span></h3>
</div>
<b><span style='font-size:14.0pt;line-height:173%;font-family:"Calibri",sans-serif'><br
clear=all style='page-break-before:always'>
</span></b>
<div class=WordSection20 style='layout-grid:15.6pt'>
<h1><a name="_Toc435300908"><span style='font-family:宋体'>高级篇——</span>Windbg</a><span
style='font-family:宋体'>的</span>Bug<span style='font-family:宋体'>及命令实现</span></h1>
<p class=MsoNormal><span style='font-family:宋体'>错误</span><span lang=EN-US>windbg
Cannot resolve nt!_EPROCESS object type </span><span
style='font-family:宋体'>解析</span></p>
<p class=MsoNormal> </p>
</div>
</body>
</html>
。。好长的文章!建议把目录做成可以点了便于在线浏览的。 可以可以!!
页:
[1]