Configuring Windows Server RDP Restricted Admin Mode and Remote Credential Guard in Pakistan: Eliminating LSASS Memory Harvesting, Pass-the-Hash Attacks, and CredSSP Vulnerabilities Guide

Master Windows Server RDP Restricted Admin Mode and Remote Credential Guard. Step-by-step engineering guide for Pakistani IT administrators, MSPs, and remote teams to block LSASS credential theft, Pass-the-Hash lateral movement, and CredSSP interception.

Configuring Windows Server RDP Restricted Admin Mode and Remote Credential Guard in Pakistan: Eliminating LSASS Memory Harvesting, Pass-the-Hash Attacks, and CredSSP Vulnerabilities Guide

In enterprise IT infrastructure, managed service provider (MSP) operations, software development agencies, and remote freelancing setups across Pakistan, Remote Desktop Protocol (RDP) serves as the primary administration conduit. Systems administrators, DevOps engineers, and support technicians connect daily to production Windows Server hosts over commercial and residential ISPs, including PTCL, StormFiber, Nayatel, and mobile LTE networks.[1]

However, standard interactive RDP sessions introduce a severe architectural vulnerability: credential exposure in memory. When an administrator authenticates to a remote Windows Server using default settings, their plaintext password, Kerberos ticket-granting tickets (TGT), and NTLM password hashes are deposited directly into the remote host’s Local Security Authority Subsystem Service (lsass.exe) process memory.

If the target remote server has been compromised—via an unpatched web application vulnerability, a malicious script, or a compromised user account—an attacker with local administrative privileges can run post-exploitation tools (such as Mimikatz, ProcDump, or PowerShell scripts) to scrape lsass.exe. This allows adversaries to harvest domain administrator credentials and execute lethal Pass-the-Hash (PtH) attacks to laterally compromise entire corporate networks, cloud environments, and domain controllers.

To neutralize this threat, Microsoft engineered two advanced defensive mechanisms: Restricted Admin Mode and Remote Credential Guard (RCG). This comprehensive guide details the technical mechanics, Group Policy implementation, registry configurations, and operational workflows required to secure Remote Desktop connections across Windows Server 2025, 2022, and 2019.


1. Attack Vectors: Why Standard RDP Exposes Credentials

To appreciate the security guarantees of Restricted Admin Mode and Remote Credential Guard, systems engineers must understand how traditional RDP authentication exposes credentials:[2]

Authentication Mechanism Credential Handling on Remote Server LSASS Exposure Lateral Movement Risk
Standard RDP (Interactive Logon) Plaintext credentials and NTLM hashes transmitted and cached in remote lsass.exe memory Severe: Full interactive token, NTLM hash, and Kerberos TGT exposed Critical: Single compromised host compromises entire domain administrator accounts
Restricted Admin Mode (/restrictedadmin) Network logon (Logon Type 3); zero plaintext passwords or reusable hashes sent to target host Zero Exposure: lsass.exe contains no usable credentials for outbound connections Low: Attacker cannot leverage stolen hashes to pivot to other machines
Remote Credential Guard (/remoteGuard) Kerberos requests redirected back to client machine; hardware virtualization isolation (VBS) Zero Exposure: Target server holds no Kerberos TGTs; tokens remain on client Negligible: True Single Sign-On (SSO) with complete credential isolation

The Mechanics of an LSASS Memory Dump Attack

In a standard RDP session:

  1. Authentication: The client initiates connection via CredSSP (Credential Security Support Provider) and passes administrative credentials to the server.
  2. Session Initialization: The remote server validates the user with the domain controller and creates an interactive logon token (Logon Type 2 or Logon Type 10).
  3. Memory Caching: Windows caches the credentials inside lsass.exe so the user can seamlessly access network shares (\\fileserver\share), Active Directory tools, and internal services during their session.
  4. Adversary Interception: An adversary with local SYSTEM privileges executes an LSASS memory read:
    rundll32.exe C:\windows\System32\comsvcs.dll, MiniDump <lsass-pid> C:\temp\lsass.dmp full
  5. Credential Extraction: The harvested dump file reveals the domain administrator’s NTLM hash, enabling the attacker to authenticate against any other server on the network without ever knowing the plaintext password.

2. Deep Dive: Restricted Admin Mode Architecture

