Statistics for Modulating application behaviour for closely coupled intrusion detection