WordPressのauthorスキャン

某IPアドレスから?author=な連続スキャンを受けたので、ファイアウォールでブロックしてしてやった。
手動でブロックするのもアホらしいのでsuricataにルールを作ってあげてみた。

alert tcp $EXTERNAL_NET any -> $HOME_NET $HTTP_PORTS (msg:"CUSTOM WordPress Author Scan (Stage 1)"; flow:to_server,established; content:"GET "; depth: 4; nocase; uricontent:"/?author="; nocase; flowbits:set,CUSTOM.wordpress_author_scan_1; flowbits:noalert; sid:1000000; rev:1;)
alert tcp $HOME_NET $HTTP_PORTS -> $EXTERNAL_NET any (msg:"CUSTOM WordPress Author Scan"; flow:from_server,established; content:"HTTP/1.1 404"; depth: 12; nocase; flowbits:isset,CUSTOM.wordpress_author_scan_1; flowbits:set,CUSTOM.wordpress_author_scan_2; threshold: type limit, count 1, seconds 10, track by_src; classtype:web-application-attack; sid:1000001; rev:1;)

“?author=”なリクエストに404を返したときに反応するルール。flowbitsって便利。
あとはお手製スクリプト経由でpfctlのブラックリスト送り。