Courseiva
Web Application and Injection AttacksmediumMultiple ChoiceObjective-mapped

CEH Web Application and Injection Attacks Practice Question

A penetration tester finds that a web application includes files based on user input without proper validation. The tester supplies 'http://attacker.com/malicious.txt' and the application includes its content. Which vulnerability is this?

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

Remote File Inclusion (RFI)

Including a remote file from an attacker-controlled server is Remote File Inclusion (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.

  • Directory traversal

    Why it's wrong here

    Directory traversal exploits vulnerabilities in file path handling to access files and directories stored outside the intended web root directory. It typically involves using sequences like "../" to navigate the file system. While it can read files, it doesn't "include" them in the sense of executing their content within the application's context, which is what "includes f" (likely referring to file inclusion) implies. Its primary goal is unauthorized file access, not code execution via inclusion.

  • Remote File Inclusion (RFI)

    Why this is correct

    Remote File Inclusion (RFI) occurs when a web application dynamically includes a file from a remote server, typically specified by a URL in user-controlled input. This vulnerability allows an attacker to inject and execute malicious code hosted on their own server within the context of the vulnerable web application. The application fetches the remote file (e.g., via HTTP) and processes its content as if it were a local script, leading to potential arbitrary code execution.

  • Local File Inclusion (LFI)

    Why it's wrong here

    Local File Inclusion (LFI) allows an attacker to include files that are already present on the web server's file system. This vulnerability typically arises when the application uses user-supplied input to construct a path to a local file without proper validation. While LFI can be used to read sensitive files or potentially achieve code execution by including log files or uploaded malicious files, it specifically involves local resources, not fetching content from a remote URL.

  • Server-Side Request Forgery (SSRF)

    Why it's wrong here

    Server-Side Request Forgery (SSRF) forces the server to make requests to an arbitrary domain specified by the attacker, often targeting internal network resources or services. The server acts as a proxy for the attacker's request, potentially revealing internal network topology, accessing internal APIs, or port scanning. Unlike file inclusion vulnerabilities, SSRF focuses on making outbound requests from the server, not directly including and executing file content within the application's response.

About these practice questions

This CEH question is part of Courseiva's 870-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.