在XP Embedded中使用Enhanced Write Filter(EWF)功能
作者:淡月清风 日期:2009-05-18
1.简介
Enhanced Write Filter (EWF) 功能是Windows XP Embedded 提供的一个磁盘写入保护组件,使用它可以保护磁盘分区不被病毒侵入,就如同装了还原卡一般方便。其原理是通过一个文件过滤驱动,将系统对被保护分区的所有写操作都重定向到其他存储区域(内存或一个特殊的硬盘分区,这个存储区域在微软的文档中称为覆盖,下称覆盖),需要时,可以将写入到覆盖中的数据再提交到被保护分区,具体请参见:http://www.microsoft.com/china/MSDN/library/Mobility/embedded/USdnxpesp1ewfwinxp.mspx?mfr=true

1.1 关于覆盖
有两个基本类型 EWF 覆盖。
a.首先是基于磁盘的覆盖,它将所有写入操作重定向到硬盘上的不同分区,如果需要,可以将覆盖分区中存储的数据提交到受保护的分区,XPE每个分区最多支持 9 个覆盖(可以理解为保存了9个系统还原点)。
b.第二种类型的覆盖是基于 RAM 的覆盖。基于 RAM 的覆盖将所有写入操作重定向到内存。通常,当计算机关闭或重新启动时,该数据会丢失。
| 基于磁盘的覆盖 | 基于 RAM 的覆盖 | |||||||||||||||
|
优点 |
|
|
||||||||||||||
|
缺点 |
|
|
2.安装配置EWF
a.添加组件
Enhanced Write Filter
Enhanced Write Filter API (EWF API)
EWF Manager Console application
EWF NTLDR
b.设置Enhanced Write Filter组件(针对DISK类型的覆盖)
|
||||||||||||||||||||||||||||
| 要保护的分区数量 | ||||||||||||||||||||||||||||
| 最多支持的覆盖数 | ||||||||||||||||||||||||||||
| 覆盖分区的空间大小 | ||||||||||||||||||||||||||||
| 磁盘序号 | ||||||||||||||||||||||||||||
| 分区序号 | ||||||||||||||||||||||||||||
| 覆盖类型 | ||||||||||||||||||||||||||||
c.将目标机的硬盘留下4G左右的自由空间
执行FBA的时候,系统将自动在自由空间上创建一个覆盖分区。
3.使用EWF
build完系统,并在目标机上执行了FBA之后,就可以使用EWF了。
http://lzg-ad.blog.sohu.com/80248200.html(ewfmgr命令及参数详解)
a.检查是否启用了EWF:
Protected Volume Configuration
Type DISK
State ENABLED(ENABLED代表已经启动了EWF功能)
Boot Command NO_CMD
Param1 0
Param2 0
Persistent Data ""
Volume ID 18 6B 13 E2 00 7E 00 00 00 00 00 00 00 00 00 00
Device Name "\Device\HarddiskVolume1" [C:]
Max Levels 1
Clump Size 512
Current Level 1
Disk space used for data 6611968 bytes
Disk space used for mapping 1900 bytes
Memory used for mapping 4096 bytes
--- Levels ended ---
b.将当前的系统状态提交到被保护的磁盘分区(该命令在重启后才执行):
C:\Documents and Settings\Administrator>ewfmgr -commit C:
*** Committing overlay to the protected volume.
Protected Volume Configuration
Type DISK
State ENABLED
Boot Command COMMIT
Param1 0
Param2 0
Persistent Data ""
Volume ID 18 6B 13 E2 00 7E 00 00 00 00 00 00 00 00 00 00
Device Name "\Device\HarddiskVolume1" [C:]
Max Levels 1
Clump Size 512
Current Level 1
Disk space used for data 6912512 bytes
Disk space used for mapping 2125 bytes
Memory used for mapping 4096 bytes
--- Levels ended ---
c.还原系统到曾经保存的系统状态(该命令在重启后才执行):
C:\Documents and Settings\Administrator>ewfmgr -restore C:
*** Restoring to prior level
*** Deleting overlay data beyond level 0
Protected Volume Configuration
Type DISK
State ENABLED
Boot Command SET_LEVEL
Param1 0
Param2 0
Persistent Data ""
Volume ID 18 6B 13 E2 00 7E 00 00 00 00 00 00 00 00 00 00
Device Name "\Device\HarddiskVolume1" [C:]
Max Levels 1
Clump Size 512
Current Level 1
Disk space used for data 7355392 bytes
Disk space used for mapping 2200 bytes
Memory used for mapping 4096 bytes
--- Levels ended ---
d.输完命令就后悔了怎么办:
C:\Documents and Settings\Administrator>ewfmgr -nocmd
The Ewf Volume is "\Device\HarddiskVolume3"
Ewf Volume Configuration
Volume Size 4194279936
Segments 8192
Segment Size 511488
Free segments 8176
Max Levels 1
Max Protected Volumes 1
Protected Volumes 1
Ewf Volume percent full 0.20
Protected volumes
Device Name "\Device\HarddiskVolume1" [C:]
HORM Not supported
注意,如果要做GHOST,需要使用-ir开关。
http://social.msdn.microsoft.com/Forums/en-US/embeddedwindowstools/thread/0fd0f082-3f05-495f-b4fd-4a53b9172d8e
推荐一个这方面技术的大牛博客:http://lzg-ad.blog.sohu.com/entry/5732151/ (雷志刚博客)
上一篇
下一篇


文章来自:
Tags:
相关日志:





