Re: mod_rewrite or mod_access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Vincent Bray" <noodlet@xxxxxxxxx>
Reply-To: users@xxxxxxxxxxxxxxxx
To: users@xxxxxxxxxxxxxxxx, orvilleg@xxxxxxxxxxx
Subject: Re:  mod_rewrite or mod_access
Date: Sat, 25 Aug 2007 22:38:58 +0700

On 25/08/07, Jack Stone <antennex@xxxxxxxxxxx> wrote:
> We still use MSFrontPage on certain sites and was wondering how best to
> block visitors who use FP in attempts to abuse the sites, BUT, not block our
> own valid users?
>
> Figured best to use mod_rewrite or mod_access for this purpose, but unsure
> of the syntax to use on those vhost containers where we may have the
> conflicts.
>
> Sorry, I have not mastered these mods yet. Any help would be appreciated.
>
> Below are some such intrusive attempts:
>
> 59.104.234.123 - - [25/Aug/2007:07:44:31 -0700] "POST
> /_vti_bin/shtml.exe/_vti_rpc HTTP/1.1" 200 228 "-" "MSFrontPage/6.0"
> 59.104.234.123 - - [25/Aug/2007:07:44:32 -0700] "POST
> /_vti_bin/shtml.exe/_vti_rpc HTTP/1.1" 200 154 "-" "MSFrontPage/6.0"
> 59.104.234.123 - - [25/Aug/2007:07:44:33 -0700] "POST
> /_vti_bin/_vti_aut/author.exe HTTP/1.1" 401 531 "-" "MSFrontPage/6.0"
> 59.104.234.123 - - [25/Aug/2007:07:45:18 -0700] "POST
> /_vti_bin/shtml.exe/_vti_rpc HTTP/1.1" 200 141 "-" "MSFrontPage/6.0"
> 59.104.234.123 - - [25/Aug/2007:07:45:21 -0700] "POST
> /_vti_bin/_vti_aut/author.exe HTTP/1.1" 401 531 "-" "MSFrontPage/6.0"
> 59.104.234.123 - - [25/Aug/2007:07:46:23 -0700] "POST
> /_vti_bin/_vti_aut/author.exe HTTP/1.1" 401 531 "-" "MSFrontPage/6.0"

Either should work. First with mod_access (as it is in 2.0)

<Location /_vti_bin/_vti_aut/author.exe>
 Deny from all
</Location>

.. or fancier ..

<LocationMatch ^/_vti_bin/_vti_(evil|regex)>
 Deny from all
</LocationMatch>

Or with mod_rewrite:

RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^trusted.host.pattern$
RewriteRule ^/_vti - [F]

This basically says, if the address looks like some frontpage nonsense
and the client isn't coming from a known address, don't change the URL
(the - part), and forbid [F] the request.

You can probably get fancier still with mod_security, where fancy
includes stuff like time based abuse escallation, and just about any
conceivable formula based on the request (including any entity bodies,
which mod_rewrite can't see).

Good luck.

--
noodl


Noodl:
Thanks for those suggestions. Used the mod_rewrite one and seems to be doing the trick. The use of Frontpage attempts doesn't happen very often and so hard to test, except I see searches now getting 403s (forbidden) and I can load up from my trusted IP without any problem.

Jack

_________________________________________________________________
Puzzles, trivia teasers, word scrambles and more. Play for your chance to win! http://club.live.com/home.aspx?icid=CLUB_hotmailtextlink


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux