Class: Mdm::ExploitAttempt

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

Overview

An attempt to exploit #host.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attempted_atDateTime

When the attempt was made.

Returns:

  • (DateTime)


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

#exploitedtrue, false

Whether the attempt was successful.

Returns:

  • (true)

    attempt was successful.

  • (false)

    attempt was not successful.



# File 'app/models/mdm/exploit_attempt.rb', line 58

#fail_detailString?

A more verbose reason (compared to #fail_reason for the failure.

Returns:

  • (String, nil)


# File 'app/models/mdm/exploit_attempt.rb', line 64

#fail_reasonString?

Summary of why the attempt failed if #exploited is false. For more details see #fail_detail.

Returns:

  • (String, nil)


# File 'app/models/mdm/exploit_attempt.rb', line 69

#host_idInteger

Foreign key to look up #host.

Returns:

  • (Integer)


# File 'app/models/mdm/exploit_attempt.rb', line 74

#moduleString

TODO:

Remove deprecated Mdm::Exploit#module (MSP-9281)

The full name of the exploit module that made the attempt.

Returns:

  • (String)


# File 'app/models/mdm/exploit_attempt.rb', line 79

#portInteger

TODO:

Mdm::ExploitAttempt#port and Mdm::ExploitAttempt#proto are obsolete and should be removed (MSP-9284)

The port on #host which the exploit was attempted.

Returns:

  • (Integer)


# File 'app/models/mdm/exploit_attempt.rb', line 85

#protoString

TODO:

Mdm::ExploitAttempt#port and Mdm::ExploitAttempt#proto are obsolete and should be removed (MSP-9284)

The protocol name used on #port.

Returns:

  • (String)


# File 'app/models/mdm/exploit_attempt.rb', line 91

#usernameString

Name of user that made the attempt. May be an User#name or a system username.

Returns:

  • (String)


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

Instance Method Details

#hostMdm::Host

Host that was attempted to be exploited.

Returns:



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

belongs_to :host,
class_name: 'Mdm::Host',
counter_cache: :exploit_attempt_count,
inverse_of: :exploit_attempts

#lootMdm::Loot?

Loot gathers from the successful exploit.

Returns:



19
20
21
22
# File 'app/models/mdm/exploit_attempt.rb', line 19

belongs_to :loot,
class_name: 'Mdm::Loot',
optional: true,
inverse_of: :exploit_attempt

#serviceMdm::Service?

The service being exploited on #host.

Returns:



27
28
29
30
# File 'app/models/mdm/exploit_attempt.rb', line 27

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

#sessionMdm::Session?

The session that was established when this attempt was successful.

Returns:



36
37
38
39
# File 'app/models/mdm/exploit_attempt.rb', line 36

belongs_to :session,
class_name: 'Mdm::Session',
optional: true,
inverse_of: :exploit_attempt

#vulnMdm::Vuln?

The vulnerability that was attempted to be exploited.

Returns:



44
45
46
47
# File 'app/models/mdm/exploit_attempt.rb', line 44

belongs_to :vuln,
class_name: 'Mdm::Vuln',
optional: true,
inverse_of: :exploit_attempts