Commit Graph

738 Commits

Author SHA1 Message Date
momo5502
192d5687ff Provide x86_64 target descriptions 2025-01-19 09:37:59 +01:00
momo5502
270dbf000c Better thread exit check 2025-01-19 08:36:01 +01:00
Elias Bachaalany
8053889d20 introducing reflection concept into core components
the idea is to allow as much internal information into inner components.
to not burden all builds, the reflection level can be controlled
via the MOMO_REFLECTION_LEVEL (where 0 means no reflection code is
included).

more reflection variables will be introduced as needed.

for now, the memory manager's layout version is used to track whether
the memory layout is changed or not (at the lowest level).
the API consumer can use this to decide to refresh or not expensive
computations
2025-01-18 21:10:28 -08:00
momo5502
a16c17669d Fix target 2025-01-18 21:14:22 +01:00
momo5502
1a4ea584aa Fix vCont support 2025-01-18 21:01:38 +01:00
Maurice Heumann
608a1894da Speedup GDB data processing (#89) 2025-01-18 20:42:40 +01:00
momo5502
7c4b1ba3ca Speedup GDB data processing 2025-01-18 20:36:54 +01:00
Maurice Heumann
6084d3522c Refactor GDB stub (#88)
The intention of this PR is not yet to extend/fix the GDB functionality,
but rather to get rid the `mini-gdbstub` dependency.

Its functionality should have been reimplemented as closely as possible.

The main reason for this is better portability and security fixes (there
are numerous OOB read/write vulnerabilities in `mini-gdbstub`)
2025-01-18 20:34:20 +01:00
momo5502
9fc37fa3ef Small cleanup and utils 2025-01-18 19:36:12 +01:00
momo5502
4c5257098c Add logging line for later 2025-01-18 15:59:52 +01:00
momo5502
a0932e6803 Align register behaviour with implementation on main branch 2025-01-18 15:59:13 +01:00
momo5502
3dbd954c60 Fix includes 2025-01-18 15:58:51 +01:00
momo5502
b34ef0e546 Rename interface 2025-01-18 12:56:57 +01:00
momo5502
81fda5f8af Remove mini-gdbstub dependency 2025-01-18 12:49:10 +01:00
momo5502
cc252447d5 Multiple fixes 2025-01-18 12:43:55 +01:00
momo5502
5079b750cd Finish implementation 2025-01-18 11:43:54 +01:00
Maurice Heumann
75993e642a Bump deps/googletest from 7d76a23 to 2b6b042 (#87)
Bumps [deps/googletest](https://github.com/google/googletest) from
`7d76a23` to `2b6b042`.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2b6b042a77"><code>2b6b042</code></a>
Cast mutable lvalue references to const from testing::ResultOf</li>
<li><a
href="e4ece4881d"><code>e4ece48</code></a>
Enable safe matcher casts from <code>Matcher\&lt;const T&amp;&gt;</code>
to <code>Matcher\&lt;T&gt;</code>.</li>
<li><a
href="504ea69cf7"><code>504ea69</code></a>
Document unexpected interaction with death test error code and
gmock.</li>
<li><a
href="4bbf80823c"><code>4bbf808</code></a>
Add UnpackStructImpl for structs with 20 fields.</li>
<li>See full diff in <a
href="7d76a231b0...2b6b042a77">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
2025-01-18 09:39:20 +01:00
dependabot[bot]
0656ed1837 Bump deps/googletest from 7d76a23 to 2b6b042
Bumps [deps/googletest](https://github.com/google/googletest) from `7d76a23` to `2b6b042`.
- [Release notes](https://github.com/google/googletest/releases)
- [Commits](7d76a231b0...2b6b042a77)

---
updated-dependencies:
- dependency-name: deps/googletest
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-18 08:33:42 +00:00
momo5502
062c20d902 Fix compilation 2025-01-18 09:30:03 +01:00
momo5502
e79d919bbb More fixes 2025-01-18 09:28:23 +01:00
momo5502
2044a3c4ab GDB command progress 2025-01-18 09:20:08 +01:00
momo5502
3ecfa40ea7 Remove comments 2025-01-17 19:52:26 +01:00
momo5502
b180d9629c Refactor gdb interface 2025-01-17 19:50:06 +01:00
momo5502
2f6d17fde6 Process more commands 2025-01-17 18:21:23 +01:00
momo5502
cf76d5b4dc Extract connection handling 2025-01-17 18:02:35 +01:00
momo5502
0253592ae9 Integrate new gdb stub 2025-01-17 17:28:16 +01:00
momo5502
7d62d1e20e Support size limit 2025-01-17 17:28:16 +01:00
momo5502
64179c6580 Introduce helper classes 2025-01-17 17:28:16 +01:00
momo5502
942411686c Progress 2025-01-17 17:28:16 +01:00
momo5502
9e268ea4dc GDB stub progress 2025-01-17 17:28:16 +01:00
momo5502
8adc73de71 Prepare custom gdb-stub implementation 2025-01-17 17:28:16 +01:00
Maurice Heumann
e28317ea8f fixed typo in 'committed_region' struct (#86) 2025-01-17 16:59:49 +01:00
Elias Bachaalany
6879d1b06c fixed typo in 'committed_region' struct 2025-01-17 07:45:01 -08:00
Maurice Heumann
c4d3e480a9 exposed region inspection methods (#85)
allow inspecting regions from the emulator object. this is useful for
writing advanced tools that use the windows_emulator library
2025-01-17 16:34:18 +01:00
Maurice Heumann
e4ccaa1813 added '-r' switch to the analyzer (#84)
command line switch to specify the registry path to use with the
analyzer
2025-01-17 16:32:36 +01:00
Elias Bachaalany
0c40214c29 exposed region inspection methods
allow inspecting regions from the emulator object.
this is useful for writing advanced tools that use the windows_emulator
library
2025-01-17 07:27:39 -08:00
Maurice Heumann
faf2fa772f Exclude 'zlib' shared project from emulator lib (#83)
Shared targets are not compatible with the emulator lib.
2025-01-17 16:14:45 +01:00
Elias Bachaalany
1ce56e163b always disable zlib shared target 2025-01-17 06:36:33 -08:00
Elias Bachaalany
493388beb1 minor mods 2025-01-17 06:33:09 -08:00
Maurice Heumann
d8fd9d3e69 Exposing high level callbacks (#79)
The idea here is to start exposing various high level callbacks from
various sub components (syscalls, device io, etc.).

Consumer of `windows_emulator` can then hook into any callback.


Please give your feedback on this initial commit.
2025-01-17 07:15:13 +01:00
Maurice Heumann
9133859b59 expose loaded modules map from the module manager (#82) 2025-01-17 06:39:42 +01:00
Elias Bachaalany
1b712502bd added '-r' switch to the analyzer
command line switch to specify the registry path to use with the analyzer
2025-01-16 14:00:13 -08:00
Elias Bachaalany
bc7b9bc915 exclude 'zlib' shared project from emulator lib
Shared targets are not compatible with emulator lib.
2025-01-16 13:03:24 -08:00
Elias Bachaalany
78a11e2a60 expose loaded modules map from the module manager 2025-01-16 12:31:12 -08:00
Robert Yates
c4b76640c7 removed 'CHUNK' macro from global namespace (#81) 2025-01-16 21:20:59 +01:00
Robert Yates
e5a82b2e57 Exclude the 'tools' project from lib builds (#80) 2025-01-16 21:13:08 +01:00
Elias Bachaalany
bfd272e818 removed 'CHUNK' macro from global namespace 2025-01-16 12:10:33 -08:00
Elias Bachaalany
5251398288 Update CMakeLists.txt 2025-01-16 12:02:31 -08:00
Maurice Heumann
4c7e07ec2f 54 cross platform api set support (#75)
This PR provides configurable APISET data for the PEB

There are multiple ways the APISET data can be provided:

* host -> read the APISET from the host process
* file -> read the APISET from an external file
* w11  -> use an inbuilt dump from windows 11
* w10  -> use an inbuilt dump from windows 10

by default on windows it uses the "host" mode.
by default on linux/mac it uses the "w11" mode.

with the file mode you can use the dump-apiset tool to create a dump.
however the inbuilt w10 works fine on w11 so I don't expect it will be
needed.
2025-01-16 15:49:04 +01:00
robert-yates
7773ea6794 add apiset selection code 2025-01-15 20:55:15 +01:00