{"id":18474,"date":"2014-09-26T14:43:35","date_gmt":"2014-09-26T06:43:35","guid":{"rendered":"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/09\/26\/centos-5-x-6-x-7-bash-%e6%bc%8f%e6%b4%9e%e6%aa%a2%e6%b8%ac%e5%8f%8a%e4%bf%ae%e6%ad%a3\/"},"modified":"2021-03-18T17:24:04","modified_gmt":"2021-03-18T09:24:04","slug":"centos-5-x-6-x-7-bash-%e6%bc%8f%e6%b4%9e%e6%aa%a2%e6%b8%ac%e5%8f%8a%e4%bf%ae%e6%ad%a3","status":"publish","type":"post","link":"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/09\/26\/centos-5-x-6-x-7-bash-%e6%bc%8f%e6%b4%9e%e6%aa%a2%e6%b8%ac%e5%8f%8a%e4%bf%ae%e6%ad%a3\/","title":{"rendered":"CentOS 5.x \/ 6.x \/ 7 bash \u6f0f\u6d1e\u6aa2\u6e2c\u53ca\u4fee\u6b63"},"content":{"rendered":"<p>\u53c3\u8003\u7db2\u7ad9\uff1a<a href=\"http:\/\/jamyy.us.to\/blog\/2014\/09\/6721.html\" target=\"_blank\" rel=\"noopener noreferrer\">bash \u6f0f\u6d1e\u6aa2\u6e2c\u8207\u4fee\u88dc \u00ab Jamyy&#8217;s Weblog<\/a><\/p>\n<p>bash \u7684\u6f0f\u6d1e\u9020\u6210\u7684\u5371\u5bb3\uff0c\u8acb\u53c3\u8003\uff1a<br \/><a href=\"http:\/\/myfirefox.com.tw\/posts\/30628\/Unix%E4%BA%AE%E7%B4%85%E7%87%88%EF%BC%81%E5%A4%A7%E6%BC%8F%E6%B4%9E%E3%80%8CShellshock%E3%80%8D%E5%8F%AF%E6%83%A1%E6%84%8F%E6%8C%BE%E6%8C%81%E9%9B%BB%E8%85%A6%E7%B3%BB%E7%B5%B1\/\" target=\"_blank\" rel=\"noopener noreferrer\">MyFirefox | Unix\u4eae\u7d05\u71c8\uff01\u5927\u6f0f\u6d1e\u300cShellshock\u300d\u53ef\u60e1\u610f\u633e\u6301\u96fb\u8166\u7cfb\u7d71<\/a><\/p>\n<p>CentOS 5.x<br \/># <span style=\"color: #ff0000\">cat \/etc\/redhat-release<\/span><br \/><span style=\"color: #0000ff\">CentOS release 5.10 (Final)<\/span><\/p>\n<p>\u76ee\u524d\u5b89\u88dd bash \u5957\u4ef6<br \/># <span style=\"color: #ff0000\">rpm -qa | grep bash<\/span><br \/><span style=\"color: #0000ff\">bash-3.2-32.el5_9.1<\/span><\/p>\n<p>bash \u7248\u672c<br \/># <span style=\"color: #ff0000\">bash &#8211;version<\/span><br \/><span style=\"color: #0000ff\">GNU bash, version 3.2.25(1)-release (i386-redhat-linux-gnu)<\/span><br \/><span style=\"color: #0000ff\">Copyright (C) 2005 Free Software Foundation, Inc.<\/span><\/p>\n<p>\u6aa2\u67e5\u662f\u5426\u6709\u6f0f\u6d1e(<span style=\"color: #ff0000\">\u6709<\/span>)<br \/># <span style=\"color: #ff0000\">env x='() { :;}; echo vulnerable&#8217; bash -c &#8220;echo this is a test&#8221;<\/span><br \/><span style=\"color: #0000ff\">vulnerable<\/span><br \/><span style=\"color: #0000ff\">this is a test<\/span><\/p>\n<p>\u66f4\u65b0\u4e4b\u5f8c\u7684 bash \u5957\u4ef6<br \/># <span style=\"color: #ff0000\">rpm -qa | grep bash<\/span><br \/><span style=\"color: #0000ff\">bash-3.2-33.el5.1<\/span><br \/>\u6216<br \/><span style=\"color: #0000ff\">bash-3.2-33.el5_10.4<\/span><\/p>\n<p>bash \u7248\u672c<br \/># <span style=\"color: #ff0000\">bash &#8211;version<\/span><br \/><span style=\"color: #0000ff\">GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)<\/span><br \/><span style=\"color: #0000ff\">Copyright (C) 2005 Free Software Foundation, Inc.<\/span><\/p>\n<p>\u6aa2\u67e5\u662f\u5426\u6709\u6f0f\u6d1e(<span style=\"color: #ff0000\">\u7121<\/span>)<br \/># <span style=\"color: #ff0000\">env x='() { :;}; echo vulnerable&#8217; bash -c &#8220;echo this is a test&#8221;<\/span><br \/><span style=\"color: #0000ff\">bash: warning: x: ignoring function definition attempt<\/span><br \/><span style=\"color: #0000ff\">bash: error importing function definition for `x&#8217;<\/span><br \/><span style=\"color: #0000ff\">this is a test<\/span>[@more@]CentOS 6.x<br \/># <span style=\"color: #ff0000\">cat \/etc\/redhat-release<\/span><br \/><span style=\"color: #0000ff\">CentOS release 6.5 (Final)<\/span><\/p>\n<p>bash \u7248\u672c<br \/># <span style=\"color: #ff0000\">bash &#8211;version<\/span><br \/><span style=\"color: #0000ff\">GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)<\/span><\/p>\n<p>\u6aa2\u67e5\u662f\u5426\u6709\u6f0f\u6d1e(<span style=\"color: #ff0000\">\u7121<\/span>)<br \/># <span style=\"color: #ff0000\">env x='() { :;}; echo vulnerable&#8217; bash -c &#8220;echo this is a test&#8221;<\/span><br \/><span style=\"color: #0000ff\">bash: warning: x: ignoring function definition attempt<\/span><br \/><span style=\"color: #0000ff\">bash: \u932f\u8aa4\uff0c\u8f38\u5165\u7684\u51fd\u6578\u5b9a\u7fa9\u70ba `x&#8217;<\/span><br \/><span style=\"color: #0000ff\">this is a test<\/span><\/p>\n<p>\u66f4\u65b0\u4e4b\u5f8c\u7684 bash \u5957\u4ef6<br \/># <span style=\"color: #ff0000\">rpm -qa | grep bash<\/span><br \/><span style=\"color: #0000ff\">bash-4.1.2-15.el6_5.2.i686<\/span><br \/><span style=\"color: #0000ff\">bash-4.1.2-15.el6_5.2.x86_64<\/span><\/p>\n<p>CentOS 7.x<br \/># <span style=\"color: #ff0000\">cat \/etc\/redhat-release<\/span><br \/><span style=\"color: #0000ff\">CentOS Linux release 7.0.1406 (Core)<\/span><\/p>\n<p>\u76ee\u524d\u5b89\u88dd bash \u5957\u4ef6<br \/># <span style=\"color: #ff0000\">rpm -qa | grep bash<\/span><br \/><span style=\"color: #0000ff\">bash-4.2.45-5.el7.x86_64<\/span><br \/><span style=\"color: #0000ff\">bash-completion-2.1-6.el7.noarch<\/span><\/p>\n<p>\u76ee\u524d bash \u7684\u7248\u672c<br \/># <span style=\"color: #ff0000\">bash &#8211;version<\/span><br \/><span style=\"color: #0000ff\">GNU bash, version 4.2.45(1)-release (x86_64-redhat-linux-gnu)<\/span><br \/><span style=\"color: #0000ff\">Copyright (C) 2011 Free Software Foundation, Inc.<\/span><\/p>\n<p>\u6aa2\u67e5\u662f\u5426\u6709\u6f0f\u6d1e(<span style=\"color: #ff0000\">\u6709<\/span>)<br \/># <span style=\"color: #ff0000\">env x='() { :;}; echo vulnerable&#8217; bash -c &#8220;echo this is a test&#8221;<\/span><br \/><span style=\"color: #0000ff\">vulnerable<\/span><br \/><span style=\"color: #0000ff\">this is a test<\/span><\/p>\n<p>\u66f4\u65b0\u4e4b\u5f8c\u7684 bash \u5957\u4ef6<br \/># <span style=\"color: #ff0000\">rpm -qa | grep bash<\/span><br \/><span style=\"color: #0000ff\">bash-4.2.45-5.el7_0.4.x86_64<\/span><br \/><span style=\"color: #0000ff\">bash-completion-2.1-6.el7.noarch<\/span><\/p>\n<p>\u66f4\u65b0\u4e4b\u5f8c\u7684 bash \u7248\u672c<br \/># <span style=\"color: #ff0000\">bash &#8211;version<\/span><br \/><span style=\"color: #0000ff\">GNU bash, version 4.2.45(1)-release (x86_64-redhat-linux-gnu)<\/span><\/p>\n<p>\u51fa\u73fe\u9019\u6a23\uff0c\u4e0d\u77e5\u9053\u6709\u6c92\u6709\u4fee\u88dc\u5b8c\u6210(<span style=\"color: #ff0000\">?<\/span>)\uff0c\u4f46\u61c9\u8a72\u662f\u6709\u4fee\u6b63\u5b8c\u6210<br \/># <span style=\"color: #ff0000\">env x='() { :;}; echo vulnerable&#8217; bash -c &#8220;echo this is a test&#8221;<\/span><br \/><span style=\"color: #0000ff\">this is a test<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53c3\u8003\u7db2\u7ad9\uff1abash \u6f0f\u6d1e\u6aa2\u6e2c\u8207\u4fee\u88dc \u00ab Jamyy&#8217;s Weblog bash \u7684\u6f0f\u6d1e\u9020\u6210\u7684\u5371\u5bb3\uff0c &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/2blog.ilc.edu.tw\/25793\/2014\/09\/26\/centos-5-x-6-x-7-bash-%e6%bc%8f%e6%b4%9e%e6%aa%a2%e6%b8%ac%e5%8f%8a%e4%bf%ae%e6%ad%a3\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008CentOS 5.x \/ 6.x \/ 7 bash \u6f0f\u6d1e\u6aa2\u6e2c\u53ca\u4fee\u6b63\u3009<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117,132],"tags":[],"class_list":["post-18474","post","type-post","status-publish","format-standard","hentry","category-c-78462","category-c-78477"],"meta_key":{"_pingme":["1"],"_encloseme":["1"],"lt_post_id":["519790"]},"_links":{"self":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18474"}],"collection":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/comments?post=18474"}],"version-history":[{"count":1,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18474\/revisions"}],"predecessor-version":[{"id":20116,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/posts\/18474\/revisions\/20116"}],"wp:attachment":[{"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/media?parent=18474"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/categories?post=18474"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2blog.ilc.edu.tw\/25793\/wp-json\/wp\/v2\/tags?post=18474"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}