What To Do When Your Website Is Hacked

What To Do When Your Website Is Hacked

What to do when your website is hacked

If you’ve discovered that your website has been hacked, it’s important to take immediate action to regain control and prevent further damage. Here are some steps you can take based on the information found in the provided web search results:

  1. Stay calm and don’t panic. It’s important to approach the situation in a calm and rational manner.
  2. Isolate your computer. If your website has been hacked, there’s a chance that your computer may also be infected with malware. Disconnect your computer from the internet and isolate it from other devices.
  3. Contact your hosting provider. They may be able to help you identify and fix the issue.
  4. Change your passwords and review access. Make sure to change all passwords associated with your website and any other accounts that may have been compromised.
  5. Create a backup of your website. Before attempting to fix the hack, it’s important to have a backup of your website in case something goes wrong.
  6. Scan your computer and website for infections and malware. Use antivirus software to scan your computer and a website scanner to scan your website.
  7. Clean your website of any hacked files and remove malware. You may need to enlist the help of a professional to thoroughly clean your website and ensure that it’s secure.
  8. Check All User’s Activity: First check all users on whole servers, meaning check all sFTP users, FTP users, Admin/Backend Users, and MySQL Database Users and if you find any unknown users then remove them immediately.
  9. Find any suspicious Files or functions: Below are some functions that you can try to search in your server. These are the functions that as per our knowledge has been found in hacked website.
    You need to check all the files and database that no suspicious code is present. You need to make sure that things like Credit cards are not being stolen etc..
    permission_octal2string
    relative2absolute
    path_is_relative
    simplify_pathrelative2absolute
    highlight_file
    listing_page
    is_executable
    curl_setopt($ch,CURLOPT_URL, base64_decode  
  10. Harden your website security. Update software, reset configuration settings, set up backups, and install a website firewall.
  11. Communicate with your users. Let them know that your website was hacked, what steps you’re taking to fix the issue, and what they can do to protect themselves.
  12. Add Firewall: Add a Firewall like Cloudflare, Sucuri, or at least CSFirewall also mod_security
  13. If you think your website is running normally and getting sales does not mean that your website is not hacked or compromised, Keep a habit of scanning your code every day using online tools like Sucuri, etc. Just like our computer need antivirus website also needs an scanner which scan your website at regular internal.

By taking these steps, you can minimize the damage caused by a website hack and prevent it from happening again in the future.

Dhaval Thakkar

Blogger by Nature and Loves to write and Believe that Anybody Can Write. I am also RedHat Linux Certified and AWS Certified.