Tracking 3CX Supply Chain Breach Cases using AhnLab EDR

Last March, 3CX supply chain breach cases were a global issue. AhnLab Security Emergency response Center (ASEC) has confirmed through the AhnLab Smart Defense (ASD) infrastructure that malware related to the 3CX supply chain were installed in Korea on March 9th and March 15th.

Figure 1. ASD infrastructure log related to 3CX supply chain breach case

The 3CX supply chain malware confirmed in this instance had loaded malicious DLLs disguised with the names of regular DLLs, ffmpeg.dll and d3dcompiler_47.dll, on the normal 3CXDesktopApp.exe process, allowing for malicious behavior to be carried out. Ultimately, a downloader shellcode was executed on the memory of the 3CXDesktopApp.exe process. No additional malware downloads were found upon analysis at that time. However, it was confirmed that a data-leaking malware had been executed.

Figure 2. Flow chart of 3CX supply chain breach case

AhnLab Endpoint Detection and Response (EDR) is capable of detecting attack techniques used by threat actors to attack 3CX supply chains, and it allows users to check the data required to investigate the related breach case.

Figure 3 is the process tree that is displayed on AhnLab EDR of a 3CX supply chain attack.

Figure 3. AhnLab EDR screen displaying the detection process tree of a 3CX supply chain attack

ffmpeg.dll is a DLL imported by 3CXDesktopApp.exe. (Refer to Figure 4) Therefore, when 3CXDesktopApp.exe is executed, the ffmpeg.dll that exists in the same folder path is loaded on the memory of the 3CXDesktopApp.exe process.

Figure 4. 3CXDesktopApp.exe’s import DLL list (ffmpeg.dll)

As shown in the below Figure 5, the loaded ffmpeg.dll reads the d3dcompiler_47.dll that was installed with 3CXDesktopApp.exe, and RC4 decrypts the encrypted shellcode to execute it on the memory.

Figure 5. Malicious behavior of ffmpeg.dll (shellcode decryption and loading)

AhnLab EDR is capable of detecting these abnormal shellcode execution methods. The below Figure 6 is the detection screen that can be found on the [Threats] – [Timeline] tab on the console screen.

Figure 6. EDR detection screen of shellcode execution

If the threat actor’s shellcode is executed, it downloads and executes additional malware from a Github page where a payload has been uploaded. EDR saves the information of download URLs accessed by 3CXDesktopApp.exe, which allows EDR managers to look up information on malware distribution sites in the [Threats] – [Diagram] tab within the EDR console.

Figure 7. Malware download URL accessed by 3CXDesktopApp.exe (Github)

AhnLab V3 and EDR products detect this 3CX supply chain threat with the aliases below.

[File Detection]
Dropper/MSI.Agent
Trojan/Win.Loader.C5403102
Trojan/Win.Agent.C5403110
Trojan/Win.Loader.C5403103
Infostealer/Win.Agent.C5403954
Trojan/BIN.Agent
Data/BIN.Encoded
Trojan/OSX.Agent
Trojan/OSX.Loader

[Behavior Detection]
[V3]
Connection/MDP.Event.M4581
Connection/MDP.Event.M11026
Exploit/MDP.Event.M11027

[EDR]
Fileless/EDR.Event.M11072

