Attack Detection kézako :

L'attack detection est une fonctionnalité disponible sur les ProxySG, cette dernière permet de protéger l'appliance et d'alerter l'administrateur qu'une machine de son réseau a un soucis. Il faut savoir que chaque modèle d'appliance a un nombre de connexion HTTP max. Au dela d'un certains nombre de connexions ou connexions échouées sur une période donnée, l'IP est blacklistée pour une durée spécifiée par l'administrateur

Limites de connexions :

Connexions limits
Connexions limits
Source :

Configuration :

 1 ProxySG# conf t
 2 ProxySG#(config)attack-detection
 3 ProxySG#(config attack-detection)client
 4 ProxySG#(config client)enable-limits
 5 ProxySG#(config client)view
 6 Client limits enabled:          true
 7 Client interval:                10 minutes
 8 
 9 Default client limits:
10     Client connection limit:          500
11     Client failure limit:             250
12     Client warning limit:             100
13     Blocked client action:            Drop
14     Client connection unblock time:   unlimited
15 
16 ProxySG#(config client)create 1.1.1.1
17 ok
18 ProxySG#(config client)edit 1.1.1.1
19 ProxySG#(config client 1.1.1.1)no connection-limit
20 ok
21 ProxySG#(config client 1.1.1.1)no failure-limit
22 ok
23 ProxySG#(config client 1.1.1.1)no warning-limit
24 ok
25 ProxySG#(config client 1.1.1.1) ctrl-Z
26 ProxySG#(config client) ctrl-Z
27 ProxySG#(config attack-detection) ctrl-Z
28 ProxySG#(config) ctrl-Z

Visualisation de la configuration :

 1 ProxySG#show attack-detection client
 2 Client limits enabled:            true
 3 Client interval:                  10 minutes
 4 
 5 Default client limits:
 6     Client connection limit:          500
 7     Client failure limit:             250
 8     Client warning limit:             100
 9     Blocked client action:            Drop
10     Client connection unblock time:   unlimited
11 
12 Client limits for 1.1.1.1/32:
13     Client connection limit:          unlimited
14     Client failure limit:             unlimited
15     Client warning limit:             unlimited
16     Blocked client action:            Drop
17     Client connection unblock time:   unlimited

Dans cette configuration, tout le monde est limité à 500 connexions HTTP ou 250 "mauvaises connexions" sur une période de 10 minutes avec un warning à 100 connexions puis sont bloqués indéfiniment. Ce qui necessite une intervention de l'administrateur. Mais on fait une exception pour la machine 1.1.1.1 qui n'a pas de limite.

failed requests :

  • Connection failures (DNS lookup errors, connection refused, connection timed out, host unreachable, ...)
  • Erreurs status codes HTTP 4xx (excluant 401 et 407) et 5xx HTTP répondu par le ProxySG ou l'OCS.

Voir les clients bloqués :

1 ProxySG#show attack-detection client blocked
2 Client               Unblock time
3 1.2.2.2              Never
4 2.2.2.2              Never

Via un navigateur : https://URL:8082/ADP/blocked-clients

SI vous avez activé la notification par e-mail (syslog aussi), vou recevrez un mail ayant pour objet "ProxySG Appliance Event 580000" et comme contenu :
2014-12-25 10:01:01+01:00CET "Blocking client IP address 2.2.2.2, exceeded request failure limit " 0 580000:1 Mailed logging.cpp:52

Débloqué une IP :

1 ProxySG# conf t
2 Enter configuration commands, one per line.  End with CTRL-Z.
3 ProxySG#(config)attack-detection
4 ProxySG#(config attack-detection)client
5 ProxySG#(config client)unblock 2.2.2.2
6 ok

Afficher le nombre de connexions par clients :

1 ProxySG#show attack-detection client connections
2 Client IP           Connection Count
3 3.3.3.3             1
4 4.4.4.4             1
5 5.5.5.5             22

Afficher les statistiques de requests failure :

1 ProxySG#show attack-detection client statistics
2 Client IP            Failure Count     Warning Count
3 6.6.6.6              2                 0

Désactivation de l'attack detection :

1 ProxySG# conf t
2 ProxySG#(config)attack-detection
3 ProxySG#(config attack-detection)client
4 ProxySG#(config client)disable-limits