Computer >> 컴퓨터 >  >> 프로그래밍 >> HTML

해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

귀하의 웹 사이트가 이상하게 작동합니까? 방문자를 불미스러운 사이트로 리디렉션하거나, 검색 결과에 스팸을 표시하거나, 사이트의 머리글이나 바닥글에 표시되는 코드와 같은 단순한 내용도 포함합니다.

WordPress 사이트가 해킹된 것으로 의심되는 경우 웹사이트에서 악성 코드가 있는지 즉시 검사하세요.

  • 나쁜 소식은 사이트가 해킹당할 수 있다는 것입니다.
  • 고칠 수 있다는 좋은 소식입니다.
  • 좋은 소식은 사이트 복구에 도움이 되는 최고의 리소스를 찾았다는 것입니다.

우리는 20,000개 이상의 해킹된 WordPress 사이트를 정리했습니다. 우리는 존재하는 거의 모든 종류의 해킹을 보았습니다.

더 중요한 것은 귀하의 사이트를 복원하고 추가 피해로부터 보호할 수 있도록 도와드리겠습니다.

요약: MalCare로 무료로 웹사이트를 스캔하여 WordPress가 해킹되었는지 확인하세요. MalCare는 한 번의 클릭으로 해킹의 모든 흔적을 찾아 수술적으로 제거합니다. 해킹은 WordPress 사이트에 더 오래 남아 있을수록 기하급수적인 피해를 입힌다는 점을 기억하세요.

WordPress 해킹 복구 이해

WordPress 해킹 복구는 사이트가 처음에 어떻게 해킹되는지, 그리고 해킹된 WordPress 사이트를 수정한다는 것이 무엇을 의미하는지 이해하는 것부터 시작됩니다.

이는 4단계 프로세스입니다.

  • 사이트에서 해킹 코드(백도어 포함)를 검색하세요.
  • WordPress 해킹 제거
  • 해킹으로 인한 피해 복구
  • 향후 WordPress 해킹이 발생하지 않도록 방지
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

해킹으로 인해 기업과 개인에게 수백만 달러의 손실 발생 . 우리는 훼손된 사이트, 스팸 페이지와 링크로 가득 찬 사이트, SEO 순위 충돌, 심지어 법적 문제까지 목격했습니다.

더 나쁜 것은 해킹된 WordPress 사이트를 정리하는 데 많은 돈을 쓸 수 있으며 다음날 다시 나타날 수 있다는 것입니다.

그리고 마지막으로 해킹은 시간이 지날수록 기하급수적으로 악화됩니다 . 해커가 귀하의 사이트를 제어하게 되면 데이터를 훔치고, 리소스를 훔치고, 귀하의 사이트를 이용하여 다른 사이트를 해킹할 것입니다. 이러한 이유로 많은 웹 호스트가 계정을 일시 중지합니다.

💡 따라서 빠르고 단호하게 행동하고 해킹된 WordPress 사이트를 수정하는 가장 효과적인 방법을 선택해야 합니다. 그것에 따라 많은 것이 있습니다.

1단계. WordPress 사이트에서 해킹이 있는지 심층 스캔

MalCare로 웹사이트를 무료로 검사 WordPress가 해킹되었는지 확인하세요. 귀하의 웹사이트에 존재하는 악성 코드에 대해 명확한 답변을 얻으실 수 있습니다. 

해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

여러 가지 이유로 MalCare를 권장하지만 주로 웹사이트에서 수천 건의 해킹을 확인하고 제거했기 때문입니다. 당황한 웹사이트 관리자는 웹사이트에 로그인할 수 없거나 웹 호스트가 악성 코드가 감지되어 계정을 정지했다는 이유로 매주 우리에게 이메일을 보냅니다.

MalCare의 스캐너는 완전히 무료로 사용할 수 있습니다. 사이트가 해킹되었는지 여부에 대한 최종 보고서를 받은 후에는 자동 청소 기능을 사용하여 파일과 데이터베이스에서 즉시 악성 코드를 제거하도록 업그레이드할 수 있습니다. 

해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

멀웨어 스캐너가 많이 있는 MalCare를 사용하는 이유는 무엇입니까?

MalCare는 맬웨어를 식별하기 위해 파일 일치에 의존하지 않지만 코드에서 100개 이상의 신호를 확인하는 정교한 알고리즘을 갖추고 있습니다. 안전하거나 위험하다고 표시하기 전에.

다른 보안 플러그인은 파일 일치를 사용하여 맬웨어를 식별합니다. 스캐너는 해킹 서명 데이터베이스와 비교하여 부차 코드를 확인합니다. 일치하는 항목이 발견되면 악성 코드로 간주됩니다.

불행하게도 이는 잘못된 프로세스로 인해 오탐과 악성 코드 누락이 발생합니다. 새로운 해킹이 있다고 상상해보세요. 서명은 분명히 데이터베이스에 없으며 메커니즘은 바로 실패합니다.

사이트 정밀 스캔이 필요한 이유는 무엇인가요?

해킹의 유형은 다양하므로 악성 코드는 여러 위치에 다양한 변종으로 존재할 수 있으며 다양한 방식으로 나타날 수 있습니다 .

예를 들어, WordPress 리디렉션 해킹의 변종 중 하나는 웹사이트의 모든 게시물과 페이지를 감염시킵니다. 때로는 수백, 수천 개가 감염되기도 합니다.

게다가 해킹은 예측할 수 없습니다. 오히려 예측할 수 없도록 설계되었습니다. 해커는 관리자를 혼란스럽게 하고 악성 코드를 가능한 한 오랫동안 숨겨두기를 원합니다. 따라서 멀웨어로 인해 웹사이트가 이상하게 작동할 수 있지만 항상 그런 것은 아닙니다 .

예를 들어 관리자는 악의적인 리디렉션을 한 번 본 다음 다시는 보지 않습니다. 방화벽에 결함이 있다고 생각할 수도 있습니다. 언젠가는 스팸 광고 팝업을 보게 될 수도 있습니다. 그 사람이 당신의 광고 관리자였나요?

그것이 버그인지 아니면 상상인지 의심스러울 만큼 충분합니다.

💡 해킹된 WordPress 사이트의 여러 증상을 확인했더라도 이것이 해킹의 결정적인 지표는 아닙니다. WordPress가 해킹되었는지 여부를 알 수 있는 유일한 방법은 웹사이트를 검사하는 것입니다.  

사이트를 검사하는 다른 방법

온라인 프런트엔드 악성 코드 스캐너

웹사이트를 검사하는 두 번째 대안은 온라인 보안 스캐너를 사용하는 것입니다. 온라인 보안 스캐너는 WP 보안 플러그인보다 효율성이 떨어집니다. 

프런트엔드 스캐너의 문제점은 웹사이트의 공개적으로 보이는 부분에만 액세스할 수 있다는 것입니다. 구성 파일이 인터넷의 모든 사람에게 표시되는 것을 원하지 않기 때문에 공개적으로 표시되지 않는 코드를 갖는 것이 좋습니다.

하지만 안타깝게도 멀웨어는 공개적으로 보이는 파일만 공격할 만큼 사려깊지 않습니다 . 어디든 숨을 수 있으며 실제로는 프런트엔드 스캐너가 도달할 수 없는 곳에 숨어 있습니다. 이것이 바로 서버 수준 스캐너가 가장 효과적인 이유입니다. 

해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

💡 우리의 조언은 첫 번째 진단 방법으로 온라인 보안 스캐너를 사용하는 것입니다. . 긍정적인 결과가 나오면 청소를 시작하는 좋은 출발점이 됩니다. 그러나 주의 사항:스캐너가 제공하는 해킹된 파일 목록에만 의존하지 마십시오. 스캐너가 플래그를 지정할 수 있는 것은 바로 이러한 것입니다. 잠재적으로 악성 코드의 인스턴스가 훨씬 더 많이 있을 수 있습니다.

악성코드 수동 검사

기사에 이 섹션을 포함하고 있지만 맬웨어를 수동으로 처리하려는 사람은 검색이나 치료를 수행하지 않는 것이 좋습니다. 

MalCare와 같은 좋은 보안 플러그인은 이 섹션에 있는 모든 작업을 더 빠르고 더 효과적으로 수행할 수 있기 때문에 실제로 가야 할 길입니다. WordPress 해킹은 방치된 시간이 길어질수록 더욱 악화된다는 점을 기억하세요. 

웹사이트에서 멀웨어를 검사한다는 것은 본질적으로 파일과 데이터베이스에서 정크 코드를 찾는 것을 의미합니다. 우리는 '정크 코드'가 지침 측면에서 거의 의미가 없다는 것을 알고 있지만 해킹은 다양한 형태로 나타납니다. 그들은 각각 다르게 보이고 행동합니다. 

우리는 이후 섹션에서 해킹의 코드 예제를 제공했지만 이는 단지 예시일 뿐이라는 점을 강조해야 합니다. 

