{"id":89154,"date":"2020-06-12T18:51:29","date_gmt":"2020-06-12T13:21:29","guid":{"rendered":"https:\/\/blogs_admin.quickheal.com\/?p=89154"},"modified":"2023-06-20T16:42:39","modified_gmt":"2023-06-20T11:12:39","slug":"maze-of-maze-ransomware-its-deceitful-tactics","status":"publish","type":"post","link":"https:\/\/www.quickheal.com\/blogs\/maze-of-maze-ransomware-its-deceitful-tactics\/","title":{"rendered":"Maze of Maze ransomware &amp; its deceitful tactics"},"content":{"rendered":"<p>Maze is a recent highlighted <a href=\"https:\/\/blogs.quickheal.com\/proactive-measures-to-safeguard-against-the-ransomware-menace\/\">ransomware<\/a> among the ever-growing list of ransomware families. Maze ransomware is active from last one year, although it came into light due to its new approach of publishing sensitive data of infected customer publicly.<\/p>\n<p>The malware uses different techniques to gain entry like to use exploits kits or via email impersonation. These phishing emails are having a Word document attachment which contain macros to run the malware in\u00a0the system.<\/p>\n<p>Maze uses CHA-CHA algorithm for encryption and its key is encrypted using RSA algorithm.\u00a0Maze can run\u00a0with or\u00a0without mutex. It uses some Russian IPs for webserver to send information from victim system. It uses RSA encryption request for\u00a0CnC\u00a0communication. It will not encrypt system for specific region by checking keyboard type.<\/p>\n<p><b>Stage \u2013 I:\u00a0<\/b><\/p>\n<p><b>\u00a0\u00a0\u00a0 VBA MACRO<\/b><\/p>\n<p>The attached\u00a0document\u00a0file has a form containing input box in which number array of encrypted URL and path is present. Document file contains an activeX object. When it is executed, URL and path is decrypted then it\u00a0calls <em>URLDownloadToFileA<\/em><em>()<\/em>\u00a0which downloads an executable to the specified location.<\/p>\n<figure id=\"attachment_89156\" aria-describedby=\"caption-attachment-89156\" style=\"width: 832px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89156\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/iamge1.jpg\" alt=\"\" width=\"832\" height=\"511\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/iamge1.jpg 832w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/iamge1-300x184.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/iamge1-768x472.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/iamge1-635x390.jpg 635w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/iamge1-789x485.jpg 789w\" sizes=\"(max-width: 832px) 100vw, 832px\" \/><figcaption id=\"caption-attachment-89156\" class=\"wp-caption-text\">Fig 1.\u00a0URLDownloadToFileA() Call with their parameters<\/figcaption><\/figure>\n<p>The number array is read from text box\u00a0then\u00a0converted into characters\u00a0and concatenated\u00a0to form\u00a0a URL\u00a0and\u00a0path where file is downloaded. Sometimes it also uses\u00a0PowerShell\u00a0to download file. In most of the cases file is downloaded at \u201c<em>C:\\W<\/em><em>indows\\temp<\/em>\u201d\u00a0location.<\/p>\n<figure id=\"attachment_89157\" aria-describedby=\"caption-attachment-89157\" style=\"width: 449px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89157\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/image-2.jpg\" alt=\"\" width=\"449\" height=\"213\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/image-2.jpg 449w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/image-2-300x142.jpg 300w\" sizes=\"(max-width: 449px) 100vw, 449px\" \/><figcaption id=\"caption-attachment-89157\" class=\"wp-caption-text\">Fig 2.\u00a0Characters stored in Number Array<\/figcaption><\/figure>\n<p><b>Stage \u2013\u00a0<\/b><b>II:<\/b><b>\u00a0<\/b><\/p>\n<ol>\n<li><b>CRYPTER<\/b><\/li>\n<\/ol>\n<p>The first stage of\u00a0Maze ransomware is custom\u00a0cryptor. This\u00a0cryptor\u00a0is packed one with less imports. It loads libraries by calling\u00a0<em>LoadLibrary<\/em><em>()<\/em> and\u00a0<em>GetProcAddress<\/em><em>()<\/em> from kernel32.dll.\u00a0In this\u00a0cryptor,\u00a0function\u00a0names are\u00a0stored with their\u00a0adler32\u00a0checksum.<\/p>\n<p>The\u00a0cryptor\u00a0for\u00a0antidebugging, it passes junk strings to the function\u00a0<em>OutputDebugStringW<\/em><em>(<\/em>).<\/p>\n<figure id=\"attachment_89158\" aria-describedby=\"caption-attachment-89158\" style=\"width: 852px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89158\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/pic3.jpg\" alt=\"\" width=\"852\" height=\"608\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/pic3.jpg 852w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/pic3-300x214.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/pic3-768x548.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/pic3-547x390.jpg 547w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/pic3-789x563.jpg 789w\" sizes=\"(max-width: 852px) 100vw, 852px\" \/><figcaption id=\"caption-attachment-89158\" class=\"wp-caption-text\">Fig 3.\u00a0Call to\u00a0OutputDebugStringW()<\/figcaption><\/figure>\n<p>In the below code,\u00a0it checks whether file is present or not, if present it will terminate. Similarly, it also checks specific\u00a0commandline\u00a0arguments if it is present it will change execution flow. Then malware load the resource where actual\u00a0DLL\u00a0is present. The loaded resource is encrypted and\u00a0XOR\u00a0operation is used with key 0x41. After decryption, we get base64 encoded data.<\/p>\n<figure id=\"attachment_89159\" aria-describedby=\"caption-attachment-89159\" style=\"width: 574px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89159\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/pic4.jpg\" alt=\"\" width=\"574\" height=\"426\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/pic4.jpg 574w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/pic4-300x223.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/pic4-525x390.jpg 525w\" sizes=\"(max-width: 574px) 100vw, 574px\" \/><figcaption id=\"caption-attachment-89159\" class=\"wp-caption-text\">Fig 4. Xor Loop and API resolution<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>After copying all data onto stack, API names are formed and then it calls\u00a0Loadlibrary() Win32 API. Then it decodes base64 data by calling\u00a0CryptStringToBinaryA() API. The decrypted buffer is again decrypted using CHA-CHA 20 algorithm which brings actual payload of Maze ransomware. Along with payload (which is a DLL of Maze), it also decrypts shellcode. By using\u00a0CreateThread() API, it executes the shellcode.<\/p>\n<figure id=\"attachment_89160\" aria-describedby=\"caption-attachment-89160\" style=\"width: 589px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89160\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/pic-6.jpg\" alt=\"\" width=\"589\" height=\"321\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/pic-6.jpg 589w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/pic-6-300x163.jpg 300w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><figcaption id=\"caption-attachment-89160\" class=\"wp-caption-text\">Fig 5. Call to\u00a0CreateThread()<\/figcaption><\/figure>\n<p>In this\u00a0payload code, it firstly\u00a0loads base address of kernel32 for PEB.\u00a0Below code show the loading of address.<\/p>\n<figure id=\"attachment_89161\" aria-describedby=\"caption-attachment-89161\" style=\"width: 478px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89161\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/image8.jpg\" alt=\"\" width=\"478\" height=\"201\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/image8.jpg 478w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/image8-300x126.jpg 300w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><figcaption id=\"caption-attachment-89161\" class=\"wp-caption-text\">Fig\u00a06.\u00a0Address\u00a0is Loaded\u00a0from PEB<\/figcaption><\/figure>\n<p>The shellcode allocates\u00a0memory using\u00a0<em>VirtualAlloc<\/em><em>()<\/em> and copies\u00a0DLL\u00a0file to\u00a0newly allocated space. Then it\u00a0creates a\u00a0thread and execute code from\u00a0DLL. This code changes bytes at original entry point and then jump to OEP.<\/p>\n<p><b>2. MAZE PAYLOAD<\/b><\/p>\n<p>In decrypted payload it first loads\u00a0all the\u00a0APIs\u00a0and then does patching of\u00a0dbgUiRemoteBreakin\u00a0from\u00a0ntdl.dll. It is one of the anti-debugging\u00a0techniques\u00a0it\u00a0using to avoid attachment of debugger.<\/p>\n<p>First it calls\u00a0<em>VirtualProtect()<\/em>\u00a0on\u00a0<b>dbgUiRemoteBreakin<\/b><b>\u00a0<\/b>with PAGE_EXECUTE_READWRITE\u00a0as new\u00a0flNewProtect. Then it replaces\u00a0byte\u00a06A\u00a0with C3 by simple mov instruction.\u00a0So,\u00a0if someone try to attach debugger it will get failed.<\/p>\n<figure id=\"attachment_89163\" aria-describedby=\"caption-attachment-89163\" style=\"width: 578px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89163\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/c3image.jpg\" alt=\"\" width=\"578\" height=\"163\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/c3image.jpg 578w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/c3image-300x85.jpg 300w\" sizes=\"(max-width: 578px) 100vw, 578px\" \/><figcaption id=\"caption-attachment-89163\" class=\"wp-caption-text\">Fig\u00a07.\u00a0Copy 0xC3 at\u00a0dbgUiRemoteBreakin\u00a0Entry point<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_89164\" aria-describedby=\"caption-attachment-89164\" style=\"width: 1064px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89164\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/combin1e.jpg\" alt=\"\" width=\"1064\" height=\"191\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/combin1e.jpg 1064w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/combin1e-300x54.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/combin1e-768x138.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/combin1e-650x117.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/combin1e-789x142.jpg 789w\" sizes=\"(max-width: 1064px) 100vw, 1064px\" \/><figcaption id=\"caption-attachment-89164\" class=\"wp-caption-text\">Fig\u00a08.\u00a0Code before and after patching<\/figcaption><\/figure>\n<p>Then it enumerates running processes using <em>Process32<\/em><em>First()<\/em>\u00a0and <em>process32Next<\/em><em>()<\/em>. It calls APIs using\u00a0<em>\u2018je\u2019<\/em>\u00a0instruction and address is pushed onto stack which is executed\u00a0after\u00a0API\u00a0call. Call is replaced with\u00a0<em>\u2018push\u2019<\/em><em>\u00a0<\/em>and\u00a0<em>\u2018jz\u2019<\/em>\u00a0or\u00a0<em>\u2018je\u2019<\/em>\u00a0instruction.<\/p>\n<figure id=\"attachment_89166\" aria-describedby=\"caption-attachment-89166\" style=\"width: 884px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89166\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/jumcall2.jpg\" alt=\"\" width=\"884\" height=\"163\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/jumcall2.jpg 884w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/jumcall2-300x55.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/jumcall2-768x142.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/jumcall2-650x120.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/jumcall2-789x145.jpg 789w\" sizes=\"(max-width: 884px) 100vw, 884px\" \/><figcaption id=\"caption-attachment-89166\" class=\"wp-caption-text\">Fig\u00a09.\u00a0 Call to Process32NextW () using\u00a0jz\u00a0instruction<\/figcaption><\/figure>\n<p>After process enumeration it will obfuscate all the names with its own algorithm which uses\u00a0XMM registers. Then it calculates hash of this\u00a0obfuscated string which is then compared with some hardcoded hashes. Some of them\u00a0are:<\/p>\n<p>Procmon64.exe:\u00a00x776E0635<\/p>\n<p>Procexp64.exe:\u00a00x78020640<\/p>\n<p>Ida.exe:\u00a00x33840485<\/p>\n<p>Dumpcap.exe:\u00a00x5FB805C5<\/p>\n<p>X32dbg.exe:\u00a00x50620538<\/p>\n<figure id=\"attachment_89167\" aria-describedby=\"caption-attachment-89167\" style=\"width: 553px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89167\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/cmp_imp_image.jpg\" alt=\"\" width=\"553\" height=\"136\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/cmp_imp_image.jpg 553w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/cmp_imp_image-300x74.jpg 300w\" sizes=\"(max-width: 553px) 100vw, 553px\" \/><figcaption id=\"caption-attachment-89167\" class=\"wp-caption-text\">Fig\u00a010:\u00a0Compare hashes\u00a0with\u00a0running process\u00a0hashes<\/figcaption><\/figure>\n<p>When any of the process hash matches it calls\u00a0<em>TerminateProcess()<\/em><em>\u00a0<\/em>and exit the\u00a0running process.<\/p>\n<p>It will not\u00a0encrypt\u00a0files\u00a0for specific keyboard type. To get keyboard type it calls the function\u00a0<em>GetUserDefaultUILanguage()<\/em>. For\u00a0eg:<\/p>\n<p>Russsian: 0x419\u00a0 \/\/ NOT Encrypt For this value<\/p>\n<p>Ukrainian: 0x422 \/\/ NOT Encrypt For this value<\/p>\n<p>Serbian: 0x7C1A \/\/ NOT Encrypt For this value<\/p>\n<p>en_US\u00a0: 0x409\u00a0\/\/ Encrypt For this value<\/p>\n<figure id=\"attachment_89168\" aria-describedby=\"caption-attachment-89168\" style=\"width: 547px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89168\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/422cmp.jpg\" alt=\"\" width=\"547\" height=\"88\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/422cmp.jpg 547w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/422cmp-300x48.jpg 300w\" sizes=\"(max-width: 547px) 100vw, 547px\" \/><figcaption id=\"caption-attachment-89168\" class=\"wp-caption-text\">Fig 11. Check value return by\u00a0GetUserDefaultUILanguage()<\/figcaption><\/figure>\n<p>Then\u00a0It first\u00a0communicate\u00a0with\u00a0CnC\u00a0server where IP list is hardcoded,\u00a0all\u00a0below mentioned IP\u00a0seems\u00a0belong\u00a0to\u00a0Russia.<\/p>\n<p>91.218.114.4<\/p>\n<p>91.218.114.11<\/p>\n<p>91.218.114.25<\/p>\n<p>91.218.114.26<\/p>\n<p>91.218.114.32<\/p>\n<p>91.218.114.37<\/p>\n<p>91.218.114.38<\/p>\n<figure id=\"attachment_89169\" aria-describedby=\"caption-attachment-89169\" style=\"width: 546px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89169\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/ipimage.jpg\" alt=\"\" width=\"546\" height=\"164\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/ipimage.jpg 546w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/ipimage-300x90.jpg 300w\" sizes=\"(max-width: 546px) 100vw, 546px\" \/><figcaption id=\"caption-attachment-89169\" class=\"wp-caption-text\">Fig 12. Hardcoded Ip list<\/figcaption><\/figure>\n<p>Then data is sent to\u00a0CnC\u00a0on first request: Data which is sent is\u00a0Username,\u00a0Computername,\u00a0OsVersion.\u00a0Malware create mutex with unique ID. Unique ID is created using\u00a0SHA(\u00a0<em>GetComputerName() +\u00a0VolumeID<\/em><em>()<\/em>)\u00a0.\u00a0For ransomware marker it creates unique file on root and each folder.<\/p>\n<p><b>Maze Encryption<\/b><b>\u00a0Process<\/b><b>:<\/b><\/p>\n<p>Malware select\u00a0files for\u00a0encryption based on extension. It excludes following extension:<\/p>\n<ul>\n<li>Exe<\/li>\n<li>Dll<\/li>\n<li>Sys<\/li>\n<li>lnk<\/li>\n<\/ul>\n<p>It also\u00a0excludes\u00a0following files:<\/p>\n<ul>\n<li>Decrypt-Files.txt<\/li>\n<li>Autorun.inf<\/li>\n<li>Boot.ini<\/li>\n<li>Desktop.ini<\/li>\n<li>Temp\/000.bmp<\/li>\n<\/ul>\n<p>Excluded folders:<\/p>\n<p>%windows%, @gaming%, %programdata%,\u00a0%tor Brower%, %local Settings%, %appdata%\u00a0etc<\/p>\n<figure id=\"attachment_89170\" aria-describedby=\"caption-attachment-89170\" style=\"width: 778px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89170\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/localsetting.jpg\" alt=\"\" width=\"778\" height=\"101\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/localsetting.jpg 778w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/localsetting-300x39.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/localsetting-768x100.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/localsetting-650x84.jpg 650w\" sizes=\"(max-width: 778px) 100vw, 778px\" \/><figcaption id=\"caption-attachment-89170\" class=\"wp-caption-text\">Fig 13. Checking folder names\u00a0and if same found it will not encrypt the folder.<\/figcaption><\/figure>\n<p><b>Encryption process:<\/b><\/p>\n<p>It first creates key\u00a0and then export\u00a0it in the \u201c<em>c:\\<\/em><em>programdata\\data1.tmp<\/em>\u201d\u00a0folder. Then it\u00a0drops\u00a0ransom note in each folder before encryption.\u00a0Later it will\u00a0just\u00a0import key from\u00a0this file and call \u201c<em>CryptEncrypt()<\/em>\u201d.<\/p>\n<p>It retrieves drive letters and then determine type of drive using\u00a0<em>GetDriveType<\/em><em>()<\/em>.\u00a0Further it enumerates using API calls <em>FindFirstFileA()<\/em> and <em>FindNextFileA()<\/em>.<\/p>\n<p>It deletes shadowcopy by creating fake path for wmic and then call delete recover by calling <em>CreateProcessW()<\/em>.\u00a0It encrypts files using CHA-CHA algorithm and key of chacha is encrypted using RSA.\u00a0 For this it uses crypto APIs. Encrypted files are having marker at the end which is \u2018<strong><em>66116166<\/em><\/strong>\u2019.<\/p>\n<figure id=\"attachment_89171\" aria-describedby=\"caption-attachment-89171\" style=\"width: 577px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89171\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/newimage.jpg\" alt=\"\" width=\"577\" height=\"474\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/newimage.jpg 577w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/newimage-300x246.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/newimage-475x390.jpg 475w\" sizes=\"(max-width: 577px) 100vw, 577px\" \/><figcaption id=\"caption-attachment-89171\" class=\"wp-caption-text\">Fig 14. Encrypted File by Maze ransomware<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>It creates thread for\u00a0each drive, which then again call create thread\u00a0function\u00a0for each folder\u00a0which do the encryption.\u00a0Encryption will start from root of C: or D: and parallelly it also accesses the shared drive by using <em>WNetShareEnum()<\/em> API. Same encryption function is used for encrypting share drive files. The first folder which is encrypted is \u201c$Recycle Bin\u201d.<\/p>\n<p><em>CreateThread()<\/em>\u00a0with following function for each folder. File is opened as follows. File is encrypted by calling\u00a0<em>CryptEncrypt()<\/em>\u00a0and it is renamed by calling\u00a0<em>moveFileEx<\/em><em>()<\/em> with extension.<\/p>\n<p><b>Encrypted\u00a0<\/b><b>File:<\/b><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-89172\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2020\/06\/image1111.jpg\" alt=\"\" width=\"734\" height=\"266\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/image1111.jpg 734w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/image1111-300x109.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2020\/06\/image1111-650x236.jpg 650w\" sizes=\"(max-width: 734px) 100vw, 734px\" \/><\/p>\n<p><b>Maze Malware uses many\u00a0<\/b><b>tactics for anti-<\/b><b>Analysis<\/b><b>:<\/b><\/p>\n<ul>\n<li>Apis\u00a0are resolves at runtime.<\/li>\n<li>Indirect calling of\u00a0API &amp;\u00a0functions\u00a0using JE &amp; JNE\u00a0instructions.<\/li>\n<li>Patching\u00a0DbgUiRemoteTracking\u00a0to avoid attaching of\u00a0debugger at runtime.<\/li>\n<li>Checking being debugged flag.<\/li>\n<li>Checking\u00a0for\u00a0VM.<\/li>\n<li>Checks RAM &amp; hardware size\u00a0by using API \u2013\u00a0GlobalMemoryStatusEx\u00a0&amp;\u00a0GetDiskeSpaceW.<\/li>\n<li>Check process names by calculating\u00a0its\u00a0hashes.<\/li>\n<\/ul>\n<p><b>Prevention measures to stay away from ransomware<\/b><\/p>\n<p>Common infection vectors used by Maze Ransomware are <a href=\"https:\/\/blogs.quickheal.com\/phishers-using-custom-404-not-found-error-page-steal-microsoft-credentials\/\">phishing emails<\/a> with MS Office attachments and fake\/phishing websites laced with Exploit Kits. Hence, we advise our end users to exercise caution while handling emails from unknown sources, downloading MS Office attachments, enabling macros and clicking on suspicious links.<\/p>\n<p><b>Indicators of compromise<\/b><\/p>\n<p>49B28F16BA496B57518005C813640EEB<\/p>\n<p>BD9838D84FD77205011E8B0C2BD711E0<\/p>\n<p><b>Subject Matter Expert<\/b><br \/>\nPreksha Saxena | Quick Heal Security Labs<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Maze is a recent highlighted ransomware among the ever-growing list of ransomware families. Maze ransomware is active from last one year, although it came into light due to its new approach of publishing sensitive data of infected customer publicly. The malware uses different techniques to gain entry like to use exploits kits or via email [&hellip;]<\/p>\n","protected":false},"author":45,"featured_media":89155,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-89154","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/89154"}],"collection":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/comments?post=89154"}],"version-history":[{"count":5,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/89154\/revisions"}],"predecessor-version":[{"id":91536,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/89154\/revisions\/91536"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media\/89155"}],"wp:attachment":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media?parent=89154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/categories?post=89154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/tags?post=89154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}