Find out whether a target website is vulnerable to Reverse Tabnabbing executing 7 lines of code

in #security5 years ago (edited)

Here is how you can detect whether a website is vulnerable to Reverse Tabnabbing:

  1. Navigate to the target website that you want to scan
  2. Open the DevTools and select the Console tab
  3. Paste the following JavaScript code into the console and press enter
var anchors = document.querySelectorAll('a[target="_blank"]');
anchors.forEach(anchor => {
  if (anchor.rel.indexOf('noreferrer') === -1 && anchor.rel.indexOf('noopener') === -1) {
    console.log('>>> Found anchor vulnerable to Reverse Tabnabbing: ', anchor);
    anchor.style.border = '2px solid red';
  }
});



Outcome:

All the vulnerable links in the page will be printed out in the console and will also be highlighted in red on the webpage.

Enjoy! =]




Example:

Screen Shot 2019-04-02 at 12.28.41 AM.png

Sort:  

Well it seems like the new wallet link is subject to reverse tabnabbing then =]

Not a big concern though since if the wallet domain is compromised that's quite a bigger issue than being able to redirect steemit.com to a phishing page! =]

Yep but now they introduced the blog button on steemitwallet.com and it has the same vulnerability. If steemit.com gets compromised the attacker can steal the master key redirecting steemitwallet.com to a phishing page.
FYI @guiltyparties

This post is supported by $0.17 @tipU upvote funded by @marcocasario :)
@tipU voting service instant upvotes | For investors.

Coin Marketplace

STEEM 0.18
TRX 0.15
JST 0.031
BTC 60696.93
ETH 2638.02
USDT 1.00
SBD 2.61