{"id":23488,"date":"2014-09-25T23:43:54","date_gmt":"2014-09-25T14:43:54","guid":{"rendered":"http:\/\/www.softantenna.com\/wp\/?p=23488"},"modified":"2014-09-25T23:43:54","modified_gmt":"2014-09-25T14:43:54","slug":"bash-shell-shock","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/bash-shell-shock\/","title":{"rendered":"Mac OS X\u306b\u3082\u5f71\u97ff\u3001Bash\u306b\u30e4\u30d0\u3059\u304e\u308b\u8106\u5f31\u6027\u300cShellShock\u300d\u304c\u767a\u898b\u3055\u308c\u308b"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2014\/09\/blogterminal.jpg\" alt=\"Terminal\" title=\"terminal.jpg\" border=\"0\" width=\"546\" height=\"314\" \/><\/p>\n<p>Linux\/BSD\/Mac\u306a\u3069\u3001UNIX\u7cfb\u306eOS\u3067\u5fc5\u305a\u4f7f\u308f\u308c\u3066\u3044\u308b\u3068\u3044\u3063\u3066\u3082\u904e\u8a00\u3067\u306f\u306a\u3044\u57fa\u672c\u7684\u306a\u30bd\u30d5\u30c8\u300cGNU Bash\u300d\u306b\u91cd\u5927\u306a\u8106\u5f31\u6027\u3001\u901a\u79f0\u300c<span class=\"myboldred\">ShellShock<\/span>\u300d\u304c\u767a\u898b\u3055\u308c\u307e\u3057\u305f(<a href=\"https:\/\/access.redhat.com\/articles\/1200223\">CVE-2014-6271<\/a>\u3001<a href=\"http:\/\/security.slashdot.jp\/story\/14\/09\/25\/0557233\/\">slashdot\u65e5\u672c\u7248<\/a>\u3001<a href=\"http:\/\/www.itmedia.co.jp\/enterprise\/articles\/1409\/25\/news042.html\">ITmedia<\/a>)\u3002<\/p>\n<p>\u3053\u306e\u8106\u5f31\u6027\u306f\u3001bash\u306e\u74b0\u5883\u5909\u6570\u306b\u5b9a\u306e\u7d30\u5de5\u3092\u65bd\u3057\u305f\u6587\u5b57\u5217\u3092\u6e21\u3059\u3053\u3068\u3067\u3001\u4efb\u610f\u306e\u30b3\u30de\u30f3\u30c9\u304c\u5b9f\u884c\u3067\u304d\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u304b\u306a\u308a\u6df1\u523b\u306a\u3082\u306e\u3002CGI\u30b9\u30af\u30ea\u30d7\u30c8\u3084OpenSSH\u7d4c\u7531\u3067\u653b\u6483\u3055\u308c\u308b\u5371\u967a\u6027\u304c\u3042\u308b\u306e\u3067\u53b3\u91cd\u306a\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>\u539f\u56e0\u306b\u95a2\u3057\u3066\u4ee5\u4e0b\u306e\u30d6\u30ed\u30b0\u304c\u8a73\u3057\u3044\u3067\u3059\u3002<\/p>\n<ul>\n<li><a href=\"http:\/\/blog.ueda.asia\/?p=3967\">\u5148\u7a0b\u304b\u3089\u9a12\u304e\u306b\u306a\u3063\u3066\u3044\u308bbash\u306e\u8106\u5f31\u6027\u306b\u3064\u3044\u3066<\/a><\/li>\n<li><a href=\"http:\/\/www.walbrix.com\/jp\/blog\/2014-09-bash-code-injection.html\">BASH\u306e\u8106\u5f31\u6027\u3067CGI\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u30a2\u30ec\u3055\u305b\u3066\u307f\u307e\u3057\u305f<\/a><\/li>\n<\/ul>\n<p>\u8106\u5f31\u6027\u306e\u78ba\u8a8d\u65b9\u6cd5\u3084\u5bfe\u7b56\u3092\u307e\u3068\u3081\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p><!--more--><\/p>\n<h3>\u78ba\u8a8d\u65b9\u6cd5<\/h3>\n<p><a href=\"http:\/\/unix.stackexchange.com\/questions\/157329\/what-does-env-x-something-bash-c-command-do-and-why-is-it-insecure\">StackExchange<\/a>\u306b\u304b\u304b\u308c\u3066\u3042\u308b\u65b9\u6cd5\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>\n$ env x='() { :;}; echo vulnerable' bash -c \"echo this is a test\"\nvulnerable\nthis is a test\n<\/pre>\n<p>\u300cvulnerable\u300d\u3068\u8868\u793a\u3055\u308c\u305f\u3089\u3001\u8106\u5f31\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre>\n$ env x='() { :;}; echo vulnerable' bash -c \"echo this is a test\"\nbash: warning: x: ignoring function definition attempt\nbash: error importing function definition for `x'\nthis is a test\n<\/pre>\n<p>\u300cbash: warning: \u300d\u3068\u8868\u793a\u3055\u308c\u305f\u3089\u3001\u8106\u5f31\u6027\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<h3>\u5bfe\u7b56: Linux\u306e\u5834\u5408\u4fee\u6b63\u7248bash\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>RedHat(CentOS)\u3001Debian\u306a\u3069\u306e\u30e1\u30b8\u30e3\u30fc\u306aLinux\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u4e0d\u5177\u5408\u5bfe\u7b56\u7248\u306ebash\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u306e\u304c\u7c21\u5358\u3067\u3059\u3002\u4f8b\u3048\u3070RedHat\u7cfb\u306e\u5834\u5408\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u4fee\u6b63\u7248bash\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>\n$ yum update bash\n<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u518d\u8d77\u52d5\u3057\u3001\u5148\u307b\u3069\u306e\u30b3\u30de\u30f3\u30c9\u3067\u78ba\u8a8d\u3057\u307e\u3059\u3002\u300cbash: warning: \u300d\u3068\u8868\u793a\u3055\u308c\u308c\u3070OK\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2014\/09\/blog1.-My-VPS.jpg\" alt=\"1 My VPS\" title=\"1. My VPS.jpg\" border=\"0\" width=\"546\" height=\"314\" \/><\/p>\n<h3>\u5bfe\u7b56: Mac\u306e\u5834\u5408\u610f\u898b\u304c\u5225\u308c\u308b<\/h3>\n<p>Mac\u306e\u5834\u5408\u3001Homebrew\u3084MacPorts\u306ebash\u306f\u4fee\u6b63\u7248\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u308c\u305e\u308c\u306e\u65b9\u6cd5\u3067\u6700\u65b0\u7248\u306b\u66f4\u65b0\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u554f\u984c\u306fApple\u304c\u63d0\u4f9b\u3057\u3066\u3044\u308bbash(\/bin\/bash)\u3067\u3001\u307e\u3060\u4fee\u6b63\u7248\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u30d1\u30c3\u30c1\u3092\u5f53\u3066\u305fbash\u3092\u81ea\u5206\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u7f6e\u304d\u63db\u3048\u308b\u304b(<a href=\"http:\/\/applech2.com\/archives\/41014500.html\">Apple\u3061\u3083\u3093\u306d\u308b<\/a>\u3001<a href=\"http:\/\/qiita.com\/syui\/items\/809c1cd8ed57c8cdb055\">Qiita<\/a>)\u3001\u8106\u5f31\u6027\u306b\u6ce8\u610f\u3057\u3064\u3064\u516c\u5f0f\u4fee\u6b63\u7248\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u308c\u308b\u307e\u3067\u5f85\u3064\u3068\u3044\u3046\u65b9\u6cd5\u304c\u8003\u3048\u3089\u308c\u307e\u3059\u3002Mac\u3092\u30b5\u30fc\u30d0\u30fc\u7528\u9014\u3067\u4f7f\u3063\u3066\u3044\u308b\u306a\u3089\u3070\u5bfe\u7b56\u3092\u884c\u3063\u305f\u65b9\u304c\u826f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>Apple\u516c\u5f0f\u4fee\u6b63\u7248\u306ebash\u306e\u65e9\u671f\u30ea\u30ea\u30fc\u30b9\u306b\u671f\u5f85\u3067\u3059\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\/BSD\/Mac\u306a\u3069\u3001UNIX\u7cfb\u306eOS\u3067\u5fc5\u305a\u4f7f\u308f\u308c\u3066\u3044\u308b\u3068\u3044\u3063\u3066\u3082\u904e\u8a00\u3067\u306f\u306a\u3044\u57fa\u672c\u7684\u306a\u30bd\u30d5\u30c8\u300cGNU Bash\u300d\u306b\u91cd\u5927\u306a\u8106\u5f31\u6027\u3001\u901a\u79f0\u300cShellShock\u300d\u304c\u767a\u898b\u3055\u308c\u307e\u3057\u305f(CVE-2014-6271\u3001slas [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":23486,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[75],"tags":[1360],"class_list":["post-23488","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-bash"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/23488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=23488"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/23488\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/23486"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=23488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=23488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=23488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}