{"id":15459,"date":"2019-05-31T10:10:03","date_gmt":"2019-05-31T18:10:03","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2019\/05\/31\/news-9208\/"},"modified":"2019-05-31T10:10:03","modified_gmt":"2019-05-31T18:10:03","slug":"news-9208","status":"publish","type":"post","link":"http:\/\/www.palada.net\/index.php\/2019\/05\/31\/news-9208\/","title":{"rendered":"Hidden Bee: Let&#8217;s go down the rabbit hole"},"content":{"rendered":"<p><strong>Credit to Author: hasherezade| Date: Fri, 31 May 2019 17:32:57 +0000<\/strong><\/p>\n<p>Some time ago, we discussed the interesting malware, <a rel=\"noreferrer noopener\" aria-label=\"Hidden Bee (opens in a new tab)\" href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/08\/reversing-malware-in-a-custom-format-hidden-bee-elements\/\" target=\"_blank\">Hidden Bee<\/a>. It is a Chinese miner, composed of userland components, as well as of a bootkit part. One of its unique features is a custom format used for some of the high-level elements (this format was featured in <a href=\"https:\/\/www.youtube.com\/watch?v=0ndK-Az0RO4\" data-rel=\"lightbox-video-0\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">my recent presentation at SAS<\/a>).<\/p>\n<p>Recently, we stumbled upon a new sample of Hidden Bee. As it turns out, its authors decided to redesign some elements, as well as the used formats. In this post, we will take a deep dive in the functionality of the loader and the included changes.<\/p>\n<h3>Sample<\/h3>\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.virustotal.com\/#\/file\/fd9edb6d9ac9674e797e51b3767e45a2eb23343c2ce88e64ef20d26f641064af\/detection\" target=\"_blank\">831d0b55ebeb5e9ae19732e18041aa54<\/a> &#8211; shared by <a href=\"https:\/\/twitter.com\/james_inthe_box\/status\/1117526091101396992?s=21\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">@James_inthe_box<\/a><\/p>\n<h3>Overview<\/h3>\n<p>The Hidden Bee runs silently\u2014only increased processor usage can hint that the system is infected. More can be revealed with the help of tools inspecting the memory of running processes.<\/p>\n<p>Initially, the main sample installs itself as a Windows service:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38532\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/added_service\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/added_service.png\" data-orig-size=\"816,180\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"added_service\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/added_service-300x66.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/added_service-600x132.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/added_service.png\" alt=\"\" class=\"wp-image-38532\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/added_service.png 816w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/added_service-300x66.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/added_service-600x132.png 600w\" sizes=\"(max-width: 816px) 100vw, 816px\" \/><figcaption>Hidden Bee service<\/figcaption><\/figure>\n<p>However, once the next component is downloaded, this service is removed.<\/p>\n<p>The payloads are injected into several applications, such as svchost.exe, msdtc.exe, dllhost.exe, and WmiPrvSE.exe.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38517\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/injected2\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected2.png\" data-orig-size=\"800,106\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"injected2\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected2-300x40.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected2-600x80.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected2.png\" alt=\"\" class=\"wp-image-38517\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected2.png 800w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected2-300x40.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected2-600x80.png 600w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n<p>If we scan the system with <a href=\"https:\/\/github.com\/hasherezade\/hollows_hunter\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">hollows_hunter<\/a>, we can see that there are some implants in the memory of those processes:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38689\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/scanned_list\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/scanned_list.png\" data-orig-size=\"554,245\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"scanned_list\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/scanned_list-300x133.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/scanned_list.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/scanned_list.png\" alt=\"\" class=\"wp-image-38689\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/scanned_list.png 554w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/scanned_list-300x133.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/scanned_list-195x85.png 195w\" sizes=\"(max-width: 554px) 100vw, 554px\" \/><figcaption>Results of the scan by hollows_hunter<\/figcaption><\/figure>\n<p>Indeed, if we take a look inside each process&#8217; memory (with the help of Process Hacker), we can see atypical executable elements:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38684\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/malware_modules_implanted\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_modules_implanted.png\" data-orig-size=\"840,297\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"malware_modules_implanted\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_modules_implanted-300x106.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_modules_implanted-600x212.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_modules_implanted.png\" alt=\"\" class=\"wp-image-38684\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_modules_implanted.png 840w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_modules_implanted-300x106.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_modules_implanted-600x212.png 600w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_modules_implanted-470x165.png 470w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><figcaption>Hidden Bee implants are placed in RWX memory<\/figcaption><\/figure>\n<p>Some of them are lacking typical PE headers, for example:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38685\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/malware_module1\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_module1.png\" data-orig-size=\"605,194\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"malware_module1\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_module1-300x96.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_module1-600x192.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_module1.png\" alt=\"\" class=\"wp-image-38685\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_module1.png 605w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_module1-300x96.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_module1-600x192.png 600w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/malware_module1-604x194.png 604w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><figcaption>Executable in one of the multiple customized formats used by Hidden Bee<\/figcaption><\/figure>\n<p>But in addition to this, we can also find PE files implanted at unusual addresses in the memory:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38520\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/pe_files_injected\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/pe_files_injected.png\" data-orig-size=\"610,297\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"pe_files_injected\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/pe_files_injected-300x146.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/pe_files_injected-600x292.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/pe_files_injected.png\" alt=\"\" class=\"wp-image-38520\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/pe_files_injected.png 610w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/pe_files_injected-300x146.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/pe_files_injected-600x292.png 600w\" sizes=\"(max-width: 610px) 100vw, 610px\" \/><figcaption>Manually-loaded PE files in the memory of WmiPrvSE.exe<\/figcaption><\/figure>\n<p>Those manually-loaded PE files turned out to be legitimate DLLs: <a href=\"https:\/\/www.virustotal.com\/#\/file\/bc0d5b5d63cf39bf2da62271f7ff8615bfd550a803a72ea70204746e03bfdfd2\/details\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">OpenCL.dll<\/a> and <a rel=\"noreferrer noopener\" aria-label=\"cudart32_80.dll (opens in a new tab)\" href=\"https:\/\/www.virustotal.com\/#\/file\/88931308f09fb89222a5a84e5ad9b6074f43db5dbc0f0f6321c5b58691dff2df\/details\" target=\"_blank\">cudart32_80.dll<\/a> (NVIDIA CUDA Runtime, Version 8.0.61 ). CUDA is a technology belonging to NVidia graphic cards. So, their presence suggests that the malware uses GPU in order to boost the mining performance.<\/p>\n<p>When we inspect the memory even closer, we see within the executable implants there are some strings referencing LUA components:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38686\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/lua_references-2\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/lua_references-1.png\" data-orig-size=\"609,314\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"lua_references\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/lua_references-1-300x155.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/lua_references-1-600x309.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/lua_references-1.png\" alt=\"\" class=\"wp-image-38686\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/lua_references-1.png 609w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/lua_references-1-300x155.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/lua_references-1-600x309.png 600w\" sizes=\"(max-width: 609px) 100vw, 609px\" \/><figcaption>Strings referencing LUA scripting language, used by Hidden Bee components<\/figcaption><\/figure>\n<p>Those strings are typical for the Hidden Bee miner, and they were also mentioned in <a rel=\"noreferrer noopener\" aria-label=\"the previous reports (opens in a new tab)\" href=\"https:\/\/www.freebuf.com\/column\/174581.html\" target=\"_blank\">the previous reports<\/a>.<\/p>\n<p>We can also see the strings referencing the mining activity, i.e. the Cryptonight miner.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38687\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/list\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/list.png\" data-orig-size=\"582,534\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"list\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/list-300x275.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/list.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/list.png\" alt=\"\" class=\"wp-image-38687\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/list.png 582w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/list-300x275.png 300w\" sizes=\"(max-width: 582px) 100vw, 582px\" \/><\/figure>\n<p>List of modules:<\/p>\n<pre class=\"wp-block-preformatted\">bin\/i386\/coredll.bin<br \/><a rel=\"noreferrer noopener\" aria-label=\"dispatcher.lua (opens in a new tab)\" href=\"https:\/\/gist.github.com\/malwarezone\/b83a5db804aa2379f4a4647aab18f771#file-dispatcher-lua\" target=\"_blank\">dispatcher.lua<\/a><br \/>bin\/i386\/ocl_detect.bin<br \/>bin\/i386\/cuda_detect.bin<br \/>bin\/amd64\/coredll.bin<br \/>bin\/amd64\/algo_cn_ocl.bin<br \/>lib\/amd64\/cudart64_80.dll<br \/>src\/cryptonight.cl<br \/>src\/cryptonight_r.cl<br \/>bin\/i386\/algo_cn_ocl.bin<br \/><a href=\"https:\/\/gist.github.com\/malwarezone\/b83a5db804aa2379f4a4647aab18f771#file-config-lua\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"config.lua (opens in a new tab)\">config.lua<\/a><br \/>lib\/i386\/cudart32_80.dll<br \/>src\/CryptonightR.cu<br \/>bin\/i386\/algo_cn.bin<br \/>bin\/amd64\/precomp.bin<br \/>bin\/amd64\/ocl_detect.bin<br \/>bin\/amd64\/cuda_detect.bin<br \/>lib\/amd64\/opencl.dll<br \/>lib\/i386\/opencl.dll<br \/>bin\/amd64\/algo_cn.bin<br \/>bin\/i386\/precomp.bin<\/pre>\n<p>And we can even retrieve the miner configuration:<\/p>\n<figure class=\"wp-block-embed\">\n<div class=\"wp-block-embed__wrapper\">\n<style>.gist table { margin-bottom: 0; }<\/style>\n<div class=\"gist-oembed\" data-gist=\"malwarezone\/b83a5db804aa2379f4a4647aab18f771.json?file=config.lua\"><\/div>\n<\/p><\/div>\n<\/figure>\n<h3>Inside<\/h3>\n<p>Hidden Bee has a long chain of components that finally lead to loading of the miner. On the way, we will find a variety of customized formats: data packages, executables, and filesystems. The filesystems are going to be mounted in the memory of the malware, and additional plugins and configuration are retrieved from there. Hidden Bee communicates with the C&amp;C to retrieve the modules\u2014on the way also using its own TCP-based protocol.<\/p>\n<p>The first part of the loading process is described by the following diagram:<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/hidden_bee_loader-2.png\" data-rel=\"lightbox-0\" title=\"\"><img decoding=\"async\" data-attachment-id=\"38969\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/hidden_bee_loader-3\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/hidden_bee_loader-2.png\" data-orig-size=\"681,739\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"hidden_bee_loader\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/hidden_bee_loader-2-276x300.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/hidden_bee_loader-2-553x600.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/hidden_bee_loader-2.png\" alt=\"\" class=\"wp-image-38969\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/hidden_bee_loader-2.png 681w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/hidden_bee_loader-2-276x300.png 276w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/hidden_bee_loader-2-553x600.png 553w\" sizes=\"(max-width: 681px) 100vw, 681px\" \/><\/a><\/figure>\n<p>Each of the .spk packages contains a custom &#8216;SPUTNIK&#8217; filesystem, containing more executable modules.<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/bee_plugins-1.png\" data-rel=\"lightbox-1\" title=\"\"><img decoding=\"async\" data-attachment-id=\"38910\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/bee_plugins-2\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/bee_plugins-1.png\" data-orig-size=\"628,584\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"bee_plugins\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/bee_plugins-1-300x279.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/bee_plugins-1-600x558.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/bee_plugins-1.png\" alt=\"\" class=\"wp-image-38910\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/bee_plugins-1.png 628w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/bee_plugins-1-300x279.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/bee_plugins-1-600x558.png 600w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><\/a><\/figure>\n<p>Starting the analysis from the loader, we will go down to the plugins, showing the inner workings of each element taking part in the loading process.<\/p>\n<h3>The loader<\/h3>\n<p>In contrast to most of the malware that we see nowadays, the loader is not packed by any crypter. According the header, it was compiled in November 2018.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38191\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/compile_time\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/compile_time.png\" data-orig-size=\"684,150\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"compile_time\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/compile_time-300x66.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/compile_time-600x132.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/compile_time.png\" alt=\"\" class=\"wp-image-38191\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/compile_time.png 684w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/compile_time-300x66.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/compile_time-600x132.png 600w\" sizes=\"(max-width: 684px) 100vw, 684px\" \/><\/figure>\n<p>While in the former edition the modules in the custom formats were dropped as separate files, this time the next stage is unpacked from inside the loader.<\/p>\n<p> The loader is not obfuscated. Once we load it with typical tools (IDA), we can clearly see how the new format is loaded.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38187\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/to_load_custom\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/to_load_custom.png\" data-orig-size=\"306,123\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"to_load_custom\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/to_load_custom-300x121.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/to_load_custom.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/to_load_custom.png\" alt=\"\" class=\"wp-image-38187\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/to_load_custom.png 306w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/to_load_custom-300x121.png 300w\" sizes=\"(max-width: 306px) 100vw, 306px\" \/><figcaption>The loading function<\/figcaption><\/figure>\n<p>Section .shared contains the configuration:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38533\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/section_shared\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/section_shared.png\" data-orig-size=\"881,539\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"section_shared\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/section_shared-300x184.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/section_shared-600x367.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/section_shared.png\" alt=\"\" class=\"wp-image-38533\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/section_shared.png 881w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/section_shared-300x184.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/section_shared-600x367.png 600w\" sizes=\"(max-width: 881px) 100vw, 881px\" \/><figcaption>Encrypted configuration. The last 16 bytes after the data block is the key.<\/figcaption><\/figure>\n<p>The configuration is decrypted with the help of XTEA algorithm.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38534\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/decrypt_config\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypt_config.png\" data-orig-size=\"330,342\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"decrypt_config\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypt_config-289x300.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypt_config.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypt_config.png\" alt=\"\" class=\"wp-image-38534\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypt_config.png 330w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypt_config-289x300.png 289w\" sizes=\"(max-width: 330px) 100vw, 330px\" \/><figcaption>Decrypting the configuration<\/figcaption><\/figure>\n<p>The decrypted configuration must start from the magic WORD &#8220;pZ.&#8221; It contains the C&amp;C and the name under which the service will be installed:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38535\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/decrypted_config\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypted_config.png\" data-orig-size=\"450,261\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"decrypted_config\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypted_config-300x174.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypted_config.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypted_config.png\" alt=\"\" class=\"wp-image-38535\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypted_config.png 450w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypted_config-300x174.png 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/figure>\n<h4>Unscrambling the NE format<\/h4>\n<p>The NE format <a href=\"https:\/\/www.freebuf.com\/column\/174581.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">was seen before<\/a>, in former editions of Hidden Bee. It is just a scrambled version of the PE. By observing which fields have been misplaced, we can easily reconstruct the original PE.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38522\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/unpack_from_loader\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_from_loader.png\" data-orig-size=\"628,409\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"unpack_from_loader\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_from_loader-300x195.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_from_loader-600x391.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_from_loader.png\" alt=\"\" class=\"wp-image-38522\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_from_loader.png 628w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_from_loader-300x195.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_from_loader-600x391.png 600w\" sizes=\"(max-width: 628px) 100vw, 628px\" \/><figcaption>The loader, unpacking the next stage<\/figcaption><\/figure>\n<p>NE is one of the two similar formats being used by this malware. Another similar one starts from a DWORD 0x0EF1FAB9 and is used to further load components. Both of them have an analogical structure that comes from slightly modified PE format:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38213\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/reconstruct_pe-2\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/reconstruct_pe-1.png\" data-orig-size=\"706,320\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"reconstruct_pe\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/reconstruct_pe-1-300x136.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/reconstruct_pe-1-600x272.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/reconstruct_pe-1.png\" alt=\"\" class=\"wp-image-38213\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/reconstruct_pe-1.png 706w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/reconstruct_pe-1-300x136.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/04\/reconstruct_pe-1-600x272.png 600w\" sizes=\"(max-width: 706px) 100vw, 706px\" \/><\/figure>\n<p>Header:  <\/p>\n<pre class=\"wp-block-preformatted\">WORD magic; \/\/ 'NE'<br \/>WORD pe_offset;<br \/>WORD machine_id; <\/pre>\n<p>The conversion back to PE format is trivial: It is enough to add the erased magic numbers: MZ and PE, and to move displaced fields to their original offsets. The tool that automatically does the mentioned conversion is available <a href=\"https:\/\/github.com\/hasherezade\/bee_parser\/tree\/master\/bee_lvl2_converter\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">here<\/a>. <\/p>\n<p>In the previous edition, the parts of Hidden Bee with analogical functionality were delivered in a different, more complex <a rel=\"noreferrer noopener\" aria-label=\"another proprietary format used for the loader (opens in a new tab)\" href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/08\/reversing-malware-in-a-custom-format-hidden-bee-elements\/\" target=\"_blank\">proprietary format<\/a>  than the one currently being analyzed.<\/p>\n<h4 id=\"mce_31\">Second stage: a downloader (in NE format)<\/h4>\n<p>As a result of the conversion, we get the following PE: (<a href=\"https:\/\/www.virustotal.com\/#\/file\/3a1c218de4d653dff06a68cfc12b958766dcb869450c9dd06928be819beb365c\/details\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">fddfd292eaf33a490224ebe5371d3275<\/a>). This module is a downloader of the next stage. The interesting thing is that the subsystem of this module is set as a driver, however, it is not loaded like a typical driver. The custom loader loads it into a user space just like any typical userland component.<\/p>\n<p>The function at the module&#8217;s Entry Point is called with three parameters. The first is a path of the main module. Then, the parameters from the configuration are passed. Example:<\/p>\n<p><pre>0012FE9C     00601A34  UNICODE \"\"C:UserstesterDesktopnew_bee.exe\"\"<br \/>0012FEA0     00407104  UNICODE \"NAPCUYWKOxywEgrO\"<br \/>0012FEA4     00407004  UNICODE \"118.41.45.124:9000\"<\/pre>\n<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38541\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/call_module_ep\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_module_ep.png\" data-orig-size=\"725,172\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"call_module_ep\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_module_ep-300x71.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_module_ep-600x142.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_module_ep.png\" alt=\"\" class=\"wp-image-38541\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_module_ep.png 725w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_module_ep-300x71.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_module_ep-600x142.png 600w\" sizes=\"(max-width: 725px) 100vw, 725px\" \/><figcaption>Calling the Entry Point of the manually-loaded NE module<\/figcaption><\/figure>\n<p>The execution of the module can take one of the two paths. The first one is meant for adding persistence: The module installs itself as a service.<\/p>\n<p>If the module detects that it is already running as a service, it takes the second path. In such a case, it proceeds to download the next module from the server. The next module is packed as as Cabinet file.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38538\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/to_unpack_cabinet\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_cabinet.png\" data-orig-size=\"611,534\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"to_unpack_cabinet\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_cabinet-300x262.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_cabinet-600x524.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_cabinet.png\" alt=\"\" class=\"wp-image-38538\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_cabinet.png 611w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_cabinet-300x262.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_cabinet-600x524.png 600w\" sizes=\"(max-width: 611px) 100vw, 611px\" \/><figcaption>The downloaded Cabinet file is being passed to the unpacking function<\/figcaption><\/figure>\n<p>It is first unpacked into a file named &#8220;core.sdb&#8221;. The unpacked module is in a customized format based on PE. This time, the format has a different signature: &#8220;NS&#8221; and it is different from the aforementioned &#8220;NE&#8221; format (detailed explanation will be given further).<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38540\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/unpacked_ns_file\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpacked_NS_file.png\" data-orig-size=\"625,236\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"unpacked_NS_file\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpacked_NS_file-300x113.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpacked_NS_file-600x227.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpacked_NS_file-600x227.png\" alt=\"\" class=\"wp-image-38540\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpacked_NS_file-600x227.png 600w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpacked_NS_file-300x113.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpacked_NS_file.png 625w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n<p>It is loaded by the proprietary loader.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38539\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/check_ns_sign\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_ns_sign.png\" data-orig-size=\"307,115\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"check_ns_sign\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_ns_sign-300x112.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_ns_sign.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_ns_sign.png\" alt=\"\" class=\"wp-image-38539\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_ns_sign.png 307w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_ns_sign-300x112.png 300w\" sizes=\"(max-width: 307px) 100vw, 307px\" \/><\/figure>\n<p>The loader enumerates all the executables in a directory: <code>%Systemroot%Microsoft.NET<\/code> and selects the ones with the compatible bitness (in the analyzed case it was selecting 32bit PEs). Once it finds a suitable PE, it runs it and injects the payload there. The injected code is run by adding its entry point to APC queue. <\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38548\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/created_process\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/created_process.png\" data-orig-size=\"692,38\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"created_process\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/created_process-300x16.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/created_process-600x33.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/created_process.png\" alt=\"\" class=\"wp-image-38548\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/created_process.png 692w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/created_process-300x16.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/created_process-600x33.png 600w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><figcaption>Hidden Bee component injecting the next stage (core.sdb) into a new process<\/figcaption><\/figure>\n<p>In case it failed to find the suitable executable in that directory, it performs the injection into dllhost.exe instead.<\/p>\n<h4 id=\"mce_22\">Unscrambling the NS format<\/h4>\n<p>As mentioned before, the core.sdb is in yet another format named NS. It is also a customized PE, however, this time the conversion is more complex than the NE format because more structures are customized. It looks like a next step in the evolution of the NE format.<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/core_sdb.png\" data-rel=\"lightbox-2\" title=\"\"><img decoding=\"async\" data-attachment-id=\"38919\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/core_sdb\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/core_sdb.png\" data-orig-size=\"769,494\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"core_sdb\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/core_sdb-300x193.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/core_sdb-600x385.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/core_sdb.png\" alt=\"\" class=\"wp-image-38919\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/core_sdb.png 769w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/core_sdb-300x193.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/core_sdb-600x385.png 600w\" sizes=\"(max-width: 769px) 100vw, 769px\" \/><\/a><figcaption>Header of the NS format<\/figcaption><\/figure>\n<p>We can see that the changes in the PE headers are bigger and more lossy\u2014only minimalist information is maintained. Only few Data Directories are left. Also the sections table is shrunk: Each section header contains only four out of nine fields that are in the original PE. <\/p>\n<p>Additionally, the format allows to pass a runtime argument from the loader to the payload via header: The pointer is saved into an additional field (marked &#8220;Filled Data&#8221; on the picture).<\/p>\n<p>Not only is the PE header shrunk. Similar customization is done on the Import Table:<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/custom_import_table1.png\" data-rel=\"lightbox-3\" title=\"\"><img decoding=\"async\" data-attachment-id=\"38572\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/custom_import_table1\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/custom_import_table1.png\" data-orig-size=\"803,156\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"custom_import_table1\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/custom_import_table1-300x58.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/custom_import_table1-600x117.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/custom_import_table1.png\" alt=\"\" class=\"wp-image-38572\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/custom_import_table1.png 803w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/custom_import_table1-300x58.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/custom_import_table1-600x117.png 600w\" sizes=\"(max-width: 803px) 100vw, 803px\" \/><\/a><figcaption>Customized part of the NS format&#8217;s import table<\/figcaption><\/figure>\n<p>This custom format can also be converted back to the PE format with the help of a dedicated converter, available <a rel=\"noreferrer noopener\" aria-label=\"here (opens in a new tab)\" href=\"https:\/\/github.com\/hasherezade\/bee_parser\/tree\/master\/bee_lvl2_converter\" target=\"_blank\">here<\/a>.<\/p>\n<h4 id=\"mce_27\">Third stage: core.sdb<\/h4>\n<p>The core.sdb module converted to PE format is available here: <a href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=a17645fac4bcb5253f36a654ea369bf9\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">a17645fac4bcb5253f36a654ea369bf9<\/a>.<\/p>\n<p>The interesting part is that the external loader does not complete the full loading process of the module. It only copies the sections. But the rest of the module loading, such as applying relocations and filling imports, is done internally in the core.sdb. <\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38549\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/coresdb_at_ep_\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/coresdb_at_ep_.png\" data-orig-size=\"281,139\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"coresdb_at_ep_\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/coresdb_at_ep_.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/coresdb_at_ep_.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/coresdb_at_ep_.png\" alt=\"\" class=\"wp-image-38549\" \/><figcaption>The loading function is just at the Entry Point of core.sdb<\/figcaption><\/figure>\n<p>The previous component was supposed to pass to the core.sdb an additional buffer with the data about the installed service: the name and the path. During its execution, core.sdb will look up this data. If found, it will delete the previously-created service, and the initial file that started the infection:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38948\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/removing_the_service\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/removing_the_service.png\" data-orig-size=\"473,630\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"removing_the_service\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/removing_the_service-225x300.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/removing_the_service-450x600.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/removing_the_service.png\" alt=\"\" class=\"wp-image-38948\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/removing_the_service.png 473w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/removing_the_service-225x300.png 225w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/removing_the_service-450x600.png 450w\" sizes=\"(max-width: 473px) 100vw, 473px\" \/><figcaption>Removing the initial service<\/figcaption><\/figure>\n<p>Getting rid of the previous persistence method suggests that it will be replaced by some different technique. Knowing previous editions of Hidden Bee, we can suspect that is may be a bootkit.<\/p>\n<p>After locking the mutex in a format GlobalSC_{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}, the module proceeds to download another component. But before it goes to download, first, a few things are checked.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38552\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/can_continue\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/can_continue.png\" data-orig-size=\"693,442\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"can_continue\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/can_continue-300x191.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/can_continue-600x383.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/can_continue.png\" alt=\"\" class=\"wp-image-38552\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/can_continue.png 693w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/can_continue-300x191.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/can_continue-600x383.png 600w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><figcaption>Checks done before download of the next module<\/figcaption><\/figure>\n<p>First of all, there is a defensive check if any of the known debuggers of sniffers are running. If so, the function quits. <\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38577\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/blacklisted_names\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/blacklisted_names.png\" data-orig-size=\"639,228\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"blacklisted_names\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/blacklisted_names-300x107.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/blacklisted_names-600x214.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/blacklisted_names.png\" alt=\"\" class=\"wp-image-38577\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/blacklisted_names.png 639w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/blacklisted_names-300x107.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/blacklisted_names-600x214.png 600w\" sizes=\"(max-width: 639px) 100vw, 639px\" \/><figcaption>The blacklist<\/figcaption><\/figure>\n<p>Also, there is a check if the application can open a file &#8216;??NPF-{0179AC45-C226-48e3-A205-DCA79C824051}&#8217;.<\/p>\n<p>If all the checks pass, the function proceeds and queries the following URL, where GET variables contain the system fingerprint:<\/p>\n<p><code>sltp:\/\/bbs.favcom.space:1108\/setup.bin?id=999&amp;sid=0&amp;sz=a7854b960e59efdaa670520bb9602f87&amp;os=65542&amp;ar=0<\/code><\/p>\n<p>The hash (sz=) is an MD5 generated from VolumeIDs. Then follows the (os=) identifying version of the operating system, and the identifier of the architecture (ar=), where 0 means 32 bit, 1 means 64bit.<\/p>\n<p>The content downloaded from this URL (starting from a magic DWORD 0xFEEDFACE &#8211; <a rel=\"noreferrer noopener\" aria-label=\"79e851622ac5298198c04034465017c0 (opens in a new tab)\" href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=79e851622ac5298198c04034465017c0\" target=\"_blank\">79e851622ac5298198c04034465017c0<\/a>) contains the encrypted package (in !rbx format), and a shellcode that will be used to unpack it. The shellcode is loaded to the current process and then executed.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38946\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/load_shellcode-2\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_shellcode-1.png\" data-orig-size=\"588,294\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"load_shellcode\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_shellcode-1-300x150.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_shellcode-1.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_shellcode-1.png\" alt=\"\" class=\"wp-image-38946\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_shellcode-1.png 588w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_shellcode-1-300x150.png 300w\" sizes=\"(max-width: 588px) 100vw, 588px\" \/><figcaption>The &#8216;FEEDFACE&#8217; module contains the shellcode to be loaded<\/figcaption><\/figure>\n<p>The shellcode&#8217;s start function uses three parameters: pointer to the functions in the previous module (core sdb), pointer to the buffer with encrypted data, size of the encrypted data.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38947\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/calling_the_shellcode\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/calling_the_shellcode.png\" data-orig-size=\"581,274\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"calling_the_shellcode\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/calling_the_shellcode-300x141.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/calling_the_shellcode.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/calling_the_shellcode.png\" alt=\"\" class=\"wp-image-38947\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/calling_the_shellcode.png 581w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/calling_the_shellcode-300x141.png 300w\" sizes=\"(max-width: 581px) 100vw, 581px\" \/><figcaption>The loader calling the shellcode<\/figcaption><\/figure>\n<h4 id=\"mce_27\">Fourth stage: the shellcode decrypting !rbx<\/h4>\n<p>The beginning of the loaded shellcode:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38942\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/shellcode_bgn\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/shellcode_bgn.png\" data-orig-size=\"397,206\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"shellcode_bgn\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/shellcode_bgn-300x156.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/shellcode_bgn.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/shellcode_bgn.png\" alt=\"\" class=\"wp-image-38942\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/shellcode_bgn.png 397w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/shellcode_bgn-300x156.png 300w\" sizes=\"(max-width: 397px) 100vw, 397px\" \/><\/figure>\n<p>The shellcode does not fill any imports by itself. Instead, it fully relies on the functions from core.sdb module, to which it passes the pointer. It makes use of the following function: malloc, mecpy, memfree, VirtualAlloc. <\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38589\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/calling_via_coresdb\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/calling_via_coresdb.png\" data-orig-size=\"554,216\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"calling_via_coresdb\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/calling_via_coresdb-300x117.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/calling_via_coresdb.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/calling_via_coresdb.png\" alt=\"\" class=\"wp-image-38589\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/calling_via_coresdb.png 554w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/calling_via_coresdb-300x117.png 300w\" sizes=\"(max-width: 554px) 100vw, 554px\" \/><figcaption>Example: calling malloc via core.sdb<\/figcaption><\/figure>\n<p>Its role is to reveal another part. It comes in an encrypted package starting from a marker !rbx. The decryption function is called just at the beginning:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38583\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/decrypt_rbx\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypt_rbx.png\" data-orig-size=\"418,209\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"decrypt_rbx\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypt_rbx-300x150.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypt_rbx.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypt_rbx.png\" alt=\"\" class=\"wp-image-38583\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypt_rbx.png 418w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/decrypt_rbx-300x150.png 300w\" sizes=\"(max-width: 418px) 100vw, 418px\" \/><figcaption>Calling the decrypting function (at Entry Point of the shellcode)<\/figcaption><\/figure>\n<p>First, the function checks the !rbx marker and the checksum at the beginning of the encrypted buffer:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38584\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/checking_the_marker\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checking_the_marker.png\" data-orig-size=\"549,443\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"checking_the_marker\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checking_the_marker-300x242.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checking_the_marker.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checking_the_marker.png\" alt=\"\" class=\"wp-image-38584\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checking_the_marker.png 549w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checking_the_marker-300x242.png 300w\" sizes=\"(max-width: 549px) 100vw, 549px\" \/><figcaption>Checking marker and then checksum<\/figcaption><\/figure>\n<p>It is decrypted with the help of RC4 algorithm, and then decompressed.<\/p>\n<p>After decryption, the markers at the beginning of the buffer are checked. The expected format must start from predefined magic DWORDs: 0xCAFEBABE,0, 0xBABECAFE:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38943\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/check_format\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_format.png\" data-orig-size=\"590,517\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"check_format\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_format-300x263.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_format.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_format.png\" alt=\"\" class=\"wp-image-38943\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_format.png 590w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_format-300x263.png 300w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/figure>\n<p><strong>The !rbx package format<\/strong><\/p>\n<p>The !rbx is also a custom format with a consistent structure. <\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38590\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/copy_afer_rbx_hdr\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/copy_afer_rbx_hdr.png\" data-orig-size=\"616,140\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"copy_afer_rbx_hdr\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/copy_afer_rbx_hdr-300x68.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/copy_afer_rbx_hdr-600x136.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/copy_afer_rbx_hdr.png\" alt=\"\" class=\"wp-image-38590\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/copy_afer_rbx_hdr.png 616w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/copy_afer_rbx_hdr-300x68.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/copy_afer_rbx_hdr-600x136.png 600w\" sizes=\"(max-width: 616px) 100vw, 616px\" \/><\/figure>\n<pre class=\"wp-block-preformatted\">DWORD magic; \/\/ \"!rbx\"<br \/>DWORD checksum;<br \/>DWORD content_size;<br \/>BYTE rc4_key[16];<br \/>DWORD out_size;<br \/>BYTE content[];<\/pre>\n<p><strong>The custom file system (BABECAFE)<\/strong><\/p>\n<p> <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=a93c90a210aed61255dc34102335af8d\" target=\"_blank\">The full decrypted content<\/a> has a consistent structure, reminiscent of a file system. According to the previous reports, earlier versions of Hidden Bee used to adapt the ROMS filesystem, adding few modifications. They called their customized version &#8220;Mixed ROM FS&#8221;. Now it seems that their customization process has progressed. Also the keywords suggesting ROMFS cannot be found. The headers starts from the markers in the form of three DWORDS: { 0xCAFEBABE, 0, 0xBABECAFE }.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38588\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/checkibng_babecafe_format\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checkibng_babecafe_format.png\" data-orig-size=\"461,325\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"checkibng_babecafe_format\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checkibng_babecafe_format-300x211.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checkibng_babecafe_format.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checkibng_babecafe_format.png\" alt=\"\" class=\"wp-image-38588\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checkibng_babecafe_format.png 461w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checkibng_babecafe_format-300x211.png 300w\" sizes=\"(max-width: 461px) 100vw, 461px\" \/><\/figure>\n<p>The layout of BABECAFE FS:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38592\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/babecafe_fs-2\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/babecafe_fs-1.png\" data-orig-size=\"750,489\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"babecafe_fs\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/babecafe_fs-1-300x196.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/babecafe_fs-1-600x391.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/babecafe_fs-1.png\" alt=\"\" class=\"wp-image-38592\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/babecafe_fs-1.png 750w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/babecafe_fs-1-300x196.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/babecafe_fs-1-600x391.png 600w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure>\n<p>We notice that it differs at many points from <a rel=\"noreferrer noopener\" aria-label=\"ROM FS (opens in a new tab)\" href=\"http:\/\/lxr.linux.no\/#linux+v4.15.14\/Documentation\/filesystems\/romfs.txt\" target=\"_blank\">ROM FS<\/a>, from which it evolved.<\/p>\n<p>The structure contains the following files:<\/p>\n<p>\/bin\/amd64\/coredll.bin<br \/> \/bin\/i386\/coredll.bin<br \/> \/bin\/i386\/preload<br \/> \/bin\/amd64\/preload<br \/> \/pkg\/sputnik.spk<br \/> \/installer\/com_x86.dll (<a href=\"https:\/\/www.virustotal.com\/#\/file\/04d62f3c9ab18370184a5aad9717434b5a8f71abadb92fcbc00b04d7dfa49a7d\/details\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">6177bc527853fe0f648efd17534dd28b<\/a>)<br \/> \/installer\/com_x64.dll<br \/> \/pkg\/plugins.spk<\/p>\n<p>The files \/pkg\/sputnik.spk and \/pkg\/plugins.spk are both compressed packages in a custom !rsi format.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38628\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/rsi_package_bgn\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rsi_package_bgn.png\" data-orig-size=\"613,102\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"rsi_package_bgn\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rsi_package_bgn-300x50.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rsi_package_bgn-600x100.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rsi_package_bgn.png\" alt=\"\" class=\"wp-image-38628\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rsi_package_bgn.png 613w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rsi_package_bgn-300x50.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rsi_package_bgn-600x100.png 600w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rsi_package_bgn-604x102.png 604w\" sizes=\"(max-width: 613px) 100vw, 613px\" \/><figcaption>Beginning of the !rsi package in the BABECAFE FS<\/figcaption><\/figure>\n<p>Each of the spk packages contain another custom filesystem, identified by the keyword SPUTNIK (possibly the extension &#8216;spk&#8217; is derived from the  SPUTNIK format). They will be unpacked during the next steps of the execution.<\/p>\n<p>Unpacked plugins.spk: <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=4c01273fb77550132c42737912cbeb36\" target=\"_blank\">4c01273fb77550132c42737912cbeb36<\/a><br \/>Unpacked sputnik.spk: <a href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=36f3247dad5ec73ed49c83e04b120523\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">36f3247dad5ec73ed49c83e04b120523<\/a>.<\/p>\n<p><strong>Selecting and running modules<\/strong><\/p>\n<p>Some executables stored in the filesystem are in two version: 32 and 64 bit. Only the modules relevant to the current architecture are loaded. So, in the analyzed case, the loader chooses first: \/bin\/i386\/preload (shellcode) and \/bin\/i386\/coredll.bin (a module in NS custom format). The names are hardcoded in the loader within the loading shellcode:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38585\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/loading_modules\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/loading_modules.png\" data-orig-size=\"622,573\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"loading_modules\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/loading_modules-300x276.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/loading_modules-600x553.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/loading_modules.png\" alt=\"\" class=\"wp-image-38585\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/loading_modules.png 622w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/loading_modules-300x276.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/loading_modules-600x553.png 600w\" sizes=\"(max-width: 622px) 100vw, 622px\" \/><figcaption>Searching the modules in the custom file system<\/figcaption><\/figure>\n<p>After the proper elements are fetched (preload and coredll.bin), they are copied together into a newly-allocated memory area. The coredll.bin is copied just after preload. Then, the preload module is called: <\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38586\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/call_preload\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_preload.png\" data-orig-size=\"439,98\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"call_preload\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_preload-300x67.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_preload.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_preload.png\" alt=\"\" class=\"wp-image-38586\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_preload.png 439w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_preload-300x67.png 300w\" sizes=\"(max-width: 439px) 100vw, 439px\" \/><figcaption>Redirecting execution to preload<\/figcaption><\/figure>\n<p>The preload is position-independent, and its execution starts from the beginning of the page. <\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38602\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/to_enter_preload\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_enter_preload.png\" data-orig-size=\"537,261\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"to_enter_preload\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_enter_preload-300x146.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_enter_preload.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_enter_preload.png\" alt=\"\" class=\"wp-image-38602\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_enter_preload.png 537w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_enter_preload-300x146.png 300w\" sizes=\"(max-width: 537px) 100vw, 537px\" \/><figcaption>Entering &#8216;preload&#8217;<\/figcaption><\/figure>\n<p>The only role of this shellcode is to prepare and run the coredll.bin. So, it contains a custom loader for the NS format that allocates another memory area and loads the NS file there.<\/p>\n<h4 id=\"mce_27\">Fifth stage: preload and coredll <\/h4>\n<p>After loading coredll, preload redirects the execution there. <\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38603\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/coredll_ep\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/coredll_ep.png\" data-orig-size=\"562,378\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"coredll_ep\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/coredll_ep-300x202.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/coredll_ep.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/coredll_ep.png\" alt=\"\" class=\"wp-image-38603\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/coredll_ep.png 562w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/coredll_ep-300x202.png 300w\" sizes=\"(max-width: 562px) 100vw, 562px\" \/><figcaption>coredll at its Entry Point<\/figcaption><\/figure>\n<p>The coredll patches a function inside the NTDLL\u2014 KiUserExceptionDispatcher\u2014redirecting one of the inner calls to its own code:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38604\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/patched_kiuserdispatch\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/patched_kiuserdispatch.png\" data-orig-size=\"822,143\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"patched_kiuserdispatch\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/patched_kiuserdispatch-300x52.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/patched_kiuserdispatch-600x104.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/patched_kiuserdispatch.png\" alt=\"\" class=\"wp-image-38604\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/patched_kiuserdispatch.png 822w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/patched_kiuserdispatch-300x52.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/patched_kiuserdispatch-600x104.png 600w\" sizes=\"(max-width: 822px) 100vw, 822px\" \/><figcaption>A patch inside KiUserExceptionDispatcher<\/figcaption><\/figure>\n<p>Depending on which process the coredll was injected into, it can take one of a few paths of execution.<\/p>\n<p>If it is running for the first time, it will try to inject itself again\u2014this time into rundll32. For the purpose of the injection, it will again unpack the original !rbx package and use its original copy stored there.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38606\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/to_unpack_rbx-2\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_rbx-1.png\" data-orig-size=\"327,146\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"to_unpack_rbx\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_rbx-1-300x134.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_rbx-1.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_rbx-1.png\" alt=\"\" class=\"wp-image-38606\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_rbx-1.png 327w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_rbx-1-300x134.png 300w\" sizes=\"(max-width: 327px) 100vw, 327px\" \/><figcaption>Entering the unpacking function<\/figcaption><\/figure>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38607\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/checking_magic\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checking_magic.png\" data-orig-size=\"325,166\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"checking_magic\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checking_magic-300x153.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checking_magic.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checking_magic.png\" alt=\"\" class=\"wp-image-38607\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checking_magic.png 325w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/checking_magic-300x153.png 300w\" sizes=\"(max-width: 325px) 100vw, 325px\" \/><figcaption>Inside the unpacking function: checking the magic &#8220;!rbx&#8221;<\/figcaption><\/figure>\n<p>Then it will choose the modules depending on the bitness of the rundll32: <\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38617\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/create_rundll32_suspended\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/create_rundll32_suspended.png\" data-orig-size=\"620,324\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"create_rundll32_suspended\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/create_rundll32_suspended-300x157.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/create_rundll32_suspended-600x314.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/create_rundll32_suspended.png\" alt=\"\" class=\"wp-image-38617\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/create_rundll32_suspended.png 620w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/create_rundll32_suspended-300x157.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/create_rundll32_suspended-600x314.png 600w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/figure>\n<p>It selects the pair of modules (preload\/coredll.bin) appropriate for the architecture, either from the directory amd64 or from i386:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38608\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/choose_modules\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/choose_modules.png\" data-orig-size=\"769,614\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"choose_modules\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/choose_modules-300x240.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/choose_modules-600x479.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/choose_modules.png\" alt=\"\" class=\"wp-image-38608\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/choose_modules.png 769w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/choose_modules-300x240.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/choose_modules-600x479.png 600w\" sizes=\"(max-width: 769px) 100vw, 769px\" \/><\/figure>\n<p>If the injection failed, it makes another attempt, this time trying to inject into dllhost:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38609\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/try_inject\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/try_inject.png\" data-orig-size=\"580,352\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"try_inject\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/try_inject-300x182.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/try_inject.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/try_inject.png\" alt=\"\" class=\"wp-image-38609\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/try_inject.png 580w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/try_inject-300x182.png 300w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><\/figure>\n<p>Each time it uses the same, hardcoded parameter (<code>\/Processid: {...}<\/code>) that is passed to the created process:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38610\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/with_processid\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/with_processid.png\" data-orig-size=\"653,286\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"with_processid\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/with_processid-300x131.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/with_processid-600x263.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/with_processid.png\" alt=\"\" class=\"wp-image-38610\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/with_processid.png 653w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/with_processid-300x131.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/with_processid-600x263.png 600w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/with_processid-195x85.png 195w\" sizes=\"(max-width: 653px) 100vw, 653px\" \/><\/figure>\n<p>The thread context of the target process is modified, and then the thread is resumed, running the injected content:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38611\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/injected_to_rundll32\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected_to_rundll32.png\" data-orig-size=\"529,46\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"injected_to_rundll32\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected_to_rundll32-300x26.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected_to_rundll32.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected_to_rundll32.png\" alt=\"\" class=\"wp-image-38611\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected_to_rundll32.png 529w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/injected_to_rundll32-300x26.png 300w\" sizes=\"(max-width: 529px) 100vw, 529px\" \/><\/figure>\n<p>Now, when we look inside the memory of rundll32, we can find the preload and coredll being mapped:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38612\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/rundll32_injected_preload\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rundll32_injected_preload.png\" data-orig-size=\"589,190\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"rundll32_injected_preload\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rundll32_injected_preload-300x97.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rundll32_injected_preload.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rundll32_injected_preload.png\" alt=\"\" class=\"wp-image-38612\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rundll32_injected_preload.png 589w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rundll32_injected_preload-300x97.png 300w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><\/figure>\n<p>Inside the injected part, the execution follows a similar path: preload loads the coredll and redirects to its Entry Point. But then, another path of execution is taken.<\/p>\n<p>The parameter passed to the coredll decides which round of execution it is. On the second round, another injection is made: this time to dllhost.exe. And finally, it proceeds to the final round, when other modules are unpacked from the BABECAFE filesystem.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38613\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/to_unpack_spk\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_spk.png\" data-orig-size=\"673,613\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"to_unpack_spk\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_spk-300x273.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_spk-600x547.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_spk.png\" alt=\"\" class=\"wp-image-38613\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_spk.png 673w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_spk-300x273.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_spk-600x547.png 600w\" sizes=\"(max-width: 673px) 100vw, 673px\" \/><figcaption>Parameter deciding which path to take<\/figcaption><\/figure>\n<p>The unpacking function first searches by name for two more modules: sputnik.spk and plugins.spk. They are both in the mysterious !rsi format, which reminds us of !rbx, but has a slightly different structure.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38614\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/find_sputnik_and_plugins\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/find_sputnik_and_plugins.png\" data-orig-size=\"475,465\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"find_sputnik_and_plugins\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/find_sputnik_and_plugins-300x294.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/find_sputnik_and_plugins.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/find_sputnik_and_plugins.png\" alt=\"\" class=\"wp-image-38614\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/find_sputnik_and_plugins.png 475w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/find_sputnik_and_plugins-300x294.png 300w\" sizes=\"(max-width: 475px) 100vw, 475px\" \/><\/figure>\n<p>Entering the function unpacking the first !rsi package:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38616\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/to_unpack_rsi\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_rsi.png\" data-orig-size=\"522,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"to_unpack_rsi\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_rsi-300x172.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_rsi.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_rsi.png\" alt=\"\" class=\"wp-image-38616\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_rsi.png 522w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_unpack_rsi-300x172.png 300w\" sizes=\"(max-width: 522px) 100vw, 522px\" \/><\/figure>\n<p>The function unpacking the !rsi format is structured similarly to the !rbx unpacking. It also starts from checking the keyword:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38619\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/check_rsi_keyword\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_rsi_keyword.png\" data-orig-size=\"545,174\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"check_rsi_keyword\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_rsi_keyword-300x96.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_rsi_keyword.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_rsi_keyword.png\" alt=\"\" class=\"wp-image-38619\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_rsi_keyword.png 545w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_rsi_keyword-300x96.png 300w\" sizes=\"(max-width: 545px) 100vw, 545px\" \/><figcaption>Checking &#8220;!rsi&#8221; keyword<\/figcaption><\/figure>\n<p>As mentioned before, both !rsi packages are used to store filesystems marked with the keyword &#8220;SPUTNIK&#8221;. It is another custom filesystem invented by the Hidden Bee authors that contain additional modules.  <\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38941\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/check_sputnik_keyword\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_sputnik_keyword.png\" data-orig-size=\"334,117\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"check_sputnik_keyword\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_sputnik_keyword-300x105.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_sputnik_keyword.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_sputnik_keyword.png\" alt=\"\" class=\"wp-image-38941\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_sputnik_keyword.png 334w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_sputnik_keyword-300x105.png 300w\" sizes=\"(max-width: 334px) 100vw, 334px\" \/><figcaption>The &#8220;SPUTNIK&#8221; keyword is checked after the module is unpacked<\/figcaption><\/figure>\n<p>Unpacking the sputnik.spk resulted in getting the following SPUTNIK module: <a href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=455738924b7665e1c15e30cf73c9c377\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">455738924b7665e1c15e30cf73c9c377<\/a><\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38615\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/check_sputnik_format\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_sputnik_format.png\" data-orig-size=\"544,298\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"check_sputnik_format\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_sputnik_format-300x164.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_sputnik_format.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_sputnik_format.png\" alt=\"\" class=\"wp-image-38615\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_sputnik_format.png 544w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/check_sputnik_format-300x164.png 300w\" sizes=\"(max-width: 544px) 100vw, 544px\" \/><\/figure>\n<p>It is worth noting that the unpacked filesystem has inside of it four executables: two pairs consisting of NS and PE, appropriately 32 and 64 bit. In the currently-analyzed setup, 32 bit versions are deployed. <\/p>\n<p>The NS module will be the next to be run. First, it is loaded by the current executable, and then the execution is redirected there. Interestingly, both !rsi modules are passed as arguments to the entry point of the new module. (They will be used later to retrieve more components.)<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38882\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/call_another\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_another.png\" data-orig-size=\"559,313\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"call_another\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_another-300x168.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_another.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_another.png\" alt=\"\" class=\"wp-image-38882\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_another.png 559w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_another-300x168.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_another-400x225.png 400w\" sizes=\"(max-width: 559px) 100vw, 559px\" \/><figcaption>Calling the newly-loaded NS executable<\/figcaption><\/figure>\n<h4 id=\"mce_29\">Sixth stage: mpsi.dll (unpacked from SPUTNIK)<\/h4>\n<p>Entering into the NS module starts another layer of the malware:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38881\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/call_ns_ep\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_ns_ep.png\" data-orig-size=\"680,415\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"call_ns_ep\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_ns_ep-300x183.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_ns_ep-600x366.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_ns_ep.png\" alt=\"\" class=\"wp-image-38881\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_ns_ep.png 680w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_ns_ep-300x183.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/call_ns_ep-600x366.png 600w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><figcaption>Entry Point of the NS module: the !rsi modules, perpended with their size, are passed <\/figcaption><\/figure>\n<p>The analyzed module, converted to PE is available here: <a href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=455738924b7665e1c15e30cf73c9c377\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">537523ee256824e371d0bc16298b3849<\/a> <\/p>\n<p>This module is responsible for loading plugins. It will also create a named pipe through which it is will communicate with other modules. It sets up the commands that are going to be executed on demand. <\/p>\n<p>This is how the beginning of the main function looks:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38884\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/start_main\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/start_main.png\" data-orig-size=\"586,341\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"start_main\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/start_main-300x175.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/start_main.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/start_main.png\" alt=\"\" class=\"wp-image-38884\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/start_main.png 586w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/start_main-300x175.png 300w\" sizes=\"(max-width: 586px) 100vw, 586px\" \/><\/figure>\n<p>Like in previous cases, it starts from finishing to load itself (relocations and imports). Then, it patches the function in NTDLL. This is a common prolog in many HiddenBee modules.<\/p>\n<p>Then, we have another phase of loading elements from the supplied packages. The path that will be taken depends on the runtime arguments. If the function received both !rsi packages, it will start by parsing one of them, retrieving loading submodules.<\/p>\n<p>First, the SPUTNIK filesystem must be unpacked from the !rsi package:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38678\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/unpack_and_mount_plugins\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_and_mount_plugins.png\" data-orig-size=\"537,430\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"unpack_and_mount_plugins\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_and_mount_plugins-300x240.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_and_mount_plugins.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_and_mount_plugins.png\" alt=\"\" class=\"wp-image-38678\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_and_mount_plugins.png 537w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/unpack_and_mount_plugins-300x240.png 300w\" sizes=\"(max-width: 537px) 100vw, 537px\" \/><\/figure>\n<p>After being unpacked, it is mounted. The filesystems are mounted internally in the memory: A global structure is filled with pointers to appropriate elements of the filesystem.<\/p>\n<figure class=\"wp-block-image\"><a href=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/retrieve_plugins.png\" data-rel=\"lightbox-4\" title=\"\"><img decoding=\"async\" data-attachment-id=\"38885\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/retrieve_plugins\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/retrieve_plugins.png\" data-orig-size=\"758,606\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"retrieve_plugins\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/retrieve_plugins-300x240.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/retrieve_plugins-600x480.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/retrieve_plugins.png\" alt=\"\" class=\"wp-image-38885\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/retrieve_plugins.png 758w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/retrieve_plugins-300x240.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/retrieve_plugins-600x480.png 600w\" sizes=\"(max-width: 758px) 100vw, 758px\" \/><\/a><\/figure>\n<p>At the beginning, we can see the list of the plugins that are going to be loaded: <a rel=\"noreferrer noopener\" aria-label=\"cloudcompute.api (opens in a new tab)\" href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=62a44aace15cb728f1f5f96a1c2a4a37\" target=\"_blank\">cloudcompute.api<\/a>, <a rel=\"noreferrer noopener\" aria-label=\"deepfreeze.api (opens in a new tab)\" href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=95a2387f103608f6eebcc64a01aefece\" target=\"_blank\">deepfreeze.api,<\/a> and <a rel=\"noreferrer noopener\" aria-label=\"netscan.api (opens in a new tab)\" href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=4b2d33b818f53377620ac159e9f8a613\" target=\"_blank\">netscan.api<\/a>. Those names are being appended to the root path of the modules.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38679\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/rootpath\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rootpath.png\" data-orig-size=\"385,122\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"rootpath\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rootpath-300x95.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rootpath.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rootpath.png\" alt=\"\" class=\"wp-image-38679\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rootpath.png 385w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/rootpath-300x95.png 300w\" sizes=\"(max-width: 385px) 100vw, 385px\" \/><\/figure>\n<p>Each module is fetched from the mounted filesystem and loaded:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38886\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/load_plugin\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_plugin.png\" data-orig-size=\"821,290\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"load_plugin\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_plugin-300x106.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_plugin-600x212.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_plugin.png\" alt=\"\" class=\"wp-image-38886\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_plugin.png 821w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_plugin-300x106.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_plugin-600x212.png 600w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_plugin-470x165.png 470w\" sizes=\"(max-width: 821px) 100vw, 821px\" \/><figcaption>Calling the function to load the plugin<\/figcaption><\/figure>\n<p>Consecutive modules are loaded one after another in the same executable memory area. After the module is loaded, its header is erased. It is a common technique used in order to make dumping of the payload from the memory more difficult.<\/p>\n<p>The cloudcompute.api is a plugin that will load the miner. More about the plugins will be explained in the next section of this post.<\/p>\n<p>Reading its code, we find out that the SPUTNIK modules are filesystems that can be mounted and dismounted on demand. This module will be communicating with others with the help of a named pipe. It will be receiving commands and executing appropriate handlers.<\/p>\n<p>Initialization of the commands&#8217; parser:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38657\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/to_setup_commands\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_setup_commands.png\" data-orig-size=\"371,343\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"to_setup_commands\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_setup_commands-300x277.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_setup_commands.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_setup_commands.png\" alt=\"\" class=\"wp-image-38657\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_setup_commands.png 371w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_setup_commands-300x277.png 300w\" sizes=\"(max-width: 371px) 100vw, 371px\" \/><\/figure>\n<p>The function setting up the commands: For each name, a handler is registered. (This is probably the Lua dispatcher, first described <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.freebuf.com\/column\/175106.html\" target=\"_blank\">here<\/a>.)<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38962\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/setup_commands-2\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/setup_commands-1.png\" data-orig-size=\"442,443\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"setup_commands\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/setup_commands-1-300x300.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/setup_commands-1.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/setup_commands-1.png\" alt=\"\" class=\"wp-image-38962\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/setup_commands-1.png 442w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/setup_commands-1-150x150.png 150w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/setup_commands-1-300x300.png 300w\" sizes=\"(max-width: 442px) 100vw, 442px\" \/><\/figure>\n<p> When plugins are run, we can see some additional child processes created by the process running the coredll (in the analyzed case it is inside rundll32):<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38680\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/plugin_running\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/plugin_running.png\" data-orig-size=\"570,74\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"plugin_running\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/plugin_running-300x39.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/plugin_running.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/plugin_running.png\" alt=\"\" class=\"wp-image-38680\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/plugin_running.png 570w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/plugin_running-300x39.png 300w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/figure>\n<p>Also it triggers a firewall alert, which means the malware requested to open some ports (triggered by netscan.api plugin):<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38963\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/open_ports\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/open_ports.png\" data-orig-size=\"538,385\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"open_ports\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/open_ports-300x215.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/open_ports.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/open_ports.png\" alt=\"\" class=\"wp-image-38963\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/open_ports.png 538w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/open_ports-300x215.png 300w\" sizes=\"(max-width: 538px) 100vw, 538px\" \/><\/figure>\n<p>We can see that it started listening on one TCP and one UDP port:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38682\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/socket\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/socket.png\" data-orig-size=\"432,169\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"socket\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/socket-300x117.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/socket.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/socket.png\" alt=\"\" class=\"wp-image-38682\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/socket.png 432w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/socket-300x117.png 300w\" sizes=\"(max-width: 432px) 100vw, 432px\" \/><\/figure>\n<h3>The plugins<\/h3>\n<p>As mentioned in the previous section, the SPUTNIK filesystem contains three plugins: <a rel=\"noreferrer noopener\" href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=62a44aace15cb728f1f5f96a1c2a4a37\" target=\"_blank\">cloudcompute.api<\/a>, <a rel=\"noreferrer noopener\" href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=95a2387f103608f6eebcc64a01aefece\" target=\"_blank\">deepfreeze.api<\/a>, and <a rel=\"noreferrer noopener\" href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=4b2d33b818f53377620ac159e9f8a613\" target=\"_blank\">netscan.api<\/a>. If we convert them to PE, we can see that all of them import an unknown DLL: mpsi.dll. When we see the filled import table, we find out that the addresses have been filled redirecting to the functions from the previous NS module:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38891\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/mpsi_imports-2\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/mpsi_imports-1.png\" data-orig-size=\"486,270\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"mpsi_imports\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/mpsi_imports-1-300x167.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/mpsi_imports-1.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/mpsi_imports-1.png\" alt=\"\" class=\"wp-image-38891\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/mpsi_imports-1.png 486w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/mpsi_imports-1-300x167.png 300w\" sizes=\"(max-width: 486px) 100vw, 486px\" \/><\/figure>\n<p>So we can conclude that the previous element is the mpsi.dll. Although its export table has been destroyed, the functions are fetched by the custom loader and filled in the import tables of the loaded plugins.<\/p>\n<p>First the cloudcompute.api is run.<\/p>\n<p>This plugin retrieves from the filesystem a file named &#8220;\/etc\/ccmain.json&#8221; that contains the list of URLs:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38887\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/next_part_addresses\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/next_part_addresses.png\" data-orig-size=\"535,386\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"next_part_addresses\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/next_part_addresses-300x216.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/next_part_addresses.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/next_part_addresses.png\" alt=\"\" class=\"wp-image-38887\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/next_part_addresses.png 535w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/next_part_addresses-300x216.png 300w\" sizes=\"(max-width: 535px) 100vw, 535px\" \/><\/figure>\n<p>Those are addresses from which another set of modules is going to be downloaded:<\/p>\n<p><pre>[\"sstp:\/\/news.onetouchauthentication.online:443\/mlf_plug.zip.sig\",\"sstp:\/\/news.onetouchauthentication.club:443\/mlf_plug.zip.sig\",\"sstp:\/\/news.onetouchauthentication.icu:443\/mlf_plug.zip.sig\",\"sstp:\/\/news.onetouchauthentication.xyz:443\/mlf_plug.zip.sig\"]<\/pre>\n<\/p>\n<p>It also retrieves another component from the SPUTNIK filesystem: \/bin\/i386\/ccmain.bin. This time, it is an executable in NE format (version converted to PE is available here: <a rel=\"noreferrer noopener\" aria-label=\"367db629beedf528adaa021bdb7c12de (opens in a new tab)\" href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=367db629beedf528adaa021bdb7c12de\" target=\"_blank\">367db629beedf528adaa021bdb7c12de<\/a>)<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38892\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/load_ccmain\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_ccmain.png\" data-orig-size=\"704,362\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"load_ccmain\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_ccmain-300x154.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_ccmain-600x309.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_ccmain-600x309.png\" alt=\"\" class=\"wp-image-38892\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_ccmain-600x309.png 600w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_ccmain-300x154.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_ccmain.png 704w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n<p>This is the component that is injected into msdtc.exe.<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38893\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/implanted_in_msdtc\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/implanted_in_msdtc.png\" data-orig-size=\"621,295\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"implanted_in_msdtc\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/implanted_in_msdtc-300x143.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/implanted_in_msdtc-600x285.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/implanted_in_msdtc.png\" alt=\"\" class=\"wp-image-38893\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/implanted_in_msdtc.png 621w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/implanted_in_msdtc-300x143.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/implanted_in_msdtc-600x285.png 600w\" sizes=\"(max-width: 621px) 100vw, 621px\" \/><figcaption>The HiddenBee module mapped into msdtc.exe<\/figcaption><\/figure>\n<p>The configuration is also copied into the remote process and is used to retrieve an additional package from the C&amp;C:<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38894\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/to_download_modules\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_download_modules.png\" data-orig-size=\"524,496\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"to_download_modules\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_download_modules-300x284.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_download_modules.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_download_modules.png\" alt=\"\" class=\"wp-image-38894\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_download_modules.png 524w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/to_download_modules-300x284.png 300w\" sizes=\"(max-width: 524px) 100vw, 524px\" \/><\/figure>\n<p>This is the plugin responsible for downloading and deploying the Mellifera Miner: core component of the Hidden Bee.<\/p>\n<p>Next, the netscan.api loads module \/bin\/i386\/kernelbase.bin (converted to PE: <a href=\"https:\/\/malshare.com\/sample.php?action=detail&amp;hash=d7516ad354a3be2299759cd21e161a04\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">d7516ad354a3be2299759cd21e161a04<\/a>)<\/p>\n<figure class=\"wp-block-image\"><img decoding=\"async\" data-attachment-id=\"38895\" data-permalink=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/attachment\/load_kernelbase\/\" data-orig-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_kernelbase.png\" data-orig-size=\"629,262\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"load_kernelbase\" data-image-description=\"\" data-medium-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_kernelbase-300x125.png\" data-large-file=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_kernelbase-600x250.png\" src=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_kernelbase.png\" alt=\"\" class=\"wp-image-38895\" srcset=\"https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_kernelbase.png 629w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_kernelbase-300x125.png 300w, https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/load_kernelbase-600x250.png 600w\" sizes=\"(max-width: 629px) 100vw, 629px\" \/><\/figure>\n<h3>The miner in APT-style<\/h3>\n<p>Hidden Bee is an eclectic malware. Although it is a commodity malware used for cryptocurrency mining, its design reminds us of espionage platforms used by APTs. Going through all its components is exhausting, but also fascinating. The authors are highly professional, not only as individuals but also as a team, because the design is consistent in all its complexity.<\/p>\n<h3>Appendix<\/h3>\n<p><a href=\"https:\/\/github.com\/hasherezade\/hidden_bee_tools\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/github.com\/hasherezade\/hidden_bee_tools<\/a> &#8211; helper tools for parsing and converting Hidden Bee custom formats<\/p>\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.bleepingcomputer.com\/news\/security\/new-underminer-exploit-kit-discovered-pushing-bootkits-and-coinminers\/\" target=\"_blank\">https:\/\/www.bleepingcomputer.com\/news\/security\/new-underminer-exploit-kit-discovered-pushing-bootkits-and-coinminers\/<\/a><\/p>\n<p>Articles about the previous version (in Chinese):  <\/p>\n<ul>\n<li><a href=\"https:\/\/www.freebuf.com\/column\/174581.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/www.freebuf.com\/column\/174581.html<\/a><\/li>\n<li><a rel=\"noreferrer noopener\" aria-label=\"https:\/\/www.freebuf.com\/column\/175106.html (opens in a new tab)\" href=\"https:\/\/www.freebuf.com\/column\/175106.html\" target=\"_blank\">https:\/\/www.freebuf.com\/column\/175106.html<\/a><\/li>\n<\/ul>\n<p>Our first encounter with the Hidden Bee:<\/p>\n<p><a href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/07\/hidden-bee-miner-delivered-via-improved-drive-by-download-toolkit\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/blog.malwarebytes.com\/threat-analysis\/2018\/07\/hidden-bee-miner-delivered-via-improved-drive-by-download-toolkit\/<\/a><\/p>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/\">Hidden Bee: Let&#8217;s go down the rabbit hole<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\">Malwarebytes Labs<\/a>.<\/p>\n<p><a href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/\" target=\"bwo\" >https:\/\/blog.malwarebytes.com\/feed\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><strong>Credit to Author: hasherezade| Date: Fri, 31 May 2019 17:32:57 +0000<\/strong><\/p>\n<table cellpadding='10'>\n<tr>\n<td valign='top' align='center'><a href='https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/' title='Hidden Bee: Let's go down the rabbit hole'><img src='https:\/\/blog.malwarebytes.com\/wp-content\/uploads\/2019\/05\/shutterstock_665631382.jpg' border='0'  width='300px'  \/><\/a><\/td>\n<\/tr>\n<tr>\n<td valign='top' align='left'>The complex and sophisticated custom malware, Hidden Bee, is a Chinese cryptominer that recently released an updated sample. We unpack the sample to look at the functionality of its loader and compare it against earlier versions.<\/p>\n<p>Categories: <\/p>\n<ul class=\"post-categories\">\n<li><a href=\"https:\/\/blog.malwarebytes.com\/category\/threat-analysis\/\" rel=\"category tag\">Threat analysis<\/a><\/li>\n<\/ul>\n<p>Tags: <a href=\"https:\/\/blog.malwarebytes.com\/tag\/exploit-kits\/\" rel=\"tag\">exploit kits<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/exploits\/\" rel=\"tag\">exploits<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/hidden-bee\/\" rel=\"tag\">hidden bee<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/loader\/\" rel=\"tag\">loader<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/mellifera\/\" rel=\"tag\">mellifera<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/reverse-engineering\/\" rel=\"tag\">reverse engineering<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/security-research\/\" rel=\"tag\">security research<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/underminer\/\" rel=\"tag\">Underminer<\/a><a href=\"https:\/\/blog.malwarebytes.com\/tag\/underminer-ek\/\" rel=\"tag\">Underminer EK<\/a><\/p>\n<table width='100%'>\n<tr>\n<td align=right>\n<p><b>(<a href='https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/' title='Hidden Bee: Let's go down the rabbit hole'>Read more&#8230;<\/a>)<\/b><\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/td>\n<\/tr>\n<\/table>\n<p>The post <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\/threat-analysis\/2019\/05\/hidden-bee-lets-go-down-the-rabbit-hole\/\">Hidden Bee: Let&#8217;s go down the rabbit hole<\/a> appeared first on <a rel=\"nofollow\" href=\"https:\/\/blog.malwarebytes.com\">Malwarebytes Labs<\/a>.<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[10488,10378],"tags":[10528,10987,19070,21940,21941,19357,16631,10494,19148,19948],"class_list":["post-15459","post","type-post","status-publish","format-standard","hentry","category-malwarebytes","category-security","tag-exploit-kits","tag-exploits","tag-hidden-bee","tag-loader","tag-mellifera","tag-reverse-engineering","tag-security-research","tag-threat-analysis","tag-underminer","tag-underminer-ek"],"_links":{"self":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/15459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=15459"}],"version-history":[{"count":0,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/15459\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=15459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=15459"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=15459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}