Exam CAS-004 All QuestionsBrowse all questions from this exam
Question 484

A company is rewriting a vulnerable application and adding the mprotect() system call in multiple parts of the application's code that was being leveraged by a recent exploitation tool. Which of the following should be enabled to ensure the application can leverage the new system call against similar attacks in the future?

    Correct Answer: C

    To enhance the security of the application against similar attacks in the future, enabling the NX (No-eXecute) bit is essential. The NX bit prevents execution of code from regions of memory that are marked as non-executable. The mprotect() system call can be used to change memory protection settings, and it works effectively in conjunction with the NX bit to control which parts of the memory should be executable. This combination helps in mitigating attacks that involve executing code from improper memory regions by ensuring that only designated sections can run code, hence reducing the potential attack surface.

Discussion
isaphiltrickOption: C

Enabling the NX bit ensures that the rewritten application can effectively use the mprotect() system call to manage memory execution permissions, thereby strengthening its defenses against exploitation tools that attempt to execute code from unauthorized memory regions. This approach aligns with best practices in modern application security to mitigate memory-based vulnerabilities