lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 21 Dec 2009 13:39:03 +0100
From: Manu <>
Subject: Data Type Conversion Attack


This test allows attackers to discover local installation paths in websites
using PHP in which the error messages hasn´t been completely blocked. The
idea is to use the http parameters to perform an explicit data type
conversion to generate a non-managed exception which shows the local
installation path on the web server.

*Local Path disclosure*

Let´s suppose a PHP code running on a web server like following:


*<?php ***

*$vuln= $_GET["var"] +1;***


As can be seen, this program receives a numeric parameter which is used to
perform a mathematical function. The normal way to call this program is
something like:

-       *<>

In order to force an implicit data type conversion the following syntax in
the calling http parameters can be used:

-       *[]=1<>

This syntax will force the PHP engine to convert the parameter into an array
structure. If the *display_errors* parameter in the *php.ini* configuration
file is enabled then an error message like the following will be showed up:

*Unsupported operand types in C:\server\htdocs\dca\dca.php on line 2*

This behavior is due to the fact that there are not an implicit transform
for adding operation in array structures. In my personal research I found
out that there are a lot of PHP functions which usually applied to http
parameters that causes the same behavior dumping the error messages as shown
giving to the attacker more information that strictly necessary.

Manuel Fernández

Security Consultor


Content of type "text/html" skipped

Full-Disclosure - We believe in it.
Hosted and sponsored by Secunia -

Powered by blists - more mailing lists