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

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>

 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>

<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.

Reply via email to