|
|
|
|
![]() ![]() |
Nov 6 2006, 08:45 AM
Post
#1
|
|
|
Newbie ![]() Group: Members Posts: 7 Joined: 29-October 06 Member No.: 32,437 |
Hello;
If you are running a website that offers free image hosting, than this is for you ! If the image hosting script you are using is a bit poor, hackers can use this to upload their "php shell" and be able to do modifications to your site !!! You might say this wouldn't happen to you ! ... but it happened with me ... My website is mostly a familly web-site, so all my familly checks it, and when the hackers acted ... i got humiliated I had to delete everything they put, and disable the image hosting service, but all this after i got humiliated ... so watch out guys !! |
|
|
|
Nov 6 2006, 03:04 PM
Post
#2
|
|
|
ointment! ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 542 Joined: 2-September 04 From: Bat Country Member No.: 980 |
What was the hosting script that you used? Just so we know what to look out for...
|
|
|
|
Nov 25 2006, 03:34 PM
Post
#3
|
|
|
Newbie [Level 3] ![]() ![]() ![]() Group: Members Posts: 49 Joined: 29-October 06 Member No.: 32,450 |
that could happen but if youre upload script only allows pictures... its a slighter less chance to have that.
|
|
|
|
Nov 25 2006, 06:11 PM
Post
#4
|
|
|
A clever man learns from his own mistakes, a WISE man learns from those of OTHERS ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 884 Joined: 12-April 06 From: Essex, UK Member No.: 21,719 |
QUOTE that could happen but if youre upload script only allows pictures... its a slighter less chance to have that. less likely yes, but not impossible. There is a way to get php to execute within an image as some signatures you see do, the ones which display your IP, OS etc... the only way i know of doing this is to write the php code yourself and specify an image document type but im sure there is an exploit somewhere which will allow such images to be uploaded. As a rule i wouldnt normally allow people to upload their own images just because its risky in what they might upload, including illegal images and codes etc... It might be an idea to try to add a feature to let people specify a URL to an image already hosted and to have them uplaod these images on some other professional image host. Might defeat the point tho! |
|
|
|
Nov 27 2006, 03:06 PM
Post
#5
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 659 Joined: 16-April 06 From: Texas Member No.: 21,945 |
well sorry to hear about that but I hope for those who are running image hosting sites please beware..
|
|
|
|
Nov 28 2006, 05:51 AM
Post
#6
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 30 Joined: 23-November 06 Member No.: 33,877 |
I think there is a procedure in PHP to make sure that the input would not be parsed as PHP script.
The same thing which is used to prevent SQL injection |
|
|
|
Dec 23 2006, 05:09 AM
Post
#7
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 293 Joined: 17-December 05 From: Error 404 Member No.: 15,848 |
If I recall correctly, Image Shack used to have a vulnerability to something like this and some forms of spyware were actually trying to slip their way in, along with the image upload. Eventually, they had something scripted in that blocks anybody who has cool web search and the like from uploading anything.
|
|
|
|
Dec 25 2006, 07:44 AM
Post
#8
|
|
|
Newbie [Level 1] ![]() Group: Members Posts: 10 Joined: 13-December 06 Member No.: 35,211 |
I wrote a upload script in PHP a few years ago that allowed users to upload jpg/gif images. The 3 important things that must be in an upload script are:
1. Check the file's name (in my case ensure it's a .jpg or .gif and not a anything else) 2. Check the file's CONTENT-TYPE 3. Set the permissions of the file so that it isn't allowed to be "executed" (read/write only) Also, I dynamically renamed the files so that: 1. Overwriting existing files of the same name wouldn't be a problem 2. More secure: if the above methods failed, at least the file would have an arbitrary name of randomname.jpg instead of something like index.gif.php Finally, be careful about allowing users to upload files into a directory visible from the web. |
|
|
|
Jan 10 2007, 03:21 AM
Post
#9
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 196 Joined: 25-October 06 Member No.: 32,173 |
Mind telling us which picture hosting website you used? Please let me know so that I can set a rules in my forum to prevent any damage from occuring.
|
|
|
|