Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Monitoring malware abusing CVE-2020-1599
#1
Information 
Quote:
[Image: fMRoReE0txBM1zLcM95i6YHvkanM86SWeUHSRsUi...pXAYnBQKyn]

CVE-2020-1599 is a vulnerability that can be abused by adding data (that will be later executed) to the signature section of a file, for instance appending a VB script. Unfortunately, Microsoft signature chain certification will not detect that the signature was modified and accept the file as legitimately signed, which can be used to avoid security checks. This is all described in this blog post by our colleagues at Checkpoint, also explaining how ZLoader is using this technique for persistence in recent campaigns.

A non-malicious file abusing this technique can be found here. The file is not malicious per se, as it simply opens the calc.exe utility.

This malicious technique can be mitigated as described here.

In order to monitor any additional malware abusing this vulnerability, we decided to create a YARA and run a VirusTotal Livehunt, so we will get notified any time a new suspicious file shows up in VirusTotal:
 
Code:
import "pe"
import "vt"

rule CVE-2020-1599_suspicious_signed {

meta:
author = "@fcojsantos"
created = "2022.01.07"
reference = "https://research.checkpoint.com/2022/can-you-trust-a-files-digital-signature-new-zloader-campaign-exploits-microsofts-signature-verification-putting-users-at-risk/"

strings:
$script = "<script" nocase
$script2 = "language" nocase
$script3 = "vbscript" nocase

condition:
pe.is_pe
and pe.number_of_signatures > 0
and not for all i in (0..pe.number_of_signatures - 1): (
pe.signatures.valid_on(pe.timestamp)
)
// Searches for script literal from the signature offset on
and $script in (pe.data_directories[pe.IMAGE_DIRECTORY_ENTRY_SECURITY].virtual_address..filesize)
and $script2 in (pe.data_directories[pe.IMAGE_DIRECTORY_ENTRY_SECURITY].virtual_address..filesize)
and $script3 in (pe.data_directories[pe.IMAGE_DIRECTORY_ENTRY_SECURITY].virtual_address..filesize)
and for any tag in vt.metadata.tags : ( tag == "signed" )
}

This YARA searches for suspicious script-related strings appended to the signature. However, YARA cannot check the certificate chain that confirms if the signature itself is valid or not, it only checks that the certificate exists. And here is where the YARA’s vt module comes to the rescue.

In this case, the last condition ‘for any tag in vt.metadata.tags : ( tag == "signed" )’ will check that there exists at least one “signed” tag for the file, meaning that Microsoft Windows WinVerifyTrust function confirms this is a fully valid signature (it is not, as it abuses CVE-2020-1599).

Now, armed with this, we can find several interesting samples abusing this vulnerability that we added to a VT collection.

Additionally, we were interested in understanding how these files were distributed. We created a small graph to visualize any distribution vectors

In addition to teamworks455[.]com (already listed as malicious in Checkpoint’s blog post), we found commandaadmin[.]com distributing similar malware. You can monitor any malware distributed in the wild by these domains with the following VT intelligence query:

entity:file (itw:commandaadmin or itw:teamworks455)

This query returns some of the indicators already published by Checkpoint plus a few new ones that might be interesting to take a look at.

We hope this post will be useful to understand how we can quickly monitor and do some hunting every time attackers use new techniques. Happy hunting!
...
Continue Reading
[-] The following 1 user says Thank You to harlan4096 for this post:
  • ismail
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)
[-]
Welcome
You have to register before you can post on our site.

Username:


Password:





[-]
Recent Posts
Intel to Invest Up to $100 Billion in Ne...
Intel's next ma...harlan4096 — 08:01
AMD Preps for Zen 4: Different Types of ...
Genoa and Berga...harlan4096 — 07:55
Intel Warns Of 'Damage' From Non-K Alder...
DDR4 models are...harlan4096 — 07:47
Windows 11 has a new Task Manager with a...
Yesterday, Micr...harlan4096 — 06:55
Here is what is new in Firefox 96.0.2
Mozilla release...harlan4096 — 06:46

[-]
Birthdays
Today's Birthdays
avatar (47)Josepharelf
avatar (36)kholukrefar
Upcoming Birthdays
avatar (46)theoldevext
avatar (41)algratCep
avatar (36)zetssToomy
avatar (43)GornOr
avatar (46)Jamesmog
avatar (34)opeqyrav
avatar (37)uxegihor

[-]
Online Staff
mjcn19's profile mjcn19

>