Class: Mdm::Session
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Mdm::Session
- Defined in:
- app/models/mdm/session.rb
Overview
Instance Attribute Summary collapse
-
#close_reason ⇒ String
Why the session was closed.
-
#closed_at ⇒ DateTime
When the session was closed on #host.
-
#datastore ⇒ Hash
Options for exploit and #via_payload modules.
-
#desc ⇒ String
Description of session.
-
#events ⇒ Array<Mdm::Event>
Events that occurred when this session was open.
-
#host ⇒ Mdm::Host
Host on which this session was opened.
-
#last_seen ⇒ DateTime
The last time the session was checked to see that it was still open.
-
#local_id ⇒ Integer
The ID number of the in-memory session.
-
#opened_at ⇒ DateTime
When the session was opened on #host.
-
#platform ⇒ String
The #host platform.
-
#port ⇒ Integer
The remote port on which this session is running on #host.
-
#routes ⇒ Array<Mdm::Route>
Routes tunneled throug this session.
-
#stype ⇒ String
The type of the session.
-
#via_exploit ⇒ String
The full name of the exploit module that opened this session.
-
#via_payload ⇒ String
The full name if the payload module that's running this session.
-
#workspace ⇒ Mdm::Workspace
readonly
The workspace in which this session exists.
Instance Method Summary collapse
-
#upgradeable? ⇒ true, false
Returns whether the session can be upgraded to a meterpreter session from a shell session on Windows.
Instance Attribute Details
#close_reason ⇒ String
Why the session was closed. Used to differentiate between user killing it local and the session being killed on the remote end.
|
|
# File 'app/models/mdm/session.rb', line 45
|
#closed_at ⇒ DateTime
When the session was closed on #host.
|
|
# File 'app/models/mdm/session.rb', line 40
|
#datastore ⇒ Hash
Options for exploit and #via_payload modules.
|
|
# File 'app/models/mdm/session.rb', line 51
|
#desc ⇒ String
Description of session.
|
|
# File 'app/models/mdm/session.rb', line 56
|
#events ⇒ Array<Mdm::Event>
Events that occurred when this session was open.
12 |
# File 'app/models/mdm/session.rb', line 12 has_many :events, :class_name => 'Mdm::SessionEvent', :order => 'created_at', :dependent => :delete_all |
#host ⇒ Mdm::Host
Host on which this session was opened.
18 |
# File 'app/models/mdm/session.rb', line 18 belongs_to :host, :class_name => 'Mdm::Host' |
#last_seen ⇒ DateTime
The last time the session was checked to see that it was still open.
|
|
# File 'app/models/mdm/session.rb', line 61
|
#local_id ⇒ Integer
The ID number of the in-memory session.
|
|
# File 'app/models/mdm/session.rb', line 66
|
#opened_at ⇒ DateTime
When the session was opened on #host.
|
|
# File 'app/models/mdm/session.rb', line 71
|
#port ⇒ Integer
The remote port on which this session is running on #host.
|
|
# File 'app/models/mdm/session.rb', line 81
|
#routes ⇒ Array<Mdm::Route>
Routes tunneled throug this session.
24 |
# File 'app/models/mdm/session.rb', line 24 has_many :routes, :class_name => 'Mdm::Route', :dependent => :delete_all |
#stype ⇒ String
The type of the session.
|
|
# File 'app/models/mdm/session.rb', line 86
|
#via_exploit ⇒ String
The full name of the exploit module that opened this session.
|
|
# File 'app/models/mdm/session.rb', line 91
|
#via_payload ⇒ String
The full name if the payload module that's running this session.
|
|
# File 'app/models/mdm/session.rb', line 96
|
#workspace ⇒ Mdm::Workspace (readonly)
The workspace in which this session exists.
34 |
# File 'app/models/mdm/session.rb', line 34 has_one :workspace, :through => :host, :class_name => 'Mdm::Workspace' |
Instance Method Details
#upgradeable? ⇒ true, false
Returns whether the session can be upgraded to a meterpreter session from a shell session on Windows.
125 126 127 |
# File 'app/models/mdm/session.rb', line 125 def upgradeable? (self.platform =~ /win/ and self.stype == 'shell') end |