웹사이트에서 악성 코드를 수동으로 검사하려는 경우 최근 수정된 파일을 확인하세요. , 파일과 데이터베이스를 모두 확인하세요. 여기서 주의할 점은 업데이트 시간도 변경될 수 있다는 것입니다. 영리한 해커는 업데이트된 타임스탬프를 완전히 다른 것으로 설정할 수 있습니다.

💡 팁: 웹사이트를 스캔할 때 작업 기록을 유지하세요. 예를 들어 모바일로 액세스할 때 웹 사이트가 이상하게 작동하는 경우 나중에 디버깅 프로세스에 도움이 됩니다. 또는 파일 중 하나에 의심스러워 보이는 스크립트 태그가 있는 경우.

해킹을 확인하는 다른 방법

사이트가 해킹되었는지 확인하는 데 사용할 수 있는 몇 가지 다른 검사가 있습니다. 이들 중 일부는 위에 나열된 증상과 약간 겹치지만, 증상이 유기적으로 나타나지 않을 경우를 대비하여 여기에 포함시켰습니다. 

  • 시크릿 브라우저에서 로그인 . 리디렉션과 같은 증상이 한 번 나타났지만 재현할 수 없는 경우 다른 컴퓨터나 시크릿 브라우저에서 로그인해 보세요. 해커는 쿠키를 설정하여 귀하의 웹사이트에서 발견되는 모든 이상 현상이 해킹의 징후가 아닌 이상 현상일 뿐이라는 착각을 불러일으킵니다. 
  • 귀하의 웹사이트를 Google에서 검색해 보세요 거기에서 클릭하면 됩니다. 귀하의 웹사이트가 올바르게 로드됩니까? 브라우저에 URL을 직접 입력해 보면 어떨까요? 그러면 어떻게 되나요? 증상을 재현하기 위해 수행한 작업을 기록해 두십시오. 모바일 장치에서 로그인하셨나요, 아니면 Google 검색 결과를 클릭하여 로그인하셨나요? 이러한 단서는 해킹 위치를 어느 정도 식별하는 데 도움이 됩니다.
  • 웹사이트의 페이지 수 확인 . 귀하는 귀하의 웹사이트에서 색인이 생성된 페이지 수에 대한 대략적인 정보를 갖고 있습니다. 사이트로 웹사이트를 Google에 검색하세요. 검색 연산자를 선택하고 결과 수를 확인하세요. 결과 수가 예상보다 훨씬 많으면 사이트의 스팸 페이지가 색인화되고 있다는 의미입니다. 
  • 활동 로그를 확인하세요. 활동 로그는 각 사용자가 무엇을 하고 있는지 보여줍니다. 새로운 사용자나 Writer에서 Admin으로 이동하는 등 역할 권한이 갑자기 증가한 사용자의 활동 로그를 확인하세요. 이상한 사용자 이름이나 이메일 주소를 찾으세요.
  • 분석 데이터에서 이상한 추세를 찾아보세요. 해킹으로 인해 Google이 귀하의 웹사이트를 완전히 색인 해제할 수 있다는 사실과는 별개로, 귀하가 찾아볼 수 있는 몇 가지 조기 경고 신호가 있습니다. 짧은 시간 내에 예상치 못한 위치에서 트래픽이 급증합니다. 갑자기 달라진 참여율도 확인해보세요. 이상 현상은 항상 조사되어야 합니다.
  • 가짜 플러그인을 찾아보세요. 웹사이트의 /wp-content 폴더에는 자신이 설치한 플러그인과 테마만 표시되어야 합니다. 짧고 의미 없는 이름을 가진 이상한 이름이 좋은 선택입니다. 가짜 플러그인은 일반적으로 폴더에 파일이 하나이거나 많아야 두 개가 있습니다.
  • .htaccess 파일을 확인하세요. .htaccess 파일은 트래픽 전달을 담당합니다. 예를 들어 웹 사이트가 모바일 장치에서 액세스되는 경우 .htaccess는 데스크톱 버전 대신 웹 사이트의 모바일 버전을 로드합니다. 핵심 WordPress 파일에 익숙하다면 .htaccess 파일을 확인하세요. 사용자 에이전트가 올바른 파일을 로드하고 있습니까? SEO 스팸 해킹이나 일본어 키워드 해킹과 같은 악성 코드는 Googlebot 사용자 에이전트의 코드를 변경합니다. 가장 일반적으로 index.php 파일을 로드해야 하지만, 해당 파일이 해킹되어 방문자가 Google에서 클릭하면 귀하의 웹사이트 대신 완전히 다른 웹사이트가 로드됩니다. 검색된 사용자 에이전트는 googlebot이 아니기 때문에 주소 표시줄의 URL을 사용하여 웹사이트를 직접 방문하면 올바른 웹사이트가 로드됩니다.
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드 리디렉션 악성코드가 포함된 .htaccess 파일

2단계. 해킹된 WordPress 사이트 정리

웹사이트 해킹을 제거하려면 MalCare를 사용하는 것이 좋습니다. WordPress 웹사이트를 위한 최고의 보안 플러그인이며 지능형 시스템을 사용하여 웹사이트를 완전히 그대로 유지하면서 악성 코드만 외과적으로 제거합니다. 

WordPress 해킹 정리에 MalCare를 사용하려면 다음 작업만 수행하면 됩니다. 

  1. 웹사이트에 MalCare 설치
  2. 스캔을 실행하고 결과를 기다립니다
  3. 검사 결과에 해킹이 표시되면 악성 코드를 자동으로 치료하도록 업그레이드하세요.
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

MalCare는 귀하의 웹사이트에서 악성 코드를 외과적으로 제거합니다. 정리는 몇 분 안에 이루어지며 귀하의 웹 사이트는 다시 한 번 깨끗해집니다. 

MalCare를 추천하는 이유는 무엇인가요? 

WordPress에는 다양한 보안 플러그인이 있지만 무엇보다 MalCare를 권장합니다. 우리가 편견을 갖고 있는 것처럼 보일 수도 있지만, 우리의 의견은 광범위한 테스트와 연구를 기반으로 합니다. MalCare는 여러 가지 이유로 최고의 보안 플러그인입니다. 

  • 파일과 데이터베이스에서 해킹만 제거하여 좋은 코드와 데이터를 완벽하게 그대로 유지
  • 오래된 악성 코드부터 최신 악성 코드까지 모든 종류의 악성 코드에 대해 작업
  • 해커가 두고 간 백도어를 탐지하고 이를 해결합니다.
  • 즉시 작동합니다. 해킹된 사이트 복구를 기다릴 필요가 없습니다
  • 보안 전문가의 무제한 악성 코드 제거 포함
  • 재감염을 방지하기 위해 중요한 사후 정리 작업을 자동화합니다.

해킹된 WordPress 사이트를 수정하는 다른 방법

보안 전문가 또는 유지 관리 서비스 고용

귀하의 웹사이트가 한동안 해킹당한 경우 웹 호스트가 귀하의 계정을 일시 중지하고 웹사이트를 오프라인으로 전환했을 수 있습니다. 따라서 해킹을 치료하기 위한 보안 플러그인을 설치할 수 없습니다. 

걱정하지 마십시오. 이러한 경우 긴급 악성 코드 제거 서비스에 문의하여 해킹된 WordPress 사이트를 수정하세요. 전담 보안 전문가가 웹 호스트와 대화하여 IP를 허용 목록에 추가하여 액세스 권한을 다시 얻은 후 청소를 위한 플러그인을 설치하는 과정을 안내할 것입니다. 

웹 호스트가 정책으로 인해 IP 화이트리스트를 거부하는 경우 전문가는 SFTP를 사용하여 최단 시간 내에 웹 사이트의 악성 코드를 제거합니다. 

MalCare 외부의 WordPress 보안 전문가와 함께 가도록 선택할 수도 있습니다. 하지만 보안 전문가는 비용이 많이 들고, 재감염을 보장하지 않는다는 점을 유의하시기 바랍니다. 수동 정리를 수행하는 많은 보안 플러그인은 정리당 비용을 청구하는데, 이는 반복되는 감염으로 인해 매우 빠르게 합산되는 비용입니다. 

WordPress 해킹 감염을 수동으로 치료

귀하의 웹사이트에서 악성코드를 수동으로 제거하는 것이 가능합니다. 실제로 극단적인 경우에는 이것이 유일한 실행 가능한 옵션인 경우도 있습니다. 그러나 우리는 이에 대해 계속해서 조언하고 있으며 아래에서 이유를 조금 더 확장했습니다. 

