授权 USB 密钥的最佳方式是什么

发布于 2024-08-28 13:33:28 字数 227 浏览 7 评论 0原文

我们的软件有自动更新功能,通过 USB 密钥安装(自动运行)。如果我想确保只使用授权的 USB 密钥,最好的方法是什么?

我们的安装程序已经签名,否则它将无法运行。但我更想检查 USB 密钥是否有签名的安装程序,如果它不存在,则忽略甚至“弹出”USB 设备。

我应该能够区分 USB 存储设备和相机或键盘之间的区别(在代码中)。

我只想禁用未经授权的存储设备。

谢谢你的想法。

We have an auto update for our software that is installed via USB key (with the auto run). If I wanted to ensure that only authorized USB Keys were used, what's the best way?

Our installer is already signed, and it won't run otherwise. But I'm more wanting to inspect the USB Key for a signed installer, and if it's not there, just ignore, or even "Eject" the USB device.

And I should be able to tell the difference (in code) between a usb storage device, and say a camera, or keyboard.

I'm only wanting to disable non-authorized storage devices.

Thank you for your ideas.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

留一抹残留的笑 2024-09-04 13:33:28

未经授权的存储设备?这取决于您希望它的安全程度。对于最安全的级别,它将包括:

  • 写入闪存驱动器的特殊固件,以获取额外的“元信息”(阅读:闪存驱动器的昂贵定制制造)
  • 闪存驱动器中读取元信息
  • 特殊的 Windows 驱动程序,用于从程序谈论的 该设备驱动程序以确认其已获得授权。

或者对于最不安全的级别,您有以下选项:

  • 使用隐藏文件和特殊密钥(可能是上次文件系统修改的哈希时间或其他什么?)(dd 可破坏)
  • 下降到文件系统级别以下并重新创建您自己的非常简单的文件系统..(通过模糊性提高安全性,而 dd 可能会打破这一点)

另外,对于“最安全”的选项,您确实需要一种比自动运行和设备驱动程序更安全的运行程序的方式(这可能是半生不熟的,可以做任何事情)出现授权)。为什么您希望它只从授权的闪存驱动器进行更新?

non-authorized storage devices? This depends on how secure you want it to be. For the most secure level, it would consist of:

  • special firmware written to the flash drive to get extra "meta info" (read: expensive custom manufacturing of flash drives)
  • special windows driver to read that meta info from the flash drive
  • your program talking to that device driver to confirm it's authorized.

Or to the least secure level you have these options:

  • using a hidden file and a special key(possibly hashed time of last filesystem modification or something?) (dd breakable)
  • dropping below the filesystem level and recreating your own very simple filesystem.. (more security through obscurity though and dd could break that)

Also, for the "most secure" option, you really need a more secure way of running the program than auto-run and a device driver(which could be half-baked to make anything appear authorized). Why do you want it to only update from an authorized flash drive anyway?

何止钟意 2024-09-04 13:33:28

您或许能够读取 USB 驱动器的序列号(假设您获得的 USB 驱动器具有序列号;并非所有 USB 驱动器都有序列号)。然后,您的应用程序可以打电话回家获取最新的授权序列号列表,并检查是否存在匹配。

You might be able to read the USB drive's serial number (assuming you get USB drives that have serial numbers; not all do). Then your application could call home to get the latest list of authorized serial numbers, and check to see if there is a match.

妞丶爷亲个 2024-09-04 13:33:28

Earlz 的反应很好,尽管我认为您不需要定制制造闪存驱动器...您只需要带有某种唯一固件加密标识符的闪存驱动器。或许 Kingston Data Traveller Line 中的某些功能可以解决问题。 (我从未真正使用过这些加密的 USB 记忆棒,所以我对实际的实现细节有点模糊)。

Earlz response is good, though I don't think you'd need custom manufacturing of flash drives... you would just need flash drives with some sort of unique firmware encrypted identifier. Perhaps something in the Kingston Data Traveler Line might do the trick. (I've never actually used one of these encrypted usb sticks, so I'm a bit foggy on the actual implementation details).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文