Skip to content

Commit 9e912a2

Browse files
committed
Merge branch 'rapid7' into FireFart-msftidy_aux_1
2 parents 8cada44 + b190342 commit 9e912a2

File tree

13 files changed

+606
-94
lines changed

13 files changed

+606
-94
lines changed

COPYING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (C) 2006-2012, Rapid7 Inc.
1+
Copyright (C) 2006-2013, Rapid7 Inc.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

THIRD-PARTY.md

Lines changed: 384 additions & 2 deletions
Large diffs are not rendered by default.

lib/msf/core/db.rb

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,13 @@ def report_session(opts)
675675
if sess_data[:desc]
676676
sess_data[:desc] = sess_data[:desc][0,255]
677677
end
678+
679+
# In the case of multi handler we cannot yet determine the true
680+
# exploit responsible. But we can at least show the parent versus
681+
# just the generic handler:
682+
if session.via_exploit == "exploit/multi/handler"
683+
sess_data[:via_exploit] = sess_data[:datastore]['ParentModule']
684+
end
678685

679686
s = ::Mdm::Session.new(sess_data)
680687
s.save!
@@ -684,19 +691,26 @@ def report_session(opts)
684691
end
685692

686693
# If this is a live session, we know the host is vulnerable to something.
687-
# If the exploit used was multi/handler, though, we don't know what
688-
# it's vulnerable to, so it isn't really useful to save it.
689-
if opts[:session] and session.via_exploit and session.via_exploit != "exploit/multi/handler"
694+
if opts[:session] and session.via_exploit
690695
return unless host
691696

692697
mod = framework.modules.create(session.via_exploit)
698+
699+
if session.via_exploit == "exploit/multi/handler"
700+
mod_fullname = sess_data[:datastore]['ParentModule']
701+
mod_name = ::Mdm::ModuleDetail.find_by_fullname(mod_fullname).name
702+
else
703+
mod_name = mod.name
704+
mod_fullname = mod.fullname
705+
end
706+
693707
vuln_info = {
694708
:host => host.address,
695-
:name => mod.name,
709+
:name => mod_name,
696710
:refs => mod.references,
697711
:workspace => wspace,
698712
:exploited_at => Time.now.utc,
699-
:info => "Exploited by #{mod.fullname} to create Session #{s.id}"
713+
:info => "Exploited by #{mod_fullname} to create Session #{s.id}"
700714
}
701715

702716
port = session.exploit_datastore["RPORT"]
@@ -706,10 +720,15 @@ def report_session(opts)
706720

707721
vuln = framework.db.report_vuln(vuln_info)
708722

723+
if session.via_exploit == "exploit/multi/handler"
724+
via_exploit = sess_data[:datastore]['ParentModule']
725+
else
726+
via_exploit = session.via_exploit
727+
end
709728
attempt_info = {
710729
:timestamp => Time.now.utc,
711730
:workspace => wspace,
712-
:module => session.via_exploit,
731+
:module => via_exploit,
713732
:username => session.username,
714733
:refs => mod.references,
715734
:session_id => s.id,

modules/auxiliary/scanner/http/wordpress_login_enum.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,7 @@ def do_enum(user=nil)
138138
:sname => (ssl ? 'https' : 'http'),
139139
:user => user,
140140
:port => rport,
141-
:proof => "WEBAPP=\"Wordpress\", VHOST=#{vhost}",
142-
141+
:proof => "WEBAPP=\"Wordpress\", VHOST=#{vhost}"
143142
)
144143

145144
@users_found[user] = :reported

modules/auxiliary/scanner/sap/sap_router_info_request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def initialize
3030
'Chris John Riley', # Testing
3131
'Ian de Villiers', # Testing
3232
'Joris van de Vis' # Testing
33-
],
33+
],
3434
'License' => BSD_LICENSE
3535
)
3636
register_options(

0 commit comments

Comments
 (0)