해킹된 WordPress 웹사이트를 수동으로 정리하기로 선택한 경우 성공하려면 몇 가지 전제 조건이 있어야 합니다. 

  • WordPress를 완벽하게 이해하고 있습니다. 파일 구조, 핵심 파일 작동 방식, 데이터베이스가 웹 사이트와 상호 작용하는 방식. 또한 플러그인, 테마, 사용자 등 웹사이트에 대한 모든 것을 알아야 합니다. 악성 코드는 중요한 파일을 포함해 모든 파일에 숨겨져 있을 수 있으며 파일만 삭제하면 웹사이트가 손상될 수 있습니다.
  • 코드를 읽고 코드 논리를 이해할 수 있어야 합니다. 예를 들어 루트 폴더에서 해킹된 파일을 제거하는 것은 좋은 일입니다. 그러나 .htaccess 파일이 로그인 시 해당 파일을 로드했다면 방문자는 404 페이지를 보게 됩니다.

    이는 알기 쉬운 일이 아니며 많은 스캐너는 사용자 정의 코드와 잘못된 코드를 구별할 수 없기 때문에 오탐지를 생성합니다.

  • 파일 관리자 및 phpMyAdmin과 같은 cPanel 도구에 대한 지식. 또한 웹사이트에 SFTP 액세스 권한이 있는지 확인하세요. 귀하의 웹 호스트가 해당 정보를 얻는 데 도움을 줄 수 있습니다.
1. 귀하의 웹사이트에 접속하세요

웹 호스트가 귀하의 계정을 정지했거나 웹사이트를 오프라인으로 전환한 경우 해당 웹사이트에 다시 액세스해야 합니다. SFTP를 사용하는 경우에는 문제가 되지 않지만 최소한 웹사이트를 볼 수 있도록 IP를 화이트리스트에 등록하도록 요청하는 것이 가장 좋습니다. 

또한 웹 호스트는 귀하의 웹사이트를 검사하고 악성 코드를 탐지한 후 귀하의 계정을 정지했습니다. 해당 지원팀에 연락하여 감염된 파일 목록을 요청할 수 있습니다. 프런트엔드 스캐너도 이 정보를 제공하지만 완전히 정확하지 않거나 오탐지가 있을 수 있습니다.

일부 호스트가 해킹된 사이트를 완전히 삭제하여 사이트를 더 이상 사용할 수 없는 경우 백업으로 이 프로세스를 시작해야 합니다.

2. 웹사이트를 백업하세요

이 점은 아무리 강조해도 지나치지 않습니다. 웹사이트에 어떤 조치를 취하기 전에 웹사이트를 백업해 두시기 바랍니다. 해킹된 사이트는 사이트가 없는 것보다 훨씬 낫습니다. 

첫째, 사람들이 웹사이트 코드를 뒤져보면 상황이 잘못될 수 있으며, 종종 그런 일이 발생합니다. 그럴 때 백업이 도움이 됩니다. 웹사이트를 복원하고 다시 시작할 수 있습니다. 

둘째, 웹 호스트는 해킹된 경우 웹사이트를 완전히 삭제할 수 있습니다. 이들은 서버에 악성 코드가 없는지 확인하는 데 큰 관심을 갖고 있으며 이를 보장하기 위해 필요한 모든 조치를 취할 것입니다. 

웹 호스트가 귀하의 웹사이트를 삭제하는 경우 백업이 있을 가능성은 희박합니다. 지원을 통해 백업을 얻는 것이 훨씬 더 얇습니다. 우리는 항상 스스로 백업하는 것을 강력히 권장합니다. 

대용량 파일에는 WordPress 백업 플러그인을 사용하는 것이 좋습니다. 웹 호스트 백업으로 인해 복원이 엄청나게 실패하는 것을 보았습니다. 웹사이트가 해킹되어 정리 중일 때 복잡성과 실패 가능성을 최대한 줄이고 싶을 것입니다.

3. WordPress 코어, 플러그인 및 테마를 새로 설치하여 다운로드하세요.

웹사이트에 있는 버전 목록을 만들고 WordPress 저장소에서 핵심, 플러그인 및 테마의 새로 설치를 다운로드하세요. 최신 버전을 사용하고 있지 않다면 웹사이트에 설치된 버전을 다운로드하세요. 설치를 사용하여 파일과 코드를 먼저 비교하게 되므로 이는 중요한 단계입니다. 

설치 파일을 다운로드하고 압축을 푼 후에는 파일 및 폴더를 웹사이트에 있는 파일 및 폴더와 비교하세요. 비교 프로세스 속도를 어느 정도 높이려면 온라인 diffchecker를 사용하여 코드의 차이점을 찾아보세요. 

또한 이 파일 일치는 대부분의 스캐너가 사용하는 기본 메커니즘입니다. 새로 설치 시 표시되지 않는 중요한 사용자 정의 코드가 있을 수 있으므로 완벽한 메커니즘은 아닙니다. 그러므로 지금은 삭제할 때가 아닙니다. 메모를 많이 하고 어떤 파일과 폴더가 원본과 다른지 표시하세요. 

이는 귀하의 웹사이트에 가짜 플러그인이 설치되어 있는지 알아내는 좋은 방법이기도 합니다. 저장소에서 가짜 플러그인을 찾을 수 없으며 플러그인 명명 규칙을 따르지 않으며 폴더에 파일이 거의 없습니다(때로는 하나만). 

참고:null 플러그인이나 테마를 사용하고 있습니까? null이 포함된 소프트웨어를 설치하는 것은 맬웨어에 대한 레드 카펫을 깔는 것과 같습니다. 프리미엄 플러그인 비용을 지불하면 유지 관리된 소프트웨어, 문제가 발생할 경우 지원에 대한 기대, 안전한 코드가 보장됩니다. Null이 있는 소프트웨어는 백도어나 악성 코드와 함께 패키지로 제공되는 경우가 많습니다.

이 단계를 더 일찍 건너뛰기로 선택한 경우 웹사이트 백업에 대한 빠른 알림입니다. 이제 출발 시간입니다. 웹사이트에서 악성코드를 제거하는 것은 이 과정에서 가장 어렵고 가장 무서운 단계입니다. 

4. WordPress 코어 재설치

cPanel 또는 SFTP의 파일 관리자를 사용하여 웹사이트 파일에 액세스하고 다음 폴더를 완전히 교체하세요. 

  • /wp-관리자
  • /wp-포함

이 폴더에는 콘텐츠나 구성이 저장되지 않으므로 문제 없이 이 작업을 수행할 수 있습니다. 실제로 이 폴더에는 새로 설치와 다른 내용이 있어서는 안 됩니다. 

다음으로 다음 파일에서 이상한 코드가 있는지 확인하세요. 

  • index.php
  • wp-config.php
  • wp-settings.php
  • wp-load.php
  • .htaccess
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드 해킹된 index.php 파일

이후 섹션에서는 개별 해킹 및 맬웨어와 이들이 파일 및 폴더에 나타나는 방식에 대해 설명합니다. 맬웨어는 다양한 방식으로 나타날 수 있으며 이를 시각적으로 식별할 수 있는 확실한 방법은 없습니다. 이러한 파일에서 이상하게 보이는 PHP 스크립트를 찾아 제거하라는 조언을 온라인에서 접할 수 있습니다. 그러나 이는 매우 형편없는 조언이며 사용자들은 웹사이트가 파손된 후 우리 지원팀으로 몰려들었습니다. MalCare는 각 스크립트를 테스트하여 악성 여부를 결정하기 전에 동작을 평가합니다. 

PHP 파일에 관해 말하자면, /wp-uploads에는 아무 것도 없어야 합니다. 따라서 거기에 보이는 모든 것을 처벌 없이 삭제할 수 있습니다. 

따라서 우리는 이러한 파일에서 어떤 악성 코드를 보게 될지 실제로 예측할 수 없습니다. WordPress 파일의 전체 목록을 참조하여 각 파일의 기능, 상호 연결성, 웹 사이트의 파일이 다르게 작동하는지 여부를 이해하세요. 이때 코드 로직을 이해하는 것이 매우 도움이 됩니다. 

전체 파일이 잘못된 경우 즉시 삭제하지 않는 것이 좋습니다. 대신, 파일 확장자를 PHP에서 phptest와 같은 다른 이름으로 바꾸면 더 이상 실행할 수 없습니다. 합법적인 파일에 있는 코드라면 삭제할 수 있습니다. 문제가 발생할 경우 백업이 있기 때문입니다.

5. 플러그인 및 테마 폴더 정리

/wp-content 폴더에는 모든 플러그인과 테마 파일이 있습니다. 다운로드한 새로 설치를 사용하면 WordPress 핵심 설치와 동일한 검사를 수행하고 코드의 차이점을 찾을 수 있습니다.

해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

우리는 변화가 반드시 나쁜 것은 아니라는 점을 지적하고 싶습니다. 사용자 정의는 코드 변경으로 표시됩니다. 웹사이트에서 플러그인이나 테마가 제대로 작동하도록 설정 및 구성을 조정한 경우 최소한의 변경 사항이 있을 것으로 예상됩니다. 사용자 정의를 완전히 지우는 데 문제가 없다면 모든 플러그인과 테마 파일을 새로 설치한 파일로 교체하세요. 

일반적으로 사람들은 자신이 투자한 작업을 취소하려고 하지 않습니다. 그럴 만한 이유가 있습니다. 따라서 더 긴 방법은 코드에서 차이점을 검사하는 것입니다. 각 스크립트의 기능과 웹사이트의 나머지 부분과 어떻게 상호 작용하는지 아는 것이 도움이 됩니다. 맬웨어 스크립트는 완전히 다른 위치에서 완전히 무해해 보이는 다른 스크립트에 의해 실행될 때까지 하나의 파일에 무해하게 존재할 수 있습니다. 악성 코드의 태그 팀 측면은 웹 사이트를 수동으로 청소하기 어려운 이유 중 하나입니다. 

플러그인과 테마 정리의 또 다른 측면은 플러그인과 테마가 많이 있을 수 있다는 것입니다. 각 과정을 거치는 것은 힘들고 시간이 많이 걸리는 과정입니다. 우리의 조언은 악성 코드를 찾을 수 있는 가장 일반적인 장소부터 시작하라는 것입니다.  

활성 테마 파일에서 다음을 확인하세요. 

  • 헤더.php
  • 바닥글.php
  • functions.php 
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드 functions.php 파일의 wp-vcd 악성 코드

진단 섹션에서는 설치된 플러그인 중 최근에 발견된 취약점이 있는지 조사하는 방법에 대해 이야기했습니다. 해당 파일로 시작하는 것이 좋습니다. 여기서 물어볼 질문은 다음과 같습니다. 

  • 최근에 해킹당한 적이 있나요
  • 업데이트되지 않은 항목이 있나요

이전 단계에서 가짜 플러그인을 발견하셨나요? 다시 생각하지 않고 삭제할 수 있는 것입니다. 하지만 그 일을 돌보는 것을 멈추지 마세요! 멀웨어 사냥은 아직 끝나지 않았습니다. 

맬웨어는 정상적으로 보이도록 되어 있으며 합법적인 파일 이름을 흉내낸다는 점을 명심하십시오. 우리는 양의 탈을 쓴 늑대를 발견했습니다. 261이나 2012와 같은 기본 WordPress 테마에는 작은 오타가 있어 사실상 동일하게 보입니다. 

새로 설치하면 비교 및 식별에 도움이 되지만 확실하지 않은 경우 개발자에게 지원을 문의하세요.

6. 데이터베이스에서 악성 코드 제거

백업에서 데이터베이스를 추출하세요. 아직 추출하지 않았다면 phpMyAdmin을 사용하여 데이터베이스를 다운로드하세요.

  • 기존 페이지와 게시물에 이상한 콘텐츠나 스크립트가 있는지 표를 확인하세요. 귀하의 웹사이트에 로드될 때 이러한 기능이 어떻게 보이고 어떤 기능을 수행하는지 알고 계실 것입니다.
  • 새로 생성된 페이지와 게시물도 찾아보세요. 이는 wp-admin 대시보드에 표시되지 않습니다. 

리디렉션 해킹과 같은 일부 경우에는 wp_options 테이블의 site_URL 속성에 익숙하지 않은 URL이 있습니다. 리디렉션 악성 코드가 wp_posts 테이블에 있는 경우 모든 단일 게시물에 포함됩니다. 

수정된 설정을 원상태로 되돌리고 악성 콘텐츠를 조심스럽게 제거하세요. 

해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드 wp_options 테이블의 스팸 URL

다시 말하지만, 웹사이트의 크기에 따라 이는 엄청난 작업이 될 수 있습니다. 첫 번째 장애물은 악성코드가 어디에 있는지 식별하는 것입니다. 각 게시물과 페이지에 동일한 악성 코드 스크립트가 있다면 운이 좋을 것입니다. SQL을 사용하여 모든 파일에서 콘텐츠를 추출할 수 있습니다. 그러나 많은 양의 맬웨어를 제거하는 것은 훌륭하지만 그것이 웹 사이트의 유일한 해킹인지 확신할 수는 없다는 점에 유의하십시오. 

중요한 사용자 및 주문 정보가 포함된 전자 상거래 웹사이트를 운영하는 경우 이중, 삼중 확인을 통해 실제로 악성 코드만 제거할 수 있습니다.

7. 루트에 의심스러운 파일이 있는지 확인하세요

웹사이트의 파일을 살펴볼 때 루트 폴더도 살펴보세요. 또한 악성 코드 파일이 저장되어 있을 수도 있습니다. 모든 PHP 파일은 나쁘지 않으며 일부 플러그인은 특정 작업을 수행하기 위해 루트에 스크립트를 추가합니다. 예를 들어 BlogVault는 사이트에 액세스할 수 없는 경우에도 플러그인이 백업을 복원할 수 있도록 웹 사이트 루트에 Emergency Connector 스크립트를 추가합니다. 다른 보안 플러그인은 악성 코드가 아닌 경우에도 이를 악성 코드로 표시합니다.

8. 모든 백도어 제거

맬웨어는 발견되어 제거될 경우를 대비해 백도어로 알려진 웹사이트에 익스플로잇을 남기는 경우가 많습니다. 백도어를 사용하면 해커가 웹사이트를 거의 즉시 다시 감염시킬 수 있으므로 모든 치료 노력이 필요 없게 됩니다. 

악성 코드와 마찬가지로 백도어는 어디에나 있을 수 있습니다. 찾아야 할 코드는 다음과 같습니다. 

  • 평가
  • base64_decode
  • 그진플레이트
  • preg_replace
  • str_rot13 

이는 외부 액세스를 허용하는 기능이며 본질적으로 나쁜 것은 아닙니다. 합법적인 사용 사례가 있으며 백도어 역할을 하도록 미묘하게 변경되는 경우가 많습니다. 분석하지 않고 삭제할 때는 주의하십시오. 

9. 정리된 파일을 다시 업로드하세요

이제 웹사이트에서 악성 코드를 제거했으므로 최악의 상황은 끝났습니다. 이제 웹사이트를 재구축하는 문제입니다. 먼저 기존 파일과 데이터베이스를 삭제한 다음 그 자리에 정리된 버전을 업로드하세요.

cPanel에서 파일 관리자와 phpMyAdmin을 사용하여 파일과 데이터베이스에 대해 각각 이 작업을 수행합니다. 이제 귀하는 이러한 기능을 처리하는 데 전문가가 되었습니다. 추가 도움이 필요한 경우 수동 백업 복원에 대한 기사를 참조하세요. 과정은 동일합니다. 

대규모 복원이 작동하지 않더라도 실망하지 마십시오. cPanel은 특정 한도를 초과하는 데이터를 처리하는 데 어려움을 겪습니다. SFTP를 사용하여 이 단계를 수행할 수도 있습니다. 

10. 캐시 지우기

사이트를 다시 구성하고 모든 것이 예상대로 작동하는지 몇 번 확인한 후 캐시를 지우십시오. 캐시는 방문자의 로딩 시간을 줄이기 위해 웹사이트의 이전 버전을 저장합니다. 정리 후 웹사이트가 예상대로 작동하도록 캐시를 비우세요.

11. 각 플러그인과 테마를 확인하세요

이제 이 소프트웨어의 정리된 버전을 사용하여 웹 사이트를 다시 설치했으므로 각 기능을 확인하십시오. 예상대로 작동하나요? 

그렇다면 좋습니다. 그렇지 않은 경우 이전 플러그인 폴더로 돌아가서 정리된 웹사이트에 무엇이 포함되지 않았는지 확인하세요. 해당 코드 중 일부가 누락된 기능을 담당할 가능성이 있습니다. 그런 다음 코드를 웹사이트에 다시 복제할 수 있으며, 해당 비트가 악성 코드에 감염되지 않도록 매우 주의해야 합니다. 

이 플러그인과 테마를 한 번에 하나씩 수행하는 것이 좋습니다. 플러그인 폴더의 이름을 일시적으로 변경하여 효과적으로 비활성화할 수 있습니다. 테마 폴더에도 동일한 방법이 적용됩니다.  

12. 이 프로세스를 하위 도메인 및 중첩된 WordPress 설치 반복

이는 귀하에게 적용되지 않을 수도 있지만, 우리는 기본 사이트에 두 번째 WordPress가 설치된 여러 웹사이트를 보았습니다. 이는 사이트 디자인, 하위 도메인 또는 잊어버린 준비 사이트 등 여러 가지 요인으로 인해 발생할 수 있습니다. 

기본 WordPress 사이트에 악성 코드가 있는 경우 중첩된 설치가 오염되었을 수 있습니다. 그 반대도 마찬가지입니다. 중첩된 설치에 악성 코드가 있는 경우 방금 치료한 웹 사이트가 다시 감염됩니다. 

일반적으로 우리는 사용자에게 사용하지 않는 WordPress 설치를 모두 제거하도록 요청합니다. 그것은 불필요한 위험입니다. 

13. 보안 스캐너를 사용하여 확인

결승선에 거의 다 왔습니다! 이것은 힘든 여정이었습니다. 잠시 시간을 내어 자신이 이룬 업적에 대해 감사해 보시기 바랍니다. WordPress 전문가조차도 수동으로 WordPress 해킹을 정리하는 것이 항상 편하지 않으며 대신 도구를 사용하는 것을 선호합니다.

이제 남은 것은 악성코드가 실제로 귀하의 웹사이트에서 사라졌는지 확인하는 것입니다. MalCare의 무료 스캐너를 사용하여 확인을 받으시면 됩니다!

3단계. 해킹 제거 후 피해 복구

완전한 WordPress 해킹 웹사이트 복구에는 맬웨어 제거, 피해 복구 및 보안 강화가 포함됩니다.

웹사이트에 악성 코드가 없으면 이제 해킹으로 인한 피해를 우선적으로 되돌리는 데 집중할 수 있습니다. 귀하의 웹사이트에는 웹 호스트와 Google이라는 두 가지 주요 이해관계자(방문자와 귀하 제외)가 있습니다. 

해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

웹사이트에 다시 액세스하는 중

청소가 끝나면 웹 호스트에게 연락하여 웹사이트를 다시 스캔하도록 요청하세요. 문제를 해결하기 위해 수행한 단계를 자세히 설명할 수도 있습니다. 이로 인해 항상 액세스가 복원되고 사이트가 다시 온라인 상태가 됩니다. 

Google 블랙리스트에서 사이트 삭제하기

귀하의 웹 사이트가 Google의 블랙리스트에 오른 경우 검토를 요청해야 합니다. Google Search Console로 이동하여 보안 문제를 클릭하면 됩니다. 여기에서 유해한 콘텐츠에 대한 경고와 해당 콘텐츠가 포함된 파일에 대한 세부 정보가 표시됩니다. 

이 알림의 맨 아래에는 검토를 요청하는 버튼이 있습니다. 문제를 해결했음을 확인하고 나열된 각 문제에 대해 수행한 모든 단계에 대한 자세한 설명을 제공해야 합니다. 

요청이 제출되면 며칠 내에 요청 결과를 듣게 됩니다. 

브랜드 손상 관리

이 단계는 순전히 선택 사항이며 단지 조언일 뿐입니다. 나중에 이야기하겠지만 해킹은 거의 항상 평판을 손상시킵니다. 가능하다면 무슨 일이 일어났는지, 문제를 해결하기 위해 어떤 조치를 취했는지, 앞으로 어떻게 예방할 계획인지 공개적으로 인정하세요. 

정직은 관계를 재건하는 데 큰 도움이 되며, 잘 처리된 해킹이 브랜드 가치를 높이는 사례도 있었습니다. 

4단계. 향후 WordPress 해킹 방지

맬웨어의 가장 나쁜 부분 중 하나는 백도어를 통해 또는 이전과 동일한 취약점을 악용하여 계속해서 다시 발생한다는 것입니다. 

우리는 고객이 향후 WordPress 사이트가 해킹당하는 것을 방지할 수 있도록 이 보안 체크리스트를 고객과 공유합니다. 

  1. 보안 플러그인 설치: 해킹을 검사하고 치료하며 예방할 수 있는 MalCare와 같은 우수한 보안 플러그인의 이점은 아무리 강조해도 지나치지 않습니다. MalCare는 해킹을 신속하게 진단하고 치료할 수 있을 뿐만 아니라 고급 방화벽을 통해 봇과 같은 수많은 인터넷 공격으로부터 웹사이트를 보호합니다. MalCare의 가장 좋은 점은 다른 보안 플러그인과 달리 서버 리소스를 사용하지 않으므로 사이트가 최적으로 작동하면서 계속 보호된다는 것입니다. 
  1. Change all user and database passwords: After vulnerabilities, poor password security and the resulting compromised user accounts are easily the top reason for hacked websites. 
  1. Reset user accounts: Get rid of any user accounts that shouldn’t be there. Review the privileges of those that should be there, only granting the minimal privileges required for the individual user. 
  1. Change salts + security keys: WordPress attaches long strings of random characters, known as salts and security keys, to login data in cookies. These are used to authenticate users, and to make sure they are logged in safely. To change these, WordPress has a generator, after which the updated strings can be put into the wp-config.php file. 
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드
  1. Choose your plugins and themes wisely: We highly recommend sticking to plugins and themes from reputed developers only. Not only will the developers provide support when required, but will maintain the plugin or theme code with constant updates. Updates are critical to patch vulnerabilities, and are your first line of defence against hacks.

    If you feel that nulled themes and plugins will save you money, you will end up losing whatever you save many times over when the inevitable hack occurs. Nulled themes and plugins are not only unethical, but downright dangerous. 

  1. Install SSL: SSL protects the communication to and from your website. SSL uses encryption to make sure it cannot be intercepted and read by anyone else. Google has been advocating for SSL implementation on websites for years now, and actively penalises website SEO if the website doesn’t have SSL. 
  1. Harden WordPress: There are measures to toughen up security, commonly known as WordPress hardening. We would caution you to be mindful of following the immense advice available online. Some of it is downright bad and will impact your website and visitors’ experience. Follow this guide to harden your website responsibly. 
  1. Update everything: All updates, whether WordPress, plugin, or theme, are necessary and should be done as soon as possible. Updates usually address issues in the code, like security vulnerabilities. It is especially critical because when security researchers discover vulnerabilities, they disclose them to the developer who then releases a patch for it. The researcher then discloses the vulnerability publicly, and that’s when mayhem erupts. Hackers will try their luck with any websites that don’t have the update installed.

    The resistance to WordPress updates is understandable, because it can disrupt operations, especially if something breaks. The safest way to implement updates is to use a staging site first, and then merge changes to live.

  2. Implement an activity log: In order to keep a close eye on changes made to your website, an activity log is immensely useful. Apart from monitoring regular changes, unexpected changes like new users can signal that someone has unauthorized access. It will help you catch hacks early.
  3. Use SFTP instead of FTP: Similar to SSL, SFTP is a secure way to use FTP to access your website backend on the server. Most admin avoid using FTP at all, because it tends to be slow and painstaking to work with. However, in case you cannot log into your website, FTP becomes necessary.
  4. Remove secondary WordPress installations if not in use: We’ve seen this several times. Malware reappears on freshly cleaned websites, because there is a second website on the same cPanel with malware. It works both ways in fact. If either of the sites has malware, it is only a matter of time before the other one is infected.

    There are various reasons that you would have a second website installed on cPanel, and all of them are legitimate:site redesign, staging site, or even a subdomain. However, several times users forget about the second website, even to update or monitor it. It then gets hacked because of vulnerabilities, and the malware works its way into the main website.

  5. Choose a good host: This is a somewhat subjective point, but it pays to do research to pick a good host. The general rule is to pick an established brand name and check how they have handled issues in the past. You want to have a web host that has responsive support, invests in their infrastructure, and has security certifications.
  6. Invest in backups: We’ve said this a few times already in this article, but backups are non-negotiable. Backups are invaluable when all else fails, and our customers have been able to retrieve 100% of their website even after really bad hacks solely because of backups. 
  7. Have a security plan in place/things to do regularly: Last, but certainly not least, have a plan in place to run through diagnostics regularly. Also, there are a few things that should be done to a cadence:review users, require password changes, monitor activity logs, update regularly, check for vulnerability news, and so on. Often, these measures will help avert major security-related disasters early on.

Can you fix WordPress hack issues permanently?

No, WordPress hack issues cannot be fixed permanently. Any security professional, service, or product telling you so isn’t being truthful.

WordPress security, much like all other types of security in the world, is a question of reducing risk, having insurance, and taking the right preventative steps.

Even after all of this, will you be faced with the occasional WordPress hack cleanup? 예. However the likelihood and severity will both be orders of magnitude less. So everything that we listed in the section above is still worth doing.

Avoid fixing a hacked WordPress site manually

There are so many things that can go horribly wrong with manual cleanups. Trust us, we have seen our fair share. If your wordpress site is compromised, the best course of action to return your site to good health is to install a security plugin.

We strongly advise against manual cleaning, even though we have included the steps above. If you liken a hack to an illness, you would rather a qualified medical professional perform life-saving surgery, wouldn’t you? Imagine trying to remove your appendix yourself, and you get where we are going with this analogy. 

Hacks, like invasive infections, get progressively worse with time. If malware is destroying your website data, for instance, acting fast could save you a great deal of time and resources. Not to mention, save your website too. 

As malware replicates itself, it spreads into different files and folders, creates ghost admin users to regain entry if it is detected, and overall wreaks havoc. 

On top of this, recovery becomes significantly harder. We’ve had users come to us with half-destroyed websites that they’ve tried to clean themselves, failed, and now are in desperate straits, trying to save whatever is left. We can do our best, but we can’t magic back their lost data for them—a situation that could have been avoided with some timely action. 

The only reason we are reiterating this so many times is that we genuinely care about our users, and feel terrible every time we have to tell them that their data cannot be retrieved. 

