Perimeter
3/30/2012
10:30 AM
John H. Sawyer
John H. Sawyer
Commentary
Connect Directly
RSS
E-Mail
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 johnhsawyer@gmail.com 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...
Dark Reading | Security | Protect The Business - Enable Access
Error
Please contact support@darkreading.com if you continue to receive this message.

Dark Reading Home