CEH Web Application and Injection Attacks Practice Question
During a web application test, the tester finds that the application includes user-supplied file names in include() statements. Which TWO of the following are indicators of a Remote File Inclusion (RFI) vulnerability? (Choose TWO.)
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The application includes files from http://attacker.com/shell.txt
RFI allows inclusion of remote files via HTTP/HTTPS URLs. Directory traversal with ../ is more typical of LFI. Inclusion of local files like /etc/passwd indicates LFI, not RFI.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The application includes files from http://attacker.com/shell.txt
Why this is correct
This scenario directly indicates Remote File Inclusion (RFI) because the application is fetching and executing or displaying content from an external, attacker-controlled HTTP server (http://attacker.com). RFI vulnerabilities allow an attacker to inject a remote URL into an include statement, causing the web server to download and process the specified file. This can lead to arbitrary code execution, data exfiltration, or defacement if the included file contains malicious scripts.
- ✗
The application includes files with '..' and '/' sequences
Why it's wrong here
The presence of '..' (dot-dot-slash) and '/' sequences in file inclusion paths is characteristic of a Directory Traversal vulnerability, which typically leads to Local File Inclusion (LFI). These sequences allow an attacker to navigate the server's file system to access files outside the intended web root. While LFI can sometimes be chained with other vulnerabilities to achieve remote code execution, these patterns alone do not directly demonstrate Remote File Inclusion, which specifically involves fetching files from an external server.
- ✗
The application includes /etc/passwd in the response
Why it's wrong here
Including a local system file like /etc/passwd in the application's response is a clear indicator of a Local File Inclusion (LFI) vulnerability. LFI allows an attacker to read arbitrary files present on the web server's file system. However, this action does not demonstrate Remote File Inclusion, which specifically involves the application fetching and processing files from a remote server location, not just local files.
- ✗
The application includes files with .inc extension
Why it's wrong here
The file extension, such as .inc (include), does not inherently determine whether a file inclusion vulnerability is local or remote. Many web applications use .inc or similar extensions for local configuration or template files. An application could include a local .inc file via LFI, or potentially a remote one via RFI if misconfigured. Therefore, merely observing a .inc extension provides insufficient evidence to specifically identify Remote File Inclusion.
- ✓
The application allows inclusion of files from external FTP servers
Why this is correct
Allowing the inclusion of files from external FTP servers unequivocally demonstrates Remote File Inclusion (RFI). RFI vulnerabilities are not restricted solely to HTTP or HTTPS protocols; they encompass any mechanism where the application fetches and processes content from a remote, external source. If an attacker can specify an ftp:// URL to include a malicious file, it confirms the presence of an RFI vulnerability, enabling potential arbitrary code execution or data manipulation.
Go deeper
Related to this question
About these practice questions
One of 870 original CEH practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CEH practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CEH exam.