Last week’s release of Jelly Bean (v 4.1+), the latest version of Google’s Android, was a big step for the company security-wise, as the hugely popular mobile operating system now sports properly implemented address space layout randomization.
ASLR is an exploit mitigation method that randomizes the positions of key data areas such as libraries, heap, stack, and the base of the executable, in a process’s address space, and that makes it near impossible for malware authors and hackers to predict where their malicious payloads will be loaded.
To be fair, Android’s previous incarnation (4.0, or Ice Cream Sandwich) also has ASLR, but it was not put into action efficiently.
As Oberheide pointed out at the time, if ASLR is not applied to all areas of memory in a process, its effectiveness is voided.
“A single executable mapping that is mapped in a static location in the address space is often sufficient to construct a ROP payload,” he said.
All these oversights have been corrected with Jelly Bean, giving it full stack, heap/brk, lib/mmap, linker, and executable ASLR.
Oberheide says that even though security experts might still not be satisfied and point out the weaknesses of the technique, Google can continue to fortify the platform with other hardening techniques and exploit mitigations that can be ported from computer operating systems to mobile one.
He also advises to the company to consider mandatory code signing for apps. The move, already implemented by Apple on its iOS, is a good way to prevent the overwhelming majority of unauthorized (read: malicious) applications from running on the system, as they are not signed with a valid digital signature.
“While Android is still playing a bit of catch-up, other mobile platforms are moving ahead with more innovation exploit mitigation techniques, such as the in-kernel ASLR present in Apple’s iOS 6. One could claim that iOS is being proactive with such techniques, but in reality, they’re simply being reactive to the type of exploits that typically target the iOS platform. However, Apple does deserve credit for raising the barrier up to the point of kernel exploitation by employing effective userspace mitigations such NX, ASLR, and mandatory code signing. Thankfully, Android is getting there, and Jelly Bean is a major step towards that goal,” Oberheide concluded.