Find out whether a target website is vulnerable to Reverse Tabnabbing executing 7 lines of code
Here is how you can detect whether a website is vulnerable to Reverse Tabnabbing:
- Navigate to the target website that you want to scan
- Open the DevTools and select the Console tab
- 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:
- Target website: https://github.com/apache/cordova-android
- Vulnerable anchor:
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.