确定在虚拟机中运行的时间 [英] Determine when running in a virtual machine

查看:186
本文介绍了确定在虚拟机中运行的时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个应用程序的官方方式来确定它是在VMWare还是Virtual PC上运行?(或者现在微软正在调用它)?我看到的代码通常是在特定版本的VMWare或虚拟PC中利用了一些奇怪的行为副作用的黑客。

Is there an official way for an application to determine if it is running in VMWare or Virtual PC (or whatever Microsoft is calling it now)? The code I have seen is usually a hack that took advantage of some odd behavioral side effect in a specific version of VMWare or Virtual PC.

理想的Delphi代码,但如果您可以链接到官方解释,那么我确信我可以转换它。

Ideally Delphi code, but if you can link to an official explanation then I am sure I can convert it.

推荐答案

我在去年写了一系列的文章,源代码。 VMware和Wine检测是 here 。虚拟PC是 here 。所有这三个都具有相当的铁包检测,因为有管理程序的记录回调(在Wine的情况下,是标准DLL的扩展)。我在评论部分中提出了一个未经测试的VirtualBox检测器(没有安装测试)。可能使用回调也可以检测到Parallels,但是我没有安装。文档的链接(由于来自安全研究人员的重点是漏洞),但位于这里,如果您已经安装并感兴趣。还有一个有关检测Sandbox,Bochs和Xen的信息的PPT here 。不是很多代码,但如果你必须检测到这些代码,它可能会给你一个起点。

I wrote a series of articles last year on this, with source code. VMware and Wine detection are here. Virtual PC is here. All three of these have pretty iron-clad detection because there are documented callbacks to the hypervisor (in the case of Wine, an extension to a standard DLL). I put up an untested VirtualBox detector (don't have it installed to test with) in the comment section. Parallels might be detectable using a callback also but I don't have it installed. The link for the documentation (which is poor since it's from a security researcher focusing on exploits) but located here if you have it installed and are interested. There's also a PPT here that has some information on detecting Sandbox, Bochs, and Xen. Not a lot of code in it but it might give you a starting point if you have to detect those.

这篇关于确定在虚拟机中运行的时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