TIP: Solution for Hacking Through the Clipboard

Introduction

You copy various data by using Ctrl+C or Ctrl+Insert for pasting elsewhere at a later time. This copied data is stored in the Clipboard and is accessible from the Net by a combination of JavaScripts and ASP. I want share this information because it potentially is very harmful. This information was gathered from the sourcrcodeworld forum.

Hacking Case

Just try this:

  1. Copy any text by pressing Ctrl+C.
  2. Click this link: http://www.sourcecodesworld.com/special/clipboard.asp.
  3. You will see the text you copied on the screen. It was accessed by this Web page.
  4. 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.
    

This works for both IE and Netscape.

Solution

To avoid the Clipboard hack problem, do the following:

  1. Go to Internet Options, Security.
  2. Press custom level.
  3. In the security settings, select disable under Allow paste operations via script.

Now, the contents of your clipboard are safe and you can continue to enjoy Web browsing.

Actual Script

The following few lines are the actual agent used to steal the Clipboard data from your machine:

<Script Language="JavaScript">
var content = clipboardData.getData("Text");
alert(content);
</Script>


About the Author

Abdul shakoor Saqib

About Abdul Shakoor Saqib

Software Engineer

Mr. Abdul Shakoor Saqib has Master of Computer Science and has 3 years of application software development experience. He has specialized himself in developing software for process control system and integrated development environment. Currently he is working as Software Engineer & System Analyst at ISF, Islamabad, Pakistan.Core programming interest and experties are c,c++,vc++ development and MS Office Plugin and skills are MFC,ATL,COM programming. and enjoying to play with interface level with great hardware interaction programming.

Comments

  • Adding to Clipboard

    Posted by gaffy4u on 11/23/2007 01:20am

    We can use clipbrd.exe for seeing the clipboard contents. clipbrd.exe is available in Win 2000 and Win XP. Vista dont have this feature. Mohammed Gaffar Ahmed

    Reply
  • Nope

    Posted by FoodBard on 01/23/2007 10:20pm

    Sorry, it ain't happening here. must be your PC only

    Reply
  • IE problem only?

    Posted by Comintern on 08/04/2006 10:22pm

    I tried the link with the script on it several times, and could not get it to read my clipboard. Then, I scrolled down the page and saw the billboard saying "The best way to solve this problem is to use Firefox. Download Firefox from the link below:". Apparently this is only a security issue for IE users.

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

  • Live Event Date: November 20, 2014 @ 2:00 p.m. ET / 11:00 a.m. PT Are you wanting to target two or more platforms such as iOS, Android, and/or Windows? You are not alone. 90% of enterprises today are targeting two or more platforms. Attend this eSeminar to discover how mobile app developers can rely on one IDE to create applications across platforms and approaches (web, native, and/or hybrid), saving time, money, and effort and introducing apps to market faster. You'll learn the trade-offs for gaining long …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds