Commit Graph

379 Commits

Author SHA1 Message Date
Soham Nandy
ea7f6a68c8 Use auto for timestamp_counter tick type
Co-authored-by: Maurice Heumann <MauriceHeumann@gmail.com>
2025-04-11 12:12:56 +05:30
Soham Nandy
daeefb4a7f refactor(rdtsc): clean up code overall
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>
2025-04-11 06:39:01 +05:30
Soham Nandy
0271e39474 refactor(rdtsc): clean up tick logic,
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
2025-04-11 01:46:52 +05:30
Soham Nandy
dbc1b4439e feat: spoof rdtsc timings
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.
2025-04-10 06:58:01 +05:30
Maurice Heumann
67d34b3988 Small fix 2025-04-08 10:17:05 +02:00
momo5502
f1101cc90d Fix module lookup 2025-04-07 21:04:06 +02:00
momo5502
3c58c1af98 Log debug strings 2025-04-07 21:03:57 +02:00
Maurice Heumann
73c37eaeb1 Fix NtQueryInformationProcess ProcessDebugFlags 2025-04-07 15:47:00 +02:00
Maurice Heumann
66a529cf43 More logging 2025-04-07 15:36:25 +02:00
Maurice Heumann
f087d3998a Ignore certain function calls 2025-04-07 15:17:52 +02:00
momo5502
349526a54a Simplify hooking interface 2025-04-05 11:59:49 +02:00
momo5502
d191f8e667 Optimize MMIO handling 2025-04-05 09:03:41 +02:00
Maurice Heumann
8de5c7be3a Run icicle tests 2025-04-04 15:34:58 +02:00
Maurice Heumann
24df7c65c2 Support accurate instruction counts 2025-04-04 13:13:09 +02:00
momo5502
1cdf280fcf Support disabling rust code 2025-04-01 18:49:41 +02:00
momo5502
7d5555e985 Fix unicorn and switch back to it as default emulator 2025-04-01 18:37:00 +02:00
momo5502
637ed75b8c GDT fixes 2025-03-29 10:44:41 +01:00
momo5502
af6492be6d Unify setting segment base 2025-03-29 10:44:41 +01:00
Maurice Heumann
dec66f051d Test 2025-03-29 10:44:41 +01:00
Maurice Heumann
63f54df78c Icicle progress 2025-03-29 10:44:41 +01:00
momo5502
e0b0630171 Small cleanup 2025-03-29 10:44:31 +01:00
momo5502
2bc3cda062 Cleanup snapshot generation 2025-03-23 12:42:42 +01:00
momo5502
95dc6994b3 Add more dummy syscalls 2025-03-23 09:10:21 +01:00
momo5502
fef4124661 Support NtClearEvent 2025-03-22 21:19:04 +01:00
momo5502
56f304e3e0 "Support" SystemMemoryUsageInformation 2025-03-22 21:13:48 +01:00
momo5502
0dea8260cc Fix SystemLogicalProcessorInformation 2025-03-22 21:07:39 +01:00
momo5502
c4349bc4e6 Log message box strings 2025-03-22 20:32:18 +01:00
momo5502
53fb2f9116 Support more syscalls 2025-03-22 19:53:53 +01:00
momo5502
0b9fe3d7cc Slightly optimize performance 2025-03-22 17:54:39 +01:00
momo5502
61b159c860 Page align up region to be freed 2025-03-22 17:54:39 +01:00
momo5502
919f644034 Serialize sections 2025-03-22 13:07:43 +01:00
momo5502
13da0147ff Small progress 2025-03-22 10:09:39 +01:00
Maurice Heumann
851fe3acba Create proper emulator 2025-03-20 16:15:00 +01:00
Maurice Heumann
4da6642123 Add socket abstraction 2025-03-20 15:45:38 +01:00
Maurice Heumann
d21a114f84 Support path mappings for analysis 2025-03-19 12:30:49 +01:00
momo5502
df4208c34d Fix more warnings 2025-03-18 20:58:26 +01:00
momo5502
bf01b125ac Fix clang-tidy warnings 2025-03-18 20:40:14 +01:00
momo5502
d07656c1ee Disable PCH with clang-tidy 2025-03-18 20:22:37 +01:00
momo5502
db1ef0dd16 Include PCH everywhere 2025-03-18 20:19:26 +01:00
momo5502
a822f67ff9 Fix more clang tidy warnings 2025-03-18 19:16:26 +01:00
Maurice Heumann
95c7ffbf91 Move executed instructions into windows emulator 2025-03-18 12:35:38 +01:00
Maurice Heumann
2cc2137c3a Unify steady and system clock 2025-03-18 12:10:59 +01:00
Maurice Heumann
450e3c2a9c Use clock interfaces to precisely control time 2025-03-18 11:48:44 +01:00
Maurice Heumann
0a28b13d07 Small fix 2025-03-18 08:58:04 +01:00
Maurice Heumann
b746fc17ee Sanitize paths
This fixes #109
2025-03-18 08:49:13 +01:00
CarlTSpeak
fca3e026b0 Added handling of 2 info_classes to NtQueryInformationProcess and ThreadTimes to NtQueryInformationThread 2025-03-05 09:51:00 +00:00
momo5502
665ff99504 Some GDI fixes 2025-02-14 14:10:35 +01:00
momo5502
39ffa6c87b Fix volume information queries 2025-02-14 09:14:08 +01:00
momo5502
3218e26306 Small callback optimization and unification 2025-02-14 09:05:55 +01:00
Maurice Heumann
6b4e86073e added more callbacks (#141) 2025-02-14 08:06:26 +01:00