Protect your website from hackers

How to protect your website from hackers

Creating and maintaining a website or a web application requires a lot of hard work, and if enough security measures are not taken, then even a single attack from a hacker could ruin that. If you own a website, you should have taken security measures to make your website secure. If not, follow the steps given below and make your website secure.

Don’t give users access to your admin area –

The admin area of your website is a separate part from where you control and manipulate all the activities of your users, create, update or delete the material. If access to this part is open to everyone, it could prove to be dangerous for your website. For security purposes, you should always keep the information of the admin part to be private to you and the team members (To whom you want to give access).

Always Use an SSL Certificate –

An SSL Certificate which stands for ‘Secure Socket Layer’ Certificate should be an important part of your website as it ensures the secured transmission of information. While an SSL certificate is an integral part of such websites that involves transmission of sensitive information like credit/Debit Card information, bank account details, an SSL certificate nowadays is owned by many websites and web applications.

An SSL certificate needs to be installed on an application’s server so that a secured connection could be initiated with the browsers. Once it is successfully installed, all the traffic between the web server and the client browsers will be secured. After the installation of the certificate, the protocol ‘HTTP'(HyperText Transfer Protocol) would be changed to ‘HTTPS’ in which the ‘S’ stands for ‘secure’. This can be seen by a lock icon at the beginning of the site URL.

Apart from securing your information an SSL certificate also –

  • Increase the ranking of the website on google.
  • Builds trust with the customers.

Prevent SQL Injection –

This is one of the most common techniques by which a hacker can get unauthorized access to your website. An SQL injection is commonly used by the attackers to bypass login by modifying the SQL query.SQL injection is a type of attack in which the attacker puts malicious SQL statements inside form fields. That SQL statement then is used by the attacker to fetch data from the involved database.

A simple example of an SQL injection –

Below given is a SQL query that returns all the data from the ‘users’ table on the basis of a particular set of usernames and passwords.

select * from users where username = 'aman' and password = 'aman1989'

But if a user passes something like “aman’;–” in the username field of the login form and attempts to log in, the query would be modified to the following form.

select * from users where username = 'aman';-- ' and password = 'aman1989'

In the above query, the part after — would be avoided and the final query would be like

select * from users where username = 'aman'

By doing this the attacker bypass the login without having to enter the password.

To prevent SQL injection attacks, you should always validate the input fields, allowing only particular types of characters to be taken. Apart from this always use prepared statements or parameterized queries.

Cross-Site Scripting (XSS) attacks –

Cross-Site Scripting (XSS) is also a code injection attack. In this attack, the attacker aims at executing malicious scripts in a web browser of the victim by including malicious code in a web page. When the victim visits a particular web page containing malicious code, the attack occurs. The web page that contains the malicious code acts as a source to transfer malicious code to the user’s browser.

The web page or web applications that use unsanitized user input in the output are highly vulnerable to XSS attacks. These types of attacks are possible in ActiveX, Flash, VBScript, however, they are very common in Javascript as Javascript deals with the client-side of the web applications and websites.

To keep your application safe from XSS attacks, you should always sanitize your input.

Use security plugins –

If your website is built with a Content Management System like WordPress, you can use the following plugins to secure your website against attackers –

Security Plugins for WordPress –

  • Sucuri Security
  • Wordfence Security
  • iThemes Security
  • Bulletproof Security

Security Extensions for Joomla –

  • RSFirewall
  • BadBot Protection
  • JomDefender
  • EyeSite

Security Options for Magento – 

  • Amasty
  • MagaFence
  • Watchlog Pro

Update your platform and software –

If you have built your website with WordPress, you should always keep the CMS up to date. Whenever there is an updated version available, update to that. You should also keep the plugins updated.

Encrypt Your Passwords –

Encryption is the process of converting the original representation of text into a coded form. The original text is known as plain text, while the coded form is called ciphertext. For instance – If a password is  ‘John1024’, its encrypted form would be something like ‘@#I*arb?’.

Stay updated about your website –

Always stay updated about the functionality of your website/web application. So that if there are any loopholes, you could be able to fix them.

Leave a Comment

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