To recap, here are the things that can go wrong with manual WordPress hack removal:

  • Malware can spread into unexpected places, and is difficult to find. If you clean only some of it, the rest will soon reinfect your website again. 
  • Removing just the malware is not good enough if the vulnerability and/or backdoor isn’t found and resolved
  • You have to know what each file does and how it interacts with others, otherwise, you could inadvertently break your website 
  • Large sites (like e-commerce stores) will take ages to go through, file by file. It’s like looking for a needle in a haystack.
  • And last by not least, hacks cause increasingly more damage as time wears on

Don’t fix a hack with a backup

In spite of being huge advocates of backups, we do not recommend reverting your website to a previous version. There are several reasons for this: 

  • You will lose all the changes you made in between
  • The backup shouldn’t have the malware either, and unless you have a precise idea of when your website had malware, this is hard to ascertain
  • The backup will have the vulnerabilities that led to the malware infection in the first place

The only time you should consider using a backup as a starting point is if the malware has destroyed your website and data beyond retrieval. We genuinely hope that it doesn’t ever reach that stage, and installing a good security plugin will save you from these issues in the future.

Symptoms of a hacked WordPress website 

Each hack is architected differently and therefore manifests in different ways. A spam link injection hack will not be the same as a remote code execution hack. So you will not see all of the symptoms below, but might come across one or two.

1. Visible spam in Google search results

You have spent time and energy working on SEO, so that your website ranks in keyword searches. These symptoms are particularly painful, because they are often hidden from site admin but visible to visitors—thus creating a very poor impression you have no idea about. 

  • Junk meta titles and descriptions: Titles and descriptions in the search results are supposed to be indicators of what the page contains. Hackers will inject spam pages on your site, which Google will then index and show in the search results. Pages will show up here as either Japanese characters, unrelated strings of keywords or junk values. 
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드
  • Results for pages you didn’t create, but are on your website: This is an especially trippy sensation, because if someone searches for a ranking keyword, your website will display these extra and unexpected pages in the results. Search results will show up 1000s of indexed pages, even if your site actually has less than 100. Those are indexed spam pages. 
  • Google blacklist: When a visitor clicks on your website from the search results, Google puts up a massive red warning advising the visitor that your website contains malware and is not safe. This is part of their Safe Browsing initiative, and other search engines use it to safeguard their users too. 
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드
  • ‘Site may be hacked’ notice: The lite version of the Google blacklist is to see a ‘Site may be hacked’ message underneath your website title in search results.
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드 Site may be hacked notice on Google

2. Problems on your website

WordPress hacks can show up directly on your website, for everyone to see. These are usually because the hackers want to deface the website or perpetuate a social engineering attack, like phishing.

You may see these pages if you are logged in as an admin or user, but if you do see pages or posts you didn’t create, chances are they would look like one of these:  

  • Spam pages :Spam pages on your website are mostly the same ones that show up in the search results. Spam pages are inserted into ranked websites to create inbound links for other websites. The malware will also alter your sitemap to include these spam pages. This is a play for SEO, and boosts the ranking of the destination website as a result. 
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드
  • Spam pop-ups: These pop-ups try to trick users into either downloading malware or visiting another website. Pop-ups can be caused because of malware or even advertising that you have enabled on your website via an ad network. Ad networks have generally secure policies with respect to advertiser content, but the odd malware can still creep in unexpectedly. 
  • Automatic redirects to other websites: This symptom causes our users maximum stress, because not only do the posts and pages redirect, but sometimes even the wp-login page does as well. This means that they can’t even stay on their website long enough to see what’s wrong. Because of that, we have an entire article dedicated to automatic redirects and how to fix them.
  • Phishing pages: WordPress Phishing is a type of social engineering attack, which dupes people into willingly sharing their data by pretending to be a legitimate website or service, especially banks. Often, when seeing phishing pages on a customer website, we have noticed bank logo image files in the code. Phishing pages are often used in conjunction with emails that appear to be from a trusted entity. The hacker sends out emails, and adds links to the pages on your site, which allows them to collect personal information under the guise of a trusted communication, adding to the website’s spam email issues.
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드 Phishing website
  • Partially broken pages: You might see code at the top or bottom of some of the pages on your website. At first glance, it may seem like a code error, and it can sometimes be a result of a malfunctioning plugin or theme. But it can also signal the presence of malware.
  • Errors when loading the site: You visit your website, and your browser goes blank. No error messages, nothing. There is nothing to interact with or fix, and therefore no clue as to what has gone wrong with the website. On some versions of WordPress, this can show up as a critical error.

3. Changes to the backend of your WordPress website

These changes are often missed by website admin, unless they are hypervigilant or have an activity log and a file change monitor active.

  • Alterations to your website’s code: Your WordPress website is built with code, so these changes can be in core WordPress files, plugins, or themes. Basically, the malware can be anywhere. Certain types of malware or virus are clever enough to delete traces of themselves, and others evade file change monitors by altering timestamps.
  • Unexpected changes to posts and pages or new pages altogether: Posts and pages are added, or changes are made to existing ones. Many customers reported seeing these changes, even though they were the only ones managing the website content. New pages are likely to show up in anything that indexes your website, including Google search results, analytics, and your sitemap. 
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드
  • Unexpected users with admin privileges: In some cases, website admins have received emails about new accounts being created on their websites. The accounts usually had gibberish names or email addresses, mostly both. They were alerted to this unusual activity because they had enabled a setting that alerted them about the creation of new accounts. Sometimes users with subscriber privileges have inexplicably been escalated to administrators.
  • Settings are changed: Each website is set up differently, of course, so this symptom will vary between websites. In some cases, users reported that the account creation setting changed, while others said their index.php file was different. Each time the admin tried to revert it to its original state, the settings were changed right back again. 
  • Fake plugins: A lot of malware is cleverly hidden in seemingly legitimate folders and files. Fake plugins mimic the style of real plugins, but have very few files in them or have strange names which don’t typically follow naming conventions. This is not a firm diagnostic, but it is a good rule of thumb for identification.
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

4. Web host flags issues with your website

Your web host is especially invested in making sure your website is malware-free because malware on their servers causes them huge problems. Most good web hosts regularly scan websites, and inform users about malware on their sites.

  • Takes your website offline: If your web host has suspended your account or taken your website offline, this is the first sign something is wrong. Although web hosts will also suspend your website due to policy violations or unpaid bills, malware is a big reason for this move. Invariably, they will have reached out over email with their reasons. In case they have detected malware, it is good practice to ask for the list of hacked files that their scanner has detected, and request them to whitelist IPs, so that you can access your website to clean them.
  • Excessive server usage: In this case, you get an email from your web host saying that your website has exceeded or is approaching the plan limits. Again, this is not a conclusive symptom, because you could be seeing a spike in traffic due to other reasons too, like a campaign or promotion. Or perhaps there is a topical reason. However, bot attacks and hacks consume a ton of server resources, and so it is best to investigate, if you see an unexpected spike in server resource usage. You can corroborate these findings with traffic analytics.

5. Performance issues

Malware can cause a huge gamut of things to go bust within the website. As we said before, sometimes the symptoms are invisible, or not explicit, like a new page or new user.

Often, we see what look like harmless errors due to bad server or site performance, or even connectivity issues. To be clear, these could all well be innocuous, but they can also be a result of malware using up site resources.

  • Site becomes slow :Bots consume a lot of server resources. Increased spam pages and traffic use up request bandwidth. And the penalty is site performance. Sites that are very slow to load could have malware, because hackers do not optimise their code.
  • Site is inaccessible : Because server resources are used up, your visitors end up seeing a 503 or 504 error. However, there are other, legitimate ways a site can become inaccessible, like a geoblocking or changes to the .htaccess file.
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

6. User experience issues

Admin are sometimes the last people to find out about hacks because hackers can hide symptoms from logged in users. However, the visitors still see symptoms, which is a terrible experience and has a negative impact on your brand.

In our experience, getting complaints from visitors is a good and bad thing, because at least you are now aware of issues and can solve them. The scary part is to have visitors experience issues and leave, and you are none the wiser.

If your visitors experience one or more of these symptoms, then there is definitely something amiss. 

  • Users can’t log into your website
  • Visitors get redirected from your website
  • Emails from the website go into spam folders
  • Visitors complain about seeing malware symptoms, like pop-ups or phishing pages

7. Unexpected behaviour in analytics

Analytics is a source of truth for many things, and signs of a malware infection just happen to be one of those things.

  • Search console flags security issues: Google Search Console scans your website frontend, much like a frontend scanner, and can find malware. You’ll see an alert on your dashboard, or see flagged pages in the Security Issues tab. 
해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드 Security issues on Google Search Console
  • Increased traffic from certain countries: Increases in traffic can be a signal of malware, if they are unexpected. Google Analytics filters out most bot traffic anyway, but on occasion, users see spikes from particular countries. This symptom is generally more obvious to a locally relevant website.  

There is a small chance your website could be malfunctioning because of a botched update or server issue or even a coding error. However, if you see more than one of these, your website is most probably hacked.

