{"id":887,"date":"2016-07-26T08:49:31","date_gmt":"2016-07-26T06:49:31","guid":{"rendered":"http:\/\/www.netnea.com\/cms\/?p=887"},"modified":"2016-07-26T10:56:06","modified_gmt":"2016-07-26T08:56:06","slug":"having-fun-with-new-evasions","status":"publish","type":"post","link":"https:\/\/www.netnea.com\/cms\/2016\/07\/26\/having-fun-with-new-evasions\/","title":{"rendered":"Having Fun with New Evasions"},"content":{"rendered":"<p>There is a spare time activity which I enjoy in off hours. I go to reddit or twitter or some other site where web attack ideas are traded. I look for new exploits or evasions and try and run them against a local webserver to see if the <a href=\"https:\/\/github.com\/SpiderLabs\/owasp-modsecurity-crs\" target=\"_blank\">OWASP ModSecurity Core Rules<\/a> would block the payloads. Usually it does block them and I get a warm fuzzy feeling.<\/p>\n<p>Sometimes, it does not block them though and the warm fuzzy feeling is replaced with the urgent need to <a href=\"https:\/\/github.com\/SpiderLabs\/owasp-modsecurity-crs\/issues?q=is%3Aissue+is%3Aopen+label%3A%22Published+Research%22\" target=\"_blank\">open issues<\/a> on the Core Rules github site.<\/p>\n<p>Yesterday, Nick Galbreath (one of the <a href=\"http:\/\/www.swisscyberstorm.com\/schedule\/\" target=\"_blank\">speakers in the Tech Track<\/a> I moderate at the <a href=\"http:\/\/www.swisscyberstorm.com\/\" target=\"_blank\">Swiss Cyberstorm conference<\/a>) <a href=\"http:\/\/www.client9.com\/article\/five-interesting-injection-attacks\/\" target=\"_blank\">published a list<\/a> of new injection attacks he had seen mentioned in the last few weeks. Immediately, I felt the need for that warm fuzzy feeling and I launched a local reverse proxy server with the latest ruleset and derived a list of exploits out of Nick&#8217;s article (or rather the five articles he linked).<\/p>\n<p>To make it clear, I do not have the backend software, that is usually being attacked. But that&#8217;s not a problem. I only want to see if ModSecurity and the CRS would block a request or not before it would reach the backend application. So I run Apache with the latest Core Rules in blocking anomaly scoring mode with a low anomaly scoring threshold of 5. A few weeks ago I switched from the stable OWASP ModSecurity Core Rules release 2.2.9 to the Core Rules 3.0 development tree. The coverage was good before, but the upcoming release will be even better; especially with the introduction of the paranoia levels. (See <a href=\"https:\/\/www.youtube.com\/watch?v=o25wJH169aA&amp;list=PLv-PXy2JVvit4wCSlKLJsrKZHMUOekhEa&amp;index=23\" target=\"_blank\">this video <\/a>for an introduction of the concept).<\/p>\n<p>While you can send the exploits from the browser, I have a habit to work from the shell and attack with curl. Depending on the level of the description of the attack, constructing the exact payload is at times tedious, but here it seemed simple enough. Within 5 minutes I was ready to strike and indeed, ModSecurity and the Core Rules stopped all 5 attacks in the default install. With anomaly scores from 5 to 25. Exactly the warm fuzzy feeling I was looking for.<\/p>\n<p>Here are the details:<\/p>\n<p><strong>XSS in your XML<\/strong><br \/>\nRules triggered at PL 1:<br \/>\n<em>920100 Invalid HTTP Request Line<\/em><br \/>\n<em> 920430 HTTP protocol version is not allowed by policy<\/em><br \/>\n<em> 941100 XSS Attack Detected via Libinjection<\/em><br \/>\n<em> 941160 NoScript XSS InjectionChecker: HTML Injection<\/em><br \/>\n<strong> Total Score : 15<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Another XSS in your XML<\/strong><br \/>\nRules triggered at PL 1:<br \/>\n<em>941100 XSS Attack Detected via Libinjection<\/em><br \/>\n<em> 941130 XSS Filter &#8211; Category 3: Attribute Vector<\/em><br \/>\n<em> 941150 XSS Filter &#8211; Category 5: Disallowed HTML Attributes<\/em><br \/>\n<em> 941160 NoScript XSS InjectionChecker: HTML Injection<\/em><br \/>\n<em> 941170 NoScript XSS InjectionChecker: Attribute Injection<\/em><br \/>\n<strong> Total Score : 25<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>CSV Injection<\/strong><br \/>\nRules triggered at PL 1:<br \/>\n<em>932100 Remote Command Execution (RCE) Attempt<\/em><br \/>\n<strong> Total Score : 5<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>NoSQL Injection<\/strong><br \/>\nRules triggered at PL 1:<br \/>\n<em> 942290 Finds basic MongoDB SQL injection attempts<\/em><br \/>\n<strong> Total Score : 5<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>XXE Injection<\/strong><br \/>\nRules triggered at PL 1:<br \/>\n<em>941100 XSS Attack Detected via Libinjection<\/em><br \/>\n<em> 941130 Attribute Vector (-&gt; ARGS_NAMES)<\/em><br \/>\n<em> 941130 Attribute Vector (ARGS)<\/em><br \/>\n<strong>Total Score : 15<\/strong><\/p>\n<p>If you are interested to see the exact payloads, then you can check them out in this <a href=\"https:\/\/github.com\/SpiderLabs\/owasp-modsecurity-crs\/issues\/440\" target=\"_blank\">github issue<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/cms\/wp-content\/uploads\/2016\/07\/portrait-round-300x300.png\" width=\"100\" height=\"100\" \/> Christian Folini <a class=\"twitter-follow-button\" href=\"https:\/\/twitter.com\/ChrFolini\" data-show-count=\"false\">Follow @ChrFolini<\/a> <a class=\"twitter-share-button\" href=\"https:\/\/twitter.com\/share\" data-show-count=\"false\">Tweet<\/a><br \/>\n<script src=\"\/\/platform.twitter.com\/widgets.js\" async=\"\" charset=\"utf-8\"><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is a spare time activity which I enjoy in off hours. I go to reddit or twitter or some other site where web attack ideas are traded. I look for new exploits or evasions and try and run them against a local webserver to see if the OWASP ModSecurity Core Rules would block the [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":{"0":"post-887","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-security","7":"czr-hentry"},"_links":{"self":[{"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/posts\/887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/comments?post=887"}],"version-history":[{"count":7,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/posts\/887\/revisions"}],"predecessor-version":[{"id":895,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/posts\/887\/revisions\/895"}],"wp:attachment":[{"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/media?parent=887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/categories?post=887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.netnea.com\/cms\/wp-json\/wp\/v2\/tags?post=887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}