I just corected this entry  it now looks like this
<command>file-perm</command>
    <location>local</location>
    <rules_id>100021</rules_id>
    <level>12</level>
    <timeout>600</timeout>
  </active-response>

-----Message d'origine-----
De : ossec-list@googlegroups.com [mailto:ossec-l...@googlegroups.com] De la 
part de dan (ddp)
Envoyé : 14 déc. 2010 11:03
À : ossec-list@googlegroups.com
Objet : Re: [ossec-list] Still working on world writable files

So when a level 12 alert is fired that has a srcip you want the
file-perm command to run?

On Tue, Dec 14, 2010 at 10:41 AM,  <d.asse...@cgi.com> wrote:
>  In ossec.conf under Active response
>
>     This is what I have
>  <active-response>
>     <!--Report all files with 666/777 perm in dir list.
>      -->
>    <command>file-perm</command>
>    <location>local</location>
>    <level>12</level>
>    <timeout>600</timeout>
>  </active-response>
>
> -----Message d'origine-----
> De : ossec-list@googlegroups.com [mailto:ossec-l...@googlegroups.com] De la 
> part de dan (ddp)
> Envoyé : 14 déc. 2010 09:21
> À : ossec-list@googlegroups.com
> Objet : Re: [ossec-list] Still working on world writable files
>
> On Tue, Dec 14, 2010 at 9:12 AM,  <d.asse...@cgi.com> wrote:
>>
>>
>> Hi all
>>
>>
>>
>>   This is what I have done up t’il now to track those ww files
>>
>> But it doesn’t appear to work.  Sooooooo what did I miss
>>
>>
>>
>>   I have a one liner script in active response  that extract the info
>>
>> I need
>>
>> stat -c %A" "%n  /cdpq/* /users/*/* /etc/* | egrep -e "-rw.rw.rw..*"| sed
>> "s/^\(-rw.rw.rw..*\)/Wrong file permissions in \1/" > /var/log/perm.log
>>
>
> Under what conditions do you expect this script to be triggered? This
> seems more like a cron or command script.
>
>>
>>
>> this produces a log like this
>>
>> Wrong file perm -rwxrwxrwx /cdpq/coco123
>>
>> Wong file perm  -rw-rw-rw- /cdpq/coco1234
>>
>> Wrong file perm -rw-rw-rw- /cdpq/cocorico
>>
>>
>>
>>  Next I made this rule in local_rules.xml
>>
>>
>>
>> <rule id="100021" level="12" >
>>
>>     <if_group>syscheck,</if_group>
>>
>>     <match>^Worng</match>
>>
>>     <description>World-writable File</description>
>>
>>     <group>syscheck,</group>
>>
>>  </rule>
>>
>>
>
> That rule shoudl work.
>
>>
>>  And finally this in ossec.conf
>>
>> <command>
>>
>>     <name>file-perm</name>
>>
>>     <executable>file-perm.sh</executable>
>>
>>     <expect>srcip</expect>
>>
>>     <timeout_allowed>yes</timeout_allowed>
>>
>>   </command>
>>
>>
>
> So your script wants to see a srcip?
>
> You forgot to include your <active-response> configuration. What will
> trigger the file-perm command?
> Please see: 
> http://www.ossec.net/doc/manual/ar/ar-unix.html#responses-configuration
>
>>
>> <localfile>
>>
>>     <log_format>syslog</log_format>
>>
>>     <location>/var/log/perm.log</location>
>>
>>   </localfile>
>>
>> </ossec_config>
>>
>> ________________________________
>> Avis de confidentialité : Ce courriel et les pièces qui y sont jointes
>> contiennent de l'information confidentielle et peuvent être protégés par le
>> secret professionnel ou constituer de l’information privilégiée. Ils sont
>> destinés à l'usage exclusif de la (des) personne(s) à qui ils sont adressés.
>> Si vous n'êtes pas le destinataire visé ou la personne chargée de
>> transmettre ce document à son destinataire, vous êtes avisé par la présente
>> que toute divulgation, reproduction, copie, distribution ou autre
>> utilisation de cette information est strictement interdite. Si vous avez
>> reçu ce courriel par erreur, veuillez en aviser immédiatement l’expéditeur
>> par téléphone ainsi que détruire et effacer l'information que vous avez
>> reçue de tout disque dur ou autre média sur lequel elle peut être
>> enregistrée et ne pas en conserver de copie. Merci de votre collaboration.
>> Notice of Confidentiality: This electronic mail message, including any
>> attachments, is confidential and may be privileged and protected by
>> professional secrecy. They are intended for the exclusive use of the
>> addressee. If you are not the intended addressee or the person responsible
>> for delivering this document to the intended addressee, you are hereby
>> advised that any disclosure, reproduction, copy, distribution or other use
>> of this information is strictly forbidden. If you have received this
>> document by mistake, please immediately inform the sender by telephone,
>> destroy and delete the information received from any hard disk or any media
>> on which it may have been registered and do not keep any copy. Thank you for
>> your cooperation.
>>
>
> Avis de confidentialité : Ce courriel et les pièces qui y sont jointes 
> contiennent de l'information confidentielle et peuvent être protégés par le 
> secret professionnel ou constituer de l’information privilégiée. Ils sont 
> destinés à l'usage exclusif de la (des) personne(s) à qui ils sont adressés. 
> Si vous n'êtes pas le destinataire visé ou la personne chargée de transmettre 
> ce document à son destinataire, vous êtes avisé par la présente que toute 
> divulgation, reproduction, copie, distribution ou autre utilisation de cette 
> information est strictement interdite. Si vous avez reçu ce courriel par 
> erreur, veuillez en aviser immédiatement l’expéditeur par téléphone ainsi que 
> détruire et effacer l'information que vous avez reçue de tout disque dur ou 
> autre média sur lequel elle peut être enregistrée et ne pas en conserver de 
> copie. Merci de votre collaboration.
> Notice of Confidentiality:  This electronic mail message, including any 
> attachments, is confidential and may be privileged and protected by 
> professional secrecy. They are intended for the exclusive use of the 
> addressee. If you are not the intended addressee or the person responsible 
> for delivering this document to the intended addressee, you are hereby 
> advised that any disclosure, reproduction, copy, distribution or other use of 
> this information is strictly forbidden. If you have received this document by 
> mistake, please immediately inform the sender by telephone, destroy and 
> delete the information received from any hard disk or any media on which it 
> may have been registered and do not keep any copy. Thank you for your 
> cooperation.
>

Reply via email to