allow Msf::Module::SiteRefence to be reported via report_vuln; report module references when creating vulns from a successful exploit
git-svn-id: file:///home/svn/framework3/trunk@8867 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
480380003c
commit
25f9458c86
|
@ -604,6 +604,9 @@ class DBManager
|
||||||
if opts[:refs]
|
if opts[:refs]
|
||||||
rids = []
|
rids = []
|
||||||
opts[:refs].each do |r|
|
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)
|
rids << find_or_create_ref(:name => r)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -725,7 +728,7 @@ class DBManager
|
||||||
end
|
end
|
||||||
|
|
||||||
def events(wspace=workspace)
|
def events(wspace=workspace)
|
||||||
wspace.events
|
wspace.events.find :all, :order => 'created_at ASC'
|
||||||
end
|
end
|
||||||
|
|
||||||
def report_event(opts = {})
|
def report_event(opts = {})
|
||||||
|
|
|
@ -314,9 +314,11 @@ class FrameworkEventSubscriber
|
||||||
# If the exploit used was multi/handler, though, we don't know what
|
# 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.
|
# it's vulnerable to, so it isn't really useful to save it.
|
||||||
if session.via_exploit and session.via_exploit != "exploit/multi/handler"
|
if session.via_exploit and session.via_exploit != "exploit/multi/handler"
|
||||||
|
mod = framework.modules.create(session.via_exploit)
|
||||||
info = {
|
info = {
|
||||||
:host => address,
|
:host => address,
|
||||||
:name => session.via_exploit,
|
:name => session.via_exploit,
|
||||||
|
:refs => mod.references,
|
||||||
:workspace => framework.db.find_workspace(session.workspace)
|
:workspace => framework.db.find_workspace(session.workspace)
|
||||||
}
|
}
|
||||||
framework.db.report_vuln(info)
|
framework.db.report_vuln(info)
|
||||||
|
|
Loading…
Reference in New Issue