zhzhtst
驱动牛犊
驱动牛犊
  • 注册日期2006-07-11
  • 最后登录2018-05-05
  • 粉丝0
  • 关注0
  • 积分13分
  • 威望153点
  • 贡献值0点
  • 好评度22点
  • 原创分4分
  • 专家分0分
1040楼#
发布于:2009-09-18 12:44
good
kkkkkkkkkkk
驱动牛犊
驱动牛犊
  • 注册日期2009-09-27
  • 最后登录2009-09-27
  • 粉丝0
  • 关注0
  • 积分5分
  • 威望51点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1041楼#
发布于:2009-09-27 09:38
欣赏一下
jiry_left
驱动牛犊
驱动牛犊
  • 注册日期2009-09-27
  • 最后登录2009-09-27
  • 粉丝0
  • 关注0
  • 积分3分
  • 威望31点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1042楼#
发布于:2009-09-27 11:21
感谢。
rljy2004
驱动牛犊
驱动牛犊
  • 注册日期2009-07-28
  • 最后登录2011-05-01
  • 粉丝0
  • 关注0
  • 积分14分
  • 威望141点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1043楼#
发布于:2009-09-29 20:14
文件加密标识 -OSR经典对白

本部分设定了隐藏,您已回复过了,以下是隐藏的内容  第一篇
FS Filter Driver question
________________________________________
Dear NTDev folks,

We are writing a FileSystem Filter Driver, that mangles the contents of
a particular file, such that:
1) the content is Mangled on Write, and
2) Unmangled on Read.

Our Mangling actually increases the size of the file, and we also insert
our own header data in the beginning of the file.

However we still want to present the "correct" file-length to the client
programs (e.g. they shouldn't know that the data is actually mangled
before it's stored in the file).

We have been able to do this, to some degree, by handling the Read/Write
IRPs, and modifying the length fields in the QueryInformation IRPs (for
both File Information, and Directory Listings).

However, we are worried that interactions between the underlying
FileSystem Driver, and the Cache Manager may expose the real length of
the file in some cases (e.g. through the FileSize field in the
FSRTL_FCB_COMMON_HEADER structure stored in the FsContext field of the
FileObject), or cause other problems.  We are not able to find a good
discussion on Data Modifying filter drivers in the IFS kit documentation
or in the "Windows NT File System Internals" Book by Rajeev Nagar.

FileSystem Filter Drivers that do non-length-preserving Encryption or
Compression must face the same issues that we are coming across.  We
would really appreciate it if you folks could shed some light on how the
cache manager may affect FileSystem Filter Drivers that mangle the
content of the file such that the actual file length changes, or if you
could suggest some resources where this information is available.

Re: FS Filter Driver question
________________________________________
Why put the "header" at the beginning?  It is the most difficult place to put it
and maintain any semblance of obfuscation.  Put it at the end and give yourself
enough space to permit expanding it easily.  I would recommend that the last
128, 256, 512, etc bytes be the "header/trailer".  If expansion becomes required
later, you can expand downwards from that fixed part of the header that will let
you know the file is yours.

The following are questions you need to answer before you design your solution:

1.    Can the file be accessed in "mangled" form by any program, at any time?  
Backup?
2.    Can the file be modified by any of the Microsoft Office programs?
3.    Why do you care if one program "knows" the file size if wrong?  What can
be revealed?



Re: FS Filter Driver question
________________________________________
I don't see any problem with FCB's FileSize having bigger value than what
you report through other interfaces.
However, I must agreed with David that having header at the beginning of
the file is not the best solution. The only significant advantage
I can see is that you simplify handling of file expansion (only
considering that header has fixed size). However you gain a lot of
complications
trying to keep the header out of the cache, dealing with
FileObject->CurrentByteOffset for sequential files (these are just from
the top of my head).
So, unless there are particular reasons why you want to have your header
at the beginning of the file, I would suggest to put it at the end or even
strip it completely from the file and keep it somewhere else.

Regards,

Vladimir



Re: FS Filter Driver question
If you're on NTFS you could consider keeping it in an alternate stream in the file.


Re: FS Filter Driver question
________________________________________
Hi David, Vlad, Peter,

Thanks so much for your helpful suggestions.

- We keep the fixed-size header data in the file for our own informational
purpose, and this header is not necessarily related to the content-mangling
algorithm (with which we mangle the actual contents of the file).

- Even if we don't keep the header in the beginning of the file, doesn't the
problem of trying to hide it from the Cache Manager still exist?
(we currently do adjust the FileObject->CurrentByteOffset for certain IRPs to
skip the header, and we keep the header in the beginning for only the reasons
that Vlad mentioned).

- Also, let's assume that we keep no header in the file, our mangling algorithm
still increases the length of the file (similar to an encryption algorithm), if
the Cache Manager is able to read the "increased size" of the file, but then it
is not able to get all the data (because we are un-mangling and giving it the
actual data (which is smaller in size)), will that cause problems?

- The files we mangle can be binaries or data files, e.g. MS Office Programs can
certainly use them as documents, or DLLs. (if our driver is loaded, these files
will be read correctly, if our driver is not loaded, then the file will be seen
as containing garbage data).

- Lastly, we need to be agnostic of File System types (i.e. we can't rely on
NTFS features, which would have been nice :-) ).


