I found some examples of .htaccess files on other forums.
I was interested in these snippets, which apparently deal with codered, nimda, and formmail exploits. I've pasted the snippet below, followed by a question for folks who really understand this stuff.
------
# this ruleset is to "stop" stupid attempts to use MS IIS expolits on us
# NIMDA
RewriteCond %{REQUEST_URI} /(cmd¦root¦shell)\.exe$[NC,OR]
RewriteCond %{REQUEST_URI} /(admin¦httpodbc)\.dll$[NC]
RewriteRule .* /cgi-bin/nonimda.cmd [L,E=HTTP_USER_AGENT:NIMDA_EXPLOIT,T=appl ication/x-httpd-cgi]
# CODERED
RewriteCond %{REQUEST_URI} /default\.(ida¦idq)$[NC,OR]
RewriteCond %{REQUEST_URI} /.*\.printer$[NC]
RewriteRule .* /cgi-bin/nocode-r.cmd [L,E=HTTP_USER_AGENT:CODERED_EXPLOIT,T=ap plication/x-httpd-cgi]
# this ruleset is for formmail script abusers...
RewriteCond %{REQUEST_URI} formmail\.(pl¦cgi)$[NC,OR]
RewriteCond %{REQUEST_URI} mailto\.(exe¦cgi)$[NC]
RewriteRule .* /cgi-bin/nofrmml.cmd [L,E=HTTP_USER_AGENT:FORMMAIL_EXPLOIT,T=a pplication/x-httpd-cgi]
------
My questions. Since I don't have the actual RewriteRule "files" ( nocode-r.cmd, nonimda.cmd, nofrmml.cmd ) that the rules refer to, Is there an alternative... like replying with a regular tiny html file instead? And if this is OK, to send back a tiny html file, how should the flags be edited ( the [L, E=*,T=*] stuff).
My goal by the way, is to get these things out of my error logs, to make it easier to spot real errors.


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks