> For the complete documentation index, see [llms.txt](https://gowsundar.gitbook.io/book-of-bugbounty-tips/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gowsundar.gitbook.io/book-of-bugbounty-tips/lfi-rfi.md).

# Local / Remote File Inclusion

* [Wildcard bypass & LFI 1. Intercepted a POST req that pointed to a local file "/usr/local/redacted/filename" 2. tried "/etc/passwd" -> bad request 3. "/user/local/../../etc/passwd" -> bad request 4. "/user/local/redacted/../../../etc/passwd" -> OK 5. LFI & bounty](https://twitter.com/11xuxx/status/1252905397259767808)
* [Yay, I was awarded a $5,000 bounty on@Hacker0x01 ! https://hackerone.com/patrik #TogetherWeHitHarder Thank you so much@umr4n6 for the amazing bypass :\] /..;/..;/ can only recommend following her :) Vogel #dreamworkmakestheteamwork](https://twitter.com/ITSecurityguard/status/1242190696439853058)
* [#BugBountyTip - If you find a LFI ignore /etc/passwd and go for /var/run/secrets/kubernetes.io/serviceaccount this will raise the severity when you hand them a kubernetes token or cert.](https://twitter.com/Random_Robbie/status/1072235866582642689)
* [#BugBountyTip time: I've got a RCE by using this tip: while testing for malicious file uploads, if .php extension is blacklisted you can try .PhP , .php5 and .php3 Sometime this fools the backend and you get shell! RTs & comments are appreciated. Follow #bugbountytips #pentest](https://twitter.com/HusseiN98D/status/1220120543778787328)
* [Browser-Based application LFI file:///etc/passwd blacklisted? Use "view-source:file:///etc/passwd" "view-source" is often forgotten by developers in blacklists. #BugBounty #BugBountyTip #BugBountyTips](https://twitter.com/HusseiN98D/status/1325464364569276417)

![](/files/-M5zAC1-E-g_cwmb0_MK)

If a web application allow you to upload a .zip file, zip\:// is an interesting PHP wrapper to turn a LFI into a RCE.

{% embed url="<https://twitter.com/Yumi_Sec/status/1253620834691887105/photo/1>" %}

![https://twitter.com/j1t35h/status/1292406847496888320?s=20](/files/-MT9wZb_iWPVD7GCDkb3)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gowsundar.gitbook.io/book-of-bugbounty-tips/lfi-rfi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
