Made some minor adjustments to 'os' key rating in core/module.rb. See issue #72
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -22,5 +22,8 @@ beef:
|
||||
description: "This module will retrieve basic information about the host system using an unsigned Java Applet. <br/><br/>The details will include:<br/> <ul><li> - Operating system details</li><li> - Java VM details</li><li> - NIC names and IP</li><li> - Number of processors</li><li> - Amount of memory</li><li> - Screen display modes</li></ul>"
|
||||
authors: ["bcoles", "antisnatchor"]
|
||||
target:
|
||||
not_working:
|
||||
ALL:
|
||||
os: ["iPhone"]
|
||||
working: ["O", "FF", "S", "IE"]
|
||||
user_notify: ["C"]
|
||||
|
||||
@@ -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). <br><br>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"]
|
||||
|
||||
@@ -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<br><br>The protocol handler used will be: skype."
|
||||
|
||||
@@ -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.<br><br>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"]
|
||||
|
||||
Reference in New Issue
Block a user