- Joined
- 11 yrs. 6 mth. 27 days
- Messages
- 5,381
- Reaction score
- 18,380
- Age
- 45
- Wallet
- 11,590$
- [email protected]
Introduction:
LFD stand for Local File Disclosure.Through LFD a
client can view source code of PHP files and read
sensitive data like backend database logins.
Dorks:
Vulnerable Code:
As you can see in above code user input is directly supplied to readfile without any filteration.
let's try to include a php file
if it's vulnerable it'll show download box for downloading file.Now open downloaded file it will contain source code.
try to search for include() or require() func now suppose we got something like
include('config.php');
we will check source for config.php
You will get database logins in that file.
if not try to look into other files.
Eliminating LFD:
we can make a different directory for all downloadable files.Make a array of all files that are allowed to download
check the user requested file against this array if file name is in array send user requested file.
LFD stand for Local File Disclosure.Through LFD a
client can view source code of PHP files and read
sensitive data like backend database logins.
Dorks:
Vulnerable Code:
As you can see in above code user input is directly supplied to readfile without any filteration.
let's try to include a php file
if it's vulnerable it'll show download box for downloading file.Now open downloaded file it will contain source code.
try to search for include() or require() func now suppose we got something like
include('config.php');
we will check source for config.php
You will get database logins in that file.
if not try to look into other files.
Eliminating LFD:
we can make a different directory for all downloadable files.Make a array of all files that are allowed to download
check the user requested file against this array if file name is in array send user requested file.