如何使用 PHP 管理服务器运行时的机密?

发布于 2024-11-06 20:45:20 字数 216 浏览 0 评论 0原文

我可能需要保护基于 LAMP 的服务器免遭第三方窃取或劫持。

我的想法是使用硬加密,使用主密钥对所有数据记录进行加密,如果服务器关闭,则无法恢复。因此,主密钥不能存储在文件系统中。

如果服务器运行,我将使用安全通道提供主密钥。

只要服务器继续运行,就应该能够使用它。如果服务器出现故障,密钥应该无法恢复。

在这种情况下最好的解决方案是什么(共享内存?)。

I probably need to protect a LAMP based server against being stolen or hijacked by a third party.

My idea is to use hard encryption to encrypt all data records using a master key, which can't be recovered, if the server shuts down. Thus, the master key can't be stored in the file system.

I'd provide the master key using a secure channel if the server runs.

The server should be able to use it, as long as it continues to run. If the server fails, the key should not be recoverable.

What would be the best solution in this case (shared memory?).

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

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

发布评论

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

评论(2

狼性发作 2024-11-13 20:45:20

您的意思是您正在尝试保护物理服务器免遭盗窃吗?如果是这样,我建议除了操作系统的内置安全性之外,物理安全性的主要机制根本不是基于代码的,而是一个很好的老式锁和钥匙。靠不住的自制加密机制不是答案——通过模糊实现安全不是安全。

Do you mean you are trying to protect a physical server against theft? If so, I suggest that beyond the operating system's built-in security, the primary mechanism for physical security is not code-based at all, but rather a good old fashioned lock and key. Wonky home-brewed encryption mechanisms are not the answer - security through obscurity is not security.

毁梦 2024-11-13 20:45:20

请提供有关应用程序类型以及需要保护哪些数据的更多详细信息。

一种非常常见的方法是:

  • 运行一个标准的 Linux 发行版,
  • 使用 root 密码和/或限制登录到 ssh,仅
  • 在系统启动时通过 ssh 进入该发行版,
  • 挂载加密驱动器(通过 ssh 或其他方式提供密钥文件,但只是暂时的 - 删除它们)战后 - 您可以有一个脚本,从外部 sftp 服务器下载该脚本,您可以激活/停用该进程)
  • ,当服务器停止(断电等)时,驱动器会被卸载,并且
  • 当服务器运行时 数据是安全的无法获取数据,
  • 可以设置额外的机箱入侵,但这并不是真正必要的,可以由真正想要

编辑的训练有素的技术人员来解决:

理论上是可能的 - 完全了解所有相关芯片和极高敏感设备,可物理劫持带电导体路径并捕获一些数据。 (我曾经看过 ata-33 PATA 电缆的演示。

为此,服务器必须安装移动电源并带入设备齐全的实验室。

但如果您有系统级加密层,则完全可以避免这种情况。地球上没有任何设备可以做到这一点。

Please provide more details on the kind of application and what data needs to be protected.

A pretty common way is:

  • run a standard linux distribution
  • have a root password and/or restrict login to ssh only
  • ssh into it when they system is up
  • mount the encrypted drives (provide the keyfiles over ssh or something, but only temporarily - delete them afterwars - you can have a script for that that downloads from an external sftp server that you can activate/deactive for the process)
  • when the server stops (power down etc) the drives get dismounted and the data is safe
  • when the server runs there is no way of getting to the data
  • additional chassies intrusion can be set up but is not really necessary and can be worked around by by a trained technician that really wants to

edit:

it is theoretically possible - with perfect knowledge of all involved chips and extremly high sensitive equipment to physically hijack into live conductor paths and catch some data. (i once saw a demonstration on ata-33 PATA cables.

the server would have to be put on a mobile power supply and brought into a fully equipped lab for that.

but you can totally avoid that if you have a system level encryption layer. theres no equipment on earth that can do somthing then.

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