Perimeter

3/30/2012
10:30 AM
John H. Sawyer
John H. Sawyer
Commentary
50%
50%

Forensic Approach To Mobile App Vulnerability Research

Intro to a unique approach for vulnerability research on mobile apps using traditional PC forensic tools

I recently gave a presentation at the SANS Mobile Device Security Summit in Nashville, titled "Smart Bombs: Mobile Application Vulnerabilities and Exploitation." The talk was a bit of a preview of a talk of the same name that Kevin Johnson, Tom Eston, and I will be giving at OWASP AppSecDC next week. The focus of the SANS presentation was to cover some of the tools and methods I use for analyzing mobile devices for vulnerabilities. I'll be covering some of those approaches and tools in this and upcoming Evil Bytes blogs.

While some of my methods (i.e., Burp to intercept HTTP[S] traffic) are pretty common among security researchers and penetration testers, I think a few techniques are a bit unique. Why? Well, I've developed them based on my experiences as a forensic examiner, network intrusion analyst, and penetration tester. Today, I'm going to start discussing the forensic methods and introduce one particular tool that I've adapted from PC-based forensic cases to mobile platforms.

The use of timeline analysis is one of the areas in forensics that has gained a lot of attention during the past few years. Thanks to the wonderful log2timeline tool, timelines have experienced a rebirth as more and more sources of data (i.e., logs, browser history, Windows Registry) can be pulled into a timeline, making it easier to determine what has happened. What's cool is that timeline analysis techniques can also be applied to mobile application research to find all sorts of interesting things about applications.

Like what, you ask? The locations of the application itself, where it stores temporary files, any associated log files, and downloaded content are a few examples. What I typically do is create several timelines, including one before an application is installed, another while it is running, and a third after the app is closed.

The different "snapshots" of the filesystem at different times gives insight into what the application is doing and how it's interacting with files on the actual mobile device. For example, the app might store downloaded files in an odd location or might decrypt encrypted attachments and put them it in a temporary directory.

Based on what I've heard from some other researchers, they use the tool dd to create a full bit-for-bit copy of the mobile device filesystem and analyze it using forensic tools like AccessData's FTK or Guidance Software's EnCase. While that works for filesystem analysis and is useful for recovering deleted files, it is often incredibly slow trying to dump 16 to 64 GB from a mobile device.

To make my analysis process faster, I started using mac-robber from Brian Carrier about a year ago to collect timestamps directly on the device and process them on my analysis machine using mactime from the Sleuth Kit project. Mac-robber runs quickly and the resulting "body" file can be quickly copied off the device and processed with mactime to create the timeline. From there, you can enjoy the timeline goodness.

In the next part of this blog series, I'll cover how to get mac-robber running on Android and iOS devices, along with examples of how to use it to find interesting things (like vulnerabilities).

It's important I point out that I'm not attempting to perform a forensically sound analysis. My goal is to perform security research, which ends up having an impact on the actual mobile device environment -- something you want to avoid as much as possible during the forensic process.

John Sawyer is a Senior Security Analyst with InGuardians, Inc. The views and opinions expressed in this blog are his own and do not represent those of his employer. He can be reached at [email protected] and found on Twitter @johnhsawyer.

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
johnhsawyer
50%
50%
johnhsawyer,
User Rank: Moderator
4/1/2012 | 2:27:46 PM
re: Forensic Approach To Mobile App Vulnerability Research
Thank you for the comment. I'm not advocating this approach is the only way--far from it. This is simply a basic, introductory approach to get people started that is easier to explain and teach. It can built upon or be a precursor to advanced methods like runtime analysis and binary reverse engineering.

Plus, I like finding alternative uses of tools to do things outside of what they were designed to do and the application of timeline analysis with mac-robber here is a good example of that.

(I'm sure you know the following, but I'm including it for other readers.) The difference between the tools you mention and those I discuss are akin to the difference between static binary and runtime analysis of executables (like malware) to behavioral analysis of what happens to the system when the executable runs.

There is a learning curve and depth of knowledge that the average system administrator and security professional won't have for more advanced methods so they're less likely to be comfortable with GDB and IDA Pro, but they would be more comfortable with analyzing environmental changes to the filesystem, Registry, event logs, etc. and looking at network traffic (maybe even strace if they have *nix background). That's where this approach allows them to leverage their knowledge to do analysis and can build upon that experience to do more advanced analysis later on.

-jhs
flast_name606
50%
50%
flast_name606,
User Rank: Apprentice
4/1/2012 | 5:03:52 AM
re: Forensic Approach To Mobile App Vulnerability Research
I don't agree that forensics is a "good" way to evaluate mobile platforms or apps for vulnerabilities. I think they are "one" way, but they do not get into the runtime or the binaries or code.

My favorite tools for runtime are cycript for iOS and strace for Android, which are not equivalent tools. strace can really see what files and networks are touched by an Android app that Burp and mac-robber will never see into...
New Free Tool Scans for Chrome Extension Safety
Dark Reading Staff 2/21/2019
Making the Case for a Cybersecurity Moon Shot
Adam Shostack, Consultant, Entrepreneur, Technologist, Game Designer,  2/19/2019
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
5 Emerging Cyber Threats to Watch for in 2019
Online attackers are constantly developing new, innovative ways to break into the enterprise. This Dark Reading Tech Digest gives an in-depth look at five emerging attack trends and exploits your security team should look out for, along with helpful recommendations on how you can prevent your organization from falling victim.
Flash Poll
How Enterprises Are Attacking the Cybersecurity Problem
How Enterprises Are Attacking the Cybersecurity Problem
Data breach fears and the need to comply with regulations such as GDPR are two major drivers increased spending on security products and technologies. But other factors are contributing to the trend as well. Find out more about how enterprises are attacking the cybersecurity problem by reading our report today.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2014-10078
PUBLISHED: 2019-02-23
Vembu StoreGrid 4.4.x has XSS in interface/registercustomer/onlineregsuccess.php, interface/registerreseller/onlineregfailure.php, interface/registerclient/onlineregfailure.php, and interface/registercustomer/onlineregfailure.php.
CVE-2014-10079
PUBLISHED: 2019-02-23
In Vembu StoreGrid 4.4.x, the front page of the server web interface leaks the private IP address in the "ipaddress" hidden form value of the HTML source code, which is disclosed because of incorrect processing of an index.php/ trailing slash.
CVE-2018-20785
PUBLISHED: 2019-02-23
Secure boot bypass and memory extraction can be achieved on Neato Botvac Connected 2.2.0 devices. During startup, the AM335x secure boot feature decrypts and executes firmware. Secure boot can be bypassed by starting with certain commands to the USB serial port. Although a power cycle occurs, this d...
CVE-2019-9037
PUBLISHED: 2019-02-23
An issue was discovered in libmatio.a in matio (aka MAT File I/O Library) 1.5.13. There is a buffer over-read in the function Mat_VarPrint() in mat.c.
CVE-2019-9038
PUBLISHED: 2019-02-23
An issue was discovered in libmatio.a in matio (aka MAT File I/O Library) 1.5.13. There is an out-of-bounds read problem with a SEGV in the function ReadNextCell() in mat5.c.