qemu-anti-detection icon indicating copy to clipboard operation
qemu-anti-detection copied to clipboard

QEMU still detected by hasp dongle drivers as virtual machine

Open STown2017 opened this issue 1 year ago • 5 comments

Latest version still detected by HASP dongle drivers as virtual machine. All patches applied. Still no success. Can we fix it?

STown2017 avatar Feb 18 '24 20:02 STown2017

you may patch RDTSC but it will effect your kernel, not recommended.

zhaodice avatar Feb 19 '24 06:02 zhaodice

Actually, the RDTSC patch by WCharacter only applies when a VM is running, so it isn't too concerning. However, if you don't have a beefy computer, patching the code means recompiling the kernel which can be time consuming. And when you are at it, you may want to use a custom kernel like Linux-TKG. It is definitely worth it, though, as it improves both performance and responsiveness.

Samuil1337 avatar Feb 19 '24 12:02 Samuil1337

Actually, the RDTSC patch by WCharacter only applies when a VM is running, so it isn't too concerning. However, if you don't have a beefy computer, patching the code means recompiling the kernel which can be time consuming. And when you are at it, you may want to use a custom kernel like Linux-TKG. It is definitely worth it, though, as it improves both performance and responsiveness.

Pretty sure the RDTSC patch you linked drains performance since it works by causing vm-exits for rdtsc. Adjusting the tsc offset should give you better performance but increases the complexity. Here is an old example by h33p doing it with kernel hooks: kvm-rdtsc-hack

mono606 avatar Feb 20 '24 12:02 mono606

Cool, I haven't seen this one. It isn't a drop-in patch like the other one, but seems interesting. Thanks!

Samuil1337 avatar Feb 20 '24 14:02 Samuil1337

But I have to add that I've been using it for quite some time now, and I have never countered CPU issues. VMs always have other bottlenecks in my opinion especially disk IO. Perhaps I will measure the performance loss from this patch someday.

Samuil1337 avatar Feb 21 '24 22:02 Samuil1337