Validate RDP, WinRM, VNC and Telnet access contexts
Needs: Enabled destination service, matching authentication and protocol-specific logon/session rights
RDP baseline: authentication-only check
# RDP baseline: authentication-only check
xfreerdp3 /v:TARGET /u:USER /d:DOMAIN /auth-only /cert:ignore
# Variant — open an RDP desktop
xfreerdp3 /v:TARGET /u:USER /d:DOMAIN /dynamic-resolution /cert:ignore
# Variant — identify RDP security requirements
nmap -p 3389 --script rdp-enum-encryption,rdp-ntlm-info TARGET
Decisive output: successful authentication-only validation supports that the credential is accepted for RDP/NLA. It does not prove an interactive desktop will be granted under every policy/session condition.
Let FreeRDP prompt for the password.
/cert:ignoresuppresses certificate validation and is suitable only in the controlled lab context; it removes server-identity protection.
1. Listener, service and configured port
Use this read-only sequence after obtaining an authorized local administrative session on the destination, or when the exercise explicitly supplies equivalent remote-management access. It answers four different questions: is RDP enabled, is a listener actually present, what security layer/NLA policy applies, and does the candidate identity have an effective remote-interactive logon right? Do not change registry values or policy merely to make a credential work.
# 1. Listener, service and configured port
Get-Service TermService
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v PortNumber
qwinsta
1. Listener, service and configured port
REM 1. Listener, service and configured port
netstat -ano | findstr LISTENING | findstr ":3389"
REM 2. NLA, transport security and policy precedence
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v SecurityLayer
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v MinEncryptionLevel
reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v fDenyTSConnections
reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v UserAuthentication
reg query "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services" /v SecurityLayer
REM 2. NLA, transport security and policy precedence
gpresult /scope computer /v
REM 3. Candidate membership and effective logon rights
net localgroup "Remote Desktop Users"
whoami /groups
Read:
fDenyTSConnections = 0permits RDP at the local setting;1denies new RDP connections.PortNumberis displayed as a registry DWORD, commonly hexadecimal0xD3Dfor 3389. A runningTermServiceplus anRDP-Tcplistener inqwinstaand a listening socket establishes host-side listener state. A missing:3389socket is not decisive ifPortNumberis nondefault. Policy can override the local value, so inspect resultant policy before treating this as effective configuration.
Read:
UserAuthentication = 1requires Network Level Authentication. ForSecurityLayer,0is native RDP security,1negotiates, and2requires TLS.MinEncryptionLevelfurther constrains client compatibility. A missing policy value means “not configured at this policy path,” not that the feature is absent. Usegpresultto identify the winning computer policy when local and policy-backed values conflict or revert after refresh. These settings explain negotiation failures; they do not grant a user logon rights.
3. Candidate membership and effective logon rights
From an elevated PowerShell or Command Prompt, export the currently applied user-right assignments and inspect only the RDP entries:
# 3. Candidate membership and effective logon rights
$policy = Join-Path $env:TEMP 'rdp-user-rights.inf'
secedit /export /mergedpolicy /areas user_rights /cfg $policy /quiet
Select-String -Path $policy -Pattern '^SeRemoteInteractiveLogonRight','^SeDenyRemoteInteractiveLogonRight'
Read: the candidate must be covered by
SeRemoteInteractiveLogonRight; membership in local Administrators or Remote Desktop Users commonly supplies that right, but the actual applied policy is decisive.SeDenyRemoteInteractiveLogonRightoverrides the allow right. Exported entries can be names or SIDs, so resolve unfamiliar SIDs before deciding.whoami /groupsproves only the current process token; use it for the candidate only when you are actually running in that candidate's context. A group listing alone does not prove an effective right when domain policy or nested membership changes the result.
4. Source-relative validation and decision
# 4. Source-relative validation and decision
nmap -Pn -n -p 3389 --reason TARGET
xfreerdp3 /v:TARGET /u:USER /d:DOMAIN /auth-only /cert:ignore
# WinRM baseline: interactive session
evil-winrm -i TARGET -u USER
# WinRM baseline: interactive session
evil-winrm -i TARGET -u 'DOMAIN\\USER'
# Variant — WinRM over HTTPS
evil-winrm -i TARGET -u USER -S -P 5986
Ready for an interactive attempt: the actual source reaches the configured RDP port; the listener is enabled; the client can meet the NLA/security requirements; the credential is accepted in the intended local/domain context; and the identity has the effective allow right without an applicable deny right. Ruled out in this context: a decisive required condition is absent, such as an effective deny assignment or no listener on the configured port. Inconclusive: access to policy data is denied, group/SID expansion is unresolved, GPO precedence is unclear, or network filtering prevents source-relative validation. Do not turn an inconclusive result into “bad password” or “RDP disabled.”
Decisive output: an interactive PowerShell prompt establishes WinRM authorization. Immediately verify identity and host context with
whoami,hostnameandGet-NetIPAddress.
Windows PowerShell remoting
# Variant — Windows PowerShell remoting
$cred = Get-Credential
Enter-PSSession -ComputerName TARGET -Credential $cred
Next action: after a session, re-enumerate identity, groups, privileges, files, local services/listeners and routes. Password spraying, pass-the-hash and ticket use belong to later credential/AD blocks.
VNC
# VNC
nmap -Pn -sV --script vnc-info -p PORT TARGET
vncviewer TARGET:PORT
# Telnet
nmap -Pn -sV -p PORT TARGET
nc -nv TARGET PORT
telnet TARGET PORT
VNC may expose a desktop without Windows logon semantics; the VNC server's authentication and the resulting OS session identity are separate. Use
realvnc-auth-bypassor password testing only for a confirmed compatible product and explicit authorized objective, then verify the desktop identity.
Telnet is plaintext and may expose a banner/login prompt. Validate only legitimately acquired credentials; do not make
telnet-brutea baseline. After login, verify host and identity because appliance/application shells can differ from an OS shell. Source supplement: reviewed getSH Nmap VNC/Telnet blocks.
GNU Inetutils telnetd — conditional authentication-bypass check
Use only after identifying the affected GNU Inetutils telnetd/login chain and its patch status. CVE-2026-24061 concerns how a supplied USER value reaches login; it does not apply to every Telnet server. Distribution backports matter.
# GNU Inetutils telnetd — conditional authentication-bypass check
# Client supports sending the autologin USER environment value
USER='-f root' telnet -a TARGET PORT
Read: if a shell is obtained, verify hostname and id. A prompt or echoed username is not root access. A different daemon, fixed build, client negotiation mismatch or a rejected USER value → return to service identification. The affected upstream range and distribution fixes must be checked against the advisory rather than inferred from port 23.
Verify → Verify destination hostname, represented identity and usable effect in the resulting session.
If it fails → A valid password is not proof of RDP/WinRM rights. Diagnose TLS, transport, account qualification and logon policy separately. More detail ↓
Explanation & examples
Validate RDP, WinRM, VNC and Telnet access contexts
- USE WHEN
- An exposed remote-access application and compatible known credentials
- STARTING ACCESS
- A confirmed reachable application; anonymous context or one identified credential
- RESULT
- A verified remote session or a precise authentication/authorization failure
Recognize the clue
Take remote-access listeners from discovery and validate one known identity against the specific endpoint/logon type.
Test-NetConnection TARGET -Port 3389
Test-NetConnection TARGET -Port 5985
RemotePort : 3389; TcpTestSucceeded : True
RemotePort : 5985; TcpTestSucceeded : FalseMeans: Transport offers an RDP candidate from this source; it does not establish remote-interactive rights.
Confirm: Check actual protocol, local/domain context, accepted authentication and endpoint/logon authorization.
- After validation
- The intended remote session opens and its identity is verified: enumerate the new host context.
- Ruled out in this context
- A known-valid identity lacks that logon right: reject this access form for the account.
- Still inconclusive
- A timeout cannot distinguish host firewall, route or absent service; verify the failed layer.
Troubleshooting: A valid password is not proof of RDP/WinRM rights. Diagnose TLS, transport, account qualification and logon policy separately.
Recognize: RDP commonly uses TCP/3389; WinRM commonly uses 5985/HTTP and 5986/HTTPS. Goal: determine whether one known credential is accepted in the correct local/domain context and whether it is authorized for a usable session.
RDP baseline: authentication-only check
Some distributions expose the binary as xfreerdp. Omit /d:DOMAIN for the intended local-account context; use /u:TARGET\\USER if needed to make that context explicit.
Decisive output: successful authentication-only validation supports that the credential is accepted for RDP/NLA. It does not prove an interactive desktop will be granted under every policy/session condition.
Variant — open an RDP desktop
Let FreeRDP prompt for the password. /cert:ignore suppresses certificate validation and is suitable only in the controlled lab context; it removes server-identity protection.
Variant — identify RDP security requirements
This can disclose supported security layers, NLA and NTLM host/domain clues. It does not validate a credential.
RDP host-side inspection: local administrative context
Use this read-only sequence after obtaining an authorized local administrative session on the destination, or when the exercise explicitly supplies equivalent remote-management access. It answers four different questions: is RDP enabled, is a listener actually present, what security layer/NLA policy applies, and does the candidate identity have an effective remote-interactive logon right? Do not change registry values or policy merely to make a credential work.
1. Listener, service and configured port
Read:
fDenyTSConnections = 0permits RDP at the local setting;1denies new RDP connections.PortNumberis displayed as a registry DWORD, commonly hexadecimal0xD3Dfor 3389. A runningTermServiceplus anRDP-Tcplistener inqwinstaand a listening socket establishes host-side listener state. A missing:3389socket is not decisive ifPortNumberis nondefault. Policy can override the local value, so inspect resultant policy before treating this as effective configuration.
2. NLA, transport security and policy precedence
Read:
UserAuthentication = 1requires Network Level Authentication. ForSecurityLayer,0is native RDP security,1negotiates, and2requires TLS.MinEncryptionLevelfurther constrains client compatibility. A missing policy value means “not configured at this policy path,” not that the feature is absent. Usegpresultto identify the winning computer policy when local and policy-backed values conflict or revert after refresh. These settings explain negotiation failures; they do not grant a user logon rights.
3. Candidate membership and effective logon rights
From an elevated PowerShell or Command Prompt, export the currently applied user-right assignments and inspect only the RDP entries:
Read: the candidate must be covered by
SeRemoteInteractiveLogonRight; membership in local Administrators or Remote Desktop Users commonly supplies that right, but the actual applied policy is decisive.SeDenyRemoteInteractiveLogonRightoverrides the allow right. Exported entries can be names or SIDs, so resolve unfamiliar SIDs before deciding.whoami /groupsproves only the current process token; use it for the candidate only when you are actually running in that candidate's context. A group listing alone does not prove an effective right when domain policy or nested membership changes the result.
4. Source-relative validation and decision
Ready for an interactive attempt: the actual source reaches the configured RDP port; the listener is enabled; the client can meet the NLA/security requirements; the credential is accepted in the intended local/domain context; and the identity has the effective allow right without an applicable deny right. Ruled out in this context: a decisive required condition is absent, such as an effective deny assignment or no listener on the configured port. Inconclusive: access to policy data is denied, group/SID expansion is unresolved, GPO precedence is unclear, or network filtering prevents source-relative validation. Do not turn an inconclusive result into “bad password” or “RDP disabled.”
Security baseline: on a normally secured host, RDP may be disabled when not needed; when enabled, NLA is normally retained, access is limited to intended administrative/remote-user principals, deny assignments override broad membership, and the firewall limits exposure. The state machine records deviations and capabilities; it does not recommend weakening these controls.
WinRM baseline: interactive session
Omitting -p makes the established Ruby client prompt for the password.
Decisive output: an interactive PowerShell prompt establishes WinRM authorization. Immediately verify identity and host context with
whoami,hostnameandGet-NetIPAddress.
Variant — WinRM over HTTPS
Check evil-winrm -h because the established Ruby client and newer evil-winrm-py use different long-option spelling. Do not assume a copied command matches the installed implementation.
Variant — Windows PowerShell remoting
PowerShell remoting uses the configured WinRM endpoint. Local trusted-host, Kerberos/name-resolution and endpoint authorization settings can fail independently of password validity.
Failure cues: certificate warnings are different from authentication failure. RDP errors can reflect NLA, account context, expired/locked accounts or missing logon rights. WinRM
401supports authentication/authorization failure;WinRM cannot process the requestcan be name resolution, trusted-host, listener or transport context. Valid SMB credentials do not guarantee RDP or WinRM rights.
Next action: after a session, re-enumerate identity, groups, privileges, files, local services/listeners and routes. Password spraying, pass-the-hash and ticket use belong to later credential/AD blocks.
Host-inspection sources: Microsoft RDP troubleshooting · Microsoft secedit /export · Microsoft account-right constants · Microsoft qwinsta · Microsoft Remote Desktop Services policy
VNC
VNC may expose a desktop without Windows logon semantics; the VNC server's authentication and the resulting OS session identity are separate. Use
realvnc-auth-bypassor password testing only for a confirmed compatible product and explicit authorized objective, then verify the desktop identity.
Telnet
Telnet is plaintext and may expose a banner/login prompt. Validate only legitimately acquired credentials; do not make
telnet-brutea baseline. After login, verify host and identity because appliance/application shells can differ from an OS shell. Source supplement: reviewed getSH Nmap VNC/Telnet blocks.
GNU Inetutils telnetd — conditional authentication-bypass check
Use only after identifying the affected GNU Inetutils telnetd/login chain and its patch status. CVE-2026-24061 concerns how a supplied USER value reaches login; it does not apply to every Telnet server. Distribution backports matter.
Read: if a shell is obtained, verify hostname and id. A prompt or echoed username is not root access. A different daemon, fixed build, client negotiation mismatch or a rejected USER value → return to service identification. The affected upstream range and distribution fixes must be checked against the advisory rather than inferred from port 23.
Sources: upstream 1.
Why it works
Remote interactive logon and remote management are different rights. VNC may use its own password; Telnet may expose a different account context from Windows/domain authentication.
Worked example · hypothetical
Observation: SMB accepts a credential but RDP rejects it. Test: separate the RDP service and logon-right checks. Illustrative output: the account lacks remote-interactive authorization. Interpretation: test a justified WinRM or SMB execution path instead.
New identity, privilege, host or route? Re-enumerate → All topic tasks →