such as passing user input to an operating system command interpreter, are
avoided altogether.
This approach cannot be applied to every kind of task that web applications
need to perform, but where it is available it is an effective general approach to
handling potentially malicious input.
Semantic Checks
The defenses described so far all address the need to defend the application
against various kinds of malformed data whose content has been crafted to
interfere with the application’s processing. However, with some vulnerabili-
ties the input supplied by the attacker is identical to the input that an ordinary,
non-malicious user may submit. What makes it malicious is the different cir-
cumstances in which it is submitted. For example, an attacker might seek to
gain access to another user’s bank account by changing an account number
transmitted in a hidden form field. No amount of syntactic validation will dis-
tinguish between the user’s data and the attacker’s. To prevent unauthorized
access, the application needs to validate that the account number submitted
belongs to the user who has submitted it.
Do'stlaringiz bilan baham: