Commit Graph

412 Commits

Author SHA1 Message Date
momo5502
31906fef2d Throw detailed exception 2025-04-18 08:30:41 +02:00
momo5502
4ac8d853a6 Always use static socket factory for emscripten 2025-04-18 08:15:17 +02:00
momo5502
c1553ad2ec Fixes for emscripten 2025-04-17 19:40:20 +02:00
momo5502
1959f94c39 Support logging for emscripten 2025-04-17 18:54:16 +02:00
momo5502
68022ef501 Fixes 2025-04-14 20:16:24 +02:00
Maurice Heumann
91c7ce43a1 Fix reading unicode strings 2025-04-14 15:03:16 +02:00
Maurice Heumann
f3caea91de Fix remaining structs 2025-04-14 15:03:05 +02:00
Maurice Heumann
0e9cffa5cb More 32 bit fixes 2025-04-14 14:34:06 +02:00
Maurice Heumann
00084e8ad0 Some fixes 2025-04-14 13:57:56 +02:00
Maurice Heumann
a6dd9251b8 Prepare 32 bit support 2025-04-14 13:57:54 +02:00
RektInator
acae9ff610 fix: fix parameters for NtQueryVirtualMemory in syscalls.cpp 2025-04-14 13:05:40 +02:00
RektInator
af26c8de61 fix: resolve comments, comment unused parameter in section.cpp 2025-04-14 13:00:36 +02:00
RektInator
e41a3be497 fix: comment unused parameter names 2025-04-14 12:56:09 +02:00
RektInator
6379370a50 fix(syscalls): fix VirtualQuery return size, ignore unimplemented APC flags and log a warning. 2025-04-14 12:43:11 +02:00
RektInator
7bf0b67167 wip 2025-04-14 12:23:08 +02:00
momo5502
52d4e7e281 Fix region info query 2025-04-14 07:46:53 +02:00
momo5502
4f8c374b01 Support initial memory protection 2025-04-14 07:46:19 +02:00
momo5502
b3139cfacd Small fixes 2025-04-13 16:38:50 +02:00
momo5502
2ed35d94b9 Set correct status 2025-04-13 15:00:39 +02:00
momo5502
7910021124 Fix apc dispatching 2025-04-13 14:28:35 +02:00
momo5502
30e77f5f9a Fix NtQueueApcThreadEx 2025-04-13 14:12:14 +02:00
momo5502
a3f811a466 Support all APC queue syscalls 2025-04-13 13:39:09 +02:00
momo5502
c1e621c2cd Basic hacky working APC dispatching 2025-04-13 13:39:09 +02:00
momo5502
a8926592bc Prepare APC dispatching 2025-04-13 13:39:09 +02:00
momo5502
bb4b159850 Implement NtQueueApcThreadEx2 2025-04-13 13:39:09 +02:00
momo5502
82227e4d41 Prepare NtQueueApcThreadEx2 support 2025-04-13 13:39:08 +02:00
momo5502
c0252a5f71 Add partial NtContinueEx support 2025-04-13 13:39:08 +02:00
momo5502
f58dec38a2 Prepare APC support 2025-04-13 13:39:08 +02:00
momo5502
8e0e81c02d Less intrusive AFD logging 2025-04-12 19:26:07 +02:00
momo5502
891dafaf26 Cleanup file syscalls 2025-04-11 21:05:11 +02:00
momo5502
facfe2b6bf More system information syscall cleanup 2025-04-11 17:59:30 +02:00
momo5502
915b31c093 Cleanup system information syscalls 2025-04-11 17:44:57 +02:00
RektInator
8bc49bdd03 refactor(windows-emulator/syscalls): partial refactor of syscalls.cpp, splits syscall implementations over multiple files 2025-04-11 16:42:00 +02:00
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