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.
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.
Open up Android Studio and create a new app and name it
SmartSpy
.Following is the code for
activity_main.xml
:<RelativeLayout xmlns:android...