who doesn't like to copy pasting?
it is faster and very convenience, right ?
why do you have to type some long line of text over and over again if you can just simply copy and paste it ?
why do you have to remember disss long account number of number if you can just simply copy and paste it ?
well my friend i think you should reconsider you life decision wkwkwkw
In the following post i will show you how any android application could easily just copied your credential.
Android give user a very convenient user interface one of them is have ability to copy and paste any object including text. As developer android you may notice that in order to user the functionality inside your application you could use ClipboardManager functionality.
In order to use ClipboardManager you have to instantiate the object by calling getSystemService():
ClipboardManager clipboard = (ClipboardManager)getSystemService(Context.CLIPBOARD_SERVICE)
to copy value:
ClipData clip = ClipData.newPlainText('data to be copied', your_text)
clip.setPrimaryClip(clip)
to paste value:
ClipData abc = clipboard.getPrimaryClip();
ClipData.Item item = abc.getItemAt(0);
String text = item.getText().toString();
pretty easy right ?! but here is the problem. Once you try to copy the value it will store into buffer cache inside your device and the fact is that the buffer could be access by any application.
for Proof of concept imagine user try to transfer certain amount of money to specific account and chances are that 99% user will just go directly copy and paste the account and proceed with the transfer.
so i create an application that will snatch the copied value and store it into the application.
as you can see the app is successfully take the value that was copied from the other application. you can see the source code of the application in (link: https://github.com/acaciaworld80/100dayofpentesting/blob/master/clipboard_vuln(day%207).zip)
Thank you
source:
https://resources.infosecinstitute.com/android-hacking-security-part-4-exploiting-unintended-data-leakage-side-channel-data-leakage/#gref
http://www.cis.syr.edu/~wedu/Research/paper/clipboard_attack_dimva2014.pdf
Comments
Post a Comment