Some key points to remember 

  • Hackers want malware to go undetected for as long as possible, so a lot of the symptoms are disguised from website admin and/or logged in users
  • Some may be visible all the time; some may happen occasionally/inconsistently
  • Some hacks are entirely invisible to everyone; depending on the malware
  • Some malware will only appear to Google and no one else

How your WordPress site got hacked

해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

We like to think that everything we use is 100% secure, but that’s unfortunately not true. It isn’t true of our homes, and certainly not the case with our websites. No software is completely bullet-proof, and every part of the website is essentially software:right from WordPress itself, to the plugins and themes. 

Vulnerabilities in plugins and themes

When code is written, developers can make oversights or mistakes. These mistakes are called vulnerabilities. Vulnerabilities are the single biggest reason why websites get hacked. 

Of course, mistakes aren’t made deliberately. Vulnerabilities often just boil down to a developer writing code to accomplish one task, without realizing that a hacker can use the same code in an unintended way to gain unauthorized access to the website.

해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

A good example of this concerns the /wp-uploads folder. In the cleaning section, we mentioned that the /wp-uploads folder should never have PHP scripts. The reason being that the contents of the folder are publicly accessible via the URL and the name of the file. 

Therefore, PHP scripts in the uploads folder would also be accessible, and as a result, remotely executable. Therefore the folder should have a check to ensure that the uploads are not PHP files. If someone does try to upload a script, it should be rejected. 

To see a list of WordPress vulnerabilities, check out WPScan. And here is a complete guide on how to use WPScan to scan for vulnerabilities.

This example also brings up an interesting point. One could argue that the uploads folder should not be publicly accessible, so PHP scripts would not be accessible either. However, this interferes with the functionality of the folder and is not a good fix. 

Similarly, we see a ton of poor security advice on the internet, which fixes a vulnerability without taking functionality into consideration. 

Undetected backdoors

A backdoor is very much what it sounds like:a way to gain unauthorized access without being detected. Even though backdoors are technically malware—code that has malicious intent—they are not actively damaging. They allow hackers to insert malware into the website.

This distinction is important because it is the primary reason WordPress websites get hacked again after cleanups. Cleanups are effective at getting rid of malware, but not addressing the entry point of the malware. 

Security plugins will often flag backdoors by looking for certain functions. But there are 2 problems with this method:firstly, hackers have found ways to mask the functions effectively; and secondly, the functions are not always bad. They have legitimate uses too.

Poor user management policies

There is always an element of human error with hacks, and it mostly comes in the form of the misuse of admin accounts. As a website admin, there are a few things you should always keep top of mind when considering the security of your website. 

Weak passwords

Yes, we know passwords are hard to remember. Especially ones that are a mix of characters, and long enough to be considered ‘safe’. However, easier-to-remember passwords are a weak link to your website security. Even a security plugin cannot protect your website if a password has been compromised. 

Think of your website like your home, where you’ve installed a state-of-the-art security system, like MalCare. If a thief were to learn your unique passcode to gain entry to your home, the security system wouldn’t be able to do anything.

Strong passwords are critically important for all accounts, but even more so for admin accounts, which brings us to our next point. 

Unnecessary user privileges

Users should only ever have enough privileges to accomplish what they need to on a website. A blog writer doesn’t need admin privileges to publish a post, for instance. It is very important to make sure to review these privileges regularly. 

Additionally, if a website admin is vigilant about user account levels, an activity log is a great tool to have as well. The activity log lists all the actions performed by users on a website and can be a great early indicator of a compromised user account. If a user who usually writes posts suddenly installs a plugin out of the blue, it is a warning sign. 

Old accounts are still active

In addition to reviewing accounts, also remove unused user accounts regularly. If a user is no longer active on your website, there is no reason why their account should be. The reason is the same as before:user accounts can be compromised. Hackers can get hold of credentials and escalate their privileges to admin accounts. 

Unsecured communication

Apart from the actual website, communication to and from the website also needs to be secured. If communication is intercepted and is not secured, it can be read easily. So it should be encrypted. This can be easily accomplished by adding SSL to your website.

In fact, SSL is becoming the de facto standard of the internet. Google actively rewards the use of SSL, by punishing websites without it in the SERPs. Some websites show up in the search results as ‘Site not secure’, as part of their Safe Browsing initiative. 

해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

On similar lines, it is always better to use SFTP instead of FTP, whenever possible. 

Web host issues

In our experience, web hosts are rarely responsible for hacks. Most hosts implement loads of security measures to make sure that the websites they host are secure.

For instance, people often think that their websites have got malware because they are on shared hosting plans. This is a misconception most of the time, because hosts implement barriers between sites. The real cause of cross-site infections is when there are multiple WordPress installations on a single cPanel instance.

Is WordPress prone to hacks?

Yes and No. 

The immense popularity of WordPress means that it attracts a lot more hackers to it. Very simply, there is a larger payoff for hackers if they are able to discover and exploit a vulnerability in the ecosystem. 

Additionally, WordPress-related vulnerabilities get a lot more attention, again because of its popularity. Similar instances with, say Joomla, would not merit as much discussion. 

In actual fact, WordPress has solved many of the problems that still exist with other CMS. It also has a terrific community and ecosystem as well. Help and support is easily available, even for niche and specific issues that a website admin may face.

Understanding WordPress hacks

If you have a security plugin like MalCare installed, you don’t need to worry about hacks. We constantly upgrade the plugin to counteract new attacks, in order to protect websites better. However, it is interesting to understand how hacks work, so that you can see just how critical a good security plugin is. There are two parts to the hacking process:

  • Hack mechanisms: How malware is inserted into the websites by either exploiting vulnerabilities or attacking the website. 
  • Types of malware: How the malware manifests itself on your website. There are a few ways that malware shows up on your website, but ultimately the hacker’s goal is to get unauthorised access to perform otherwise prohibited activities. We’ve expanded on why WordPress sites get hacked in a later section. 

Hack mechanisms

Previously in the article, we have talked about how websites get hacked. Either through vulnerabilities or backdoors, or sometimes poor passwords. These are flaws within the security of the website and are akin to weak points of a structure. 

Hack mechanisms are the weapons used to attack those weak points. Their goal is to insert malware into the website. They are bots or programs that target weak points in specific ways to achieve their goal. There are several hack mechanisms, especially since hackers are getting smarter every day about circumventing the security systems of websites.

  • SQL injection: SQL is a programming language used to interact with database systems, in order to write, read or manipulate data. Websites interact with the database all the time, to save form data for instance, or to authenticate users. An SQL injection attack uses SQL to insert php scripts into the database.

    The injection is only possible if the form is not adequately protected from incorrect inputs. The hacker can use operators and programming logic to circumvent the functionality of a form, unless checks are put in place.

  • Cross-site scripting (XSS): Cross-site scripting(XSS) is also the injection of code, like with SQL injection, but into the browser. The next user to access the website or otherwise interact with the page in question becomes the target of this attack.

    Again, form fields are duped by hackers into accepting code like JavaScript and executing those scripts without validation. 

  • Distributed denial of service (DDoS): In a DDoS attack, hackers flood a website or system with so much malicious traffic that legitimate users cannot access it. The attack works because resources are limited or metered.

    For instance, a website using server resources will be on a plan for processing power and request handling. If the website is bombarded with 100x or even 1000x requests compared to what it normally receives, the server will not be unable to handle those requests and visitors will see an error.

  • Brute force attacks: This type of attack usually targets login pages, trying out combinations of usernames and passwords in order to gain access to the website. The hack mechanism is a bot, and will try out passwords, using words from a dictionary. A brute force attack also consumes server resources, and so will often end up keeping out genuine users and visitors.

    On many WordPress support threads, you will see advice to hide the login page to protect from this attack. This is an unwise thing to do, because the URL can be forgotten, it is tricky to distribute this URL to multiple users for login, and many more problems. It is best to have bot protection in place that keeps out this bad bot traffic.

Types of malware

The malware types we have listed appear to mirror symptoms closely. That’s because most malware has been named for the symptoms that each display. If you were to drill down into the malware, they aren’t all that different in construction or purpose. 

All malware is out to use your website in some way or the other:use up its resources, steal data, piggyback on your SEO rankings, etc. The most commonly seen malware are: 

  • Pharma hack: Your website will have new pages or posts filled with keywords or links to sell pharmaceutical products, often grey market or illegal. These products are difficult to rank for on Google because of legality issues, and hence to get more traffic and sales, hackers insert these pages into unsuspecting websites.

    To detect a pharma hack on your website, you can try Googling pharma keywords like ‘viagra’ or ‘CBD’ with the search operator site:. It will list out all the pages on your website with that keyword.

  • Japanese keyword hack: The Japanese keyword hack is a variation of the pharma hack, and indeed of the next malware on this list, the SEO Spam hack. The only difference is that instead of pharmaceutical products, the malware will display Japanese content; often, unsavoury adult content.

    It is a little harder to check for this hack, unless you are familiar with Japanese and can look for keywords. <강한>

  • SEO spam hack: The SEO spam hack, as said before, is a variation on the first two. The content differs. Here, the spam content can include online gambling and casinos, or even chinese search results spam. This is effectively a catchall term for all hacks that insert extra pages into your website, but don’t fall into one of the special categories. 
  • Redirects: Malicious redirects take place when a visitor to your website is taken to an entirely different website, usually a spammy one. There are a few variations of the redirect hack, depending on where it appears.

    The most egregious aspect of the redirect hack is that website admin cannot log into their websites. Therefore, they cannot control the damage or even fix their website without expert help. 

