A vulnerability in backup software installed on some LG Android smartphones could enable an attacker with access to the device to gain root privileges.
Sprite Software’s AndroidBackup tool is installed by OEM on a number of LG Optimus, Mach, Lollipop, and Prada devices. The backup tool, in conjunction with its spritebud daemon, can be exploited to enable an attacker to run code locally on an Android device.
LG and Sprite Software were informed by researcher Justin Case of a half-dozen vulnerabilities, including at least one more serious than this one, Case told Threatpost. After numerous attempts to contact LG, the company told Case that it was preparing a solution and asked for a copy of his exploit, Case said. Sprite, meanwhile, has prepared a fix and said it is waiting for LG to release it.
“It’s complete privilege escalation to root on everything,” Case said. “I can run anything I want.”
Case’s exploit does require local access to the device and for the user to initiate a restore on the phone.
“Any issue that allows one to escalate to root is a problem,” said Jeff Forristal, CTO at Bluebox, a mobile security firm. “The fact that is an LG specific issue points to the vulnerabilities that can be introduced by device partners working with the AOSP [Android Open Source Project].”
The Backup tool is the front end of the tool while spritebud is the service doing backup and resotre on the phone. The daemon runs as the root user and accepts instructions from backup. Case wrote a specially crafted backup that enables him to write new files, or change permissions or ownership on any file.
“I crafted a backup that when it restores, creates a lag long enough for my app to set up a symlink, or shortcut. When the first file restores, it creates a directory and writes a 50 MB file to increase the lag,” Case explained. “Then it dumps another script that roots the device and executes script in the kernel for me.”
Case also said that an attacker could replace previous backups with their modified backup and wait for the user to restore the phone.
“There’s no reason [for the backup app to be on the device]. Android’s built-in backup works wonderfully,” Case said. “This is a complete nightmare. Some apps should not restore backups for a number of security reasons. You could dump all kinds of information from it.”
Version 2.5.4105 of Backup and 1.3.24 of spritebud are affected.
“This exploit boils down to bad filesystem permissions on a local Unix socket used to communicate to a root-owned process that copies files onto the file system (the restore operation),” Bluebox’s Forristal said. “Combining it with a symlink attack that leverages the hotplug daemon, they wind up getting root privileges.”
Android handset makers and wireless carriers have been the focus of government investigations into their security practices, particularly around timely updates and patch releases.
HTC America is looking at costly enhancements to its security practices after a settlement with the Federal Trade Commission, announced in February, was charged with unfair business practices after it was alleged to be failing to address vulnerabilities in its devices that could expose consumers to malware attacks, fraud, the loss of personal and sensitive information, and even physical harm. HTC was charged with failing to provide regular security patches for its Android devices, which it must now do as part of its settlement with the FTC. It must also undergo biennial independent security assessments for 20 years, enhance security training for its developers and must develop a mechanism for reporting vulnerabilities.
Bloatware added to devices was also an issue as was blocking of features such as tethering and Bluetooth.
Shortly after the HTC decision, the American Civil Liberties Union asked the FTC to similarly investigate the security practices of the four major wireless carriers: Verizon; AT&T; TMobile; and Sprint Nextel.