Introduced in Windows Server 2012 R2 and backported to modern platforms, Restricted Admin Mode alters the authentication handshake:[1]

  • When connecting with the /restrictedadmin flag, the client negotiates a Network Logon instead of an interactive desktop logon.
  • The client proves authentication to the server using NTLM challenge-response or Kerberos ticket exchanges, but never passes reusable credentials or hashes to the remote host.
  • Because no credentials exist in lsass.exe on the remote server, an attacker who dumps LSASS memory finds zero administrative credentials to harvest.

The Double-Hop Delegation Constraint

Because Restricted Admin Mode does not store reusable credentials on the remote host, the remote session cannot automatically authenticate to external secondary resources (such as an SMB file share on a separate file server or an external SQL instance). This limitation—commonly known as the double-hop problem—is an intentional security boundary. If the administrator must access network shares, they must use Kerberos Constrained Delegation or connect directly to the destination resource.


3. Deep Dive: Remote Credential Guard (RCG)

Remote Credential Guard (RCG)—introduced in Windows 10 and Windows Server 2016 and refined in Windows Server 2022 and 2025—represents the enterprise evolution of Restricted Admin Mode:[3]

  • While Restricted Admin Mode blocks outbound network authentication, Remote Credential Guard redirects Kerberos authentication requests back to the client device.
  • When an administrator inside the remote desktop session accesses an internal intranet portal, file share, or remote database, the server sends the Kerberos ticket request back to the client’s local LSASS process over the secure RDP channel.
  • The client satisfies the Kerberos request using its local tickets and returns the authorization token to the remote session.
  • Result: The administrator enjoys seamless Single Sign-On (SSO) across the corporate network, while the remote host never holds or caches the administrator’s master Kerberos keys or passwords.

4. Server-Side Configuration: Enabling Restricted Admin Mode and RCG

By default, Windows Server restricts incoming Restricted Admin Mode and Remote Credential Guard connections until explicitly enabled via the Windows Registry or Group Policy.[1]

Step 1: Enable DisableRestrictedAdmin via PowerShell

To allow incoming Restricted Admin and Remote Credential Guard connections, the DisableRestrictedAdmin registry DWORD must be set to 0 (enabling the feature):

Run the following command in an elevated PowerShell console on the target server:

