The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell script to send email alert for core dump rtatineni SUN Solaris 1 08-17-2006 02:33 PM
Help? Any method to send system alert email? ITJacky UNIX for Dummies Questions & Answers 1 06-03-2006 07:29 PM
Email alert script moon Shell Programming and Scripting 1 04-26-2002 04:55 PM
SMS alert in Linux rsahu UNIX for Advanced & Expert Users 4 02-05-2002 02:25 PM
ALERT!!! ALERT!!! I messed up the UNIX!!! Fwurm UNIX for Dummies Questions & Answers 15 11-06-2001 05:53 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-07-2007
fed.linuxgossip fed.linuxgossip is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 99
email Alert

Hello,


I want a script that will scan the file /etc/httpd/conf/httpd.conf and the folder /etc/httpd/libexec/


-bash-2.05b# grep mod_r /etc/httpd/conf/httpd.conf
LoadModule rewrite_module libexec/mod_rewrite.so
AddModule mod_rewrite.c
-bash-2.05b#



-bash-2.05b# find /etc/httpd/libexec/ -name mod_r*
/etc/httpd/libexec/mod_rewrite.so



If the scan finds malicious entry like

mod_rphp or mod_root in httpd.conf

it will email an alert to a particular email.


-bash-2.05b# grep mod_r /etc/httpd/conf/httpd.conf | grep -v mod_rewrite
-bash-2.05b#




If the scan finds malicious files in the folder /etc/httpd/libexec/ like mod_rphp.so or mod_rootme

-bash-2.05b# find /etc/httpd/libexec/ -name mod_r* | grep -v mod_rewrite.so
-bash-2.05b#


it will email an alert to a particular email.



Please advise.

format is basically..

1)

if
entry exists
do
email alert

2)

if
file exists
do
email alert




Thanks
  #2 (permalink)  
Old 10-07-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Are you really looking for an intrusion detection system?
  #3 (permalink)  
Old 10-07-2007
fed.linuxgossip fed.linuxgossip is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 99
IDS is fine too.. but I want an advice on that script too.
  #4 (permalink)  
Old 10-07-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Do a search on this site, there are plenty of examples of people sending emails using scripts.
  #5 (permalink)  
Old 10-07-2007
fed.linuxgossip fed.linuxgossip is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 99
... ty.. I think I got lazy
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:05 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0