范伟 等:KVM 虚拟化动态迁移技术的安全防护模型
1403
concerns many users becomes a hot issue in the industry and academia. This article focuses on researching the mechanism of
virtualization and the source code of virtualization operating system, and explores breakthrough in security problems of live migration.
Firstly the article analyzes potential memory-leak security threat of live migration. Then it designs and puts forward a new security
protection model based on hybrid random transform coding method. Combined with KVM (kernel-based virtual machine) virtualization
structure, communication mechanism and migration mechanism, the model adds monitor module and security module at source and
destination of live migration, ensuring the data security while the virtual machines are migrating. Finally, a series of experiments are
designed to simulate and test the security protection capability of the model and its impact to virtual machine’s performance. The
simulation results show that the proposed model can ensure the security of live migration in the KVM virtualization environment, as well
as balance the security of virtual machines and performance of live migration.
Key words: KVM virtualization; live migration; security protection model; hybrid random transformation
虚拟化技术是实现云计算为用户提供灵活增减 IT 资源、按需付费等特色服务的基础核心,在虚拟化环境
下,云计算才成为可能,所以虚拟化技术无疑成为了研究热点.虚拟化架构主要由宿主机、虚拟化层和虚拟机组
成,虚拟机动态迁移技术是在保持虚拟机为用户提供持续服务的状态下,从一个虚拟平台宿主机迁移到另一个
虚拟平台宿主机中,为资源的整合和动态调度带来了巨大便利,虚拟平台厂商都各自提出了自主的动态迁移技
术,目前流行的 KVM 虚拟化技术是基于硬件虚拟化的 Linux 全虚拟化解决方案,发展迅速,迁移技术日趋完善,
但忽略了对安全问题的重视,存在一些安全威胁.
Oberheide
[1]
在 2008 年就从 3 个方面对虚拟机动态迁移的安全性进行了实验与分析,分别是 VMM(virtual
machine monitor,虚拟机监控器,等同于 Hypervisor,是虚拟化操作系统的核心)控制层、数据层和迁移模块层.在
VMM 控制层,由 VMM 实施启动及管理在线迁移,所以它的通信机制必须经过验证并抗篡改,黑客可能会通过
VMM 控制层来影响在线虚拟机迁移,进而控制客户虚拟机.在数据层,虚拟机的内存信息必须得到保护,防止被
嗅探和篡改.在迁移模块层,如果黑客根据迁移模块的漏洞破坏 VMM,那么他可能完全控制 VMM 和其他所有
虚拟机.针对数据层的攻击,黑客通常采用地址解析协议(address resolution protocol,简称 ARP)欺骗、域名系统
(domain name system,简称 DNS)污染以及路由劫持等手段,通过监视在线迁移通道,黑客可以从迁移的内存信
息中提取出用户账户、口令等敏感信息.Oberheide 利用 Xensploit 工具(即:Oberheide 设计的工具可以在动态迁
移过程中实施中间人攻击)对源 Domain0 和目的 Domain0 之间迁移的 DomainU 中部分内存信息进行了篡改,
验证了数据层的安全威胁.Yamunadevi
[2]
在 KVM 虚拟化平台上进行了动态迁移实验,也证实了被迁移虚拟机内
存上的信息容易被黑客截获.另外,本团队
[3,17]
从 2012 年开始就一直对动态迁移过程中内存泄漏安全问题进行
研究,可还原出虚拟机迁移过程中的内存泄漏数据.黄休平
[47]
等人可以根据特征值恢复源文本信息,增加了虚
拟机迁移过程中的安全隐患.
由于虚拟机动态迁移期间传输的数据是不安全的,Sulaiman 等人提出通过使用 IPsec(Internet protocol
security,网络安全协议集)实现数据在宿主机之间安全传输
[8]
,并通过调整 MTU(maximum transmission unit,最大
传输单元)和 MSS(maximum segment size,最大段大小)的值来提高迁移时的表现.Pati 提出使用 RSA 算法(一种
公钥解密算法)和 SSL(secure sockets layer,安全套接层协议,一种常用加密算法)来保证数据安全
[9]
,并使用
MOSIX 软件(集群软件)将内存迁移确保负载均衡.Nagin 等人提出基于 SSH 通道的在线迁移方式
[10]
,保证迁移
过程的安全,这些方法虽然能够有效防止监听者窃取传输的虚拟机数据,在一定程度上保证迁移虚拟机实例的
传输安全,但是它无法保证虚拟机是否被迁移到一个可信的服务器中,这样容易造成虚拟机的失控,而且也未采
取任何方式的完整性保护措施,无法确认传输的虚拟机实例是否被篡改.并且这种方式明显增加了动态迁移中
虚拟机的宕机时间,性能大大下降.
可信平台模块(trusted platform module,简称 TPM)是由可信计算组(trusted computing group)指定的规范,使
用 TPM 芯片可以搭建一个安全且可信赖的运算平台,通过虚拟化技术可以让每个虚拟机拥有一个 TPM(实际
上使用物理机上的 TPM),此 TPM 为 VTPM(虚拟 TPM)
[11]
,通过 VTPM 迁移协议可以验证源和目的 VMM 的完
整性并在动态迁移前创建一个安全的连接通道,张新方等人则对基于可信通道的 VTPM 迁移协议进行改进
[12]
,
改进的协议使用加密、完整性检验和随机数保证迁移数据的完整性、机密性和及时性.但是基于 VTPM 的迁
评论0