# Create or set DisableRestrictedAdmin to 0 (Enables Restricted Admin & Remote Credential Guard)
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" `
    -Name "DisableRestrictedAdmin" `
    -Value 0 `
    -PropertyType DWord `
    -Force | Out-Null

Write-Host "Restricted Admin Mode and Remote Credential Guard successfully enabled." -ForegroundColor Green

To verify the configuration:

Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name "DisableRestrictedAdmin"
# Value must return 0

Step 2: Enforcing Network Level Authentication (NLA)

Restricted Admin Mode strictly requires Network Level Authentication (NLA) powered by TLS encryption to validate identity before establishing the graphic session:[4]

# Enforce Network Level Authentication (NLA) on RDP-Tcp listener
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" `
    -Name "UserAuthentication" `
    -Value 1 -Force

Step 3: Block Outbound Credential Delegation from the Server (Optional Hardening)

To prevent the target server itself from delegating any administrative credentials outbound to other network hosts:

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" `
    -Name "DisableRestrictedAdminOutboundCreds" `
    -Value 1 `
    -PropertyType DWord `
    -Force | Out-Null

5. Client-Side Group Policy Configuration and Connection Execution

Once the target server is configured, administrators must enforce credential delegation rules on client workstations and establish connections using the secure flags.[3]

Group Policy: Enforcing Restricted Credential Delegation

To prevent staff from accidentally establishing insecure standard RDP connections to servers, configure client GPO:

  1. Open gpedit.msc (Local Group Policy Editor) or your domain GPO editor.
  2. Navigate to:
    Computer Configuration > Administrative Templates > System > Credentials Delegation
  3. Double-click Restrict delegation of credentials to remote servers.
  4. Select Enabled.
  5. In the options dropdown under Select the restriction mode, select Require Remote Credential Guard or Require Restricted Admin.
  6. Click Apply and OK.
Credentials Delegation GPO Hierarchy:
└── Computer Configuration
    └── Administrative Templates
        └── System
            └── Credentials Delegation
                └── Restrict delegation of credentials to remote servers [ENABLED]

Establishing Secure Client Connections via mstsc

To connect from your local Windows workstation, launch Remote Desktop Connection with the dedicated command-line switches:

Option A: Connecting with Restricted Admin Mode

mstsc.exe /v:192.168.10.50 /restrictedadmin

(You will be prompted for credentials, but those credentials will never be cached in the remote host’s memory).

Option B: Connecting with Remote Credential Guard

mstsc.exe /v:rdp.nextgen.pk /remoteGuard

(Provides automatic Single Sign-On using your local Kerberos credentials without transferring reusable hashes).

Saving Secure Switches in .rdp Configuration Files

For frequent connections, embed the security directives directly into your saved .rdp shortcut files by opening the file in Notepad and adding:

restricted admin:i:1
remoteGuard:i:1

6. Forensic Verification and Threat Hunting

To verify that Restricted Admin Mode is operating correctly and that credentials are not exposed in memory:

Verification Test: Validating Logon Type via Event Viewer

When an administrator connects via Restricted Admin Mode, Windows logs an authentication event in the Security event log:[1]

  1. Open Event Viewer (eventvwr.msc) on the target server.
  2. Navigate to: Windows Logs > Security.
  3. Filter for Event ID 4624 (Successful Logon).
  4. Inspect the detailed properties:
    • Logon Type: Must indicate Logon Type 3 (Network) instead of Logon Type 10 (RemoteInteractive) or Logon Type 2 (Interactive).
    • Authentication Package: Indicates Negotiate or Kerberos.
    • Elevated Token: Indicates %%1842 (Yes).

This confirms that the operating system treated the incoming RDP connection as an isolated network request, guaranteeing zero credential caching in lsass.exe.


7. Enterprise Infrastructure and High-Security Dedicated Servers

In high-concurrency enterprise hosting environments, securing administrative RDP access is foundational to operational integrity.

For mission-critical infrastructure:

  1. Hardware Virtualization-Based Security (VBS): Modern Intel Xeon Scalable and AMD EPYC processors support Hypervisor-Protected Code Integrity (HVCI) and Credential Guard hardware enclaves, physically isolating the security subsystem from the operating system kernel.
  2. Dedicated Out-of-Band Management (IPMI/iDRAC): For out-of-band server maintenance without exposing RDP to public networks, enterprise bare-metal infrastructure utilizes dedicated hardware management ports isolated on private management VLANs.

For Pakistani enterprises, financial organizations, and tech firms requiring high-security bare-metal infrastructure, explore our Dedicated Servers and specialized local deployments on Dedicated Servers in Pakistan, featuring enterprise NVMe arrays, TPM 2.0 hardware crypto-processors, and 24/7 proactive security monitoring.


Secure Your Windows Infrastructure with Enterprise Hardware

Protect your critical workloads from credential harvesting and network attacks. Nextgen provides high-security dedicated servers equipped with TPM 2.0, enterprise ECC memory, and isolated out-of-band management.

Explore Enterprise Dedicated Servers
Sources & Official References
  1. Microsoft Learn. "Managing Remote Desktop Services Restricted Admin Mode." https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn408185(v=ws.11)
  2. Microsoft Security Guidance. "Mitigating Pass-the-Hash and Credential Theft in Windows Networks." https://learn.microsoft.com/en-us/windows/security/identity-protection/credential-guard/
  3. Microsoft Learn. "Protect Remote Desktop Credentials with Remote Credential Guard." https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/rds-remote-credential-guard
  4. Tenable Network Security. "CIS Microsoft Windows Server Benchmark: Restrict Delegation of Credentials to Remote Servers." https://www.tenable.com/audits/items/CIS_Microsoft_Windows_Server_2022_Benchmark_v1.0.0_L1_DC.audit:9655

Disclaimer: This post is for informational and educational purposes only, accurate to the best of our knowledge at publication. It does not constitute advice. We do not guarantee accuracy or completeness and accept no liability for any decisions or losses resulting from reliance on this content.

Disclaimer: This post is for informational and educational purposes only, accurate to the best of our knowledge at publication. It does not constitute advice. We do not guarantee accuracy or completeness and accept no liability for any decisions or losses resulting from reliance on this content.