Site icon泓源视野

‘overlayfs’ Local Privilege Escalation – CVE-2015-1328 exploit.c

The overlayfs implementation in the linux (aka Linux kernel) package before 3.19.0-21.21 in Ubuntu through 15.04 does not properly check permissions for file creation in the upper filesystem directory, which allows local users to obtain root access by leveraging a configuration in which overlayfs is permitted in an arbitrary mount namespace. (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-1328)

Ubuntu could allow a local attacker to gain elevated privileges on the system, caused by incorrect permission checks when creating new files in the upper filesystem directory by the overlayfs filesystem. An attacker could exploit this vulnerability to gain root privileges on the system. Note: This vulnerability also affects Cloud Foundry. (https://exchange.xforce.ibmcloud.com/vulnerabilities/103882)

Affected releases

Affected kernel

For more info

https://seclists.org/oss-sec/2015/q2/717

https://www.securityfocus.com/bid/75206/info

https://www.exploit-db.com/exploits/37293

Identification

1. We should already have access to the machine, since, this is a post-exploitation activity, and the attack is done locally. First thing we need to do is identify the kernel version

2. check the kernel version

Note: It was identified at the 4.3.3 version. So, we are on good track with 3.13.0, older version.

3. To make sure this is vulnerable, let’s run a script that detects possible vulnerabilities. linux-exploit suggester (see how to use https://vk9-sec.com/linux-exploit-suggester-enumeration-linux-kernellinux-based-machine/)

Source code (https://github.com/mzet-/linux-exploit-suggester)

Note: Highly vulnerable, means this is likely to have success.

Execution

1. Download the exploit to your Kali/Parrot machine, and share it by any means with the remote server. I’d use a python web server

2. In the remote server access the Kali web server, and download the script in /tmp

3. Proceed to compile, and, execute the script

Remedy

Apply the patch for this vulnerability, available from the Ubuntu GIT Repository.

For Cloud Foundry Elastic Runtime:

Upgrade to the latest version (1.4.5 or later), available from the Pivotal Web site.

Exit mobile version