Concept - SQLi Countermeasures

LayerWhat it does (s.20)
Defensive codingstronger data validation; insufficient input validation leads to SQLi; e.g. check that numeric inputs contain only digits
Detection: signature basedmatch specific attack patterns
Detection: anomaly baseddefine normal behaviour, detect abnormal ones
Detection: code analysisgenerate a wide range of SQLi attacks and assess the system’s response
Runtime preventioncheck queries at runtime against a model of expected queries

Related: Concept - SQL Injection, Concept - SQLi Categories. Appears in 05 Database Security - Chunk 01 (s.1-38).