PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > with c99 shell attack rules for mod_security
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

with c99 shell attack rules for mod_security

Réponse
 
LinkBack Outils de la discussion
Vieux 08/05/2007, 19h04   #1
vidals
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut with c99 shell attack rules for mod_security

I'm brand new to mod_security. I run a small hosting company and I
want to prevent c99shell scripts from running.

I found this rule to detect URI's for the c99 shell.

#new kit
SecFilterSelective REQUEST_URI "/c99shell\.txt"
SecFilterSelective REQUEST_URI "/c99\.txt\?"

My problem is that the hackers are being more stealthy and calling the
script some random name like .../myphpstuff.php. So the URI no longer
s detect it.

How could I detect "c99.*shell" in the actual file that apache
servers? This assumes that the hacker was successfully in installing
it.

>From reading the manual I think I would use:


"SecFilterSelective POST_PAYLOAD"
"SecRule RESPONSE_BODY "c99.*shell".

I don't know exactly what the rule should be or which file to put it
in. Any guidance would be greatly appreciated. I'm using mod_security
version 1.9.4

Thank you.
Vidals

  Réponse avec citation
Vieux 08/05/2007, 22h17   #2
shimmyshack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: with c99 shell attack rules for mod_security

On May 8, 7:04 pm, vidals <gvid...@gmail.com> wrote:
> I'm brand new to mod_security. I run a small hosting company and I
> want to prevent c99shell scripts from running.
>
> I found this rule to detect URI's for the c99 shell.
>
> #new kit
> SecFilterSelective REQUEST_URI "/c99shell\.txt"
> SecFilterSelective REQUEST_URI "/c99\.txt\?"
>
> My problem is that the hackers are being more stealthy and calling the
> script some random name like .../myphpstuff.php. So the URI no longer
> s detect it.
>
> How could I detect "c99.*shell" in the actual file that apache
> servers? This assumes that the hacker was successfully in installing
> it.
>
> >From reading the manual I think I would use:

>
> "SecFilterSelective POST_PAYLOAD"
> "SecRule RESPONSE_BODY "c99.*shell".
>
> I don't know exactly what the rule should be or which file to put it
> in. Any guidance would be greatly appreciated. I'm using mod_security
> version 1.9.4
>
> Thank you.
> Vidals


how are they managing to upload, thats where your efforts should go.
Theres nothing to stop them calling it whatever random name their
script chooses. As for the post payload, that too could be anything,
but would normally be some kind of local executable. Your security
should be such that there are very limited things that can happen as a
result of running a local executable.

the post payload stops the script from getting to your servers in the
first place, and so is only effective against the name c99.... It is
possible to parse the post payload for all strings. Have you thought
about disabling remote url opening via fopen, etc... and locking down
exec passthru, system, or at least checking for th contents of c99 in
post payloads?

the coolrules project might have more for you over on
http://www.modsecurity.org/projects/...les/index.html

if you have no way to your users patch their software, this
encourages old software, and prevents issuing warnings about old
software when the users might not fully understand the risks of adding
the 99th module into joomla!

  Réponse avec citation
Vieux 08/05/2007, 23h34   #3
shimmyshack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: with c99 shell attack rules for mod_security

On May 8, 10:17 pm, shimmyshack <matt.fa...@gmail.com> wrote:
> On May 8, 7:04 pm, vidals <gvid...@gmail.com> wrote:
>
>
>
> > I'm brand new to mod_security. I run a small hosting company and I
> > want to prevent c99shell scripts from running.

>
> > I found this rule to detect URI's for the c99 shell.

>
> > #new kit
> > SecFilterSelective REQUEST_URI "/c99shell\.txt"
> > SecFilterSelective REQUEST_URI "/c99\.txt\?"

>
> > My problem is that the hackers are being more stealthy and calling the
> > script some random name like .../myphpstuff.php. So the URI no longer
> > s detect it.

>
> > How could I detect "c99.*shell" in the actual file that apache
> > servers? This assumes that the hacker was successfully in installing
> > it.

>
> > >From reading the manual I think I would use:

>
> > "SecFilterSelective POST_PAYLOAD"
> > "SecRule RESPONSE_BODY "c99.*shell".

>
> > I don't know exactly what the rule should be or which file to put it
> > in. Any guidance would be greatly appreciated. I'm using mod_security
> > version 1.9.4

>
> > Thank you.
> > Vidals

>
> how are they managing to upload, thats where your efforts should go.
> Theres nothing to stop them calling it whatever random name their
> script chooses. As for the post payload, that too could be anything,
> but would normally be some kind of local executable. Your security
> should be such that there are very limited things that can happen as a
> result of running a local executable.
>
> the post payload stops the script from getting to your servers in the
> first place, and so is only effective against the name c99.... It is
> possible to parse the post payload for all strings. Have you thought
> about disabling remote url opening via fopen, etc... and locking down
> exec passthru, system, or at least checking for th contents of c99 in
> post payloads?
>
> the coolrules project might have more for you over onhttp://www.modsecurity.org/projects/coolRules/index.html
>
> if you have no way to your users patch their software, this
> encourages old software, and prevents issuing warnings about old
> software when the users might not fully understand the risks of adding
> the 99th module into joomla!


Have you as a company developed/implemented rules for the major
blogging/cms applications like wordpress, joomla and so on. It might
to download a list of preconfigured rules and make them mandatory
for all sites, this way certain GET strings used in xss, sql
injection, header injection and so on would be stopped at the mod_sec
level, if you provided your users with piped error messages they could
see why their scripts were failing if they decided to implement some
bad practise of their own. I have experimented with buffering with
some success, although in some cases the apache process grew very
large when uploading large files, although that could be circumvented
with better rules I think.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 20h44.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12122 seconds with 11 queries