25 Feb 2020 | | 악성코드, 라자루스, 북한, 워너크라이, 웜, malware, wannacry, lazarus, worm, north korea, english
WannaCry is a ransomware of the North Korean Lazarus Group that hit the pandemic in May 2017. Attackers earned about $ 150,000 through this ransomware, and the damage from the attack is estimated at about billions of dollars. One of the features of WannaCry is that it replicates itself and distributes it to an accessible network, similar to a worm, and is distributed primarily through SMB vulnerabilities and email.
Prior to WannaCry, the Lazarus group deployed a worm that behaved in a similar way, one of which is the worm named Brambul. WannaCry is a mutation of the ransomware form of this worm called Brambul.
Brambul was created in 2009 and began to be distributed. After 10 years, it’s not dangerous compared to other malware, but it can still harm computers with vulnerable versions and settings.
MD5 : f024ff4176f0036f97ebc95decfd1d5e
Running the file does not seem to have any effect on your screen. There is no packing or obfuscation, so it is easy to analyze. Thanks to this, you can roughly predict behavior with just the strings contained within the file.
Based on the above information, you can infer emails, IP addresses, registry changes, shared folder access, and related processes.
When the program starts up, it calls the WSAStartup function to check if a network connection is available. Get the user’s name (the name of the PC). For my PC, I got the value “swan”. Then push the string “gmail.com” onto the stack and call dnsquery as follows:
After that, the user’s name is verified as “System”, and the behavior is divided into two routine to the result.
In this case, we call the sub_402900 subroutine, which generates IP addresses randomly after a few GetTickCounts. It will try to connect to 445 port (SMB port) with randomly generated IP.
If the connection to the SMB port is successful, the connection to the IPC is attempted.
If the connection to IPC succeeds, the administrator account accesses the SCM database and performs malicious actions.
- Send mail using the SMTP protocol to the specified subject at whiat1001@gmail.com
- Access shared folder with admin
- Create a Windows Genuine Logon Manager (wglmgr) Service
- Create a Microsoft Windows Genuine Updater (wgudtr) Service
- Generate crss.exe executable
These generated services and executables seem to cause the routine to self-replicate and propagate, after which the first routine is terminated.