Advisory ID: HTB23099
Product: Samsung Kies
Vendor: Samsung Electronics
Vulnerable Version(s): 2.3.2.12054_20 and probably prior
Tested Version: 2.3.2.12054_20
Vendor Notification: June 25, 2012
Public Disclosure: October 15, 2012
Vulnerability Type: NULL Pointer Dereference [CWE-476], Improper Access Control [CWE-284], Improper Access Control [CWE-284], Improper Access Control [CWE-284], Improper Access Control [CWE-284]
CVE References: CVE-2012-3806, CVE-2012-3807, CVE-2012-3808, CVE-2012-3809, CVE-2012-3810
CVSSv2 Base Scores: 4.3 (AV:N/AC:M/Au:N/C:N/I:N/A:P), 6.8 (AV:N/AC:M/Au:N/C:P/I:P/A:P), 5.8 (AV:N/AC:M/Au:N/C:N/I:P/A:P), 5.8 (AV:N/AC:M/Au:N/C:N/I:P/A:P), 5.8 (AV:N/AC:M/Au:N/C:N/I:P/A:P)
Solution Status: Fixed by Vendor
Risk Level: Medium
Discovered and Provided: High-Tech Bridge Security Research Lab ( https://www.htbridge.com/advisory/ )
-----------------------------------------------------------------------------------------------
Advisory Details:
High-Tech Bridge Security Research Lab has discovered multiple vulnerabilities in Samsung Kies synchronization utility that allows remote attacker to compromise affected system, execute and modify arbitrary files, modify arbitrary directories and modify System Registry with privileges of the current user.
1) Null Pointer Dereference in Samsung Kies: CVE-2012-3806
The vulnerability exists due to a null pointer dereference error in GetDataTable() method within the Samsung.DeviceService.DCA.DeviceDataParagonATGM.1 ActiveX control (DCAPARAGONGM.dll, GUID {7650BC47-036D-4D5B-95B4-9D622C8D00A4}, located by default in "C:\Program Files(x86)\Samsung\Kies\External\DeviceModules\"). A remote attacker can pass "tagDATATABLE_SUID" argument equal to 0 to the GetDataTable() method and rise an ACCESS_VIOLATION exception on a MOV EDX,[EAX] instruction, as EAX is previously zeroed by an unexpected NULL value in the memory region pointed by ECX:
Disassembly:
--------------------------------------------------
2A22B95 MOV ECX,[EBP+10]
2A22B98 MOV EAX,[ECX]
2A22B9A MOV EDX,[EAX] // Crash through
Null Pointer Dereference
2A22B9C PUSH 0
2A22B9E PUSH 0
2A22BA0 PUSH 2A71E68
2A22BA5 PUSH EAX
2A22BA6 MOV EAX,[EDX+50]
2A22BA9 CALL EAX
Registers:
--------------------------------------------------
EIP 02A22B9A
EAX 00000000
EBX 02A66774 -> 029E58F0
ECX 0022EBC0 -> 00000000
EDX 006DFCE2 -> 00030000
EDI 00000000
ESI 00000000
EBP 0022EB5C -> 0022EB7C
ESP 0022EB38 -> F2D508FE
The following Proof of Concept code causes a browser to crash:
Multiple vulnerabilities in Samsung Kies v.2.3.2.12054_20
Multiple vulnerabilities in Samsung Kies v.2.3.2.12054_20
Null Pointer Dereference PoC
This simple PoC will crash Internet Explorer.
2) Arbitrary File Execution in Samsung Kies: CVE-2012-3807
The CmdAgent.dll library, located by default in "C:\Program Files (x86)\Samsung\Kies\External\FirmwareUpdate\", has numerous arbitrary file execution vulnerabilities present in "CmdAgentLib" (GUID: {1FA56F8D-A66E-4ABD-9BC9-6F61469E59AD}), in particular in the 'ICommandAgent' interface of the "CommandAgent" class (GUID: {C668B648-A2BD-432C-854F-C8C0A275E1F1}). This default "ICommandAgent" interface has multiple functions and methods, and most of them can be leveraged by an untrusted source.
Arbitrary File Execution:
Run => Vulnerable
RunAt => Initial Exploit Test failed
RunAtNotExit => Initial Exploit Test failed
RunNotExit => Vulnerable
Arbitrary File Execution Proof of Concept:
Multiple vulnerabilities in Samsung Kies v.2.3.2.12054_20
Multiple vulnerabilities in Samsung Kies v.2.3.2.12054_20
Arbitrary File Execution PoC
This simple PoC will spawn IE and display more information about the vulnerability.
3) Arbitrary File Modification in Samsung Kies: CVE-2012-3808
The CmdAgent.dll library, located by default in "C:\Program Files (x86)\Samsung\Kies\External\FirmwareUpdate\", has numerous arbitrary file modification vulnerabilities present in "CmdAgentLib" (GUID: {1FA56F8D-A66E-4ABD-9BC9-6F61469E59AD}), in particular in the 'ICommandAgent' interface of the "CommandAgent" class (GUID: {C668B648-A2BD-432C-854F-C8C0A275E1F1}). This default "ICommandAgent" interface has multiple functions and methods, and most of them can be leveraged by an untrusted source.
Arbitrary File Modification:
FileCopy => Vulnerable
FileCopySync => Vulnerable
FileDelete => Vulnerable
FileMove => Vulnerable
FileMoveExReboot => Initial Exploit Test failed
FileMoveSync => Vulnerable
Arbitrary File Modification Proof of Concept:
Multiple vulnerabilities in Samsung Kies v.2.3.2.12054_20
Multiple vulnerabilities in Samsung Kies v.2.3.2.12054_20
Arbitrary File Modification PoC
This simple PoC will copy your file into your desktop.
This simple PoC will move your file into .
This simple PoC will delete .
4) Arbitrary Directory Modification in Samsung Kies: CVE-2012-3809
The CmdAgent.dll library, located by default in "C:\Program Files (x86)\Samsung\Kies\External\FirmwareUpdate\", has numerous arbitrary directory modification vulnerabilities present in "CmdAgentLib" (GUID: {1FA56F8D-A66E-4ABD-9BC9-6F61469E59AD}), in particular in the 'ICommandAgent' interface of the "CommandAgent" class (GUID: {C668B648-A2BD-432C-854F-C8C0A275E1F1}). This default "ICommandAgent" interface has multiple functions and methods, and most of them can be leveraged by an untrusted source.
Arbitrary Directory Modification:
DirCreate => Vulnerable
DirDelete => Vulnerable
Arbitrary Directory Modification Proof of Concept:
Multiple vulnerabilities in Samsung Kies v.2.3.2.12054_20
Multiple vulnerabilities in Samsung Kies v.2.3.2.12054_20
Arbitrary Directory Modification PoC
This simple PoC will create the directory.
This simple PoC will delete the directory.
5) Arbitrary Registry Modification in Samsung Kies: CVE-2012-3810
The CmdAgent.dll library, located by default in "C:\Program Files (x86)\Samsung\Kies\External\FirmwareUpdate\", has numerous Registry modification vulnerabilities present in "CmdAgentLib" (GUID: {1FA56F8D-A66E-4ABD-9BC9-6F61469E59AD}), in particular in the 'ICommandAgent' interface of the "CommandAgent" class (GUID: {C668B648-A2BD-432C-854F-C8C0A275E1F1}). This default "ICommandAgent" interface has multiple functions and methods, and most of them can be leveraged by an untrusted source.
Arbitrary Registry Modification:
RegiCreateKey => Vulnerable
RegiDeleteKey => Vulnerable
RegiDeleteTree => Vulnerable
RegiDeleteValue => Vulnerable
RegiSetValueInt => Vulnerable
RegiSetValueInt64 => Vulnerable
RegiSetValueString => Vulnerable
RegiSetValueString64 => Vulnerable
Arbitrary Registry Modification Proof of Concept:
Multiple vulnerabilities in Samsung Kies v.2.3.2.12054_20
Multiple vulnerabilities in Samsung Kies v.2.3.2.12054_20
Arbitrary Registry Modification PoC
This simple PoC will create the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\FRoGito
registry key.
This simple PoC will create the string value 'PoC_str' initialized to 'frederic.bourla@htbridge.com' in the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\FRoGitoregistry key.
This simple PoC will create the int value 'PoC_int' initialized to 0x1F90 in the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\FRoGito
registry key.
This simple PoC will delete both string and hex values from the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\FRoGito registry key
This simple PoC will delete the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\FRoGito registry key.
-----------------------------------------------------------------------------------------------
Solution:
Upgrade to KIES v2.5.0.12094_27_11
-----------------------------------------------------------------------------------------------
References:
[1] High-Tech Bridge Advisory HTB23099 - https://www.htbridge.com/advisory/HTB23099 - Multiple vulnerabilities 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 allows synchronization and multimedia files management.
[3] Common Vulnerabilities and Exposures (CVE) - http://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) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.
-----------------------------------------------------------------------------------------------
Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.