2026-09-01 (Multi-Threaded LWP Stepping & Dynamic Kernel NID Syscall Resolution) (D308)
Analyzed hardware test log (Run #21):
- Diagnosis:
procctl_step(pid)passed the process IDpid(330) toptrace(PT_STEP). In FreeBSD multi-threaded processes,PT_STEPrequires the specific thread LWP ID (Lightweight Process ID) returned byPT_GETLWPLIST(0x0F), otherwise stepping does not advance the targeted thread andraxretains its input value (sysno = 477 = 0x1dd).- In addition,
procctl_find_syscall_gadgetcould fail if text reading was rejected by kernel permissions.
- Remediation:
- Kernel SPRX NID Resolver (
src/injector/krw.c,krw.h): Implementedkrw_dynlib_resolve()which parses the target process's kernel SPRX dispatch tables (target_kproc + 0x3E8) to resolve NID"W0xkN0+ZkCE"directly fromlibkernelexports in kernel memory, computings_remote_syscall_gadget = sym + 0x0A. - LWP Thread Discovery
(
src/injector/procctl.c): Implementedget_target_lwp()queryingPT_GETNUMLWPS(14) andPT_GETLWPLIST(15) soPT_STEPsteps the exact target thread.
- Kernel SPRX NID Resolver (
Verified: make payload injector HARDWARE=1
(9,411,144 bytes) compiles 100% clean with zero warnings
and zero errors.