Having spoken at both at the SANS Mobile Device Security Summit as well as OWASP AppSec DC recently about testing mobile applications I’ve encountered that like the old saying goes “There are many ways to skin a cat”, there are also many ways to assess a mobile application. I’ve seen very detailed testing methodologies, not so detailed and everything in between. I’ve also heard other security professionals say that testing mobile applications are just like testing a web application. This is simply a wrong and inaccurate statement. Mobile applications are fairly complex and just assessing the application layer is only a small look into the overall security of a mobile application. While the OWASP Mobile Security Project will help define a complete mobile application testing methodology (which is in process), here are three areas that need to be tested in every mobile application.

1. The Mobile File System
How’s the application storing data and where is it being stored? You’d be surprised how much information is being stored in files, SQLite databases, system logs and more. If you’re lucky you will sometimes find private keys and hardcoded passwords. As a great example, the mobile Facebook application suffers from a file system vulnerability as I write this. The author likes to call this a “plist hijack attack”. Simply move the plist file to another mobile device and you are logged in as that user. As for tools to use when looking for file system vulnerabilities you should really check out the forensic approach that John Sawyer from InGuardians has developed. It’s my preferred method for seeing how the app writes to the file system and saves lots of time over creating a dd image.

2. The Application Layer
How’s the application communicating over HTTP? How are web services being used and how are they configured. Important things such as authorization and authentication need to be reviewed as well as session handling, business logic, input validation and crypto functions. Business logic needs to reviewed just like you would in a Web Application Assessment to find flaws in the way critical functions (like shopping cart checkout processes) were developed. Remember to never under estimate the criticality of Web Services! For reference and context, check out the presentation that Josh Abraham, Kevin Johnson and I gave at Black Hat USA last year.

Something else worth mentioning is that you can’t rely on traditional web proxies like Burp Suite to test the application layer on a mobile app. I’ve encountered applications that are configured to bypass device proxy settings! You need to use a tool like Mallory which is a fantastic TCP and UDP proxy. Mallory sees all traffic and allows you to manipulate and fuzz it. There are other ways to do this as well but regardless, you need to have a way to see all traffic the mobile app may generate.

3. The Transport Layer
How does the application communicate over TCP? How are custom protocols and third-party APIs used? Does the application use SSL? At OWASP AppSec DC we talked about the LinkedIn mobile application that was vulnerable to “sidejacking” or better known as HTTP session hijacking. This is where an attacker can pull out the session cookie in clear text and replay this so the attacker can login as the user. The popular “Firesheep” tool released in 2010 demonstrated this nicely. The good news is that the recent release of the LinkedIn app (version 5.0) fixes the sidejacking issue. Unfortunately though, using SSL for just the login process and defaulting back to HTTP is an issue many mobile and web applications still have.

Mobile Application testing is something that will evolve as mobile apps get more complex and the business drives more towards mobile solutions. If you’re deploying mobile apps for your business it’s more important than ever to have testing done on these three areas at a minimum. Lastly, keep up-to-date on the latest developments on Mobile security and testing methodologies by getting involved with the OWASP Mobile Security Project.

On Tuesday April 10th at 12pm EST, 9am PST, 5pm GMT I’ll be presenting “5 Lessons Learned From Breaking In: Confessions of a Pentester & Other Stories” during a free webinar. I’ll be talking about the five most common ways my team and I break into companies that you would think are highly secured such as energy companies and casinos. I’ll be joined by Richard Stiennon and Kevin Henry who will be discussing business process hacking and APTs. When you register you will get entered to win a full version of Netsparker Web Application Scanner (retail value of $5,950). Register for free here.

This week I co-presented “Smart Bombs: Mobile Vulnerability and Exploitation” with John Sawyer and Kevin Johnson at OWASP AppSec DC. We talked about the some of the current problems facing mobile applications such as flaws found in the OWASP Mobile Top 10 and various privacy issues. We also talked about how you go about testing mobile applications from the application layer (HTTP) down to the transport layer (TCP) and file system. I highly recommend you take a look at John’s file system testing methodology as he takes more of a forensic approach which works really well. The takeaway from the talk is that you need to look at all these areas when testing mobile apps and mobile apps are growing area of concern from a security and privacy perspective.

Below are links over on SlideShare to the latest version of my ever evolving presentation “Attacking & Defending Apple iOS Devices in the Enterprise”. This is the version I presented at the SANS Mobile Device Security Summit a few weeks ago. I include information on iOS 5, the latest jailbreaks at the time (this has since changed with the release of iOS 5.1) and some information on the security of iCloud.

Just a reminder that I’ll be presenting Smart Bombs: Mobile Vulnerability and Exploitation with John Sawyer and Kevin Johnson at OWASP AppSec DC on April 5th in Washington DC. I’ll be focusing my research on iOS application testing and some of the vulnerabilities discovered in some of the top 25 iOS applications.

Just a quick post about the SANS Mobile Device Security Summit that I participated in. Kudos to Kevin Johnson and Tony DeLaGrange from Secure Ideas for helping organize and lead the event. They did a great job! If you’ve been to SANS events in the past I assure you that this was much different. First, there was a great line up which included Rafal Los (HP), Jack Mannino (nVisium Security), Chris Cuevas (Secure Ideas), John Sawyer (InGuardians), Josh Feinblum (The Advisory Board Company) and Daniel Miessler (HP ShadowLabs) to name a few. Having a lineup of great speakers really made the summit flow as well as it did.

What I liked most about this event was that there were plenty of “real world” talks on how enterprises are deploying and managing mobile deployments. Real in the “trenches” types of talks. Here are some of the themes that I heard throughout all the talks:

Mobile Threats are an evolving, moving target. Security teams have to be quick to adapt to new mobile technology

MDM (Mobile Device Management Solutions) are a requirement

Apple iOS devices are preferred over Android in the enterprise (seriously, that was the consensus). No one seems to care about BlackBerry or Windows Mobile devices. I think only one speaker mentioned Windows Mobile…

Speaking to the last point I find this pretty interesting. Especially given the fact that Android seems to be beating Apple in regards to market share of devices and app store apps. I also enjoyed hearing about some of the challenges and pitfalls real IT and security departments are facing. Many of the speakers talked about some best practices they’ve developed and problems they’ve had. One of the highlights for me was a talk by Det. Cindy Murphy from the Madison WI Police Department Computer Forensics Unit. She shared some of her experiences with mobile device forensics and how this evidence holds up in court. I highly recommend you check out this summit next year, it’s one not to miss!

I should have my slides from the latest version of my talk that I gave at the summit (Attacking & Defending Apple iOS Devices in the Enterprise) in the next day or so.

Share and Enjoy

During the keynote at the SANS Mobile Device Security Summit here in Nashville this morning Rafal Los (aka: Wh1t3Rabbit) talked about a new passcode bypass vulnerability going around in the latest version of iOS (5.1). Basically how it’s supposed to work is by opening up the camera on the lock screen you go to the photo gallery, press the home button and it takes you to the home screen bypassing the passcode. I tried this and it didn’t work on my iPhone. I was quickly prompted for my passcode.

I did some research and found this blog post which says this is simply a configuration issue with the passcode settings. Check your setting for “Require Passcode” (under the Passcode Lock screen) and make sure it’s set to “Immediately”. If it’s set to 1 minute or more, you really haven’t locked your device. You’ve just been shutting off the screen. See the screen shot below for the passcode setting you should be using.