{"id":1009,"date":"2016-07-12T06:57:27","date_gmt":"2016-07-12T06:57:27","guid":{"rendered":"http:\/\/www.inforsec.org\/wp\/?p=1009"},"modified":"2016-07-12T07:08:35","modified_gmt":"2016-07-12T07:08:35","slug":"%e5%9c%b0%e5%9d%80%e7%a9%ba%e9%97%b4%e5%b8%83%e5%b1%80%e9%9a%8f%e6%9c%ba%e5%8c%96aslr%e5%a2%9e%e5%bc%ba%e7%a0%94%e7%a9%b6%e7%bb%bc%e8%bf%b0","status":"publish","type":"post","link":"http:\/\/202.112.238.40\/wp\/?p=1009","title":{"rendered":"\u5730\u5740\u7a7a\u95f4\u5e03\u5c40\u968f\u673a\u5316(ASLR)\u589e\u5f3a\u7814\u7a76\u7efc\u8ff0"},"content":{"rendered":"<p>\u4f5c\u8005\uff1aYue CHEN, Florida State University<\/p>\n<p><strong>Address Space Layout Randomization (ASLR) \u662f\u795e\u9a6c?<\/strong><\/p>\n<p>\u4e00\u4e9b\u653b\u51fb\uff0c\u6bd4\u5982return-oriented programming (ROP)\u4e4b\u7c7b\u7684\u4ee3\u7801\u590d\u7528\u653b\u51fb\uff0c\u4f1a\u8bd5\u56fe\u5f97\u5230\u88ab\u653b\u51fb\u8005\u7684\u5185\u5b58\u5e03\u5c40\u4fe1\u606f\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u77e5\u9053\u4ee3\u7801\u6216\u8005\u6570\u636e\u653e\u5728\u54ea\u91cc\uff0c\u6765\u5b9a\u4f4d\u5e76\u8fdb\u884c\u653b\u51fb\u3002\u6bd4\u5982\u53ef\u4ee5\u627e\u5230ROP\u91cc\u9762\u7684gadget\u3002\u800cASLR\u8ba9\u8fd9\u4e9b\u5185\u5b58\u533a\u57df\u968f\u673a\u5206\u5e03\uff0c\u6765\u63d0\u9ad8\u653b\u51fb\u8005\u6210\u529f\u96be\u5ea6\uff0c\u8ba9\u4ed6\u4eec\u53ea\u80fd\u901a\u8fc7\u731c\u731c\u731c\u6765\u8fdb\u884c\u4e0d\u65ad\u8bd5\u9519\u7684\u653b\u51fb(\u7406\u60f3\u72b6\u51b5\u4e0b)\u3002\u56fe1\u4e3e\u4e86\u4e2a\u4f8b\u5b50\u3002<\/p>\n<p><!--more--><\/p>\n<p style=\"text-align: center;\">\u3000<a href=\"http:\/\/www.inforsec.org\/wp\/wp-content\/uploads\/2016\/07\/1111.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1010 aligncenter\" src=\"http:\/\/www.inforsec.org\/wp\/wp-content\/uploads\/2016\/07\/1111.png\" alt=\"1111\" width=\"400\" height=\"495\" srcset=\"http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/1111.png 400w, http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/1111-242x300.png 242w, http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/1111-121x150.png 121w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a>\u3000\u56fe1: ASLR\u793a\u4f8b<\/p>\n<p style=\"text-align: center;\">\u3000\u3000(from <a href=\"https:\/\/insanitybit.files.wordpress.com\/2012\/06\/aslr.png\">https:\/\/insanitybit.files.wordpress.com\/2012\/06\/aslr.png<\/a>)<\/p>\n<p><strong>ASLR\u6709\u5565\u95ee\u9898?<\/strong><\/p>\n<p>\u5728\u51fa\u73b0\u4e86\u67d0\u4e9b\u6f0f\u6d1e\uff0c\u6bd4\u5982\u5185\u5b58\u4fe1\u606f\u6cc4\u9732\u7684\u60c5\u51b5\u4e0b\uff0c\u653b\u51fb\u8005\u4f1a\u5f97\u5230\u90e8\u5206\u5185\u5b58\u4fe1\u606f\uff0c\u6bd4\u5982\u67d0\u4e9b\u4ee3\u7801\u6307\u9488\u3002\u4f20\u7edf\u7684ASLR\u53ea\u968f\u673a\u5316\u6574\u4e2asegment\uff0c\u6bd4\u5982\u6808\uff0c\u5806\uff0c\u6216\u8005\u4ee3\u7801\u533a\u3002\u8fd9\u65f6\u5019\u653b\u51fb\u8005\u53ef\u4ee5\u901a\u8fc7\u6cc4\u9732\u7684\u5730\u5740\u4fe1\u606f\u6765\u63a8\u5bfc\u522b\u7684\u4fe1\u606f\uff0c\u6bd4\u5982\u53e6\u5916\u4e00\u4e2a\u51fd\u6570\u7684\u5730\u5740\uff0c\u7b49\u7b49\u3002\u8fd9\u6837\u6574\u4e2asegment\u7684\u5730\u5740\u90fd\u53ef\u4ee5\u63a8\u5bfc\u51fa\u6765\uff0c\u8fdb\u800c\u5f97\u5230\u66f4\u591a\u4fe1\u606f(\u89c1\u56fe2)\uff0c\u5927\u5927\u589e\u52a0\u4e86\u653b\u51fb\u5229\u7528\u7684\u6210\u529f\u7387\u3002\u800c\u4e14\uff0c\u572832\u4f4d\u7cfb\u7edf\u4e2d\uff0c\u7531\u4e8e\u968f\u673a\u7684\u71b5\u503c\u4e0d\u9ad8\uff0c\u653b\u51fb\u8005\u4e5f\u5bb9\u6613\u901a\u8fc7\u7a77\u4e3e\u731c\u51fa\u5730\u5740\u3002<\/p>\n<p><a href=\"http:\/\/www.inforsec.org\/wp\/wp-content\/uploads\/2016\/07\/1112.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1011 aligncenter\" src=\"http:\/\/www.inforsec.org\/wp\/wp-content\/uploads\/2016\/07\/1112.png\" alt=\"1112\" width=\"650\" height=\"488\" srcset=\"http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/1112.png 650w, http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/1112-300x225.png 300w, http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/1112-200x150.png 200w, http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/1112-150x113.png 150w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">\u3000\u3000\u56fe2: \u76ee\u524dASLR\u5982\u4f55\u4e0d\u9760\u8c31<\/p>\n<p><strong>\u5982\u4f55\u6539\u8fdb?<\/strong><\/p>\n<p>\u4e3b\u8981\u7684\u6539\u8fdb\u65b9\u6cd5\uff0c\u4e00\u65b9\u9762\u662f\u9632\u6b62\u5185\u5b58\u4fe1\u606f\u6cc4\u9732\uff0c\u53e6\u4e00\u65b9\u9762\u662f\u589e\u5f3aASLR\u672c\u8eab\u3002\u672c\u6587\u4e3b\u8981\u8ba8\u8bba\u540e\u8005\u3002<\/p>\n<p>1.\u968f\u673a\u5316\u7684\u7c92\u5ea6\u53ef\u4ee5\u6539\u8fdb\u3002\u7c92\u5ea6\u5c0f\u4e86\uff0c\u71b5\u503c\u589e\u52a0\uff0c\u5c31\u5f88\u96be\u731c\u51faROP gadget\u4e4b\u7c7b\u7684\u5185\u5b58\u5757\u5728\u54ea\u91cc\u3002[1](ASLP)\u5728\u51fd\u6570\u7ea7\u8fdb\u884c\u968f\u673a\u5316\uff0c[2](binary stirring)\u5728basic block\u7ea7\u8fdb\u884c\u968f\u673a\u5316\uff0c[3](ILR)\u548c[4](IPR)\u5728\u6307\u4ee4\u7ea7\u3002[3]\u5c06\u6307\u4ee4\u5730\u5740\u8fdb\u884c\u968f\u673a\u5316\uff1b\u800c[4]\u628a\u6307\u4ee4\u4e32\u8fdb\u884c\u91cd\u5199\uff0c\u6765\u66ff\u6362\u6210\u540c\u6837\u957f\u5ea6\uff0c\u5e76\u4e14\u76f8\u540c\u8bed\u4e49\u7684\u6307\u4ee4\u4e32\u3002<\/p>\n<p>2.\u968f\u673a\u5316\u7684\u65b9\u5f0f\u53ef\u4ee5\u6539\u8fdb\u3002[5](Oxymoron)\u89e3\u51b3\u4e86\u5e93\u51fd\u6570\u968f\u673a\u5316\u7684\u91cd\u590d\u95ee\u9898: \u539f\u5148\u5047\u5982\u6bcf\u4e2a\u8fdb\u7a0b\u7684library\u90fd\u8fdb\u884cfine-grained\u7684ASLR\uff0c\u4f1a\u5bfc\u81f4memory\u5f00\u9500\u5f88\u5927\u3002\u8be5\u6587\u7528\u4e86x86\u7684segmentation\u5de7\u5999\u5730\u89e3\u51b3\u4e86\u8fd9\u4e2a\u95ee\u9898\uff1b\u5e76\u4e14\u7531\u4e8e\u5176\u5206\u6bb5\u7279\u6027\uff0c[6](JIT-ROP)\u4e4b\u7c7b\u7684\u653b\u51fb\u4e5f\u5f88\u96be\u6709\u6548\u8bfb\u53d6\u8db3\u591f\u591a\u7684memory\u3002[7](Isomeron)\u5229\u7528\u4e24\u4efddifferently structured but semantically identical\u7684\u7a0b\u5e8fcopy\uff0c\u5728ret\u7684\u65f6\u5019\u6765\u968f\u673a\u5316execution path\uff0c\u968f\u673a\u51b3\u5b9a\u8df3\u5230\u54ea\u4e2a\u7a0b\u5e8fcopy\uff0c\u6709\u6781\u5927\u7684\u6982\u7387\u53ef\u4ee5\u8ba9JIT-ROP\u653b\u51fb\u65e0\u6548\u3002<\/p>\n<p>3.\u968f\u673a\u5316\u7684\u65f6\u95f4(timing)\u53ef\u4ee5\u6539\u8fdb\u3002\u5047\u5982\u7a0b\u5e8f\u4e2d\u5b58\u5728\u80fd\u6cc4\u9732\u5185\u5b58\u7684\u6f0f\u6d1e\uff0c\u90a3\u8fd9\u79cd\u4f20\u7edf\u7684\u3001\u4e00\u6b21\u6027\u7684\u968f\u673a\u5316\u5c31\u767d\u8d39\u4e86\u3002\u6240\u4ee5\u9700\u8981\u8fd0\u884c\u65f6\u52a8\u6001ASLR\u3002[8]\u89e3\u51b3\u4e86fork\u51fa\u6765\u7684\u5b50\u8fdb\u7a0b\u5185\u5b58\u5e03\u5c40\u548c\u7236\u8fdb\u7a0b\u4e00\u6837\u7684\u7f3a\u9677\u3002\u5176\u601d\u8def\u662f\u5728\u6bcf\u6b21fork\u7684\u65f6\u5019\u90fd\u8fdb\u884c\u4e00\u6b21\u968f\u673a\u5316\u3002\u65b9\u6cd5\u662f\u7528Pin\u8fdb\u884ctaint\u8ddf\u8e2a\uff0c\u627e\u5230ASLR\u4e4b\u540e\u8981\u4fee\u590d\u7684\u6307\u9488\u5e76\u8fdb\u884c\u4fee\u590d\u3002\u4e3a\u4e86\u964d\u4f4e\u628a\u6570\u636e\u5f53\u6210\u6307\u9488\u7684false positive\uff0c\u4e00\u4e2adaemon\u8fdb\u7a0b\u4f1a\u8dd1\u591a\u6b21\u6765\u63d0\u53d6\u51fa\u91cd\u5408\u7684\u90e8\u5206\u3002<\/p>\n<p>[9](Remix)\u63d0\u51fa\u4e86\u4e00\u79cd\u5728\u8fd0\u884c\u65f6\u7ec6\u7c92\u5ea6\u968f\u673a\u5316\u7684\u65b9\u6cd5\u3002\u8be5\u65b9\u6cd5\u4ee5basic block\u4e3a\u5355\u4f4d\uff0c\u7ecf\u8fc7\u4e00\u4e2a\u968f\u673a\u7684\u65f6\u95f4\u5bf9\u8fdb\u7a0b(\u6216kernel module)\u672c\u8eab\u8fdb\u884c\u4e00\u6b21\u968f\u673a\u5316(\u56fe3)\u3002\u7531\u4e8e\u51fd\u6570\u6307\u9488\u5f88\u96be\u5b8c\u5168\u786e\u8ba4(\u6bd4\u5982\u88ab\u8f6c\u6362\u6210\u6570\u636e\uff0c\u6216\u8005\u662funion\u7c7b\u578b)\uff0c\u8be5\u65b9\u6cd5\u53ea\u6253\u4e71\u51fd\u6570\u5185\u90e8\u7684basic blocks\u3002\u8be5\u65b9\u6cd5\u53e6\u4e00\u4e2a\u597d\u5904\u662f\u4fdd\u7559\u4e86\u4ee3\u7801\u5757\u7684\u5c40\u90e8\u6027(locality)\uff0c\u56e0\u4e3a\u88ab\u6253\u4e71\u7684basic blocks\u4f4d\u7f6e\u90fd\u5f88\u9760\u8fd1\u3002\u6253\u4e71\u540e\uff0c\u9700\u8981update\u6307\u4ee4\uff0c\u4ee5\u53ca\u6307\u5411basic block\u7684\u6307\u9488\uff0c\u6765\u8ba9\u7a0b\u5e8f\u7ee7\u7eed\u6b63\u786e\u8fd0\u884c\u3002\u5047\u5982\u9700\u8981\u589e\u52a0\u66f4\u591a\u7684\u71b5\u503c\uff0c\u53ef\u4ee5\u5728basic blocks\u4e4b\u95f4\u63d2\u5165\u66f4\u591a\u7684NOP\u6307\u4ee4(\u6216\u8005\u522b\u7684garbage data)\u3002<\/p>\n<p>\u53e6\u4e00\u79cd\u65b9\u6cd5[10]\u662f\u7528\u7f16\u8bd1\u5668\u6765\u5e2e\u52a9\u5b9a\u4f4d\u8981migrate\u7684\u5185\u5b58\u4f4d\u7f6e(\u6307\u9488)\uff0c\u5e76\u4e14\u5728\u6bcf\u6b21\u6709\u8f93\u51fa\u7684\u65f6\u5019\u8fdb\u884c\u52a8\u6001\u968f\u673a\u5316\u3002\u8be5\u65b9\u6cd5\u5bf9\u4e8e\u7f51\u7edc\u5e94\u7528\u6bd4\u5982\u670d\u52a1\u5668\uff0c\u7531\u4e8e\u5176\u662fI\/O-intensive\u7684\u5e94\u7528\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u968f\u673a\u5316\u95f4\u9694\u6781\u77ed\u800c\u6027\u80fd\u5f00\u9500\u5de8\u5927\u3002<\/p>\n<p><a href=\"http:\/\/www.inforsec.org\/wp\/wp-content\/uploads\/2016\/07\/1113.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1012 aligncenter\" src=\"http:\/\/www.inforsec.org\/wp\/wp-content\/uploads\/2016\/07\/1113.png\" alt=\"1113\" width=\"650\" height=\"488\" srcset=\"http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/1113.png 650w, http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/1113-300x225.png 300w, http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/1113-200x150.png 200w, http:\/\/202.112.238.40\/wp\/wp-content\/uploads\/2016\/07\/1113-150x113.png 150w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">\u3000\u3000\u56fe3: Remix:\u4e00\u79cdASLR\u589e\u5f3a\u7684\u65b9\u5411<\/p>\n<p style=\"text-align: center;\">\u3000\u3000(\u6458\u81ea <a href=\"http:\/\/ww2.cs.fsu.edu\/~ychen\/paper\/Remix_slides.pdf\">http:\/\/ww2.cs.fsu.edu\/~ychen\/paper\/Remix_slides.pdf<\/a> )<\/p>\n<p><strong>\u53c2\u8003\u6587\u732e:<\/strong><\/p>\n<p>[1] C. Kil, J. Jun, C. Bookholt, J. Xu, and P. Ning. Address Space Layout Permutation (ASLP): Towards Fine-Grained Randomization of Commodity Software. In Proceedings of the 22nd Annual Computer Security Applications Conference, 2006.<\/p>\n<p>[2] R. Wartell, V. Mohan, K. W. Hamlen, and Z. Lin. Binary Stirring: Self-randomizing Instruction Addresses of Legacy x86 Binary Code. In Proceedings of the 19th ACM Conference on Computer and Communications Security, 2012.<\/p>\n<p>[3] J. Hiser, A. Nguyen-Tuong, M. Co, M. Hall, and J. W. Davidson. ILR: Where\u2019d My Gadgets Go? In Proceedings of the 33rd IEEE Symposium on Security and Privacy, 2012.<\/p>\n<p>[4] V. Pappas, M. Polychronakis, and A. D. Keromytis. Smashing the Gadgets: Hindering Return-Oriented Programming Using In-place Code Randomization. In Proceedings of the 33rd IEEE Symposium on Security and Privacy, 2012.<\/p>\n<p>[5] M. Backes and S. Nurnberger. Oxymoron: Making fine-grained memory randomization practical by allowing code sharing. In Proceedings of the 23rd USENIX Security Symposium, 2014.<\/p>\n<p>[6] K. Z. Snow, F. Monrose, L. Davi, A. Dmitrienko, C. Liebchen, and A.-R. Sadeghi. Just-in-time Code Reuse: On the Effectiveness of Fine-grained Address Space Layout Randomization. In Proceedings of the 34th IEEE Symposium on Security and Privacy, 2013.<\/p>\n<p>[7] L. Davi, C. Liebchen, A.-R. Sadeghi, K. Z. Snow, and F. Monrose. Isomeron: Code randomization resilient to (just-in-time) return-oriented programming. In Proceedings of the 22nd Network and Distributed Systems Security Symposium, 2015.<\/p>\n<p>[8] K. Lu, S. Nurnberger, M. Backes and W. Lee. How to Make ASLR Win the Clone Wars: Runtime Re-Randomization. In Proceedings of the 23rd Network and Distributed Systems Security Symposium, 2016.<\/p>\n<p>[9] Y. Chen, Z. Wang, D. Whalley and L. Lu. Remix: On-demand live randomization. In Proceedings of the Sixth ACM Conference on Data and Application Security and Privacy, 2016.<\/p>\n<p>[10] D. Bigelow, T. Hobson, R. Rudd, W. Streilein, and H. Okhravi. Timely rerandomization for mitigating memory disclosures. In ACM SIGSAC Conference on Computer and Communications Security, 2015.<\/p>\n<p><strong>\u4f5c\u8005\u7b80\u4ecb:<\/strong><\/p>\n<p>Yue CHEN, Florida State University \uff0c\u535a\u58eb\u5728\u8bfb\u3002\u4e2a\u4eba\u4e3b\u9875\uff1a<a href=\"http:\/\/yuechen.me\">http:\/\/yuechen.me<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005\uff1aYue CHEN, Florida State University Address Spac&#8230; <a class=\"continue-reading-link\" href=\"http:\/\/202.112.238.40\/wp\/?p=1009\"> 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-1009","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\/1009","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=1009"}],"version-history":[{"count":8,"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1009\/revisions"}],"predecessor-version":[{"id":1020,"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1009\/revisions\/1020"}],"wp:attachment":[{"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1009"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/202.112.238.40\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}