LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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-05-2006, 04:11 AM   #1
MSafty
LQ Newbie
 
Registered: Aug 2005
Location: Egypt
Distribution: Suse and Red hat
Posts: 14

Rep: Reputation: 0
securing /tmp


i'm looking for way to secure my /tmp directory
i have fedora core 2 work as web server with apache
sometimes crackers puts binary files in my /tmp directory
also i find some processes runs as http and when i restart the serveice i found that these prcesses are still working.
i want to find something to monitor my /tmp directory and to take action.
 
Old 01-05-2006, 06:58 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,776

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
du -h /tmp to see how large your /tmp is.

Create a partition large enough to hold /tmp, then edit /etc/fstab to show the new partition. Mount it noexec to prevent executable files from running in /tmp.

mv the current /tmp into the new partition.
 
Old 01-05-2006, 02:28 PM   #3
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
The problem is not with /tmp. You need to investigate what web content on your servers are allowing people to upload to your system. Secure your applications. Creating a larger /tmp without fixing the hole is only giving people more storage space on your system.

Last edited by stickman; 01-05-2006 at 02:31 PM.
 
Old 01-07-2006, 07:00 AM   #4
MSafty
LQ Newbie
 
Registered: Aug 2005
Location: Egypt
Distribution: Suse and Red hat
Posts: 14

Original Poster
Rep: Reputation: 0
sometimes i find that the load average is high then when i make #top -c to show what are the most processes that consumes more cpu cycles and memory,i find normal processes nobody with http and when i restart the httpd service i found that everything is cool and the load average reduced.
and sometimes when i stop the service httpd i find running http service and i don't know what is it?
i think that it is some of processes that crackers wants to execute from /tmp.
 
Old 01-07-2006, 12:31 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,369
Blog Entries: 54

Rep: Reputation: 2869Reputation: 2869Reputation: 2869Reputation: 2869Reputation: 2869Reputation: 2869Reputation: 2869Reputation: 2869Reputation: 2869Reputation: 2869Reputation: 2869
Like Stickman says, harden the box. If I understand correctly what you write then in your case you have to check your system, auth and daemon logs because it sounds like your box is/was a target. Did you run any auditing apps like Tiger, Chkrootkit / Rootkit Hunter?
 
Old 01-08-2006, 10:54 AM   #6
MSafty
LQ Newbie
 
Registered: Aug 2005
Location: Egypt
Distribution: Suse and Red hat
Posts: 14

Original Poster
Rep: Reputation: 0
yes,Rootkit Hunter is running.
 
Old 01-08-2006, 12:11 PM   #7
Vgui
Member
 
Registered: Apr 2005
Location: Canada
Distribution: Slackware
Posts: 496

Rep: Reputation: 31
That's an interesting point about mounting /tmp as noexec (and nosuid). I'll be doing that for my home system, thanks.
 
Old 01-08-2006, 03:11 PM   #8
MSafty
LQ Newbie
 
Registered: Aug 2005
Location: Egypt
Distribution: Suse and Red hat
Posts: 14

Original Poster
Rep: Reputation: 0
yes,Rootkit Hunter is running.
 
Old 01-09-2006, 05:41 PM   #9
MSafty
LQ Newbie
 
Registered: Aug 2005
Location: Egypt
Distribution: Suse and Red hat
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks...

Thanks all the problem was solved.
 
  


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
kde, /tmp, /var/tmp and all that garba Linux - Software 4 06-17-2005 12:31 PM
Create file using 'touch ./tmp.$$', file tmp.3941 is created, why? huangyanfeng Linux - General 1 04-13-2004 03:36 AM
"/tmp/sv001.tmp/setup.bin" error while installing OO1.1.0 Choey Linux - Software 0 09-16-2003 04:52 PM
Numerous scb_*.tmp files in /tmp dburk Programming 3 08-18-2003 04:28 PM
Newbie question - /tmp /var/tmp Mr happy Linux - Security 3 01-27-2003 01:03 PM


All times are GMT -5. The time now is 05:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration