LFD - Local File Disclosure

Prince

[ Verified Seller ]
Staff member
Trusted Seller
Joined
11 yrs. 6 mth. 27 days
Messages
5,381
Reaction score
18,380
Age
45
Wallet
11,590$
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:

Code:
Please, Log in or Register to view codes content!


Vulnerable Code:

Code:
Please, Log in or Register to view codes content!

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

Please, Log in or Register to view URLs content!


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

Please, Log in or Register to view URLs content!


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.

Code:
Please, Log in or Register to view codes content!
 
Paid adv. expire in 2 months
CLICK to buy Advertisement !
westernunion carding Verified & Trusted WesternUnion | MoneyGram | Bank - Transferring [299$ BTC for 2000$ WU]
electronics carding Verified & Trusted Electronics Carding, Carding iPhone, Samsung Carding, MacBook Carding, Laptops Carding
Top Bottom