{"id":82,"date":"2010-03-18T11:18:41","date_gmt":"2010-03-18T10:18:41","guid":{"rendered":"http:\/\/blog.pi3.com.pl\/?p=82"},"modified":"2010-03-18T14:33:51","modified_gmt":"2010-03-18T13:33:51","slug":"remote-stack-overflows","status":"publish","type":"post","link":"https:\/\/blog.pi3.com.pl\/?p=82","title":{"rendered":"Remote stack overflows"},"content":{"rendered":"<p>One day I was reviewing all bugs in bugtraq IDs (popular bids). I want to know which kind of bugs is it now popular and what is the trend of modern bugs. I came to two main conclusions:<\/p>\n<p>1) The most popular are SQL\/XSS bugs but in 60% this is found in software which nobody knows\/uses (stupid kiddie)<\/p>\n<p>2) We&#8217;ve got 2010 year and there is still possible to find stack overflow bugs! The most funny thing for me there is more remote stack overflow bugs than local \ud83d\ude42<\/p>\n<p>Stack overflow bugs is one of the oldest class of software bugs which still exists &#8211; more-less 10% of all bugs ! Of course it isn&#8217;t 199x year that you can find it using regexpression for &#8216;grep&#8217; program. So what is conclusion? Exploit stack overflow bugs is still interesting from attackers point of view. The question is &#8220;Is it still possible to exploit this class of bugs in modern UNIX systems in 2010 year?&#8221;. The answer for this question isn&#8217;t simple. Let&#8217;s do simple review of modern defence systems. We&#8217;ve got:<\/p>\n<address>*) Non-exec memory (not only stack &#8211; almost every region where it is NOT necessary)<\/address>\n<address>*) W^X &#8211; &#8220;Write XOR Exec&#8221; memory. It forbids memory with Write and Exec bits in the same time.<br \/>\n<\/address>\n<address>*) AAAS &#8211; ASCII Armored Address Space<\/address>\n<address>*) ASLR &#8211; Address Space Layout Randomization<\/address>\n<address>*) mmap() and mprotect() protections<br \/>\n<\/address>\n<address>*) Heap protections &#8211; like safe-unlink(), safe malloc() implementation (OpenBSD)<\/address>\n<address>*) Random canary of death protections\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-|<br \/>\n<\/address>\n<address>*) frame pointer protection by canary of death\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 |<br \/>\n<\/address>\n<address>*) move all pointers to the beginning of the frame\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 |==&gt;\u00a0 pro-police<br \/>\n<\/address>\n<address>*) move all local byte arrays to the end of the frame\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0 |\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 protection (SSP)<\/address>\n<address>*) Vulnerable arguments copied to the local variables and then reordered&#8212;-|<\/address>\n<address>.<br \/>\n<\/address>\n<address> <\/address>\n<address> <\/address>\n<p>We can bypass most of this protection but if it isn&#8217;t connected. Is there any possibilities to exploit in modern UNIX systems REMOTE stack overflow bugs with enabled ALL of this protections?! It sounds crazy&#8230; but STILL we CAN DO IT \ud83d\ude42 I wrote simple server with remote stack overflow bug and EXPLOIT it. Proof Of Concept of course is private but I created a movie of exploiting. You can find it here:<\/p>\n<p><a href=\"http:\/\/site.pi3.com.pl\/priv\/bypass-all-protections.flv\" target=\"_blank\">http:\/\/site.pi3.com.pl\/priv\/bypass-all-protections.flv<\/a><\/p>\n<p>We&#8217;ve got 2010 year and we can still exploit remote stack overflow bugs in modern UNIX systems \ud83d\ude42 Amazing&#8230; but it could be that this techniques (yes it isn&#8217;t one technique which is used to exploit this bug) is the last opportunity to exploiting remote stack overflow bugs&#8230; OK so&#8230; have a nice watching \ud83d\ude42<\/p>\n<p>Best regards,<\/p>\n<p>Adam Zabrocki<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One day I was reviewing all bugs in bugtraq IDs (popular bids). I want to know which kind of bugs is it now popular and what is the trend of modern bugs. I came to two main conclusions: 1) The most popular are SQL\/XSS bugs but in 60% this is found in software which nobody [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,5,6],"tags":[],"class_list":["post-82","post","type-post","status-publish","format-standard","hentry","category-bughunt","category-exploiting","category-ideas"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.pi3.com.pl\/index.php?rest_route=\/wp\/v2\/posts\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pi3.com.pl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pi3.com.pl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pi3.com.pl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pi3.com.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=82"}],"version-history":[{"count":25,"href":"https:\/\/blog.pi3.com.pl\/index.php?rest_route=\/wp\/v2\/posts\/82\/revisions"}],"predecessor-version":[{"id":104,"href":"https:\/\/blog.pi3.com.pl\/index.php?rest_route=\/wp\/v2\/posts\/82\/revisions\/104"}],"wp:attachment":[{"href":"https:\/\/blog.pi3.com.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pi3.com.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pi3.com.pl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}