Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

[R1] Cisco Security Manager and Prime LMS Java Deserialization Remote Code Execution

Critical

Synopsis

In late 2015, Cisco generated a long list of products that might be vulnerable to Java deserialization attacks. The list was, and still is, broken down into three categories: Under Investigation, Confirmed Affected, and Confirmed Not Affected.

Due to the severity of these vulnerabilities Tenable began investigating as well. While investigating Cisco Security Manager researchers came upon this code in SecretServiceServlet.class:

public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
{
    boolean debug = false;
    HttpSession session = request.getSession();
    String context = session.getId();
    if (debug)
    {
        System.out.println("SecretService: Context = " + context);
    }
    
    DataBlob blob = null;
    ServletInputStream sin;
    if ((sin = request.getInputStream()) != null)
    {
        try
        {
            ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(sin));
            blob = (DataBlob)ois.readObject();
        }
        catch (Exception e)
        {
            if (debug)
            {
                System.out.println("SecretService: Exception thrown deserializing data blob: " + e);
             }
        }
    }
}

This code handles HTTP POST requests to:

https://<target>/CSCOnm/servlet/com.cisco.nm.cmf.servlet.SecretServiceServlet

The above is a classic example of deserialization of untrusted data. The method loads the HTTP payload into an ObjectInputStream and executes readObject(). Because Apache Commons Collection 3.2 is on the classpath an unauthenticated remote attacker can gain execution using one of ysoserial's Commons Collections gadgets.

Interestingly, this exact same code and HTTP endpoint also exists in Cisco Prime LAN Management Solution. However, the LMS version we were analyzing had an ancient version of Commons Collections on the classpath. Making remote code execution impossible. Further investigation into LMS revealed that it exposes an RMI Registry that does have Apache Commons Collections 3.2 on the classpath. Therefore, we were able to exploit LMS by a deserialization attack through the RMI registry.

Tenable immediately informed Cisco of these vulnerabilities.

Solution

No solution exists for PMS. Cisco has elected not to patch this vulnerability.

Security Manager was patched in November, 2016

Disclosure Timeline

2016-01-18 - Issues discovered
2016-01-20 - Reported to Cisco via [email protected]
2016-01-21 - Cisco confirms receipt, CSCux34641 and CSCux34647 previously assigned, will update advisory to reflect
2016-03-15 - No fix info available in advisory...
2016-04-20 - No fix info available in advisory...
2016-05-17 - No fix info available in advisory...
2016-06-22 - No fix info available in advisory...
2016-06-22 - Ping vendor for update
2016-06-22 - Cisco replies "bug is still being worked out by engineering."
2016-08-18 - No fix info available in advisory...
2016-10-19 - Ping vendor for update
2016-10-20 - Vendor says will be fixed in MR4 (4.2(5.4), due end of Oct, 2016
2017-02-27 - Ping vendor to see if released. Advisory still not updated.
2017-02-28 - Vendor says fix still in the works, will ask engineering status and get back to us.
2017-03-31 - Ping vendor for update
2017-04-03 - Vendor says no movement, escalating internally
2017-04-11 - Vendor says they will not fix. Considerable dev effort and product hit an EoL milestone.

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Try for Free Buy Now

Try Tenable.io

FREE FOR 60 DAYS

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Sign up now.

Buy Tenable.io

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

65 assets

$2,275.00

Buy Now

Try for Free Buy Now

Try Nessus Professional Free

FREE FOR 7 DAYS

Nessus® is the most comprehensive vulnerability scanner on the market today. Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy Nessus Professional

Nessus® is the most comprehensive vulnerability scanner on the market today. Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy a multi-year license and save

Try for Free Buy Now

Try Tenable.io Web Application Scanning

FREE FOR 60 DAYS

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable.io platform. Safely scan your entire online portfolio for vulnerabilities with a high degree of accuracy without heavy manual effort or disruption to critical web applications. Sign up now.

Buy Tenable.io Web Application Scanning

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

5 FQDNs

$3,578.00

Buy Now

Try for Free Contact Sales

Try Tenable.io Container Security

FREE FOR 60 DAYS

Enjoy full access to the only container security offering integrated into a vulnerability management platform. Monitor container images for vulnerabilities, malware and policy violations. Integrate with continuous integration and continuous deployment (CI/CD) systems to support DevOps practices, strengthen security and support enterprise policy compliance.

Buy Tenable.io Container Security

Tenable.io Container Security seamlessly and securely enables DevOps processes by providing visibility into the security of container images – including vulnerabilities, malware and policy violations – through integration with the build process.

Learn More about Industrial Security

Get a Demo of Tenable.sc

Please fill out the form below with your contact information and a sales representative will contact you shortly to schedule a demo. You may also include a short comment (limited to 255 characters). Please note that fields with asterisks (*) are mandatory.