{"id":20262,"date":"2022-10-03T21:20:58","date_gmt":"2022-10-04T05:20:58","guid":{"rendered":"http:\/\/www.palada.net\/index.php\/2022\/10\/03\/news-13995\/"},"modified":"2022-10-03T21:20:58","modified_gmt":"2022-10-04T05:20:58","slug":"news-13995","status":"publish","type":"post","link":"https:\/\/www.palada.net\/index.php\/2022\/10\/03\/news-13995\/","title":{"rendered":"Two Exchange Server vulns veer dangerously close to ProxyShell"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/10\/shutterstock_737724292.jpg\"\/><\/p>\n<p><strong>Credit to Author: Angela Gunn| Date: Mon, 03 Oct 2022 22:03:02 +0000<\/strong><\/p>\n<div class=\"entry-content lg:prose-lg mx-auto prose max-w-4xl\" width=\"100%\" height=\"420\">\n<p>Though the Patch Tuesday release for October 11 is still taking shape at Microsoft, Exchange could be a major focus point that day &#8212; if not sooner. A pair of chained web-shell vulnerabilities affecting versions 2013, 2016, and 2019 of Exchange Server, with an assist from the frequently abused PowerShell, appears to be a valid attack combination. After public disclosure of the exploit by security firm GTSC, Microsoft issued guidance on the issue (which they describe as limited and targeted, but real) ahead of the usual fix cadence.<\/p>\n<p>Sophos customers are already protected. To supplement existing proactive runtime protections, we also released new network IPS signatures and endpoint anti-malware detections: IPS signature sid:2307757 for both Sophos Endpoint IPS and Sophos XG Firewall, as well as Troj\/WebShel-EC and Troj\/WebShel-ED to detect the \u201cweb shells\u201d associated with the attacks reported. (Please see the chart at the end of this article for a complete list of updates.) In addition, based on public reports, the behavioral detection rule Exec_30a was designed to stop PowerShell abuse from IIS, while the Lateral_1b rule blocks the certutil download command lines &#8212; both tactics reportedly associated with these attacks.<\/p>\n<p>Sophos X-Ops\u2019 investigation has determined that Microsoft correctly identifies this as targeting a specific and small set of victims, so much so that we find no evidence of these attacks in our own database so far. However, the attack is now public knowledge, which means other attackers will attempt to adopt and use it. We therefore advise customers to follow the mitigation advice provided, and to apply Microsoft\u2019s patch as soon as it is available.<\/p>\n<p>To aid administrators, the Exchange team has <a href=\"https:\/\/techcommunity.microsoft.com\/t5\/exchange-team-blog\/customer-guidance-for-reported-zero-day-vulnerabilities-in\/ba-p\/3641494\">released<\/a> a PowerShell <a href=\"https:\/\/microsoft.github.io\/CSS-Exchange\/Security\/EOMTv2\/\">script<\/a> to apply the suggested fixes automatically. For customers who have the company\u2019s <a href=\"https:\/\/techcommunity.microsoft.com\/t5\/exchange-team-blog\/new-security-feature-in-september-2021-cumulative-update-for\/ba-p\/2783155\">Exchange Emergency Mitigation Service<\/a> (EEMS) enabled, Microsoft has also released the URL Rewrite mitigation for Exchange Server 2016 and Exchange Server 2019, which the company says will be enabled automatically. Finally, Microsoft recommends that enterprises disable non-admin access rights for PowerShell in their organizations if possible.<\/p>\n<p>Specifically, Microsoft says the two vulnerabilities involved in this are CVE-2022-41040, a Server-Side Request Forgery (SSRF) vulnerability, and CVE-2022-41082, a vulnerability that allows remote code execution (RCE) when PowerShell is accessible to the attacker.<\/p>\n<p>A Server-Side Request Forgery (SSRF) vulnerability can enable an attacker to make the vulnerable server access or manipulate information or services that the server normally shouldn\u2019t be able to, via a malicious URL. For example, an attacker could use a SSRF vulnerability to instruct a server to access a file on a web server they normally wouldn\u2019t be able to access. It\u2019s notable that another Exchange SSRF vulnerability, CVE-2021-26855, was the key entry point for the attacks against Exchange in 2021. In these latest reported attacks, it appears that the new SSRF vulnerability, CVE-2022-41040, serves the same purpose: acting as the front door for attack.<\/p>\n<p>Similar to last year\u2019s ProxyShell, the new attack appears to be accomplished by chaining one exploit against the SSRF vulnerability with one utilizing another vulnerability. In last year\u2019s attacks, the SSRF vulnerability CVE-2021-26855 was chained with CVE-2021-26857 to elevate privileges, after which either CVE-2021-26858 or CVE-2021-27065 was used to execute code on the system. In this case, the SSRF vulnerability CVE-2022-41040 is chained to CVE-2022-41082, which as described above provides remote code execution through PowerShell if that is available to the attacker. Interestingly, this particular attack chain doesn\u2019t require an additional elevation of privilege vulnerability, presumably because CVE-2022-41082 can be executed with SYSTEM privileges.<\/p>\n<p>Based on the report from GTSC, once the attack chain of CVE-2022-41040 + CVE-2022-41082 has been executed, the attackers use this chain to load web shells on the compromised systems, giving them full control of the server and a foothold on the network.<\/p>\n<p>While CVE-2022-41040 requires a user to be authenticated, in practical terms for many Exchange installations this is a low bar, especially those running Outlook Web Access (OWA).<\/p>\n<p>The not-so-good news is that attackers have a head start on utilization \u2013 and Microsoft may or may not have known about that. On Twitter, Kevin Beaumont\u2019s <a href=\"https:\/\/twitter.com\/GossiTheDog\/status\/1575580072961982464\">thread<\/a> discussing attack reports points to an <a href=\"https:\/\/www.gteltsc.vn\/blog\/warning-new-attack-campaign-utilized-a-new-0day-rce-vulnerability-on-microsoft-exchange-server-12715.html\">August 2022 dive<\/a> into these vulnerabilities posted by researchers affiliated with GTSC, who in turn reported the issues to the venerable ZDI bug-bounty program. The bugs were disclosed to Microsoft in the usual fashion, but GTSC \u2013 seeing more customers of their SOC affected by the attack, and with no word on a forthcoming patch \u2013 decided to present what they know to the public at large.<\/p>\n<p>GTSC\u2019s own discovery came when SOC analysts spotted exploit requests in IIS logs that were identical in format to those left by the ProxyShell vuln. Since initial reports of the two vulnerabilities came up, managed detection and response services around the world (including Sophos\u2019 own MTR) have hustled to check their logs more closely than ever for traces of trouble \u2013 one of the reasons that we deem Microsoft\u2019s claim of \u201climited, targeted\u201d attacks likely to be accurate so far.<\/p>\n<p>In its own statement, Microsoft states that the necessary fixes are on an \u201caccelerated timeline,\u201d which usually means that the Redmond company is hurrying to get a patch or patches out the door as soon as possible \u2013 perhaps before the scheduled October 11 Patch Tuesday release.<\/p>\n<p>It\u2019s possible, whatever happens with these two bugs, that there will still be plenty of Exchange activity in the regular Patch Tuesday haul over the next few months. Though it took no patches in September, Exchange saw six fixes in August (including two Critical-class elevation-of-privilege vulns found by external researchers and an information-disclosure 0day) \u2013 precisely half of the product\u2019s 12 patches so far this year. 2021 was also a difficult year for Exchange Server, so much so that Microsoft was compelled to <a href=\"https:\/\/techcommunity.microsoft.com\/t5\/exchange-team-blog\/exchange-server-roadmap-update\/ba-p\/3421389\">delay release<\/a> of the next version of the product, scheduled that year, to the latter half of 2025. This year, the number of vulnerabilities in Exchange has been dwarfed by the volume addressed in Windows (or even Azure), but Exchange is harder to patch \u2013 leaving a high percentage of servers exposed to older bugs (including the ProxyShell bug, which was patched in mid-2021).<\/p>\n<p>The XG and SG sigpacks have been updated as follows to provide coverage for Exchange Server vulnerabilities CVE-2022-41040 and CVE-2022-41082:<\/p>\n<p>&nbsp;<\/p>\n<p>You can also learn more about these attack in <a href=\"https:\/\/nakedsecurity.sophos.com\/2022\/10\/01\/s3-ep102-5-proxynotshell-exchange-bugs-an-expert-speaks-audio-text\/\">this episode<\/a> of the Naked Security Podcast with Chester Wisniewski.<\/p>\n<p> <iframe loading=\"lazy\" width=\"100%\" height=\"420\" scrolling=\"no\" frameborder=\"0\" src=\"https:\/\/w.soundcloud.com\/player\/?url=https%3A%2F%2Fsoundcloud.com%2Fsophossecurity%2Fs3-ep1025-proxynotshell-exchange-bugs-an-expert-speaks&#038;auto_play=false&#038;hide_related=false&#038;visual=false&#038;show_comments=false&#038;show_user=false&#038;show_reposts=false&#038;color=1a60b3\" style=\"\"><\/iframe> <\/p>\n<p><em>Prefer to read rather than listening? Read the <a href=\"https:\/\/nakedsecurity.sophos.com\/2022\/10\/01\/s3-ep102-5-proxynotshell-exchange-bugs-an-expert-speaks-audio-text\/\">full transcript<\/a> instead.<\/em><\/p>\n<p>&nbsp;<\/p>\n<\/p><\/div>\n<p><a href=\"https:\/\/news.sophos.com\/en-us\/2022\/10\/03\/two-exchange-server-vulns-veer-dangerously-close-to-proxyshell\/\" target=\"bwo\" >http:\/\/feeds.feedburner.com\/sophos\/dgdY<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/news.sophos.com\/wp-content\/uploads\/2022\/10\/shutterstock_737724292.jpg\"\/><\/p>\n<p><strong>Credit to Author: Angela Gunn| Date: Mon, 03 Oct 2022 22:03:02 +0000<\/strong><\/p>\n<p>A chained pair of vulnerabilities, plus PowerShell, affects the Microsoft messaging platform well in advance of Patch Tuesday; Sophos customers are protected<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[10378,10377],"tags":[17775,129,24974,22575,16771],"class_list":["post-20262","post","type-post","status-publish","format-standard","hentry","category-security","category-sophos","tag-exchange-server","tag-featured","tag-proxyshell","tag-ssrf","tag-threat-research"],"_links":{"self":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/20262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/comments?post=20262"}],"version-history":[{"count":0,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/posts\/20262\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/media?parent=20262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/categories?post=20262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.palada.net\/index.php\/wp-json\/wp\/v2\/tags?post=20262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}