Computer >> Máy Tính >  >> Lập trình >> HTML

Trang web WP bị tấn công? Quét &làm sạch trang web WordPress bị tấn công

WordPress bị tấn công - hai từ này gây ra nỗi sợ hãi và bối rối trong lòng quản trị viên trang web.

Một trang web WordPress bị tấn công có thể đồng nghĩa với việc mất:

  • Giao thông;
  • Doanh thu;
  • Giá trị Thương hiệu;

Và rất nhiều ngày vật lộn trong việc cố gắng và không thể làm sạch nó.

Điều này đặc biệt đúng đối với các trang web WooCommerce, nơi bạn có thể thấy cửa hàng của mình đang thua lỗ trong trang tổng quan!

Phần khó hiểu nhất là bạn có thể thậm chí không hiểu liệu trang web WordPress của bạn có thực sự bị tấn công hay không. WordPress có thể hoạt động sai khá nhiều.

Vì vậy, hầu hết mọi người làm điều hợp lý và cài đặt một plugin quét phần mềm độc hại. Sau đó, họ nhận ra rằng hầu hết trong số họ không làm tốt công việc dọn dẹp trang web.

Phần tồi tệ nhất?

Trong khi bạn đang đấu tranh để đưa cuộc sống của mình trở lại đúng hướng, tin tặc mong rằng bạn sẽ thất bại lúc dọn dẹp trang web của bạn.

Đã đến lúc nhấn nút đặt lại.

Trong bài viết này, chúng tôi sẽ giúp bạn:

  • Tìm hiểu để chắc chắn xem trang web của bạn có bị tấn công hay không;
  • Tìm ra loại phần mềm độc hại nào đã lây nhiễm trang web bị tấn công WP của bạn;
  • Dọn dẹp trang web bị tấn công bằng WordPress của bạn trong 3 phút;
  • Hiểu hậu quả của việc bị tấn công;
  • Tìm hiểu cách bạn có thể bị tấn công và cách bạn có thể ngăn chặn nó;

Chúng tôi sẽ giúp bạn trở lại đúng hướng cho dù tình huống có như thế nào.

Hãy đi sâu vào.

TL; DR: Cách hiệu quả nhất để khắc phục trang web WP bị tấn công của bạn là sử dụng plugin Dọn dẹp trang web bị tấn công W P . Có những cách khác để làm điều đó, nhưng chúng tôi khuyên bạn không nên sử dụng các phương pháp dọn dẹp thủ công vì chúng có thể phá hủy hoàn toàn trang web của bạn.

Bạn có thực sự có trang web bị tấn công không?

Chúng tôi biết rằng bạn đang bối rối.

Bạn thậm chí có một trang web bị tấn công?

Bản chất của WordPress là nó có thể bị trục trặc khá nhiều. Trong nhiều trường hợp, trang web không bị tấn công. Nó chỉ là… thường xuyên gặp rắc rối.

Vì vậy, cách dễ dàng để biết chắc chắn rằng trang web của bạn đã bị tấn công là gì?

Cài đặt trình quét phần mềm độc hại MIỄN PHÍ của MalCare.

Cần:

  • 1 phút để cài đặt;
  • 1 phút để quét trang web của bạn;

Trong 2 phút, bạn sẽ biết chắc chắn liệu mình có trang web bị tấn công hay không.

Máy quét phần mềm độc hại của MalCare là một plugin siêu nhẹ tạo bản sao trang web WP bị tấn công của bạn trên một máy chủ chuyên dụng. Sau khi tạo bản sao, MalCare chạy các thuật toán quét phức tạp để xác định chính xác phần mềm độc hại trên trang web của bạn.

Bằng cách này, quá trình quét sâu hơn và chính xác hơn bất kỳ plugin nào khác của trình quét phần mềm độc hại.

Phần tốt nhất?

Hoàn toàn không có tải trên máy chủ của bạn. Ngoài ra, nó hoàn toàn miễn phí.

MalCare sử dụng một thuật toán học tập để tiếp tục trở nên thông minh hơn theo thời gian bằng cách đối mặt với nhiều phần mềm độc hại hơn.

Dưới đây là những gì bạn cần làm để quét phần mềm độc hại trên trang web của mình:

  • Bước 1:Cài đặt MalCare trên trang web của bạn
  • Bước 2:Để trình quét phần mềm độc hại tự động chạy trên trang web của bạn

Đó là tất cả!

Toàn bộ quá trình này chỉ mất vài phút. Nếu MalCare gợi ý - bạn không có Trang web WP bị tấn công, thì thay vào đó bạn cần lời khuyên khắc phục sự cố WordPress.

Nhưng nếu MalCare nói rằng bạn có một trang web WordPress bị tấn công, thì bạn cần phải làm theo quy trình dọn dẹp sau này.

Dù bằng cách nào, trước tiên bạn cần phải quét trang web của mình bằng MalCare.

Các hiện tượng phổ biến của một số trang web bị tấn công bằng WordPress

Hãy chẩn đoán trang web WordPress của bạn bị tấn công ngay bây giờ.

Chúng tôi sẽ xác định chính xác vấn đề và tìm cách khắc phục để bạn có thể quay lại kiếm tiền một lần nữa.

Rất có thể bạn đã tìm thấy bài viết này vì một hoặc nhiều triệu chứng trong số này.

Đừng lo lắng.

Chúng tôi có các bài viết về cách xóa các vụ tấn công phổ biến và khi chúng tôi xác định được vấn đề của bạn, chúng tôi có thể thảo luận về giải pháp.

Ngay cả khi trang web bị tấn công bằng WordPress của bạn có phần mềm độc hại không phổ biến, có một số tin tốt:

