{"id":996,"date":"2016-07-06T02:18:18","date_gmt":"2016-07-06T02:18:18","guid":{"rendered":"http:\/\/www.inforsec.org\/wp\/?p=996"},"modified":"2024-07-31T17:57:16","modified_gmt":"2024-07-31T09:12:16","slug":"xede-practical-exploit-early-detection","status":"publish","type":"post","link":"http:\/\/202.112.238.40\/wp\/?p=996","title":{"rendered":"Xede: Practical Exploit Early Detection"},"content":{"rendered":"<p style=\"text-align: center;\"><strong><b>Xede: Practical Exploit<\/b><\/strong><strong><b>\u00a0<\/b><\/strong><strong><b>Early Detection<\/b><\/strong><strong><b>\u00a0<\/b><\/strong><strong><b>[1]<\/b><\/strong><\/p>\n<p>\u4f5c\u8005\uff1aMeining Nie (Institute of Software, CAS)<\/p>\n<p>As all walks of life rely heavily on IT systems, Advanced Persistent Threat (APT) has become one of the most serious information security issues, posting a great threat on the government departments, research institutions, military organizations and industry enterprises.\u00a0APT often employs zero-day (or recently-disclosed) vulnerabilities in popular programs, such as Microsoft Office\u00a0[2], to penetrate the defenses of its target, and\u00a0usually combines code reuse and code injection techniques to bypass exploit-mitigation mechanisms deployed in modern operating systems.<\/p>\n<p><!--more--><\/p>\n<p>Traditional signature-based malware detection systems have increasingly become ineffective against APT. Instead, an effective defense mechanism should focus on the early detection of exploits. Exploits often violate some code or control-flow integrity. For example, <em><i>code injection<\/i><\/em>\u00a0attacks introduce new (malicious) code into the system, while <em><i>code reuse<\/i><\/em>\u00a0attacks manipulate the control flow to execute its gadgets. An exploit detection system checking these integrities could detect a wide spectrum of exploits.<\/p>\n<p>However, the practical exploit detection is still a challenging problem\u00a0in several\u00a0ways, including:<\/p>\n<ol>\n<li>Almost all thepopular applicationsgenerate dynamic code to improve performance or extend the functionality. For example, as shown in table 1, to\u00a0load a normal <em><i>doc<\/i><\/em>\u00a0file, <em><i>word.exe<\/i><\/em>\u00a0may generate about 76 KB codes which are very similar to the alien codes injected by the attacker. That\u00a0may cause high false positives.<\/li>\n<li>Manyapplications replace or adjust the return addresses on the stack for obscure reasons. These irregular behaviors disrupt security mechanisms expecting\u00a0the <em><i>call<\/i><\/em>\u00a0and <em><i>ret<\/i><\/em>\u00a0instructions to be matched. Table 1 shows that opening a normal\u00a0<em><i>pdf<\/i><\/em>\u00a0file could lead to about 85,000 false positives.<\/li>\n<li>Benign windows applications have many short code sequences that resemble gadgetsused in code reuse attacks,\u00a0and are wrongfully detected as such by existing schemes\u00a0[3]. For instance, as shown in table 1, we observe around 5,000 false positives when simple existing detection schemes are employed to analyze one PDF file.<\/li>\n<li>Many exploitdetectors launch samples in a <em><i>sandbox<\/i><\/em>to analyze their runtime behaviors. But exploits are always tied to specific run-time environments. If the exploits fail to compromise the system, they also fail to conduct malicious behaviors, so that they may bypass the detection. Our experiments reveal that around 70% of the malware samples are unstable.\u00a0Table 1 shows that\u00a0the success rate of <em><i>pdf<\/i><\/em>\u00a0exploits in our dataset is less than 10%.<\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td width=\"64\"><strong>Sample type<\/strong><\/td>\n<td width=\"103\"><strong>Size of benign DGC<\/strong><\/td>\n<td width=\"160\"><strong>Number of benign\u00a0mismatched call-ret<\/strong><\/td>\n<td width=\"122\"><strong>Number of benign gadgets<\/strong><\/td>\n<td width=\"116\"><strong>Exploit success rate<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"64\">doc<\/td>\n<td width=\"103\">78,216<\/td>\n<td width=\"160\">4,561<\/td>\n<td width=\"122\">4,221<\/td>\n<td width=\"116\">74.14%<\/td>\n<\/tr>\n<tr>\n<td width=\"64\">pdf<\/td>\n<td width=\"103\">24,308<\/td>\n<td width=\"160\">84,798<\/td>\n<td width=\"122\">4,997<\/td>\n<td width=\"116\">9.52%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: center;\">Table 1. Possible false-positives in <em><i>doc<\/i><\/em>\u00a0and <em><i>pdf<\/i><\/em><\/p>\n<p>Facing the problems above, by analyzing\u00a0the control flow transfers caused by exploits, we\u00a0present a practical exploit early detection system called Xede, to comprehensively detect code reuse and code injection attacks. Figure 1 shows the architecture of Xede.\u00a0It has three major detection engines:<\/p>\n<p><a href=\"http:\/\/www.inforsec.org\/wp\/wp-content\/uploads\/2016\/07\/123.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-999 aligncenter\" src=\"http:\/\/www.inforsec.org\/wp\/wp-content\/uploads\/2016\/07\/123.png\" alt=\"123\" width=\"637\" height=\"339\" srcset=\"http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/123.png 637w, http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/123-300x160.png 300w, http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/123-250x133.png 250w, http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/123-150x80.png 150w\" sizes=\"auto, (max-width: 637px) 100vw, 637px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">Figure 1. The Architecture of Xede<\/p>\n<ol>\n<li><em><i>Exploit exception detector<\/i><\/em>analyzes the program exceptions to discover the attack attemptswhich fail to compromise the systems.\u00a0We intercept the page fault handler to detect the memory access violations caused by exploits. We also analyze the handling process of page faults to filter out those caused by paging mechanism\u00a0or lazy-allocation algorithm\u00a0to eliminate\u00a0false positives.<\/li>\n<li><em><i>Code injection detector<\/i><\/em>detects (malicious) injected code by comparing the addresses of executed instructions against a list of benign code regions.We hook a kernel routine to intercept the executable module loading events. Then we parse the PE structure of the module which is being loaded to locate the address and size of its benign code regions (that is, its executable-sections). To reduce false positives, we also hook the APIs about page allocation, page protection modification and heap allocation, so that this list\u00a0of benign code regions\u00a0can be\u00a0timely updated with the legitimate dynamically generated code\u00a0(DGC)\u00a0as well.<\/li>\n<li>Code injection attacks are often combined with code reuse attacks to bypass the DEP protection.<i><\/i><em><i>Code reuse detector<\/i><\/em>focuses on the detection of code reuse techniques.\u00a0For ROP detection, we maintain\u00a0a <em><i>shadow stack<\/i><\/em>\u00a0for return addresses to discover the mismatched <em><i>call<\/i><\/em>&#8211;<em><i>ret<\/i><\/em>\u00a0instructions, like <em><i>ROPdefender<\/i><\/em>\u00a0[4]\u00a0does. For JOP detection, we measure\u00a0the length of consecutively executed\u00a0instruction sequences to discover the gadget-chains, like <em><i>kBouncer<\/i><\/em>\u00a0[5]\u00a0does. But we have improved\u00a0the shadow stack in many ways, including the judgement strategy, the matching algorithm\u00a0and the search pattern. We have also improved the gadget counting method. So that we can accommodate all the previously-mentioned exploit-like code patterns which widely exist in today&#8217;s benign programs.<\/li>\n<\/ol>\n<p>We build\u00a0a prototype of Xede\u00a0and download\u00a012501 exploits from some\u00a0public databases to evaluate its\u00a0effectiveness. Table 2\u00a0shows that\u00a0Xede accurately detects all of these exploits. In particular, among these exploits, 51.47% exploits adopt the ROP techniques.<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"291\"><strong>Exploit techniques<\/strong><\/td>\n<td width=\"276\"><strong>Sample proportion<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"291\">code injection<\/td>\n<td width=\"276\">75%<\/td>\n<\/tr>\n<tr>\n<td width=\"291\">ret-based gadgets<\/td>\n<td width=\"276\">51.47%<\/td>\n<\/tr>\n<tr>\n<td width=\"291\">jmp-based gadgets<\/td>\n<td width=\"276\">19.85%<\/td>\n<\/tr>\n<tr>\n<td width=\"291\">exploit exception<\/td>\n<td width=\"276\">25%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: center;\">Table 2. Exploit sample proportion with different exploitation techniques<\/p>\n<p>We also\u00a0integrate Xede into the mail server of a university in China to detect exploits in emails, and deploy Xede on the Internet as a public service\u00a0[6]\u00a0to scan user-provided files.\u00a0Xede detects 136 exploits\u00a0out of 11,385 collected samples. Among which only 44.12% of exploits successfully succeed, which means that real-world exploits heavily rely on special system environments.\u00a0We use some commercial\u00a0anti-virus software to conform that many exploits can easily evade the detection of signature matching nowadays. As shown in table 3, Kaspersky achieves the lowest false negative that is still higher than 15%.<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"141\"><strong>AV software<\/strong><\/td>\n<td width=\"111\"><strong>Version<\/strong><\/td>\n<td width=\"173\"><strong>Date of DB update<\/strong><\/td>\n<td width=\"142\"><strong>False negative<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"141\">Kaspersky<\/td>\n<td width=\"111\">15.0.2.361<\/td>\n<td width=\"173\">24\/05\/2015<\/td>\n<td width=\"142\">21<\/td>\n<\/tr>\n<tr>\n<td width=\"141\">McAfee<\/td>\n<td width=\"111\">18.0.204<\/td>\n<td width=\"173\">24\/05\/2015<\/td>\n<td width=\"142\">49<\/td>\n<\/tr>\n<tr>\n<td width=\"141\">Avira<\/td>\n<td width=\"111\">15.0.10.434<\/td>\n<td width=\"173\">24\/05\/2015<\/td>\n<td width=\"142\">22<\/td>\n<\/tr>\n<tr>\n<td width=\"141\">Norton<\/td>\n<td width=\"111\">22.2.0.31<\/td>\n<td width=\"173\">24\/05\/2015<\/td>\n<td width=\"142\">32<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: center;\">Table 3. False negatives of commercial anti-virus software<\/p>\n<p>We\u00a0evaluate the overheads of Xede in an Ubuntu 12.04 server\u00a0with 3.07GHz Intel Xeon X5675 CPU and 32GB memory.\u00a0Figure 2\u00a0illustrates\u00a0that the rate of memory consumption\u00a0and CPU usage are only 1.1% and 0.12%, respectively.<\/p>\n<p><a href=\"http:\/\/www.inforsec.org\/wp\/wp-content\/uploads\/2016\/07\/22.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-998 aligncenter\" src=\"http:\/\/www.inforsec.org\/wp\/wp-content\/uploads\/2016\/07\/22.png\" alt=\"22\" width=\"531\" height=\"236\" \/><\/a><\/p>\n<p style=\"text-align: center;\">Figure 2. Resource consumption of Xede<\/p>\n<p>Our evaluation demonstrates that Xede is highly effective and practical in detecting exploits.<\/p>\n<p><strong><b>\u53c2\u8003\u6587\u732e\uff1a<\/b><\/strong><\/p>\n<p>[1].Meining Nie, Purui Su, et al. Xede: Practical Exploit Early Detection. RAID,<\/p>\n<p>[2].Secunia: Secunia vulnerability review 2015. Tech. rep., Secunia (2014), <a href=\"http:\/\/secunia.com\/vulnerability-review\/\">http:\/\/secunia.com\/vulnerability-review\/<\/a>.<\/p>\n<p>[3].Schuster, Felix, et al. Evaluating the effectiveness of current anti-ROP defenses.RAID,<\/p>\n<p>[4].Davi, Lucas, et al. ROPdefender: A detection tool to defend against return-oriented programming attacks. ACM, 2011.<\/p>\n<p>[5].Pappas, Vasilis, et al. Transparent ROP exploit mitigation using indirect branch tracing. USENIX Security,<\/p>\n<p>[6].TCA Malware Analysis platform.<\/p>\n<p>[7].This research has been presented at the 18th International Symposium on Research in Attacks, Intrusions and Defenses(RAID 2015), published by Springer International, can be downloaded at <a href=\"http:\/\/link.springer.com\/chapter\/10.1007\/978-3-319-26362-5_10\"><u>http:\/\/link.springer.com\/chapter\/10.1007\/978-3-319-26362-5_10<\/u><\/a>.<\/p>\n<p>[8].\u539f\u6587PDF\u4e0b\u8f7d\uff1a<a href=\"http:\/\/www.inforsec.org\/wp\/wp-content\/uploads\/2016\/07\/Xede\u8bba\u6587\u539f\u6587.pdf\"><strong><b>Xede: Practical Exploit<\/b><\/strong><strong><b>\u00a0<\/b><\/strong><strong><b>Early Detection<\/b><\/strong><\/a><\/p>\n<p><strong><b>\u4f5c\u8005\u7b80\u4ecb\uff1a<\/b><\/strong><\/p>\n<p>Meining Nie is a Research Assistant in the Institute of Software, Chinese Academy of Sciences\u00a0(ISCAS). His research focuses on\u00a0systems security\u00a0and malware analysis.\u00a0He earned his Ph.D. in Computer Science from ISCAS\u00a0(2016) in the area of malware analysis based on virtualization technology, studying under Prof.\u00a0Purui Su. He received\u00a0his B.E.\u00a0degree\u00a0in Computer Science from University of Electronic Science and Technology of China in 2010, and won the Second Prize\u00a0of National College Student Information Security Contest in 2008.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Xede: Practical Exploit\u00a0Early Detection\u00a0[1] \u4f5c\u8005\uff1aMei&#8230; <a class=\"continue-reading-link\" href=\"http:\/\/202.112.238.40\/wp\/?p=996\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-996","post","type-post","status-publish","format-standard","hentry","category-research"],"_links":{"self":[{"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=\/wp\/v2\/posts\/996","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=996"}],"version-history":[{"count":2,"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=\/wp\/v2\/posts\/996\/revisions"}],"predecessor-version":[{"id":6488,"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=\/wp\/v2\/posts\/996\/revisions\/6488"}],"wp:attachment":[{"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=996"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}