[IOC]
59e1edf4d82fae4978e97512b0331b7eb21dd4b838b850ba46794d9c7a2c0983
aa124a4b4df12b34e74ee7f6c683b2ebec4ce9a8edcf9be345823b4fdcf5d868
fad482ded2e25ce9e1dd3d3ecc3227af714bdfbbde04347dbc1b21d6a3670405
dde03348075512796241389dfea5560c20a3d2a2eac95c894e7bbed5e85a0acc
7986bbaee8940da11ce089383521ab420c443ab7b15ed42aed91fd31ce833896
c485674ee63ec8d4e8fde9800788175a8b02d3f9416d0e763360fff7f8eb4e02
11be1803e2e307b647a8a7e02d128335c448ff741bf06bf52b332e0bbf423b03
aa4e398b3bd8645016d8090ffc77d15f926a8e69258642191deb4e68688ff973
4e08e4ffc699e0a1de4a5225a0b4920933fbb9cf123cde33e1674fde6d61444f
8ab3a5eaaf8c296080fadf56b265194681d7da5da7c02562953a4cb60e147423
5a017652531eebfcef7011c37a04f11621d89084f8f9507201f071ce359bea3f
5407cda7d3a75e7b1e030b1f33337a56f293578ffa8b3ae19c671051ed314290
e6bbc33815b9f20b0cf832d7401dd893fbc467c800728b5891336706da0dbcec
fee4f9dabc094df24d83ec1a8c4e4ff573e5d9973caa676f58086c99561382d7
a64fa9f1c76457ecc58402142a8728ce34ccba378c17318b3340083eeb7acc67
5009c7d1590c1f8c05827122172583ddf924c53b55a46826abf66da46725505a
87c5d0c93b80acf61d24e7aaf0faae231ab507ca45483ad3d441b5d1acebc43c
210c9882eba94198274ebc787fe8c88311af24932832a7fe1f1ca0261f815c3d
a541e5fc421c358e0a2b07bf4771e897fb5a617998aa4876e0e1baa5fbb8e25c
2c9957ea04d033d68b769f333a48e228c32bcf26bd98e51310efd48e80c1789f
268d4e399dbbb42ee1cd64d0da72c57214ac987efbb509c46cc57ea6b214beca
c62dce8a77d777774e059cf1720d77c47b97d97c3b0cf43ade5d96bf724639bd
c13d49ed325dec9551906bafb6de9ec947e5ff936e7e40877feb2ba4bb176396
f1bf4078141d7ccb4f82e3f4f1c3571ee6dd79b5335eb0e0464f877e6e6e3182
2487b4e3c950d56fb15316245b3c51fbd70717838f6f82f32db2efcc4d9da6de
e059c8c8b01d6f3af32257fc2b6fe188d5f4359c308b3684b1e0db2071c3425c
d0f1984b4fe896d0024533510ce22d71e05b20bad74d53fae158dc752a65782e
d459aa0a63140ccc647e9026bfd1fccd4c310c262a88896c57bbe3b6456bd090
d459aa0a63140ccc647e9026bfd1fccd4c310c262a88896c57bbe3b6456bd090
d51a790d187439ce030cf763237e992e9196e9aa41797a94956681b6279d1b9a
4e08e4ffc699e0a1de4a5225a0b4920933fbb9cf123cde33e1674fde6d61444f
8c0b7d90f14c55d4f1d0f17e0242efd78fd4ed0c344ac6469611ec72defa6b2d
f47c883f59a4802514c57680de3f41f690871e26f250c6e890651ba71027e4d3
akamaicontainer[.]com
akamaitechcloudservices[.]com
azuredeploystore[.]com
azureonlinecloud[.]com
azureonlinestorage[.]com
dunamistrd[.]com
glcloudservice[.]com
journalide[.]org
msedgepackageinfo[.]com
msstorageazure[.]com
msstorageboxes[.]com
officeaddons[.]com
officestoragebox[.]com
pbxcloudeservices[.]com
pbxphonenetwork[.]com
pbxsources[.]com
qwepoi123098[.]com
sbmsa[.]wiki
sourceslabs[.]com
visualstudiofactory[.]com
zacharryblogs[.]com
hxxps://raw.githubusercontent[.]com/IconStorages/images/main/icon[number].ico

The MITRE ATT&CK mapping related to this 3CX supply chain threat is as follows.

– T1574.002 : Hijack Execution Flow: DLL Side-Loading
– T1012 : Query Registry
– T1071.001 : Application Layer Protocol: Web Protocols

More details about AhnLab EDR which actively tracks threats and provides endpoint visibility through behavior-based detection and analysis can be found here on the AhnLab page.

The post Tracking 3CX Supply Chain Breach Cases using AhnLab EDR appeared first on ASEC BLOG.

Article Link: https://asec.ahnlab.com/en/52169/