Adds Comments Spam Cleaner to wp-admin. Pick which folder to scan, hit Scan comments, and every comment that matches your rules is listed with the reason it was flagged. Tick what you want (everything is pre-ticked) and apply one bulk action to the lot.
Rules included:
PG_SLEEP, WAITFOR DELAY, UNION SELECT, BENCHMARK(), EXTRACTVALUE(), information_schema, ' OR 1=1--, ${jndi: and more.javascript: URLs, inline event handlers.[url=...], [link=...].Bulk actions: Move to Trash, Mark as Spam, Delete Permanently, and Approve (to clear a false positive out of the list).
Scanning and deleting run in batches over AJAX, so tens of thousands of comments will not time the request out.
Optionally the same rules can run on new submissions: send matches straight to the spam folder, or reject them outright.