CEH EXAM OBJECTIVES COVERED IN THIS CHAPTER:
Over the last few years, the workplace has undergone a dramatic shift, with a large increase in the number of mobile devices. The idea of a small powerful device that can do many if not all of the tasks that a notebook or desktop computer can do is very attractive. The power of mobile devices ranging from smartphones to tablets has increased to the point where they are acceptable replacements for day-to-day tasks and more. This fact—coupled with their ease of use, small form factor, long battery life, and low cost—has led to their rapid adoption and spread into both personal and professional circles.
Today the average person possesses at least three mobile devices, with many having more. These tend to be the smartphone, tablet, and notebook. These have become so feature packed and powerful that many people who wouldn’t have dreamed of carrying such devices in the past now can’t part with them and have them in their possession 24 hours a day.
With the wide variety of devices and the sheer number present, the impact on personal lives and the workplace is undeniable. Owners of the devices are bringing them into the workplace, and businesses are purchasing their own. This situation has led to a number of problems, including the mixing of personal and business data as well as inconsistent application of security settings and protocols, making mobile devices a prime target of attack by a malicious party.
In this chapter we will explore these issues and how to test mobile devices for vulnerabilities as well as discuss countermeasures that can be used.
The rapid adoption of the mobile device in the workplace has had two obvious consequences: an increase in productivity and capability as well as a corresponding rise in the number of security risks. The designers of devices have frequently made a tradeoff between security and features by leaning toward features, with security being an afterthought. While new security features have helped to somewhat reduce the issues present, many of the devices still have problems to be addressed.
Mobile operating systems come in four flavors: Blackberry, Windows Mobile, Google Android, and Apple iOS. Of these, the Apple iOS and Google Android operating systems are by far the ones most commonly found on modern devices. In order to simplify the examination of mobile operating systems and devices in this chapter, the discussion will consider only iOS and Android.
Both of these operating systems have been designed to address some of the most basic threats and risks right out of the box, such as the following:
Before analyzing the security models of these two operating systems, a brief recap of each of these attacks as they relate to mobile devices might be helpful:
Web and Network Attacks These are typically launched by malicious websites or compromised legitimate websites. The attacking website sends malformed network content to the victim’s browser, causing the browser to run malicious logic of the attacker’s choosing.
Malware Malware can be broken into three high-level categories: traditional computer viruses, computer worms, and Trojan horse programs. Much like traditional systems, malware does plague mobile systems, and in fact there are pieces of malware designed exclusively for mobile devices.
Social Engineering Attacks Social engineering attacks such as phishing attempt to trick the user into disclosing sensitive information. Social engineering attacks can also be used to entice a user to install malware on a mobile device. In many cases social engineering attacks are easier to accomplish on mobile devices largely because of their personal nature and the fact that they are already used to share information on social media and other similar services.
Data Loss Data loss occurs when a device used to store sensitive data is either carried away by a malicious person or is lost. While many of these situations can be mitigated through encryption and remote wipes, the problem is still very serious.
Data Theft This is one of the bigger problems that have emerged with mobile devices because criminals target them for the information they contain. Malware has been observed on mobile devices that steals sensitive information.
So how have designers built their systems with an eye toward addressing security problems? Several steps have been taken, but overall there has been an attempt to approach the problem of security through five key areas, each addressing a specific problem or need:
First, let’s look at the market leader, Android, in our exploration of mobile operating systems.
Android took shape way back in 2003 at the hands of Android Inc., which was acquired by Google in 2005. From the beginning, the OS was designed to be a mobile platform that was not only feature rich, powerful, and mobile but also open source. As designed, Android can be installed on a wide range of hardware, and it supports and integrates with a myriad of advanced software technologies. It was also designed to integrate with external data sources, cloud services, and other technologies as well as to run applications locally. In order to provide these features and do so safely and securely, Google followed the five tenets mentioned earlier. This resulted in security for users, data, applications, the device, and the network around it.
Android was envisioned and created with a multi-layered security model that allows for the flexibility essential in an open platform, while providing protection for users and applications.
Another goal of the OS is to support developers and make the platform easy to work with and easy to engage security controls. In practice, developers should be able to easily call on the security controls of the system, and if they are experienced developers, they can tweak the controls as needed. Less-experienced developers or those unfamiliar with proper security settings are protected because the system puts default settings in place to ensure that safety and security are maintained.
But what about the device users themselves? What does Android offer to protect them while they use the system? Just as Android was developed to make it easy on developers to develop and deploy applications, the system was designed with the user in mind. To this end the system was developed with the expectation that attacks would happen, such as the common malware issue, data theft, and others. It also was designed with the idea that the users themselves might try things that may adversely affect the system. Android was designed to allow the user to work with the system and do everyday tasks but not give them a high level of access Specifically, Android does not let the user have root access to the system without the user deliberately overriding this protection.
Android, under the hood, is a series of components working together to make the system work. Each component in the system is self-contained and focuses on performing whatever task it was designed to do. Each component focuses on security measures for itself and assumes that every other component is also doing the same. In addition, in a normal installation, only a very small portion of the Android OS ever runs with root access, this being the kernel, and everything else runs with less access and in an application sandbox to further isolate and protect each application.
So what are the basic components of the Android OS?
In practice Android has proven to be flexible, open, adaptable, portable, and highly stable as well as extremely customizable.
The second most popular mobile operating system in the market is Apple’s iOS, which is present on multiple devices including the iPod, iPad, and iPhone. Much as Android is based on the Linux kernel, iOS is a slimmed-down version of OS X for the Mac. However, while it is based on OS X, which is based on FreeBSD, it is not fully Unix compatible.
Unlike Android, which covers all five core components of system design, iOS covers only four. Specifically, it addresses these areas:
Traditional Access Control iOS provides traditional access control security options, including password configuration options as well as account lockout options.
Application Provenance Just as Android items that are in the Google Play store have been verified and therefore trusted, in iOS it’s the same type of deal with apps being created by Apple-approved developers, who have the ability to sign their app before placing it in the store.
Encryption iOS uses hardware-accelerated AES-256 encryption to encrypt all data stored on the device as well as additional encryption for email and other services.
Isolation The iOS operating system isolates each app from every other app on the system, and apps aren’t allowed to view or modify each other’s data, logic, and the like.
There is something to pay attention to and expand upon in this list, something that is more than it appears, and that is the application provenance issue. Both Android and iOS use this to ensure that apps that are installed by the user come from legitimate sources, meaning approved developers. However, users of Apple devices cannot install non-Apple-approved applications on their phone as Android users can.
But with this in mind, you may have seen an iPhone or two running an app or something else that didn’t come from the App Store. So how does this occur? Through a process known as jailbreaking. So what is jailbreaking, and how does it work? Let’s talk about this a bit.
First of all, you need to understand that many manufacturers of smartphones, tablets, game consoles, and other systems include digital rights management (DRM) in their products. DRM exists to control the types of software you can run on your device as well as preserve security in some cases. This is where jailbreaking comes in. Jailbreaking is used to get around the restrictions imposed by DRM and let you run whatever you want to run and do whatever you want to do on the device.
From a technical standpoint, jailbreaking is simply applying a set of kernel-level patches to a system that allows the owner of the device to run unsigned applications. This process also grants root access to the device and removes the restrictions associated with having non-root access.
One drawback of this process is a little thing called voiding your warranty. Another drawback is that you are effectively opening the device up with so much access that anything can run without restriction, including malware.
So mobile devices are commonplace, and we know that just by opening our eyes and looking around. However, a lot of common problems also occur that could be easy ways for an attacker to cause you harm:
While these are some of the known problems that exist with mobile devices, they don’t necessarily represent the current state of threats, and you must do due diligence if you will be managing an environment that allows these devices.
One way to help you get a snapshot of the known problems in the mobile area is to use the Open Web Application Security Project (OWASP). OWASP is an organization that keeps track of various issues such as web application concerns, and it also happens to maintain top 10 lists of various issues including mobile device problems. You may want to check their site, www.owasp.org, periodically to learn the latest issues that may be appearing and that you could use in your testing process.
However, there still is one more area that mobile devices have really brought to the forefront that we need to take a look at, and that is bring your own device (BYOD).
BYOD has been a trend over the last several years in the business world and has accelerated in popularity. Simply put, the concept of BYOD is one where employees provide their own equipment in the form of smartphones, laptops, tablets, and other types of electronics. Nowadays when employees bring their own stuff, it is mainly in the form of tablets and smartphones more than laptops and notebooks simply because of how small and powerful they are. These devices are connected to the corporate network and the employees use the devices to do their jobs.
Today, many employees have come to expect that they will be able to use their smartphones and other personal devices such as tablets at work. The problem with this situation is that maintaining a secure environment with equipment that the company does not own and may not even have any management over is tough. While companies have taken steps to define their position on how these devices will be allowed to interact with corporate services, there still are concerns. IT departments by necessity have to be extra vigilant about the security issues that can appear in this environment.
One of the biggest defenses that can be used initially is for IT and security to clearly detail the requirements each device must meet before being used in the corporate environment. For example, a policy may need to be established stating that devices meet certain standards such as patches, antimalware requirements, password requirements, applications allowed and blocked, as well as encryption requirements. In addition, the company should never discount the value of using intrusion detection devices on the network itself to control the activities of these hosts when they appear.
In practice, two things should happen administratively to make sure things get done right. First, a policy should exist that states the responsibilities of the system administrator in relation to their handling of mobile devices. Second, a policy should be created and made aware to the end users so that they understand the responsibility that comes with connecting their personal devices to the network.
In order to make BYOD and mobile device integration easier, many enterprises have resorted to management software solutions. These solutions allow for the tracking, monitoring, and management of mobile devices in the same vein as traditional enterprise asset management solutions. Solutions include Microsoft’s System Center Mobile Device Manager software and IBM’s MaaS360 management technology.
So how do we pen test mobile devices? In many ways the process is similar to what we are already using in a traditional setting but with some minor differences along the way.
So what does the testing process look like when mobile devices start to creep into the picture? Here is a quick overview of how to evaluate these devices.
Footprinting Many of the scanning tools we examined in our footprinting phase can be used to locate and identify a mobile device plugged into a network. A tool like Nmap, for example, can be used to fingerprint an OS under many conditions and return information as to its version and type.
Once you find mobile devices in the environment, make sure to note their information such as MAC address, IP address, version, type, and anything else of value.
Scanning For mobile devices attached to the network you are evaluating, use a piece of software such as Kismet to find out which wireless networks the devices are looking for.
Exploitation Use man-in-the-middle attacks, spoofing, ARP poisoning, and other such mechanisms to attack a device. Use traffic insertion attacks to deliver client-side exploits to vulnerable systems and devices or manipulate captured traffic to exploit back-end servers.
Post Exploitation Inspect sensitive data areas on mobile devices for information such as the Short Message Service (SMS), and browser history databases. Note that forensic tools are available for cell phones that can extract this information as well.
One other option that is possible for you to use in penetration testing is a mobile device. In this section we will look at the tools that can be installed on Android that can enhance our capabilities to run a thorough test.
Similar to securing desktops, servers, networks, and other equipment, you can take some basic steps to make mobile devices more resistant to attacks. What’s included here is some basic guidance but not a comprehensive list of all that can be done:
Mobile devices have taken the world by storm and have seen incredibly rapid growth and adoption over the last several years. Along with this growth have come a number of security issues to plague mobile devices. The ability to have a small and powerful device that is Internet connected and allows communication from anywhere at any time is alluring as well as a problem for companies.
With the average person today possessing at least three mobile devices and using those devices for both personal and work purposes, the devices pose a problem for the workplace. With the rise of BYOD policies at many workplaces, users now attach to a network not only because they want to but also because they have to in order to work.
Operating systems such as Google’s Android and the second-place Apple iOS are in many ways similar to but also different from traditional systems, presenting a security challenge. The vast number of devices has led to a host of problems, including mixing of multiple versions of the same OS and countless numbers of devices each having unique characteristics.
As a penetration tester you will need to familiarize yourself with the similarities and differences of the myriad of devices that exist. Pen testing these devices will require a combination of methods learned over previous chapters as well as the adoption of new tools and techniques to properly test the systems.
Know the challenges posed by mobile devices. Mobile devices represent a shift from laptops and desktop PCs to highly compact tablets and smartphones. While very powerful and portable, they present a huge potential for security holes within an organization.
Know the basics of protecting mobile data. Data on mobile devices is much more vulnerable than data in a fixed location. The risk that data may be compromised on a lost or stolen device is quite high and thus requires extra protection.
Understand the challenges of keeping Android devices up to date. Android devices come in many different versions and flavors by vendor and device. Since there are so many versions, patches and other updates may not be available as quickly as needed on many devices.
What is the benefit of encryption on mobile devices?
Jailbreaking a phone refers to what?
What does rooting a device do?
Android is based on which operating system?
iOS is based on which operating system?
What could a company do to protect itself from a loss of data when a phone is stolen? (Choose all that apply.)
A utility for auditing WordPress from Android is __________.
What utility could be used to avoid sniffing of traffic?
Jennifer has captured the following URL: www.snaz22enu.com/&w25/session=22525. She realizes that she can perform a session hijack. Which utility would she use?
Jennifer is concerned about her scans being tracked back to her tablet. What could she use to hide the source of the scans?
What option would you use to install software that’s not from the Google Play store?
Which technology can provide protection against session hijacking?
When a device is rooted, what is the effect on security?
Session hijacking can be thwarted with which of the following?
A denial of service application for Android is __________.
A man-in-the-browser attack delivered by a piece of malware can be prevented by which of the following?
An attack that can be performed using FaceNiff is __________.
Remote wipes do what? (Choose two.)
A session hijack can be used against a mobile device using all of the following except?
NetCut is used to do what? (Choose two.)