Azure WebApp 实例中的安全性

Security in Azure WebApp Instance

我的网络应用程序有一个带有私钥和标志的证书 xml。签名时,私钥在内存中(受 LSA 保护,因为 .Net 使用 NCrypt)。

问题: 我的理解是 azure web-app 实例是单独的 VM 运行 IIS,VM 可能 运行 在 hyper-V 主机上以及其他 VM。鉴于此,VM-Host 是否有可能访问 VM-Guest 的内存并读取私钥 - 从而危及签名证书?

你是 运行 一个你无法物理控制的服务器,你没有安全感。

从 运行 VM 检索私钥是一件相当微不足道的事情。首先,您将在标准 hyper-v 中进行内存转储(我们不知道 MS 在 Azure 中使用什么)

livekd -hvl
livekd -hv <VMName> -p -o C:\Memory.dmp

这将列出所有虚拟机,第二个命令将转储其中一个的内存。 (取自 Taking a dump of a VM running on Hyper-V

其次,您需要找到并提取私钥,甚至有一个 python 脚本可以为您完成这项工作。了解它 here

In short, you can find RSA private keys (PKCS #8) and SSL certificates (x509) by scanning for header and version constants found in the ASN.1 representations. The dumpcerts plugin for Volatility uses this scanning approach to find, extract, and parse these keys and certificates from physical memory or virtual memory

(阅读脚本背后的理论 here

还要考虑到 Microsoft 编写了整个堆栈,他们很可能拥有 VM 的调试版本,他们确切地知道证书的存储方式(因为他们编写了代码)他们不需要逆向工程之类的那些文章确实如此,他们可以与撰写它的工程师交谈。