停止存储访问?
出于安全原因(保护知识产权),我正在尝试构建一种方法来防止某些硬盘分区/USB 驱动器被访问。 我在想,当 Windows 尝试访问“锁定的驱动器/USB”时,尝试会停止并返回“驱动器无法访问”之类的内容。 这只是一个想法,有人认为它合理/可能吗? 如果是这样,有什么指示吗?
C/C++ -
谢谢
I am trying to construct a way to keep certain hard drive partitions/usb drives from being accessed for security reasons (protecting intellectual property). I was thinking that when windows attempts to access the "locked down drive/usb" the attempted is halted and returns something like "drive inaccessible" or something. It's just an idea, anyone thing it is plausible/possible? If so, any pointers?
C/C++
-Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您需要编写一个过滤器驱动程序来实现您的目标。 您需要将驱动程序放在磁盘驱动程序堆栈中的某个位置,并使要阻止的驱动器/分区的 IRP_MN_START_DEVICE 失败。
您将需要Windows 驱动程序工具包来编写驱动程序。 WDK 中有一个过滤器驱动程序的示例。 这个邮件列表非常有用,如果您搜索档案你会发现很多有关磁盘过滤驱动程序的信息。
这里有一篇关于编写过滤器驱动程序的好文章,我认为您需要注册才能阅读,但如果您想编写驱动程序,您应该在此站点上注册。
相关书籍列表可以在此处找到。
You will need to write a filter driver to achieve your goal. You will need to put your driver somewhere in disk driver stack and fail the IRP_MN_START_DEVICE for the drive/partition you want to block.
You will need Windows Driver Kit to write drivers. There is a sample of filter driver in the WDK. This mailing list as a very useful and if you will search the archives you will find a lot of information about disk filter drivers.
A good article about writing filter drivers is here, i think you will need to register to read, but if you want to write driver you should be registered on this site.
Relevant book list can be found here.
分区问题很简单。 只需使用 ACL 来阻止某些用户的访问即可。
对于驱动器访问,Windows 中的某个位置可能有一些设置可以禁用它。 在最坏的情况下,您可以尝试强行删除驱动程序(以及 Windows 读取驱动器/棒的能力)
The partitions problem is easy. Just use ACL's to prevent access by certain users.
For drive access, there is probably some setting somewhere in windows to disable it. In the worse case you could try to forcibly remove the drivers (and as such the capability of windows to read the drive/stick)
对于 USB 驱动器,您可以对其进行加密。
在工作中,我们使用 Pointsec 提供程序,它允许您在任何计算机上访问驱动器仅当您有密码时。
我确信有免费软件加密产品可用,
您也可以加密分区。
(基本上我不确定为什么你想为可以通过其他方法充分管理的东西编写一些 c/c++ 代码)
For USB drives you could encrypt them.
At work we use Pointsec provider, which allows you to access the drive on any machine only if you have a password.
I'm sure there are freeware encryption products available
You could probably encrypt the partitions too.
(basically I'm not sure why you would want to write some c/c++ code for something that could be adequately managed by other methods)
您需要对驱动器进行加密,否则任何其他操作都会允许攻击者将驱动器连接到另一台计算机并提取内容。
您不应该自己实现加密 - 最好依赖其他人审查过的代码。 我建议使用 TrueCrypt 来加密您的驱动器。
然后,也许您想在应用程序中放置一个钩子,以便在要访问加密数据时提示输入密码。 或者,您在计算机上安装 TrueCrypt,并让用户在想要访问数据时连接驱动器,具体取决于处理数据的精确方式。
You need to encrypt the drives, anything else would allow attackers to just attach the drive to another machine and extract the contents.
You shouldn't implement encryption yourself - it's much better to rely on someone else's reviewed code. I suggest TrueCrypt for encrypting your drives.
Then maybe you want to put a hook in your application to prompt for the password when it wants to access the encrypted data. Or you install TrueCrypt on the machine, and make the user connect the drive when they want to access the data, depending on the precise way of working with the data.
意识到。 任何涉及内核工作的事情,如果您在该领域还没有经验,那么开发时间都以年为单位。
Be aware. Anything involving kernel work, if you are not already experienced in that field, has a development time measured in years.