LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-04-2004, 10:30 AM   #1
Jalalabee
Member
 
Registered: Aug 2003
Distribution: Slackware 10.2
Posts: 102

Rep: Reputation: 15
hardening my security


Well, I was just hacked recently, and I'm going to be having a constant banging to into my system, for some reason. Anyway, I'd like to see what I can do asap as I format. I'm using Slackware 9.1 and it runs the 2.4.22 kernel, so it seems a difficulty. First thing I'll do is compile a new kernel, right? But what program/programs or configs I could use/change to make my system untouched.

I couldn't find any how-tos written by someone knowing exactly what they are doing, and I really don't want to take any chances, again.

Anyway, I use slackware 9.1, 2200+ xp, 80gb hdd, aDSL 768/128.

Thanks for any help,

-Jalalabee
 
Old 01-04-2004, 10:56 AM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
UnSpawn (one of the mods) has written several how-tos:
Real Newbie How-Tos, Refs, etc etc.
Security References.

The can be found on the Linux-Security Forum. (The second link has links to loads of sites that deal with this issue).
 
Old 01-04-2004, 12:29 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Well, I was just hacked recently,
Yes, and you bailed out of that thread w/o further details.
That kinda sucked IMNSHO.


I'd like to see what I can do asap as I format.
Drop the "ASAP". Think before you act. Plan stuff, I mean.


I'm using Slackware 9.1 and it runs the 2.4.22 kernel, so it seems a difficulty. First thing I'll do is compile a new kernel, right?
No.

10 short steps to start with:

*If this was the box that got compromised, wipe the whole disk(s).

1. Map out your partitions. If you have multiple disks, spread partitions, for instance /boot, /, /bin and /usr on one, /var and /tmp on the other.
2. Decide what to install. DO NOT install what you don't need NOW this goes especially for any network facing services: add them when you're done hardening the box. DO install sudo and TCP wrappers.
3. When installing add an unprivileged user account.
4. When done installing and having rebooted, log in as root and FIRST THING is to stop the network. Note and stop any running network services (see also (x)inetd). "touch /var/log/catchall" and add a line "*.*<WATCHFORTABS>/var/log/catchall" to /etc/syslog.conf, restart syslog. This way you'll log everything possible from which you'll benefit later on when you install something like logwatch or logsurfer.
5. Configure your firewall with a default policy of DROP and LOG your traffic. Make sure /etc/hosts.deny has a line "ALL: ALL". Activate firewall, bring the network back up.
6. Connect to a mirror to fetch updates (if you're sanely paranoid, you'll bring the network down when updates are all downloaded).
7. Install, configure and run Aide or Samhain or tripwire, to have a pristine database of what is on your system. Make a copy of the binary and the database on readonly media. Install and use SASTK (Bastille-Linux won't work on slack), Snort, Tiger (or LSAT) and Chkrootkit. If you ran SASTK and Tiger, check the logs and any recommendations they make. Else you'll have to go in and do stuff like checking daemon account shells, authentication (slack still doesn't have PAM?) etc etc manually.
8. When done updating and configuring the system, and if you run ext2 or ext3, make your system binaries and configs immutable (chattr), and your logs append-only. Subscribe to your vendors security bulletins and have the discipline to update when critical updates are released.
9. When expanding your system use common sense (no security through obscurity, and stealthing the firewall is overrated, a non-issue), look for alternatives (no one needs telnetd: use OpenSSH) and make sure you configure network services and user accounts to use the least necessary privileges and restrict access.
10. Read the stuff XavierP recommended. I didn't explain enough and have left out details.


Hope this gets you started.
 
Old 01-06-2004, 10:30 AM   #4
Jalalabee
Member
 
Registered: Aug 2003
Distribution: Slackware 10.2
Posts: 102

Original Poster
Rep: Reputation: 15
Yes, I know I shouldn't have bailed out, but what was being said was WAY over my head, you might as well be talking to trash can filled with bricks. Also, class started yesturday and I take online classes, that is why I'm in such a hurry if you can understand. Also I have a new harddrive that I traded up for, 160gb now. =] Once I'am more savvy about such things, I'll write documentation. =] And I will finish telling what happened in the thread of course, the other one that is.

Right now I'm gearing more twords a general tune, for this thread, I just worry about the time while I'm downloading what is required to security this box up. I'll work on reading the reads you suggested now.

Thanks,

If I had a job, I'd pay the bills, than I'd donate,

But until I can find a job, I'll get stiffed.

-Jalal
 
Old 01-06-2004, 02:40 PM   #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
Yes, I know I shouldn't have bailed out, but what was being said was WAY over my head, you might as well be talking to trash can filled with bricks.
Next time someone just say it if I'm talking in riddles and I'll try 'n explain.
 
  


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
hardening slack? Geocritter Slackware 4 07-19-2005 09:04 PM
hardening Fedora GraemeK Linux - Security 2 05-17-2005 08:38 AM
Hardening Apache XaViaR Linux - Security 2 05-14-2005 06:25 PM
hardening SuSe 9.0 tekhead2 Linux - Security 1 10-27-2004 06:25 AM
Hardening RH 9 velan Red Hat 4 06-16-2004 07:40 AM

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

All times are GMT -5. The time now is 04:33 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