Commit Graph

263 Commits

Author SHA1 Message Date
momo5502
effd2f7a02 Merge remote-tracking branch 'origin/main' into wow64 2025-10-21 20:45:29 +02:00
Maurice Heumann
b84ae7475f Implement ALPC port abstraction and implement DNS resolver port (#558)
This PR introduces an abstraction for ALPC ports to make them easier to
manage in the future, and implements the DNS resolver port, at least
enough to get host address queries working.
There's a lot of code in this PR that I'm not very confident about, so
don't hesitate on the feedback 😄

<img width="1377" height="624" alt="image"
src="https://github.com/user-attachments/assets/4d56b84d-4b87-42ed-9bfa-be04dbbf3735"
/>
2025-10-21 20:42:26 +02:00
Maurice Heumann
304dbcc661 Comprehensive WOW64 subsystem implementation (#555)
# Major Features Implemented
**Core WOW64 Architecture**
1. Full TEB, PEB, and Windows structure implementations for 32-bit
processes
2. Proper thread context switching with 32-bit stack allocation
3. Configurable memory allocation with 32-bit/64-bit address space
handling
4. Automatic WOW64 process identification and handling
5. Heaven's Gate Implementation for handling exceptions

**Enhanced Emulation Features**
1. Fixed GDT setup and segment management for WOW64
2. Multi-architecture PE loading with proper import resolution
3. Segment-aware disassembly with WOW64 debugging capabilities

**Testing & Validation**
**32-bit Test Sample**: Minimal "hello" executable with full ASM source

# TODO
Needs more testing, currently in very early stages.
2025-10-21 20:13:01 +02:00
Igor Pissolati
248c09d554 Implement ALPC port abstraction and implement DNS resolver port 2025-10-19 23:23:29 -03:00
Igor Pissolati
887b02c240 Support file renaming and support relative path in NtQueryAttributesFile 2025-10-19 17:51:44 -03:00
brian
65eecf1cfd Comprehensive WOW64 subsystem implementation 2025-10-13 19:55:50 +08:00
momo5502
847765ec71 Log window access 2025-09-12 21:02:45 +02:00
momo5502
9c29f26647 Small fixes 2025-08-17 07:26:11 +02:00
momo5502
7d6648ade0 Extend clang-format column limit to 140 2025-08-16 14:55:07 +02:00
CarlTSpeak
cae1cf5c1f Added stubs for NtCreateNamedPipeFile NtReleaseWorkerFactoryWorker 2025-08-05 15:35:31 +01:00
momo5502
bda89b5d1e Add more syscalls 2025-06-15 19:48:05 +02:00
momo5502
43ff531354 Add NtRemoveIoCompletionEx syscall stub 2025-06-14 08:46:27 +02:00
momo5502
906cec808a Small fixes 2025-06-07 20:10:36 +02:00
Igor Pissolati
4fecea3aff Apply review suggested change 2025-06-02 14:34:12 -03:00
Igor Pissolati
9f32620220 Fix failing checks 2025-06-02 14:32:15 -03:00
Igor Pissolati
c67146ee45 Add new syscalls 2025-06-02 14:32:15 -03:00
momo5502
aa763c8392 Prepare more timer syscalls 2025-06-01 14:05:18 +02:00
momo5502
da658e5178 Prepare timer support 2025-06-01 13:56:45 +02:00
momo5502
c605131a80 Small changes 2025-06-01 12:48:59 +02:00
momo5502
ed80b86e22 Fix compilation 2025-06-01 07:54:42 +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
Igor Pissolati
e0507aa2c5 Fix afd_endpoint::ioctl_connect 2025-05-21 19:28:27 -03:00
Igor Pissolati
4b51123cd1 Properly reset completion event 2025-05-21 12:15:18 -03:00
Igor Pissolati
4888142d22 Better handling of NtCreateKey 2025-05-20 21:44:18 -03:00
momo5502
beea923a15 Fix warning 2025-05-18 10:52:52 +02:00
momo5502
67031b40ea More UI syscalls 2025-05-18 10:35:22 +02:00
momo5502
836262f3d7 Stub NtUserChangeWindowMessageFilterEx 2025-05-18 10:03:56 +02:00
momo5502
6241c10f02 Support window props 2025-05-18 09:51:46 +02:00
momo5502
0fbd563e8c Support window creation 2025-05-18 09:51:28 +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
a2b3b5f1c2 Prepare UI support 2025-05-17 17:05:57 +02:00
momo5502
e0ee80bade Prepare window support 2025-05-17 08:11:45 +02:00
Igor Pissolati
a629f77e31 Miscellaneous fixes 2025-04-28 12:48:28 -03:00
Igor Pissolati
97ec131c50 Improvements to NtQueryDirectoryFileEx 2025-04-24 17:31:49 -03:00
Igor Pissolati
44fcc9970d Fix failing checks 2025-04-23 01:51:37 -03:00
Igor Pissolati
8dfcf2755c Add stub for NtAreMappedFilesTheSame and modify NtSetInformationKey to return success 2025-04-23 01:03:42 -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
b5abcce65d Fix NtUserGetAtomName signature 2025-04-22 03:45:52 -03: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
039b276fb7 Add 3 new syscall stubs 2025-04-22 01:23:27 -03:00
Igor Pissolati
6deefb932f Add NtUserGetAtomName syscall 2025-04-22 01:19:05 -03:00
Igor Pissolati
763b8fc760 Improvements to registry syscalls 2025-04-20 16:09:04 -03:00
Igor Pissolati
317d90d7d8 Merge branch 'main' into pr/1 2025-04-20 01:34:06 -03:00
Igor Pissolati
e74b1dad5a Fix formatting (attempt 2) 2025-04-19 17:23:03 -03:00
Igor Pissolati
d8f8bd07f9 Fix failed check 2025-04-19 17:12:27 -03:00
Igor Pissolati
c702bedaee Add 3 new syscall handlers 2025-04-19 16:33:34 -03:00