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
Additional References
https://bst.cloudapps.cisco.com/bugsearch/bug/CSCux34647https://www.cisco.com/c/en/us/products/collateral/cloud-systems-management/prime-lan-management-solution/eos-eol-notice-c51-738592.html
https://bst.cloudapps.cisco.com/bugsearch/bug/CSCux34671
Disclosure Timeline
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]