You need to enable JavaScript to use the communication tool powered by OpenWidget

How to protect your website from hacking

Website attacks can be targeted—when the attacker targets a specific site—or mass attacks—when the attacker exploits a vulnerability in the CMS (content management system). In this article, we'll discuss the causes of these vulnerabilities and how to protect your website from hacking.

Why are websites hacked?

Most often, websites are hacked by those seeking to make money dishonestly. A hacker might hack your website:

  • for sending spam;
  • to participate in the botnet (DDoS-attacks);
  • to redirect traffic;
  • to order (for example, to hack a competitor’s website).

The most common methods of hacking are through CMS vulnerabilities, password guessing, and by sending Trojan programs.

Where do CMS vulnerabilities come from?

Users often install unverified plugins on their websites. Hackers leave their own information in the plugin's code, which allows them to access hosting files. Using special code, they upload so-called "shells" to the site.

Shells are software that provides access to website files without additional authorization or with authorization in which only the attacker knows the shell password. Shells are often disguised as CMS system files.

CMS developers regularly release updates with new security settings. If you're using an out-of-date version of a CMS that's no longer supported by the developer, the risk of being hacked increases. These versions typically use outdated functions that can be used to access files.

Hacking often occurs through feedback forms. When creating such a form, use secure data validation, for example, prohibit the use of HTML code or programming language codes. You can also use conversion to secure text. Otherwise, an attacker can upload any file to the hosting site and execute it on the hosting server.

Older versions of TynyMCE editor have a file upload form. This allows an attacker to upload any file to the server, including a shell, for further hacking.

The most important thing for a hacker is to gain access to the files. Then they can do whatever they want with them.

How to protect yourself from hacking and how to find vulnerabilities

It's difficult to completely protect yourself from hacking, but you can reduce the likelihood of it.To do this:

  1. Use the latest versions of CMS and its components.
  2. Download and install the CMS and its components only from the developers' official websites.
  3. Install special CMS plugins that protect against hacking and scan for infected files.
  4. Change the default links in the CMS administration panel. This will protect you from password-guessing attacks and unnecessary load on your hosting server.
  5. Please close comments on the site or, if you use them, install bot protection.
  6. Use secure passwords - at least 8 characters, consisting of lowercase and uppercase letters, numbers, and additional characters.

What to do if your website has been hacked

If your website has been hacked, it's likely that hidden shells are already loaded into the site's folders. Antivirus software may be useless. Even if you remove most of the malware, shells will still appear, and rolling back the site to earlier versions may not help.

The best solution is to delete everything on the hosting, saving the site files first, and reinstall the CMS from scratch. To do this:

  1. Download the CMS from the developer's official website or install it via Installatron in the "Software" menu of the cPanel control panel.
  2. Install from official .
  3. Check if any third-party code has been embedded into your website files (check with your website developer).
  4. Upload the website files to the hosting.

What do shells look like?

Finally, we will show you examples of shells.

This is what a shell looks like in a web browser

Source code of different shells

A script integrated into a website to send spam without the website owner's knowledge

 

  • Helpful articles

    • Glossary

      • Latest news & promotions

          Loading…