MCPcopy Index your code
hub / github.com/Teach2Breach/snapinject_rs

github.com/Teach2Breach/snapinject_rs @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
7 symbols 13 edges 3 files 1 documented · 14%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

snapinject_rs

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...

Usage

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();

Notes

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.

Credits

  • This project is a derivative work based on snaploader, which is also licensed under the MIT License.

Core symbols most depended-on inside this repo

get_helper
called by 1
src/func.rs
capture_process_snapshot
called by 1
src/func.rs
get_hidden_injection_address
called by 1
src/func.rs
inject_and_rwx
called by 1
src/func.rs
snap_thread_hijack
called by 1
src/func.rs
inject_shellcode
called by 1
src/lib.rs
main
called by 0
src/main.rs

Shape

Function 7

Languages

Rust100%

Modules by API surface

src/func.rs5 symbols
src/main.rs1 symbols
src/lib.rs1 symbols

For agents

$ claude mcp add snapinject_rs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact