Configuring attack detection and prevention