Class: Mdm::Loot

Inherits:
ApplicationRecord
  • Object
show all
Defined in:
app/models/mdm/loot.rb

Overview

Loot gathered from #host or #service such as files to prove you were on the system or to crack later to gain sessions on other machines in the network.

Constant Summary collapse

RELATIVE_SEARCH_FIELDS =

CONSTANTS

[
    'ltype',
    'name',
    'info',
    'data'
]

Instance Attribute Summary collapse

Instance Attribute Details

#content_type ⇒ String

The mime/content type of the file at #path. Used to server the file correctly so browsers understand whether to render or download the file.

Returns:

  • (String)


# File 'app/models/mdm/loot.rb', line 76

#created_at ⇒ DateTime

When the loot was created.

Returns:

  • (DateTime)


# File 'app/models/mdm/loot.rb', line 82

#data ⇒ String

Loot data not stored in file at #path.

Returns:

  • (String)


# File 'app/models/mdm/loot.rb', line 87

#exploit_attempt ⇒ Mdm::ExploitAttempt

Exploit attempt where this loot was gathered.

Returns:



24
25
26
# File 'app/models/mdm/loot.rb', line 24

has_one :exploit_attempt,
class_name: 'Mdm::ExploitAttempt',
inverse_of: :loot

#host ⇒ Mdm::Host

The host from which the loot was gathered.

Returns:



32
33
34
35
# File 'app/models/mdm/loot.rb', line 32

belongs_to :host,
class_name: 'Mdm::Host',
optional: true, # allow for manually stored loot
inverse_of: :loots

#info ⇒ String

Information about the loot.

Returns:

  • (String)


# File 'app/models/mdm/loot.rb', line 97

#ltype ⇒ String

The type of loot

Returns:

  • (String)


# File 'app/models/mdm/loot.rb', line 92

#module_run ⇒ MetasploitDataModels::ModuleRun

The run of Metasploit content that acquired the loot



41
42
43
44
45
# File 'app/models/mdm/loot.rb', line 41

belongs_to :module_run,
class_name: 'MetasploitDataModels::ModuleRun',
foreign_key: :module_run_id,
optional: true, # allow for manually stored loot?
inverse_of: :loots

#name ⇒ String

The name of the loot.

Returns:

  • (String)


# File 'app/models/mdm/loot.rb', line 102

#path ⇒ String

The on-disk path to the loot file.

Returns:

  • (String)


# File 'app/models/mdm/loot.rb', line 107

#service ⇒ Mdm::Service

The service running on the #host from which the loot was gathered.

Returns:



51
52
53
54
# File 'app/models/mdm/loot.rb', line 51

belongs_to :service,
class_name: 'Mdm::Service',
optional: true,
inverse_of: :loots

#updated_at ⇒ DateTime

The last time the loot was updated.

Returns:

  • (DateTime)


# File 'app/models/mdm/loot.rb', line 112

#vuln_attempt ⇒ Mdm::VulnAttempt

Vuln attempt that gathered this loot.

Returns:



60
61
62
# File 'app/models/mdm/loot.rb', line 60

has_one :vuln_attempt,
class_name: 'Mdm::VulnAttempt',
inverse_of: :loot

#workspace ⇒ Mdm::Workspace

The workspace in which the loot is stored and the #host exists.

Returns:



68
69
70
# File 'app/models/mdm/loot.rb', line 68

belongs_to :workspace,
class_name: 'Mdm::Workspace',
inverse_of: :loots