Web application security is the priority for organizations as websites are the primary targets for malicious hackers. These hackers corrupt prominent websites and use them to spread malware, viruses, and spams. Website administrators, therefore, must be aware of each vulnerability that hackers might exploit to corrupt the website. Most common website vulnerabilities associated with websites are cross-site scripting, SQL-injection, and their variants.
Five of the prominent Website Vulnerabilities & their solutions –
1. Hack Detection (.htaccess)
Problem
A .htaccess otherwise known as Hypertext access file is a directory-level configuration file which is incorporated into websites for configuring site-access functionalities such as URL redirection, and access-security control. It’s an easy point of attack for hackers, who use this file to redirect search engines malicious sites, hide malware, inject content and modify the php.ini values.
Solution
Website administrators must create the backup of all the .htaccess files on their site, and then open the suspicious file using a text editor and browse through the contents. Typical hack attack includes an addition of several blank lines in the file before the malicious content, then a further addition of will add their malicious code and usage of “tab” to move the code lines over to the right. Thereby, administrators must ensure to check the code by scrolling both to the right and to the bottom.
2. Cross Site Scripting (XSS)
Problem
Hackers resolve to cross-site scripting (XSS) attacks to inject malicious scripts into trusted websites. They use a malicious code into a web application, disguising as a browser side script to a different end user. Such web applications use user input within the output, without validating or encoding it. Hence, the end user doesn’t know about the virtue of the script and executes the script nevertheless. On execution, the malicious script gains access to any cookies or session tokens that the browser retains, and can even rewrite the HTML page’s content.
Solution
As a security measure, you must not insert untrusted data anywhere in the script except in allowed locations. Additionally, you must incorporate HTML Escape before inserting untrusted data into the HTML Content. JavaScript Data Values must be checked before insertion, while JSON values included in an HTML context must be read with JSON.parse along with the rest of the data.
Related Read:- A Brief Guide to Remove Malware from Your PC
3. MySQL Injections
Problem
By SQL injection, hackers insert any partial or complete malicious SQL query through the data input or the data received by the web application from the browser. Subsequently, hackers can gain access to sensitive data from the database, execute admin level operations on the database, modify database data through insertion or deletion, retrieve the content of an existing file on the DBMS, or write files into the file system. Such attacks are divided into three classes: in-band, out-of-band and inferential(also known as blind).
Solution
Thereby, you must monitor all the web server responses and review the HTML/javascript source code. It’s important that you test each field separately by varying only one variable, while keeping others constant, to precisely understand the vulnerability of parameters.
4. IP Cloaking
Problem
IP cloaking is one technique used by hackers to distribute malware on a website, undetected by search engines and other online scan services. Hackers can easily extract sensitive information such as the details of your internet provider, router, and browser information. Subsequently, they can gain access to your computer and any information stored on it. They can also cloak or hide their IP address with yours, implying that any activity done by the hackers would eventually trace back to you. Additionally, hackers can send malware to your computer thereby, corrupting the data onto your computer.
Solution
Hackers take advantage of the open ports assigned to various services in our systems such as FTP , HTTP, and those including TCP/UDP ports. Once they have access to these ports, they’re able to hack into system by exploiting a service on a port. To nullify this incursion, we need to scan all of the open ports first, using port scanner tools such as Nmap (network mapper) for possible vulnerabilities. Subsequently, we need to install a reliable firewall program such as Comodo or enable windows firewall, which equip us with the ability to filter ports.
5. Hidden iFrames
Problem
Hackers don’t use any kernel bug, Apache bug, PHP application vulnerability, CPanel or Plesk bug. Instead, they set up uncorrupt sites and equip them with hacking tools such as Mpack. The tool detects the browser of an unsuspecting user and extracts passwords via key logging. Once this hidden iframe code reaches the user’s pages, any additional users visiting that site, are redirected to an infected website. And so the cycle continues. In case, any user possesses an FTP or root password for any sites the hackers use a code to add the hidden iframe to all the index type pages instantly. If it’s a single user account, merely changing the FTP password would resolve the issue.
Solution
Administrators need to immediately access any secure computer in the hosting environment and login into the hosting account control panel. Then they need to change the hosting control panel password along with all the ftp passwords. Once this is achieved, administrators need to download all the web server files in a local computer, and review every web page file in a text editor for presence of any malicious code snippet. Please note that merely scanning for <iframe> tag would not help, for hackers incorporate code obfuscation and embed obfuscated code. Subsequently, delete all the files on the server and upload the clean files. You would also need to reformat the hard disk of the infected computer which was used to access the host, and install an antivirus to minimise any insurgencies in the future.
Bottom Line
Website security is one thing organization insist on incorporating within their web content. Scrutinising and re-mediating any possible website vulnerabilities beforehand gives an upper hand to website administrators while dealing with hackers. To learn more about possible infections, website vulnerabilities and backdoors that might corrupt your website, give us a call at +91-120-466 3031 or fill our contact form, and we will get back to you.