“Hầu hết tất cả phần mềm độc hại đều là biến thể của một số phần mềm độc hại khác. Phần mềm độc hại chỉ là mã vào cuối ngày. Có nhiều cách để hack một trang WordPress và nhiều cách để lây nhiễm nó. Nhưng cách thức hoạt động của tin tặc hầu như luôn không đổi. Hiểu được kết quả là cách tốt nhất để hiểu về vụ hack - và sau đó xóa nó đi ”

- Akshat Choudhary, Giám đốc điều hành của MalCare

Tóm lại: bạn cần tìm cách làm sạch trang web của mình để ngăn chặn tin tặc và kiểm soát lại cuộc sống của bạn.

Hãy cùng xem các triệu chứng phổ biến nhất của trang web bị tấn công bằng WordPress:

1. Google Chrome hiển thị cảnh báo khi truy cập trang web của bạn

Một trong những dấu hiệu dễ nhận biết nhất cho thấy trang web của bạn bị tấn công là Google Chrome cho khách truy cập của bạn biết rằng “trang web phía trước có chứa phần mềm độc hại”.

Trang web WP bị tấn công? Quét &làm sạch trang web WordPress bị tấn công

Thông báo trình duyệt cho các trang web bị tấn công WordPress đến từ Duyệt web an toàn của Google.

Trên thực tế, Opera, Chrome, Firefox và Safari đều sử dụng danh sách đen của Google để xác minh các trang web bị xâm phạm và thông báo cho người dùng về phần mềm độc hại.

Một thông báo như thế này có thể phá hủy danh tiếng và lưu lượng truy cập của bạn ngay lập tức. Đối với các trang web WooCommerce, nó có thể kết thúc hoàn toàn hoạt động kinh doanh của bạn.

Nếu đây là những gì bạn đang trải qua, hãy hít thở sâu. Chúng tôi hiểu bạn đang bực mình như thế nào lúc này. Đây là một trong những thông báo mơ hồ nhất từ ​​trước đến nay. Đó là một thông báo rất công khai rằng trang web của bạn bị tấn công. Đồng thời, nó cho biết KHÔNG GÌ về những gì thực sự sai.

Sau đó, hãy tiếp tục để đọc cách làm sạch một trang web bị tấn công bằng WordPress.

2. Google Search Console gửi thông báo cho biết trang web của bạn bị tấn công hoặc có phần mềm độc hại

Nếu một phần chính của doanh nghiệp của bạn là dựa vào SEO, thì bạn không còn lạ gì với Google Search Console. Nếu Google phát hiện nội dung độc hại trên trang web bị tấn công bằng WordPress của bạn, Google sẽ gửi cho bạn một thông báo trên Search Console có dạng như sau:

Trang web WP bị tấn công? Quét &làm sạch trang web WordPress bị tấn công

Google sẽ khuyến nghị bạn sử dụng ‘Tìm nạp như Google’ để tìm mã độc hại. Nhưng đây không phải là một ý kiến ​​hay. Sử dụng máy quét của Google là tốt cho quá trình quét ở cấp độ bề mặt. Những gì nó làm là tìm kiếm mã độc hại rõ ràng trong HTML và javascript của trang web.

Vậy, vấn đề là gì?

Vấn đề là một trang web bị tấn công WordPress thường bị nhiễm phần mềm độc hại được ẩn rất kỹ. Máy quét HTML không đủ để xác định nguồn gốc của vụ hack.

Chúng tôi khuyên bạn nên sử dụng máy quét cấp máy chủ để phát hiện ra vấn đề thực sự.

Đăng ký MalCare để quét bằng một cú nhấp chuột và nó sẽ tìm thấy phần mềm độc hại phức tạp nhất trong 60 giây.

Tài nguyên bổ sung:Cách xóa Cảnh báo “Trang web này bị tấn công” của Google

3. Công ty lưu trữ của bạn đã vô hiệu hóa trang web của bạn

Hầu hết các công ty lưu trữ đều quét máy chủ của họ thường xuyên để tìm các trang web bị tấn công bằng WordPress. Có một số dấu hiệu cho thấy các công ty lưu trữ đang tìm kiếm:

  • Sử dụng tài nguyên CPU quá mức
  • Email rác được gửi đi hàng loạt
  • Các miền nằm trong danh sách cấm trên Google, Norton Safe Web, Spamhaus, v.v.

Và họ thường gửi một email rất khó hiểu:

Trang web WP bị tấn công? Quét &làm sạch trang web WordPress bị tấn công

Trong một số trường hợp nhất định, các công ty lưu trữ thậm chí có quan hệ đối tác với các công ty lưu trữ để quét phần mềm độc hại thường xuyên. Hãy xem bài viết này về cách MalCare cung cấp cho Cloudways bảo vệ bot.

Nếu đây là tình huống bạn đang gặp phải, thì bạn cần nhanh chóng hành động trước khi quá muộn.

Một số công ty lưu trữ như GoDaddy sẽ cố gắng thúc đẩy dịch vụ bảo mật của riêng họ đối với bạn. Mặc dù đây có vẻ là một ý tưởng hay nhưng thực sự không phải vậy. Hầu hết các dịch vụ này sẽ tính cho bạn RẤT NHIỀU tiền mỗi khi bạn bị tấn công. Cũng có thể mất vài tuần để làm sạch trang web của bạn bằng một dịch vụ.

Trong thời gian chờ đợi, trang web của bạn sẽ tiếp tục mất lưu lượng truy cập, doanh thu và giá trị thương hiệu.

Đọc tất cả về cách MalCare đã giúp các trang web WordPress bị tấn công trên GoDaddy.

4. Cổng đi 80, 443, 587 và 465 cho tài khoản của bạn bị chặn

Các nhà cung cấp dịch vụ lưu trữ như BigRock, GoDaddy và HostGator trước tiên sẽ đưa ra cảnh báo trước khi họ xóa trang web của bạn. Khi họ gửi cho bạn một email cảnh báo, họ cũng sẽ khóa các cổng gửi đi 80, 443, 587 và 465 để phần mềm độc hại trên trang web của bạn không lây lan.

Trang web WP bị tấn công? Quét &làm sạch trang web WordPress bị tấn công

Hầu hết các tài khoản của họ là tài khoản lưu trữ được chia sẻ .

Vì vậy, ưu tiên hàng đầu của họ là chứa phần mềm độc hại và ngăn một trang web bị tấn công bằng WordPress lây nhiễm sang các trang khác trên cùng một máy chủ.

Một lần nữa, nếu bạn chưa làm như vậy - hãy quét trang web của bạn để tìm phần mềm độc hại ngay lập tức.

5. Khách hàng Khiếu nại về việc Thẻ tín dụng của Họ bị Tính phí Bất hợp pháp

Người dùng WooCommerce: Nếu bạn có một trang web WordPress bị tấn công, đây là một trang web lớn dành cho bạn.

Bạn biết chắc rằng trang web của mình bị tấn công nếu khách hàng của bạn phàn nàn về việc thẻ tín dụng của họ bị sử dụng mà không được phép. Cơ sở dữ liệu WooCommerce lưu trữ tất cả thông tin mà tin tặc cần để lấy cắp thông tin thẻ tín dụng.

Thông thường, đây là dấu hiệu của một cửa sau trong mã - một điểm vào trong một trang web bị tấn công bằng WordPress mà tin tặc có thể sử dụng để truy cập vào các tệp và cơ sở dữ liệu của bạn bất cứ lúc nào họ muốn.

Kiểu tấn công này hoàn toàn có thể đến từ bất kỳ loại phần mềm độc hại nào được viết đủ tốt.

Hãy tiếp tục và tìm hiểu cách làm sạch trang web bị tấn công bằng WordPress của bạn.

6. Email của bạn đã được gửi đến thư mục thư rác

Nếu hộp thư đến của bạn gửi quá nhiều email spam, hầu hết các hộp thư đến sẽ gửi thẳng các email trong tương lai của bạn vào thư mục spam.

Trang web WP bị tấn công? Quét &làm sạch trang web WordPress bị tấn công

Tin tặc có thể sử dụng trang web bị tấn công bằng WordPress của bạn để gửi rất nhiều email spam cho người dùng trên khắp thế giới.

Nếu thư mục ‘Đã gửi’ của bạn chứa đầy các email mà bạn CHẮC CHẮN đã không gửi, hãy xem bài viết của chúng tôi về những việc cần làm nếu trang web của bạn đang gửi email spam.

7. Trang web của bạn trở nên rất chậm

Tốc độ trang web không phải là một chỉ báo tuyệt vời về phần mềm độc hại. Có rất nhiều thứ có thể làm chậm trang web WordPress. Cách đơn giản nhất để hiểu điều gì đang xảy ra là truy cập GTMetrix và tạo báo cáo tốc độ trang web.

Mẹo chuyên nghiệp: Sử dụng biểu đồ Thác nước để hiểu những thành phần nào trên trang web của bạn mất nhiều thời gian nhất để tải.

Trang web WP bị tấn công? Quét &làm sạch trang web WordPress bị tấn công

Nếu bạn thấy điều gì đó khác thường ở đây, bạn có thể đã bị nhiễm phần mềm độc hại.

Một số cuộc tấn công độc hại phổ biến nhất làm chậm trang web của bạn là:

  • Chèn SQL
  • Các cuộc tấn công bằng tiền xu
  • Các cuộc tấn công bạo lực bởi bot

Tin tốt là tất cả các bản hack này đều có thể được dọn sạch.

Chỉ trong trường hợp bạn cảm thấy hơi mất hứng: Đừng lo. Cảm thấy hơi choáng ngợp là điều hoàn toàn bình thường. Chúng tôi đã kinh doanh lĩnh vực này hơn 8 năm nay. Đó là lý do tại sao chúng tôi không chú ý đến mã độc và các loại hack khác nhau. Đối với một người mới làm quen với thế giới này, điều này có thể hấp dẫn rất nhiều - đặc biệt nếu bạn đang xử lý một trang web WordPress bị tấn công lần đầu tiên.

Đó chính xác là lý do chúng tôi tạo ra MalCare.

Cài đặt bộ tính năng bảo mật đầy đủ của MalCare để quét, dọn dẹp và bảo vệ trang web của bạn 24 × 7.

8. Quảng cáo &Cửa sổ bật lên Mở ra Khi Truy cập Trang web của Bạn

Nếu bạn nhận thấy một số quảng cáo và cửa sổ bật lên mà bạn không tự đặt thì bạn cần trợ giúp ngay bây giờ. Chúng tôi đã đối phó với phần mềm độc hại như vậy khá thường xuyên. Đây là một dạng khác của trang web mà chúng tôi thấy rất nhiều.

Phần tồi tệ nhất về phần mềm quảng cáo là nó có thể hút một phần lớn lưu lượng truy cập của bạn. Thiệt hại lâu dài đến từ việc những cửa sổ bật lên này hoàn toàn có thể gây tổn hại đến danh tiếng của bạn. Một trang web bị tấn công bằng WordPress có thể hiển thị quảng cáo về ma túy bất hợp pháp, khiêu dâm và thù hận chính trị.

Không thú vị.

Hầu hết các quảng cáo và cửa sổ bật lên đều xuất phát từ các cuộc tấn công SQL injection. Vì vậy, nếu bạn thấy quảng cáo và cửa sổ bật lên trái phép, bạn cần phải dọn dẹp cơ sở dữ liệu của mình.

QUAN TRỌNG: Đừng cố gắng làm sạch cơ sở dữ liệu của bạn nếu bạn có một trang web WordPress bị tấn công trừ khi bạn có nhiều kinh nghiệm với tư cách là quản trị viên cơ sở dữ liệu. Nó hoàn toàn có thể phá hỏng trang web của bạn.

9. Trang web của bạn đang được chuyển hướng đến các trang web bị tấn công

Chúng tôi đã đề cập đến vấn đề này trước đây, nhưng không hiểu rõ hơn điều đó:

Bạn có một trang web bị tấn công bằng WordPress.

Điều này có thể xảy ra theo nhiều cách khác nhau. Hầu hết, đó là mã chuyển hướng trong tệp wp-config.php hoặc .htaccess.

Một số triệu chứng có thể xảy ra bao gồm:

  • Trang web của bạn hiển thị một trang trống và không tải
  • Trang web của bạn được chuyển hướng đến một số trang web độc hại
  • Trang web của bạn chuyển hướng bạn đến Google
  • Google không thể truy cập trang web của bạn
  • Tệp .htaccess của bạn tiếp tục được sửa đổi

Hãy xem bài viết của chúng tôi về trang web WordPress chuyển hướng sang Spam để biết chi tiết về phần mềm độc hại và cách dọn dẹp nó.

10. Bạn thấy lưu lượng truy cập tăng vọt, đôi khi trên các trang không tồn tại

Tin tặc có thể sử dụng trang web WordPress bị tấn công để ‘gửi quảng cáo thư rác’.

Điều này gây ra một lượng truy cập tăng đột biến. Email spam được gửi từ máy chủ của bạn với các liên kết đến các trang hiện có hoặc trang mới được tạo bởi tin tặc.

Quảng cáo spam có thể phá hoại blog, trang web, diễn đàn và phần bình luận bằng các siêu liên kết để có được thứ hạng công cụ tìm kiếm cao hơn cho trang web của tin tặc.

Tất nhiên, điều này không còn hoạt động nữa - bất kỳ ai trong SEO sẽ cho bạn biết điều đó .

Đó là một kỹ thuật blackhat rất lỗi thời và bị Google bỏ qua hoàn toàn. Nhưng đồng thời, tin tặc đang lấp đầy trang web bị tấn công WordPress của bạn không thực sự quan tâm đến điều này. Phần mềm độc hại sẽ phá hủy trang web của bạn giống nhau.

Một số chẩn đoán đơn giản để chạy

Ngoài các triệu chứng này, có 4 chẩn đoán đơn giản mà bạn có thể chạy để xem liệu bạn có trang web bị tấn công WordPress hay không:

1. JavaScript trông lạ mắt trong mã trang web của bạn

Nếu có Javascript trông khác lạ trong mã trang web của bạn và bạn có thể hiểu điều đó, bạn là một người khá kỹ thuật.

Nếu bạn không phải là dân kỹ thuật, đây là những gì nó có thể làm với một trang web bị tấn công bằng WordPress:

Rất may, đây là một vụ hack có thể được xác định rõ ràng hơn một chút.

Bạn có một trong những phần mềm độc hại này trên trang web bị tấn công WordPress của mình:

  • Chuyển hướng WordPress bị tấn công
  • Tập lệnh XSS
  • Chèn SQL

Hãy hết sức cẩn thận!

Những vụ tấn công này cuối cùng dẫn đến việc làm hỏng trang web. Nếu bạn không thực hiện hành động ngay bây giờ, bạn có thể mất quyền kiểm soát trang web WordPress bị tấn công rất nhanh chóng.

Điều tồi tệ nhất là Javascript có thể ở bất cứ đâu trên trang web bị tấn công WordPress của bạn.

2. Bạn Tìm thấy Thông báo Lỗi Không mong muốn trong Nhật ký Lỗi của mình

Không phải mọi người dùng WordPress đều kiểm tra nhật ký lỗi của họ.

Nếu bạn là một trong số ít những người siêu kỹ thuật có thể thực sự đọc và hiểu nhật ký lỗi, thì không có nhiều điều mà bạn chưa biết.

Tất cả những gì chúng tôi có thể nói với bạn là bạn đã hiểu đầy đủ về mức độ thiệt hại mà tin tặc có thể gây ra nếu họ có quyền truy cập không hạn chế vào trang web của bạn.

Chuyển đến phần bạn tìm hiểu cách sửa trang web bị tấn công bằng WordPress của mình.

3. Bạn Tìm người dùng quản trị mới hoặc tài khoản FTP mà bạn chưa tạo

Đây là một khó khăn cho các trang web lớn. Có thể rất khó để theo dõi các tài khoản quản trị viên và tài khoản FTP đáng ngờ.

Nhưng nếu bạn nhận thấy điều này, thì đã đến lúc kiểm tra các tệp lõi WordPress của bạn. Một trang web WordPress bị tấn công thường bị lây nhiễm theo cách có thể ảnh hưởng đến toàn bộ trang web. Điều này làm cho các tệp cốt lõi của WordPress trở thành mục tiêu lý tưởng.

Trong một số trường hợp, có một mã thực thi ẩn trong các tệp trông lành tính. Thật kỳ lạ, nó thậm chí có thể được ẩn trong một tệp favicon.ico! Chỉ cần xem bài viết của chúng tôi về phần mềm độc hại chuyển hướng bị tấn công trên WordPress. Tài khoản quản trị giả và tài khoản FTP rất phổ biến đối với phần mềm độc hại như vậy.

4. Các tệp đã được sửa đổi gần đây

Với hầu hết các phần mềm độc hại, tin tặc lây nhiễm đầu tiên vào một trang web bị tấn công WordPress bằng mã độc hại trộn lẫn với mã WordPress bình thường.

Cách đơn giản nhất để làm điều đó là chèn mã đó vào các tệp WordPress như wp-config.php, .htaccess, v.v.

Chỉnh sửa các tệp trên trang web bị tấn công WordPress là một chủ đề lặp lại với phần mềm độc hại như wp-vcd.php. Một biện pháp phòng ngừa đơn giản là thu hồi quyền chỉnh sửa đối với các tệp cốt lõi của bạn. Tuy nhiên, nếu trang web WordPress của bạn đã bị tấn công, thì bạn cần phải dọn dẹp trang web ngay lập tức.

Mẹo chuyên nghiệp: KHÔNG xóa bất kỳ thứ gì khỏi tệp và bảng cơ sở dữ liệu trừ khi bạn chắc chắn 100% rằng đó là tệp độc hại.

Cách làm sạch trang web bị tấn công bằng WordPress

Có hai cách để làm sạch một trang web bị tấn công bằng WordPress:

  • Bạn có thể sử dụng trình quét và dọn dẹp phần mềm độc hại;
  • Hoặc, bạn có thể tìm hiểu thủ công mã trang web của mình và làm sạch mã.

Đối với tất cả các ý định và mục đích, chúng tôi không bao giờ khuyên bạn nên thực hiện dọn dẹp thủ công.

Đã từng.

Tại sao? Nó quá nguy hiểm.

Một trang web bị tấn công bằng WordPress thường có mã độc ẩn bên trong mã lành tính nếu không có mã này thì trang web sẽ không hoạt động. Việc xóa các đoạn mã theo cách thủ công có thể dẫn đến việc phá vỡ trang web vĩnh viễn.

Bạn có thể nghĩ rằng bạn có thể khôi phục trang web của mình từ một bản sao lưu. Nhưng làm cách nào để biết bản sao lưu cũng không bị nhiễm? Bản sao lưu có thay thế các tệp bị nhiễm không?

What we do recommend, however, is to use a WordPress malware scanner and cleaner plugin.

How to Clean a Hacked WordPress Website Using MalCare

The purpose of a malware scanner and cleaner is to make it easy to find, pinpoint, and clean an infected website.

The sad thing is:

  • Most malware scanners can’t pinpoint the origin of a complex malware;
  • They resort to crude methods of scanning that raise false alarms;
  • After the scan, most security plugins require a manual cleanup;
  • Manual cleanups are expensive and you pay through your nose when you’re in a pinch;
  • And then you get charged extra for repeat hacks.

Tóm lại: The security plugin that is supposed to protect your website holds you up for ransom and then provides you with a flimsy solution at best.

That’s exactly why we recommend that you scan your site using MalCare.

MalCare offers a complete suite of security features that will scan, clean, and protect your WordPress website from malware attacks by hackers.

With the most advanced learning algorithms to support it, MalCare is by far the best WordPress Security Plugin there is that keeps getting smarter over time.

We know that this can sound a bit biased, so here are a few important stats about MalCare to remember:

  • One-click instant malware removal in 3 minutes or less;
  • 99% of malware are automatically detected and cleaned without any manual cleanup;
  • Less than 0.1% false positives flagged across a network of 250,000+ websites;
  • No extra charges ever and no B.S.;
  • All for $99/year!

If this sounds good to you, we can make it better with just two words:

True. Story.

If you haven’t already, install MalCare and clean your WordPress hacked website today.

Here’s how you can do it:

Bước 1:Đăng ký MalCare

Đăng ký plugin MalCare từ trang web của chúng tôi.

Trang web WP bị tấn công? Quét &làm sạch trang web WordPress bị tấn công

Bước 2:Quét trang web của bạn

Sử dụng MalCare để tự động quét trang web của bạn:

Trang web WP bị tấn công? Quét &làm sạch trang web WordPress bị tấn công

Bước 3:Làm sạch trang web của bạn bằng 1 cú nhấp chuột

Nhấp vào 'Tự động làm sạch' để làm sạch ngay lập tức:

Trang web WP bị tấn công? Quét &làm sạch trang web WordPress bị tấn công

Once all this is done, you should definitely check out our guide on protecting your site from future attacks.

You get all this for just $89/year!

Tham gia 250.000 trang web khác và cài đặt MalCare ngay hôm nay.

How to Clean a Hacked WordPress Website Manually (NOT RECOMMENDED)

Cleaning a hacked WordPress website manually is made of primarily three parts:

  • Scanning the server for malicious code in files;
  • Scanning the database for malicious code;
  • Detecting backdoors and fake admin accounts;

And then, remove malware from your hacked WordPress website.

This is an oversimplification, though.

In many cases, you may well have been blacklisted by Search Engines and blocked by your web host. In such an instance, it’s not enough to just clean your site, but also take measures to remove the website from a blacklist.

But let’s just get started:

#1 Looking for Malicious Code in WordPress Files and Folders

The most obvious way in which malware can be injected into a WordPress hacked website by a hacker is by uploading a file straight up. This is rarely the case, but worth a try.

Look for files that have a suspicious name. Start with the WordPress folders such as:

  • wp-content
  • wp-includes

These are folders that should not contain any executable files. If there are any PHP or javascript files here, then that’s a bad thing.

Pro Tip: Look especially for PHP files. PHP by itself cannot execute javascript code without an HTML view. Javascript typically injects content into the frontend. The first thing you would need to get rid of is the PHP code.

If this doesn’t work out, keep reading.

#2 Looking for Malicious String Patterns

