store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Sat May 18, 2013 11:27 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 2 posts ] 
Author Message
 Post subject: security questions about file uploads
Unread postPosted: Mon Jul 25, 2005 11:10 am 
Offline
Forum User
Forum User

Joined: Sat Jul 02, 2005 6:04 am
Posts: 29
I would like to offer my members the possibility to upload pictures. How do I do that in the most possible secure way, if we suppose I am using php as a module and apache as user?

I have mounted /tmp in its own partition as noexec nosuid (owner is root).

Should I create there a directory /tmp/phptmp with owner apache?

Validation of uploaded files is of course planned, using the exif function check imagetype.
Does someone know if the Postnuke Modules Pagesetter, Gallery and Photoshare do a thorough file validation to check if the file is really what the extension says it is? What about phpbb2?
Is it possible to have the php script parse the uploaded file to check if it contains a script or a program?
File validation is crucial in my opinion.

Is it advisable to have move_uploaded_file put the file into a directory situated "above" httpddocs (meaning it cannot be reached by URL)?

With the proper file ownerships, I should be able to switch safe mode ON.

What else can I do to enhance security on uploads?


Top
 Profile  
 
 Post subject:
Unread postPosted: Mon Jul 25, 2005 3:53 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7418
Location: earth
Harden the kernel, a la grsecurity.net and/or SELinux, and add in an application layer IDS, which is what ASL does: http://www.atomicrocketturtle.com/subscribe.html

I cant recommend grsec enough for server environments, if you want to try rolling your own its available at grsecurity.net.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 2 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group