Commit Graph

145 Commits

Author SHA1 Message Date
momo5502
909b2db20d Support more mountpoint IOCTLs 2025-06-01 12:36:50 +02:00
momo5502
e763fdac54 Support more syscalls 2025-05-31 21:27:32 +02:00
momo5502
b6f4645420 Some more syscalls 2025-05-31 13:21:19 +02:00
momo5502
c50fdd17a4 Fix compilation warnings 2025-05-31 10:37:04 +02:00
momo5502
5c0a1ce5c2 Build and test MinGW in CI 2025-05-31 09:47:55 +02:00
Hacksign
829e3d95a6 UPDATE: modify cmake scripts, adding warning messages. 2025-05-30 12:37:35 +08:00
Hacksign
e9a6911019 NEW: Add cross compile support on X86_64 Linux with MinGW toolchain. 2025-05-29 18:48:04 +08:00
momo5502
4199177aa0 Optimize fuzzer 2025-05-28 21:37:29 +02:00
Igor Pissolati
d75d70e5ec Move new code out of network::socket 2025-05-21 12:15:18 -03:00
Igor Pissolati
4b83b20e19 Handle connect & Fix polling 2025-05-21 12:15:18 -03:00
Igor Pissolati
f5ed0752e3 Handle listen/accept/send/receive in afd_endpoint 2025-05-21 12:15:18 -03:00
momo5502
67031b40ea More UI syscalls 2025-05-18 10:35:22 +02:00
momo5502
b89000aae9 Fix warnings 2025-05-17 20:45:24 +02:00
momo5502
153fcc3691 Return display 2025-05-17 20:27:56 +02:00
momo5502
bd4e27469f Add more ui syscall stubs 2025-05-17 18:28:53 +02:00
momo5502
6a6f2fa0bc Fix linter warnings 2025-05-17 17:05:57 +02:00
momo5502
549d9e4625 Fix compilation 2025-05-17 17:05:57 +02:00
momo5502
a2b3b5f1c2 Prepare UI support 2025-05-17 17:05:57 +02:00
Igor Pissolati
b67a512ea6 Properly expand REG_EXPAND_SZ keys 2025-04-28 15:24:49 -03:00
Igor Pissolati
496fbd3a40 Fix TimeZoneInformation 2025-04-28 12:45:07 -03:00
Maurice Heumann
be9d0164d7 Improvements to NtQueryDirectoryFileEx (#235)
This PR aims to:
- [Stub FileBasicInformation in
NtSetInformationFile](6d0ad1dd61)
- [Make sure a root `windows_path` have slash at the
end](02ed4fbb03),
this was necessary because `directory_iterator` fails when the path is
`C:` (without slash)..
- [Improve
NtQueryDirectoryFileEx](f6ec1fc9cc)
by adding filename filtering support, including more basic file
information in the struct, and fixing an issue that prevented the last
chunk of files from being enumerated correctly.
2025-04-25 08:32:47 +02:00
Igor Pissolati
3d0ba3fee4 Fix failing check 2025-04-24 18:02:11 -03:00
Igor Pissolati
97ec131c50 Improvements to NtQueryDirectoryFileEx 2025-04-24 17:31:49 -03:00
Igor Pissolati
7fef4ebc24 Handle TokenGroups in NtQueryInformationToken 2025-04-23 18:22:06 -03:00
Maurice Heumann
1b9e114737 Improvements to locale syscalls, fix TimeZone query and add more syscalls (#223)
This PR aims to do the following:
- Add the `NtUserGetAtomName` syscall.
- Add stub handlers for `NtUserSetWindowsHookEx`,
`NtUserUnhookWindowsHookEx`, and `NtUserCreateWindowEx`.
- Implement `NtGetNlsSectionPtr` (for Code Pages), add
`NtQueryDefaultUILanguage`, and improve `NtQueryInstallUILanguage`.
- Handle `SystemTimeZoneInformation`,
`SystemCurrentTimeZoneInformation`, and
`SystemDynamicTimeZoneInformation` in `NtQuerySystemInformation`.
- Skip `ThreadAffinityMask` in `NtSetInformationThread`.
- Fix `NtConnectPort` to allow TimeZone queries to work properly. This
is probably the most problematic change here because it required messing
with the shared section and hardcoding an offset (2504). Initializing
the data in this offset seems necessary for calls like
`GetTimeZoneInformation` to succeed, so maybe there's no other way
around it.
2025-04-22 09:08:42 +02:00
Igor Pissolati
bd8818c335 Fix failing checks 2025-04-22 02:35:54 -03:00
Igor Pissolati
7e93f5d7f6 Improvements to locale syscalls and fix TimeZone query 2025-04-22 01:48:52 -03:00
Igor Pissolati
b40cfa2bed Apply suggested changes 2025-04-21 21:52:40 -03:00
Igor Pissolati
7dbf498ea9 Fix clang-tidy warning (attempt 2) 2025-04-20 17:08:54 -03:00
Igor Pissolati
763b8fc760 Improvements to registry syscalls 2025-04-20 16:09:04 -03:00
momo5502
cd348e0095 Add padding 2025-04-17 18:54:46 +02:00
momo5502
68022ef501 Fixes 2025-04-14 20:16:24 +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
a6dd9251b8 Prepare 32 bit support 2025-04-14 13:57:54 +02:00
RektInator
90256895c1 fix: add missing #define for SEC_RESERVE 2025-04-14 12:51:02 +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
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
71e8aab913 Ignore linter warnings 2025-04-13 13:39:08 +02:00
momo5502
c0252a5f71 Add partial NtContinueEx support 2025-04-13 13:39:08 +02:00
Soham Nandy
640cd500c3 fix typo on time.hpp
Co-authored-by: Maurice Heumann <MauriceHeumann@gmail.com>
2025-04-11 12:12:31 +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
55f29caf0f Revert "refactor: better conditional compilation on time.hpp"
This reverts commit 3bb599d356.
2025-04-11 02:26:28 +05:30
Soham Nandy
3bb599d356 refactor: better conditional compilation on time.hpp 2025-04-11 02:21:22 +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