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

Decompiling DEX to Java


The DEX code, as we know, is compiled from Java, which is a pretty semantic, easy-to-read language, and I'm sure some of you are wondering by now whether it's possible to decompile the DEX code back into Java? Well, the good news is that this is possible, of course, depending on the quality of the decompiler you are using and the complexity of the DEX code. This is because unless you understand how the DEX code actually works, you will always be at the mercy of your DEX decompiler. There are many ways to thwart the popular decompilers such as reflection and non-standard DEX opcode variants, so if you're hoping that this recipe means you can call yourself an Android reverse engineer even though you are unable to read the DEX code, you are mistaken!

With that said, most DEX code in Android applications are pretty stock standard, and decompilers, such as the one we are about to use, can handle an average DEX file.

Getting ready

Before we start, you will need to grab a few...