diff --git a/lib/msf/core/db.rb b/lib/msf/core/db.rb index 4cc06e741f..ba53640551 100644 --- a/lib/msf/core/db.rb +++ b/lib/msf/core/db.rb @@ -604,6 +604,9 @@ class DBManager if opts[:refs] rids = [] opts[:refs].each do |r| + if r.respond_to? :ctx_id + r = r.ctx_id + '-' + r.ctx_val + end rids << find_or_create_ref(:name => r) end end @@ -725,7 +728,7 @@ class DBManager end def events(wspace=workspace) - wspace.events + wspace.events.find :all, :order => 'created_at ASC' end def report_event(opts = {}) diff --git a/lib/msf/core/framework.rb b/lib/msf/core/framework.rb index e995c809ab..a2903f9adb 100644 --- a/lib/msf/core/framework.rb +++ b/lib/msf/core/framework.rb @@ -314,9 +314,11 @@ class FrameworkEventSubscriber # If the exploit used was multi/handler, though, we don't know what # it's vulnerable to, so it isn't really useful to save it. if session.via_exploit and session.via_exploit != "exploit/multi/handler" + mod = framework.modules.create(session.via_exploit) info = { :host => address, :name => session.via_exploit, + :refs => mod.references, :workspace => framework.db.find_workspace(session.workspace) } framework.db.report_vuln(info)