Causes and Solutions for Malware or Virus Alerts Due to Code Injection

This article explains malware or virus alerts that may appear on hosting services and cause your website to be listed as insecure or potentially dangerous in browsers and search engines.

How does malware get onto my service?

The most common ways are:

1. Insecure password

An easy-to-guess password can allow a third party to access your service via the control panel or FTP. Avoid simple passwords (names, addresses, phone numbers).

A secure password should have at least 8 characters and include uppercase and lowercase letters, numbers, and symbols (for example: @#~$).

2. PC infected with viruses or spyware

Do not access your panel or FTP from public places (cybercafes, etc.). Scan all PCs used to manage the service with an up-to-date antivirus. Spyware can steal saved passwords and grant unauthorized access.

3. Outdated or misconfigured applications

CMS platforms such as Joomla, WordPress, or others, when installed without security measures or left outdated, often contain vulnerabilities that can be exploited by third parties.

Considerations regarding CMSs

CMS platforms allow you to manage your website through a web interface. They must be updated regularly: many updates fix security flaws that, if left unpatched, can be exploited.

In many cases, an attacker modifies page code (especially the index file) using a technique known as an iframe attack: adding lines that load another page without the visitor noticing, in order to boost external site rankings or infect the PCs of people browsing your website.

How to remove the virus or alert?

  1. Backup and password change: log in via FTP, download all website content to your PC, and change your FTP password from the control panel.
  2. PC scan: scan your computer with updated antivirus and antispyware software.
  3. Manual file review: in your local copy of the site, look for malicious code in HTML and PHP files.

Suspicious code: hidden iframes

Look for <iframe> tags with hidden styling that do not belong to your site:

<iframe src="http://UN_DOMINIO.COM"
style="visibility: hidden; display: none">
</iframe>

Suspicious code: encoded document.write

Also look for document.write followed by encoded text:

<script language="javascript">
document.write( unescape( '%70%61%67%65%20%6F%6E%65' ) );
</script>

Remember: if you find code like in the examples, remove those sections.

Verify that all src= and http:// instances point to files on your site or to known, trusted external sites.

Manually check for any .php, .js, .htm, .html, .asp, .aspx, .inc, .cfm, etc., files that do not belong to your site.

Restoring the clean site

Once you are certain the site is clean:

  1. Connect via FTP, delete all content from public_html (cPanel) or your panel's web root folder, and upload the reviewed files.
  2. Clear your browser cache (usually Ctrl + Shift + Del or Ctrl + F5).

If Google flagged the site as suspicious

You must request a review by completing the form at:

Note: The Google warning usually disappears within up to 7 days, once it scans the site again and detects no malicious code.

Need help?

If you cannot identify or remove the infection, contact technical support through the client portal or the website's live chat. You can also consult knowledge base articles on sites flagged as unsafe in search engines.

  • Malware o Virus por acciones de Code Injection, code injection, alertas de malware, virus spyware, tengo un virus en el servicio, wordpress vulnerado, malware virus, eliminar virus del servicio, codigo malicioso, google marco web como sospechosa, codigo sospechoso en mi sitio, Activando el soporte PHP
  • 29 Users Found This Useful
Was this answer helpful?

Related Articles

I purchased the service but my domain does not work

This article explains the most frequent causes why a domain does not work and how to check them....

Out of space, how to fix it

This article explains what to do if you run out of space on your contracted Web Hosting service....

Bandwidth limit exceeded, my website is not working

This article explains what the Bandwidth limit exceeded message means and what options you have...

Traceroute and obtaining IP address

This article explains how to perform a traceroute (tracert) and how to obtain the public IP of...

Common issues related to FTP connections

This article describes solutions to frequent problems in FTP connections. The examples use the...