Commit Graph

1185 Commits

Author SHA1 Message Date
dependabot[bot]
2468a03da0 Build(deps): Bump icicle-vm
Bumps [icicle-vm](https://github.com/icicle-emu/icicle-emu) from `ebb9bd1` to `0ce707e`.
- [Commits](ebb9bd1969...0ce707edd1)

---
updated-dependencies:
- dependency-name: icicle-vm
  dependency-version: 0ce707edd10f7a099426cf02a9fdf8eda3f57768
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-31 20:21:48 +00:00
momo5502
42630afac0 Remove randomness 2025-10-31 18:23:35 +01:00
momo5502
0e5bbdd8cc Fix serialization issues 2025-10-30 20:21:28 +01:00
momo5502
98eb1f92d1 Better formatting 2025-10-26 18:48:51 +01:00
momo5502
3bf037876c Remove logging 2025-10-26 18:48:43 +01:00
momo5502
cb4fe6c30f Merge remote-tracking branch 'origin/main' into wow64 2025-10-25 11:06:03 +02:00
Maurice Heumann
eb0ba686cd Bugfixes - minidump load, memory tail boundary (#568)
Minor change to allow minidump load to work with pages with copy
permission set.

File was probing memory via VirtualQuery incrementally, previously this
ran forever as Sogen doesn't replicate Windows behaviour.

Added exclusive allocation end boundary so that allocation / info check
on last page of user space VA works. Modified
memory_manager::find_free_allocation_base and
memory_manager::get_region_info to use exclusive boundary.
Added check to NtQueryVirtualMemory - now correctly returns
STATUS_INVALID_PARAMETER when run against memory outside of user space
VA. Kernel modules should use ZwQueryVirtualMemory not the user land
API.
2025-10-25 10:55:18 +02:00
CarlTSpeak
22df3e7889 Fix format issue 2025-10-24 11:13:55 +01:00
CarlTSpeak
064df5b6ef Revert earlier rdtsc changes, implement fixes 2025-10-24 10:59:28 +01:00
Igor Pissolati
b6d7a012d7 Fix issue in NtUserEnumDisplayDevices and NtUserEnumDisplaySettings 2025-10-23 16:02:53 -03:00
CarlTSpeak
96169a01a8 Merge branch 'main' of https://github.com/momo5502/sogen 2025-10-23 19:00:50 +01:00
Igor Pissolati
3c6c2e2dde Apply review suggestion 2025-10-23 11:19:35 -03:00
Igor Pissolati
2c82277b5e Add FileIdInformation file info class 2025-10-23 11:19:17 -03:00
Igor Pissolati
83aa3b663a Optimize module_manager::get_module 2025-10-22 17:21:34 -03:00
Igor Pissolati
46b97fd91c Don't request 'file_size' for directories 2025-10-22 17:21:04 -03:00
Igor Pissolati
c07f541528 Stub NtSetSecurityObject 2025-10-22 17:20:38 -03:00
Igor Pissolati
d20da12052 Add '\??\pipe\' prefix to is_named_pipe_path 2025-10-22 17:19:51 -03:00
Igor Pissolati
1c89c4e3b3 Initialize StaticUnicodeString in TEB 2025-10-22 17:18:41 -03:00
Igor Pissolati
0d06e6822a Add support for SHA256 in KSecDD 2025-10-22 17:17:57 -03:00
Igor Pissolati
4fbd65a302 Fix DISPLAY_DEVICEW value 2025-10-22 17:17:02 -03:00
Igor Pissolati
54ebbe27c2 Implement NtUserEnumDisplaySettings syscall 2025-10-22 17:16:10 -03:00
Igor Pissolati
c8a18cf61c Add FileIsRemoteDeviceInformation file info class 2025-10-22 17:14:51 -03:00
Igor Pissolati
c0fd8ebf51 Add FileFsAttributeInformation fs info class 2025-10-22 17:14:19 -03:00
momo5502
effd2f7a02 Merge remote-tracking branch 'origin/main' into wow64 2025-10-21 20:45:29 +02:00
momo5502
11ef37758c Fix casing 2025-10-21 20:43: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
momo5502
829836c333 Enable serialization tests 2025-10-21 20:41:53 +02:00
Maurice Heumann
7799f3dd74 Small timing fix (#563) 2025-10-21 20:35:19 +02:00
momo5502
652f8d7f17 Fix formatting 2025-10-21 20:15:20 +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
momo5502
8ef9349c37 Small timing fix 2025-10-21 20:12:28 +02:00
momo5502
facf997120 Small timing fix 2025-10-21 20:12:04 +02:00
Igor Pissolati
dc3a0e6fd4 Small improvements 2025-10-21 11:23:57 -03:00
CarlTSpeak
b64f780ff6 Merge branch 'main' of https://github.com/momo5502/sogen 2025-10-21 11:20:08 +01:00
Igor Pissolati
1a97f3b2e2 Fix failed check 2025-10-20 23:19:24 -03:00
Igor Pissolati
65de67b24f Use hard-coded values instead of calling __cpuidex 2025-10-20 22:52:56 -03:00
Igor Pissolati
6fe93375e6 Disable SSE4.x 2025-10-20 22:26:15 -03:00
Maurice Heumann
0e158b6064 Implement file renaming and relative path handling in NtQueryAttributesFile (#557)
This PR introduces several enhancements, mainly to the file system
syscalls:

- Implements file renaming via `NtSetInformationFile` by adding a
deferred rename mechanism to `file_handle`. The rename operation occurs
when the file handle is closed.
- Adds support for the `RootDirectory` parameter in
`NtQueryAttributesFile` to handle relative file paths.
- Adds support for opening the console output device (`\\??\\CONOUT$`).
- Stubs out the `NtLockVirtualMemory` syscall.
- Fixes an incorrect assertion in `socket_wrapper` that could fire on
`recvfrom` errors.
2025-10-20 15:08:37 +02:00
AlexGuo1998
66c7c3126d Fix std::chrono::system_clock::now()
In `ntdll!RtlGetSystemTimePrecise`, `kusd.SystemTime` is queried first, and QPC offset (`QPC() - kusd.BaselineSystemTimeQpc`) is added if it's larger than 0.
Setting `kusd.BaselineSystemTimeQpc` to `UINT64_MAX` avoids the adjustment, so incorrect adjustments won't happen.
Alternatively, We can update `kusd.BaselineSystemTimeQpc` to be the QPC value just when `kusd.SystemTime` changes, but that's not possible, because we cannot monitor `kusd.SystemTime` for change.
2025-10-20 10:30:44 +08: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
CarlTSpeak
1f5afe4c74 Minidump can load pages with C permission set. Minor instrumentation. 2025-10-18 14:19:53 +01:00
brian
65eecf1cfd Comprehensive WOW64 subsystem implementation 2025-10-13 19:55:50 +08:00
momo5502
9453123db0 Force new line at EOF 2025-10-12 17:21:51 +02:00
momo5502
b10a9d3f2e Regenerate flatbuffer files 2025-10-04 08:52:47 +02:00
Maurice Heumann
afdae4aa8e Update analysis.cpp 2025-09-25 07:31:22 +02:00
momo5502
6c5ca91b96 Shorter import logging 2025-09-21 16:45:24 +02:00
momo5502
3a55236fdf Dump LoadLibraryA argument 2025-09-13 10:31:19 +02:00
momo5502
a895de1a16 Fix allocator skipping 2025-09-13 09:42:15 +02:00
momo5502
847765ec71 Log window access 2025-09-12 21:02:45 +02:00