HP-UX FTP Daemon is a service included in HP-UX that implements the File Transfer Protocol. Remote exploitation of a buffer overflow vulnerability in the file transfer protocol (FTP) daemon included in multiple versions of Hewlett Packard Development Co.'s (HP) HP-UX allows attackers to gain remote root access in certain configurations.
The problem specifically exists when the FTP daemon is configured via /etc/inetd.conf to log debug information using -v switch. This is a not a default configuration option. When parsing a long command request, an exploitable stack overflow will occur. The overflow occurs before authentication, thus eliminating the need for a local or anonymous FTP account.
Analysis:
Exploitation of this vulnerability allows unauthenticated remote attackers to execute arbitrary code under the privileges of the FTP daemon server, usually root. The severity of this issue is mitigated by the fact that in most production environments, administrators will not be using the debug-logging feature of FTP daemon.
Detection:
To determine if a specific configuration is vulnerable, check /etc/inetd.conf for the ftpd line and see if the debug switch is enabled: grep 'ftpd' /etc/inetd.conf | grep -- -v
If the above command returns text, then the FTP daemon is running in debug mode.
Workaround:
Do not use the -v flag in the FTP daemon entry line in /etc/inetd.conf. If debug-logging is necessary, consider allowing only trusted hosts access to the service using firewall rules or TCP wrappers.
Vendor response:
This vulnerability was addressed in the following patches:
* HP-UX B.11.00: PHNE_29460
* HP-UX B.11.04: PHNE_31034
* HP-UX B.11.11: PHNE_29461
* HP-UX B.11.22: PHNE_29462