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 49

#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 54

#fail_detailString?

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

Returns:

  • (String, nil)


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

#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 65

#host_idInteger

Foreign key to look up #host.

Returns:

  • (Integer)


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

#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 75

#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 81

#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 87

#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 93

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
# File 'app/models/mdm/exploit_attempt.rb', line 19

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

#serviceMdm::Service?

The service being exploited on #host.

Returns:



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

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

#sessionMdm::Session?

The session that was established when this attempt was successful.

Returns:



34
35
36
# File 'app/models/mdm/exploit_attempt.rb', line 34

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

#vulnMdm::Vuln?

The vulnerability that was attempted to be exploited.

Returns:



41
42
43
# File 'app/models/mdm/exploit_attempt.rb', line 41

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