Protect A Website From Being Defaced Or Hacked


A website defacement occurs when the hacker changes the visual appearance of a website, usually replaces the website's index.html file with his own file, which may contain the hacker's message or any thing related to it.

There are many techniques that can be used to deface a website, However one of the most common technique used for defacement is simple SQL Injection, which allows the hacker to gain administrative access to the website. Some times the hacker may manage to gain root access to the webserver and therefore may cause a Mass defacement, replacing the index files of all the website available on that particular servers. This may be difficult when done manually, however there are many scripts that automatically do it.


If you are a webmaster and looking forward to protect your website from being defaced or hacked you are in the right place. AntiDef is a tool written in java, specially designed for the purpose of protecting a website from being defaced or hacked.  The usage is quite simple, all the server manager should do is to run this application with the following parameters:

  • Path to the copy of the website(source).
  • Path to the application directory. 
  • Path to log directory. 

How Does This Tool Work?

The tool compares the source and the destination files, if they are found to be different it replaces the files with the backup or original files.