<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><div>> Date: Tue, 28 Apr 2015 20:20:18 -0400<br>> From: crobinso@redhat.com<br>> To: abyssal90@hotmail.fr; virt-tools-list@redhat.com<br>> Subject: Re: [virt-tools-list] Libvirt: problem with hidding that a VM is running<br>> <br>> On 04/28/2015 04:31 AM, Antoine wrote:<br>> > Hello everyone,<br>> > <br>> > <br>> > I try to strengthen my virtual machine against malware by trying, as much as I<br>> > can, to hide the fact that malware is running inside a virtual machine. One<br>> > possible way to do it is to suppress the string “KVMKVMKVM” and the value 1 of<br>> > the Qemu variable 'CPUID_EXT_HYPERVISOR', which are both specified in the file<br>> > in './qemu-2.3.0-rc4/target-i386/kvm.c'.<br>> > <br>> > <br>> > Step 1) I'm doing the following modifications:<br>> > <br>> > <br>> > - Original unmodified version of kvm.c includes the following values:<br>> > <br>> > ret |= CPUID_EXT_HYPERVISOR; //line 219 in 'kvm.c'<br>> > <br>> > memcpy(signature, "KVMKVMKVM\0\0\0", 12); //Line 538 in 'kvm.c'<br>> > <br>> > <br>> > - My objective is to replace those values with the following :<br>> > <br>> > ret |= 0; //line 219 in 'kvm.c'<br>> > <br>> > memcpy(signature, "blablabla\0\0\0", 12); //Line 538 in 'kvm.c'<br>> > <br>> > <br>> > Step 2) I do “sudo make” and “sudo make install” in the qemu-2.3.0-rc4<br>> > directory, and then I replace the original file './usr/bin/qemu-system-x86_64'<br>> > with the new one.<br>> > <br>> > <br>> > While everything works fine with qemu-kvm and sdl (following the command line<br>> > that I'm using) :<br>> > <br>> > sudo qemu-system-x86_64 -enable-kvm -m 4096 img.qcow2 -smp cores=2<br>> > <br>> > With virt-manager I'm not able to start correctly the virtual machine. I have<br>> > the following problems :<br>> > <br>> > <br>> > If I'm using a Windows 7 .qcow2, Windows will start but right after windows<br>> > starts loading, It halts and I get the famous windows blue error screen saying :<br>> > <br>> > *** STOP: 0x000000A5 (0x0001000A, 0x00000000, 0x00000000, 0x00000000).<br>> > <br>> > While it could be an ACPI problem, I tried to uncheck the ACPI option in<br>> > virt-manager VM configuration but I still get the same error.<br>> > <br>> > <br>> > If I'm using a WindowsXP .qcow2, I always have the message “We apologize for<br>> > the inconvenience, but Windows did not start successfully […] Start Windows<br>> > Normally […] “ and no way to dodge/escape it.<br>> > <br>> > <br>> > I will be gratefull if someone may help me or have an idea about how to<br>> > implement these CPU modifications !<br>> > <br>> > <br>> > Running version:<br>> > <br>> > Ubuntu 14.04<br>> > <br>> > QEMU emulator version 2.2.94<br>> > <br>> > Libvirt 1.2.2<br>> <br>> There's already a qemu option to hide the KVM CPUID, its qemu -cpu $model,kvm=off<br>> <br>> Libvirt XML is:<br>> <br>>     <domain type='kvm><br>>       ...<br>>       <features><br>>         ...<br>>         <kvm><br>>           <hidden state='on'/><br>>         </kvm><br>>       </features><br>>       ...<br>> <br>> - Cole<br>> <br>> <br><br><br>Thank you for your answer.<br><br>I'll use the option "-cpu host,kvm=off" which is doing some good modifications.<br><br>If some people read this, they need to know that in order to implement the Libvirt XML solution, they need at least the Libvirt version 1.2.8 (currently with a basic "sudo apt-get install libvirt-bin" the version is only 1.2.2).<br><br>These 2 solutions don't fix the problem of the ' ret |= CPUID_EXT_HYPERVISOR ' but I don't need anymore virt-manager, so I'll implement the ' ret |= 0 ' to hide it in the VM.<br><br>Regards.<br></div>                                      </div></body>
</html>