??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品免费福利久久,欧美黑人又粗又大久久久,久久人搡人人玩人妻精品首页http://www.shnenglu.com/tiany/奋斗的\上肯定会遇到很多困难 该不该l?zh-cnThu, 08 May 2025 19:51:00 GMTThu, 08 May 2025 19:51:00 GMT60从看雪的一个沙׃码中扣出的InlineHook代码http://www.shnenglu.com/tiany/archive/2013/03/26/198824.htmlTianyTianyMon, 25 Mar 2013 16:20:00 GMThttp://www.shnenglu.com/tiany/archive/2013/03/26/198824.htmlhttp://www.shnenglu.com/tiany/comments/198824.htmlhttp://www.shnenglu.com/tiany/archive/2013/03/26/198824.html#Feedback0http://www.shnenglu.com/tiany/comments/commentRss/198824.htmlhttp://www.shnenglu.com/tiany/services/trackbacks/198824.html#pragma once  #define __malloc(_s)    VirtualAl...  阅读全文

Tiany 2013-03-26 00:20 发表评论
]]>
WinDBG命o概览(? - 元命?/title><link>http://www.shnenglu.com/tiany/archive/2013/03/24/198772.html</link><dc:creator>Tiany</dc:creator><author>Tiany</author><pubDate>Sun, 24 Mar 2013 08:10:00 GMT</pubDate><guid>http://www.shnenglu.com/tiany/archive/2013/03/24/198772.html</guid><wfw:comment>http://www.shnenglu.com/tiany/comments/198772.html</wfw:comment><comments>http://www.shnenglu.com/tiany/archive/2013/03/24/198772.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/tiany/comments/commentRss/198772.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/tiany/services/trackbacks/198772.html</trackback:ping><description><![CDATA[<p style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; margin: 0px auto; font: 14px/25px Verdana, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">元命?Meta-Command)用来提供标准命o没有提供的常用调试功? 与标准命令一? 元命令也是内建在调试器引擎或者WinDBGE序文g中的. 所有元命o都已一个点(.)开? 所以元命o也被UCؓ点命?Dot Command).</p> <p style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; margin: 0px auto; font: 14px/25px Verdana, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"> </p> <p style="widows: 2; text-transform: none; background-color: rgb(255,255,255); text-indent: 0px; margin: 0px auto; font: 14px/25px Verdana, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">按照功能, 可以把元命o分成如下几类.</p> <ul style="widows: 2; text-transform: none; background-color: rgb(255,255,255); list-style-type: disc; text-indent: 0px; font: 14px/25px Verdana, Arial, Helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(0,0,0); margin-left: 45px; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"><li>昄和设|调试会话和调试器选项.</li> <ul style="list-style-type: disc; margin-left: 45px"><li>用于W号选项?strong>.symopt</strong>- Set Symbol Options</li><li>用于W号路径?<strong>sympath</strong>- Set Symbol Path, ?strong>.symfix</strong>- Set Symbol Store Path.</li><li>用于E序源文件的<strong>.srcpath</strong>- Set Source Path,<span id="cckasew" class="Apple-converted-space"> </span><strong>.srcnoisy</strong>- Noisy Source Loading,<span id="qgw44m4" class="Apple-converted-space"> </span><strong>.srcfix</strong>- Use Source Server</li><li>用于扩展命o模块路径?strong>.extpath</strong>- Set Extension Path</li><li>用于匚w扩展命o?strong>.extmatch</strong>- Display All Matching Extensions</li><li>用于可执行文件的<strong>.exepath</strong>- Set Executable Path</li><li>讄反汇~选项?strong>.asm</strong>- Change Disassembly Options</li><li>控制表达式评估器?strong>.expr</strong>- Choose Expression Evaluator</li></ul></li><li>控制调试会话或者调试目?</li> <ul style="list-style-type: disc; margin-left: 45px"><li>重新开始调试会话的<strong>.restart</strong>- Restart Kernel Connection(Kernel Mode) ?Restart Target Application(User Mode)</li><li>攑ּ用户态调试目?q程)?strong>.abandon</strong>- Abandon Process</li><li>创徏新进E的<strong>.create</strong>- Create Process</li><li>附加到存在进E的<strong>.attach</strong>- Attach to Process</li><li>打开转储文g?strong>.opendump</strong>- Open Dump File</li><li>分离调试目标?strong>.detach</strong>- Detach from Process</li><li>用于杀掉进E的<strong>.kill</strong>- Kill Process</li></ul></li><li>理扩展命o模块</li> <ul style="list-style-type: disc; margin-left: 45px"><li>加蝲模块?strong>.load</strong>- Load Extension DLL</li><li>卸蝲模块<strong>.unload</strong>- Unload Extension DLL?strong>.unloadall</strong>- Unload All Extension DLLs</li><li>昄已加载模块的<strong>.chain</strong>- List Debugger Extensions</li></ul></li><li>理调试器日志文?/li> <ul style="list-style-type: disc; margin-left: 45px"><li>昄信息<span id="4cu4g4k" class="Apple-converted-space"> </span><strong>.logfile</strong>- Display Log File Status</li><li>打开<span id="guuciu4" class="Apple-converted-space"> </span><strong>.logopen</strong>- Open Log File</li><li>q加<span id="2ga24kc" class="Apple-converted-space"> </span><strong>.logappend</strong>- Append Log File</li><li>关闭<span id="seqgi22" class="Apple-converted-space"> </span><strong>.logclose</strong>- Close Log File</li></ul></li><li>q程调试</li> <ul style="list-style-type: disc; margin-left: 45px"><li>用于启动remote.exe服务?strong>.remote</strong>- Create Remote.exe Server</li><li>用于启动调试引擎服务器的<strong>.server</strong>- Create Debugging Server</li><li>列出可用服务器的<strong>.servers</strong>- List Debugging Servers</li><li>用于向远E服务器发送文件的<strong>.send_file</strong>- Send File</li><li>用于l束q程q程服务器的<strong>.endpsrv</strong>- End Process Server</li><li>用于l束引擎服务器的<strong>.endsrv</strong>- End Debugging Server</li></ul></li><li>控制调试?/li> <ul style="list-style-type: disc; margin-left: 45px"><li>让调试器睡眠一D|间的<strong>.sleep</strong>- Pause Debugger</li><li>唤醒处于睡眠状态的调试器的<strong>.wake</strong>- Wake Debugger</li><li>启动另一个调试器来调试当前调试器?strong>.dbgdbg</strong>- Debug Current Debugger</li></ul></li><li>~写命oE序</li> <ul style="list-style-type: disc; margin-left: 45px"><li>包括一pdcMC语言关键字的命o, ?/li> <ul style="list-style-type: disc; margin-left: 45px"><li>.if, .else, .elsif, .foreach, .do, .while. .continue, .catch, .break, .continue, .leave, .printf, .block. ?lt;软g调试>一书第30章的W?8节有介绍命oE序的编写方?</li></ul></ul></li><li>昄或者{储调试目标数?/li> <ul style="list-style-type: disc; margin-left: 45px"><li>产生转储文g?strong>.dump</strong>- Create Dump File</li><li>原始内存数据写到文件的<strong>.writemem</strong>- Write Memory to File</li><li>昄调试会话旉?strong>.time</strong>- Display System Time</li><li>昄U程旉?strong>.ttime</strong>- Display Thread Times</li><li>昄d列表?strong>.tlist</strong>- List Process IDs</li><li>以不同格式显C数字的<strong>.formats</strong>- Show Number Formats</li><li>可以列出所有元命o和每个命令的单说明的<strong>.help</strong>- Meta-Command Help</li></ul></ul><img src ="http://www.shnenglu.com/tiany/aggbug/198772.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/tiany/" target="_blank">Tiany</a> 2013-03-24 16:10 <a href="http://www.shnenglu.com/tiany/archive/2013/03/24/198772.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>WinDBG命o概览(? - 标准命ohttp://www.shnenglu.com/tiany/archive/2013/03/24/198770.htmlTianyTianySun, 24 Mar 2013 08:01:00 GMThttp://www.shnenglu.com/tiany/archive/2013/03/24/198770.htmlhttp://www.shnenglu.com/tiany/comments/198770.htmlhttp://www.shnenglu.com/tiany/archive/2013/03/24/198770.html#Feedback0http://www.shnenglu.com/tiany/comments/commentRss/198770.htmlhttp://www.shnenglu.com/tiany/services/trackbacks/198770.html阅读全文

Tiany 2013-03-24 16:01 发表评论
]]>
VS2008~译驱动环境配置http://www.shnenglu.com/tiany/archive/2013/03/23/198753.htmlTianyTianySat, 23 Mar 2013 12:20:00 GMThttp://www.shnenglu.com/tiany/archive/2013/03/23/198753.htmlhttp://www.shnenglu.com/tiany/comments/198753.htmlhttp://www.shnenglu.com/tiany/archive/2013/03/23/198753.html#Feedback0http://www.shnenglu.com/tiany/comments/commentRss/198753.htmlhttp://www.shnenglu.com/tiany/services/trackbacks/198753.html新徏一个空?/span>win32控制台程?/span>

 1、选(文g→新徏→目→Visual C++目→win32win32控制台项目)创徏一?/span>

 