Most malware leaves some common bits of code called string patterns across a WordPress hacked website.

So, the next step is to head over to WordPress files and search for these bits of code. Typically, you will find them in the core WordPress files such as:

  • wp-config.php;
  • .htaccess
  • wp-activate.php
  • wp-blog-header.php
  • wp-comments-post.php
  • wp-config-sample.php
  • wp-cron.php
  • wp-links-opml.php
  • wp-load.php
  • wp-login.php
  • wp-mail.php
  • wp-settings.php
  • wp-signup.php
  • wp-trackback.php
  • xmlrpc.php

CAUTION: Do NOT attempt this unless you understand PHP deeply. As you can see, almost all the files in WordPress are PHP files with the exception of .htaccess. Many of these strings could be part of regular code. Deleting something based just on this list could break your site.

Look for snippets such as:

  • tmpcontentx
  • function wp_temp_setupx
  • wp-tmp.php
  • derna.top/code.php
  • stripos($tmpcontent, $wp_auth_key)

If these two ideas didn’t work, we have some even more advanced ideas that you can try.

#3 Checking the functions.php File

The functions.php file is one of the most popular targets in any hacked WordPress website.

So, take a quick look at that file too.

It’s difficult to say exactly what you should be looking for here. Depending on the malware, you could have different types of malicious code in the file.

You may want to check if the functions.php code is adding unauthorized features into a theme or a plugin. This is agonizingly difficult to find at the best of times and it’s desperately tricky to get right.

A few simple ways to check if the functions.php file has been tampered with are:

  • If the hack is a very visible one like a hacked redirect, try changing the theme and check if the problem persists.
  • Check and see if updating the theme resolves anything. Mostly it won’t help at all, but it’s worth a shot.
  • Try logging into your WordPress dashboard. If you can’t, it might be because of malicious code in the functions.php file.

If any of these ideas show even a slight change, then you know that functions.php is a good place to start looking.

#4 Run a Diffchecker Against WordPress Core Files

A diffchecker is a program that checks two pieces of code and spots the differences between the two.

Here’s what you can do:

  • Download the original WordPress core files from the GitHub repository.
  • Download the files from your server using cPanel.
  • Run a diffchecker between the two files.

The worst part about this idea is that you would have to go through each file on a WordPress hacked site one at a time and check for differences. Of course, you would then have to find out if the different code is malicious or not.

If this seems too technical or sounds like it’s too much work, we recommend that you install MalCare.

It’s a quick, easy, and affordable fix.

Why Did Your Site Get Hacked?

They say that prevention is better than cure.

We agree. But honestly, it’s not that simple when you’re talking about WordPress hacked websites.

Hackers create 300,000 new pieces of malware daily. This means that almost all security software out there becomes obsolete or irrelevant within days, if not hours.

Most WordPress hacked sites have one or more of these vulnerabilities:

  • Outdated WordPress Version: Lots of webmasters think that updating the WordPress version can break their site. This is true to a certain extent. But not updating WordPress on your site is a far worse idea. WordPress openly declares its vulnerabilities and outdated versions get easily exploited by hackers. We recommend using a staging site to test out the updates and then roll it out after fixing all the bugs.
  • Outdated themes and plugins: Outdated WordPress themes and plugins usually have exploits that are very well document and easy for hackers to find. If there are updated versions out there, just update the software. It’s worth taking the time to do it.
  • Pirated Plugins and Themes: If you’re using nulled or pirated plugins and themes, then 100% you have a WordPress hacked site on your hands. Use a free alternative if you don’t want to pay for a plugin or theme. It’s that simple.
  • Unsecured WordPress Login Page: WordPress login pages are easy to find and highly susceptible to brute force attacks. There is no protection against bots by default. The best you can get in an off-the-rack WordPress installation is a Multiple Login Attempts blocker. Honestly, it’s way too easy to get past those plugins as well.
  • Weak Passwords: You’d be shocked how often it’s your own fault that you got hacked. The most common passwords are something weak like ‘p@ssword’ or ‘Password@1234’. It takes less than 1 second for a brute force algorithm to get past something like that. Do NOT trust simplistic rules like including numbers and special characters to judge password strength. Those measures are grossly insufficient.
  • WordPress Roles: Do NOT leave the default WordPress user role as an administrator. WordPress has multiple user roles for a reason. If too many people have admin access, you are more likely to get hacked. The worst part? You’ll get hacked time and again without realizing why that’s happening to you.
  • Ability to Execute Codes in Unknown Folders: Executable code, especially PHP code should only stay within trusted folders. Ideally, folders containing the WordPress core files, theme files, and plugins are the only folders that should have executable code.
  • Running Website on HTTP: If your website is still running on HTTP and not on HTTPS, then you are simply inviting hackers to gift you a WordPress hacked site. And if you’re running a WooCommerce site without an SSL certificate, then God help you. Install an SSL certificate or risk having all your information stolen.
  • Setting Incorrect File Permissions: This may seem inconsequential, but incorrect file permissions can give hackers the option to write code into an unprotected file. All your WordPress files should have 644 value as file permission. All folders on your WordPress site should have 755 as their file permission.
  • Unprotected WordPress Configuration wp-config.php File: The wp-config.php file loads up whenever someone tries to log in to your site and it contains all your database credentials. If left unsecured, a hacker can gain access to your database using the file. It’s a simple enough fix, though. Just add this little code snippet to your .htaccess file:
<files wp-config.php>
order allow, deny
deny from all
</files>
  • Changing the WordPress Database Prefix: The default WordPress database prefix is ‘wp_’ and you can change this during the installation of WordPress on your site. Leaving this unchanged makes it really easy for hackers to guess your database names. So, we highly recommend changing the database prefix in the wp-config.php file.

As you can probably understand, there are way too many ways in which you can get hacked.

But as general rules:

  • Install a powerful firewall and bot protection for your website
  • Install an SSL certificate that will protect your site from further attacks
  • Stop using nulled themes and plugins
  • Do not trust any vendor implicitly – always check the URLs for everything you do
  • If you ever suspect any foul play at all, scan and clean your website immediately

Honestly speaking, most malware doesn’t start damaging your WordPress hacked site immediately. If you can scan and find malware early on, you can successfully remove it without causing any damage at all.

For this purpose, we highly recommend that you scan your site for malware right away.

Post-Hack Measures:How to Prevent Your Site From Getting Hacked Again

The rest of this article is about stronger security measures that you can take to protect your website from malware attacks. We’ve also explained some of the most common security jargon so that you don’t feel lost with some other resources.

Feel free to go through them all and if you have any questions, drop us a line.

Install a Firewall to Keep Out Malicious Traffic from Your Site

A firewall is a layer of protection that shields your website from incoming traffic. It acts as a barrier between a trusted and untrusted network. In this case:a barrier between a bot and your site that prevents WordPress hacked sites from ever coming into existence.

In simple terms: if your website is getting any malicious traffic or attempted hacks, a firewall prevents the website from receiving such traffic.

A WordPress firewall is specifically designed to protect WordPress websites from getting hacked. It runs between your site and the internet to analyze all the incoming HTTP requests. When an HTTP request contains malicious payload the WordPress firewall drops the connection.

Just as a malware scanner looks for malicious malware signatures in WordPress hacked websites, a WordPress firewall will scan for malicious HTTP requests.

Some rare firewalls like the one we use in MalCare can actually learn from previous attacks and get smarter over time. MalCare can analyze incoming traffic and recognize a malicious IP from a huge database it has compiled by protecting 250,000+ sites.

Once an HTTP request is flagged by MalCare as suspicious or malicious, your website won’t even load WordPress. It’ll be as though there WAS no malicious traffic.

Pro Tip: MalCare actually logs all attempted connections with your site in the traffic logs. So, if you’re using MalCare, try to keep tabs on the type of traffic you’re getting. Every login attempt is color-coded so that you can analyze it at a glance.

Trang web WP bị tấn công? Quét &làm sạch trang web WordPress bị tấn công

The two most common hacks that installing a firewall can protect against are brute force attacks and DDoS attacks. Let’s go over both in brief so that you know what to expect from them.

What is a Brute Force Attack?

A brute force attack is a way of guessing your access credentials by literally using every possible password there is. It’s a simple and inelegant hack. The computer does all the hard work and the hacker sits tight waiting for the program to do its job.

Typically, a brute force attack is used for two purposes:

  • Reconnaissance: A bot uses brute force to find vulnerabilities that it can exploit
  • Infiltration: A bot tries to guess the access credentials to gain control of the WordPress hacked website

The most primitive type of brute force attack is the dictionary attack where the program uses a list of password combinations based on certain assumptions about the password.

A weak form of dictionary attacks is credential recycling where it uses usernames and passwords from other successful hacks to try and break into your website.

But the more modern variant is an exhaustive key search. These kinds of brute force attacks literally try out every possible combination of all possible characters in a password.

Pro-Tip: An exhaustive key search brute force algorithm can crack an 8-character password with capital and lowercase letters, numbers, and special characters in two hours. Always create long, random passwords with a good mix of characters to make it more difficult.

Attackers also use brute force attacks to look for hidden web pages. Hidden web pages are live pages that are not linked to other pages. A brute force attack tests different addresses to see if they return a valid webpage, and will seek out a page they can exploit.

Bonus Pro-Tip: If you see a sudden uptick in traffic for no apparent reason, check your analytics. If you see a bunch of 404 errors from pages that don’t exist, you’re probably under attack by a brute force bot.

You can prevent a brute force attack by:

  • Using longer passwords
  • Using more complex passwords
  • Limiting login attempts
  • Implementing Login Page Captcha
  • Setting up WordPress Two-Factor Authentication

This goes without saying, but you also need a seriously powerful firewall for your WordPress website. A firewall on top of all these preventive measures will help you protect your business from hackers trying to brute force their way in.

As an alternative to all this, you can install MalCare. MalCare comes with a built-in premium firewall that spots suspicious traffic and prevents your website from even loading the WordPress login page.

To learn more about Login Protection checkout our Guide on WordPress Login Security.

What is a DDoS Attack?

A distributed denial-of-service (DDoS) attack is a malware attack that sends too much traffic to your WordPress website for your server to handle.

Hackers don’t hack just one website or device. Instead, they establish an entire army of hacked devices and websites to direct focused DDoS attacks.

The collection of compromised devices used for a DDoS attack acts on an internet called a botnet. Once a botnet is established, the hacker remotely sends instructions to it and causes other servers to be overwhelmed by a huge surge of traffic.

Pro-Tip: If your website is loading very slowly or if your web host refuses to serve your website, check your analytics immediately. DDoS attacks work in patterns that can be discerned:

  • Traffic originating from a single IP address or IP range;
  • Traffic from users who share a single behavioral profile, such as device type, geolocation, or web browser version;
  • An unexplained surge in requests to a single page or WooCommerce endpoint;
  • Traffic spikes at odd hours of the day or a spike every 10 minutes;

These are all symptoms of a DDoS attack.

One of the major motivations behind a DDoS attack is extortion under the threat of destruction of property. The only way to prevent a DDoS attack is to use an effective firewall that can clamp down on suspicious traffic immediately.

Install an SSL Certificate to Secure Your Traffic

SSL Certificates are now the staple for almost all cPanel hosting providers and resellers. An SSL certificate is a small digital file that encrypts an organization’s details. Commonly, SSL certificates, when installed, binds:

  • A domain name, server name, or hostname;
  • And the organization’s identity and location.

This secure connection ensures that the traffic between the server and the browser is encrypted.

Before we get into the kind of security an SSL certificate provides, let’s understand how it works.

SSL certificates use a method of encryption called public key cryptography.

Public key cryptography uses two sets of keys for encryption – a public key and a private key. It’s in many ways similar in concept to WordPress Salts and Keys.

In this kind of encryption, if:

  • Angelina sends Brad a message, then the message is locked using Brad’s public key.
  • But for Brad to read the message, he must unlock it using his private key.

If a hacker intercepts the message without having Brad’s private key, they will only see encrypted code that not even a computer can decrypt.

What is Man-In-the-Middle Attack?

A MITM attack is when a third party intercepts a communication between two people. Here, the hacker is essentially a ‘man in the middle’.

This might sound all fun and frivolous, but this is a very dangerous attack. The hacker can effectively see every request coming in and out of your website including all transactions.

If the hacker can’t get admin access, they can send your users fake web pages that can grab their access credentials.

Imagine this for an instant:

The credit card, the phone number, the email address – everything your users submit on your WordPress hacked website is openly accessible to a hacker.

The simplest way to protect against attacks like this one is to install an SSL certificate.

Pro-Tip: Check all your web pages for the ‘https’ in the URL. If there are pages missing out on that, you may have a mixed content issue. Fix that as soon as possible. A brute force attack could find the vulnerable pages and push for a MITM attack.

Implement WordPress Hardening and Basic Hygeine

This segment is all about protecting your WordPress website from getting hacked again.

Now, the simplest thing you can do is to implement WordPress hardening measures. Hardening makes sure that even if your website gets hacked again, the hacker can’t really edit any files and databases.

Another major tip we have:stop using nulled themes and plugins. Nulled themes and plugins are essentially cracked versions of the plugin. The only problem is that nulled themes and plugins are usually chock full of malware.

Also, if you are using a lot of plugins, be careful of zero-day vulnerabilities. A zero-day vulnerability is essentially a security flaw that the developers and vendors know about, but haven’t really fixed. Many WordPress hacked websites have plugins with zero-day vulnerabilities.

The most troubling part about a zero-day vulnerability is that people assume that updating the plugin or theme can automatically fix the WordPress hacked website. That’s not true, though. You will have to clean up the website first and then update the software to prevent future hacks.

What Are The Consequences of Getting Hacked?

One of the major questions that we get all the time is – why does it matter if my website gets hacked? Unless it completely defaces the website, why should I even care?

Short answer: you really should care because a hacked website can severely damage your business even if it isn’t visibly defacing your website.

A WordPress hacked website can damage your traffic, revenue, and brand value (more on this soon).

But the biggest reason to care is:

Almost all malware is created with the intent to make money off your hard work.

In essence, you spend a lot of time and money on building traffic and revenue, and then because you have a WordPress hacked website, the hacker makes money instead of you.

Không thú vị.

How Hackers Make Money Off Your WordPress Hacked Site

Hackers make money from your website by using your traffic and here’s how it works:

  • Illicit ads and pop-ups redirect a huge portion of your traffic to other sites and the hacker gets paid for that traffic.
  • URL redirections work in the same way – the hacker can redirect the traffic from your WordPress hacked website to make some quick cash.
  • If a hacker gets into a WooCommerce website, they can steal the credit card information of your buyers.
  • In some cases, a hacker can redirect to a page that looks like yours. When people buy something from the fake page, the hacker gets paid and you never get to know about it.
  • A hacker can easily replace a bank account linked to your WooCommerce store. You’ll still make the sales number, but the hacker steals all the money.

Let’s put this into perspective:

It’s not just you who’s getting hacked. And it’s definitely not just you who’s unprepared for a WordPress hacked website.

People in America panic a lot more over cybersecurity than personal security:

Trang web WP bị tấn công? Quét &làm sạch trang web WordPress bị tấn công
Image source:news.gallup.com

A study of more than 4,000 organizations across the US, UK, Germany, Spain, and the Netherlands found that 73% of companies are not ready for a cyber attack. (Source:hiscox.co.uk)

We know this sounds bad. But honestly, this is just the tip of the iceberg with WordPress hacked websites.

Believe it or not, it actually gets much worse in the long term.

In the long term, a WordPress hacked website can:

  • Completely stop traffic to your business because it got blacklisted
  • Destroy your brand’s reputation because no one wants to be a victim of cybercrime
  • Essentially destroy your revenue channels by destroying trust and stealing traffic

Đó thậm chí không phải là phần tồi tệ nhất.

The worst part is that the hack may not even have visible consequences. You might be getting robbed on a daily basis without ever knowing it.

Now, maybe a security plugin flags a malware along with 10 other false alarms. And maybe you do see it. How often do you take action and check out all the alarms?

And even if you do find the malware and clean it, even if you miss a single backdoor on your WordPress hacked website, you can get infected all over again.

The simplest way to get out of this vicious cycle is to install an automatic malware scanner and removal tool.

Kết thúc

Now that you know how to scan and clean a WordPress hacked website, just take the time to set up security measures to prevent future hacks. You have successfully defeated the hacker. You can now go back to building your business after you set up the basic security measures.

Bonus Tip: You can set up WordPress hardening manually or install MalCare and do it in 3 minutes or less.

It’s time to take a sip of hot, steaming tea and relax – especially if you’re a MalCare user. You never have to worry about WordPress security again.

If you have any questions, feel free to drop a comment below. We have a team of WordPress security experts who can help you resolve any issue you might face.

Until next time!