Files
youssefnoob003-SindriKit/include/sindri/injection/context.h
T
sibouzitoun aea2eb6cfb Release v1.1.0: Process Injection & Architecture Hardening
- Implement complete cross-process injection engine via snd_inj_ctx_t
- Track explicit remote_entry_point for safe thread hijacking and PE execution
- Refactor standalone syscall resolvers into a unified pipeline (scan/sort)
- Perfect status code system by purging generic fallbacks in favor of highly-specific, domain-aware error codes
- Fix minor pointer validation and parsing bugs in the reflective loader
2026-06-28 14:14:54 +01:00

48 lines
1.1 KiB
C

#ifndef SND_INJECTION_CONTEXT_H
#define SND_INJECTION_CONTEXT_H
#include <sindri/common/buffer.h>
#include <sindri/common/debug.h>
#include <sindri/common/macros.h>
#include <sindri/primitives/os_api.h>
#include <windows.h>
SND_BEGIN_EXTERN_C
typedef enum {
SND_INJ_STAGE_UNINITIALIZED = 0,
SND_INJ_STAGE_TARGET_ACQUIRED,
SND_INJ_STAGE_MEMORY_ALLOCATED,
SND_INJ_STAGE_PAYLOAD_WRITTEN,
SND_INJ_STAGE_PROTECTIONS_SET,
SND_INJ_STAGE_EXECUTED,
} snd_inj_stage_t;
typedef struct _snd_inj_ctx_t {
DWORD target_pid;
HANDLE target_process;
PVOID remote_base;
PVOID remote_entry_point;
SIZE_T remote_size;
HANDLE remote_thread;
snd_inj_stage_t stage;
const snd_buffer_t *payload;
const snd_process_api_t *proc_api;
} snd_inj_ctx_t;
/**
* @brief Converts an injection stage enum to a human-readable string.
*/
const char *snd_inj_stage_to_string(snd_inj_stage_t stage);
/**
* @brief Cleans up injection context: closes handles, resets state.
*/
void snd_inj_cleanup(snd_inj_ctx_t *ctx);
SND_END_EXTERN_C
#endif // SND_INJECTION_CONTEXT_H