填写上名U?/span>event然后按确?/span>
在弹出的win32应用E序向导?/span> 选应用程序设|?/span> →附加选项 N空目→完成?/span>

 

?/span> ?nbsp; 选项目菜?#8594;d现有?#8594;d所有驱动相关的*.h,*.c,*.cpp,*.rc之类的文件?/span>

选工?/span>(T)→选项(O)....→目→VC++目录→

  1、在可执行文?/span>目录中添加:

    D:/WINDDK/3790.1830/BIN/X86   //VS2003(没测),VS2005(没测),VS2008内不需?/span>

 

  2、在包含文g目录d如下路径

    D:/WINDDK/3790.1830/inc/wxp
    D:/WINDDK/3790.1830/inc/crt    (
可?/span>)
    D:/WINDDK/3790.1830/inc/ddk/wxp
    D:/WINDDK/3790.1830/inc/ddk/wdm/wxp

 

  3、在库文?/span>目录中添加:

    D:/WINDDK/3790.1830/LIB/WXP/I386

 

event属性设|?/span> 

新徏目配置check //必?/span>

()C/C++属性设|?/span>

   常规选项?/span>

1调试信息格式(C7兼容(/Z7) //可?/span>

2警告{    Q?/span>2U?/span>(/W2)  //可?/span>

3警告视为错?/span>(?/span>(/wx)  //可?/span>

   优化选项?/span>

1优化(/Od)          //可?/span>

  预处理器

    预处理器定义Q?/span>WIN32=100;_X86_=1;WINVER=0x501;DBG=1   //必?/span>

  代码生成

    启用最重新生成:?/span>   //可?/span>

    基本q行时检查:默认?/span>//可?/span>

    q行时库Q多U程调试(/MTd) ?/span> 多线E?/span>(/MT)  //?/span>

    ~冲区安全检查:?/span>   //可?/span>

 (可避免出?/span>LINK : error LNK2001: 无法解析外部W号__security_cookie)

  

 调用U定__stdcall(/Gz)   //必?/span>

链接?/span>

 常规Q?/span>

 输出文gQ?/span>$(OutDir)/$(ProjectName).sys //必?/span>

 启用增量链接Q否(/INCREMENTAL:NO) //选上

 

忽略导入库:?/span>//可?/span>讄为此值时Q必d附加库目录中加:D:/WINDDK/3790.1830/lib/wxp/i386 Q这样项目就不会依赖IDE环境的设|?/span>)   ?/span>讄为此值时Q将依赖IDE 的环境的相关讄)

 输入Q?/span>

附加依赖?/span>ntoskrnl.lib Hal.lib wdm.lib wdmsec.lib wmilib.lib ndis.lib MSVCRT.LIB LIBCMT.LIB //必选其12

//NT式驱?/span>ntoskrnl.lib  WDM式驱?/span>  wdm.lib
 ( HalXXX
函数?/span>Hal.libQ?/span>WmiXXX函数?/span>wmilib.lib Q?/span>NdisXXX函数?/span>ndis.lib )
 
必要旉要增加微软的标准?/span>MSVCRT.LIB MSVCRTD.LIB(调试?/span>) LIBCMT.LIBIBCMTD.LIB(调试?/span>) )
 
如果源码中有source 文gQ那么该文g?/span>TARGETLIBS 字段会列目需要的?/span>)

    忽略所有默认库Q是(/NODEFAULTLIB)

 清单文gQ?/span>

   启用用户账户控制Q?/span>UACQ?/span> ?/span>//必?/span> 不然会出?/span> >LINK : fatal error LNK1295: “/MANIFESTUAC”?/span>“/DRIVER”规范不兼容;链接时不使用“/MANIFESTUAC” 

 调试Q?/span>

    生成调试信息 ?/span>(/DEBUG) //可?/span>

    生成映像文gQ是(/MAP)  //可?/span>

    映像文g名:$(TargetDir)$(TargetName).map //可?/span>

  (System)Q?/span>

    子系l?/span>:控制?/span>(/SUBSYSTEM:CONSOLE) //必?/span>

    堆栈保留大小Q?/span>4194304 //可?/span>

    堆栈提交大小Q?/span>4096    //可?/span>

    驱动E序:   驱动E序(/DRIVER) //必?/span> 

    高Q?/span>

入口点:DriverEntry   //必?/span>

随机基址:默认?/span>    //必?/span> 不然会出?/span> 1>G:/event2008/check/event2008.exe : fatal error LNK1295: “/DYNAMICBASE”?/span>“/DRIVER”规范不兼容;链接时不使用“/DYNAMICBASE”

数据执行保护(DEP): 默认?/span>//必?/span> 不然会出?/span>G:/event2008/check/event2008.sys : fatal error LNK1295: “/NXCOMPAT:NO”?/span>“/DRIVER”规范不兼容;链接时不使用“/NXCOMPAT:NO”

 

讄效应和:?/span>(/RELEASE) //可?/span>

基址Q?/span>0x10000          //选上

  命o?/span>”->附加选项Q?/span>

    d开养I/SECTION:INIT,D /IGNORE:4078 //填上

      可以避免以下错误提示
      LINK : warning LNK4078: 
扑ֈ多个“INIT”节,它们h不同的属?/span>(E2000020)
      LINK : error LNK2001: 
无法解析的外部符?/span>__load_config_used

五.~译Q链接?/span>

一些要修改DDK例子源码方能成功的问题,目前不知道什么选项可以不改Q?/span>
    
源码中的关键?/span>try 要改?/span>__try , except 要改?/span>__except .



Tiany 2013-03-23 20:20 发表评论
]]>
学破?<?gt; PE格式?区块表与区块 http://www.shnenglu.com/tiany/archive/2012/04/11/170920.htmlTianyTianyWed, 11 Apr 2012 07:31:00 GMThttp://www.shnenglu.com/tiany/archive/2012/04/11/170920.htmlhttp://www.shnenglu.com/tiany/comments/170920.htmlhttp://www.shnenglu.com/tiany/archive/2012/04/11/170920.html#Feedback0http://www.shnenglu.com/tiany/comments/commentRss/170920.htmlhttp://www.shnenglu.com/tiany/services/trackbacks/170920.html_______________________________
  
|  IMAGE_DOS_HEADER     |    <-- Dos部首
  
-------------------------------
  
|  PE,0,0           |    <-- PE文g标志
  
-------------------------------
  
|  IMAGE_FILE_HEADER     |    <-- 映像文g?br />  -------------------------------
  
|  IMAGE_OPTIONAL_HEADER32  |    <-- 映像可选头
  
-------------------------------
  
|  Section Table       |    <-- 节表
  
-------------------------------
  
