CVE-1999-0597
Executive Summary
This report provides a detailed analysis of CVE-1999-0597, a critical vulnerability in Microsoft Windows NT 4.0. The vulnerability stems from a fundamental flaw in the account policy enforcement mechanism: the system fails to forcibly terminate active remote sessions when a user's configured logon hours expire. An authenticated attacker can establish a session during permitted hours and maintain access indefinitely, completely bypassing the time-based access control policy.
This allows an attacker with valid, but time-restricted, credentials to persist their access, potentially using it for lateral movement, data exfiltration, or further exploitation during unauthorized periods. Given that Windows NT is long past its End-of-Life (EOL), no patch exists. The primary remediation is immediate migration to a modern, supported operating system. For systems that cannot be immediately decommissioned, stringent compensating controls are required.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
CVSS Breakdown & Threat Level
- CVSS v2.0 Score: 10.0 (Critical)
- Vector:
AV:N/AC:L/Au:N/C:C/I:C/A:C
The assigned CVSS score of 10.0 reflects the maximum possible impact under the CVSS v2.0 framework.
- Attack Vector (AV:N): Network. The vulnerability is exploitable remotely, typically over SMB/CIFS (ports 139, 445).
- Access Complexity (AC:L): Low. An attacker only needs a valid, time-restricted user account and the ability to connect to the server during the allowed logon window. No special configuration or exploits are needed.
- Authentication (Au:N): None. This is the most contentious metric in the original scoring. While the attacker does need to authenticate to establish the initial session, the
Au:Nvalue was likely chosen because the vulnerability itself is the bypass of a post-authentication control mechanism. From the perspective of maintaining access beyond the allowed time, no further authentication is required. A modern CVSS v3.1 score would usePrivileges Required: Low(PR:L), resulting in a lower score (e.g., 8.8), but the 10.0 score reflects the total potential for compromise in its original context. - Impact (C:C, I:C, A:C): Complete. Once persistent access is achieved, an attacker has the same capabilities as the compromised account. If this account has administrative privileges, the attacker gains full control over the system's Confidentiality, Integrity, and Availability.
Deep Dive & Mechanics
The vulnerability lies in the design of the Windows NT session management logic. In Windows NT, user account policies can specify "Logon Hours," defining the exact days and times a user is permitted to be logged on to the network.
The core of the flaw is that this policy is only checked during the initial session establishment phase.
- Initial Connection: When a remote user attempts to connect to a resource (e.g., an SMB share), the NT server validates their credentials and checks if the current time falls within their allowed Logon Hours.
- Session Established: If the check passes, a security token is generated, and a session is established.
- Policy Check Bypass: The server performs no subsequent checks on this active session against the Logon Hours policy. The session remains active, and the security token remains valid until the user manually logs off, the connection is severed, or the server is restarted.
An attacker's workflow would be:
- Obtain credentials for a user with restricted logon hours (e.g., a "nightly batch job" service account).
- During the permitted time window, connect to the target Windows NT server from a remote machine.
- Establish one or more persistent connections (e.g., map a network drive, execute a remote process).
- Wait for the logon hours to expire.
- The connection remains active, granting the attacker continued access to perform unauthorized actions outside the designated timeframe.
While the attacker cannot create new sessions outside the logon hours, they can continue to leverage any and all sessions established during the valid period.
Vulnerable vs. Patched Code
This is a design flaw rather than a specific code bug, so a direct code comparison is not applicable. Instead, we can compare the vulnerable behavior in Windows NT with the corrected behavior in modern Windows Server operating systems.
Vulnerable Behavior (Windows NT 4.0):
- Policy:
User Properties -> Logon Hoursare set. - Action: A user with an active session is allowed to continue working after their logon hours expire.
- System Logic: No mechanism exists to periodically check active sessions against the logon hours policy and terminate them.
"Patched" Behavior (Modern Windows Server): Modern Windows operating systems address this via a specific Group Policy Object (GPO) setting.
- Policy:
Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options -> "Network security: Force logoff when logon hours expire" - Action: When this policy is Enabled, the system periodically checks active sessions. If a session's user is outside their configured logon hours, the session is forcibly terminated.
- System Logic: A dedicated security policy enforces re-validation of session time, effectively patching the original design oversight.
Exploitation & Lab Setup
This vulnerability is trivial to reproduce.
Lab Setup:
- Target: A virtual machine running Windows NT 4.0 Server.
- Attacker Machine: Any client capable of SMB connections (e.g., Windows XP, or a Linux machine with
smbclient). - Network: Both VMs on the same virtual network.
Exploitation Steps:
Configure the Target:
- On the Windows NT server, create a new standard user (e.g.,
tempuser). - Open User Manager for Domains, go to the properties for
tempuser. - Click "Hours" and set a very restrictive logon window (e.g., a 10-minute block of time that is currently active). Disallow all other times.
- On the Windows NT server, create a new standard user (e.g.,
Establish Session (During Allowed Hours):
- From the attacker machine, connect to a share on the NT server. On a Windows client:
net use Z: \\NT_SERVER_IP\C$ /user:tempuser "password"- Verify the connection is successful by browsing the
Z:drive.
Wait for Expiration:
- Wait until the current time is past the allowed 10-minute logon window.
Verify Persistent Access:
- On the attacker machine, continue to browse the
Z:drive, read files, and write new files (if permissions allow). The session will remain fully active.
- On the attacker machine, continue to browse the
Attempt New Session (Optional):
- Disconnect the share (
net use Z: /delete). - Attempt to re-establish the connection using the same
net usecommand. The connection will now fail with an error related to logon time restrictions, proving that only existing sessions persist.
- Disconnect the share (
Detection Engineering
Detecting this requires focusing on network logon activity and correlating it with time-based policies. Since this is an EOL system, any successful logon should be scrutinized. The following Sigma rule provides a baseline for detecting successful network logons on legacy systems, which should trigger an investigation.
title: Successful Network Logon on Legacy Windows System
id: 11b8a53e-9f0a-4c2d-9c4c-78332b1a13e0
status: experimental
description: |
Detects a successful network logon (Logon Type 3) on a potentially legacy Windows system like Windows NT.
Given CVE-1999-0597, any active session from a time-restricted account may persist indefinitely.
SOC analysts should manually verify if the user account associated with this event has logon hour restrictions.
If so, any activity from this user/source IP outside of permitted hours is a high-confidence indicator of compromise.
logsource:
product: windows
service: security
detection:
# Event ID for Successful Logon in Windows NT 4.0 is 528. For later versions it's 4624.
# Event ID for Successful Network Logon in NT 4.0 is 540.
selection_nt:
EventID: 540 # Successful Network Logon
selection_modern:
EventID: 4624
LogonType: 3 # Network Logon
condition: selection_nt or selection_modern
falsepositives:
- Legitimate user activity. This rule is designed to trigger an investigation rather than being a high-fidelity alert on its own.
level: low
tags:
- attack.persistence
- attack.t1078
- cve.1999.0597
Remediation & Mitigation
Since Windows NT is End-of-Life, no official patch will ever be released. The only true remediation is to decommission the system.
Primary Remediation: Decommission & Upgrade
- The highest priority is to migrate all roles and data from the Windows NT server to a modern, supported operating system (e.g., Windows Server 2019/2022). This eliminates the vulnerability and countless other unpatched security risks.
Compensating Controls (If Decommissioning is Not Immediately Possible):
- Disable Time-Restricted Accounts: If logon hours are used, reconsider the policy. If the accounts are not essential, disable them entirely. If they are, their risk must be formally accepted.
- Implement a Logoff Script: A scheduled task could be created on the server to run a script periodically (e.g., every 5 minutes). This script would enumerate all active sessions and forcefully disconnect users who are outside their allowed hours. A conceptual batch script:
@echo off REM This is a conceptual script and requires a tool/logic to check user logon hours. REM For demonstration, we assume a user "tempuser" should be logged off now. FOR /F "tokens=1" %%A IN ('net session ^| find "tempuser"') DO ( net session \\%%A /delete /y )- Network Segmentation: Isolate the Windows NT server in a highly restricted network segment. Use an internal firewall to strictly control which machines can connect to it and over which ports (e.g., only allow connections from a specific application server).
- Enforce Session Timeouts: Use network infrastructure like firewalls or load balancers to enforce absolute session timeouts for connections to the legacy server. This can help terminate sessions that persist too long, regardless of user activity.
[!] This Threat Intelligence report was automatically generated by Valters IT (valtersit.com) Neural Engine.
{/* [Security Hash: 3C7FB807476F9A5E1D2C6E34] */}
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.