diff --git a/core/module.rb b/core/module.rb index b79db349a..b8f111f76 100644 --- a/core/module.rb +++ b/core/module.rb @@ -208,10 +208,13 @@ module BeEF case v when String if opts['browser'] == v + # if k == BeEF::Core::Constants::CommandModule::VERIFIED_NOT_WORKING + # rating += 1 + # end results << {'rating' => 2, 'const' => k} end when Hash - if opts['browser'] == v.keys.first + if opts['browser'] == v.keys.first or v.keys.first == BeEF::Core::Constants::Browsers::ALL subv = v[v.keys.first] rating = 1 #version check @@ -241,14 +244,15 @@ module BeEF rating += 1 match = true elsif subv['os'] == BeEF::Core::Constants::Os::OS_ALL_UA_STR - rating += 1 match = true end when Array subv['os'].each{|p| - if o == p or p == BeEF::Core::Constants::Os::OS_ALL_UA_STR + if o == p rating += 1 match = true + elsif p == BeEF::Core::Constants::Os::OS_ALL_UA_STR + match = true end } end @@ -257,18 +261,35 @@ module BeEF break end end - if rating != 1 + if rating > 0 + # if k == BeEF::Core::Constants::CommandModule::VERIFIED_NOT_WORKING + # rating += 1 + # end results << {'rating' => rating, 'const' => k} end end end if v == BeEF::Core::Constants::Browsers::ALL - results << {'rating' => 1, 'const' => k} + rating = 1 + if k == BeEF::Core::Constants::CommandModule::VERIFIED_NOT_WORKING + rating = 1 + end + results << {'rating' => rating, 'const' => k} end } } if results.count > 0 - return results.sort_by {|v| v['rating']}.last['const'] + result = {} + results.each {|r| + if result == {} + result = {'rating' => r['rating'], 'const' => r['const']} + else + if r['rating'] > result['rating'] + result = {'rating' => r['rating'], 'const' => r['const']} + end + end + } + return result['const'] else return BeEF::Core::Constants::CommandModule::VERIFIED_UNKNOWN end diff --git a/modules/host/detect_cups/config.yaml b/modules/host/detect_cups/config.yaml index b335c7987..9b14c62f1 100644 --- a/modules/host/detect_cups/config.yaml +++ b/modules/host/detect_cups/config.yaml @@ -22,4 +22,9 @@ beef: description: "This module attempts to detect Common UNIX Printing System (CUPS) on localhost on the default port 631." authors: ["bcoles"] target: - working: ["ALL"] + working: + ALL: + os: ["Linux"] + not_working: + ALL: + os: ["All"] diff --git a/modules/host/detect_google_desktop/config.yaml b/modules/host/detect_google_desktop/config.yaml index 9f364d2e6..4a0d23f18 100644 --- a/modules/host/detect_google_desktop/config.yaml +++ b/modules/host/detect_google_desktop/config.yaml @@ -22,4 +22,7 @@ beef: description: "This module attempts to detect Google Desktop running on the default port 4664." authors: ["bcoles"] target: + not_working: + ALL: + os: ["iPhone"] working: ["ALL"] diff --git a/modules/host/get_system_info/config.yaml b/modules/host/get_system_info/config.yaml index 765749e17..f30448272 100644 --- a/modules/host/get_system_info/config.yaml +++ b/modules/host/get_system_info/config.yaml @@ -22,5 +22,8 @@ beef: description: "This module will retrieve basic information about the host system using an unsigned Java Applet.

The details will include:
" authors: ["bcoles", "antisnatchor"] target: + not_working: + ALL: + os: ["iPhone"] working: ["O", "FF", "S", "IE"] user_notify: ["C"] diff --git a/modules/host/hook_default_browser/config.yaml b/modules/host/hook_default_browser/config.yaml index 8047b18a0..0033717ba 100644 --- a/modules/host/hook_default_browser/config.yaml +++ b/modules/host/hook_default_browser/config.yaml @@ -22,5 +22,8 @@ beef: description: "This module will use a PDF to attempt to hook the default browser (assuming it isn't currently hooked).

Normally, this will be IE but it will also work when Chrome is set to the default. When executed, the hooked browser will load a PDF and use that to start the default browser. If successful another browser will appear in the browser tree." authors: ["saafan"] target: + not_working: + ALL: + os: ["iPhone"] working: ["All"] user_notify: ["FF", "C"] diff --git a/modules/host/insecure_url_skype/config.yaml b/modules/host/insecure_url_skype/config.yaml index 190d2cc17..cb35a4c23 100644 --- a/modules/host/insecure_url_skype/config.yaml +++ b/modules/host/insecure_url_skype/config.yaml @@ -16,7 +16,7 @@ beef: module: insecure_url_skype: - enable: true + enable: false category: "Host" name: "Make Skype Call (Skype)" description: "This module will force the browser to attempt a skype call. It will exploit the insecure handling of URL schemes

The protocol handler used will be: skype." diff --git a/modules/host/iphone_tel/config.yaml b/modules/host/iphone_tel/config.yaml index 54a177bab..d3bb15769 100644 --- a/modules/host/iphone_tel/config.yaml +++ b/modules/host/iphone_tel/config.yaml @@ -22,4 +22,9 @@ beef: description: "This module will force the browser to attempt a telephone call in iOS. It will exploit the insecure handling of URL schemes in iOS.

The protocol handler used will be: tel" authors: ["xntrik", "Nitesh Dhanjani"] target: - user_notify: ['S'] + user_notify: + S: + os: ["iPhone"] + not_working: + ALL: + os: ["All"]