Collusion attack in Android Applications
Collusion Attack is one of the ways to bypass android permissions and steal user's data. It requires the attacker or a rogue developer to create and install 2 android application in the user's phone. Both these apps can communicate with each other, share data and then sending it to the attacker.
There are 2 ways to communicate between 2 apps: overtly and covertly. An example of overt communication is to use intents to pass data between 2 apps. An example of covert communication is to use files. One app can write to a file in the internal storage and another app can read that file. An sophisticated way of covert communication would be to communicate by scheduling various events and calculating the time difference.
In this post, I am demonstrating the overt way of communications. I have 2 apps: Contact reader app (Phone reader App) and a Calculator App
A pictorial representation of the demo:
Code snippets:
So, the contact reader app will have the permission to read your contact list. When the app starts it will prompt user to grant permission to read the contacts as shown below:
Once the user grants the permission to read the contact, it sends an intent to the calculator app. The snippet of the code that sends the contact list to the calculator app:
Once all this is done, the attacker can setup a listener at a port and just capture that data:
- User has to install both the apps otherwise it doesn't work.
- You can replace the calculator with a game that uses multi-player so it has access to internet. You can also replace contact reader app with file manager app. Basically, as long as the apps can communicate, the attack will work.
- To defend against this type of attack, one needs to install monitoring program that capture the communication going between 2 apps. An example of such a software would be TaintDroid.
- The attack works regardless of the version of the Android OS.
Comments
Post a Comment