
EC-CouncilWeb Application Hacking and Security
Domain 2Objective 2
Command Injection WAHS Practice Questions (Page 5)
Part of the Injection Attacks domain, which makes up ~12% of our current practice bank. EC-Council does not publish an official question count, but from its 360-minute exam (~145–240 total, ~17–29 in this domain), expect 6–10 from this objective — we provide 31 practice questions to prepare you well beyond it. (estimate)
31questions here
7free pages
5concepts
Questions 21–25
- 21
What is the purpose of using output redirection in blind command injection?
Select an answer first - 22
Which secure coding practice is most effective in preventing command injection when user input must be used in a system command?
Select an answer first - 23
A company is migrating a legacy application to a modern platform. The application currently builds shell commands from user input. The security team wants to eliminate command injection while minimizing code changes. Which strategy is most effective?
Select an answer first - 24
A development team is refactoring a legacy application that uses user input to construct shell commands. The application must maintain functionality for a wide range of inputs, including filenames with spaces and special characters. The team wants to eliminate command injection while minimizing code changes. Which approach best balances security and functionality?
Select an answer first - 25
A developer is writing a web application that allows users to check the status of a server by entering an IP address. The developer uses the following code: `System.Diagnostics.Process.Start("ping " + ipAddress)`. A security review identifies a command injection vulnerability. What is the most secure way to fix this code?
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.