Release v1.2.0: Indirect Syscalls & Pipeline Decoupling

- Implemented fully decoupled direct and indirect syscall invocation
- Added dynamic PEB-based gadget scanning (syscall; ret / sysenter)
- Added x86 & x64 inline MASM stubs with proper stack frame alignment
- Introduced SND_USE_DEFAULTS compile-time OpSec macro for lean payload compilation
- Extensive documentation across all primitives and examples
This commit is contained in:
sibouzitoun
2026-06-29 19:31:15 +01:00
parent f7d17fde33
commit b7d3cf717c
43 changed files with 727 additions and 173 deletions
+4 -2
View File
@@ -72,10 +72,12 @@ int main(int argc, char *argv[]) {
goto cleanup;
}
snd_syscall_set_ntdll(ntdll);
snd_syscall_set_invoker(snd_syscall_indirect_invoke_asm);
snd_syscall_set_gadget_finder(snd_syscall_find_gadget_scan);
/* Configure the cascading syscall resolution strategy. */
snd_syscall_strategy_set(snd_syscall_resolve_ssn_scan);
snd_syscall_strategy_add(snd_syscall_resolve_ssn_sort);
snd_syscall_set_resolver(snd_syscall_resolve_ssn_scan);
snd_syscall_add_resolver(snd_syscall_resolve_ssn_sort);
// Configure Loader: Use syscalls for memory, Native API for module resolution
ldr_ctx.mem_api = &snd_mem_sys;
+3 -2
View File
@@ -80,8 +80,9 @@ int main(int argc, char *argv[]) {
snd_syscall_set_ntdll(ntdll);
/* Configure the cascading syscall resolution strategy. */
snd_syscall_strategy_set(snd_syscall_resolve_ssn_scan);
snd_syscall_strategy_add(snd_syscall_resolve_ssn_sort);
snd_syscall_set_resolver(snd_syscall_resolve_ssn_scan);
snd_syscall_add_resolver(snd_syscall_resolve_ssn_sort);
snd_syscall_set_invoker(snd_syscall_direct_invoke_asm);
inj_ctx.target_pid = target_pid;
inj_ctx.payload = &inject_buf;
+3 -3
View File
@@ -1,5 +1,3 @@
#include "sindri/primitives/memory.h"
#include <sindri.h>
int main() {
@@ -19,7 +17,9 @@ int main() {
snd_syscall_set_ntdll(ntdll);
/* Configure the cascading syscall resolution strategy. */
snd_syscall_strategy_set(snd_syscall_resolve_ssn_scan);
snd_syscall_set_resolver(snd_syscall_resolve_ssn_scan);
snd_syscall_set_invoker(snd_syscall_indirect_invoke_asm);
snd_syscall_set_gadget_finder(snd_syscall_find_gadget_scan);
ctx.mem_api = &snd_mem_win;
ctx.mod_api = &snd_mod_nt;
+9 -6
View File
@@ -1,4 +1,5 @@
#include <sindri.h>
#include <sindri/primitives/syscalls.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -113,7 +114,7 @@ int main(int argc, char *argv[]) {
// First Method: Disk Loading
snd_buffer_t ntdll_buf = {0};
snd_buffer_t ntdll_buf = {0};
snd_ldr_pe_ctx_t ntdll_ctx = {0};
status = snd_disk_buffer_load("C:\\Windows\\System32\\ntdll.dll", &ntdll_buf);
@@ -121,8 +122,8 @@ int main(int argc, char *argv[]) {
goto cleanup;
}
ntdll_ctx.mem_api = &snd_mem_win;
ntdll_ctx.mod_api = &snd_mod_nt;
ntdll_ctx.mem_api = &snd_mem_win;
ntdll_ctx.mod_api = &snd_mod_win;
ntdll_ctx.raw_source = &ntdll_buf;
status = snd_pe_parse(ntdll_ctx.raw_source, FALSE, &ntdll_ctx.pe);
@@ -157,9 +158,11 @@ int main(int argc, char *argv[]) {
snd_syscall_set_ntdll(ntdll);
/* Configure the cascading syscall resolution strategy. */
snd_syscall_strategy_set(snd_syscall_resolve_ssn_scan);
snd_syscall_strategy_add(snd_syscall_resolve_ssn_sort);
snd_syscall_set_invoker(snd_syscall_indirect_invoke_asm);
snd_syscall_set_gadget_finder(snd_syscall_find_gadget_scan);
snd_syscall_set_resolver(snd_syscall_resolve_ssn_scan);
snd_syscall_add_resolver(snd_syscall_resolve_ssn_sort);
ctx.mem_api = &snd_mem_sys;
ctx.mod_api = &snd_mod_nt;