diff --git a/lib/msf/core/framework.rb b/lib/msf/core/framework.rb index afb806f0c6..f7d17c75ac 100644 --- a/lib/msf/core/framework.rb +++ b/lib/msf/core/framework.rb @@ -212,6 +212,7 @@ class FrameworkEventSubscriber :username => instance.owner, :info => { :module_name => instance.fullname, + :module_uuid => instance.uuid }.merge(opts) } @@ -286,7 +287,8 @@ class FrameworkEventSubscriber :target_host => session.target_host, :via_exploit => session.via_exploit, :via_payload => session.via_payload, - :tunnel_peer => session.tunnel_peer + :tunnel_peer => session.tunnel_peer, + :exploit_uuid => session.exploit_uuid }.merge(opts) } report_event(event) diff --git a/lib/msf/core/module.rb b/lib/msf/core/module.rb index eb91d083b8..85574847a7 100644 --- a/lib/msf/core/module.rb +++ b/lib/msf/core/module.rb @@ -109,6 +109,7 @@ class Module # def initialize(info = {}) self.module_info = info + self.uuid = Rex::Text.rand_text_alphanumeric(8).downcase set_defaults @@ -605,6 +606,11 @@ class Module # attr_accessor :error + # + # A unique identifier for this module instance + # + attr_accessor :uuid + protected # diff --git a/lib/msf/core/session.rb b/lib/msf/core/session.rb index 3d933cf3e9..c8ea5ee903 100644 --- a/lib/msf/core/session.rb +++ b/lib/msf/core/session.rb @@ -78,7 +78,7 @@ module Session def initialize self.alive = true - self.uuid = Rex::Text.rand_text_alphanumeric(32).downcase + self.uuid = Rex::Text.rand_text_alphanumeric(8).downcase end # Direct descendents @@ -217,6 +217,7 @@ module Session self.exploit_datastore = m.datastore self.user_input = m.user_input if m.user_input self.user_output = m.user_output if m.user_output + self.exploit_uuid = m.uuid end # @@ -298,6 +299,10 @@ module Session # attr_accessor :uuid # + # The unique identifier of exploit that created this session + # + attr_accessor :exploit_uuid + # # The associated username # attr_accessor :username