Book Image

Hacking Android

By : Srinivasa Rao Kotipalli
Book Image

Hacking Android

By: Srinivasa Rao Kotipalli

Overview of this book

With the mass explosion of Android mobile phones in the world, mobile devices have become an integral part of our everyday lives. Security of Android devices is a broad subject that should be part of our everyday lives to defend against ever-growing smartphone attacks. Everyone, starting with end users all the way up to developers and security professionals should care about android security. Hacking Android is a step-by-step guide that will get you started with Android security. You’ll begin your journey at the absolute basics, and then will slowly gear up to the concepts of Android rooting, application security assessments, malware, infecting APK files, and fuzzing. On this journey you’ll get to grips with various tools and techniques that can be used in your everyday pentests. You’ll gain the skills necessary to perform Android application vulnerability assessment and penetration testing and will create an Android pentesting lab.
Table of Contents (17 chapters)
Hacking Android
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Index

Writing Android malwares


We have seen some examples of how Android malwares works. This section shows how to create some simple Android malwares. Although this section is to introduce the readers to the basics of how Android malwares are created, this knowledge can be used to create more sophisticated malwares. The idea behind showing these techniques is to allow the readers to learn analysis techniques, as it is easy to analyze malwares if we know how it is really created. We will use Android Studio as our IDE to develop these applications.

Writing a simple reverse shell Trojan using socket programming

This section demonstrates how to write simple malware that gives a reverse shell when the user launches it.

Note

Note: This section contains Android development concepts and hence it is expected that readers are already aware of Android development basics.

  1. Open up Android Studio and create a new app and name it SmartSpy.

  2. Following is the code for activity_main.xml:

    <RelativeLayout xmlns:android...