Michael Horowitz |
Home => HoverOverLinks
|
February 16, 2020
Enough already. Far too many Art History majors working in the tech press keep recommending that you hover the mouse over a link to see where the link will actually lead. This is a scam. The link displayed in the bottom of the web browser window, when you hover over the link, can not be trusted. Here is proof.
This appears to be a link to a good website. When the mouse hovers over this link, it will appear that it goes to www.somegoodplace.com. Click it. I dare you :-)
The link really goes to guce.advertising.com. JavaScript is used to dynamically change the link just as it is clicked. Pretty cool, eh?
The JavaScript code that makes this possible is quite simple. To begin with, here is what a normal link looks like in HTML:
< a href="https://www.somegoodplace.com">link to good site< /a>.
Below is that same link with the added JavaScript code that makes the malicious swapping possible. The magic is in the "onclick" event.
< a onclick="this.href='https://guce.advertising.com';"
href="https://www.somegoodplace.com">link to good site< /a>.
Of course, there is no mouse with a smartphone or tablet, but the issue is there too. To see where a link goes, simply long press on the link. Here is a screen shot of what this looks like in the Chrome browser on Android 10. Interestingly, if, from this menu, you chose to open the link, the browser goes to the good destination. Likewise, copying or sharing the link copies/shares the good destination, so these are great defensive tactics. Just don't click the link.
In addition to the technology, there is also a lesson here on trust. If you ever see this advice in the future, you know not to trust the person who offered it. Even moreso, what does it say when a large organization repeats this old fallacy? It shows that no one in the organization reviews what they publish. I'm looking at you Consumer Reports.
On a related note, shortened links are also dangerous, they are just more obvious about it. Defensive suggestions for dealing with shortened links can be found in the Extra Credit section of my DefensiveComputingChecklist.com website. Don't trust this link? I don't blame you :-)
- - - - - - - - - - - - -
NOTE: The first version of this blog used a different approach. Instead of the "onclick" event, it used the "onmouseover". This approach fools the desktop version of Firefox, but does not fool Chrome or Edge. On iOS, the onmouseover approach fools both Safari and Firefox. However, on Android, it does not fool Chrome, Firefox or Brave. On Android, it only fools the DuckDuckGo browser. The "onclick" event seems to fool every browser.
| ||
@defensivecomput | TOP | Home => HoverOverLinks |
michael--at--michaelhorowitz.com | Last Updated: February 17, 2020 5PM UTC | ||
Copyright 2001-2020 |
Copyright 2001-2020 |