Examples of hack scripts, we’ve found in websites:

해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드 해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드 해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드

It is difficult to protect against all the hack mechanisms, which is why installing a security plugin is very critical. MalCare’s sophisticated algorithm combats malware effectively, in addition to protecting websites against hack mechanisms. 

Recommended read :Coinhive malware, wp-feed.php malware

Consequences of a hacked site 

The impact of a hacked WordPress website can be wide-ranging in bad consequences. The importance of web security cannot be sufficiently overestimated because of this reason. Website admins without exposure to cybersecurity may read about the occasional hack, but the full potential impact is not always evident.

Therefore, it is critical to understand the impact in its entirety. The poor consequences are not confined to individual websites or their owners and administrators but have far-reaching implications. 

Immediate impact on your website

If your WordPress website is hacked, there are chances you won’t even realise it for a while. Rest assured, whether or not you can see a hack, the damage is unfolding and getting worse as time wears on. 

Let’s say one of the ways the hack manifests is through malvertising; a very common sign with spammy ads or pages that redirect your website visitors to another website (usually a pharma site or one peddling illegal stuff). This has several implications: 

  • Google blacklist: Google is hyper-vigilant about hacked websites, because they do not want to send their users (search engine users) to dangerous websites. With malware, your website is now dangerous. So they will put up a massive, scary red notice advising visitors to stay far away from your website.

    Additionally, other search engines and browsers use this same blacklist to protect their own users. So even if your site doesn’t get flagged with the red screen, most browsers will warn your visitors away with messages.

해킹 후 WordPress 사이트를 완전히 복원:단계별 수정, 정리 및 보안 가이드
  • SEO rankings will tank: As a result of fewer visitors and Google’s policy of protecting people, your website will stop showing up in results. Google calls this “hiding sites silently”. Not only are you going to lose ground you may have gained with an SEO strategy, but you will also lose visitors and discoverability.
  • Loss of trust and visitors: Most people will see spam content as a sign of a hack and know that your website is unsafe. If you are fortunate, someone will point it out. If not, your traffic numbers will decline.
  • Web host issues :Web hosts will quickly suspend websites that are hacked. If your website is hacked, your web host will face a lot of the heat, and will take hacked websites offline as soon as they are discovered to be hacked.

    A web host risks their IPs getting blacklisted with a hacked site. If your website is used for phishing attacks, and firewalls identify your website as the source, that means your IP address can be blacklisted, which will cause the host several issues.

    Also, a hacked website will often consume lots of server resources, and if your website is on shared hosting, that will adversely affect the performance of other websites, which are other customers of the web host. The problem becomes worse if there are bots attacking your website. Bots pummel your website with thousands and thousands of requests that consume tons of resources.

  • Unwitting pawn: Your website becomes a host for malware; part of a botnet that goes on to attack more websites.

Business impact

The impact of the previous section applies to all websites, large and small. The consequences are worse if your website is central to your business. Because then we are talking straight up the monetary loss. 

  • Loss of revenue: Downtime, poor SEO rankings, visitor numbers reducing are all contributing factors to loss in revenue. If people can’t or won’t visit your website, you aren’t going to get business that way.
  • Degraded branding: Trust is a huge commodity in online marketing, and hacks erode that trust. You may have had a competitive advantage in some cases. That too will be affected. Also, data breaches leave a stain on reputation. Some businesses handle the aftermath well, but the seed of doubt may be planted forever. Since things last forever on the Internet, a quick, intentional Google search will bring up hacks. It will become a point of consideration for any potential customer.
  • Server resources: We mentioned this in the previous section, but it bears mention from a monetary angle as well. Web hosts charge for excessive resource consumption. If your hacked website goes undetected for a while, you could also be paying for this fraudulent usage. Plus, if you are subject to bot attacks, the rapid depletion of (finite and allocated) server resources means that legitimate users will not be able to access your website.
  • Investment: You’ve spent time, money, and manpower to build this website. If you lose the website, you’ve lost that investment.
  • Legal issues: Data breaches of private information can cause you legal issues because of stringent data protection regulations. It is very important that websites that collect personal data from visitors treat that data with the utmost care. If it is compromised in any way, those people have grounds for legal action.
  • Cleaning cost: Hack removal is an expensive proposition, especially if you hire experts who actually know what they are doing.

    Apart from that, we often encounter website admin who try cleaning malware out by themselves, and cause their website to break. Then, in panic, they seek out expert help. Again, data retrieval is an expensive undertaking. 

Dangerous for people

Social engineering attacks, like phishing, have compounded impact. They are bad for the website and website admin being attacked, but also have terrible consequences for their users and visitors. 

Credentials can be used to hack into other websites. Hackers can use aggregated information from websites to create personal profiles that can be used to hack into bank accounts and other restricted areas. People also tend to use the same passwords in multiple places, making them especially vulnerable in these situations. 

While all data theft is bad, it takes a tragic turn with the theft and release of information of vulnerable people, like those in witness protection programs or on the run from abusers. This information sells on the dark web, a particularly ugly place.

Why WordPress websites get hacked

All websites have value, whether large or small, business or personal. Many website owners of small blogs often have a false sense of security because they feel their website is “too small” to be hacked. 

This is not true at all. While bigger websites will have a bigger payoff for hackers in terms of data theft for instance, smaller sites have value of their own. They can be used as a part of a botnet, for example. Or a site may have a small, dedicated following, which can be tapped for phishing scams via their email addresses. 

Because people tend to use the same passwords for different accounts, it is theoretically possible to now hack into another site or system using this information. The small website played a small but crucial role in this chain of events. 

Finally, hacking is always worth the effort. Hacks are rarely carried out manually. Malware, bots specifically, are designed to automate the hacking process. So there is minimal “effort” on the hacker’s front. Thus the gains of hacking your site are disproportionately stacked on the side of hackers. 

결론

In order to protect your website, it is important to be well-informed about WordPress security and hacks. In this article, we have attempted to explain WordPress hacks, motivations, impact, and much more, so you can make an informed decision about your website’s security. 

We recommend MalCare to fix hacked WordPress website because it is a complete security solution, and is only getting better with time. We protect 1000s of websites daily, with our advanced firewall, scanning and cleaning algorithm, and much more. MalCare has found malware that most other scanners miss, and has saved our customers untold amounts in revenue. 

우리는 당신의 의견을 듣고 싶습니다. Reach out to us via email for any questions, and we’re happy to help.

FAQ

How do WordPress sites get hacked?

Primarily, WordPress websites get hacked or keep getting hacked because of vulnerabilities in the core WordPress files, plugins, or themes. Hackers exploit these vulnerabilities to insert malware into the website. The second biggest reason that websites get hacked is because of poor or insecure passwords. 

My WordPress site has been hacked, what to do?

If your WordPress site is seriously compromised, there are steps you can take to fix the hack: 

  1. Scan your website for malware using MalCare
  2. Take a backup of your hacked WordPress site before cleanup
  3. Use a security plugin to clean up hacked WordPress site
  4. Install a web application firewall
  5. Change all user passwords

What are the symptoms of malware on your website?

Malware is misleading and it can hide from you because that’s how it is designed. So it is difficult to determine if you have malware on your website. But there are some symptoms that you can keep an eye out for. Here are a few symptoms to look out for, which can be an indicator of malware on your website:

  • Spam in Google search results
  • Problems on your website
  • Backend changes to website
  • Web host issues
  • Performance issues
  • User experience issues
  • Changes in analytics patterns

How to scan a WordPress website for malware?

There are three ways in which you can scan your website for hacks. Each of these ways has its pros and cons:

  1. Deep scan with a security scanner
  2. Scan using an online scanner
  3. Scan for malware manually

We recommend that you scan using a security scanner such as MalCare, as MalCare is built specifically to look out for hidden malware that is not easy to find with other methods.

How to clean your hacked WordPress website?

There are different ways to clean your website, but we strongly recommend using a good security plugin like MalCare. MalCare allows you to auto clean your website within minutes and does not charge you per clean-up. It will also protect your website from future hacks.

Alternatively, you can manually clean your site. However, unless you are a security expert, we do not recommend manual cleaning as it could lead to more problems than you already have.

Will having multiple security plugins protect my site from hacks?

There is a common misconception that installing several security plugins makes your website safer, presumably because whatever one plugin misses, the other one will catch. There are two problems with this theory:firstly, that’s not actually the case. New and sophisticated malware will slip through bad security plugins; and secondly, by adding multiple security plugins, you’re effectively weighing down your website so much, it will impact its performance dramatically.