{"id":2171,"date":"2023-08-16T13:31:01","date_gmt":"2023-08-16T17:31:01","guid":{"rendered":"https:\/\/drkeithjones.com\/?p=2171"},"modified":"2023-12-08T23:35:44","modified_gmt":"2023-12-09T04:35:44","slug":"analyzing-qbot-qakbot-with-zeek","status":"publish","type":"post","link":"https:\/\/drkeithjones.com\/index.php\/2023\/08\/16\/analyzing-qbot-qakbot-with-zeek\/","title":{"rendered":"Analyzing QBot\/QakBot Malware With Zeek"},"content":{"rendered":"\n<p>In this short article I&#8217;ll outline some analysis I performed on the QBot\/QakBot malware family with Zeek.<\/p>\n\n\n\n<p>I took a look at the following PCAPs from this family of malware, hoping to make it into a Zeek Roulette:<\/p>\n\n\n\n<p><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>https:\/\/www.malware-traffic-analysis.net\/2022\/12\/09\/index.html<\/li>\n\n\n\n<li>https:\/\/www.malware-traffic-analysis.net\/2022\/10\/14\/index.html<\/li>\n\n\n\n<li>https:\/\/www.malware-traffic-analysis.net\/2022\/09\/29\/index.html<\/li>\n\n\n\n<li>https:\/\/www.malware-traffic-analysis.net\/2023\/01\/31\/index.html<\/li>\n\n\n\n<li>https:\/\/www.malware-traffic-analysis.net\/2023\/04\/03\/index.html<\/li>\n\n\n\n<li>https:\/\/www.malware-traffic-analysis.net\/2023\/03\/31\/index.html<\/li>\n<\/ul>\n\n\n\n<p>You will see that in each of the malware write ups, and in the PCAPs, that the malware C2 is sent across HTTPS.  That limits our ability to detect the raw C2.<\/p>\n\n\n\n<p>Initially, I thought I could potentially use the JA3\/JA3S hashes in Zeek to identify C2 clients and servers through their HTTPS parameters.<\/p>\n\n\n\n<p>I specifically looked at: <a href=\"https:\/\/www.malware-traffic-analysis.net\/2023\/03\/31\/index.html\">https:\/\/www.malware-traffic-analysis.net\/2023\/03\/31\/index.html<\/a> and the C2, according to the notes downloaded from that link, happens over TCP 2222 and 443.  The JA3 and J3S are:<\/p>\n\n\n\n<p>72a589da586844d7f0818ce684948eea <\/p>\n\n\n\n<p>fd4bc6cea4877646ccd62f0792ec0b62<\/p>\n\n\n\n<p>I took these hashes and ran them across a large live network I am able to monitor.  Specifically, I searched the ssl.log over the past week on this network.  I got hits with the hashes separately (as if they were OR&#8217;d) that looked like legitimate SSL traffic, so I looked for the times when the JA3 <em>and<\/em> JA3S matched.  In that case I saw a connection between a local network asset and McAfee, Inc.  The probability is low that McAfee would have a C2 server, so I think this detection method may not work so well.  <\/p>\n\n\n\n<p>After finding a couple more hits that flagged connections where it looked like false positives, I don&#8217;t see how the JA3 analysis will identify this malware family.<\/p>\n\n\n\n<p>I will continue to think on this one, but C2 like this over HTTPS is much more difficult to detect.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Additional Reading:<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.elastic.co\/security-labs\/qbot-malware-analysis\">https:\/\/www.elastic.co\/security-labs\/qbot-malware-analysis<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/news.sophos.com\/en-us\/2022\/03\/10\/qakbot-decoded\/\">https:\/\/news.sophos.com\/en-us\/2022\/03\/10\/qakbot-decoded\/<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In this short article I&#8217;ll outline some analysis I performed on the QBot\/QakBot malware family with Zeek. I took a look at the following PCAPs from this family of malware, hoping to make it into a Zeek Roulette: You will see that in each of the malware write ups, and in the PCAPs, that the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[144,140,91,24,4,145],"tags":[141,100,273,272,271,27],"class_list":["post-2171","post","type-post","status-publish","format-standard","hentry","category-detection","category-malware","category-open-source","category-pcaps","category-zeek","category-zeek-roulette","tag-malware","tag-opensource","tag-pcap","tag-qakbot","tag-qbot","tag-zeek"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/drkeithjones.com\/index.php\/wp-json\/wp\/v2\/posts\/2171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/drkeithjones.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/drkeithjones.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/drkeithjones.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/drkeithjones.com\/index.php\/wp-json\/wp\/v2\/comments?post=2171"}],"version-history":[{"count":0,"href":"https:\/\/drkeithjones.com\/index.php\/wp-json\/wp\/v2\/posts\/2171\/revisions"}],"wp:attachment":[{"href":"https:\/\/drkeithjones.com\/index.php\/wp-json\/wp\/v2\/media?parent=2171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/drkeithjones.com\/index.php\/wp-json\/wp\/v2\/categories?post=2171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/drkeithjones.com\/index.php\/wp-json\/wp\/v2\/tags?post=2171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}