Apache Ubuntu php include /etc/passwd file

375 Views Asked by At

I want to create test case about LFI (Local File Inclusion) but I couldn't. Old servers can include /etc/passwd file with php's include file

For example:

include ("/etc/passwd");

This prints passwd file to screen but when I tried it in ubuntu 16.04's default apache2 service it can not include this file it blocks somehow, it just includes files in the same directory.

I tried to edit php-mods but I could not find the solution.

How can I import /etc/passwd or /proc/self/* files.

Thanks.

0

There are 0 best solutions below