Re: FS Filter Driver question (Tony Mason - DDK MVP)
________________________________________
The only way I've seen this work is to construct a filter that works much
like the compression support for NTFS - that is, your "filter" integrates
into the cache manager and then creates different file objects which it
sends to the underlying FSD.  The version YOU maintain in the cache has the
right length/size information, which is what will be used by application
programs.

Then your "filter" calls the underlying FSD to obtain the data (in mangled +
offset) form.  That the file size underneath you is different doesn't
matter.

Of course, when you are done what you have is more like a stacked file
system than a filter - these are the most complex filters that I've seen,
and I think are harder to develop than a file system.

Re: FS Filter Driver question
________________________________________
Ways to keep the header out of the cache are conceptually different for those two cases. In case if header is at the end you may not even care if it gets into the cache (unless you don't want to expose its content). And event if you don't want anybody to see what is in it, you can simply get its valid content in the read completion routine and then fill the buffer with some garbage. But if you have the header at the beginning you can't afford it to get cached at all because in this case you will end up screwing actual file content when file gets memory mapped. I’m not saying it is impossible. I just think that avoiding this problem will give you more headaches than supporting file expansion with the header at the end.


Re: FS Filter Driver question
________________________________________
Tony: Isn’t “shrinking” bigger file into cache significantly different than expanding smaller file? Since in this case CM will allocate enough pages to fit actual file content? And what does it mean “filter" integrates into the cache manager”? Do you mean that filter will initialize (and whole 9 yards) FO that it receives in the create dispatch and use actual FS just to read/write mangled file? Or there is something else?



                                    第二篇




On Fly encryption filter driver

I am developing a file system filter driver on windows 2000, which does on fly encryption and decryption. I would like to know what is best method to mark the file for encryption. My plan is to add a header information to the encrypted file so that the filter driver will use this information to identify the encrypted file when it is read or written to the disk. Does this solution have any side-effects ? One more issue I have identifed is with temporary files that are created by applications like MS-Word, Visual studio. For example, if an encrypted word document is opened with MS-Word, it creates a temporary document with the same contents and when the document is saved it deletes the original document and renames the temporary document to the orignal name. Since the temoprary document is not marked for encryption its contents will NOT be in encrypted format and when it is renamed to orginal document it is still unencrypted. But the user thinks that the original document is encrypted and hence it is a bug. Is there any solution for this ?


Re: On Fly encryption filter driver
________________________________________
> I am developing a file system filter driver on windows 2000, which does on
> fly encryption and decryption. I would like to know what is best method to
> mark the file for encryption.

Sideband data in the registry, INI file or such.

> My plan is to add a header information to the encrypted file so that the

This will require major effort in dealing with 2 concepts of file sizes.

The encryption filter which adds a header or changes the file size if not a
filter, but more like a complete FSD (which its own FCBs, own file sizes and
Cc/Mm interaction) built on top of another FSD.

For a simple filter, avoid changing the file size and avoid adding headers
Galosy
驱动牛犊
驱动牛犊
  • 注册日期2009-04-14
  • 最后登录2009-12-07
  • 粉丝0
  • 关注0
  • 积分2分
  • 威望21点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1044楼#
发布于:2009-09-30 11:06
ok
good
simonjiang
驱动牛犊
驱动牛犊
  • 注册日期2009-09-10
  • 最后登录2009-10-12
  • 粉丝0
  • 关注0
  • 积分4分
  • 威望41点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1045楼#
发布于:2009-10-01 00:48
愿意见识一下
superleopard
驱动牛犊
驱动牛犊
  • 注册日期2009-09-11
  • 最后登录2013-05-21
  • 粉丝0
  • 关注0
  • 积分16分
  • 威望121点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1046楼#
发布于:2009-10-07 21:50
朋友,我公司从事透明加解密产品已经2年,具备强大的市场资源,和一个稳定的团队,目前正在补充驱动方面的程序员。楼主有没兴趣一起合作,工作地点为浙江杭州,待遇优厚并配股权,详情参见:http://prj.csdn.net/projdetail.aspx?pointid=15341

有兴趣请联系
QQ:31953960
MAIL:superleopard2005@yahoo.com.cn
amazingzyx
驱动牛犊
驱动牛犊
  • 注册日期2009-03-06
  • 最后登录2010-01-19
  • 粉丝0
  • 关注0
  • 积分18分
  • 威望181点
  • 贡献值2点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1047楼#
发布于:2009-10-09 15:44
好文章,看下!
nth2say
驱动牛犊
驱动牛犊
  • 注册日期2009-10-09
  • 最后登录2014-03-17
  • 粉丝1
  • 关注0
  • 积分28分
  • 威望281点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1048楼#
发布于:2009-10-09 16:39
好帖子必然要恢复
nobounded
驱动小牛
驱动小牛
  • 注册日期2003-08-14
  • 最后登录2011-07-07
  • 粉丝0
  • 关注0
  • 积分360分
  • 威望258点
  • 贡献值0点
  • 好评度32点
  • 原创分0分
  • 专家分0分
1049楼#
发布于:2009-10-09 18:03
kanakan
zhw55885
驱动牛犊
驱动牛犊
  • 注册日期2009-10-10
  • 最后登录2014-02-21
  • 粉丝0
  • 关注0
  • 积分12分
  • 威望121点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1050楼#
发布于:2009-10-10 17:49
ddddd
大家好
buptwang
驱动牛犊
驱动牛犊
  • 注册日期2009-07-01
  • 最后登录2011-01-05
  • 粉丝0
  • 关注0
  • 积分4分
  • 威望41点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1051楼#
发布于:2009-10-10 20:39
学习一下~~
robertbaggio
驱动牛犊
驱动牛犊
  • 注册日期2009-04-21
  • 最后登录2011-05-27
  • 粉丝0
  • 关注0
  • 积分10分
  • 威望81点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1052楼#
发布于:2009-10-10 22:18
我也在研究透明加密的课题,来看一下。
tingzouzou
驱动牛犊
驱动牛犊
  • 注册日期2009-09-28
  • 最后登录2011-03-23
  • 粉丝0
  • 关注0
  • 积分6分
  • 威望61点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1053楼#
发布于:2009-10-12 08:45
看看~~
werther2001
驱动牛犊
驱动牛犊
  • 注册日期2009-09-11
  • 最后登录2015-05-28
  • 粉丝0
  • 关注0
  • 积分20分
  • 威望191点
  • 贡献值1点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1054楼#
发布于:2009-10-12 10:17
什么啊,有源码吗?
pjxymn
驱动牛犊
驱动牛犊
  • 注册日期2009-08-17
  • 最后登录2018-03-01
  • 粉丝0
  • 关注0
  • 积分33分
  • 威望292点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
  • 社区居民
1055楼#
发布于:2009-10-15 09:42
多谢了
zzw315
驱动牛犊
驱动牛犊
  • 注册日期2007-03-20
  • 最后登录2013-03-06
  • 粉丝0
  • 关注0
  • 积分30分
  • 威望251点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1056楼#
发布于:2009-10-21 15:39
看看是什么,怎么搞定的啊?
flipflop
驱动牛犊
驱动牛犊
  • 注册日期2003-06-20
  • 最后登录2018-03-24
  • 粉丝0
  • 关注0
  • 积分24分
  • 威望213点
  • 贡献值0点
  • 好评度3点
  • 原创分0分
  • 专家分0分
  • 社区居民
1057楼#
发布于:2009-10-22 19:54
kankan
iorigl
驱动牛犊
驱动牛犊
  • 注册日期2009-04-29
  • 最后登录2010-03-18
  • 粉丝0
  • 关注0
  • 积分7分
  • 威望71点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
1058楼#
发布于:2009-10-24 21:25
see   ~~sese~~~
fashion220cn
驱动牛犊
驱动牛犊
  • 注册日期2007-01-17
  • 最后登录2017-07-04
  • 粉丝0
  • 关注0
  • 积分9分
  • 威望91点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
  • 社区居民
1059楼#
发布于:2009-10-27 11:41
谢谢分享!
游客

返回顶部