Forum Moderators: phranque

Message Too Old, No Replies

Block unwanted requests

How to 403 common exploit attempts

         

Blue_Wizard

11:29 pm on Mar 9, 2005 (gmt 0)

10+ Year Member



Some of you may find this useful if you see countless requests in your logs from site trolls poking around for mail forms, cgi or vti bin stuff etc

RewriteCond %{REQUEST_URI} ^/default\.(ida¦idq) [NC,OR]
RewriteCond %{REQUEST_URI} ^/.*\.printer$ [NC,OR]
RewriteCond %{REQUEST_URI} (mail.¦form¦form¦form.¦mail¦mail¦mailto¦awstats¦awstats.)\.(cgi¦exe¦pl)$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/(MSOffice¦_vti) [NC,OR]
RewriteCond %{REQUEST_URI} /(admin¦cmd¦httpodbc¦nsiislog¦root¦shell)\.(dll¦exe) [NC,OR]
RewriteCond %{REQUEST_URI} ^/(bin/¦cgi/¦cgi\-local/¦sumthin) [NC,OR]
RewriteCond %{THE_REQUEST} ^GET\ http [NC,OR]
RewriteCond %{REQUEST_URI} /sensepost\.exe [NC]
RewriteRule .* - [F]

remember to change the broken pipes ¦ to solid ones
(Mac users if you cut and paste the above code to things like Simple Text the pipes may turn to questions marks, you will need to manually fix those or use Simple Texts replace feature)