[컴][네트워크] WannaCrypt ransomware 동작방식

워너크립트 동작방식 / 랜섬웨어 동작방식 / wannacrypt ransomware 동작 방식



WannaCrypt ransomware

요즘 한창 WannaCrypt 라는 ransomware(랜섬웨어) 때문에 뉴스들이 사람들에게 겁주고 있다. 평소에 백업을 잘해놓았다거나, windows update 를 잘해왔다면 겁을 먹을필요까지야 있을까 싶긴한데, 여튼 괜한 공포심을 조장하는 듯 싶어서 일단 이녀석이 어떻게 동작하는지 궁금했다.

그런데 한글 문서로 분석된 녀석이 하나도 없어서, 적어도 백신만드는 회사들에서라도 글을 써줘야 하는 건 아닌가 싶었는데, 안타깝게도 조용하다.

여하튼 일단 MS 에서 분석한 글을 찾았다. ref. 1 으로 가서 확인하면 된다.

여기서 다 번역하기는 귀찮고, 이해를 도울 몇개 글만 가져왔다.


WannaCrypt 동작 방식

아래는 ref. 1 의 내용중 일부를 가져와서 번역했다. 참고하자.

However, in this unique case, the ransomware perpetrators incorporated publicly-available exploit code for the patched SMB EternalBlue vulnerability, CVE-2017-0145, which can be triggered by sending a specially crafted packet to a targeted SMBv1 server, was fixed in security bulletin MS17-010, released on March 14, 2017.
보통은 사용자가 실행을 시켜야 하지만, 이번 케이스는 특별한 packet 을 보내면 SMBv1 server 가 받아서 실행을 시켜주는 케이스이다.
이것에 대한 패치는 2017년 3월 14일에 이루어졌다.

The exploit code used by WannaCrypt was designed to work only against unpatched Windows 7 and Windows Server 2008 (or earlier OS) systems, so Windows 10 PCs are not affected by this attack.
WannaCrypt 의 코드는 패치가 안된 윈도우7과 윈도우서버 2008(또는 이전버전의 os) 시스템에서 동작하게 만들어졌다. 윈도우즈10은 괜찮다.

The dropper tries to connect the following domain using the API InternetOpenUrlA():

hxxp://www[.]iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea[.]com

If connection is successful, the threat does not infect the system further with ransomware or try to exploit other systems to spread; it simply stops execution. However, if the connection fails, the dropper proceeds to drop the ransomware and creates a service on the system.

In other words, blocking the domain with firewall either at ISP or enterprise network level will cause the ransomware to continue spreading and encrypting files.
The threat creates a service named mssecsvc2.0, whose function is to exploit the SMB vulnerability in other computers accessible from the infected system:

dropper 가 특정 url 에 접속을 시도하는데, 이 접속이 성공하면, 동작을 멈춘다. 그런데 이 url 에 대한 접속이 실패하면, dropper 가 ransomware 를 떨구고, 그 컴퓨터에 mssecsvc2.0라는 이름의 service 를 만든다. 이 service 가 다른 컴퓨터(아직 패치되지 않은)들을 감염시키기 시작한다.
그러니까 ISP 나 기업네트워크 단의 firewall 에서 이 도메인에 대한 접속이 막혀있다면, 랜섬웨어가 동작하게 된다.


See Also

  1. [MS-SMB]: Server Message Block (SMB) Protocol
  2. Microsoft SMB Protocol Packet Exchange Scenario (Windows)





References

  1. WannaCrypt ransomware worm targets out-of-date systems – Windows Security, 2017-05-12


댓글 없음:

댓글 쓰기