Part 1 - LFI & RFI
Video Activity
This lesson offers a brief introduction into Local File Inclusion (LFI) and Remote File Inclusion (RFI) and will cover the following: 1. What is LFI 2. What does LFI look like? 3. Why is LFI dangerous? 4. What is RFI? 5. What does RFI look like and why is it dangerous?
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or
Already have an account? Sign In »

Video Description
This lesson offers a brief introduction into Local File Inclusion (LFI) and Remote File Inclusion (RFI) and will cover the following: 1. What is LFI 2. What does LFI look like? 3. Why is LFI dangerous? 4. What is RFI? 5. What does RFI look like and why is it dangerous?
Video Transcription
00:03
>> Welcome to Cybrary.
00:03
>> I am Raymond Evans,
00:03
>> and I will be your subject matter expert
00:03
>> for Cybrary's web app penetration testing course.
00:03
>> In this video, we will be discussing LFI and RFI
00:03
>> or remote file inclusion and local file inclusion.
00:03
>> Is what will be covered.
00:03
We're going to talk about what is local file inclusion.
00:03
What does local file inclusion look like?
00:03
Why is it dangerous?
00:03
We're going to also look at
00:03
>> what is remote file inclusion.
00:03
>> What does remote file inclusion
00:03
>> look like and why that's dangerous.
00:03
>> What is LFI or local file inclusion?
00:03
Well, local file inclusion is a process
00:03
>> of including files on a server through a browser.
00:03
>> Simple terms, allows you to view files
00:03
>> on a server and in some cases execute commands.
00:03
>> This can be used to traverse systems
00:03
>> and gain access to files that should
00:03
>> normally not be accessible.
00:03
>> Basically, what this does is it allows
00:03
>> individuals to look through your system
00:03
>> and rifle through your files,
00:03
you would never know that they are there.
00:03
It is easily executed and is very hard
00:03
>> to detect unless you have something
00:03
>> like a IDS or IPS intrusion detection
00:03
>> or intrusion prevention system with
00:03
a signature written to identify this in the packets.
00:03
What exactly does it look like?
00:03
Well, from the example here we see
00:03
example.com/preview.php?file=../../../../etc/password.
00:03
What this is doing is,
00:03
>> it's looking for a specific file type.
00:03
>> The way that this was written,
00:03
this code on this webpage is,
00:03
it calls to the system and says,
00:03
hey, open up this file.
00:03
Not the best thing to do exactly.
00:03
If you're trying to find file equals
00:03
home.html for the homepage,
00:03
well, the way that's structured,
00:03
it also allows anybody to put
00:03
the directory for whatever file that
00:03
>> they want to look at and in this directory here,
00:03
>> it's looking at the ETC password file
00:03
and it's able to get that information there.
00:03
Why is local file inclusion dangerous exactly?
00:03
Well, local file inclusion,
00:03
as I said before, it can be used
00:03
>> to be able to access files.
00:03
>> If you have the ability to access files as a root user,
00:03
this opens the door to sensitive files.
00:03
Things like the ETC shadow file,
00:03
which can be used to get password hashes
00:03
>> and could be correct if the passwords
00:03
>> are weak enough.
00:03
>> You could also enumerate the SSH authorized keys,
00:03
which could be used to gain access
00:03
>> to a systems via SSH.
00:03
>> You could also look at
00:03
the Linux network configuration files
00:03
to gain more info about the internal networks.
Up Next
Instructed By
Similar Content