A process injection using process snapshotting based on https://gitlab.com/ORCA000/snaploader , in rust.
This is a PoC version. It does not use dynamic resolution of API calls, etc...
This program can be compiled as an exe, or used as a library in other rust programs.
To use as an exe, swap the SHELL_CODE in main.rs with your own shellcode and compile.
To use as a library, add the following to your Cargo.toml:
[dependencies]
snapinject_rs = { git = "https://github.com/Teach2Breach/snapinject_rs" }
Call the inject_shellcode function with your process name and shellcode.
snapinject_rs::inject_shellcode(&process_name, &SHELL_CODE).unwrap();
I left a bunch of commented out code in the main.rs that shows how to use some of the functions individually. I also left in a bunch of commented out print statements that may be useful for debugging and understanding the code.
$ claude mcp add snapinject_rs \
-- python -m otcore.mcp_server <graph>