Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: Files upload security considerations |
|---|---|
| Date: | Fri, 10 Nov 2006 14:06:43 +1300 |
If you are running Linux a good option is to put user-uploaded files into a partition mounted with the "noexec" option. This provides some protection against someone uploading a malicious executable (although I don't think it will protect against a malicious PHP script, given that PHP scripts don't need execute permission to be run by the web server).
ideally, remove execute/write permissions to the file, so it's just 444. ensure the file is owned by nobody.
using http to upload is probably the most reliable method of uploadingBe aware that processing the file in any way (gzip/zip, resizing images, etc) exposes you to vulnerabilities that may exist in the library or program that you use to do the processing. For example there were recently posts to the bugtraq mailing list about vulnerabilities in gzip.
data, however, it's quite hard to upload large directories unless the
user packs everything into a tar/zip and the upload processor is zip/tar
aware.
Cheers
Peter
------------------------------------------------------------------------- Sponsored by: Watchfire
https://www.watchfire.com/securearea/whitepapers.aspx?id=701500000008YTU --------------------------------------------------------------------------
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Ajax Security presentation from OWASP meeting, Andrew van der Stock |
|---|---|
| Next by Date: | Re: Files upload security considerations, Hemil |
| Previous by Thread: | Re: Files upload security considerations, ed |
| Next by Thread: | Re: Files upload security considerations, ed |
| Indexes: | [Date] [Thread] [Top] [All Lists] |