{"id":1117,"date":"2014-10-13T18:42:51","date_gmt":"2014-10-13T18:42:51","guid":{"rendered":"http:\/\/cyber-cottage.co.uk\/en\/?p=1109"},"modified":"2014-11-13T21:28:57","modified_gmt":"2014-11-13T21:28:57","slug":"elastix-2-4-ari-vulnerability-patch","status":"publish","type":"post","link":"https:\/\/www.cyber-cottage.co.uk\/?p=1117","title":{"rendered":"Elastix 2.4 ARI vulnerability Patch"},"content":{"rendered":"<p>The recent vulnerability in the Asterisk and Freepbx ARI login.php file is not addressed in an update to ARI in the unembedded freepbx on Elastix 2.4.<\/p>\n<p>This will mean that your systems will still be vulnerable.<\/p>\n<p>We have produced a patch that you can apply to address this. The patch can be downloaded \u00a0from\u00a0<a href=\"https:\/\/s3.amazonaws.com\/filesandpatches\/ari.patch\" target=\"_blank\">https:\/\/s3.amazonaws.com\/filesandpatches\/ari.patch<\/a> and applied as detailed below.<\/p>\n<p>logon to the server console<\/p>\n<pre>cd \/var\/www\/html\/recordings\/includes\r\ncp login.php \/root\/login.php.ari\r\nwget https:\/\/s3.amazonaws.com\/filesandpatches\/ari.patch\r\npatch &lt; ari.patch \r\n\r\nThen to check either login to server ARI interface or \r\n\r\ncat login.php |grep json\r\n\r\nand you should get the following output\r\n\r\n$buf = json_decode($_COOKIE['ari_auth'],true);\r\n$data = json_decode($crypt-&gt;decrypt($data,$ARI_CRYPT_PASSWORD),true);\r\n$data = $crypt-&gt;encrypt(json_encode($data),$ARI_CRYPT_PASSWORD);\r\n$buf = json_encode(array($data,$chksum));\r\n\r\n\r\nalso check to see if you have the file in the fw_ari directory.\r\n\r\nls -l \/var\/www\/html\/admin\/modules\/fw_ari\/htdocs_ari\/includes\r\n\r\nif there is a login.php there then copy over the patched version.\r\n\r\ncp \/var\/www\/html\/recordings\/includes\/login.php  \/var\/www\/html\/admin\/modules\/fw_ari\/htdocs_ari\/includes\/login.php\r\n\r\nAfter these actions check that the file ownership is still correct\r\n\r\nif not \r\n\r\nchown asterisk:asterisk \/var\/www\/html\/recordings\/includes\/login.php \r\n\r\n<\/pre>\n<p>This patch also applies to any older version of ARI out there.<\/p>\n<p>also to be on the lookout for two suspicious files, named &#8220;c.sh&#8221; or &#8220;c2.pl&#8221; respectively. If you see these two files remove them immediately!<\/p>\n<p>More details here.\u00a0<a href=\"http:\/\/community.freepbx.org\/t\/critical-freepbx-rce-vulnerability-all-versions-cve-2014-7235\/24536\" target=\"_blank\">http:\/\/community.freepbx.org\/t\/critical-freepbx-rce-vulnerability-all-versions-cve-2014-7235\/24536<\/a>\u00a0or here\u00a0<a href=\"http:\/\/support.freepbx.org\/node\/92822\" target=\"_blank\">http:\/\/support.freepbx.org\/node\/92822<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The recent vulnerability in the Asterisk and Freepbx ARI login.php file is not addressed in an update to ARI in the unembedded freepbx on Elastix 2.4. This will mean that your systems will still be vulnerable. We have produced a patch that you can apply to address this. The patch can be downloaded \u00a0from\u00a0https:\/\/s3.amazonaws.com\/filesandpatches\/ari.patch and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":614,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"content-type":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[88,89,11,82],"tags":[23,35,40,51,68,100,76,77],"class_list":["post-1117","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-astsupport","category-elxsupport","category-knowledge","category-security-knowledge","tag-asterisk","tag-elastix","tag-freepbx","tag-linux","tag-security","tag-technical","tag-voip","tag-xorcom"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.cyber-cottage.co.uk\/wp-content\/uploads\/2013\/02\/elastix240_en-e1360679504337.png?fit=227%2C220&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p5daZy-i1","jetpack_sharing_enabled":true,"jetpack_likes_enabled":false,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.cyber-cottage.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cyber-cottage.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cyber-cottage.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cyber-cottage.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cyber-cottage.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1117"}],"version-history":[{"count":1,"href":"https:\/\/www.cyber-cottage.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1117\/revisions"}],"predecessor-version":[{"id":1266,"href":"https:\/\/www.cyber-cottage.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1117\/revisions\/1266"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cyber-cottage.co.uk\/index.php?rest_route=\/wp\/v2\/media\/614"}],"wp:attachment":[{"href":"https:\/\/www.cyber-cottage.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cyber-cottage.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cyber-cottage.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}