lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
From: lostnoobs at security-challenge.com (Nourredine Himeur)
Subject: file_exists() bypassing , critical problem ?

> > > There are various methods for securing file_exists() ...
> > If you want to secure ... so that's unsecure , is'nt it ?
>
> I didn't say that file_exists() is secure, did I?

> > >I don't think that is critical problem.
> > If it's not a problem Why you show us a methode to secure ?

> I didn't say that it is not a problem but that it is not a critical
problem.

> > I think many programmers don't know this problem exists !
> > But there is too much hypocresy in php community to admit this
> > vulnerability.

> This is not a PHP vulnerability but a PHP Script vulnerablity, and I am
sure
> that many php programmers are aware of security problems while using
> file_exists().

> > The article : http://www.zend.com/zend/art/art-oertli.php
> > don't talk about this sorry...

> What is the problem, very interesting article, old one but still very
> interesting.

file_exists() must check if the file exists and with this vulnerabilty it
don't do this.
For me this function don't work good.

re-read it :)

????????????????????????????????????????????????????????????????????????????
???

In the same directory :
test.php
-----------------------------------------------------------
<?
if(file_exists($page)){
echo("Sorry the local page is protected");
}else{
include($page);
}
?>
-----------------------------------------------------------

file.txt
-----------------------------------------------------------
Hello World
-----------------------------------------------------------

http://www.example.com/test.php?page=file.txt

Result:
Sorry the local page is protected

http://www.example.com/test.php?page=./[anything]/../file.txt
<----------------- the file exists but the function file_exists() don't show
it. so the file is include !!!!!

Result:
Hello World

The function file_exists() is bypassing just with ./[anything]/../file.txt
the function return wrong but the file exist

????????????????????????????????????????????????????????????????????????????
???

Nourredine Himeur

www.security-challenge.com


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