Drupal automatic "antihack" behaviour
I believe you're looking for the Drupal Tiny-IDS module:


  Minimalist, but performant intrusion detection system that monitors Drupal for malicious activities and targets to be simple to understand and easy to use.


It attempts to detect:


XSS (Cross Site Scripting)
SQLi (SQL Injection)
Code execution (Local/Remote file inclusion, etc.)


And can 'react' in a bunch of different ways:


Log entry
Warning message (to the malicious user)
Mail alert
Rules integration (which you could use to disable the user account)


I think that ticks all the boxes :)