CVE-1999-0113
Executive Summary
This report details CVE-1999-0113, a critical authentication bypass vulnerability in some legacy implementations of the rlogin service, most notably in older versions of IBM AIX. The vulnerability allows an unauthenticated remote attacker to gain immediate root-level access to a target system. The exploit is trivial to execute, requiring only that the attacker pass a specially crafted parameter, -froot, during the rlogin connection attempt.
The server-side rlogind daemon incorrectly interprets this parameter as a directive to log in the user 'root' without performing any authentication checks. Due to its ease of exploitation and maximum possible impact (total system compromise), this vulnerability was assigned a CVSS score of 10.0 (Critical).
The rlogin protocol is fundamentally insecure and obsolete. The primary and most effective mitigation is to disable the rlogin service entirely and replace it with a secure alternative such as SSH. While patches were released for affected systems like IBM AIX decades ago, any system still exposing rlogin to a network should be considered a significant security risk.
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)
- CVSS v2.0 Vector:
AV:N/AC:L/Au:N/C:C/I:C/A:C
Vector Component Analysis:
- Attack Vector (AV): Network (N): The vulnerability is exploitable over the network, requiring no local access.
- Access Complexity (AC): Low (L): The exploit is simple and requires no special conditions or advanced techniques. A single command can trigger it.
- Authentication (Au): None (N): The attacker does not need to be authenticated to exploit the vulnerability; in fact, the flaw is a complete bypass of the authentication mechanism.
- Confidentiality (C): Complete (C): An attacker gains root access, allowing them to read all files and data on the system.
- Integrity (I): Complete (C): Root access grants the attacker the ability to modify or delete any file, install malicious software, and alter system logs.
- Availability (A): Complete (C): The attacker can shut down the system, delete critical files, or otherwise render it completely unavailable.
Threat Level: The threat level is CRITICAL. A remote, unauthenticated, low-complexity exploit that results in full root compromise represents the worst-case scenario for a vulnerability and justifies the maximum CVSS score.
Deep Dive & Mechanics
The rlogin protocol was part of the "r-commands" suite (rsh, rcp, rlogin) designed for trusted network environments. Its primary authentication method relied on source IP addresses and usernames listed in .rhosts files, a mechanism that is now considered dangerously insecure.
The vulnerability in CVE-1999-0113 stems from a flaw in how the rlogind daemon on the server handles arguments passed from the client. The login program on UNIX systems has an option, -f, which indicates that the user has already been authenticated. It is typically followed by the username to log in as (e.g., -f username). This feature was intended for use by trusted system processes that perform their own authentication, such as a Kerberos-aware login daemon.
The flaw occurred when the remote rlogind process took the argument from the untrusted client and passed it directly to the system's /bin/login command.
Attack Chain:
- The attacker initiates a connection from their machine using a standard
rloginclient. - The attacker crafts the command to include the
-frootargument. For example:rlogin <target_ip> -froot. - The attacker's
rloginclient passes this-frootstring to therloginddaemon on the target server. - The vulnerable
rloginddaemon on the server receives this argument and, instead of validating it or rejecting it, passes it directly as a command-line argument when it invokes the local/bin/loginprocess. - The
/bin/loginprocess on the server sees the-frootflag. It interprets this as "the user 'root' has already been authenticated; proceed directly to establishing a session." - A root shell is immediately presented to the attacker, bypassing all password,
.rhosts, and other security checks.
Vulnerable vs. Patched Code
While the original source code is not readily available, the logical flaw can be illustrated with pseudocode.
Vulnerable Logic (Conceptual)
// Server-side rlogind daemon (simplified logic)
// ...
// Read arguments from the rlogin client
char* client_arg = read_client_argument();
// Construct the command to execute /bin/login
char command[100];
sprintf(command, "/bin/login %s", client_arg); // Directly use the client-provided argument
// Execute the command
// This is dangerous! If client_arg is "-froot", login will bypass authentication.
system(command);
// ...
Patched Logic (Conceptual)
A patched version would sanitize the input and explicitly disallow the -f flag from being passed by a remote, unauthenticated process.
// Server-side rlogind daemon (simplified patched logic)
// ...
// Read arguments from the rlogin client
char* client_arg = read_client_argument();
// Sanitize the input: check for dangerous flags
if (strncmp(client_arg, "-f", 2) == 0) {
// The -f flag should not be accepted from a standard rlogin session.
// Log the attempt and terminate the connection.
log_security_event("Attempted use of '-f' flag in rlogin from client.");
exit(1);
}
// Proceed with normal authentication flow
// ...
Exploitation & Lab Setup
Exploitation of this vulnerability is exceptionally straightforward.
Exploit Command:
The attacker only needs a standard rlogin client, available on most UNIX-like operating systems.
# Attacker executes this command against a vulnerable target
# The syntax may vary slightly between rlogin clients
rlogin -froot <TARGET_IP>
Upon successful execution, the attacker is immediately dropped into a root shell on the target machine.
Lab Setup:
Recreating a lab for this CVE is not recommended for security reasons and is difficult due to the age of the required software. A hypothetical setup would include:
- Virtual Machine: A VM hypervisor like QEMU or VirtualBox.
- Vulnerable OS: An installation image of a vulnerable operating system, such as IBM AIX 4.2. These are not publicly distributed and would need to be sourced from archival media.
- Configuration:
- Install the AIX operating system.
- Ensure the
rlogindaemon (rlogind) is enabled. This is typically managed byinetd. Therloginentry in/etc/inetd.confmust be uncommented. - Ensure no firewall is blocking TCP port 513.
- Attacker Machine: Any Linux or BSD machine with the
rloginclient installed.
The setup is purely for historical and educational purposes. No system should ever run rlogin on a production network.
Detection Engineering
Detecting attempts to exploit CVE-1999-0113 can be achieved at both the network and host levels. The exploit signature is a simple, cleartext string, making it easy to identify.
Network-Based Detection (Suricata)
This Suricata rule detects the -froot string in traffic destined for the rlogin port (513), indicating a likely exploitation attempt.
alert tcp any any -> $HOME_NET 513 (msg:"ET EXPLOIT Possible rlogin -froot Authentication Bypass Attempt (CVE-1999-0113)"; flow:to_server,established; content:"-froot"; classtype:attempted-admin; cve:CVE-1999-0113; reference:url,www.cert.org/advisories/CA-1999-01.html; sid:2000411; rev:5;)
Host-Based Detection (Sigma)
This Sigma rule can be used with a SIEM to detect the local /bin/login process being executed with the malicious -froot argument, which is highly anomalous.
title: Rlogin Root Authentication Bypass via -froot (CVE-1999-0113)
id: 59a8c1f4-3d9a-4c2d-94d3-e18e6c7d23f9
status: stable
description: Detects the execution of the '/bin/login' process with the '-froot' command-line argument, which is indicative of an exploitation attempt against CVE-1999-0113.
references:
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-1999-0113
author: Valters IT
date: 2023/10/27
logsource:
product: linux
service: auditd
detection:
selection:
type: 'EXECVE'
a0: '/bin/login'
a1: '-froot'
condition: selection
falsepositives:
- Extremely low. Legitimate use of 'login -froot' is exceptionally rare and should be investigated.
level: critical
tags:
- attack.initial_access
- attack.t1210
- cve.1999.0113
Remediation & Mitigation
The remediation strategy is straightforward due to the obsolete nature of the affected service.
Disable rlogin Service (Immediate Priority): The
rloginprotocol is insecure by design (transmitting credentials in cleartext) and should not be used. It must be disabled immediately. On systems usinginetd, this can be done by commenting out theloginservice line in/etc/inetd.confand refreshing theinetddaemon.# Example for legacy systems: # 1. Edit /etc/inetd.conf and add a '#' to the beginning of the 'login' line: # #login stream tcp6 nowait root /usr/sbin/rlogind rlogind # 2. Refresh the inetd service to apply the changes refresh -s inetdReplace with Secure Shell (SSH): The industry standard for secure remote access is SSH. All remote administration and file transfers should be conducted over SSH (using
sshandscp/sftp) instead of the r-commands suite.Firewalling: As a defense-in-depth measure, block TCP port 513 at all network boundaries. There is no legitimate reason for this port to be exposed to the internet or across untrusted network segments.
Historical Patching: For historical context, IBM released patches for affected AIX versions, such as APAR IX78135. However, any system old enough to have been vulnerable should be considered long past its end-of-life and must be decommissioned or upgraded. Relying on a decades-old patch is not a viable security strategy.
[!] This Threat Intelligence report was automatically generated by Valters IT (valtersit.com) Neural Engine.
{/* [Security Hash: 087CF83969AB87AE032764B6] */}