|  .text           |    <-- 代码区段
  
-------------------------------
  
|  .data           |    <-- 数据区段
  
-------------------------------
  
|  .idata          |    <-- 输入?br />  -------------------------------
  
|  .edata          |    <-- 输出?br />  -------------------------------
  
|  .reloc          |    <-- 重定位表区段
  
-------------------------------
  
|  .           |
  
-------------------------------
  
|  调试信息         |
  
-------------------------------

Ҏq个l构表IMAGE_OPTIONAL_HEADER下面紧接着是区块表和各种区块Q也可以叫做节表和节英文是SECTION?/p>

节表是由一大堆的IMAGE_SECTION_HEADER排列成的一个数据结构。其数量由IMAGE_NT_HEADERSl构中的FileHeader.NumberOfSections成员来决

定?/p>

IMAGE_SECTION_HEADER的结构如?/p>

typedef struct _IMAGE_SECTION_HEADER
{
BYTE Name[IMAGE_SIZEOF_SHORT_NAME];
// 节表名称,?#8220;.text”
//IMAGE_SIZEOF_SHORT_NAME=8
union
{
DWORD PhysicalAddress;
// 物理地址
DWORD VirtualSize; // 真实长度Q这两个值是一个联合结构,可以使用其中的Q何一个,一
// 般是取后一?/span>
}
Misc;
DWORD VirtualAddress;
// 节区?RVA 地址
DWORD SizeOfRawData; // 在文件中寚w后的寸
DWORD PointerToRawData; // 在文件中的偏U量
DWORD PointerToRelocations; // 在OBJ文g中用,重定位的偏移
DWORD PointerToLinenumbers; // 行号表的偏移Q供调试使用圎ͼ
WORD NumberOfRelocations; // 在OBJ文g中用,重定位项数目
WORD NumberOfLinenumbers; // 行号表中行号的数?/span>
DWORD Characteristics; // 节属性如可读Q可写,可执行等 } IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;


Name 里面存的是区块的名字

.text code 什么的是放代码用?/p>

.data 是放数据,已经初始化好?/p>

.idata 是输入?Q很多加壳程序会修改输入表,hook api 在程序运行apiӞ让壳取得一定时间的权限来反跟踪Q脱壳的一大步骤就是还原输入表?/p>

.edata 输出?/p>

.bbs 未初始化的数?/p>VirtualSizes是一个非常牛逼的成员Q其中的值是区块没有按FileAlignment对其前的大小Q通过它可以推出区块中还有多没有被使用Q很多病毒会在未被是用的I间?br />

插入自己的代码?/p>

Characteristics 表示该区块的属?可读?可写啊什么的


//   IMAGE_SCN_TYPE_REG         0x00000000 // Reserved.
//   IMAGE_SCN_TYPE_DSECT        0x00000001 // Reserved.
//   IMAGE_SCN_TYPE_NOLOAD       0x00000002 // Reserved.
//   IMAGE_SCN_TYPE_GROUP        0x00000004 // Reserved.
#define IMAGE_SCN_TYPE_NO_PAD       0x00000008 // Reserved.
//   IMAGE_SCN_TYPE_COPY        0x00000010 // Reserved.

#define IMAGE_SCN_CNT_CODE         0x00000020 // Section contains code.
                           
//区段包含代码
#define IMAGE_SCN_CNT_INITIALIZED_DATA   0x00000040 // Section contains initialized data.
                           
//区段包含已初始化数据
#define IMAGE_SCN_CNT_UNINITIALIZED_DATA  0x00000080 // Section contains uninitialized data.
                           
//区段包含未初始化数据
#define IMAGE_SCN_LNK_OTHER        0x00000100 // Reserved.
#define IMAGE_SCN_LNK_INFO         0x00000200 // Section contains comments
                           
// or some other type of information.
//   IMAGE_SCN_TYPE_OVER        0x00000400 // Reserved.
#define IMAGE_SCN_LNK_REMOVE        0x00000800 // Section contents will not become part of image.
#define IMAGE_SCN_LNK_COMDAT        0x00001000 // Section contents comdat.
//                     0x00002000 // Reserved.
//   IMAGE_SCN_MEM_PROTECTED - Obsolete 0x00004000
#define IMAGE_SCN_NO_DEFER_SPEC_EXC    0x00004000 // Reset speculative exceptions handling bits
                           
// in the TLB entries for this section.
#define IMAGE_SCN_GPREL          0x00008000 // Section content can be accessed relative to GP
#define IMAGE_SCN_MEM_FARDATA       0x00008000
//   IMAGE_SCN_MEM_SYSHEAP - Obsolete 0x00010000
#define IMAGE_SCN_MEM_PURGEABLE      0x00020000
#define IMAGE_SCN_MEM_16BIT        0x00020000
#define IMAGE_SCN_MEM_LOCKED        0x00040000
#define IMAGE_SCN_MEM_PRELOAD       0x00080000

#define IMAGE_SCN_ALIGN_1BYTES       0x00100000 //
#define IMAGE_SCN_ALIGN_2BYTES       0x00200000 //
#define IMAGE_SCN_ALIGN_4BYTES       0x00300000 //
#define IMAGE_SCN_ALIGN_8BYTES       0x00400000 //
#define IMAGE_SCN_ALIGN_16BYTES      0x00500000 // Default alignment if no others are specified.
#define IMAGE_SCN_ALIGN_32BYTES      0x00600000 //
#define IMAGE_SCN_ALIGN_64BYTES      0x00700000 //
#define IMAGE_SCN_ALIGN_128BYTES      0x00800000 //
#define IMAGE_SCN_ALIGN_256BYTES      0x00900000 //
#define IMAGE_SCN_ALIGN_512BYTES      0x00A00000 //
#define IMAGE_SCN_ALIGN_1024BYTES     0x00B00000 //
#define IMAGE_SCN_ALIGN_2048BYTES     0x00C00000 //
#define IMAGE_SCN_ALIGN_4096BYTES     0x00D00000 //
#define IMAGE_SCN_ALIGN_8192BYTES     0x00E00000 //
// Unused                 0x00F00000

#define IMAGE_SCN_LNK_NRELOC_OVFL     0x01000000 // Section contains extended relocations.
#define IMAGE_SCN_MEM_DISCARDABLE     0x02000000 // Section can be discarded.
                           
//该区D可丢弃
#define IMAGE_SCN_MEM_NOT_CACHED      0x04000000 // Section is not cachable.
#define IMAGE_SCN_MEM_NOT_PAGED      0x08000000 // Section is not pageable.
#define IMAGE_SCN_MEM_SHARED        0x10000000 // Section is shareable.
                           
//该区D可׃n
#define IMAGE_SCN_MEM_EXECUTE       0x20000000 // Section is executable.
                           
//该区D可执行
#define IMAGE_SCN_MEM_READ         0x40000000 // Section is readable.
                           
//该区D可?/span>
#define IMAGE_SCN_MEM_WRITE        0x80000000 // Section is writeable.
                           
//该区D可?/span>

最后写个程序把q个l构d?

׃我比较懒只MNameq个成员Q有些加壌Y件会修改Nameq个字段使读出来的东西ؕ七八p,比如UPX的压~壳Q会把Name字段ҎUPX0QUPX1q样




#include "windows.h"
#include
"stdio.h"

int main(int argc, char* argv[])
{
FILE
*p;
int i;
unsigned
long Signature;
IMAGE_FILE_HEADER myfileheader;
IMAGE_DOS_HEADER mydosheader;
IMAGE_OPTIONAL_HEADER myoptionalheader;
IMAGE_SECTION_HEADER mysectionheader;

p
= fopen("test.exe","r+b");
if(p == NULL)return -1;

fread(
&mydosheader,sizeof(mydosheader),1,p);
fseek(p,mydosheader.e_lfanew,SEEK_SET);
fread(
&Signature,sizeof(Signature),1,p);

fseek(p,mydosheader.e_lfanew
+sizeof(Signature),SEEK_SET);//指向IMAGE_FILE_HEADERl构的偏U?/span>
fread(&myfileheader,sizeof(myfileheader),1,p);

fseek(p,mydosheader.e_lfanew
+sizeof(Signature)+sizeof(myfileheader)+sizeof(myoptionalheader),SEEK_SET);
printf(
"Signature : %04X\n",Signature);
printf(
"IMAGE_SECTION_HEADER l构:\n");
for(i=0;i<myfileheader.NumberOfSections;i++){
fread(
&mysectionheader,sizeof(mysectionheader),1,p);
printf(
"Name : %s\n",mysectionheader.Name);
}

fclose(p);
return 0;
}



Tiany 2012-04-11 15:31 发表评论
]]>
学破?<?gt; PE格式之IMAGE_NT_HEADERShttp://www.shnenglu.com/tiany/archive/2012/04/11/170918.htmlTianyTianyWed, 11 Apr 2012 07:09:00 GMThttp://www.shnenglu.com/tiany/archive/2012/04/11/170918.htmlhttp://www.shnenglu.com/tiany/comments/170918.htmlhttp://www.shnenglu.com/tiany/archive/2012/04/11/170918.html#Feedback0http://www.shnenglu.com/tiany/comments/commentRss/170918.htmlhttp://www.shnenglu.com/tiany/services/trackbacks/170918.html阅读全文

Tiany 2012-04-11 15:09 发表评论
]]>
学破?<一> PE格式之MS-DOS MZ header http://www.shnenglu.com/tiany/archive/2012/04/08/170495.htmlTianyTianySun, 08 Apr 2012 14:24:00 GMThttp://www.shnenglu.com/tiany/archive/2012/04/08/170495.htmlhttp://www.shnenglu.com/tiany/comments/170495.htmlhttp://www.shnenglu.com/tiany/archive/2012/04/08/170495.html#Feedback0http://www.shnenglu.com/tiany/comments/commentRss/170495.htmlhttp://www.shnenglu.com/tiany/services/trackbacks/170495.htmlPE的意思就是这?the Protable Executable (PE) file format 微Y搞得那么一套东西,字面意思是可移植的Q但是现实用中没见他多么的可移植,PE格式借鉴了UNIXpȝ中的COFF (Common Object File Format) 格式。而且PE对MS-Dos的兼容,保留了MS-Dos_在dos下打开会提C?“q是win32E序在dos下不能跑” 向下兼容Q非常的友好?/span>

MS-DOS MZ header 的结构是q样?/span>

MS-DOS MZ header

typedef struct _IMAGE_DOS_HEADER {      // DOS .EXE header
    WORD   e_magic;                     // Magic number
    WORD   e_cblp;                      // Bytes on last page of file
    WORD   e_cp;                        // Pages in file
    WORD   e_crlc;                      // Relocations
    WORD   e_cparhdr;                   // Size of header in paragraphs
    WORD   e_minalloc;                  // Minimum extra paragraphs needed
    WORD   e_maxalloc;                  // Maximum extra paragraphs needed
    WORD   e_ss;                        // Initial (relative) SS value
    WORD   e_sp;                        // Initial SP value
    WORD   e_csum;                      // Checksum
    WORD   e_ip;                        // Initial IP value
    WORD   e_cs;                        // Initial (relative) CS value
    WORD   e_lfarlc;                    // File address of relocation table
    WORD   e_ovno;                      // Overlay number
    WORD   e_res[4];                    // Reserved words
    WORD   e_oemid;                     // OEM identifier (for e_oeminfo)
    WORD   e_oeminfo;                   // OEM information; e_oemid specific
    WORD   e_res2[10];                  // Reserved words
    LONG   e_lfanew;                    // File address of new exe header
  }
 IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;


其中比较关键的成员是q个 e_lfanew 它指向了PE文g头在PE文g中的相对虚拟地址RAV(Relative Virtual Addresses)Qe_magic的值应该等?0x5A4D 是MS-DOS MZ header的标?MZ好像是个E序员名字的~写 其他成员基本没啥大用Q一些加壌Y件会修改它的成员q节腾出空_或者在d节Ş式感染时节表N的空隙不够写入一个新的解表结构的时候把IMAGE_DOS_HEADE ?IMAGE_NT_HEADER 融合?/p>

可以自己写一个小E序来输Z下IMAGE_DOS_HEADE

IMAGE_DOS_HEADEq个l构体定义在windows.h?/p>

pȝ加蝲PE格式的文件时Q会先加载IMAGE_DOS_HEADEq个l构体,再根据结构体里的e_lfanew提供的相对偏UL到PE文g头?/p>


用c语言可以直接dIMAGE_DOS_HEADEq个l构体,下面开始写?/p>

从文件的开始位|读取IMAGE_DOS_HEADEl构?br />

fread(&mydosheader,sizeof(mydosheader),1,p);

吧文件指针移动到e_lfanew所指的相对偏移Q即PE文g?br />
fseek(p,mydosheader.e_lfanew,SEEK_SET);


dPE文g标志Q这个PE Signature?PE\0\0 q样一个|证明它是PE格式的n份?br />
fread(&sig,4,1,p);

q个判断中大写的变量都是Qwindows.h中的常数

 

IMAGE_NT_SIGNATURE 的值是 PE\0\0

IMAGE_DOS_SIGN

ATURE 的值是 MZ

具体的定义可以自己去windows.h中看


 if((mydosheader.e_magic ==IMAGE_DOS_SIGNATURE) &&
        (sig
== IMAGE_NT_SIGNATURE))
       printf(
"有效的PE文g/n");
    
else
      printf(
"无效的PE文g/n");
    
return 0;

下面是完整的E序

#include "windows.h"
#include
"stdio.h"

int main(int argc, char* argv[])
{
    FILE
*p;
    IMAGE_DOS_HEADER mydosheader;
    unsigned
long sig;

    p
= fopen("test1.exe","r+b");
    
if(p == NULL)return -1;

    fread(
&mydosheader,sizeof(mydosheader),1,p);
    fseek(p,mydosheader.e_lfanew,SEEK_SET);
    fread(
&sig,4,1,p);
    fclose(p);

    printf(
"IMAGE_DOS_HEADER dump:/n");
    printf(
"e_magic  : %04x/n",mydosheader.e_magic);
    printf(
"e_cblp  : %04x/n",mydosheader.e_cblp);
    printf(
"e_cp   : %04x/n",mydosheader.e_cp);
    printf(
"e_crlc  : %04x/n",mydosheader.e_crlc);
    printf(
"e_cparhdr : %04x/n",mydosheader.e_cparhdr);
    printf(
"e_minalloc: %04x/n",mydosheader.e_minalloc);
    printf(
"e_maxalloc: %04x/n",mydosheader.e_maxalloc);
    printf(
"e_ss   : %04x/n",mydosheader.e_ss);
    printf(
"e_sp   : %04x/n",mydosheader.e_sp);
    printf(
"e_csum  : %04x/n",mydosheader.e_csum);
    printf(
"e_ip   : %04x/n",mydosheader.e_ip);
    printf(
"e_cs   : %04x/n",mydosheader.e_cs);
    printf(
"e_lfarlc : %04x/n",mydosheader.e_lfarlc);
    printf(
"e_ovno  : %04x/n",mydosheader.e_ovno);
    printf(
"e_res[0] : %04x/n",mydosheader.e_res[0]);
    printf(
"e_oemid  : %04x/n",mydosheader.e_oemid);
    printf(
"e_oeminfo : %04x/n",mydosheader.e_oeminfo);
    printf(
"res2[0]  : %04x/n",mydosheader.e_res2[0]);
    printf(
"lfanew  : %08x/n",mydosheader.e_lfanew);


    
if((mydosheader.e_magic ==IMAGE_DOS_SIGNATURE) &&
        (sig
== IMAGE_NT_SIGNATURE))
       printf(
"有效的PE文g/n");
    
else
      printf(
"无效的PE文g/n");
    
return 0;
}



