Class: Metasploit::Credential::Origin::Service

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/metasploit/credential/origin/service.rb

Overview

Origin of ‘Metasploit::Credential::Core`s that were gathered from a #service by a auxiliary or exploit module. Contrast with Session which is for `Metasploit::Credential::Core`s derived after a session is gained and a post module is run from the session to gather credentials.

Constant Summary collapse

MODULE_FULL_NAME_REGEXP =

Regular expression that matches any ‘Mdm::Module::Detail#fullname` for #module_full_name where `Mdm::Module::Detail#mtype` is the module type, e.g. `’auxiliary’‘ or `’exploit’‘, and the remainder is a valid `Mdm::Module::Detail#refname` (it does not contain a `’'‘ and is lower case alphanumeric).

/\A(?<module_type>auxiliary|evasion|exploit|payload|post)\/(?<reference_name>[\-0-9A-Z_a-z]+(?:\/[\-0-9A-Z_a-z]+)*)\Z/

Instance Attribute Summary collapse

Instance Attribute Details

#coresActiveRecord::Relation<Metasploit::Credential::Core>

Returns:



25
26
27
28
# File 'app/models/metasploit/credential/origin/service.rb', line 25

has_many :cores,
as: :origin,
class_name: 'Metasploit::Credential::Core',
dependent: :destroy

#module_full_nameString

The ‘Mdm::Module::Detail#fullname` of the auxiliary or exploit module that accessed #service.

Returns:

  • (String)

    ‘’auxiliary/<Mdm::Module::Detail#refname>‘` if an auxiliary module was used.

  • (String)

    ‘’exploit/<Mdm::Module::Detail#refname>‘` if an exploit module was used.



# File 'app/models/metasploit/credential/origin/service.rb', line 42

#serviceMdm::Service

The service from which the core credentials were gathered.

Returns:

  • (Mdm::Service)


34
35
36
# File 'app/models/metasploit/credential/origin/service.rb', line 34

belongs_to :service,
class_name: 'Mdm::Service',
inverse_of: :credential_origins