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...
Mobile Banking Malware Up 50% in First Half of 2019
Kelly Sheridan, Staff Editor, Dark Reading,  1/17/2020
Exploits Released for As-Yet Unpatched Critical Citrix Flaw
Jai Vijayan, Contributing Writer,  1/13/2020
Microsoft to Officially End Support for Windows 7, Server 2008
Kelly Sheridan, Staff Editor, Dark Reading,  1/13/2020
Register for Dark Reading Newsletters
White Papers
Video
Cartoon Contest
Write a Caption, Win a Starbucks Card! Click Here
Latest Comment: This comment is waiting for review by our moderators.
Current Issue
The Year in Security: 2019
This Tech Digest provides a wrap up and overview of the year's top cybersecurity news stories. It was a year of new twists on old threats, with fears of another WannaCry-type worm and of a possible botnet army of Wi-Fi routers. But 2019 also underscored the risk of firmware and trusted security tools harboring dangerous holes that cybercriminals and nation-state hackers could readily abuse. Read more.
Flash Poll
[Just Released] How Enterprises are Attacking the Cybersecurity Problem
[Just Released] How Enterprises are Attacking the Cybersecurity Problem
Organizations have invested in a sweeping array of security technologies to address challenges associated with the growing number of cybersecurity attacks. However, the complexity involved in managing these technologies is emerging as a major problem. Read this report to find out what your peers biggest security challenges are and the technologies they are using to address them.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2020-7227
PUBLISHED: 2020-01-18
Westermo MRD-315 1.7.3 and 1.7.4 devices have an information disclosure vulnerability that allows an authenticated remote attacker to retrieve the source code of different functions of the web application via requests that lack certain mandatory parameters. This affects ifaces-diag.asp, system.asp, ...
CVE-2019-15625
PUBLISHED: 2020-01-18
A memory usage vulnerability exists in Trend Micro Password Manager 3.8 that could allow an attacker with access and permissions to the victim's memory processes to extract sensitive information.
CVE-2019-19696
PUBLISHED: 2020-01-18
A RootCA vulnerability found in Trend Micro Password Manager for Windows and macOS exists where the localhost.key of RootCA.crt might be improperly accessed by an unauthorized party and could be used to create malicious self-signed SSL certificates, allowing an attacker to misdirect a user to phishi...
CVE-2019-19697
PUBLISHED: 2020-01-18
An arbitrary code execution vulnerability exists in the Trend Micro Security 2019 (v15) consumer family of products which could allow an attacker to gain elevated privileges and tamper with protected services by disabling or otherwise preventing them to start. An attacker must already have administr...
CVE-2019-20357
PUBLISHED: 2020-01-18
A Persistent Arbitrary Code Execution vulnerability exists in the Trend Micro Security 2020 (v160 and 2019 (v15) consumer familiy of products which could potentially allow an attacker the ability to create a malicious program to escalate privileges and attain persistence on a vulnerable system.