最后附上参考文章的地址

 

http://xue23.blog.163.com/blog/static/9793442005431142120/

http://bbs.fishc.com/home.php?mod=space&uid=9&do=blog&id=558

Peering Inside the PE.pdf

 

http://xue23.blog.163.com/blog/static/9793442005431142120/




Tiany 2012-04-08 22:24 发表评论
]]>
VMware + WinDbg 配置内核调试 http://www.shnenglu.com/tiany/archive/2012/03/03/167024.htmlTianyTianyFri, 02 Mar 2012 16:47:00 GMThttp://www.shnenglu.com/tiany/archive/2012/03/03/167024.htmlhttp://www.shnenglu.com/tiany/comments/167024.htmlhttp://www.shnenglu.com/tiany/archive/2012/03/03/167024.html#Feedback0http://www.shnenglu.com/tiany/comments/commentRss/167024.htmlhttp://www.shnenglu.com/tiany/services/trackbacks/167024.html借助VMware实现单机使用WinDbgq行调试的方法?

安裝VMware Workstation 6.0, WinDbg?br />
具体步骤如下Q?br />
1 讄 VMware 的虚拟com

1.1 q行 VMware Q点?"Edit virtual machine settings"

1.2 点击 "Add..." 来运?VMware ?Hardware Wizard


1.3 选择 "Serial Port"Q点 "下一?


1.4 选择 "Output to named pipe",?"下一?


1.5 W一框里保持默认?\\.\pipe\com_1 <==== 此可ZQ何名
W二框里?This end is the server."
W三框里?The other end is an application."
选中 "Connect at power on"
然后点击 "Advanced>>"


1.6 选中 "Yield CPU on poll"QVMware Support 中提Cq一点)Q然后点完成?br />


1.7 q样完成了虚拟com的设|?br />


1.8 重新启动 VM?br />
2 讄 VMware 虚拟出来?guest os

现在 power on 虚拟出来?guest os

2.1 讄boot.ini

在c:\下,可以扑ֈboot.iniQ可以用C本打开它。我们需要在 guest os 的启动项上加些参敎ͼ才能够用WinDbg调试它。我们可以在现有的行后面直接加参敎ͼ不过强烈推荐复制一个新行,在新行的后面加参数。这样在调试启动有问题的时候,我们可以方便的换回原来的启动方式。下面就是我改好的boot.ini?br />其中 " multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows XP Professional" /fastdetect "
是原来的行?br />" multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows XP Professional - debug" /fastdetect /noguiboot /debug /debugport=com1 /baudrate=115200 " 新加為用?WinDbg 调试的行?br />
------------------------------------------------------------------------------------------

[boot loader]
timeout=10
default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows XP Professional" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Microsoft Windows XP Professional - debug" /fastdetect /debug /debugport=com1 /baudrate=115200

-------------------------------------------------------------------------------------------

q里q要注意的是,timeout不要?Q否则直接启动默认的V新行后面加上了参数 /debug /debugport=com1 /baudrate=115200 Q可以看?debugport=com1 Qbaudrate=115200 。参数的具体作用Q可以参?WinDbg 的帮助文件?br />


2.2 讄com1端口的速度
?guest os 的设备管理器中把com1端口的速度也就?每秒位数",设ؓ和上面一L115200?/span>


3 讄 WinDbg

我们需要告诉WinDbg通过pipeq行q接和连接的速度。可以在命o提示W(cmd.exeQ下加参?br />-b -k com:port=\\.\pipe\com_1,baud=11520,pipe q行WinDbgQVMware Support 中没有提?baud=11520 q个参数Q其实这是个比较重要的参敎ͼ。更方便的方法是在桌面徏立一个WinDbg的快h式,在该快捷方式的属性,"目标"框中Q加上参?-k com:port=\\.\pipe\com_1,baud=11520,pipe 。这栯行这个快h式启动的WinDbg完成了讄。参数的具体作用Q可以参?WinDbg 的帮助文件?br />

4 推荐的操作顺?/strong>

4.1 首先q行 VMware Q启?Guest OS Q到pȝ启动选择Q选择 "Microsoft Windows XP Professional - debug" ,先不要按回R?br />
4.2 通过刚才讄好的快捷方式q行WinDbg?br />
4.3 ?Guest OS 中选择 "Microsoft Windows XP Professional - debug" ,按回车?br />
4.4 E等片刻Q就q接上了。如果很长时间没有连接上的话Q可以按 WinDbg 菜单中的 "Debug"->"Kernel Connection"->"Resynchronize"?
<=== 如有用命令選?此應不會發生


4.5 最后按 WinDbg 菜单中的 "Debug"->"Break" Q你可以向 WinDbg 下命令了?br />


? 其他
?.1 VMware Support 中还提到了可以通过修改虚拟机的配置文g来改变虚拟串口的速度Q有兴趣的话可以参?VMware Support 中的Ҏ?br />?.2 WinDbg 的菜单项 "View"->"Show Version" 可以看到一些相关信息?br />
参?
Driver Debugging with WinDbg and VMWare
http://silverstr.ufies.org/lotr0/windbg-vmware.html
VMware Support 相关部分 http://www.vmware.com/support/ws3/doc/ws32_devices3.html


One of the first useful things you will want to do when in the bowels of ring 0 is attack the thing from a debugger point of view. In my case I like using Windows Debugger [windbg] (hey its free, fully functional and does remote debugging really well), and found it neccessary to find a way to have it work with VMWare.

The trick to get it to work in VMWare is to get the host OS to believe it is able to connect to a serial port. Through VMWare, to accomplish this, you need to create a named pipe. The following steps will guide you to configuring VMWare (in my case v3.2):

  1. Open up the Configuration Editor (Settings->Configuration Editor)

     

  2. Click Add to run the Hardware Wizard

     

  3. Select Serial Port, and then click the Next button

     

  4. Select the Use named pipe radio button

     

  5. Use the default pipe name. It SHOULD be \\.\pipe\com_1. If it is not, change it to that.

     

  6. Select This end is the Server.

     

  7. Select The other end is an application.

     

  8. Click the Advanced Button.

     

  9. Select the Yield CPU on poll checkbox

    This is an important step as the Kernel in the target virtual machine uses the port in polled mode, not interrupt mode.

     

  10. Click the Finish button, and then click Ok to close the Configuration Editor.

    Once you have configured your VMWare session, you need to power it on. You will be able to confirm that the new virtual serial port is added by clicking on the Devices->serial0 menu item. You should note it is saying "Connecting". This means its now ready for a remote connection.

    Once the actual virtual machine is configured, you need to configure the target operating system installed in the virtual machine to support remote debugging. This is accomplished by editing the boot.ini found in the root of the C:\ drive. To do this, you need to add a /debugport=some_com_port /baudrate=some_baud_rate to the end of an [operating systems] line. I would not recommend doing it to the one that is there. It would be better to copy the line and paste it with the ammendments, and then use the OS's menu selection to determine which mode you would like to boot into. This is what my boot.ini looks like for XP Pro as the operating system in the virtual machine:

     

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional - Debug" /fastdetect /debugport=com1 /baudrate=115200

    You will notice that the second option sets the debugport to com1, and sets the baudrate to 115200. I am told you can tweak this out to get even more speed out. But it seems fine for me at this speed, so I haven't mucked with it at all. If you do try this, drop me an email and let me know how it works out.

    If you set up your boot.ini fine, save it and reboot. You should be prompted with something that looks like this:


    At this point you have completed setting up the VMWare side of things. Now you need to set up the host to connect to it. This is actually rather easy. You just need to tell windbg at the command like to connect to the pipe, like this:

    windbg -k com:port=\\.\pipe\com_1,pipe
    If you are using WinDbg 6.x or newer, a better alternative is to use:
    windbg -b -k com:pipe,port=\\.\pipe\com_1,resets=0

    Thanks needs to go to Randhir Dugal for pointing out the new format for the latest Windbg version.

    I am a rather anal type guy when it comes to security, so I actually made a shortcut on my desktop to WinDbg and added these command line arguments to the Target line. Originally this was so I could run WinDbg with differnet credentials as I do not run with administrator privileges on a day to day basis. I found that with XP's normal security settings for com ports, you can still work in a least privileged environment while doing the development WITHOUT having to use 'runas'. (You are logged into W2K/XP as a least priviledged environment aren't you? If not, you really should read my article on how, and why this is important to do so.)

    At this point fire up the debugger. With any luck you should see something that looks like this:


    If you are using a WinDbg version earlier than 6.x, you will find one issue with this approach. If you cannot seem to connect right away, close Windbg and restart it... it will then work. Seems flaky to me. But it works. And thats a Good Thing™. With the latest versions of WIndbg (6.x and newer) a new resets flag prevents this sort of hanging.

    That is all there is to it. At this point, you can now go nuts with remote debugging. To make sure it works for ya just add some DbgPrint() messages to your ring 0 driver and watch them echo to the screen. Past that, I will leave it to your imagination how to use the debugger :)

    Good luck!



