Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-12-2006, 02:23 PM
|
#1
|
Member
Registered: May 2006
Location: Kennewick, WA - USA
Distribution: Ubuntu
Posts: 129
Rep:
|
spamming, cannot find vunerability
I work at a web design company who has a server that is being used to spam. The hosting company has sent me several log files showing a million emails going out that are clearly spam. I have searched the server for upload or email scripts that are not secure and have been unable to locate any. The hosting company is not being terribly helpful, simply stating that we have 24 hours to fix the problem before we are taken down! I have about 300 accounts on the server and short of shutting down sendmail am not even sure where to start. The server is running redhat 9 enterprise. Any ideas?
Thanks!
Jonathon
|
|
|
09-12-2006, 08:04 PM
|
#2
|
Senior Member
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191
Rep:
|
check if you have an open relay or something
/etc/mail/access
if not
check your
/var/log/maillog from which account the messages are being sent.
a temp solution would be to block those ips from accessing your server.
|
|
|
09-12-2006, 09:02 PM
|
#3
|
LQ Newbie
Registered: Jun 2006
Posts: 27
Rep:
|
We had a similar issue only on a Windows 2000 server. It had been used for spamming for years and it was sending out thousands each day. This caused major issues and our ip was blacklisted. Anyway, what we did was basically deny the spammers access and then fixed the hole in the firewall which was allowing countless hackers and spammers to enter.
|
|
|
09-12-2006, 09:08 PM
|
#4
|
Senior Member
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658
Rep:
|
Definitely start with w3bd3vil's advice and take a detailed look at all of the maillogs on the system. From there widen the search and look through all system and other daemon logs (like http logs). Take a look at all of the running processes on the system (ps aux) and see if you can spot anything unusual. Also look at all of the cron jobs run by the system (check /var/log/cron and the /etc/cron.daily/ files.
Last edited by Capt_Caveman; 09-12-2006 at 09:11 PM.
|
|
|
09-13-2006, 10:28 AM
|
#5
|
Member
Registered: May 2006
Location: Kennewick, WA - USA
Distribution: Ubuntu
Posts: 129
Original Poster
Rep:
|
w3bd3vil:
I checked for an open relay and didn't have one.
/var/log/maillog was not really helpful, I was unable to match up a specific user, ip, or even transaction to one of the messages sent. My provider sent me a log of the messages being sent, but I couldn't match them up with maillog. Their log indicates that the user is nobody. This is apache's user isn't it?
Capt_Caveman:
I didn't see anything unusual in any of the logs except for this entry (repeated over and over again at different times):
Sep 10 04:19:00 bsolid1 CROND[8948]: (nobody) CMD (/dev/shm/.access.log/y2kupdate >/dev/null 2>&1)
It seems that y2kupdate does not exist on the server though, so I removed this entry from the crontab. /dev/shm -> /tmp which is world readwritable. I touched a file called y2kupdate, made it r/o to root only and set the sticky bit.
I have found only one entry in the logs provided to me that seems peculiar, and that is the occasional use of an email address with a domain that I do host. I can't discern whether this is being posted as a sender or just a recipient...
|
|
|
09-13-2006, 10:40 AM
|
#6
|
Senior Member
Registered: Jun 2006
Location: Hyderabad, India
Distribution: Fedora
Posts: 1,191
Rep:
|
great, so you see message being sent by nobody. that could be a clue.
you could be suffering from a php remote file inclusion. check your http logs to see unusual usage, commands like ls,cat,uname being executed.
i would urge you to run chkrootkit and check if your infected with a rootkit.
keep monitoring your system using tcpdump for a while from now, keep your eyes open from unusual http requests.
check your current proccess, normally these can be faked. for eg: spammer.pl can be made as httpd in your ps x. if there isnt any rootkit installed you would want to check the proccess started by nobody and do a lsof to get more detail about it.
check for recently modified files on your comp.
check for world writeable folders.
do post your findings here.
Last edited by w3bd3vil; 09-13-2006 at 10:43 AM.
|
|
|
09-13-2006, 05:55 PM
|
#7
|
Member
Registered: May 2006
Location: Kennewick, WA - USA
Distribution: Ubuntu
Posts: 129
Original Poster
Rep:
|
It turns out that nobody had shell access. It seems that we had a website with a phpBB vunerability. I removed it and the shell access. chkroot indicated no problems!
|
|
|
09-14-2006, 02:51 PM
|
#8
|
Senior Member
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658
Rep:
|
Well the host certainly has been compromised. The question is what was the extent of the intrusion. You'll definitely need to check the remote login history with the last -i command. Check the contents of the /etc/passwd file to be sure that no new users have been added and that there are no users with UID/GIDs of 0 that shouldn't. I'm concerned that you have yet to turn up any evidence in the logs which would seem to indicate that some log cleansing occurred. If a phpBB exploit was used then you should be seeing some evidence in the httpd logs. All that being said, fully rebuilding the box from trusted media is going to be the only way to be 100% sure that the box is fully secure. You can verify the integrity of system files using rpm -Va but a rebuild is the the only way to be sure that the box hasn't been tampered with.
|
|
|
All times are GMT -5. The time now is 04:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|