GCIA · Question #57
An attacker changes the address of a sub-routine in such a manner that it begins to point to the address of the malicious code. As a result, when the function has been exited, the application can be…
The correct answer is B. SmashGuard. The image depicts a stack-based return address overwrite attack where malicious code hijacks the control flow after a function returns. SmashGuard is a hardware-based countermeasure specifically designed to protect the return address on the stack from being overwritten.
Question
An attacker changes the address of a sub-routine in such a manner that it begins to point to the address of the malicious code. As a result, when the function has been exited, the application can be forced to shift to the malicious code. The image given below explains this phenomenon:
Which of the following tools can be used as a countermeasure to such an attack?
Options
- AObiwan
- BSmashGuard
- CKismet
- DAbsinthe
How the community answered
(44 responses)- A11% (5)
- B82% (36)
- C5% (2)
- D2% (1)
Why each option
The image depicts a stack-based return address overwrite attack where malicious code hijacks the control flow after a function returns. SmashGuard is a hardware-based countermeasure specifically designed to protect the return address on the stack from being overwritten.
Obiwan is a static analysis tool focused on detecting off-by-one errors in source code, not a runtime countermeasure against return address hijacking.
SmashGuard is a processor-level protection mechanism that defends against stack-smashing attacks by saving a copy of the return address in a separate hardware register and comparing it before the function returns. If the return address has been tampered with - as described in the question - execution is halted before control transfers to malicious code. This directly counters the return address overwrite technique shown.
Kismet is a wireless network intrusion detection and packet sniffing tool with no relevance to stack-based memory protection.
Absinthe is an automated SQL injection exploitation tool used offensively against databases, not a memory protection countermeasure.
Concept tested: Stack smashing protection and return address defense
Source: https://csrc.nist.gov/publications/detail/sp/800-123/final
Topics
Community Discussion
No community discussion yet for this question.