Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

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...
Data Privacy Protections for the Most Vulnerable -- Children
Dimitri Sirota, Founder & CEO of BigID,  10/17/2019
Sodinokibi Ransomware: Where Attackers' Money Goes
Kelly Sheridan, Staff Editor, Dark Reading,  10/15/2019
Tor Weaponized to Steal Bitcoin
Dark Reading Staff 10/18/2019
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
7 Threats & Disruptive Forces Changing the Face of Cybersecurity
This Dark Reading Tech Digest gives an in-depth look at the biggest emerging threats and disruptive forces that are changing the face of cybersecurity today.
Flash Poll
2019 Online Malware and Threats
2019 Online Malware and Threats
As cyberattacks become more frequent and more sophisticated, enterprise security teams are under unprecedented pressure to respond. Is your organization ready?
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2019-18218
PUBLISHED: 2019-10-21
cdf_read_property_info in cdf.c in file through 5.37 does not restrict the number of CDF_VECTOR elements, which allows a heap-based buffer overflow (4-byte out-of-bounds write).
CVE-2019-18217
PUBLISHED: 2019-10-21
ProFTPD before 1.3.6b and 1.3.7rc before 1.3.7rc2 allows remote unauthenticated denial-of-service due to incorrect handling of overly long commands because main.c in a child process enters an infinite loop.
CVE-2019-16862
PUBLISHED: 2019-10-21
Reflected XSS in interface/forms/eye_mag/view.php in OpenEMR 5.x before 5.0.2.1 allows a remote attacker to execute arbitrary code in the context of a user's session via the pid parameter.
CVE-2019-17409
PUBLISHED: 2019-10-21
Reflected XSS exists in interface/forms/eye_mag/view.php in OpenEMR 5.x before 5.0.2.1 ia the id parameter.
CVE-2019-10715
PUBLISHED: 2019-10-21
There is Stored XSS in Verodin Director before 3.5.4.0 via input fields of certain tooltips, and on the Tags, Sequences, and Actors pages.