Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
EC-Council logo

EC-CouncilWeb Application Hacking and Security

Domain 7Objective 1

Local File Inclusion (LFI) WAHS Practice Questions (Page 1)

Part of the File Inclusion and Upload Attacks domain, which makes up ~7% of our current practice bank. EC-Council does not publish an official question count, but from its 360-minute exam (~145–240 total, ~10–17 in this domain), expect 3–6 from this objective — we provide 17 practice questions to prepare you well beyond it. (estimate)

17questions here
4free pages
4concepts

Questions 1–5

  1. 1expert · hard

    A penetration tester is exploiting an LFI vulnerability in a PHP application. The application uses the following code: include('lang/' . $_GET['lang'] . '.php');. The tester wants to read the source code of the application. Which technique would be most effective?

    Select an answer first
  2. 2foundation · easy

    Which of the following is the most effective mitigation against Local File Inclusion (LFI) when a web application must include files based on user input?

    Select an answer first
  3. 3application · medium

    A tester has found an LFI in a PHP application and successfully read /etc/passwd. The tester now wants to read the application's source code to find more vulnerabilities. Which file should the tester try to read first?

    Select an answer first
  4. 4expert · hard

    A security team is hardening a PHP application that has an LFI vulnerability. The application uses include($_GET['page']);. The team has implemented an allowlist that maps user input to a fixed set of filenames. However, a penetration test still found a way to read arbitrary files. Which oversight is the most likely cause?

    Select an answer first
  5. 5application · medium

    A developer is refactoring a PHP application to eliminate LFI. The application currently uses include($_GET['page']);. The developer wants to allow only a set of predefined pages: home, about, and contact. Which code change would be the most secure and maintainable?

    Select an answer first
Finished these 5 questions?

Review the revealed explanations, or continue through the curriculum.

Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by EC-Council. “WAHS” is a trademark of its owner, used for identification only.