Important Notices & Announcements

Scheduled Third Party LNP Black Out Dates #20171007002

Monday, October 16, 2017 through Sunday, October 22, 2017

Scheduled Third Party Maintenance #20171007001

Sunday, October 8, 2017 between 1:00 am - 6:00 AM EDT

Planned Maintenance Notice #20161113001

Sunday, November 13th, 2016 between 3:00 AM - 6:00 AM EDT
Monday, 03 October 2016 22:34

What is Pastejacking and How to protect yourself?

Rate this item
(0 votes)

 

The easiest method to obtain any text and images from a website is to select it, copy it using CTRL+C keys and then paste it using CTRL+V. What if the pasted material is not what you copied from the website? Surely you’ll copy-paste again, and the results might be the same.  It’s risky, and we’ll talk why.

A quick example is that you copy a command from a website and paste it on the console. It turns out the command was changed, and this damages your data. Is it something wrong with the way you copy paste? Or is it something malicious? This article talks about what Pastejacking is – the art of changing what you copy from web pages.

What is Pastejacking?

Nearly all browsers allow websites to run commands on the users’ computers. This feature can allow malicious websites to take over your computers’ clipboard. That is, when you copy something and paste it to your clipboard, the website can run one or more commands using your browser. The method can be used to change the Clipboard contents. While it may not be much dangerous if you are just copying to Notepad or Word etc. , it could be a problem for your computer if you paste something directly to the Command Prompt.

Websites run command(s) when anything specific is done by the user – like when pressing a specific key or right-clicking the mouse. When you press CTRL+C on your keyboard, it triggers the website command mode. After a small wait, say 800 ms, it pastes something malicious to your clipboard. The wait is to let you use CTRL+V paste the original text that you copied. Some websites may track CTRL+V and use it to trigger a command that changes the clipboard contents.

They can also track mouse movements. If you do not use the keyboard but instead, use the context menu to copy, then too they can trigger commands to replace your clipboard contents.

In short, Pastejacking is a method that malicious websites employ to take control of your computers’ clipboard and change its content to something harmful without your knowledge.

Why is Pastejacking harmful?

Suppose you are copy pasting from a website to Microsoft Word. When you press CTRL+C or CTRL+V, the website places few commands on your clipboard that can create and execute harmful macros.

Worse is when you are pasting content directly to a console like PowerShell or Command Prompt window. The Windows command prompt does not ask for confirmation in case of most commands. It asks confirmation only in case you use a DEL or FORMAT command. For commands like RENAME etc., it will not ask for confirmation.

Mac users have some security if they are using iTerm. It is an emulation that allows Mac users to replace the default console. When using iTerm, it asks the users if they really wish to paste something containing “newline” character. Users can then select “Yes” or “No” depending on what they are doing.

The Newline character is actually half the Enter key. The Enter key is depicted, generally by an arrow that seems to be originating fro an upper line to lower line and then to left. The Enter key is a combination of Newline (change to next line) and Return (read “carriage return to leftmost position x,0” as in typewriters) character. When you press the Enter key, any command on that console line is executed. It is dependent upon the console to ask for confirmation.

In any case, if the website places commands on your clipboard with the Enter key (/n/r where /n is newline and /r is carriage return), the console or any programmable application directly runs the command(s). If these commands are harmful, they can create havoc on your machine and network.

How to avoid Pastejacking...

Windows users need to check what is placed into your computers’ clipboard. To do this, first, paste the contents into the Notepad. It pastes clipboard as text only and lets you see what is there in the clipboard. If you see what you copied, you can go ahead and paste it wherever you want. It means an additional step but is better than getting Pastejacked. Remember that using Word to check clipboard may be dangerous as it too is programmable using macros etc.

If you are an OS X, you can use the iTerm emulator for safety. It will prompt you in case pastejacking happens with already appended Enter set of characters.

Remember that using Word to check clipboard may be dangerous as it too is programmable using macros etc. Notepad is not programmable and hence is safe to check the contents of the clipboard. Of course, you will not see the format, fonts, and styles, etc. as the contents are pasted as plain text.

For images, though I am not sure, I think right-clicking and selecting “Save As…” is better than using the “Copy” command.

For a more technical explanation, follow this link.

Read 775 times

Media

Login to post comments

Highly Qualified And Friendly Support

We provide 24/7 service and support through a combination of online help, live operators, and our On-Call Technicians that come to your site when you need us.

Look at what we do for you!

  • Manage and maintain everything
  • Unlimited local and long distance
  • Easily add remote offices and mobile workers
  • Make moves and changes online
  • Free moves, adds, changes

Tons Of Useful Built-In Features

  • Toll Free Numbers
  • Call Forwarding
  • Call Screening
  • Caller ID
  • Voicemail to Email
  • Voicemail
  • Music-on-hold
  • Conference Calls
  • Cloud based
  • Many more features...