{"id":84199,"date":"2017-04-25T14:28:48","date_gmt":"2017-04-25T08:58:48","guid":{"rendered":"https:\/\/blogs_admin.quickheal.com\/?p=84199"},"modified":"2017-04-25T14:32:04","modified_gmt":"2017-04-25T09:02:04","slug":"anatomy-flash-exploit-cve-2015-8651-integrated-rig-exploit-kit","status":"publish","type":"post","link":"https:\/\/www.quickheal.com\/blogs\/anatomy-flash-exploit-cve-2015-8651-integrated-rig-exploit-kit\/","title":{"rendered":"Anatomy of Flash Exploit (CVE-2015-8651) integrated into Rig Exploit Kit"},"content":{"rendered":"<p>We all know how the infamous <a href=\"https:\/\/blogs.quickheal.com\/cosmos-bank-website-compromised-rig-exploit-kit-drops-cerber-ransomware\/\">RIG Exploit Kit<\/a> have been used to infect the end users. We are seeing a constant spike in the usage of the RIG Exploit Kit by malware actors to spread malware. Its use has been noticed in different campaigns such as EITest, pseudoDarkleech, and AFRAIDGATE. The RIG Exploit Kit is mostly used to drop ransomware on targeted machines. We have recently observed an upsurge in the usage of Adobe Flash Player Exploit (<a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2015-8651\">CVE-2015-8651<\/a>) by the RIG Exploit Kit. The infection chain starts with a compromised web page which redirects the user to a landing page and then loads the Flash exploit as shown in Fig 1.<\/p>\n<figure id=\"attachment_84200\" aria-describedby=\"caption-attachment-84200\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-84200 size-large\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/04\/Fig1-650x229.jpg\" alt=\"Fig 1. RIG Exploit Kit infection cycle\" width=\"650\" height=\"229\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig1-650x229.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig1-300x106.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig1-768x271.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig1-789x278.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig1.jpg 1115w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-84200\" class=\"wp-caption-text\">Fig 1. RIG Exploit Kit infection cycle<\/figcaption><\/figure>\n<p>In this blog post, we will discuss the working of the Adobe Flash exploit (<a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2015-8651\">CVE-2015-8651<\/a>).The Flash exploit has 5 DefineBinary tags which hold obfuscated data. After analysing the DefineBinary tags, we found that two DefineBinary tags data are encrypted by RC4 encryption algorithm and their keys are kept in other DefineBinary tags. Let\u2019s take a closer look at these DefineBinary tags.<\/p>\n<p><strong>DefineBinary Tag-1<\/strong><\/p>\n<figure id=\"attachment_84202\" aria-describedby=\"caption-attachment-84202\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-84202 size-large\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/04\/Fig-2-650x82.jpg\" alt=\"Fig 2. Decryption key present in DefineBinary Tag-1\" width=\"650\" height=\"82\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-2-650x82.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-2-300x38.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-2.jpg 677w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-84202\" class=\"wp-caption-text\">Fig 2. Decryption key present in DefineBinary Tag-1<\/figcaption><\/figure>\n<p>The \u2018DefineBinary Tag-1\u2019 shown in Fig 2 contains the decryption key. This key is used to decrypt the data present in DefineBinary Tag-2. After the decryption of DefineBinary Tag-2, we found the below strings.<\/p>\n<p><strong>DefineBinary Tag-2<\/strong><\/p>\n<figure id=\"attachment_84205\" aria-describedby=\"caption-attachment-84205\" style=\"width: 566px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-84205 size-large\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/04\/Fig-3-566x390.jpg\" alt=\"Fig 3. Decryption of strings using Fig 2 Key\" width=\"566\" height=\"390\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-3-566x390.jpg 566w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-3-300x207.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-3-229x158.jpg 229w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-3.jpg 575w\" sizes=\"(max-width: 566px) 100vw, 566px\" \/><figcaption id=\"caption-attachment-84205\" class=\"wp-caption-text\">Fig 3. Decryption of strings using Fig 2 Key<\/figcaption><\/figure>\n<p>Also, there was another decryption key in the \u2018DefineBinary Tag-4\u2019. This key is used to decrypt the data present in \u2018DefineBinary Tag-3\u2019.<\/p>\n<p><strong>DefineBinary Tag-4<\/strong><\/p>\n<figure id=\"attachment_84207\" aria-describedby=\"caption-attachment-84207\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-84207 size-large\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/04\/Fig-4-650x99.jpg\" alt=\"Fig 4. Decryption Key present in DefineBinary Tag-4\" width=\"650\" height=\"99\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-4-650x99.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-4-300x46.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-4.jpg 671w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-84207\" class=\"wp-caption-text\">Fig 4. Decryption Key present in DefineBinary Tag-4<\/figcaption><\/figure>\n<p><strong>DefineBinary Tag-3<\/strong><\/p>\n<figure id=\"attachment_84208\" aria-describedby=\"caption-attachment-84208\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-84208 size-large\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/04\/Fig-5-650x178.jpg\" alt=\"Fig 5. Decryption of strings using the key shown in Fig 4 \" width=\"650\" height=\"178\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-5-650x178.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-5-300x82.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-5-304x84.jpg 304w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-5.jpg 763w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-84208\" class=\"wp-caption-text\">Fig 5. Decryption of strings using the key shown in Fig 4<\/figcaption><\/figure>\n<p>The decrypted data shows strings which are used in shellcode preparation by the exploit.<\/p>\n<p><strong>The Exploit Entry Point<\/strong><\/p>\n<p>The code snippets in Fig 6 shows the entry point of Flash execution. In method_6 given argument -1820302796 gets XOR\u2019ed with 0x93806237 (present in DefineBinary tag-5 data) gives the index value as \u20183\u2019 which represents string \u201ciQWERddQWERqd\u201d. The _loc5_ variable holds \u201ciddqd\u201d which is decoded from the string \u201ciQWERddQWERqd\u201d after removing \u201cQWER\u201d. This iddqd variable holds data which is passed as a parameter to the current Flash file. Then _loc6_ variable holds hex data which is decoded by replacing \u201cQWER\u201d by \u201cE\u201d by the earlier XOR process and those strings are also stored in DefineBinary tag-3.<\/p>\n<figure id=\"attachment_84209\" aria-describedby=\"caption-attachment-84209\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-84209 size-large\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/04\/Fig-6-650x312.jpg\" alt=\"Fig 6. Start of exploitation\" width=\"650\" height=\"312\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-6-650x312.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-6-300x144.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-6-768x369.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-6-789x379.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-6.jpg 1160w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-84209\" class=\"wp-caption-text\">Fig 6. Start of exploitation<\/figcaption><\/figure>\n<p>The function call \u2018this.sdfghfghfgj\u2019 triggers the exploit code. It performs fingerprinting and version checks to obtain the version of the installed Flash player. If a vulnerable Flash installation is found, it triggers the vulnerability and carries out heap spray. The function \u2018<strong>get_big_ba\u2019<\/strong> triggers the well-known integer overflow vulnerability (<a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2015-8651\">CVE-2015-8651<\/a>).<\/p>\n<figure id=\"attachment_84211\" aria-describedby=\"caption-attachment-84211\" style=\"width: 458px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-84211 size-large\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/04\/Fig-7-458x390.jpg\" alt=\"Fig 7. Function Call flow depicting vulnerability trigger\" width=\"458\" height=\"390\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-7-458x390.jpg 458w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-7-300x255.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-7.jpg 632w\" sizes=\"(max-width: 458px) 100vw, 458px\" \/><figcaption id=\"caption-attachment-84211\" class=\"wp-caption-text\">Fig 7. Function Call flow depicting vulnerability trigger<\/figcaption><\/figure>\n<p><strong>Exploit Checks<\/strong><\/p>\n<p>The function \u2018is_vuln<strong>\u2019<\/strong> performs Exploit checks.<\/p>\n<figure id=\"attachment_84212\" aria-describedby=\"caption-attachment-84212\" style=\"width: 431px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-84212 size-full\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/04\/Fig-8.jpg\" alt=\" Fig 8. Exploit checks\" width=\"431\" height=\"184\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-8.jpg 431w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-8-300x128.jpg 300w\" sizes=\"(max-width: 431px) 100vw, 431px\" \/><figcaption id=\"caption-attachment-84212\" class=\"wp-caption-text\">Fig 8. Exploit checks<\/figcaption><\/figure>\n<p>Below are the checks:<\/p>\n<ul>\n<li>Anti-debugging check<\/li>\n<li>Operating system Version check<\/li>\n<li>Checks if it\u2019s a standalone player<\/li>\n<li>Flash player version<\/li>\n<\/ul>\n<p>Below is the snippet of the function \u2018check_versions\u2019 which does the Flash player version checking when it\u2019s called.<\/p>\n<figure id=\"attachment_84213\" aria-describedby=\"caption-attachment-84213\" style=\"width: 598px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-84213 size-full\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/04\/Fig-9.jpg\" alt=\"Fig 9. Flash player version checks\" width=\"598\" height=\"182\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-9.jpg 598w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-9-300x91.jpg 300w\" sizes=\"(max-width: 598px) 100vw, 598px\" \/><figcaption id=\"caption-attachment-84213\" class=\"wp-caption-text\">Fig 9. Flash player version checks<\/figcaption><\/figure>\n<p><strong>Vulnerability<\/strong><\/p>\n<p>The functions related to domain memory which is responsible for the Flash exploit are defined in package \u201cavm2.intrinsics.memory\u201d. The package provides methods as \u2018li32\u2019 and \u2018si32\u2019 where li32 is used to load 32-bit integer values from the memory and si32 used to store 32-bit integer into the memory. The definition of \u2018li32<strong>\u2019 <\/strong>and \u2018si32\u2019 functions exploits an Integer Overflow Vulnerability <strong>(<\/strong><a href=\"https:\/\/cve.mitre.org\/cgi-bin\/cvename.cgi?name=CVE-2015-8651\">CVE-2015-8651<\/a><strong>)<\/strong>. The detailed analysis of the vulnerability can be found\u00a0<a href=\"https:\/\/blogs.technet.microsoft.com\/mmpc\/2016\/06\/20\/reverse-engineering-dubniums-flash-targeting-exploit\">here<\/a>.<\/p>\n<figure id=\"attachment_84214\" aria-describedby=\"caption-attachment-84214\" style=\"width: 385px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-84214 size-large\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/04\/Fig-10-385x390.jpg\" alt=\"Fig 10. Integer overflow vulnerability\" width=\"385\" height=\"390\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-10-385x390.jpg 385w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-10-296x300.jpg 296w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-10-70x70.jpg 70w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-10-80x81.jpg 80w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-10-45x45.jpg 45w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-10.jpg 433w\" sizes=\"(max-width: 385px) 100vw, 385px\" \/><figcaption id=\"caption-attachment-84214\" class=\"wp-caption-text\">Fig 10. Integer overflow vulnerability<\/figcaption><\/figure>\n<p>Upon successful exploitation of the said integer overflow vulnerability, the exploit runs a shellcode. We have observed that the shellcode generally connects to the exploit kit domain and downloads malware and executes them on the victim\u2019s machine.<\/p>\n<p><strong>Quick Heal <\/strong><strong>Detections<\/strong><\/p>\n<p>Quick Heal has released the following detection for the RIG Exploit Kit Flash exploit:<\/p>\n<ul>\n<li>Exp.SWF.Rig.EK<\/li>\n<\/ul>\n<p>As observed in Quick Heal Labs, below is the trend of the \u2018Exp.SWF.Rig.EK<strong>\u2019<\/strong> over the last month.<\/p>\n<figure id=\"attachment_84215\" aria-describedby=\"caption-attachment-84215\" style=\"width: 650px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-84215 size-large\" src=\"https:\/\/blogs_admin.quickheal.com\/wp-content\/uploads\/2017\/04\/Fig-11-650x124.jpg\" alt=\"Fig 11: Quick Heal Labs\u2019 detection stats\" width=\"650\" height=\"124\" srcset=\"https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-11-650x124.jpg 650w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-11-300x57.jpg 300w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-11-768x147.jpg 768w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-11-789x151.jpg 789w, https:\/\/www.quickheal.com\/blogs\/wp-content\/uploads\/2017\/04\/Fig-11.jpg 1037w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><figcaption id=\"caption-attachment-84215\" class=\"wp-caption-text\">Fig 11: Quick Heal Labs\u2019 detection stats<\/figcaption><\/figure>\n<p><strong>Conclusion<\/strong><\/p>\n<p>With a limited set of reversing tools, the analysis of the highly obfuscated Flash Exploit was a bit difficult. Malware actors are using a deeper level of obfuscation to hide actual exploit from reverse engineering. Such techniques are used to evade detection at every level and will continue to evolve in the future. We strongly recommend users to update the Windows Operating System and Flash Player and use a multi-layered security software such as\u00a0<a href=\"https:\/\/www.quickheal.co.in\/home-users\/quick-heal-total-security\">Quick Heal<\/a>.<\/p>\n<p><strong>\u00a0<\/strong><strong>ACKNOWLEDGMENT<\/strong><\/p>\n<p><u>Subject Matter Experts<\/u><\/p>\n<ul>\n<li>Prashant Kadam<br \/>\n&#8211;\u00a0Vulnerability Research Labs<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>We all know how the infamous RIG Exploit Kit have been used to infect the end users. We are seeing a constant spike in the usage of the RIG Exploit Kit by malware actors to spread malware. Its use has been noticed in different campaigns such as EITest, pseudoDarkleech, and AFRAIDGATE. The RIG Exploit Kit [&hellip;]<\/p>\n","protected":false},"author":33,"featured_media":83531,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70,1395],"tags":[1240,230,1415,561],"class_list":["post-84199","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-adobe","category-vulnerability","tag-adobe-flash-exploit","tag-exploit-kit","tag-rig-exploit-kit","tag-vulnerabilities"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/84199"}],"collection":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/comments?post=84199"}],"version-history":[{"count":11,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/84199\/revisions"}],"predecessor-version":[{"id":84222,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/posts\/84199\/revisions\/84222"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media\/83531"}],"wp:attachment":[{"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/media?parent=84199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/categories?post=84199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.quickheal.com\/blogs\/wp-json\/wp\/v2\/tags?post=84199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}