Add metadata place holders for reliability/side-effects/stability

GSoC/Meterpreter_Web_Console
Wei Chen 2018-09-26 17:42:54 -05:00
parent 2eb675ea95
commit 04ff0931d7
7 changed files with 104 additions and 0 deletions

View File

@ -49,6 +49,49 @@ RankingName =
ExcellentRanking => "excellent"
}
#
# Stability traits
#
# Module does not crash the service
CRASH_SAFE = 'crash-safe'
# Module crashes service, but service restarts.
CRASH_SERVICE_RESTARTS = 'crash-service-restarts'
# Module crashes service, and service remains down.
CRASH_SERVICE_DEAD = 'crash-service-dead'
# Module crashes the OS, but OS restarts.
CRASH_OS_RESTARTS = 'crash-os-restarts'
# Module crashes the OS, and OS remains down.
CRASH_OS_DEAD = 'crash-os-dead'
# Module causes a resource (such as a file or data in database) to be unavailable for the service.
SERVICE_RESOURCE_LOSS = 'service-resource-loss'
# Modules causes a resource (such as a file) to be unavailable for the OS.
OS_RESOURCE_LOSS = 'os-resource-loss'
#
# Side-effect traits
#
# Modules leaves payload or a dropper on the target machine
PAYLOAD_ON_DISK = 'payload-on-disk'
# Module modifies some config file on the target machine
CONFIG_CHANGES = 'config-changes'
# Module leaves attack traces in a log file (Example: SQL injection data found in HTTP log)
MALICIOUS_INPUT_IN_LOG = 'malicious-input-in-log'
# Module may cause account lockouts (likely due to brute-forcing)
LOCKOUTS = 'lockouts'
# Module may show something on the screen (Example: a window pops up)
SCREEN_EFFECTS = 'screen-effects'
#
# Reliability
#
# The module is expected to work at first attempt
FIRST_ATTEMPT_SUCCESS = 'first-attempt-success'
# The module is expected to get a shell every time it fires
REPEATABLE = 'repeatable'
module HttpClients
IE = "MSIE"
FF = "Firefox"

View File

@ -39,6 +39,9 @@ class Module
autoload :Type, 'msf/core/module/type'
autoload :UI, 'msf/core/module/ui'
autoload :UUID, 'msf/core/module/uuid'
autoload :SideEffects, 'msf/core/module/side_effects'
autoload :Stability, 'msf/core/module/stability'
autoload :Reliability, 'msf/core/module/reliability'
include Msf::Module::Arch
include Msf::Module::Auth
@ -56,6 +59,9 @@ class Module
include Msf::Module::Type
include Msf::Module::UI
include Msf::Module::UUID
include Msf::Module::SideEffects
include Msf::Module::Stability
include Msf::Module::Reliability
# The key where a comma-separated list of Ruby module names will live in the
# datastore, consumed by #replicant to allow clean override of MSF module methods.

View File

@ -0,0 +1,14 @@
module Msf::Module::Reliability
extend ActiveSupport::Concern
module ClassMethods
def reliability
instance = self.new
instance.notes['Reliability'] ? instance.notes['Reliability'] : []
end
end
def reliability
self.class.reliability
end
end

View File

@ -0,0 +1,15 @@
module Msf::Module::SideEffects
extend ActiveSupport::Concern
module ClassMethods
def side_effects
instance = self.new
instance.notes['SideEffects'] ? instance.notes['SideEffects'] : []
end
end
def side_effects
self.class.side_effects
end
end

View File

@ -0,0 +1,15 @@
module Msf::Module::Stability
extend ActiveSupport::Concern
module ClassMethods
def stability
instance = self.new
instance.notes['Stability'] ? instance.notes['Stability'] : []
end
end
def stability
self.class.stability
end
end

View File

@ -51,6 +51,12 @@ class Obj
attr_reader :default_credential
# @return [Hash]
attr_reader :notes
# @return [Hash]
attr_reader :side_effects
# @return [Hash]
attr_reader :stability
# @return [Hash]
attr_reader :reliability
def initialize(module_instance, obj_hash = nil)
unless obj_hash.nil?

View File

@ -25,6 +25,11 @@ class MetasploitModule < Msf::Auxiliary
[ 'OSVDB', '49068' ],
[ 'URL', 'http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=745' ],
],
'Notes' =>
{
'Reliability' => [ FIRST_ATTEMPT_SUCCESS, REPEATABLE],
'SideEffects' => [ FILE_ON_DISK, TRACES_IN_LOGS]
},
'DisclosureDate' => 'Oct 14 2008'))
register_options(