Tiany 2012-03-03 00:47 发表评论
]]>
清除3389登陆日志http://www.shnenglu.com/tiany/archive/2012/03/01/166902.htmlTianyTianyThu, 01 Mar 2012 10:29:00 GMThttp://www.shnenglu.com/tiany/archive/2012/03/01/166902.htmlhttp://www.shnenglu.com/tiany/comments/166902.htmlhttp://www.shnenglu.com/tiany/archive/2012/03/01/166902.html#Feedback0http://www.shnenglu.com/tiany/comments/commentRss/166902.htmlhttp://www.shnenglu.com/tiany/services/trackbacks/166902.html

一:开?- E序 - 理工具 - 计算机管?- pȝ工具 -事g查看器,然后清除日志?/strong>

 

? Windows2000的日志文仉常有应用程序日志,安全日志、系l日志、DNS服务器日志、FTP日志、WWW日志{等?

 

日志文g默认位置Q?/p>

 

应用E序日志、安全日志、系l日志、DNS日志默认位置Q?sys temroot%\system32\configQ默认文件大?12KBQ管理员都会改变q个默认大小?/p>

 

安全日志文gQ?systemroot%\system32\config\SecEvent.EVTQ?/p>

 

pȝ日志文gQ?systemroot%\system32\config\SysEvent.EVTQ?/p>

 

应用E序日志文gQ?systemroot%\system32\config\AppEvent.EVTQ?/p>

 

Internet信息服务FTP日志默认位置Q?systemroot%\system32\logfiles\msftpsvc1\Q默认每天一个日志;

 

Internet信息服务WWW日志默认位置Q?systemroot%\system32\logfiles\w3svc1\Q默认每天一个日志;

 

Scheduler服务日志默认位置Q?sys temroot%\schedlgu.txtQ?/p>

 

 

以上日志在注册表里的键:

 

应用E序日志Q安全日志,pȝ日志QDNS服务器日志,它们q些LOG文g在注册表中的Q?/p>

 

HKEY_LOCAL_MACHINE\system\CurrentControlSet\Services\Eventlog

 

有的理员很可能这些日志重定位。其中EVENTLOG下面有很多的子表Q里面可查到以上日志的定位目录?/p>

 

Schedluler服务日志在注册表?/p>

 

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SchedulingAgent

 

 

FTP和WWW日志详解Q?/p>

 

FTP日志和WWW日志默认情况Q每天生成一个日志文Ӟ包含了该日的一切记录,文g名通常为exQ年份)Q月份)Q日期)Q例如ex001023Q就?000q?0?3日生的日志Q用C本就可直接打开Q如下例Q?/p>

 

#Software: Microsoft Internet Information Services 5.0Q微软IIS5.0Q?/p>

#Version: 1.0 Q版?.0Q?/p>

#Date: 20001023 0315 Q服务启动时间日期)

#Fields: time cip csmethod csuristem scstatus

0315 127.0.0.1 [1]USER administator 331 QIP地址?27.0.0.1用户名ؓadministator试图dQ?/p>

0318 127.0.0.1 [1]PASS – 530 Q登录失败)

032:04 127.0.0.1 [1]USER nt 331 QIP地址?27.0.0.1用户名ؓnt的用戯囄录)

032:06 127.0.0.1 [1]PASS – 530 Q登录失败)

032:09 127.0.0.1 [1]USER cyz 331 QIP地址?27.0.0.1用户名ؓcyz的用戯囄录)

0322 127.0.0.1 [1]PASS – 530 Q登录失败)

0322 127.0.0.1 [1]USER administrator 331 QIP地址?27.0.0.1用户名ؓadministrator试图dQ?/p>

0324 127.0.0.1 [1]PASS – 230 Q登录成功)

0321 127.0.0.1 [1]MKD nt 550 Q新建目录失败)

0325 127.0.0.1 [1]QUIT – 550 Q退出FTPE序Q?/p>

 

从日志里p看出IP地址?27.0.0.1的用户一直试囄录系l,换了四次用户名和密码才成功,理员立卛_可以得知理员的入R旉、IP地址以及探测的用户名Q如上例入R者最l是用administrator用户名进入的Q那么就要考虑更换此用户名的密码,或者重命名administrator用户?/p>

 

WWW日志Q?/p>

 

WWW服务同FTP服务一P产生的日志也是在%sys temroot%\sys tem32\LogFiles\W3SVC1目录下,默认是每天一个日志文Ӟ下面是一个典型的WWW日志文g

 

#Software: Microsoft Internet Information Services 5.0

#Version: 1.0

#Date: 20001023 03:091

#Fields: date time cip csusername sip sport csmethod csuristem csuriquery scstatus cs(UserAgent)

20001023 03:091 192.168.1.26 192.168.1.37 80 GET /iisstart.asp 200 Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98;+DigExt)

20001023 03:094 192.168.1.26 192.168.1.37 80 GET /pagerror.gif 200 Mozilla/4.0+(compatible;+MSIE+5.0;+Windows+98;+DigExt)

 

通过分析W六行,可以看出2000q?0?3日,IP地址?92.168.1.26的用户通过讉KIP地址?92.168.1.37机器?0端口Q查看了一个页面iisstart.asp,q位用户的浏览器为compatible;+MSIE+5.0;+Windows+98+DigExtQ有l验的管理员可通过安全日志、FTP日志和WWW日志来确定入侵者的IP地址以及入R旉?/p>

 

既你删掉FTP和WWW日志Q但是还是会在系l日志和安全日志里记录下来,但是较好的是只显CZ你的机器名,q没有你的IP?/p>

 

 

属性里记录了出现警告的原因Q是因ؓ有h试图用administator用户名登录,出现一个错误,来源是FTP服务?/p>

 

q里有两U图标:钥匙Q表C成功)和锁Q表C当用户在做什么时被系l停止)。接q四个锁图标Q表C四ơ失败审核,事gcd是帐L录和d、注销p|Q日期ؓ2000q?0?8日,旉?002Q这需要重点观察?/p>

 

双点W一个失败审怺件的Q即得到此事件的详细描述?/p>

 

l过分析我们可以得知有个CYZ的工作站Q用administator用户名登录本机,但是因ؓ用户名未知或密码错误Q实际ؓ密码错误Q未能成功。另外还有DNS服务器日志,不太重要Q就此略q(其实是我没有看过它)?/p>

 

知道了Windows2000日志的详l情况,下面p学会怎样删除q些日志Q?/p>

 

