{"id":4601,"date":"2023-03-28T01:27:00","date_gmt":"2023-03-28T01:27:00","guid":{"rendered":"\/cybersecurity-blog\/?p=4601"},"modified":"2023-04-17T12:05:06","modified_gmt":"2023-04-17T12:05:06","slug":"limerat-malware-analysis","status":"publish","type":"post","link":"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/","title":{"rendered":"LimeRAT Malware Analysis: Extracting the Config\u00a0"},"content":{"rendered":"\n<p>In today\u2019s article, we\u2019re going to look under the hood of a modular RAT \u2014 LimeRAT. Let\u2019s get right into it!&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is LimeRat&nbsp;<\/h2>\n\n\n\n<p>LimeRAT is a Remote Access Trojan (RAT) that&#8217;s been around for a few years now. It&#8217;s a versatile piece of malware designed to give attackers control over an infected system. With its relatively small file size, it tries to fly under the radar of traditional antivirus solutions.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"841\" height=\"533\" src=\"\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/MicrosoftTeams-image-14.jpg\" alt=\"LimeRAT malware\" class=\"wp-image-4628\" srcset=\"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/MicrosoftTeams-image-14.jpg 841w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/MicrosoftTeams-image-14-300x190.jpg 300w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/MicrosoftTeams-image-14-768x487.jpg 768w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/MicrosoftTeams-image-14-370x234.jpg 370w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/MicrosoftTeams-image-14-270x171.jpg 270w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/MicrosoftTeams-image-14-740x469.jpg 740w\" sizes=\"(max-width: 841px) 100vw, 841px\" \/><\/figure>\n\n\n\n<p>What makes LimeRAT particularly interesting is its ability to perform a wide range of malicious activities. Some of these include keylogging, stealing passwords, and capturing screenshots. Additionally, LimeRAT can execute arbitrary commands, download and upload files, and even use the infected machine for crypto-mining or DDoS attacks.&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">LimeRAT malware analysis&nbsp;<\/h2>\n\n\n\n<p>To start, let&#8217;s open a sample in Detect It Easy:&nbsp;<\/p>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/11PQhpccgOgyrHeS3iYFSGY0vvsl0wP84OVIAoaCd47HHy4XRQgUKe6hKDr1CRF9VYOxPNPoC0VOV8xqPeAw2DMlI7-73z6zFIm256VoswDHLFpBz5MqvN4ZU4GZC6iuz7CCTBGwGcsPfIHwOU1YhbA\" alt=\"LimeRAT sample overview in DiE\u00a0\"\/><figcaption class=\"wp-element-caption\">Figure 1: sample overview in DiE&nbsp;<\/figcaption><\/figure>\n\n\n\n<p>Upon inspection, we observe that the code has been obfuscated (<strong>MITRE T1027<\/strong>) and unreadable: the names of classes, methods, and variables are made out of random glyphs.&nbsp;<\/p>\n\n\n\n<p>Since the sample is written in a .NET language, let\u2019s open it in DnSpy.&nbsp;&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/GKbpojWNZ9T2itrH5txDC4zvF0NkS291pS0kL81CB3BTsj-Dti56uQylWuTgkxpjzpF6KaUC13yvcs0-MWz-JdYS4mjyDJwQNBhlOfjqGfeNQOs9fJOLqX4bhCGS0lWe_ijvSPAHjBYZ5dAHcEBDx9w\" alt=\"LimeRAT sample overview in DnSpy\"\/><figcaption class=\"wp-element-caption\">Figure 2: sample overview in DnSpy; note that use of obfuscation techniques&nbsp;<\/figcaption><\/figure>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Finding the configuration&nbsp;<\/h2>\n\n\n\n<p>After examining the malware\u2019s classes, we find something resembling a class with its configuration:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/H0oDfe3D9tDQTmgK9066XsvEir-9Sw5m-lCw1N2Auqa74-Y1bX64xsnIPs5trqabfkg4zmo_0QLb0avAlg-g5p1h-Kb4n2c-8KMwqFiqsR7dSMJI3d52ClgfBRelQiJmAdfCASrbNEcVXf8M8VMb0-0\" alt=\"Possibly, LimeRAT configuration class\"\/><figcaption class=\"wp-element-caption\">Figure 3: possibly, malware configuration class<\/figcaption><\/figure>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>We notice that this class contains a field that appears to be a string encoded using the Base64 algorithm (<strong>MITRE T1132.001<\/strong>):&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/W_oedNzah1QO4smbVQVPP254NKC63QzRYSDl6Tk0BIv6YhGmfhCz3ok7BF53NTooZLRBV4nndN12qLCDhqHzvaJEihsbSeoqolZYZiHn_GFqfJX20jXMYYOiAarQU8Xy8e19CjgXjlDD1vdnG9Jwbsw\" alt=\"Strange LimeRAT class field \"\/><figcaption class=\"wp-element-caption\">Figure 4: strange class field that looks like Base64 encoded string&nbsp;<\/figcaption><\/figure>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>We attempted to decode this string using CyberChef, but were unsuccessful. It is likely that the string is not only encoded but also encrypted.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"466\" src=\"\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/image-7-1024x466.png\" alt=\"Unsuccessful attempt to decode LimeRAT string with CyberChef\" class=\"wp-image-4602\" srcset=\"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/image-7-1024x466.png 1024w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/image-7-300x137.png 300w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/image-7-768x350.png 768w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/image-7-370x168.png 370w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/image-7-270x123.png 270w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/image-7-740x337.png 740w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/image-7.png 1204w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">&nbsp;Figure 5: even though it seems that this string is Base64 encoded, we can\u2019t obtain data by just decoding it&nbsp;<\/figcaption><\/figure>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Looks like the string is encoded <em>and <\/em>encrypted. Therefore, we will attempt to analyze this string and identify any functions or instructions that reference it. To do this, we right-click on the field and select &#8220;Analyse&#8221; from the context menu (alternatively, we can select the field and use the Ctrl + Shift + R shortcut).&nbsp;<\/p>\n\n\n\n<p>In the resulting window, we are interested in where the value of this string is being read. We expand the &#8220;Read by&#8221; section and see that the string is being read in two methods:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/Bu1McXhkfenj9K6nwjvv-um2cxTlOYCK_16fn7bV1fsGfDz5QWkbfaVwz-kByKhozxxmd086V1uf98ZMC8WzYHr-abbS1MjdNKvHVLTpixYgYmgxqIMGC2egBo0GWodS6w7uwzNuWORK9gDBQhM5AXg\" alt=\"2 x-refs to the LimeRAT string\"\/><figcaption class=\"wp-element-caption\">Figure 6: two x-refs to the string that we discovered&nbsp;<\/figcaption><\/figure>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>We briefly inspect the first method but don&#8217;t see anything interesting here. It appears that this method is not specifically related to the virus configuration:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/7K9GquyQRgV0JC-lyq3vopvUuxbhlTQ4xK0neZ-IWAkKIFVFNYeqvQeopRJG_6hiWq2OKYBviLxUD5gjOUSs0NH_0jATPevcoARMmtQYWX9I4qFuFfHyAt6z78r-FMOnId8fnXYQnZQ5dDRqSbezjBA\" alt=\"LimeRAT failed extraction \"\/><figcaption class=\"wp-element-caption\">Figure 7: the first method seems useless<\/figcaption><\/figure>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Let&#8217;s move on to the second method. We immediately notice some interesting code where our string is being used with the method WebClient.DownloadString, which is <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/api\/system.net.webclient.downloadstring\" target=\"_blank\" rel=\"noreferrer noopener\">used<\/a> to download a string from a remote resource.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/kmFLeyB_2Qbq49TswWD07YPkeQc3W0Tf0Av5A05c_MztZnIhLhfN4SEjsHmGo2zKBFrn3tX3_bczrEinydE3dp0btBsvoYMgVNDXs7clIAP___D5TDd83Nkh4UVftU-XcTjACuzPeBoLCMNs_oaWKyI\" alt=\"LimeRAT uses the string in WebClient.DownloadString method\"\/><figcaption class=\"wp-element-caption\">Figure 8: the second x-ref is more interesting &#8211; looks like it uses our string in WebClient.DownloadString method<\/figcaption><\/figure>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Before our string is passed to WebClient.DownloadString is passed through another method that clearly transforms it into something that DownloadString can consume.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Let&#8217;s take a closer look at this method and see what it does to our string.&nbsp;<\/p>\n\n\n\n<p>After a quick evaluation of the method, we see that it uses instances of the <strong>RijndaelManaged <\/strong>and <strong>MD5CryptoServiceProvider<\/strong> classes.&nbsp;<\/p>\n\n\n\n<p>It appears that we have found the function where our string is decrypted:&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/-D9PM-GFiea03PWyxUAELFJWtq4m7nYnla83FuPZ5_9wUaQhkEmNntaPXqXPAbDAXJvJFfAOPJ_H1XkG9_WhM8Q-427PJklJvEoSLxhlqKxeuacP9XjzCZnr5KkzfX-bpMzD9lj2GG34ByG2E9TbsiE\" alt=\"LimeRAT's method for string decryption\"\/><figcaption class=\"wp-element-caption\">Figure 9: it seems that we found a method responsible for string decryption<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">LimeRAT decryption algorithm&nbsp;<\/h2>\n\n\n\n<p>Let&#8217;s break down how the decryption algorithm works in more detail:&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>Instances of the <strong>RijndaelManaged<\/strong> and <strong>MD5CryptoServiceProvider<\/strong> classes are created. If we search for the RijndaelManaged class on MSDN, we see that it is essentially an obsolete implementation of the <strong>AES encryption algorithm (MITRE T1027)<\/strong>. The MD5CryptoServiceProvider class, as the name implies, is used to compute an MD5 hash.&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\">\n<li>An array of 32 bytes is created and initialized with zeros. This array will be used to store the AES key.&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\">\n<li>To generate the key, the MD5 hash of <strong>another string <\/strong>from the configuration class is first computed (in our case, the string is &#8220;20[.]199.13.167&#8221;).&nbsp;<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/tLRk-Kw8Te0GQU_dS6Yboo222hHHc8ZPzMbqzMQtdPBbQ6rbmYGFLGZ8Wm1JLqgeVNiBVqWGpKApRNGkNEW8CtsUpjBEtGJdHB0g9j301Zp17sLuEgN8s1oGSa2Q0ni1IH7P3_YzTkv6uodzLKZw4PA\" alt=\"LimeRAT string from the configuration class\"\/><figcaption class=\"wp-element-caption\">Figure 10: another string from the configuration class is used to generate the AES key&nbsp;<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\">\n<li>Next, the first 15 bytes and then the first 16 bytes of the computed hash are copied to the previously created array. The last element of the array remains zero.&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"5\">\n<li>The generated key is set to the key property of the RijndaelManaged instance. The Mode property is set to CipherMode.ECB.&nbsp;<\/li>\n<\/ol>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\">\n<li>Finally, the original string is decoded using the <strong>Base64<\/strong> algorithm and decrypted using the <strong>AES256-ECB <\/strong>algorithm.&nbsp;<\/li>\n<\/ol>\n\n\n\n<p>Let&#8217;s try to replicate this algorithm in CyberChef to confirm our findings. We will need 2 CyberChef tabs, one where we&#8217;ll use MD5 to generate the AES key, and another where we&#8217;ll attempt to decrypt the data.&nbsp;<\/p>\n\n\n\n<p>First, we calculate the MD5 hash and take 15 bytes from it. Then copy them to the \u2018Key\u2019 field in the AES Decrypt section in another tab:\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"408\" src=\"\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image1-1024x408.png\" alt=\"taking first 15 bytes of MD5 hash\" class=\"wp-image-4772\" srcset=\"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image1-1024x408.png 1024w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image1-300x119.png 300w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image1-768x306.png 768w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image1-370x147.png 370w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image1-270x107.png 270w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image1-740x295.png 740w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image1.png 1065w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Figure 11: taking first 15 bytes of MD5 hash<br><\/figcaption><\/figure>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"344\" src=\"\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image5-1024x344.png\" alt=\"copying 15 bytes to \u2018Key\u2019 in AES Decrypt section in first tab\" class=\"wp-image-4777\" srcset=\"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image5-1024x344.png 1024w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image5-300x101.png 300w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image5-768x258.png 768w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image5-370x124.png 370w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image5-270x91.png 270w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image5-740x248.png 740w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image5.png 1293w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Figure 12: copying 15 bytes to \u2018Key\u2019 in AES Decrypt section in the first tab<\/figcaption><\/figure>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Then, we take the first 16 bytes of MD5 hash:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"385\" src=\"\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image3-1024x385.png\" alt=\"taking first 16 bytes of MD5 hash\" class=\"wp-image-4778\" srcset=\"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image3-1024x385.png 1024w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image3-300x113.png 300w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image3-768x288.png 768w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image3-370x139.png 370w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image3-270x101.png 270w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image3-740x278.png 740w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image3.png 1113w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Figure 13: taking first 16 bytes of MD5 hash<br><\/figcaption><\/figure>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Our next step is to append them to previous 15 bytes and add a zero byte at the end as a padding byte (to 32 bytes):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image4-1024x340.png\" alt=\"copying 16 bytes and appending zero to \u2018Key\u2019 in AES Decrypt section in first tab\n\" class=\"wp-image-4779\" width=\"650\" height=\"215\" srcset=\"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image4-1024x340.png 1024w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image4-300x100.png 300w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image4-768x255.png 768w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image4-370x123.png 370w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image4-270x90.png 270w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image4-740x246.png 740w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image4.png 1309w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption class=\"wp-element-caption\">Figure 14: copying 16 bytes and appending zero to \u2018Key\u2019 in AES Decrypt section in first tab<br><br><\/figcaption><\/figure>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>And now we can see the decrypted string in the output section.<\/p>\n\n\n\n<p>You can try the same <a href=\"https:\/\/cyberchef.org\/#recipe=From_Base64('A-Za-z0-9%2B\/%3D',true,true)AES_Decrypt(%7B'option':'Hex','string':'e51c4b487ef87423d9d38b9bcb71dbe51c4b487ef87423d9d38b9bcb71db8a0'%7D,%7B'option':'Hex','string':''%7D,'ECB','Raw','Raw',%7B'option':'Hex','string':''%7D,%7B'option':'Hex','string':''%7D)&amp;input=QXQyQzlRazNkN1NBNyszS3FjYUR6QUdrM1Vqa0tnYkQxQ0MydFh6Z1dudlhJU1Y4Z1FDeUM0REhkTExUVlN5Lw\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a> as well.<\/p>\n\n\n\n<p>After decrypting the string, we get a link to a PasteBin note: https:\/\/pastebin[.]com\/raw\/sxNJt2ek. When we navigate to the link, we see the C2 address of the malware.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"465\" height=\"95\" src=\"\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image2.png\" alt=\"we found LimeRATs C2 using data that we decrypted\u00a0\" class=\"wp-image-4773\" srcset=\"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image2.png 465w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image2-300x61.png 300w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image2-370x76.png 370w, https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/04\/image2-270x55.png 270w\" sizes=\"(max-width: 465px) 100vw, 465px\" \/><figcaption class=\"wp-element-caption\">Figure 15: we found LimeRATs C2 using data that we decrypted&nbsp;<br><\/figcaption><\/figure>\n\n\n\n<div style=\"height:37px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up&nbsp;<\/h2>\n\n\n\n<p>In this article, we successfully analyzed LimeRAT and uncovered its configuration. We identified the use of the .NET language and examined the malware classes, which revealed that obfuscation had been implemented. By meticulously inspecting these classes, we determined the decryption algorithm employed to decode the string containing the C2 address.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">IOCs&nbsp;<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Analyzed files:&nbsp;<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>SHA1&nbsp;<\/td><td>14836dd608efb4a0c552a4f370e5aafb340e2a5d&nbsp;<\/td><\/tr><tr><td>SHA256&nbsp;<\/td><td>6d08ed6acac230f41d9d6fe2a26245eeaf08c84bc7a66fddc764d82d6786d334&nbsp;<\/td><\/tr><tr><td>MD5&nbsp;<\/td><td>d36f15bef276fd447e91af6ee9e38b28&nbsp;<\/td><\/tr><tr><td>SSDEEP&nbsp;<\/td><td>3072:DDiv2GSyn88sH888wQ2wmVgMk\/211h36vEcIyNTY4WZd\/w1UwIwEoTqPMinXHx+i:XOayy&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">IPv4:&nbsp;<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>IOC<\/strong>&nbsp;<\/td><td><strong>Description<\/strong>&nbsp;<\/td><\/tr><tr><td>20[.]199.13.167:8080&nbsp;<\/td><td>LimeRAT\u2019s C2 server&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Domains:&nbsp;<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>IOC<\/strong>&nbsp;<\/td><td><strong>Description<\/strong>&nbsp;<\/td><\/tr><tr><td>https:\/\/pastebin[.]com\/raw\/sxNJt2ek&nbsp;<\/td><td>PasteBin used by LimeRAT to hide its original C2 server&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">MITRE (ARMATTACK):&nbsp;<\/h3>\n\n\n\n<figure class=\"wp-block-table alignwide\"><table><tbody><tr><td><strong>Tactic<\/strong>&nbsp;<\/td><td><strong>Technique<\/strong>&nbsp;<\/td><td><strong>Description<\/strong>&nbsp;<\/td><\/tr><tr><td>TA0005: Defense Evasion&nbsp;<\/td><td>T1027: Obfuscated Files or Information&nbsp;<\/td><td>Malware is using obfuscator to strip its method names, class names, etc.&nbsp;<\/td><\/tr><tr><td>TA0005: Defense Evasion&nbsp;<\/td><td>T1027: Obfuscated Files or Information&nbsp;<\/td><td>Malware uses Base64 algorithm to encode and decode data&nbsp;<\/td><\/tr><tr><td>TA0005: Defense Evasion&nbsp;<\/td><td>T1027: Obfuscated Files or Information&nbsp;<\/td><td>Malware uses AES algorithm to encrypt and decrypt data&nbsp;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Although effective, this manual process can be time-consuming. This is where interactive sandboxes, such as <a href=\"https:\/\/any.run\/?utm_source=anyrunblog&amp;utm_medium=article&amp;utm_campaign=limerat&amp;utm_content=landing\" target=\"_blank\" rel=\"noreferrer noopener\">ANY.RUN<\/a>, prove to be invaluable.&nbsp;<\/p>\n\n\n\n<p>ANY.RUN offers a powerful and user-friendly platform for automating malware sample analysis. By enabling users to safely execute malware within a secure environment, ANY.RUN efficiently extracts configurations for malware like LimeRAT, ultimately saving security researchers precious time and resources. <\/p>\n\n\n\n    <div class=\"post-footer\">\n      <div class=\"post-footer-banner\">\n        <p class=\"post-footer-banner__text\">\n          Free <span>malware research<\/span> with ANY.RUN\n        <\/p>\n        <div class=\"post-footer-banner__button-warp\">\n          <a href=\"https:\/\/app.any.run\/#register\" id=\"post-footer-banner\" target=\"_blank\" class=\"post-footer-banner__button\">\n            Start Now!\n          <\/a>\n        <\/div>\n      <\/div>\n    <\/div>\n  \n\n\n\n<p><\/p>\n\n\n\n<p>Let us show you how our interactive sandbox can fit into your workflow \u2014 <a href=\"https:\/\/any.run\/demo\/?utm_source=anyrunblog&amp;utm_medium=article&amp;utm_campaign=limerat&amp;utm_content=demo\" target=\"_blank\" rel=\"noreferrer noopener\">get a 14-day free trial<\/a> with our friendly sales team.&nbsp;<\/p>\n\n\n\n<p>Interested in more content like this?&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/any.run\/cybersecurity-blog\/xloader-formbook-encryption-analysis-and-malware-decryption\/\" target=\"_blank\" rel=\"noreferrer noopener\">Read our analysis of Formbook\/XLoader<\/a>&nbsp;<\/li>\n\n\n\n<li><a href=\"https:\/\/any.run\/cybersecurity-blog\/cryptbot-infostealer-malware-analysis\/\" target=\"_blank\" rel=\"noreferrer noopener\">Learn how we used a sandbox to analyze CryptBot<\/a>&nbsp;&nbsp;&nbsp;<\/li>\n\n\n\n<li><a href=\"https:\/\/any.run\/cybersecurity-blog\/orcus-rat-malware-analysis\/\" target=\"_blank\" rel=\"noreferrer noopener\">Or check out our deep dive into Orcus Rat<\/a>&nbsp;<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In today\u2019s article, we\u2019re going to look under the hood of a modular RAT \u2014 LimeRAT. Let\u2019s get right into it!&nbsp; What is LimeRat&nbsp; LimeRAT is a Remote Access Trojan (RAT) that&#8217;s been around for a few years now. It&#8217;s a versatile piece of malware designed to give attackers control over an infected system. With [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":4625,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[15,34],"class_list":["post-4601","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-malware-analysis","tag-malware","tag-malware-analysis"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.10 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>LimeRAT Malware Analysis: Extracting the Config\u00a0<\/title>\n<meta name=\"description\" content=\"In today\u2019s post, we will look under the hood of a modular RAT \u2014 LimeRAT, and uncover its configuration. Check out the malware analysis!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"hardee\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/\"},\"author\":{\"name\":\"hardee\",\"@id\":\"https:\/\/any.run\/\"},\"headline\":\"LimeRAT Malware Analysis: Extracting the Config\u00a0\",\"datePublished\":\"2023-03-28T01:27:00+00:00\",\"dateModified\":\"2023-04-17T12:05:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/\"},\"wordCount\":1349,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\/\/any.run\/\"},\"keywords\":[\"malware\",\"malware analysis\"],\"articleSection\":[\"Malware Analysis\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/\",\"url\":\"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/\",\"name\":\"LimeRAT Malware Analysis: Extracting the Config\u00a0\",\"isPartOf\":{\"@id\":\"https:\/\/any.run\/\"},\"datePublished\":\"2023-03-28T01:27:00+00:00\",\"dateModified\":\"2023-04-17T12:05:06+00:00\",\"description\":\"In today\u2019s post, we will look under the hood of a modular RAT \u2014 LimeRAT, and uncover its configuration. Check out the malware analysis!\",\"breadcrumb\":{\"@id\":\"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/any.run\/cybersecurity-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Malware Analysis\",\"item\":\"https:\/\/any.run\/cybersecurity-blog\/category\/malware-analysis\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"LimeRAT Malware Analysis: Extracting the Config\u00a0\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/any.run\/\",\"url\":\"https:\/\/any.run\/\",\"name\":\"ANY.RUN&#039;s Cybersecurity Blog\",\"description\":\"Cybersecurity Blog covers topics for experienced professionals as well as for those new to it.\",\"publisher\":{\"@id\":\"https:\/\/any.run\/\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/any.run\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/any.run\/\",\"name\":\"ANY.RUN\",\"url\":\"https:\/\/any.run\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/any.run\/\",\"url\":\"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2020\/08\/ANYRUN-Icon.svg\",\"contentUrl\":\"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2020\/08\/ANYRUN-Icon.svg\",\"width\":1,\"height\":1,\"caption\":\"ANY.RUN\"},\"image\":{\"@id\":\"https:\/\/any.run\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/www.any.run\/\",\"https:\/\/twitter.com\/anyrun_app\",\"https:\/\/www.linkedin.com\/company\/30692044\",\"https:\/\/www.youtube.com\/channel\/UCOgCPho7lzmH7m6fPNlukrQ\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/any.run\/\",\"name\":\"hardee\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/any.run\/\",\"url\":\"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/MicrosoftTeams-image-11.png\",\"contentUrl\":\"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/MicrosoftTeams-image-11.png\",\"caption\":\"hardee\"},\"description\":\"I contribute to open source from time to time and I am always up for a challenge.\",\"url\":\"#molongui-disabled-link\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LimeRAT Malware Analysis: Extracting the Config\u00a0","description":"In today\u2019s post, we will look under the hood of a modular RAT \u2014 LimeRAT, and uncover its configuration. Check out the malware analysis!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/","twitter_misc":{"Written by":"hardee","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/#article","isPartOf":{"@id":"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/"},"author":{"name":"hardee","@id":"https:\/\/any.run\/"},"headline":"LimeRAT Malware Analysis: Extracting the Config\u00a0","datePublished":"2023-03-28T01:27:00+00:00","dateModified":"2023-04-17T12:05:06+00:00","mainEntityOfPage":{"@id":"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/"},"wordCount":1349,"commentCount":4,"publisher":{"@id":"https:\/\/any.run\/"},"keywords":["malware","malware analysis"],"articleSection":["Malware Analysis"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/","url":"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/","name":"LimeRAT Malware Analysis: Extracting the Config\u00a0","isPartOf":{"@id":"https:\/\/any.run\/"},"datePublished":"2023-03-28T01:27:00+00:00","dateModified":"2023-04-17T12:05:06+00:00","description":"In today\u2019s post, we will look under the hood of a modular RAT \u2014 LimeRAT, and uncover its configuration. Check out the malware analysis!","breadcrumb":{"@id":"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/any.run\/cybersecurity-blog\/limerat-malware-analysis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/any.run\/cybersecurity-blog\/"},{"@type":"ListItem","position":2,"name":"Malware Analysis","item":"https:\/\/any.run\/cybersecurity-blog\/category\/malware-analysis\/"},{"@type":"ListItem","position":3,"name":"LimeRAT Malware Analysis: Extracting the Config\u00a0"}]},{"@type":"WebSite","@id":"https:\/\/any.run\/","url":"https:\/\/any.run\/","name":"ANY.RUN&#039;s Cybersecurity Blog","description":"Cybersecurity Blog covers topics for experienced professionals as well as for those new to it.","publisher":{"@id":"https:\/\/any.run\/"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/any.run\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/any.run\/","name":"ANY.RUN","url":"https:\/\/any.run\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/any.run\/","url":"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2020\/08\/ANYRUN-Icon.svg","contentUrl":"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2020\/08\/ANYRUN-Icon.svg","width":1,"height":1,"caption":"ANY.RUN"},"image":{"@id":"https:\/\/any.run\/"},"sameAs":["https:\/\/www.facebook.com\/www.any.run\/","https:\/\/twitter.com\/anyrun_app","https:\/\/www.linkedin.com\/company\/30692044","https:\/\/www.youtube.com\/channel\/UCOgCPho7lzmH7m6fPNlukrQ"]},{"@type":"Person","@id":"https:\/\/any.run\/","name":"hardee","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/any.run\/","url":"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/MicrosoftTeams-image-11.png","contentUrl":"https:\/\/any.run\/cybersecurity-blog\/wp-content\/uploads\/2023\/03\/MicrosoftTeams-image-11.png","caption":"hardee"},"description":"I contribute to open source from time to time and I am always up for a challenge.","url":"#molongui-disabled-link"}]}},"_links":{"self":[{"href":"https:\/\/any.run\/cybersecurity-blog\/wp-json\/wp\/v2\/posts\/4601"}],"collection":[{"href":"https:\/\/any.run\/cybersecurity-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/any.run\/cybersecurity-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/any.run\/cybersecurity-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/any.run\/cybersecurity-blog\/wp-json\/wp\/v2\/comments?post=4601"}],"version-history":[{"count":17,"href":"https:\/\/any.run\/cybersecurity-blog\/wp-json\/wp\/v2\/posts\/4601\/revisions"}],"predecessor-version":[{"id":4783,"href":"https:\/\/any.run\/cybersecurity-blog\/wp-json\/wp\/v2\/posts\/4601\/revisions\/4783"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/any.run\/cybersecurity-blog\/wp-json\/wp\/v2\/media\/4625"}],"wp:attachment":[{"href":"https:\/\/any.run\/cybersecurity-blog\/wp-json\/wp\/v2\/media?parent=4601"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/any.run\/cybersecurity-blog\/wp-json\/wp\/v2\/categories?post=4601"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/any.run\/cybersecurity-blog\/wp-json\/wp\/v2\/tags?post=4601"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}