Book Image

Android Security Cookbook

Book Image

Android Security Cookbook

Overview of this book

Android Security Cookbook discusses many common vulnerabilities and security related shortcomings in Android applications and operating systems. The book breaks down and enumerates the processes used to exploit and remediate these vulnerabilities in the form of detailed recipes and walkthroughs. The book also teaches readers to use an Android Security Assessment Framework called Drozer and how to develop plugins to customize the framework. Other topics covered include how to reverse-engineer Android applications to find common vulnerabilities, and how to find common memory corruption vulnerabilities on ARM devices. In terms of application protection this book will show various hardening techniques to protect application components, the data stored, secure networking. In summary, Android Security Cookbook provides a practical analysis into many areas of Android application and operating system security and gives the reader the required skills to analyze the security of their Android devices.
Table of Contents (16 chapters)
Android Security Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Stack memory corruption exploitation


Stack memory exploitation may not be the most likely source of Android bugs and security vulnerabilities, though it is still possible for these kinds of memory corruption bugs to affect native Android executables even in the midst of protections such as ASLR, StackGuard, and SE Linux. In addition to this, most of the Android market share consists of devices that don't have as robust protection against stack and other memory-based exploitation, namely 2.3.3 Gingerbread devices. Another great reason—besides its direct relevance to security research—to include a discussion and walkthrough on stack-based exploitation is because it provides a great gateway into more advanced exploitation techniques.

In this section we will detail how to exploit a common stack-based memory corruption flaw to take control of the flow of execution.

Getting ready

Before we start, you'll need to prepare a vulnerable executable; here's how you do it:

  1. Create a directory with the usual...