RFI and LFI

The most famous among the bug hunters and in bounty programs is RFI and LFI vulnerabilities. They both root from file inclusion vulnerabilities. Simple one liner - When the file from a remote location is included, then its RFI(Remote file inclusion). If the file is from the local directory, then it is LFI(Local file inclusion) In description: Consider your web application is referencing a file in the form of a url to a remote location. This reference is trying to fetch a .png or .php or .js. When an attacker changes this file, the behaviour of the web application changes. The impact of this can vary based on the file that got included. The least can be simply a change in the way a page looks. When the file included executes a piece of code is when the consequences get worse. The file can be malicious which escalates privileges of a certain user and performs an irreversible action. File inclusions are easy to mitigate to a large extent using simple input validations and s...