Insecure Data Storage
Insecure Data Storage
MSC (SS)
19030143011
In case of Android devices, the attacker can get access to the devices
shell by using third party tools and can view all the directories which app
use to store data. This leads to exploit this vulnerability. We will see this
in the following practical.
Technical Impacts
Impact of this vulnerability is severe. The attacker can extract and decompile
the app to view the source code and other sensitive file and can obtain the
sensitive data where the app has stored it. It can cause business huge losses;
revenue as well as on the identity of the business. The private data of the
customers can be stolen. The goodwill of the business can be permanently
damaged and this is beyond repairable. Hence it can lead to following four
impacts.
1] Identity theft
2] Privacy violation
3] Fraud
4] Reputation damage
3] Now, as we can see various files, we will now navigate to our lesson i.e.
Insecure data storage – 1. After expanding this file we get the following source
code.
4] Here, we can see the ‘saveCrendentials’ parameter. So we now know that
the credentials are stored on SharedPreferences folder on our android device.
5] So now we connect to the shell of our device.
6] Now we navigate to the directory where our apps package is located, i.e.
cd /data/data
ls
]
gives us following result
7] Now we navigate to this folder. We find the folder named ‘shared_prefs’.
We enter this directory and open the jakhar.aseem.diva_preferences.xml file.
8] After reading this file we get the following result.
9] Here we can see the username “admin” and password “testpasswrd” stored
in a simple plain text xml file.
Scenario 2:
Mitigation
As we just saw how easy was it for the attacker so get access to the sensitive
data which was stored in the plain text. So, to avoid this the sensitive data like
username/passwords should not be stored in client side. It can be stored
through a secure channel like HTTPS in apps server.