# Analyzing Attacks Against Microsoft Exchange Server With China Chopper Webshells **unit42.paloaltonetworks.com/china-chopper-webshell/** Jeff White March 8, 2021 By [Jeff White](https://unit42.paloaltonetworks.com/author/jeff-white/) March 8, 2021 at 2:24 PM [Category: Unit 42](https://unit42.paloaltonetworks.com/category/unit-42/) Tags: [China Chopper,](https://unit42.paloaltonetworks.com/tag/china-chopper/) [CVE-2021-27065,](https://unit42.paloaltonetworks.com/tag/cve-2021-27065/) [Hafnium,](https://unit42.paloaltonetworks.com/tag/hafnium/) [Microsoft Exchange Server,](https://unit42.paloaltonetworks.com/tag/microsoft-exchange-server/) [vulnerabilities](https://unit42.paloaltonetworks.com/tag/vulnerability/) This post is also available in: 日本語 [(Japanese)](https://unit42.paloaltonetworks.jp/china-chopper-webshell/) ## Executive Summary Microsoft recently released patches for a number of zero-day Microsoft Exchange Server [vulnerabilities that are actively being exploited in the wild by HAFNIUM, a suspected state-](https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/) sponsored group operating out of China. We provide an overview of the China Chopper webshell, a backdoor which has been observed being dropped in these attacks. We also analyze incidental artifacts, such as metadata, created by the attacks themselves, which allow us to collect information and better understand the nature and methodology of the attackers. ----- For information on how Palo Alto Networks protects its customers from these threats, please refer to our Threat Assessment: Active Exploitation of Four Zero-Day Vulnerabilities in Microsoft Exchange Server. ## The Role of the China Chopper Webshell [By leveraging CVE-2021-27065, a post-authentication arbitrary file write vulnerability, an](https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-27065) attacker is able to effectively inject code into an ASPX page for Exchange Offline Address Book (OAB). When this page is compiled with the injected webshell, the attacker can send other code and gain further access. The China Chopper webshell is a lightweight, one-line script that is observed being dropped in these attacks by the use of the PowerShell SetOabVirtualDirectory cmdlet. This one-line webshell is relatively simple from the server perspective and has been observed in attacks since at least 2013, when FireEye reported on it. The key detail here is that the China Chopper webshell is injected into a pre-existing OAB ASPX page that contains configuration information unrelated to the webshell. It’s been [reported that there are thousands of compromises, and any on-premises Exchange Server](https://krebsonsecurity.com/2021/03/at-least-30000-u-s-organizations-newly-hacked-via-holes-in-microsofts-email-software/) that is exposed to the internet should assume it’s been scanned numerous times. Knowing this, and knowing that thousands of companies this week have begun the laborious chore of responding to these attacks within their infrastructure, it didn’t take long before these OAB files started popping up on VirusTotal (VT). To identify the specific OAB configuration files we’re interested in, I created a small YARA rule to identify some of the observed templates for the China Chopper webshell as they exist within OAB configurations. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 rule webshell_chinachopper_oab { meta: author = "Jeff White (Palo Alto Networks) @noottrak" date = "02MAR2021" hash01 = "e8ea17cd1de6d3389c792cce8c0ff1927a6386f0ef32ab0b097763de1f86ffc8" hash02 = "34f9944a85ffba58f3fa60c5dc32da1ce6743dae261e1820ef6c419808757112" hash03 = "55fbfab29f9d2c26f81f1ff901af838110d7f76acc81f14b791a8903aa8b8425" hash04 = "6e75bbcdd22ec9df1c7796e381a83f88e3ae82f5698c6b31b64d8f11e9cfd867" ----- 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 strings: // Detect OAB file $OAB01 = "ExternalUrl" ascii // Contains webshell $OAB02 = "InternalUrl" ascii $OAB03 = "ExchangeVersion" ascii $OAB04 = "WhenChangedUTC" ascii // Detect injected Url variants $HTTP01 = "http://f/" ascii nocase $HTTP02 = "http://g/" ascii nocase $HTTP03 = "http://p/" ascii nocase // Detect ChinaChopper variants $websh01 = "