Matt Posted August 3, 2013 Report Posted August 3, 2013 Description : Karotz Smart Rabbit version 12.07.19.00 suffers from python module hijacking and cleartext token passing vulnerabilities.Author : Dan CrowleySource : Karotz Smart Rabbit 12.07.19.00 Hijacking / Cleartext Token ? Packet StormCode : Trustwave SpiderLabs Security Advisory TWSL2013-021:Multiple Vulnerabilities in Karotz Smart RabbitPublished: 08/01/13Version: 1.0Vendor: Electronic Arts (http://www.ea.com/), formerly Mindscape, formerly VioletProduct: KarotzVersion affected: 12.07.19.00Product description:Karotz is the successor to the "Nabaztag". Nabaztag is a Wi-Fi enabledambient electronic device in the shape of a rabbit, invented by RafiHaladjian and Olivier Mével, and manufactured by the company Violet.[1]Nabaztag was designed to be a "smart object" comparable to thosemanufactured by Ambient Devices; it can connect to the Internet (todownload weather forecasts, read its owner's email, etc.). It is alsocustomizable and programmable to an extent.Finding 1: Python Module Hijacking*****Credit: Daniel Crowley of Trustwave SpiderLabsCVE: CVE-2013-4867CWE: CWE-427During the setup process for a Karotz unit, if wifi is selected as themethod used to connect to the Internet, a python script named "autorunwifi"is run as root to set up the wifi connectivity. This file, along withseveral others, is placed in the root of a USB flash drive or hard drive.Another file, named "autorunwifi.sig", contains a signature of autorunwifisigned with the private key for Violet, to prevent modifications to the"autorunwifi" script.Since Python first attempts to load modules not built into Python from thesame directory as the invoked script, it is possible to override thefunctionality of imported modules by placing a file with the same basenameas the module being imported and an extension of ".py". In this case, it ispossible to write a Python script named "simplejson.py" and place it in thesame directory as the other setup files, which will cause the contents ofsimplejson.py to be executed at the beginning of the "autorunwifi" scriptexecution.This attack requires a USB flash drive to be plugged into the Karotz unit,and requires the Karotz to be turned off and on.The following is a proof of concept "simplejson.py" file that will copy thepubring.gpg file from the Karotz onto the inserted USB key, which isprocessed with MD5 to produce the key used to decrypt the root filesystemfor the Karotz:## simplejson.pyimport osos.system("cp /karotz/etc/gpg/pubring.gpg /mnt/usbkey")## end simplejson.pyFinding 2: API Session Token Passed in Cleartext*****Credit: Daniel Crowley of Trustwave SpiderLabsCVE: CVE-2013-4868There are two kinds of applications for the Karotz: hosted and external.Hosted applications are stored and run on the Karotz itself. Externalapplications run outside the Karotz unit and control the Karotz through anapi at api.karotz.com. Both types of applications must specifically requestto use parts of the karotz in the manifest file of their applicationpackage. For instance, if your application uses the webcam and ears, youmust specify in your application manifest that these will be used by yourapplication before they will be available to your application.The control is performed over plaintext HTTP. As such, the session tokenauthenticating API calls used to control the Karotz is available to aneavesdropping attacker. The session token can be used to perform any remoteAPI call available to the application. For instance, if the applicationuses the webcam, a video could be captured using the webcam and sent to anarbitrary server.Vendor Response:No response received.Remediation Steps:No official patch is available. To limit exposure,network access to these devices should be limited to authorizedpersonnel through the use of Access Control Lists and propernetwork segmentation.Revision History:06/19/13 - Attempt to contact vendor07/10/13 - Attempt to contact vendor07/12/13 - Attempt to contact vendor08/01/13 - Advisory publishedAdditional Credits:Discussion of Python module loading behavior and initial suggestion ofapplication to Karotz by Jennifer SavageReferences1. http://www.karotz.com2. http://savagejen.github.io/blog/2013/04/28/python-module-hijacking/About Trustwave:Trustwave is the leading provider of on-demand and subscription-basedinformation security and payment card industry compliance managementsolutions to businesses and government entities throughout the world. Fororganizations faced with today's challenging data security and complianceenvironment, Trustwave provides a unique approach with comprehensivesolutions that include its flagship TrustKeeper compliance managementsoftware and other proprietary security solutions. Trustwave has helpedthousands of organizations--ranging from Fortune 500 businesses and largefinancial institutions to small and medium-sized retailers--managecompliance and secure their network infrastructure, data communications andcritical information assets. Trustwave is headquartered in Chicago withoffices throughout North America, South America, Europe, Africa, China andAustralia. For more information, visit https://www.trustwave.comAbout Trustwave SpiderLabs:SpiderLabs(R) is the advanced security team at Trustwave focused onapplication security, incident response, penetration testing, physicalsecurity and security research. The team has performed over a thousandincident investigations, thousands of penetration tests and hundreds ofapplication security tests globally. In addition, the SpiderLabs Researchteam provides intelligence through bleeding-edge research and proof ofconcept tool development to enhance Trustwave's products and services.https://www.trustwave.com/spiderlabsDisclaimer:The information provided in this advisory is provided "as is" withoutwarranty of any kind. Trustwave disclaims all warranties, either express orimplied, including the warranties of merchantability and fitness for aparticular purpose. In no event shall Trustwave or its suppliers be liablefor any damages whatsoever including direct, indirect, incidental,consequential, loss of business profits or special damages, even ifTrustwave or its suppliers have been advised of the possibility of suchdamages. Some states do not allow the exclusion or limitation of liabilityfor consequential or incidental damages so the foregoing limitation may notapply.________________________________This transmission may contain information that is privileged, confidential, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Quote