8000 Fileless agent injection on Windows via Gum.Mapper by oleavr · Pull Request #1269 · frida/frida-core · GitHub
[go: up one dir, main page]

Skip to content

Fileless agent injection on Windows via Gum.Mapper - #1269

Closed
oleavr wants to merge 3 commits into
mainfrom
windows-mapper-injection
Closed

oleavr wants to merge 3 commits into
mainfrom
windows-mapper-injection

Conversation

@oleavr
@oleavr oleavr commented Oct 22, 2026
Copy link
Copy Markdown
Member

Summary

Make Windows agent injection fileless by mapping the agent directly into
the target with the cross-platform Gum.Mapper, instead of writing a
temporary DLL to disk and loading it via LoadLibrary. This mirrors the
Darwin backend and is gated by the existing mapper Meson option, now
enabled by default on Windows; the LoadLibrary path remains for builds
with the mapper disabled (-Dmapper=disabled).

Details

  • windows: Inject agents filelessly via Gum.Mapper — inject_library_blob
    maps the agent through a GumNativeProcessMemory remote target and runs a
    small emitted stub (x86/x64/arm64) that invokes the mapped image's
    constructor, calls its entrypoint, and runs the destructor when the agent is
    not staying resident. The blob is carried over the helper IPC
    (WindowsRemoteHelper.inject_library_blob) as well, so cross-architecture
    and elevated targets are covered.
  • fruity / barebone: Adopt renamed Gum.Macho module API — follow
    frida-gum's rename of the Mach-O parser types from Gum.Darwin* to
    Gum.Macho*.

Notes

  • Depends on the cross-platform mapper work in frida-gum (Gum.Mapper,
    Gum.ProcessMemory / Gum.NativeProcessMemory, and the Gum.Macho*
    rename). Build against that branch.
  • The embedded-agent file/resource path still uses LoadLibrary; only blob
    injection currently takes the mapper. Marked draft while that is finished.

Testing

  • Full build green on windows-arm64 (native).
  • Fileless injection verified end-to-end on native arm64: the agent is mapped
    and run through constructor -> entrypoint -> destructor.

The Mach-O parser types were renamed from Gum.Darwin* to Gum.Macho* in
frida-gum; follow suit here.
The Mach-O parser types were renamed from Gum.Darwin* to Gum.Macho* in
frida-gum; follow suit here.
Map the agent straight into the target with the cross-platform
Gum.Mapper instead of writing a temporary DLL and loading it through
LoadLibrary. A small emitted stub runs the mapped image's constructor,
calls its entrypoint, and runs the destructor when it is not staying
resident; GumNativeProcessMemory backs the remote reads, writes and
allocations.

Gated by the existing mapper option, now enabled by default on
Windows, so nothing touches the filesystem; the LoadLibrary path stays
for builds with the mapper disabled. Blobs are carried over the helper
IPC as well, so cross-architecture and elevated targets are covered.
@oleavr oleavr closed this Oct 27, 2026
@oleavr
oleavr deleted the windows-mapper-injection branch October 30, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

36BC

1 participant

0