Welcome to Corelight Labs' latest hunt! This blog continues our tradition of analyzing trending threat groups and TTPs on Any.Run and writing detectors for them, providing the community with open-source threat intelligence, and acting as a tutorial in engineering threat detections with Zeek® Script.
Our approach leverages Quasar’s default configuration options when using self-signed TLS certificates. By default, Quasar uses the hard-coded TLS common name (CN) “Quasar Server CA”, as seen in its open-source repository. When a client connects to this server using a TLS connection for command-and-control, the server will present its CN in cleartext, which Suricata® signatures or Zeek scripts can detect. Of course an attacker can change this default, but it’s surprising how often they fail to do so (see below).
if ( c$ssl?$subject && c$ssl$subject == \"CN=Quasar Server CA\" )
\n
NOTICE([ $note=QuasarRAT::C2_Traffic_Observed,
\n
$msg=\"Potential QuasarRAT C2 discovered via a default SSL
\n
certificate.\", $conn=c,
\n
$identifier=cat(c$id$orig_h, c$id$resp_h) ]);
\n
}
"
While it is easy for an actor to reconfigure their TLS, open-source threat intelligence implies that some servers neglect this. We found that malware connects to servers with this default TLS CN in abundance on Any.Run. Internet scanning leads to similar results: according to Shodan.io, there was a rise in servers with this certificate around early 2023, and the number of public-facing servers with it remains consistently between 20 and 40.
Source: Shodan.io
Conclusion
The example again shows that all is not lost when malware uses HTTPS to communicate with its C2 server. In some cases, operational mistakes from the actor can cause servers to announce themselves as risky. Be sure to head to https://github.com/corelight/zeek-quasarrat-detector to get the detection code we released with this blog!
We also recommend checking out Corelight’s C2 Collection, which covers known C2 toolkits and MITRE ATT&CK® C2 techniques and is based on Zeek metadata, for more than 50 unique insights and detections that illuminate command and control activity and help defenders find novel attacks.
Corelight announces the release of a new detection package “Sliver”, which identifies and raises alerts related to the Sliver C2 framework.
Corelight Labs Team
May 4, 2023
Get notified on new marketing insights
Be the first to know about new B2B SaaS Marketing insights to build or refine your marketing function with the tools and knowledge of today’s industry.