QuestionQ137

Web Application Injection Attacks

Which of the following functions can serve as a countermeasure against a Shell Injection attack?

Each correct answer is a complete solution.

Choose two
  • A escapeshellarg()
  • B mysql_real_escape_string()
  • C regenerateid()
  • D escapeshellcmd()
Explanation

escapeshellarg() escapes user-controlled data used as an individual shell argument, while escapeshellcmd() escapes shell metacharacters in a command string. Both help prevent input from altering the commands executed by shell functions.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!