Previously, RDTSC in the VM always returned a constant value of 4, which
broke any timing-based operations, or caused detections in heuristics of
malware and ANTI-VM tools.
This patch introduces a spoofed rdtsc_fake counter that tracks and
adjusts timing deltas to simulate realistic TSC increments. Can be
extended to simulate rdtsc timings based on CPU clock speed.
Change type of chrono return to be auto
Co-authored-by: Maurice Heumann <MauriceHeumann@gmail.com>
simplify conditional compile and add #else to prevent clang-tidy breaking CI
Co-authored-by: Maurice Heumann <MauriceHeumann@gmail.com>
fix intrinsics, and resolve x86 compiler issues
- fix `time.hpp` compiler warnings (errors) and use proper intrinsic for gcc
- simplify tick calculation logic
- fix: exclude intrinsics include for non x86 builds and fix style
- fix: get() on clock_ unique ptr
Previously, RDTSC in the VM always returned a constant value, which broke any non deterministic timing-based operations, or caused detections in heuristics of malware and ANTI-VM tools.
This patch introduces a spoofed rdtsc_fake counter that tracks and adjusts timing deltas to simulate realistic TSC increments. Can be extended to simulate rdtsc timings based on CPU clock speed.
This will always use the windows release test sample artifacts. It
doesn't really make sense to test the debug artifacts. They're just
slower and do the same.
This will still run debug artifacts on windows.
The change only applies to non-windows platforms
This will always use the windows release test sample artifacts.
It doesn't really make sense to test the debug artifacts.
They're just slower and do the same.
This will still run debug artifacts on windows.
The change only applies to non-windows platforms