├── cover.jpg ├── cover_small.jpg ├── en ├── assets │ ├── tools-create.4.png │ ├── tools-memory.2.png │ ├── tools-newvm.1.png │ ├── zerodium_prices.png │ ├── tools-harddisk.3.png │ ├── iOS-CVEs-2007-2016.png │ ├── Android-CVEs-2009-2016.png │ ├── where-is-your-mobile-data.png │ ├── anatomy-of-a-mobile-attack.png │ ├── iOS-Mail-Certificate-Error.jpg │ ├── mobile-exploitation-process.jpg │ ├── servers-afyonn-com-certificate-error.png │ ├── ben-evans-a16z-mobile-is-the-new-scale.png │ ├── mobile-device-security-who-is-responsible.png │ └── logo.svg ├── GLOSSARY.md ├── mobile-malware-analysis │ └── README.md ├── mobile-persist-exfil │ └── README.md ├── remediate-prevent-mobile-incidents │ └── README.md ├── android-incident-response │ └── README.md ├── mobile-attacks │ └── README.md ├── tools │ ├── README.md │ ├── howto-setup-a-mobile-incident-response-workstation.md │ ├── mobile-ir-tool-categories.md │ └── open-source-ir-tools.md ├── overview │ ├── README.md │ ├── mobile-ir-types.md │ ├── ir-process.md │ ├── history-overview-ir.md │ ├── mobile-ir-differences.md │ └── case-for-mobile-ir.md ├── mobile-incident-response-framework │ └── README.md ├── case-studies │ ├── README.md │ ├── internal-investigation.md │ ├── ceo-mobile-phone-compromised.md │ ├── hacking-team-analysis.md │ ├── international-travel.md │ ├── unauthorized-app-discovered.md │ └── trojaned-ios-app.md ├── ios-incident-response │ └── README.md ├── README.md ├── styles │ ├── pdf.css │ └── website.css └── SUMMARY.md ├── LANGS.md ├── .gitignore ├── README.md └── book.json /cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/cover.jpg -------------------------------------------------------------------------------- /cover_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/cover_small.jpg -------------------------------------------------------------------------------- /en/assets/tools-create.4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/tools-create.4.png -------------------------------------------------------------------------------- /en/assets/tools-memory.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/tools-memory.2.png -------------------------------------------------------------------------------- /en/assets/tools-newvm.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/tools-newvm.1.png -------------------------------------------------------------------------------- /en/assets/zerodium_prices.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/zerodium_prices.png -------------------------------------------------------------------------------- /en/assets/tools-harddisk.3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/tools-harddisk.3.png -------------------------------------------------------------------------------- /en/assets/iOS-CVEs-2007-2016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/iOS-CVEs-2007-2016.png -------------------------------------------------------------------------------- /en/assets/Android-CVEs-2009-2016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/Android-CVEs-2009-2016.png -------------------------------------------------------------------------------- /en/assets/where-is-your-mobile-data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/where-is-your-mobile-data.png -------------------------------------------------------------------------------- /en/assets/anatomy-of-a-mobile-attack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/anatomy-of-a-mobile-attack.png -------------------------------------------------------------------------------- /en/assets/iOS-Mail-Certificate-Error.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/iOS-Mail-Certificate-Error.jpg -------------------------------------------------------------------------------- /en/assets/mobile-exploitation-process.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/mobile-exploitation-process.jpg -------------------------------------------------------------------------------- /en/assets/servers-afyonn-com-certificate-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/servers-afyonn-com-certificate-error.png -------------------------------------------------------------------------------- /en/assets/ben-evans-a16z-mobile-is-the-new-scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/ben-evans-a16z-mobile-is-the-new-scale.png -------------------------------------------------------------------------------- /en/assets/mobile-device-security-who-is-responsible.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nowsecure/mobile-incident-response/HEAD/en/assets/mobile-device-security-who-is-responsible.png -------------------------------------------------------------------------------- /LANGS.md: -------------------------------------------------------------------------------- 1 | * [English](en) 2 | 3 | 16 | -------------------------------------------------------------------------------- /en/GLOSSARY.md: -------------------------------------------------------------------------------- 1 | # Santoku Linux 2 | Santoku Linux is an Ubuntu-based Linux distribution focused on mobile forensics, malware analysis and app testing. It comes pre-installed many of the tools needed to support these capabilities. The distribution is open source and maintained by [NowSecure](https://www.nowsecure.com/) -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Node rules: 2 | ## Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 3 | .grunt 4 | 5 | ## OSX files 6 | .DS_Store 7 | 8 | ## Dependency directory 9 | ## Commenting this out is preferred by some people, see 10 | ## https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git 11 | node_modules 12 | 13 | # Book build output 14 | _book 15 | 16 | # eBook build output 17 | *.epub 18 | *.mobi 19 | *.pdf 20 | 21 | # vim swap files 22 | .swp 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Incident Response for Android and iOS 2 | ======= 3 | 4 | Mobile is eating the world. From banking to online search, requests from mobile devices now exceed desktop computers. 5 | 6 | This trend is not just about access, usability and consumer's preferences. Mobile is just as, if not more, susceptible to attack. 7 | 8 | The goal of this book is to prepare companies for the inevitable increase in mobile compromise. We will use step-by-step tutorials, guiding the reader from setup through continuous monitoring of mobile devices. 9 | 10 | -------------------------------------------------------------------------------- /en/mobile-malware-analysis/README.md: -------------------------------------------------------------------------------- 1 |
5 | 6 | # Mobile Malware Analysis 7 | Inevitably, you will encounter some form of mobile malware which must be analyzed to fully understand the impacts of the incident. 8 | 9 | This chapter will cover: 10 | 11 | * Malware Analysis Best Practices 12 | * Android Malware Analysis 13 | * iOS Malware Analysis 14 | -------------------------------------------------------------------------------- /en/mobile-persist-exfil/README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Mobile Persist and Exfil 7 | 8 | Once an attacker has compromised a mobile device, there are a variety of way in which they can persist on the device and exfiltrate sensitive data. This chapter will explore the different techniques in the following sections: 9 | 10 | * Mobile Persistence 11 | * Mobile Exfiltration 12 | -------------------------------------------------------------------------------- /en/remediate-prevent-mobile-incidents/README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Remediate and Prevent Mobile Incidents 7 | 8 | The ability to quickly remediate a mobile attack and then prevent future attacks is an essential goal of any incident response team. This chapter will cover the following topics: 9 | 10 | * Mobile remediation techniques 11 | * Mobile incident prevention 12 | -------------------------------------------------------------------------------- /book.json: -------------------------------------------------------------------------------- 1 | { 2 | "gitbook": "2.x.x", 3 | "plugins": ["edit-link", "ga"], 4 | "pluginsConfig": { 5 | "edit-link": { 6 | "base": "https://github.com/nowsecure/mobile-incident-response/tree/master", 7 | "label": "Edit This Page" 8 | }, 9 | "ga": { 10 | "token": "UA-4968988-13" 11 | } 12 | }, 13 | "title": "Mobile Incident Response for Android and iOS | NowSecure", 14 | "links": { 15 | "sidebar": { 16 | "NowSecure": "https://www.nowsecure.com/" 17 | } 18 | }, 19 | "styles": { 20 | "website": "styles/website.css", 21 | "pdf": "styles/pdf.css" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /en/android-incident-response/README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Android Incident Response 7 | 8 | This chapter will provide a step-by-step technical approach for responding to an Android incident. We will discuss Android security mechanisms, a tailored incident response process and a lab exercise you can complete. The sections include: 9 | 10 | * Android Security Model 11 | * Android Incident Response Process 12 | * Android Data Collection 13 | * Android Incident Response Analysis 14 | * Android Incident Response Lab Exercise 15 | -------------------------------------------------------------------------------- /en/mobile-attacks/README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | #Attacking Mobile Devices 7 | 8 | Mobile devices have a broad attack surface that incident response analysts much understand at a high level to preperly respond and defend against attacks. This chapter will explore important concepts impacting mobile security and a detailed review of how mobile devices are compromised: 9 | 10 | * The SCAN Principle of Mobile Security 11 | * Anatomy of a Mobile Attack 12 | * Mobile Exploitation Process 13 | * Real-world Mobile Attacks 14 | * Who is Responsible 15 | -------------------------------------------------------------------------------- /en/tools/README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | #Tools for Mobile Incident Response 7 | 8 | This chapter will provide an overview of the tools necessary to provide mobile incident response at your organization. We will focus on free and/or open source software but will mention commercial alternatives. 9 | 10 | The sections include: 11 | 12 | * [Categories of Mobile IR Tools](mobile-ir-tool-categories.md) 13 | * [Setup a Mobile Incident Response Workstation](howto-setup-a-mobile-incident-response-workstation.md) 14 | * [List of Tools](open-source-ir-tools.md) 15 | -------------------------------------------------------------------------------- /en/overview/README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Mobile Incident Response Overview 7 | The goal of this chapter is to provide background on incident response, mobile security challenges and specifics around mobile incident response. The sections include: 8 | 9 | * [Brief History and Overview of Incident Response](history-overview-ir.md) 10 | * [Case for Mobile Incident Response](case-for-mobile-ir.md) 11 | * [Incident Response Process](ir-process.md) 12 | * [Difference Between Mobile and Computer IR](mobile-ir-differences.md) 13 | * [Mobile Incident Types](mobile-ir-types.md) 14 | -------------------------------------------------------------------------------- /en/mobile-incident-response-framework/README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Framework for Mobile Incident Response 7 | 8 | Incident response is a process. And the great thing about a process is that a general framework can be adapted to new scenarios. This chapter will provide an overview of popular incident response processes as well as help develop and demonstrate a mobile specific plan with playbooks. The sections include: 9 | 10 | * NIST Computer Security Incident Handling Guide 11 | * SANS Incident Handling Steps 12 | * Mobile Incident Response Plan 13 | * Mobile Incident Response Playbooks 14 | -------------------------------------------------------------------------------- /en/case-studies/README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Case Studies 7 | 8 | Theory is great, but we often learn by example. This chapter will provide real-world case studies for common incident response scenarios you are likely to encounter. These scenarios include: 9 | 10 | * [Unauthorized app discovered](unauthorized-app-discovered.md) 11 | * [Trojaned iOS app installs](trojaned-ios-app.md) 12 | * [Compromise of company executive's phone](ceo-mobile-phone-compromised.md) 13 | * [Internal investigation](internal-investigation.md) 14 | * [Hacking Team analysis](hacking-team-analysis.md) 15 | * [International travel](international-travel.md) 16 | -------------------------------------------------------------------------------- /en/ios-incident-response/README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # iOS Incident Response 7 | Processes for incident response and digital forensics have a lot in common and iOS is no exception to this. One important difference though is that for incident response process we assume owner of the allegedly compromised device to fully comply with investigator's request to provide access to the device, such as to disclose or disable passcode. This is a subtle but very important difference, especially on iOS, where passcode protection relies on proven cryptography and, in many cases, cannot be bypassed. 8 | 9 | This chapter opens with a general introduction to iOS system and application security and then moves on to explain iOS-specific parts of mobile incident response. 10 | 11 | * iOS Security Model 12 | * iOS Incident Response Process 13 | * iOS Data Collection 14 | * iOS Incident Response Analysis 15 | * iOS Incident Response Lab Exercise 16 | 17 | -------------------------------------------------------------------------------- /en/README.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | Incident Response for Android and iOS 7 | ======= 8 | 9 | This book will prepare enterprises and practitioners for the inevitable increase in mobile compromise. We will use step-by-step tutorials, guiding the reader from setting up a mobile IR practice all the way through continuous monitoring of mobile devices. Chapters include: 10 | 11 | * [Mobile Incident Response Overview](overview/README.md) 12 | * [Tools for Mobile Incident Response](tools/README.md) 13 | * [Mobile Incident Response Case Studies](case-studies/README.md) 14 | * [Framework for Mobile Incident Response](mobile-incident-response-framework/README.md) 15 | * [Attacking Mobile Devices](mobile-attacks/README.md) 16 | * [Mobile Persist and Exfil](mobile-persist-exfil/README.md) 17 | * [Android Incident Response](android-incident-response/README.md) 18 | * [iOS Incident Response](ios-incident-response/README.md) 19 | * [Mobile Malware Analysis](mobile-malware-analysis/README.md) 20 | * [Remediation and Prevention](remediate-prevent-mobile-incidents/README.md) 21 | -------------------------------------------------------------------------------- /en/styles/pdf.css: -------------------------------------------------------------------------------- 1 | /* Requires different selectors than site */ 2 | 3 | @import url(https://fonts.googleapis.com/css?family=Lato:400,300,700); 4 | 5 | body { 6 | font-family: 'Lato', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; 7 | } 8 | 9 | /* Typography */ 10 | h1 { 11 | font-weight: 300; 12 | font-style: normal; 13 | font-size: 2.625em; 14 | color: #0099ff; 15 | font-style: normal; 16 | letter-spacing: 1px; 17 | } 18 | 19 | h2 { 20 | font-weight: 400; 21 | font-style: normal; 22 | text-transform: uppercase; 23 | color: #0099ff; 24 | font-size: 1rem; 25 | letter-spacing: 1px; 26 | } 27 | 28 | h3 { 29 | font-weight: 400; 30 | font-style: italic; 31 | font-size: 1.125em; 32 | line-height: 2.063em; 33 | color: #999cab; 34 | letter-spacing: 1px; 35 | } 36 | 37 | h4 { 38 | font-weight: 400; 39 | font-style: normal; 40 | text-transform: uppercase; 41 | font-size: .75em; 42 | line-height: 1em; 43 | color: #999cab; 44 | letter-spacing: 1px; 45 | } 46 | 47 | .section.toc { 48 | color: #999cab; 49 | } 50 | 51 | ul li { 52 | list-style: none; 53 | } 54 | 55 | ul li:before { 56 | content: '\2022'; 57 | display: block; 58 | position: relative; 59 | max-width: 0; 60 | max-height: 0; 61 | left: -10px; 62 | top: 0; 63 | color: #33ccff; 64 | font-size: 12px; 65 | } 66 | 67 | ol li { 68 | list-style-type: none; 69 | counter-increment: list; 70 | position: relative; 71 | } 72 | 73 | ol li:after { 74 | content: counter(list) "."; 75 | position: absolute; 76 | font-weight: 700; 77 | left: -2.5em; 78 | width: 2em; 79 | text-align: right; 80 | color: #33ccff; 81 | top: 0; 82 | } 83 | 84 | .section.toc ol li:after { 85 | display: none; 86 | } 87 | 88 | a:link:after, 89 | a:visited:after, 90 | a:hover:after, 91 | a:active:after { 92 | content: " <" attr(href) "> "; 93 | color: #0099ff; 94 | font-weight: normal; 95 | } 96 | 97 | .pdf-header:after { 98 | border-bottom: 1px solid gray; 99 | color: #CCCCCC; 100 | } 101 | /* 102 | .pdf-footer { 103 | 104 | } 105 | */ 106 | 107 | #endnotes ~ blockquote sup { 108 | position: relative; 109 | top: 5px; 110 | } 111 | 112 | #footnotes ~ blockquote sup { 113 | position: relative; 114 | top: 5px; 115 | } 116 | 117 | /* Do not display temp CTAs in md files */ 118 | .cta-banner .cta-banner-pdf, 119 | .cta-banner .cta-banner-update { 120 | display: none; 121 | } 122 | 123 | .fa-bell-o, 124 | .fa-file-pdf-o { 125 | display: none; 126 | } 127 | -------------------------------------------------------------------------------- /en/case-studies/internal-investigation.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Internal investigation 7 | A number of incidents may occur within an organization that require a team to perform an internal investigation. The IR team should follow a similar process for these internal incidents as they would any other. In this section, we discuss ways in which a mobile device may be involved in an internal corporate investigation. 8 | 9 | ## Departing employee data theft 10 | When an employee leaves an organization, it is important to have a process in place to properly disconnect the employee's access to corporate resources and ensure that no corporate data resides on that individual's mobile device. One of the challenges in mobile involves the bring your own device (BYOD) trend and employee-owned versus corporate-owned devices. In a BYOD scenario, the IR team may not have direct access to the device or artifacts needed to properly investigate an incident. With a corporate owned device, the specific incident details may vary, but the general steps would involve: 11 | 12 | * Forensic acquisition of data on the device 13 | * Collection of network traffic transmitted from device 14 | * Analysis of artifacts to determine whether data theft had occurred 15 | 16 | An example scenario may involve using advanced SQLite recovery techniques to retrieve deleted SMS records, call logs, or other forms of communication that may assist in the investigation. Documented communication with co-workers or individuals outside of the organization may prove useful. Performing a timeline analysis of the files that reside on the device can also be a helpful piece of evidence in any type of investigation. As discussed in Chapter 2, there are tools available that can provide a listing of all files that exist on the device as well as when they were created, modified, or accessed. By narrowing this list to the specific timeframe in question, an investigator can get a good understanding of the actions that took place on the device during that time. An example timeline analysis might show that a PDF file called "Company Confidential Data" was created at 10:15 a.m., and an email was sent at 10:16 a.m. Additional email analysis might show that "Company Confidential Data.PDF" was e-mailed to a user outside of the organization. 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /en/case-studies/ceo-mobile-phone-compromised.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Compromise of company executive's phone 7 | Another mobile scenario an incident response analyst may encounter is the potential compromise of an executive's phone. Mobile devices have become very personal, and individuals are acutely aware of minor changes in their device's behavior. When an executive's mobile device is acting strangely, many times its owner will turn the device over to the IT or security team for investigation. 8 | 9 | These are incredibly challenging cases because so many different factors can cause a device to act in a different manner. Very few organizations have the [continual analysis tools](../tools/mobile-ir-tool-categories.md) in place to help understand how a device's state has changed over time. 10 | 11 | Finally, another challenge is that company executives tend to be incredibly busy, glued to their mobile phones, and, often times, impatient. This is clearly an area where incident response teams want to ensure they have the proper tools and training in place to quickly identify and remediate incidents. 12 | 13 | ## Invalid email certificate case study 14 | The CEO and the co-founder of a technology company experienced problems syncing their email over a weekend in early 2016. When the iOS Mail app was launched, it would intermittently throw a certificate error. In this particular case, the CEO was technical and actually captured screenshots, which are very helpful in determining the specific errors that occurred: 15 | 16 | >Cannot Identify Server Identity 17 | 18 | >The identity of "imap.gmail.com" cannot be verified by Mail. Review the certificate details to continue. 19 | 20 |  21 | 22 | The Gmail app for iOS would not sync email either, but it dropped the connection silently. 23 | 24 | The certificate was self signed and had a common name of "servers.afyonn.com," and it was set to expire in Oct 2016: 25 | 26 |  27 | 28 | ## Additional investigation 29 | Since this anomaly impacted two specific devices, further analysis was warranted. The CEO reported an incident to the company's security team, which performed additional data collection and analysis. 30 | 31 | It was determined that a non-standard DNS server was active at the executive's home. This DNS was located outside of the country and was not part of the infrastructure of their Internet service provider (ISP). 32 | 33 | The home router was inspected and several security issues were discovered including a default, publicly known password and some remote management interfaces being enabled. 34 | 35 | The team was able to capture the TLS negotiation at a later time so that the full certificate chain was available for inspection. 36 | 37 | ## Inconclusive findings 38 | Clearly, an incident of concern occurred involving the CEO's devices. Like many incidents, it was difficult to determine the root cause. The steps proposed by the incident response team included: 39 | 40 | * Take the home router offline 41 | * Analyze the router for signs of compromise 42 | * Attempt to capture the incident live and collect more data 43 | * Forensically acquire and analyze the devices 44 | * Wipe the devices and re-provision them 45 | * Issue a new home router and secure it according to best practices 46 | 47 | The investigation benefited from the individuals involved being security aware. However, this scenario is not common. Even with the technical capabilities of the impacted individuals, it still took several days to identify, analyze and remediate the incident. 48 | -------------------------------------------------------------------------------- /en/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | * [Mobile Incident Response Overview](overview/README.md) 4 | * [Brief History and Overview of Incident Response](overview/history-overview-ir.md) 5 | * [Case for Mobile Incident Response](overview/case-for-mobile-ir.md) 6 | * [Incident Response Process](overview/ir-process.md) 7 | * [Difference Between Mobile and Computer IR](overview/mobile-ir-differences.md) 8 | * [Mobile Incident Types](overview/mobile-ir-types.md) 9 | * [Tools for Mobile Incident Response](tools/README.md) 10 | * [Categories of Mobile IR Tools](tools/mobile-ir-tool-categories.md) 11 | * [Setup a Mobile Incident Response Workstation](tools/howto-setup-a-mobile-incident-response-workstation.md) 12 | * [List of Tools](tools/open-source-ir-tools.md) 13 | * [Mobile IR Case Studies](case-studies/README.md) 14 | * [Unauthorized App Discovered](case-studies/unauthorized-app-discovered.md) 15 | * [Trojaned iOS app](case-studies/trojaned-ios-app.md) 16 | * [CEO phone compromised](case-studies/ceo-mobile-phone-compromised.md) 17 | * [Internal Investigation](case-studies/internal-investigation.md) 18 | * [Hacking Team Analysis](case-studies/hacking-team-analysis.md) 19 | * [International Travel](case-studies/international-travel.md) 20 | * [Framework for Mobile Incident Response](mobile-incident-response-framework/README.md) 21 | * [NIST Computer Security Incident Handling Guide](mobile-incident-response-framework/nist.md) 22 | * [SANS Incident Handling Steps](mobile-incident-response-framework/sans.md) 23 | * [Mobile Incident Response Plan](mobile-incident-response-framework/mobile-ir-plan.md) 24 | * [Mobile Incident Response Playbooks](mobile-incident-response-framework/mobile-ir-playbooks.md) 25 | * [Attacking Mobile Devices](mobile-attacks/README.md) 26 | * [The SCAN Principle of Mobile Security](mobile-attacks/scan-principle-of-mobile-security.md) 27 | * [Anatomy of a Mobile Attack](mobile-attacks/anatomy-of-a-mobile-attack.md) 28 | * [Mobile Exploitation Process](mobile-attacks/mobile-explotation-process.md) 29 | * [Real-world Mobile Attacks](mobile-attacks/real-world-mobile-attacks.md) 30 | * [Who is Responsible](mobile-attacks/who-is-responsible.md) 31 | * [Mobile Persist and Exfil](mobile-persist-exfil/README.md) 32 | * [Mobile Persistence](mobile-persist-exfil/mobile-persist.md) 33 | * [Mobile Exfiltration](mobile-persist-exfil/mobile-exfil.md) 34 | * [Android Incident Response](android-incident-response/README.md) 35 | * [Android Securirty Model](android-incident-response/android-security-model.md) 36 | * [Android Incident Response Process](android-incident-response/android-ir-process.md) 37 | * [Android Data Collection](android-incident-response/android-data-collection.md) 38 | * [Android Incident Response Analysis](android-incident-response/android-ir-analysis.md) 39 | * [Android IR Exercise](android-incident-response/android-ir-exercise.md) 40 | * [iOS Incident Response](ios-incident-response/README.md) 41 | * [iOS Security Model](ios-incident-response/ios-security-model.md) 42 | * [iOS Incident Response Process](ios-incident-response/ios-ir-process.md) 43 | * [iOS Data Collection](ios-incident-response/ios-data-collection.md) 44 | * [iOS Incident Response Analysis](ios-incident-response/ios-ir-analysis.md) 45 | * [iOS IR Exercise](ios-incident-response/ios-ir-exercise.md) 46 | * [Mobile Malware Analysis](mobile-malware-analysis/README.md) 47 | * [Malware Analysis Best Practices](mobile-malware-analysis/malware-analysis-best-practices.md) 48 | * [Android Malware Analysis](mobile-malware-analysis/android-malware-analysis.md) 49 | * [iOS Malware Analysis](mobile-malware-analysis/ios-malware-analysis.md) 50 | * [Remediation and Prevention](remediate-prevent-mobile-incidents/README.md) 51 | * [Mobile Remediation Techniques](remediate-prevent-mobile-incidents/mobile-remediation-techniques.md) 52 | * [Mobile Incident Prevention](remediate-prevent-mobile-incidents/mobile-incident-prevention.md) 53 | -------------------------------------------------------------------------------- /en/overview/mobile-ir-types.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Common Mobile Incidents 7 | Here listed are a number of common scenarios you may encounter when responding to a mobile incident: 8 | 9 | * Mobile malware discovered 10 | * Device acting suspiciously 11 | * Device lost or stolen 12 | * Insider attack via mobile device 13 | * Support for an internal investigation (e.g., e-discovery, legal hold) 14 | * Data breach via mobile device 15 | 16 | ## Mobile malware discovered 17 | While mobile malware is overhyped by the security industry, it certainly exists. It is more prevalent in the Android ecosystem due to the ability to more easily distribute and install apps outside the Google Play store. 18 | 19 | The two most common mobile malware incidents encountered are: 20 | 21 | 1. Malware installed on an individual's device 22 | 1. Malware impersonating your brand 23 | 24 | The first situation generally impacts a single or small group of devices that are part of an organization (e.g., corporate-owned devices, employee-owned devices or BYOD, consultants). 25 | 26 | In the second scenario, an unauthorized actor generally publishes a mobile app that targets your customers by impersonating your brand. Since this impacts your customers, the response steps vary significantly from an individual incident. 27 | 28 | We discuss both of these scenarios in our mobile case studies later in the book and develop incident response playbooks for them as well. 29 | 30 | ## Device acting suspiciously 31 | In many instances, an employee or contractor will inform the IT, security or incident response team that their device is acting suspiciously. This is a challenging scenarios due to: 32 | 33 | * Limited visibility into the device 34 | * A lack of historical data 35 | * Any number of possible explanations or causes (and only some qualify as an incident) 36 | * The sensitive nature of accessing an individual's mobile device 37 | * Urgency due to potential impact and utility of a mobile device 38 | * The incident reporter's accuracy 39 | 40 | ## Device lost or stolen 41 | A lost or stolen mobile device is a scenario that is probably the most well understood. Both Android and iOS have built in capabilities for finding a lost or stolen device, locking it and performing a remote wipe. 42 | 43 | However, with the information provided in this book, there's opportunity to better understand the potential impact of this type of event provided the security team has access to device properties such as operating system version and a list of installed apps. Armed with this information, a much better understanding of the data at risk can inform the response and resolution of the incident. 44 | 45 | ## Insider attack via mobile device 46 | Detecting insider attacks is incredibly difficult, even more so on a mobile device because the device telemetry data available is limited and security tools are still evolving. The most likely event would involve an individual already under suspicion, and an incident responder being asked to perform an investigation on the mobile device. 47 | 48 | ## Support for an internal investigation 49 | Internal investigations, especially at larger organizations, are fairly common. Examples include: 50 | 51 | * Data theft by a departing employee 52 | * Employee violation of company policies 53 | * Litigation freeze or e-discovery request 54 | 55 | ## Data breach via mobile device 56 | As mobile devices play a greater role in the daily operations of large organizations, there is an increased risk of sensitive data (e.g. customer data, PII) being leaked out or breached in an attack. While many incident response teams have well practiced responses for incidents like this involving servers, very few have addressed the growing risk in mobile devices. 57 | -------------------------------------------------------------------------------- /en/case-studies/hacking-team-analysis.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Hacking Team 7 | 8 | One challenge incident response, and more broadly security, teams face is providing the business case for investing in the necessary people, tools, training and process. This section includes information about the compromise of the notorious company Hacking Team to achieve the following: 9 | 10 | * Provide empirical evidence that nation-states and malicious actors target mobile devices 11 | * Explain that there exists a market willing to pay for the ability to compromise mobile devices 12 | * Demonstrate that vulnerabilities, technologies and companies exist that make mobile compromise possible. 13 | 14 | Case studies such as this one will help you in making the business case for investing in mobile security and incident response. 15 | 16 | ## Hacking Team background 17 | The Milan, Italy-based company Hacking Team markets surveillance software, called Remote Control System (RCS), to government and law enforcement agencies. The system allows a user to launch exploits against targets (including desktop computers, laptops, and mobile devices), deliver payloads, and remotely control compromised systems and/or exfiltrate data from those systems. Among other features, RCS can monitor and record communications, decipher encrypted data, and remotely activate microphones and cameras. Many people have criticized Hacking Team for selling their software to [repressive governments that violate basic human rights](https://theintercept.com/2015/07/07/leaked-documents-confirm-hacking-team-sells-spyware-repressive-countries/) and use the software to spy on citizens, activists, and journalists. Predictably, Hacking Team vehemently denied these allegations, but as the raw data and analysis definitively proves, Hacking Team was very much engaged in selling exploits to anyone who had the means to purchase them. 18 | 19 | ## Company compromise 20 | On July 5, 2015, an allegedly unauthorized individual took control of Hacking Team’s Twitter account and posted a message stating, "Since we have nothing to hide, we’re publishing all our e-mails, files, and source code" and including a link to more than 400 GB of internal Hacking Team data. The files included company emails, customer data, and source code among other things. 21 | 22 | The data showed that Hacking Team also sold software to private companies and [in one case](https://twitter.com/netik/status/617916052052144128) for the purposes of surveilling Android and Blackberry mobile devices. In order to install the RCS software on a targeted device without the user’s knowledge, a vulnerability on that device would need to be exploited. Emails reveal that Hacking Team recruited exploit developers and also purchased exploits that paved the way for installation of the RCS software. 23 | 24 | In addition, [an archive of the leaked emails](https://wikileaks.org/hackingteam/emails/) provided by WikiLeaks includes an [email stating that Hacking Team worked on developing an exploit for a vulnerability in a version of the SwiftKey keyboard](https://wikileaks.org/hackingteam/emails/emailid/1028689) shipped with several Samsung Galaxy models. The email states, "Is it really exploitable? Yes. Are WE working on it? Obviously," and includes a link to an Ars Technica article, ["New exploit turns Samsung Galaxy phones into remote bugging devices](http://arstechnica.com/security/2015/06/new-exploit-turns-samsung-galaxy-phones-into-remote-bugging-devices/)," about the vulnerability discovered by NowSecure researcher Ryan Welton. 25 | 26 | Source code allegedly recovered from the leaked data and [posted on GitHub](https://github.com/hackedteam?tab=repositories) includes RCS agents for Android, Blackberry, iOS, and Windows Phone. These agent’s capabilities included the ability to take pictures, copy events from calendars, and intercept communications such as, phone calls, SMS messages, and chat messages from apps like Skype and WhatsApp. 27 | 28 | It was also revealed that Hacking Team possessed an Apple enterprise certificate. [Reports claim](http://www.ibtimes.co.uk/masque-attack-returns-hacking-team-leveraged-ios-vulnerability-install-fake-messaging-apps-1514317) that apps created by Hacking Team and signed with this certificate could be installed on even non-jailbroken iOS devices. This allowed Hacking Team to develop and distribute custom apps outside of the Apple App Store and without going through the typical Apple review process. Researchers found in one case that Hacking Team had created spyware hidden in the native Apple Newsstand app. 29 | -------------------------------------------------------------------------------- /en/case-studies/international-travel.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # International travel investigation 7 | If a company representative plans to travel abroad in potentially hostile areas, ideally they will use a dispensable tablet or phone specifically for the trip and leave the laptop or device they use for work at home. The traveler should use that designated device under the assumption that it and any data upon it is or will be compromised (i.e., they shouldn’t input, send or receive any sensitive data on it). 8 | 9 | This section will cover three aspects of how a device might be handled, used and connected to communications infrastructure as a result of international travel. If, for example, a company representative returns from abroad and reports a potential incident, you need to determine how the device has changed, what parties handled the device, how the device connected to mobile infrastructure and the Internet, and what data may have been exposed. 10 | 11 | ## Customs 12 | When a traveler enters or exits a country, customs authorities may inspect luggage including personal effects such as a mobile device or laptop. During customs procedures, authorities may intercept and examine a tablet or phone. Depending on the country, authorities may also perform a forensic acquisition on the device. A forensic acquisition consists of extracting data from the device and creating a copy of that data (called a forensic image). When authorities take possession of the device, they also have an opportunity to implant malicious code on the device for the purposes of surveillance. 13 | 14 | ## Connecting to mobile infrastructure and networks abroad 15 | Once an employee is overseas, their phone will connect to that country’s cell phone network. Mobile carriers have considerable, low-level access to the devices that connect to their infrastructure. In China, the three main telecommunications providers - China Mobile, China Unicom and China Telecom - are state-owned enterprises. Numbers from June 2015 show [China Mobile with a 60.2 percent market share](http://www.chinainternetwatch.com/14108/market-share-china-big-three-telecom-carriers-q2-2015/) compared to China Unicom’s 24.5 percent and China Telecom’s 15.3 percent. If someone from your company connects to a cell tower in China, it’s likely the tower is state-owned. 16 | 17 | A mobile carrier or malicious party can route a traveler’s device to specific networks upon the device’s connection to a base transceiver station (BTS), which is part of the technology a cell tower uses to facilitate mobile communication. The baseband processor, a chip found within a mobile device, handles the communications emanating from and received by the device. Security flaws within a device’s baseband processor can be exploited via a BTS as explained by Ralf-Philipp Weinmann in his paper ["Baseband Attacks: Remote Exploitation of Memory Corruptions in Cellular Protocol Stacks."](https://www.usenix.org/system/files/conference/woot12/woot12-final24.pdf) In addition, mobile security researcher Aaron Turner also stated, “Foreign carriers and malicious BTS operators can 'catch and release' your device while making updates or settings changes that will enable persistent monitoring,” in a presentation at RSA Conference 2013 entitled, ["Mobile APT - How Rogue Base Stations Can Root Your Devices"](http://www.rsaconference.com/events/us13/agenda/sessions/301/mobile-apt-how-rogue-base-stations-can-root-your). 18 | 19 | If you’re called to respond to an incident related to a company representative’s travel abroad, you’ll want to keep the possibility of a baseband attack in mind. If possible, you’ll also want to consider taking forensic images of the device prior to travel abroad and upon the device’s return to the home country. 20 | 21 | ## Connecting to Wi-Fi abroad 22 | Business travelers connecting to Wi-Fi presents another vector by which malicious individuals may compromise a mobile device. One example of this is the Darkhotel campaign labeled an advanced persistent threat (APT) by Kaspersky Lab. In [their report](https://cdn.securelist.com/files/2014/11/darkhotel_kl_07.11.pdf) on the attack published in November 2014, Kaspersky Lab researchers stated that Darkhotel targeted corporate executives staying at hotels around the world via the hotel’s in-house Wi-Fi or business-center Internet access points. 23 | 24 | The report states that the majority of infections occurred in Japan, Taiwan, and China. The malicious actors behind the attack seemed to have information about targeted executives’ names and the hotels at which they planned to stay. The attack used forged certificates to dupe executives into downloading what posed as one of several major software releases but was in fact a Trojan consisting of keyloggers and other malware. While the Darkhotel campaign does not target mobile specifically, it’s an example of the targeting of executives abroad via Wi-Fi. 25 | -------------------------------------------------------------------------------- /en/styles/website.css: -------------------------------------------------------------------------------- 1 | /* FYI: requires SUPER specific selectors to style w/out !important */ 2 | 3 | @import url(https://fonts.googleapis.com/css?family=Lato:400,300,700); 4 | 5 | body { 6 | font-family: 'Lato', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; 7 | } 8 | 9 | /* Typography */ 10 | h1 { 11 | font-weight: 300; 12 | font-style: normal; 13 | font-size: 2.625em; 14 | color: #0099ff; 15 | font-style: normal; 16 | letter-spacing: 1px; 17 | } 18 | 19 | h2 { 20 | font-weight: 400; 21 | font-style: normal; 22 | text-transform: uppercase; 23 | color: #0099ff; 24 | font-size: 1rem; 25 | letter-spacing: 1px; 26 | } 27 | 28 | h3 { 29 | font-weight: 400; 30 | font-style: italic; 31 | font-size: 1.125em; 32 | line-height: 2.063em; 33 | color: #999cab; 34 | letter-spacing: 1px; 35 | } 36 | 37 | h4 { 38 | font-weight: 400; 39 | font-style: normal; 40 | text-transform: uppercase; 41 | font-size: .75em; 42 | line-height: 1em; 43 | color: #999cab; 44 | letter-spacing: 1px; 45 | } 46 | 47 | /* Links */ 48 | 49 | /* The edit page plugin cuts off almost all of the title so it's best to hide rn */ 50 | .book .book-header h1 a { 51 | display: none; 52 | } 53 | 54 | a { 55 | text-decoration: none !important; 56 | } 57 | 58 | /* Targets links in lists and copy */ 59 | .book .book-body .page-wrapper .page-inner section.normal a { 60 | color: #0099ff; 61 | } 62 | 63 | .book .book-body .page-wrapper .page-inner section.normal a:visited { 64 | text-decoration: none; 65 | } 66 | 67 | .book .book-body .page-wrapper .page-inner section.normal a:hover { 68 | color: #33ccff; 69 | text-decoration: none; 70 | } 71 | 72 | .book .book-body .page-wrapper .page-inner section.normal a:active { 73 | text-decoration: none; 74 | color: #0099ff; 75 | } 76 | 77 | /* Sidebar */ 78 | .book .book-summary ul.summary { 79 | background: #F5FCFF; 80 | } 81 | 82 | .book .book-summary ul.summary li.divider { 83 | background: #F5FCFF; 84 | } 85 | 86 | /* Top left link */ 87 | .book .book-summary ul.summary li a.custom-link { 88 | margin: 20px 10px 10px 10px; 89 | background: url("../assets/logo.svg") no-repeat; 90 | background-position: left center; 91 | background-size: 200px; 92 | text-indent: -999px; 93 | } 94 | 95 | /* main chapter title */ 96 | .book .book-summary ul.summary li.chapter a { 97 | color: #999cab; 98 | font-weight: 700; 99 | } 100 | 101 | .book .book-summary ul.summary ul.articles a { 102 | font-weight: 400; 103 | } 104 | 105 | /* Sidebar */ 106 | .book .book-summary { 107 | border-right: none; 108 | } 109 | 110 | .book .book-summary ul.summary li a:visited { 111 | color: #999cab; 112 | } 113 | 114 | .book .book-summary ul.summary li.active>a { 115 | color: #33ccff; 116 | } 117 | 118 | .book .book-summary ul.summary li a:hover { 119 | color: #262a48; 120 | } 121 | 122 | /* Gitbook link */ 123 | .book .book-summary ul.summary li a.gitbook-link { 124 | color: #cccdd5; 125 | margin-top: 20px; 126 | font-weight: 700; 127 | } 128 | 129 | .book .book-summary ul.summary li a.gitbook-link:visited { 130 | color: #cccdd5; 131 | } 132 | 133 | /* Change page */ 134 | .book .book-body .navigation.navigation-prev:hover, 135 | .book .book-body .navigation.navigation-next:hover { 136 | background: #f7f7f7; 137 | } 138 | 139 | /* Bump down sup num in endnotes/footnotes */ 140 | #endnotes ~ blockquote sup { 141 | top: 0; 142 | font-weight: 700; 143 | } 144 | 145 | #footnotes ~ blockquote sup { 146 | top: 0; 147 | font-weight: 700; 148 | } 149 | 150 | /* Copy lists */ 151 | .book .book-body .page-wrapper .page-inner section.normal ul li { 152 | list-style: none; 153 | } 154 | 155 | .book .book-body .page-wrapper .page-inner section.normal ul li:before { 156 | content: '\2022'; 157 | display: block; 158 | position: relative; 159 | max-width: 0; 160 | max-height: 0; 161 | left: -19px; 162 | top: -8px; 163 | color: #33ccff; 164 | font-size: 26px; 165 | } 166 | 167 | .book .book-body .page-wrapper .page-inner section.normal ol li { 168 | list-style-type: none; 169 | counter-increment: list; 170 | position: relative; 171 | } 172 | 173 | .book .book-body .page-wrapper .page-inner section.normal ol li:after { 174 | content: counter(list) "."; 175 | position: absolute; 176 | font-weight: 700; 177 | left: -2.5em; 178 | width: 2em; 179 | text-align: right; 180 | color: #33ccff; 181 | top: 0; 182 | } 183 | 184 | /* Misc */ 185 | .fa-check:before { 186 | display: none; 187 | } 188 | 189 | /* Temp & wonky CTAs, custom plugin required. Don't forget to display: none in PDF */ 190 | .cta-banner .cta-banner-pdf, 191 | .cta-banner .cta-banner-update { 192 | text-align: center; 193 | color: #CCCCCC !important; 194 | font-weight: 700; 195 | font-style: italic; 196 | } 197 | 198 | .cta-banner .cta-banner-pdf:hover, 199 | .cta-banner .cta-banner-update:hover { 200 | color: gray !important; 201 | } 202 | 203 | .cta-banner .cta-banner-pdf { 204 | padding-left: 0; 205 | margin-right: 30px; 206 | } 207 | 208 | .fa-bell-o, 209 | .fa-file-pdf-o { 210 | padding-left: 10px; 211 | } 212 | /* End CTAs */ 213 | -------------------------------------------------------------------------------- /en/case-studies/unauthorized-app-discovered.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Unauthorized app discovered 7 | Counterfeit apps developed by unauthorized parties and published to official or unofficial app stores (and elsewhere on the Internet) can damage a company’s brand name and put their customers at risk. As an incident responder, you may be called upon to investigate an incident involving an unauthorized app that might do any one or more of the following: 8 | 9 | * Use a company’s brand name without permission 10 | * Target the company’s customers 11 | * Interact with the company’s backend services 12 | * Is made available to the public via app stores or elsewhere on the Internet 13 | 14 | ## Aetna++ case study 15 | In the fall of 2013, insurance provider Aetna’s Chief Information Security Officer (CISO) Jim Routh asked his IT staff for a list of all of the company’s mobile apps. Creating such a list can prove more difficult than it seems because mobile apps tend to proliferate. For example, an ambitious department within the company may hire a third party to develop and release a mobile app without communicating to the larger organization. Subsidiaries, affiliates and even unauthorized entities may publish an app that uses a company’s brand outright (and without explicit permission) or claims association with the company. 16 | 17 | There are hundreds of third-party app stores in existence aside from the Apple App Store and Google Play. Jeff Lenton details the mobile app store ecosystem (as well as comments on this particular case of an unauthorized mobile app) in a 2015 presentation entitled "[Understanding the Mobile Ecosystem](http://www.isaca.org/chapters5/Ireland/Documents/2015%20Presentations/Jeff%20Lenton%20-%20Understanding%20Todays%20Mobile%20App%20Store%20Ecosystem%20and%20Why%20You%20are%20at%20Risk.pdf)". The ecosystem consists of official app stores, Internet company stores, manufacturer stores, carrier or operator stores, affiliate stores, and what he terms “feral apps” that are not available on app stores at all. Keeping track of all these stores, let alone the use of a company’s brand name on those stores, is a daunting task. 18 | 19 | Routh chose to work with a third party (RiskIQ for whom Lenton worked) to help identify mobile apps that used his organization’s brand. The list included approximately 20 apps. Upon reviewing the list, one app in particular caught Routh's attention because he was not familiar with it. The app’s name appended two plus signs to the company’s name (i.e., “Aetna++”). 20 | 21 | Initially, the Routh surmised that the app was developed for a marketing campaign. He began his investigation by identifying the developer of the app. The developer’s name was Nayem Junaid, and by reviewing the developer’s LinkedIn profile Routh determined Junaid was a ColdFusion developer based in Hydrabad, India. Routh set out to find Junaid in the company’s employee directory but couldn’t find any matches. Next, he explored whether the Junaid was a contractor and attempted to locate him with the help of a number of large contracting firms used by Aetna. The contracting firms did not have any record of the developer. 22 | 23 | Routh then performed a quick Google search and found that 23 other large brands also had publicly available mobile apps that used their brand name along with the appended "++." At this point, Routh suspected the app was unauthorized. 24 | 25 | Upon further analysis of the app, Routh discovered that the unauthorized app was a copy of Aetna’s official Android app with one difference -- the developer injected code into it. That code requested the GET_ACCOUNTS permission from Android, which allows for viewing what accounts are enabled on a mobile device (e.g., Google, Facebook, Twitter, etc.) through an account manager. 26 | 27 | The first screen of the app matched the first screen of the official Android app, and a basic search function listed providers that the company supported. The rest of the app, however, did not function. The developer had republished the unauthorized app to third-party app stores and discussion forums. Users had downloaded the unofficial app more than 175,000 times. 28 | 29 | In the unauthorized Aetna++ app, an ad library named com.edealya used the GET_ACCOUNTS permission. The company eDealya claims to help advertisers serve relevant ads to a consumer based on messages posted via a number of social media platforms. In the end, the unauthorized app harvested log-in credentials, and [an article quotes Routh](http://www.clinical-innovation.com/topics/privacy-security/aetna-ciso-risk-based-approach-info-security) as saying the app was, “...a parasite capitalizing on Aetna’s brand equity to make money. This happens all the time.” 30 | 31 | ## Detecting and remediating an unauthorized mobile app 32 | The same article explains that Routh recommends that in handling and preventing scenarios such as this one, companies need to acquire IT security intelligence from third-party sources, share information with their peers, and also work with state and federal entities. 33 | 34 | As part of responding to the incident, Routh reached out to the other 23 affected companies to inform them of the unauthorized apps he found using their brand names. The third party Routh worked with, RiskIQ, also reached out to a number of advertisers to make them aware of their findings. 35 | 36 | Obfuscating the code of mobile apps can also help make it more difficult to clone a branded app and insert malicious code into it. 37 | -------------------------------------------------------------------------------- /en/overview/ir-process.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Incident response process 7 | 8 | The [SANS Institute](https://www.sans.org/) has defined six key IR steps in their book [Computer Security Incident Handling: Step-by-Step](http://www.amazon.com/Computer-Security-Incident-Handling-Step-/dp/0972427376/ref=sr_1_1?ie=UTF8&qid=1436392071&sr=8-1&keywords=Computer+Security+Incident+Handling%3A+Step-by-Step): 9 | 10 | 1. Preparation 11 | 2. Identification 12 | 3. Containment 13 | 4. Eradication 14 | 5. Recovery 15 | 6. Lessons learned 16 | 17 | While we will cover this topic extensively in the chapter [Framework for Mobile Incident Response](mobile-incident-response-framework.md) and build upon frameworks from both SANS and NIST, we'd like to discuss this process here at a high level and relate it to mobile specifically. 18 | 19 | ## Preparation 20 | Preparing for a mobile incident involves a number of steps. First, in order to determine the risks that exist within an organization today, a mobile threat assessment should be performed. Part of this threat assessment involves identifying mobile assets on the corporate network. Mobile assets include devices, operating system versions running on those devices, and applications installed on those devices if available. This inventory should then be correlated with mobile security intelligence. That intelligence will include device vulnerabilities, operating system vulnerabilities, information about leaky and insecure apps, known malware, and other risks such as known malicious Wi-Fi networks. The last step of the mobile threat assessment is mitigating the risk identified as a result of your inventory and correlation with threat data. Once you've collected intelligence from the mobile devices on your network, analyze that data to identify security risks, eliminate low hangout fruit, address risk that is unacceptable to your organization, document remaining risks, and prepare IR playbooks for each scenario. 21 | 22 | Building your mobile IR tool box is another criticial step in the preparation process. When an incident occurs, your team needs to be prepared with a list of tools that are specific to mobile. Chapter 2 - [Tools for Mobile Incident Response](../tools/README.md) - goes into detail about different categories of mobile IR tools, lists suggested tools, and provides instructions on how to setup a mobile IR workstation. 23 | 24 | Finally, you cannot fully be prepared without defining and documenting a process, and developing playbooks for each type of mobile threat scenario. Once you've developed your documentation and prepared a workstation with pre-installed tools, preparation should not stop there. The very best way to be prepared for an incident is practice and repetition. In a later chapter, we will provide you with sample scenarios where you can walk through some practice labs. 25 | 26 | 27 | ## Identification 28 | Identification of an incident can occur in several ways. There are varying device indicators of compromise (IOC) depending on the type of mobile incident. In some cases, a system administrator may observe increased battery drain, unusual network traffic, or certificate errors. Many times, a user may report an incident when noticing something strange occurring on their device. 29 | 30 | Another type of mobile incident may be indentified by mobile app reputation services (MARS). MARS scour app stores (official and third-party) and the Internet for mobile apps using a company's brand name. If an organization is alerted to unauthorized use of their brand in a mobile app or sees unknown apps connecting to their transactional servers, this might indicate an incident relating to mobile apps. 31 | 32 | 33 | ## Containment 34 | Once you have identified and logged an incident, it must be contained. It is preferable to have physical access to the device, which can be a challenge with mobile. If access to the device is obtained, baseline information should be captured including type of device, operating system version, and a list of installed apps. If appropriate, network analysis should also be considered. The full forensic acquisition of the device should then be performed before containing the incident by isolating the device from the network. 35 | 36 | ## Eradication 37 | Artifacts collected from the mobile device, router, or network packet capture must then be analyzed in an effort to determine whether the threat can be removed. At this step, it is important to identify all impacted users or devices, remove the threat, and/or wipe corporate data if necessary. 38 | 39 | ## Recovery 40 | Steps should then be taken to bring any systems that were shut down during the incident back online. This includes re-provisioning mobile devices. The recovery process should also include ensuring attacker didn't move laterally within your organization and pro-actively monitoring accounts and systems connected to the impacted mobile device and impacted users. During this phase, the effectiveness of social engineering attacks is greatly increased, so ensure that your employees are properly educated and trained in this area. 41 | 42 | 43 | ## Lessons learned 44 | The final step in the IR process is just as important as those before it. The purpose of the lessons learned phase is to summarize what went wrong, what worked, and most importantly, what can be improved. A debrief with the team should take place to identify recommended policies and procedures changes and user education. The team should discuss the indicators of compromise and determine how to best inoculate against future attacks by focusing on anomaly detection as well as shared insights and cross-referencable data available publicly or from other organizations. 45 | 46 | -------------------------------------------------------------------------------- /en/case-studies/trojaned-ios-app.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # Trojaned iOS app installs 7 | 8 | This case study will examine the conditions leading up to, techniques used by and impacts of an attacker installing trojaned versions of iOS apps on a target's iPhone. 9 | 10 | ## Apple's walled garden 11 | 12 | Apple tightly controls the iOS ecosystem and in particular, how apps are distributed via the App Store. While this frustrates some app developers, tinkerers, and security researchers; it has certainly reduced the impact of malicious apps by making it difficult to install them on target devices. An app needs to either be distributed via the App Store or signed with a special certificate issued by Apple to developers or businesses. The app then needs to be loaded onto the device via iTunes or a special link and requires user confirmation. Contrast this with Android where developers have many distribution channels at their diposal and device owners can configure the device to install untrusted apps. 13 | 14 | If an attacker wants to install malicious apps on a target's iPhone, they either need to trick the user into accepting the developer- or business-signed application or gain physical access to the device to install the app directly. 15 | 16 | ## Conditions and methods for compromise 17 | In September 2014, Apple released the iPhone 6 and 6 Plus to the public. As with previous iPhone releases, the device was highly anticipated and sought after. In the U.S., that meant either waiting in long lines or waiting weeks on a backorder. 18 | 19 | In countries other than the U.S., it is far more difficult to acquire a new iPhone model. Demand is extremely high, and people are willing to pay significant premiums to acquire a device. A new iPhone is also a status symbol. Often times successful business executives or government officials will receive a new model of a device. They may purchase the device, often using their connections, or receive it as a gift. 20 | 21 | The iPhone 6 and 6 Plus frenzy presented a perfect opportunity to target an executive or government official. 22 | 23 | In this case, the attacker knew of the target individual's desire for a new iPhone 6 and took advantage of the situation. The attacker purchased an iPhone 6 and, with the device in their physical possession, set the device up specifically for this individual (who also happened to be the unwitting target of the attack). The target individual's enthusiasm easily pushed aside any suspicions. The individual likely viewed this pre-configuration of the device as a courtesy so they could begin using the device as soon as they received it. 24 | 25 | Since attackers had physical access to the device, they were able to install trojaned versions of popular apps on the device including: 26 | 27 | * Chrome 28 | * Facebook 29 | * Skype 30 | * WhatsApp 31 | * Telegram 32 | 33 | Trojaned applications were installed alongside with non-trojaned, but pirated, apps. Those apps included Pages and Numbers productivity apps, which also helped create the illusion that the device was "business-ready" to help in alleviating suspicion. 34 | 35 | The apps targeted and collected sensitive data and communications from the device and sent the data back to the attacker via their command and control (C2) servers. 36 | 37 | ## Trojaned iOS apps 38 | Creating a trojaned version of a popular app is a very effective technique for compromising a device. On the device, there would be very little indication that the device was trojaned. There would be negligible impact on battery and the functionality of the app would be consistent with the valid version. 39 | 40 | To create a trojaned iOS app, an attacker does not need deep technical expertise. Instead, a developer with a few additional security tools could perform the following: 41 | 42 | * Download the public app 43 | * Decrypt the app 44 | * Inject a dynamic library into the app bundle 45 | * Modify the app's main executable to load the injected dynamic library at app launch 46 | * Hook interesting parts of the app 47 | * Configure the app to send intercepted data back to the attacker via a C2 server 48 | * Re-sign the app with a developer or enterprise certificate 49 | 50 | At that point, an attacker with physical access to the iPhone could install the app via either an iTunes sync or by clicking on a link to the binary (via the `itms://` uri) and then trusting the app when prompted by iOS. 51 | 52 | ## Detecting and remediating a trojaned iOS app 53 | As with any incident, you must first identify the incident. While it's unlikely that an individual (unless both technical and security savvy) will be able to identify a trojaned app (unless they're technology and security savvy), a number of signs might alert a security analyst to a trojaned app. 54 | 55 | Since the app is modified from the App Store version, an analyst equipped with the proper tools and information will be able to detect and determine an illegitimate app. For example, if you review the outbound network connections from the device, you would notice traffic going to servers not associated with normal app traffic. There are various ways to inspect network traffic including: 56 | 57 | * Continual analysis tools 58 | * Netstat app 59 | * Netstat command via a terminal app 60 | * Proxying network traffic 61 | * Inspecting network traffic on a network device (i.e., at the switch level) 62 | 63 | Note that analysing *contents* of the data being sent (as opposed to the *destination* to which it's sent) can be problematic because it's possible, if not likely, that TLS is used to protect the confidentiality and integrity of the data. In such cases an analyst must either take additional steps to decrypt traffic (i.e., by adding an extra trusted root certificate to the device under scrutiny) or, if such device modifications are not desirable, choose alternative analysis techniques. 64 | 65 | In addition, an analyst might inspect the app bundle and see that it is a developer- or enterprise-signed app, which means it's modified from the Apple App Store version. This can be seen by inspecting the app binary directly and examining the certificate used to sign the app and its executable content. 66 | 67 | Finally, apps not installed via the Apple App Store will not auto-update, so the user may become suspicious when other people receive app updates and they do not. Or they may search the Apple App Store, install the original app, and wonder why two icons appear for the same app and requiring them to log in separately for each of the apps. Finally, with some continual analysis apps, the security analysts should be able to detect that a non-standard version on a popular app is installed on a device. 68 | 69 | Once the trojan app has been identified, it is critical to quickly contain the threat. The most effective approach would be to isolate the device by enabling the device's airplane mode or placing the device into a Faraday cage (box/bag). You would then perform a device backup and secure a copy of the app binary for inspection. We will explore this in more detail throughout the [Framework for Mobile Incident Response](../mobile-incident-response-framework) chapter. 70 | -------------------------------------------------------------------------------- /en/overview/history-overview-ir.md: -------------------------------------------------------------------------------- 1 | 5 | 6 | # A brief history of incident response 7 | On November 2, 1998, Robert Tappan Morris released the first Internet worm (dubbed the Morris Worm) and became part of computer security history by: 8 | 9 | 1. Unleashing the first large scale denial-of-service (DoS) attack on the Internet 10 | 2. Impacting an estimated (and refuted) 10 percent of computers on the Internet at that time (6,000 impacted) 11 | 3. Being the first person prosecuted under the Computer Fraud and Abuse Act (CFAA) 12 | 13 | The impact to the Internet plus the significant challenges in coordinating a response in such a distributed environment led to the creation of the Computer Emergency Response Team Coordination Center (CERT/CC) by DARPA in 1988.[^1] The goal of the CERT organization was to provide the central hub for communicating and coordinating a response to security incidents. 14 | 15 | The [CERT/CC](https://cert.org/) flourishes today and is part of the Software Engineering Institute at Carnegie Mellon University. 16 | 17 | ## Goal of incident response 18 | The goal of incident response is to quickly contain and mitigate an incident. A more formal definition of incident response (IR) will be helpful as we continue on in our discussion: 19 | 20 | >Incident response is an organized approach to addressing and managing the aftermath of a security breach or attack (also known as an incident). The goal is to handle the situation in a way that limits damage and reduces recovery time and costs. An incident response plan includes a policy that defines, in specific terms, what constitutes an incident and provides a step-by-step process that should be followed when an incident occurs. [^2] 21 | 22 | ## Incident response today (2016) 23 | 24 | Today, most large government and enterprise organizations have an incident response team. And government regulations increasingly mandate incident response capabilities. 25 | 26 | For example, the Federal Financial Institution Examination Council (FFIEC) is a "formal interagency body empowered to prescribe uniform principles, standards, and report forms for the federal examination of financial institutions" [^3] that developed a system dubbed InfoBase to help introduce and educate the financial services industry on items field examiners were inspecting during audits. The [FFIEC's guidance on incident response](http://ithandbook.ffiec.gov/it-booklets/business-continuity-planning/other-policies,-standards-and-processes/incident-response.aspx) includes a mandate to develop and integrate this discipline into the financial institution's business continuity planning process. 27 | 28 | This is only one example of regulated industries required to have incident response plans or capabilities in place. 29 | 30 | Other examples include: 31 | 32 | * The healthcare industry is beholden to a [HIPAA incident response regulation](http://www.hhs.gov/hipaa/for-professionals/faq/2002/what-does-the-security-rule-require-a-covered-entity-to-do-to-comply/index.html) that "requires a covered entity to implement policies and procedures to address security incidents" 33 | * The payments industry must comply with [PCI DSS incident response requirements](https://www.pcisecuritystandards.org/documents/PCI_DSS_v3.pdf) [PDF] (section 12.10) that require organizations to "implement an incident response plan," and "Be prepared to respond immediately to a system breach" 34 | * The financial services industry has multiple regulatory acts and bodies overseeing it including the FDIC and [Gramm-Leach-Bliley Act incident response standards](https://www.fdic.gov/regulations/laws/rules/2000-8660.html) that "require the service provider to take appropriate actions to address incidents of unauthorized access to the financial institution's customer information, including notification to the institution as soon as possible of any such incident, to enable the institution to expeditiously implement its response program" 35 | * Federal agencies are regulated under the Federal Information Security Management Act of 2002 that includes [FISMA incident response regulations](http://www.gao.gov/assets/670/662901.pdf) [PDF] requiring agencies to develop, document, and implement an information security program (FISMA Act of 2002, Pub. L. No. 107-347, Title III, Dec. 17, 2002). 36 | 37 | ## CERT organizations 38 | 39 | There is a large group of resources that supporting CERTs around the world. They can be loosely organized into three types based on their sponsors: 40 | 41 | 1. Government 42 | 2. Enterprise 43 | 3. Community 44 | 45 | Below is a list of various organizations that often provide extensive information and at times support during an incident. 46 | 47 | ### Government-sponsored CERTs / CSIRTs 48 | 49 | These organizations generally coordinate incident response for entire nations. 50 | 51 | 1. [US-CERT](https://www.us-cert.gov/) (United States Computer Emergency Readiness Team) 52 | 1. [ENISA](https://www.enisa.europa.eu/) (European Union Agency for Network and Information Security) 53 | 1. [CERT](https://www.cert.org/) (CERT Division is located within the Software Engineering Institute, a federally funded research and development center at Carnegie Mellon University, the majority of their work contributes to government and national security efforts) 54 | 1. [CNCERT/CC](http://www.cert.org.cn/publish/english/index.html) (National Computer Network Emergency Response Technical Team/Coordination Center of China) 55 | 56 | ### Enterprise-sponsored CERTs / CSIRTs 57 | 58 | These organizations, while focused on a particular enterprise, have a visible public presence and sometimes support the industry with educational information and tools: 59 | 60 | 1. [Microsoft Security Response Center](https://technet.microsoft.com/en-us/security/dn528958) 61 | 1. [Apple Product Security](https://www.apple.com/support/security/) 62 | 1. [Facebook Security](https://www.facebook.com/security) 63 | 1. [Google Application Security](https://www.google.com/about/appsecurity/) 64 | 1. [Android Security](https://source.android.com/security/index.html) 65 | 66 | ### Community 67 | 68 | These organizations provide various resources to the incident response community including threat reporting, training, certifications, conferences, and research. 69 | 70 | 1. [FIRST](http://www.first.org/) (global Forum for Incident Response and Security Teams) 71 | 1. [SANS Institute](https://www.sans.org/about/) 72 | 1. [Internet Storm Center](https://isc.sans.edu/) (part of SANS) 73 | 74 | The FIRST website maintains a [contact list of incident response teams](https://www.first.org/about/organization/teams) at participating member organizations. Please note, leveraging this list for marketing is strictly prohibited. 75 | 76 | ## Digital forensics and incident response 77 | 78 | Incident response is closely connected with digital forensics as nearly every incident requires the collection, storage, and analysis of digital evidence. 79 | 80 | As you explore mobile incident response more thoroughly, below are some mobile forensic resources what may be helpful: 81 | 82 | * [Linux for Mobile Forensics](https://info.nowsecure.com/linux-101-forensics-training-download) - free training 83 | * [JTAG for Mobile Forensics](https://info.nowsecure.com/jtag-forensics-training-download) - free training 84 | * [Santoku Linux](https://santoku-linux.com/) - free Linux distro for mobile forensics 85 | 86 | #### Footnotes 87 | 88 | [^1]: https://en.wikipedia.org/wiki/Morris_worm 89 | [^2]: What is incident response? Definition from WhatIs.com. Wed. Wed Nov 11 2015.