Lab 3 Insecure File Storage
Hi, Today we are gonna have a look on Insecure File Storage issue in this we will see the sensitive info of an app is stored in plaintext instead of using some encryption.
First of all we login in to the app using default credentials
We done some activity on the app like transfers, Statement generation etc.
So after some activity in the app we tried to explore its file system using adb shell command
we found this
As you can see that financial info is present in a file that to in sdcard which is world readable and any app can read this info easily.
Solution:
Solution is having permission flags on sensitive files, but still this file is readable with root access (Attacker or Root granted permission to an app). Still normal app will not able to access this file outside of its sandbox.
FilePermissionsSolution
branch of the code
repository, you will see that we save the file with the private mode set
and no longer store it on the sdcard:FileOutputStream outputFileStream = openFileOutput(Long
.toString(System.currentTimeMillis())
+ ".html", MODE_PRIVATE);
Thanks brother great help that u have shared ur knowledge..
ReplyDelete