312-39 practice question 3 of 35
Which of the following attack can be eradicated by disabling of "allow_url_fopen and allow_url_include" in the php.ini file?
Choose your answer, then check it against the explanation and the full breakdown below.
Question breakdown
Key idea: Disabling allow_url_fopen and allow_url_include stops PHP from opening or including remote files, which mitigates remote file inclusion (file injection) attacks.
How to reach the answer
- The clue is the two php.ini directives, both of which govern how PHP treats URLs as files.
- allow_url_include lets include and require pull in remote code, which is the core of remote file inclusion.
- Turning both off prevents attacker-supplied URLs from being loaded as executable files.
- LDAP and command injection are unrelated to file-opening settings, and 'URL injection' is not the category these directives address.
Each option
Common trap: The 'url' in the directive names tempts candidates to choose URL Injection Attacks.
In practice: PHP hardening baselines set allow_url_include=Off, and often allow_url_fopen=Off, to block remote file inclusion web shells. Analysts check for these settings after RFI alerts.
Remember: allow_url_fopen and allow_url_include settings relate to file inclusion/injection attacks.
Drafted with AI assistance and checked against the answer key.
Keep practicing
Take the free 312-39 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 312-39 practice questions
- Question 1What type of event is recorded when an application driver loads successfully in Windows?
- Question 2Wesley is an incident handler in a company named Maddison Tech. One day, he was learning …
- Question 4Which of the following technique protects from flooding attacks originated from the valid…
- Question 5John, SOC analyst wants to monitor the attempt of process creation activities from any of…
- Question 6Mike is an incident handler for PNP Infosystems Inc. One day, there was a ticket raised r…
- Question 7Which of the following is a set of standard guidelines for ongoing development, enhanceme…
