Security
Exploiting network-enabled digital cameras
Consumers can now add digital cameras to the list of purchases that come with built-in networking functionality, which means said cameras can also be added to the list of items at risk of being compromised or disabled by remote attackers. Two security researchers presented a talk at Schmoocon 2013 in February detailing a series of attacks against high-end Canon digital cameras. While the speakers did not address a wide range of manufacturers, they were able to access and control the Canon camera with very little effort. Part of the vulnerability stems from poor security engineering on the camera-maker's part, but part of it is baked into the feature set.
Speakers Daniel Mende and Pascal Turbing are both researchers at German IT security firm ERNW. They presented their talk ("Paparazzi over IP") on February 16, although it made headlines in late March when the video from the session was publicized by Help Net Security. Mende and Turbing set out to compromise an EOS 1D X digital SLR (DSLR), Canon's current flagship model, retailing at just under US $7000. The 1D X includes built-in Ethernet connectivity that is used to enable many of the same features typically run over USB in less expensive models: file download, browsing and deleting images, tethered shooting, and so on. It also sports an accessory port, to which a Canon-made WiFi dongle can be attached.
The target
Mende and Turbing were able to successfully mount a number of attacks against the camera, resulting in denial of service, man-in-the-middle attacks which could disclose or delete camera information, and hijacking authorized network sessions. The camera offers several means for accessing the contents of its memory cards remotely (which is rarely a feature desired by the security-conscious), but its remote-control functionality (i.e., tethering the camera to a computer) was insecure, too. At the moment, the team admits, only high-end Canon models are affected by their findings, but network functionality is found in high-end Nikon hardware as well, and virtually all manufacturers are bringing networking to their less expensive camera offerings.
Mende and Turbing noted that the 1D X included a more-or-less complete IPv4 stack, which allowed for attacks at several networking levels. They attempted a few of them, they said, but turned the majority of their time to the more interesting challenge of attacking the custom services offered by the camera. But they did mention a few attacks that would prove useful later on.
At Layer 2, for example, they pointed out that both ARP spoofing and ARP flooding were possible. By spoofing ARP packets from anywhere else on the same Ethernet segment or WiFi network, an attacker could intercept any traffic between the camera and a computer and get man in the middle access. They also noted that the embedded controller has very little memory, so a denial-of-service was possible by sending the camera just 100 ARP packets per second. At the TCP/IP layer, mounting a TCP reset attack was similarly trivial.
Canon at your service
Naturally, the whole point of including a built-in TCP/IP networking stack in the camera is for the manufacturer to run services over it. As Mende and Turbing explained, the 1D X offers four networked services: FTP Upload mode, Digital Living Network Alliance (DLNA) mode, Wireless File Transmitter (WFT) Server mode, and EOS Utility mode. In FTP Upload mode, images shot by the camera are automatically uploaded to a pre-configured FTP server (which could be a very important feature for photojournalists in dangerous locations or under time pressure); DLNA mode is also used for network access to the images on the camera, but by providing a general-purpose DLNA media source that other DLNA products can easily discover and read from.
The final two modes offer control of camera functions. In WFT Server mode, a built-in web server provides browser-based access to tethered shooting functionality, while EOS Utility mode offers more or less the same functions by connecting the camera to Canon's desktop camera control application. The tethering capabilities of the two modes are essentially the same, and are often used in studio photography set-ups. All four networking modes, it should be noted, must be activated on the camera, and cannot be switched on remotely, a limitation which does provide some protection for the camera owner.
FTP Upload mode allows the shooter to relay images to a remote server as they are taken; this could be useful (for example) for photojournalists in the field when time is of the essence. The FTP server address and its authorization credentials must be entered manually on the camera's configuration menu, so completely hijacking an unattended camera is not possible. However, as is common knowledge, FTP credentials are transmitted in the clear, so the entire session can be sniffed; when used in conjunction with the ARP spoofing attack mentioned earlier, an attacker could even spoof the FTP server side of the connection entirely.
DLNA mode is no more secure, and again it is the underlying protocol that is to blame. DLNA is designed for consumer electronics used in the home; there is no real attempt to make connections or service discovery private or secure. DLNA devices broadcast their network address over UPnP, and they offer up all of their content to other DLNA devices (in theory, "renderers"—media player front-ends like TVs) over HTTP. There is no authentication or access control. Anyone on the same network segment can see the UPnP advertisements sent out by the camera, and can access all of its stored media.
WFT mode and EOS Utility mode both offer a bit more of a security story, but both of them have grave flaws. WFT mode uses a tiny built-in web server to deliver a JavaScript-powered web application to the browser, Mende and Turbing reported. The server uses HTTP basic authentication, and stores a session identifier (of the form sessionID=40b1) as a plaintext cookie on the authenticated browser. A man in the middle can sniff this transaction, they said, but the session ID is also a mere four bytes in length. If a user is logged in, someone else can connect to the web server and guess the cookie value with brute force—Mende and Turbing wrote a six-line Python script that could brute-force the session ID in about twenty minutes (depending on how busy the camera is). There is no notification to the logged in user that someone else is impersonating the session.
Once authenticated, the attacker has control over most, but not all, of the camera's automatic functions: picture-taking, focus, changing settings, and so on. The attacker can even activate "live view" mode, which relays a through-the-lens view to the remote browser. In addition, the attacker can browse, download, and delete existing images.
EOS Utility mode offers many of the same features (including shooting and live view mode), but it is designed to connect to Canon's Mac OS X or Windows client applications. The connection method and communication protocol are different, however. When put into EOS Utility mode, the camera advertises itself to the network using the Simple Service Discovery Protocol (SSDP) (which is a multicast message visible to all). The very first time it is used, the camera must manually be put into pairing mode, but subsequently the desktop client and the camera perform a simple handshake, which Mende and Turbing were able to reverse engineer.
The protocol used for communicating between the client application and camera is called PTP/IP, the IP-delivered variant of the standardized Picture Transfer Protocol (PTP) commonly implemented over USB (gPhoto and many other open source applications speak PTP already). At first, Mende and Turbing said, they were concerned that the EOS Utility handshake would be difficult to crack; the authentication command contains a 16-byte ID and a hostname string. But although one would assume that the hostname would be matched against the computer paired with the camera during the first-run setup, they discovered that in fact it is not used at all. Furthermore, the 16-byte ID value is broadcast (in obfuscated form) by the camera in its UPnP messages. Ultimately, an attacker does need an authenticated user to have an active session, but the attacker can disconnect it with the TCP reset attack mentioned earlier and immediately replay the credentials, taking over the session. Of course, the attacker will probably also need a copy of Canon's client application in order to do anything useful (it is unknown if other PTP implementations like gPhoto can control the cameras directly), but Canon provides free downloads of that as a convenience.
Cinéma vérité
Mende and Turbing performed a live demonstration in their session, which revealed some additional details. For example, the camera must be pinged regularly or else it will drop the EOS Utility connection (a limitation that stealing images via the other three methods does not suffer from). The PTP/IP connection also has an upper limit on its throughput of about 2 megabits per second, which means stealing images from across the coffee shop can be time consuming. Mende and Turbing used smaller JPEG format for the images in their demonstration; raw files on the 1D X are in the 20MB range. The pair also said that they were able to disable manual control of the camera when connected in EOS Utility mode. The owner of the camera could always power-cycle the camera, of course, but this is yet another possible denial-of-service approach.
The speakers commented that activating live view mode of a camera remotely had privacy implications, since an attacker could spy on someone else through a device thought to be sitting idle. They speculated that the surveillance risk might be even higher if they find a way to activate the camera's microphone, which so far they have not been able to do. Audience members asked some interesting questions, such as whether firmware updates might patch any of the flaws discussed. Mende and Turbing replied that there had been two firmware updates since the camera's release, and that all of the attacks were carried out with the most recent release. A Bluetooth dongle is available from Canon as well, and another audience member asked about its potential for attackers. The speakers replied that it appears to be capable of connecting only to a GPS unit. But perhaps it is only a matter of time until Bluetooth becomes a problem, too; the pair ended the talk by noting that Canon's latest offering, the EOS 6D, adds a WiFi access point mode and a new protocol designed for interfacing with iOS and Android apps.
It might be hard to accurately gauge the risk of security flaws in a top-of-the-line digital camera, but as Mende and Turbing noted, the features found on the super expensive camera of today are working their way to the consumer-grade product of tomorrow. At the moment, the photographer processing images in the hotel after a big event needs to worry the most. Photographs can be stolen, altered, or even replaced if one is careless enough to trust the network.
One might reasonably argue that anybody who willingly enables FTP Upload or DLNA mode on his or her camera has no expectation of privacy; after all, photojournalists (especially those in dangerous locations) already know how important protecting their data is. For a few people such a risk might endanger their safety; for most others only their livelihood is at stake. Consider the paparazzi mentioned in the talk title, among whom being the first to bring back pictures of an event or an infant with the right parents can be worth tens of thousands. The second paparazzo to bring back the coveted picture might have a hard time proving that the first actually stole them over the network and altered the Exif data.
For open source developers, the findings in this talk offer some words of caution. Users of aftermarket firmware like CHDK or Magic Lantern need to protect their users even if Canon and Nikon do not. On the other hand, weak authentication probably makes it easier to reverse engineer the undocumented protocols often found in these cameras, so users of tethered shooting applications may actually see some benefits somewhere down the line. For the rest of the camera-buying public, though, the take-away is that cameras are just as exploitable as every other consumer electronics gadget on the network. So in 2012, celebrities and politicians may have gotten their phones hacked, but in 2013 their cameras may well be the target. The risks are exactly the same, but at least the pictures will be sharper and perhaps sport better noise-reduction.
Brief items
Security quotes of the week
Contacts list shows Justin Beiber as your only friend
Outbound packets over cell network should require visual inspection and confirmation
[...]
Continuous face detection - if non-owner detected, explode phone
PostgreSQL security update coming April 4
The PostgreSQL project has announced an update coming on April 4. "This release will include a fix for a high-exposure security vulnerability. All users are strongly urged to apply the update as soon as it is available." Pre-announcement of security updates is quite rare, as is the associated shutdown of repository updates and distribution of commit messages, so one assumes that it would be a good idea to be ready to apply this update when it arrives.
New vulnerabilities
389-ds-base: information exposure
| Package(s): | 389-ds-base | CVE #(s): | CVE-2013-1897 | ||||||||||||||||||||||||||||
| Created: | April 3, 2013 | Updated: | June 13, 2013 | ||||||||||||||||||||||||||||
| Description: | From the Red Hat bugzilla:
It was found that the 389 Directory Server did not properly restrict access to entries when the 'nsslapd-allow-anonymous-access' configuration setting is set to 'rootdse'. An anonymous user could connect to the LDAP database and, if the search scope is set to BASE, obtain access to information outside of the rootDSE. The 'rootdse' option exists to provide anonymous access to the rootDSE but no other entries in the directory. An administrator could believe that directory entries are being restricted with this option enabled, however the information provided would be the same as if 'nsslapd-allow-anonymous-access' were set to 'on'. ACI's are still properly evaluated despite this flaw, so this can easily be mitigated by removing the anonymous read ACL. | ||||||||||||||||||||||||||||||
| Alerts: |
| ||||||||||||||||||||||||||||||
bind: denial of service
| Package(s): | bind | CVE #(s): | CVE-2013-2266 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Created: | March 29, 2013 | Updated: | April 8, 2013 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description: | From the Red Hat advisory: A denial of service flaw was found in the libdns library. A remote attacker could use this flaw to send a specially-crafted DNS query to named that, when processed, would cause named to use an excessive amount of memory, or possibly crash. (CVE-2013-2266) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Alerts: |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
drupal7-views: cross-site scripting
| Package(s): | drupal7-views | CVE #(s): | CVE-2013-1887 | ||||||||
| Created: | April 1, 2013 | Updated: | April 3, 2013 | ||||||||
| Description: | From the Drupal advisory:
The Views module provides a flexible method for Drupal site designers to control how lists and tables of content, users, taxonomy terms and other data are presented. The module incorrectly prints some view configuration fields without proper sanitization opening a Cross-Site Scripting vulnerability. The vulnerability is mitigated by the fact that an attacker must have a role with the permission "Administer vocabularies and terms" or other administer-related permissions from contributed modules that integrate with Views. | ||||||||||
| Alerts: |
| ||||||||||
gajim: man-in-the-middle attack
| Package(s): | gajim | CVE #(s): | CVE-2012-5524 | ||||||||||||||||
| Created: | April 1, 2013 | Updated: | January 7, 2014 | ||||||||||||||||
| Description: | From the Red Hat bugzilla:
A security flaw was found in the way Gajim, a Jabber client written in PyGTK, performed verification of invalid (broken / expired) x.509v3 SSL certificates (True as return value was returned always regardless if error during certificate validation occurred or not). A rogue XMPP server could use this flaw to conduct man-in-the-middle attack (MiTM) and trick Gajim client to accept the certificate even when it was invalid / should not be accepted. | ||||||||||||||||||
| Alerts: |
| ||||||||||||||||||
glibc: denial of service
| Package(s): | glibc | CVE #(s): | CVE-2013-0242 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Created: | April 1, 2013 | Updated: | June 3, 2013 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description: | From the CVE entry:
Buffer overflow in the extend_buffers function in the regular expression matcher (posix/regexec.c) in glibc, possibly 2.17 and earlier, allows context-dependent attackers to cause a denial of service (memory corruption and crash) via crafted multibyte characters. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Alerts: |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
jenkins: man-in-the-middle attacks
| Package(s): | jenkins | CVE #(s): | CVE-2013-0253 | ||||
| Created: | April 3, 2013 | Updated: | April 3, 2013 | ||||
| Description: | From the Red Hat advisory:
It was found that all SSL certificate checking was disabled by default in the Apache Maven Wagon plug-in of Jenkins. This would make it easy for an attacker to perform man-in-the-middle attacks. | ||||||
| Alerts: |
| ||||||
libxslt: denial of service
| Package(s): | libxslt | CVE #(s): | CVE-2012-6139 | ||||||||||||||||||||||||||||||||
| Created: | April 2, 2013 | Updated: | April 18, 2013 | ||||||||||||||||||||||||||||||||
| Description: | From the Ubuntu advisory:
Nicholas Gregoire discovered that libxslt incorrectly handled certain empty values. If a user or automated system were tricked into processing a specially crafted XSLT document, a remote attacker could cause libxslt to crash, causing a denial of service. | ||||||||||||||||||||||||||||||||||
| Alerts: |
| ||||||||||||||||||||||||||||||||||
mantis: multiple vulnerabilities
| Package(s): | mantis | CVE #(s): | CVE-2013-0197 CVE-2013-1883 | ||||||||
| Created: | April 1, 2013 | Updated: | April 3, 2013 | ||||||||
| Description: | From the Red Hat bugzilla [1, 2]:
A denial of service flaw was found in the way MantisBT, a free popular web-based issue tracking system, performed processing of certain type of View Issues page search queries. A remote attacker could provide a specially-crafted query (filter combining some criteria and a text search with 'any condition') that, when processed by the MantisBT system, would lead to excessive system resources consumption (denial of service), possibly leading to complete MantisBT server instance unavailability. (CVE-2013-1883) A persistent cross-site scripting (XSS) flaw was found in the way Mantis, a web-based issue tracking system, performed sanitization of the 'match_type' parameter. A remote attacker could provide a specially-crafted URL that, when processed by Mantis instance, would lead to arbitrary web script or HTML execution. (CVE-2013-0197) | ||||||||||
| Alerts: |
| ||||||||||
moodle: multiple vulnerabilities
| Package(s): | moodle | CVE #(s): | CVE-2013-1830 CVE-2013-1831 CVE-2013-1832 CVE-2013-1833 CVE-2013-1834 CVE-2013-1835 CVE-2013-1836 | ||||||||
| Created: | April 3, 2013 | Updated: | April 3, 2013 | ||||||||
| Description: | From the CVE entries:
user/view.php in Moodle through 2.1.10, 2.2.x before 2.2.8, 2.3.x before 2.3.5, and 2.4.x before 2.4.2 does not enforce the forceloginforprofiles setting, which allows remote attackers to obtain sensitive course-profile information by leveraging the guest role, as demonstrated by a Google search. (CVE-2013-1830) lib/setuplib.php in Moodle through 2.1.10, 2.2.x before 2.2.8, 2.3.x before 2.3.5, and 2.4.x before 2.4.2 allows remote attackers to obtain sensitive information via an invalid request, which reveals the absolute path in an exception message. (CVE-2013-1831) repository/webdav/lib.php in Moodle 2.x through 2.1.10, 2.2.x before 2.2.8, 2.3.x before 2.3.5, and 2.4.x before 2.4.2 includes the WebDAV password in the configuration form, which allows remote authenticated administrators to obtain sensitive information by configuring an instance. (CVE-2013-1832) Multiple cross-site scripting (XSS) vulnerabilities in the File Picker module in Moodle 2.x through 2.1.10, 2.2.x before 2.2.8, 2.3.x before 2.3.5, and 2.4.x before 2.4.2 allow remote authenticated users to inject arbitrary web script or HTML via a crafted filename. (CVE-2013-1833) notes/edit.php in Moodle 1.9.x through 1.9.19, 2.x through 2.1.10, 2.2.x before 2.2.8, 2.3.x before 2.3.5, and 2.4.x before 2.4.2 allows remote authenticated users to reassign notes via a modified (1) userid or (2) courseid field. (CVE-2013-1834) Moodle 2.x through 2.1.10, 2.2.x before 2.2.8, 2.3.x before 2.3.5, and 2.4.x before 2.4.2 allows remote authenticated administrators to obtain sensitive information from the external repositories of arbitrary users by leveraging the login_as feature. (CVE-2013-1835) Moodle 2.x through 2.1.10, 2.2.x before 2.2.8, 2.3.x before 2.3.5, and 2.4.x before 2.4.2 does not properly manage privileges for WebDAV repositories, which allows remote authenticated users to read, modify, or delete arbitrary site-wide repositories by leveraging certain read access. (CVE-2013-1836) | ||||||||||
| Alerts: |
| ||||||||||
mozilla: multiple vulnerabilities
| Package(s): | firefox thunderbird seamonkey | CVE #(s): | CVE-2013-0788 CVE-2013-0793 CVE-2013-0795 CVE-2013-0796 CVE-2013-0800 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Created: | April 3, 2013 | Updated: | June 3, 2013 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description: | From the Red Hat advisory:
Several flaws were found in the processing of malformed web content. A web page containing malicious content could cause Firefox to crash or, potentially, execute arbitrary code with the privileges of the user running Firefox. (CVE-2013-0788) A flaw was found in the way Same Origin Wrappers were implemented in Firefox. A malicious site could use this flaw to bypass the same-origin policy and execute arbitrary code with the privileges of the user running Firefox. (CVE-2013-0795) A flaw was found in the embedded WebGL library in Firefox. A web page containing malicious content could cause Firefox to crash or, potentially, execute arbitrary code with the privileges of the user running Firefox. Note: This issue only affected systems using the Intel Mesa graphics drivers. (CVE-2013-0796) An out-of-bounds write flaw was found in the embedded Cairo library in Firefox. A web page containing malicious content could cause Firefox to crash or, potentially, execute arbitrary code with the privileges of the user running Firefox. (CVE-2013-0800) A flaw was found in the way Firefox handled the JavaScript history functions. A malicious site could cause a web page to be displayed that has a baseURI pointing to a different site, allowing cross-site scripting (XSS) and phishing attacks. (CVE-2013-0793) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Alerts: |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rails: multiple vulnerabilities
| Package(s): | rails | CVE #(s): | CVE-2013-1854 CVE-2013-1855 CVE-2013-1857 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Created: | March 29, 2013 | Updated: | April 11, 2013 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description: | From the CVE database: The Active Record component in Ruby on Rails 2.3.x before 2.3.18, 3.1.x before 3.1.12, and 3.2.x before 3.2.13 processes certain queries by converting hash keys to symbols, which allows remote attackers to cause a denial of service via crafted input to a where method. (CVE-2013-1854) The sanitize_css method in lib/action_controller/vendor/html-scanner/html/sanitizer.rb in the Action Pack component in Ruby on Rails before 2.3.18, 3.0.x and 3.1.x before 3.1.12, and 3.2.x before 3.2.13 does not properly handle \n (newline) characters, which makes it easier for remote attackers to conduct cross-site scripting (XSS) attacks via crafted Cascading Style Sheets (CSS) token sequences. (CVE-2013-1855) The sanitize helper in lib/action_controller/vendor/html-scanner/html/sanitizer.rb in the Action Pack component in Ruby on Rails before 2.3.18, 3.0.x and 3.1.x before 3.1.12, and 3.2.x before 3.2.13 does not properly handle encoded : (colon) characters in URLs, which makes it easier for remote attackers to conduct cross-site scripting (XSS) attacks via a crafted scheme name, as demonstrated by including a : sequence. (CVE-2013-1857) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Alerts: |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
rubygem-activesupport: XML parsing vulnerability
| Package(s): | rubygem-activesupport | CVE #(s): | CVE-2013-1856 | ||||||||||||
| Created: | April 1, 2013 | Updated: | April 3, 2013 | ||||||||||||
| Description: | From the Red Hat bugzilla:
XML Parsing Vulnerability affecting JRuby users There is a vulnerability in the JDOM backend to ActiveSupport's XML parser. This could allow an attacker to perform a denial of service attack or gain access to files stored on the application server. This vulnerability has been assigned the CVE identifier CVE-2013-1856. Versions Affected: 3.0.0 and All Later Versions when using JRuby Not affected: Applications not using JRuby or JRuby applications not using the JDOM backend. Fixed Versions: 3.2.13, 3.1.12 | ||||||||||||||
| Alerts: |
| ||||||||||||||
Page editor: Jake Edge
Next page:
Kernel development>>