通过上面Q得知日志文仉常有某Ҏ务在后台保护Q除了系l日志、安全日志、应用程序日志等{,它们的服务是Windos2000的关键进E,而且与注册表文g在一块,当Windows2000启动后,启动服务来保护这些文Ӟ所以很隑ֈ除,而FTP日志和WWW日志以及Scedlgu日志都是可以L地删除的。首先要取得Admnistrator密码或Administratorsl成员之一Q然后Telnet到远E主机,先来试着删除FTP日志Q?/p>

 

D:\SERVER>del schedlgu.txt

D:\SERVER\SchedLgU.Txt

 

q程无法讉K文gQ因为另一个程序正在用此文g。说q了Q后台有服务保护Q先把服务停掉!

 

D:\SERVER>net stop "task scheduler"

 

下面的服务依赖于 Task Scheduler 服务。停?Task Scheduler 服务也会停止q些服务?/p>

 

Remote Storage Engine

 

是否l箋此操? (Y/N) [N]: y

Remote Storage Engine 服务正在停止....

Remote Storage Engine 服务已成功停止?/p>

 

Task Scheduler 服务正在停止.

Task Scheduler 服务已成功停止?/p>

 

OKQ它的服务停掉了Q同时也停掉了与它有依赖关系的服务。再来试着删一下!

 

D:\SERVER>del schedlgu.txt

D:\SERVER>

 

没有反应Q成功了Q下一个是FTP日志和WWW日志Q原理都是一P先停掉相x务,然后再删日志Q?/p>

 

D:\SERVER\system32\LogFiles\MSFTPSVC1>del ex*.log

 

D:\SERVER\system32\LogFiles\MSFTPSVC1>

以上操作成功删除FTP日志Q再来WWW日志Q?/p>

D:\SERVER\system32\LogFiles\W3SVC1>del ex*.log

 

D:\SERVER\system32\LogFiles\W3SVC1>

 

OKQ恭喜,现在单的日志都已成功删除。下面就是很隄安全日志和系l日志了Q守护这些日志的服务是Event LogQ试着停掉它!

 

D:\SERVER\system32\LogFiles\W3SVC1>net stop eventlog

 

q项服务无法接受h?"暂停" ?"停止" 操作。没办法Q它是关键服务。如果不用第三方工具Q在命o行上Ҏ没有删除安全日志和系l日志的可能Q所以还是得用虽然简单但是速度慢得L的办法:打开“控制面板”?#8220;理工具”中的“事g查看?#8221;Q?8没有Q知道用Win2k的好处了吧)Q在菜单?#8220;操作”Ҏ一个名?#8220;q接到另一台计机”的菜单,点击它,输入q程计算机的IPQ然后等上数十分钟,接着选择q程计算机的安全性日志,右键选择它的属性:点击属性里?#8220;清除日志”按钮QOKQ安全日志清除完毕!同样的忍受痛苦去清除pȝ日志Q?目前在不借助W三工具的情况下Q能很快Q很利地清除FTP、WWWq有Schedlgu日志Q就是系l日志和安全日志属于Windows2000的严密守护,只能用本地的事g查看器来打开它,因ؓ在图形界面下Q加之网速又慢,如果你银子多Q时间闲Q还是可以清除它的。综上所qͼ介绍了Windows2000的日志文件以及删除方法,但是你必LAdministratorQ注意必M为管理员或管理组的成员登录才能打开安全日志记录。该q程适用?Windows 2000 Professional 计算机,也适用于作为独立服务器或成员服务器q行?Windows 2000 Server 计算机?/p>

 

xQWindows2000安全知识基础讲完毕Q还有几句话要讲Q大家也看出来了Q虽然FTP{等日志可以很快清除Q但是系l日志和安全日志却不是那么快、那么顺利地能删除,如果遇到聪明的管理员Q将日志文g转移到另一个地方,那更是难上加难,所以奉劝大Ӟ千万不要拿国内的L做试验,国内的法律很严呀Q今天吃饭时Q听说有两个人开玩笑Q一个h把另外一个h的东西藏h了,l果那个Z急,报案了,于是藏东襉K个h被判四年刑!Q法官说法律是不开玩笑的!Q!所以大家一定要牢记q点Q?不要说我老生常谈)



Tiany 2012-03-01 18:29 发表评论
]]>
VS2008+WDK+DDKWzard 搭徏驱动开发环?/title><link>http://www.shnenglu.com/tiany/archive/2012/03/01/166901.html</link><dc:creator>Tiany</dc:creator><author>Tiany</author><pubDate>Thu, 01 Mar 2012 10:25:00 GMT</pubDate><guid>http://www.shnenglu.com/tiany/archive/2012/03/01/166901.html</guid><wfw:comment>http://www.shnenglu.com/tiany/comments/166901.html</wfw:comment><comments>http://www.shnenglu.com/tiany/archive/2012/03/01/166901.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/tiany/comments/commentRss/166901.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/tiany/services/trackbacks/166901.html</trackback:ping><description><![CDATA[<div id="iaug2qq" class="post-content"> <p><strong>一、WDK的介l、下载、安装及配制</strong></p> <p>1、关于WDK</p> <p>Windows Driver Kit(<strong>驱动E序工具?/strong>): 是一U完全集成的驱动E序开发系l,它包?Windows Driver Device Kit (DDK)Q用于测?Windows 驱动E序的可靠性和E_性,包括Q?/p> <ul><li><strong>Windows Driver Foundation (WDF)</strong> 化了 Windows 驱动E序的开发和支持?/li><li><strong>头文仉?/strong> QWindows Vista 和更高版本)通过提供更简单的目录l构、避免声明冲H以及对所有支持的 Windows 版本使用单一头文仉Q降低头文g的复杂性?/li><li><strong>Installable File Systems (IFS) Kit</strong>头、库、示例以及文档作?WDK 的一部分分发?/li><li><strong>验证E序和静态分析工?/strong>, Q如 PRE<em>f</em>ast ?nbsp;静态驱动程序验证程序)帮助您在~译时查?bug?/li></ul> <p>2、下载WDK</p> <p>曄下蝲WDK好像q必dhttp://connect.microsoft.com/注册后才能下载,而且下蝲后还有一句提C:</p> <p>“提醒Q您必须接受附带的许可条ƾ才能用此软g。不得分发下载Y件包?#8221;</p> <p><span id="more-39"></span></p> <p>所以当时下载的时候还要走一些不得不走的路。不q,今天好像发现WDK能直接下载了</p> <p>下蝲地址Qhttp://download.microsoft.com/download/4/A/2/4A25C7D5-EFBE-4182-B6A9-AE6850409A78/GRMWDK_EN_7600_1.ISO</p> <p>如果不能正常下蝲Q具体操作请见如何下载WDK</p> <p>3、安装WDK</p> <ol><li>用虚拟光驱加载下载好?ISO镜像文gQ双击运行,出现下面亲切的画?nbsp;<br /><img title="image" border="0" alt="image" src="http://202.206.196.103/2010/rsy/spltx/img/VS2008WDKDDKWzard_9F4E/image_thumb.png" width="244" height="174" /> </li><li>接触Q出C下画面,在左侧的树Ş复选框中选择要安装的lg及工P全部安装Q选择好后点击“OK”~~后面的就单了~ <br /><img title="image" border="0" alt="image" src="http://202.206.196.103/2010/rsy/spltx/img/VS2008WDKDDKWzard_9F4E/image_thumb_3.png" width="566" height="400" /> </li><li>后Q一路确定默认即?img title="image" border="0" alt="image" src="http://202.206.196.103/2010/rsy/spltx/img/VS2008WDKDDKWzard_9F4E/image_thumb_4.png" width="366" height="137" /></li></ol> <p> </p> <p><strong>二、DDKWzard的介l、下载、安装及配制</strong></p> <p>在VS2008IDE中没有提供驱动开发的目选项Q当然可以用普通工E,然后手动在)Q中配制相应的编辑连接以及调试选项Q但是如此只来,每次都要重复些复杂的步骤。在http://ddkwizard.assarbad.net/|站上发C一个很好用的辅助工具DDKWizardQ能够方便地对开发环境进行配|,真是适合xq样懒h啊,工具的作者也自称是因为懒惰才开发此工具Q看?#8220;懒惰是推动科技发展的动?#8221;一点不??/p> <ul><li>DDKwzard安装需要三个文ӞDDKWzardȝ序:安装VS2008的项目模板ddkwizard_setup.exe</li><li>DDKBUILD.CMDQ应该是用VS2008调用WDK~辑~译器的一pd脚本dkbuild_cmd.zip</li><li>DDKBUILD.BAT Q估计也是是用VS2008调用WDK~辑~译器的一pd脚本ddkbuild_bat.zip</li></ul> <ol><li>安装ddkwizard_setupQ默认安装,一路Next点过卛_Q将DDKBUILD.CMD与DDKBUILD.BAT考到WDK的安装目录,或者其它目录也行,只要在后l的讄p。如Q我其攑֜wdk的目录下Q如?nbsp;<br /><img title="image" border="0" alt="image" src="http://202.206.196.103/2010/rsy/spltx/img/VS2008WDKDDKWzard_9F4E/image_thumb_5.png" width="405" height="210" />    <br /> </li><li>讄环境变量 <br />d相应的环境变量,如要开发XPpȝ下的驱动则添加WXPBASEQ变量gؓWDK的根目录Q如?nbsp;<br /><img title="image" border="0" alt="image" src="http://202.206.196.103/2010/rsy/spltx/img/VS2008WDKDDKWzard_9F4E/image_thumb_6.png" width="306" height="337" />如果为其它系l开发驱动则填写相应的环境变?nbsp;<br />NT 4.0 ———–NT4BASE <p> </p> <p>windows2000—-W2KBASE</p> <p>windowsXP——-WXPBASE</p> <p>windows2003—-WNETBASE</p> <p>win7/2008 R2—-W7BASE</p></li><li>打开VS 2008Q菜?#8220;工具”->“选项”->左侧“目和解x?#8221;->“VC++目录”->右侧“可执行文?#8221;下拉列表->d一D:/WINDDK(Ҏ你的实际情况Q就是第1步中DDKBUILD.CMD与DDKBUILD.BAT所在的路径)?nbsp;<br /><img title="image" border="0" alt="image" src="http://202.206.196.103/2010/rsy/spltx/img/VS2008WDKDDKWzard_9F4E/image_thumb_7.png" width="408" height="225" /> <br /> </li><li>然后可以在我们的VS2008中新建项目了Q如下图Q在Visual C++选项卡中多了DDK Project的项目类型,选择相应的模板添加我们的目Q点ȝ?nbsp;<br /><img title="image" border="0" alt="image" src="http://202.206.196.103/2010/rsy/spltx/img/VS2008WDKDDKWzard_9F4E/image_thumb_8.png" width="541" height="362" /></li><li>定后出现DDKWzard的项目创建页面,?#8220;Choose the DDKBUILD you want to use”中选择“ddkbuild.cmd”或?#8220;ddkbuild.bat”Q在其下面选择我们要ؓWhoQ?000Qxp……Q开发的驱动?nbsp;<br />最后finish <br /><img title="image" border="0" alt="image" src="http://202.206.196.103/2010/rsy/spltx/img/VS2008WDKDDKWzard_9F4E/image_thumb_9.png" width="542" height="435" /></li><li>在解x案中便是由DDKWzard为我们自动生成的一个简单的驱动E序框架?nbsp;<br /> <img title="image" border="0" alt="image" src="http://202.206.196.103/2010/rsy/spltx/img/VS2008WDKDDKWzard_9F4E/image_thumb_10.png" width="239" height="328" /> </li><li>最后点击F6生成解决ҎQ成功生成后在项目的objchk_win7_x86/i386文g夹下会生成几个文?nbsp;<br />driver1.obj —~译生成?q制文g <br />driver1.pdb—用于调试时用的W号文g <br />vc90.pdb—–用于调试时用的W号文g <br /><strong>driver1.sys—是我们拭目以待的驱动程序文?nbsp;<br /></strong></li></ol></div> <img src ="http://www.shnenglu.com/tiany/aggbug/166901.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/tiany/" target="_blank">Tiany</a> 2012-03-01 18:25 <a href="http://www.shnenglu.com/tiany/archive/2012/03/01/166901.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.shnenglu.com/" title="精品视频久久久久">精品视频久久久久</a> <div class="friend-links"> </div> </div> </footer> <a href="http://www.sidongliiang.cn" target="_blank">þav</a>| <a href="http://www.xbxb1314.cn" target="_blank">޹˾Ʒþþùһ </a>| <a href="http://www.himalayasmuseum.com.cn" target="_blank">þ99ƷþֻоƷ</a>| <a href="http://www.modellesson.cn" target="_blank">ŷͽxxxxѿþþ</a>| <a href="http://www.jn928.cn" target="_blank">ھƷþ޻</a>| <a href="http://www.haoking.cn" target="_blank">þۺɫɫ</a>| <a href="http://www.qhsy210.cn" target="_blank">Ĺ˾Ʒþ޾ƷA뾫Ʒ </a>| <a href="http://www.taskbee.cn" target="_blank">ȫɫƴɫƬѾþþ</a>| <a href="http://www.zjhongfeng.cn" target="_blank">þù鶹91</a>| <a href="http://www.530taiji.cn" target="_blank">ƷþþþӰӲ</a>| <a href="http://www.yikafei.cn" target="_blank">99鶹þþùƷ</a>| <a href="http://www.3762g.cn" target="_blank">2021ٸþþþþþþþ</a>| <a href="http://www.worldedu.org.cn" target="_blank">þۺϹapp</a>| <a href="http://www.17779.com.cn" target="_blank">ԭۺϾþô</a>| <a href="http://www.211228.cn" target="_blank">ƷŮþøվ</a>| <a href="http://www.yrjiameng.cn" target="_blank">þô̫㽶av</a>| <a href="http://www.bai41.cn" target="_blank">þ붯aëƬ</a>| <a href="http://www.mmexse.cn" target="_blank">޾ƷĻþò</a>| <a href="http://www.beauty-queen.cn" target="_blank">þþƷ</a>| <a href="http://www.anfubbs.cn" target="_blank">þþƷҹһ</a>| <a href="http://www.173xp.cn" target="_blank">þþþëƬ</a>| <a href="http://www.fbnnfzx.cn" target="_blank">һþ㽶߿ۿ</a>| <a href="http://www.33759gov.cn" target="_blank">ž99Ʒþþþþ</a>| <a href="http://www.douyinyutang.cn" target="_blank">þþþӰԺŮ </a>| <a href="http://www.ubzr.cn" target="_blank">޹þþþþþ</a>| <a href="http://www.udhv.cn" target="_blank">ۺþþ</a>| <a href="http://www.ggpj.net.cn" target="_blank">պAVëƬƷþþ</a>| <a href="http://www.ytcp.com.cn" target="_blank">ĻþþƷ1</a>| <a href="http://www.motorbook.com.cn" target="_blank">þ޾ƷƷ</a>| <a href="http://www.zg-ly.cn" target="_blank">þþþӰԺС </a>| <a href="http://www.gzsaikou.cn" target="_blank">þ99žŹѿС˵</a>| <a href="http://www.trjyzj.cn" target="_blank">޾þˬ˾Ʒ </a>| <a href="http://www.fpsky.cn" target="_blank">ŷպƷþ </a>| <a href="http://www.ohos33.cn" target="_blank">˾þô߽ۺĻ</a>| <a href="http://www.73cc.cn" target="_blank">þþþƷ޳18վ </a>| <a href="http://www.malmoarts.cn" target="_blank">AV12þ</a>| <a href="http://www.outza.cn" target="_blank">ۺþþ</a>| <a href="http://www.mljy168.cn" target="_blank">޹Ʒþ98</a>| <a href="http://www.taoxh.cn" target="_blank">ƷþþþþþþþĻ</a>| <a href="http://www.2218335.cn" target="_blank">ŷ޹Ʒþ</a>| <a href="http://www.jsxtcmss.cn" target="_blank">ձƷþþþĻ8</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>