July 1, 2009

Clipboard Hack

Hello everyone !

Have you all heard of "Clipboard Hack" ? If yes - Good and if not -no worries. Here is what it is

"Ctrl+C” is the most important work we do almost everyday. But it's not a very safe thing to do. See how now. What happens when we press “
Ctrl+C” while we are Online. We copy various data by “Ctrl+C” for pasting elsewhere.This copied data is stored in clipboard and is accessible from the net by a combination of JavaScript, ASP(PHP or CGI)
Do not keep sensitive data (like passwords, credit card numbers, PIN etc.) in the clipboard while surfing the web. It is extremely easy to extract the text stored in the clipboard to steal your sensitive information.
Interestingly, this hack works only on Internet Explorer, and not on Mozilla Firefox browser or other browsers.
Now how this hack is done?
It is done by running following script
<Script Language = "JavaScript">
var content = clipboardData.getData("Text");
alert(content);
[/script]
Example: Try including above script in a simple HTML in your local and run the file in both IE in Firefox and see the last copied data by you in an alert box. [ I cannot show the code of my html file as this blogspot is not allowing me to show code having [html] tags ]
Prevention that can be done for this type of attack in IE
1. Go to Internet Options -> Security
2. Select "Custom Level"
3. In the Security settings , select disable under "Allow paste operations via script"

If anyone has any other information regarding this to add -Please feel free to add. :)