Class: Mdm::Event

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

Overview

Records framework events to the database.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#created_atDateTime

When this event was created.

Returns:

  • (DateTime)


# File 'app/models/mdm/event.rb', line 26

#criticalfalse, true

Indicates if the event is critical.

Returns:

  • (false)

    event is not critical.

  • (true)

    event is critical.



# File 'app/models/mdm/event.rb', line 31

#nameString

Name of the event, such as 'module_run'.

Returns:

  • (String)


# File 'app/models/mdm/event.rb', line 37

#seenfalse, true

Whether a user has seen these events.

Returns:

  • (false)

    if the event has not been seen.

  • (true)

    if any user has seen the event.



# File 'app/models/mdm/event.rb', line 42

#updated_atDateTime

The last time this event was updated.

Returns:

  • (DateTime)


# File 'app/models/mdm/event.rb', line 48

#usernameString

Name of user that triggered the event. Not necessarily a User#username, as #username may be set to the username of the user inferred from ENV when using metasploit-framework.

Returns:

  • (String)


# File 'app/models/mdm/event.rb', line 53

Instance Method Details

#hostMdm::Host?

Host on which this event occurred.

Returns:

  • (Mdm::Host)
  • (nil)

    if event did not occur on a host.



12
13
14
# File 'app/models/mdm/event.rb', line 12

belongs_to :host,
class_name: 'Mdm::Host',
inverse_of: :events

#infoHash

#name-specific information about this event.

Returns:

  • (Hash)


73
# File 'app/models/mdm/event.rb', line 73

serialize :info, MetasploitDataModels::Base64Serializer.new