
{"id":65,"date":"2014-09-26T08:47:41","date_gmt":"2014-09-26T08:47:41","guid":{"rendered":"http:\/\/www.miscstuff.org.uk\/?p=65"},"modified":"2024-08-19T10:29:23","modified_gmt":"2024-08-19T10:29:23","slug":"how-to-test-back-for-shellshock-vulnerability","status":"publish","type":"post","link":"https:\/\/miscstuff.org.uk\/?p=65","title":{"rendered":"How to test bash for Shellshock vulnerability"},"content":{"rendered":"<p>To test if your version of Bash is vulnerable to this issue, run the following command:<\/p>\n<blockquote><p><strong>$ env x='() { :;}; echo vulnerable&#8217; bash -c &#8220;echo this is a test&#8221;<\/strong><\/p><\/blockquote>\n<p>If the output of the above command looks as follows:<\/p>\n<blockquote><p><strong>vulnerable<\/strong><br \/>\n<strong> this is a test<\/strong><\/p><\/blockquote>\n<p>you are using a vulnerable version of Bash. The patch used to fix this issue ensures that no code is allowed after the end of a Bash function. Thus, if you run the above example with the patched version of Bash, you should get an output similar to:<\/p>\n<blockquote><p><strong>$ env x='() { :;}; echo vulnerable&#8217; bash -c &#8220;echo this is a test&#8221;<\/strong><br \/>\n<strong> bash: warning: x: ignoring function definition attempt<\/strong><br \/>\n<strong> bash: error importing function definition for `x&#8217;<\/strong><br \/>\n<strong> this is a test<\/strong><\/p><\/blockquote>\n<p><!--more--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To test if your version of Bash is vulnerable to this issue, run the following command: $ env x='() {<\/p>\n<div class=\"read-button read_more_btn_text\"><a class=\"read_more\" href=\"https:\/\/miscstuff.org.uk\/?p=65\">Read Now<span class=\"arrow_readm\"> &#x25BA;<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,33,6],"tags":[16,29,34],"class_list":["post-65","post","type-post","status-publish","format-standard","hentry","category-linux","category-network-security","category-pc","tag-linux","tag-pc","tag-security"],"_links":{"self":[{"href":"https:\/\/miscstuff.org.uk\/index.php?rest_route=\/wp\/v2\/posts\/65"}],"collection":[{"href":"https:\/\/miscstuff.org.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/miscstuff.org.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/miscstuff.org.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/miscstuff.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65"}],"version-history":[{"count":2,"href":"https:\/\/miscstuff.org.uk\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":67,"href":"https:\/\/miscstuff.org.uk\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions\/67"}],"wp:attachment":[{"href":"https:\/\/miscstuff.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/miscstuff.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/miscstuff.org.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}