LinuxQuestions.org
Visit Jeremy's Blog.
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 02-20-2006, 11:03 PM   #1
redice
Member
 
Registered: Aug 2005
Location: In My Office
Distribution: Fedora, Ubuntu
Posts: 61

Rep: Reputation: 15
Unhappy Helppp!!!!


Hi All,

I run a web server/Mail server (dedicated hosting from a hosting company.
Now my server had been comprmised and was being used to scan other servers for
XML RPC vulnerabilities.

I would like to secure my server as much as possible.

Services used on my server are as follows

80 - web
8443 - Plesk (user control panel login)
21 - ftp
25 - SMTP (With User authentication)
110 - POP

Im not much of a guru with IP tables and security but I understand
that IPTables is whats used to secure the server.

I would also like to find out how my server was used to send out objectional
traffic, how may I do this? Which logs would I check?

What would be the best way to secure the server?

All your help will be highly appreciated
For now please treat me as a in the security domain

Redice
 
Old 02-21-2006, 06:41 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608
Now my server had been comprmised and was being used to scan other servers for XML RPC vulnerabilities. I would like to secure my server as much as possible.
Please have your hosting company make a backup of human readable data if necessary, wipe the install reinstall the OS from scratch. Then have them hand-off the box to you with a minimal set of services running, the firewall up with only access from your IP(.range) before continuing anything else doesn't make sense.

When you get the box back close off any services you don't need to run in this phase (you probably only need ssh access). Make a backup of /etc (config files, etc, etc), then make sure you have a unprivileged user account from which you can su(do) to root, and harden your sshd_config by disallowing root access, restrict ssh access in /etc/hosts.allow to only your IP or range and ALL: ALL in /etc/hosts.deny. Restart ssh. Log in and first remove any software you don't need, then upgrade your software.

These are the first things you should do. I could probably type a whole hardening checklist, but it's best you first check out the LQ FAQ: Security references under hardening, propose what to do and we'll add to that.
 
Old 02-21-2006, 06:48 AM   #3
redice
Member
 
Registered: Aug 2005
Location: In My Office
Distribution: Fedora, Ubuntu
Posts: 61

Original Poster
Rep: Reputation: 15
Hi unSpawn,

Thanks a million on the reply. Problem here is that the ISP will charge quite alot (around $150 per hour) to backup my data and reinstall the server.
Is this step compulsory? Can i not just go on with what I already have?

Thanks for the link. I will try to follow it fully and get back to you if i get stuck anywhere.

Redice
 
Old 02-21-2006, 07:39 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608Reputation: 3608
Before you do anything else please make sure any unwanted processes are killed and any services you don't need are stopped and not allowed to restart. Also make sure access is restricted to only your IP (range) in the firewall.


Problem here is that the ISP will charge quite alot (around $150 per hour) to backup my data and reinstall the server. Is this step compulsory? Can i not just go on with what I already have?
OK. You could probably backup the data yourself. Short answer is that reinstalling from scratch will provide you with a more trustable environment than anything else. Long answer is that you probably could try to triage, pry (most of) the splinters out, bandage, patch and resurrect your current, compromised setup but that will take someone who is not well-versed in system security and forensics more time compared to a "safe" way like reinstalling from scratch.


I will try to follow it fully and get back to you if i get stuck anywhere.
Please get back *before* you do: make a list of what you think you need to do and we'll add to that.
 
Old 02-21-2006, 02:16 PM   #5
redice
Member
 
Registered: Aug 2005
Location: In My Office
Distribution: Fedora, Ubuntu
Posts: 61

Original Poster
Rep: Reputation: 15
Thanks again.
I have asked the ISP to do a fresh install.

Kindly let me know how I may stop root from SSH'ing into the
server and only the user to SSH into it and use SU for
root privelages

Redice

Last edited by redice; 02-22-2006 at 03:12 PM.
 
  


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
Installing Abadi font .. Helppp moonblade Linux - General 2 12-20-2005 09:46 PM
Linux firewall Helppp!!! shane200_ Linux - Networking 2 09-15-2005 10:14 AM
Amsn and Proxy Server (socks 5) Helppp fahadaizaz Linux - Newbie 1 04-25-2004 05:48 AM
helppp modeprobe The Saint1 Linux - General 2 03-09-2003 12:49 PM
helppp!! martinux Linux - Networking 4 12-10-2002 06:40 AM

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

All times are GMT -5. The time now is 05:15 AM.

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