Voici 10 autres règles pour détecter et bloquer les tentatives d'injection SQL malveillantes en utilisant les méthodes POST et GET:
Règle 11:
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"SQL Injection - GET - UPDATE"; flow:to_server; content:"GET"; http_method; content:"UPDATE"; http_uri; nocase; classtype:web-application-attack; sid:11; rev:1;)
Règle 12:
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"SQL Injection - POST - UPDATE"; flow:to_server; content:"POST"; http_method; content:"UPDATE"; http_uri; nocase; classtype:web-application-attack; sid:12; rev:1;)
Règle 13:
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"SQL Injection - GET - REPLACE"; flow:to_server; content:"GET"; http_method; content:"REPLACE"; http_uri; nocase; classtype:web-application-attack; sid:13; rev:1;)
Règle 14:
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"SQL Injection - POST - REPLACE"; flow:to_server; content:"POST"; http_method; content:"REPLACE"; http_uri; nocase; classtype:web-application-attack; sid:14; rev:1;)
Règle 15:
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"SQL Injection - GET - TRUNCATE"; flow:to_server; content:"GET"; http_method; content:"TRUNCATE"; http_uri; nocase; classtype:web-application-attack; sid:15; rev:1;)
Règle 16:
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"SQL Injection - POST - TRUNCATE"; flow:to_server; content:"POST"; http_method; content:"TRUNCATE"; http_uri; nocase; classtype:web-application-attack; sid:16; rev:1;)
Règle 17:
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"SQL Injection - GET - ALTER"; flow:to_server; content:"GET"; http_method; content:"ALTER"; http_uri; nocase; classtype:web-application-attack; sid:17; rev:1;)
Règle 18:
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"SQL Injection - POST - ALTER"; flow:to_server; content:"POST"; http_method; content:"ALTER"; http_uri; nocase; classtype:web-application-attack; sid:18; rev:1;)
Règle 19:
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"SQL Injection - GET - DECLARE"; flow:to_server; content:"GET"; http_method; content:"DECLARE"; http_uri; nocase; classtype:web-application-attack; sid:19; rev:1;)
Règle 20:
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"SQL Injection - POST - DECLARE"; flow:to_server; content:"POST"; http_method; content:"DECLARE"; http_uri; nocase; classtype:web-application-attack; sid:20; rev:1;)
Ces règles détectent et bloquent les tentatives d'injection SQL via les méthodes GET et POST en se basant sur des termes clés souvent utilisés dans les attaques par injection SQL. Gardez à l'esprit que ces règles ne couvrent pas toutes les possibles attaques par injection SQL, et qu'il est crucial de maintenir une politique de sécurité globale pour protéger efficacement vos applications web.