{"id":327,"date":"2024-04-04T21:30:21","date_gmt":"2024-04-04T21:30:21","guid":{"rendered":"https:\/\/justatrainingblog.co.uk\/?p=327"},"modified":"2024-04-04T21:30:21","modified_gmt":"2024-04-04T21:30:21","slug":"btlo-follina-challenge","status":"publish","type":"post","link":"https:\/\/justatrainingblog.co.uk\/?p=327","title":{"rendered":"BTLO &#8211; Follina Challenge"},"content":{"rendered":"\n<p><span style=\"text-decoration: underline;\">Brief<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"603\" height=\"358\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image.png\" alt=\"\" class=\"wp-image-328\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image.png 603w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-300x178.png 300w\" sizes=\"(max-width: 603px) 100vw, 603px\" \/><\/figure>\n\n\n\n<p><span style=\"text-decoration: underline;\">Setup<\/span><\/p>\n\n\n\n<p>Hardware: 1x Kali Virtual Machine<\/p>\n\n\n\n<p>File Location: \/home\/kali\/Desktop\/Malware\/FollinaChallenge\/sample\/sample.doc<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">Questions<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Question 1) What is the SHA1 hash value of the sample? (Format: SHA1Hash) <em>(1 points)<\/em> <\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"485\" height=\"119\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-1.png\" alt=\"\" class=\"wp-image-329\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-1.png 485w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-1-300x74.png 300w\" sizes=\"(max-width: 485px) 100vw, 485px\" \/><\/figure>\n\n\n\n<p>Answer:  06727ffda60359236a8029e0b3e8a0fd11c23313<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Question 2) According to VirusTotal, what is the full filetype of the provided sample? (Format: X X X X) <em>(1 points)<\/em><\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"475\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-3-1024x475.png\" alt=\"\" class=\"wp-image-331\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-3-1024x475.png 1024w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-3-300x139.png 300w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-3-768x356.png 768w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-3-850x394.png 850w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-3.png 1346w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Answer: Open Office XML Document<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Question 3) Extract the URL that is used within the sample and submit it (Format: https:\/\/x.domain.tld\/path\/to\/something) <em>(1 points)<\/em> <\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"670\" height=\"444\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-4.png\" alt=\"\" class=\"wp-image-332\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-4.png 670w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-4-300x199.png 300w\" sizes=\"(max-width: 670px) 100vw, 670px\" \/><figcaption class=\"wp-element-caption\">Using oleid we can do a quick analysis of the document. From this we can determine there&#8217;s an external relationship and no malicious macros present.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"941\" height=\"179\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-5.png\" alt=\"\" class=\"wp-image-333\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-5.png 941w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-5-300x57.png 300w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-5-768x146.png 768w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-5-850x162.png 850w\" sizes=\"(max-width: 941px) 100vw, 941px\" \/><figcaption class=\"wp-element-caption\">Following into the dedicated analysis application we can see a potentially malicious URL<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"412\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-6-1024x412.png\" alt=\"\" class=\"wp-image-334\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-6-1024x412.png 1024w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-6-300x121.png 300w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-6-768x309.png 768w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-6-850x342.png 850w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-6.png 1309w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Checking Virustotal we can see it&#8217;s pointing towards a C2 server. <\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Question 4) What is the name of the XML file that is storing the extracted URL? (Format: file.name.ext) <em>(1 points)<\/em> <\/h2>\n\n\n\n<p>This question did admittedly stump me. I&#8217;m not overly familiar with the makeup of office files, however after doing some digging I learnt that the document file is made up of .XML files. This means it can be extracted! Once extracted the URL would be held within the .rels file. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"77\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-7-1024x77.png\" alt=\"\" class=\"wp-image-335\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-7-1024x77.png 1024w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-7-300x22.png 300w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-7-768x57.png 768w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-7-1536x115.png 1536w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-7-850x64.png 850w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-7.png 1898w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Question 5) The extracted URL accesses a HTML file that triggers the vulnerability to execute a malicious payload. According to the HTML processing functions, any files with fewer than &lt;Number> bytes would not invoke the payload. Submit the &lt;Number> (Format: Number of Bytes) <em>(1 points)<\/em> <\/h2>\n\n\n\n<p>Having attempted to run this in a sandbox, it appears that the domain no longer exists. Performing a NSLOOKUP confirms this<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"907\" height=\"122\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-8.png\" alt=\"\" class=\"wp-image-336\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-8.png 907w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-8-300x40.png 300w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-8-768x103.png 768w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-8-850x114.png 850w\" sizes=\"(max-width: 907px) 100vw, 907px\" \/><\/figure>\n\n\n\n<p>That&#8217;s disappointing but understandable, back to a little bit of OSINT, checking this URL we can see it&#8217;s related to CVE-2022-30190. Analysis <a href=\"https:\/\/blogs.juniper.net\/en-us\/threat-research\/cve-2022-30190-microsoft-windows-support-diagnostic-tool-msdt-remote-code-execution-vulnerability\" title=\"\">done by Juniper<\/a> shows that at least 4096 bytes is needed for the exploit to trigger. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Question 6) After execution, the sample will try to kill a process if it is already running. What is the name of this process? (Format: filename.ext) <em>(1 points)<\/em> <\/h2>\n\n\n\n<p>Again now we know the CVE finding information on this malware is easy. <a href=\"https:\/\/www.secpod.com\/blog\/critical-alert-microsoft-support-diagnostic-tool-rce-vulnerability-exploited-in-the-wild\/\" title=\"\">Secprod<\/a> does a solid breakdown of the process and confirms that once the base64 is converted we get this:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"501\" height=\"226\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-9.png\" alt=\"\" class=\"wp-image-337\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-9.png 501w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-9-300x135.png 300w\" sizes=\"(max-width: 501px) 100vw, 501px\" \/><\/figure>\n<\/blockquote>\n\n\n\n<p>Ok so from this we can see it&#8217;ll attempt to run taskkill to end msdt.exe. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Question 7) You were asked to write a process-based detection rule using Windows Event ID 4688. What would be the ProcessName and ParentProcessname used in this detection rule? [Hint: OSINT time!] (Format: ProcessName, ParentProcessName) <em>(1 points)<\/em> <\/h2>\n\n\n\n<p>Oh joy, more OSINT. Okay, so from my own notes I can see 4688 is process creation. The only obvious process we can see above is cmd.exe which in itself can be something of a worry but could also be used in legitimate use. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"595\" height=\"125\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-10.png\" alt=\"\" class=\"wp-image-338\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-10.png 595w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-10-300x63.png 300w\" sizes=\"(max-width: 595px) 100vw, 595px\" \/><\/figure>\n\n\n\n<p>On the other hand we can see right at the end that it executed rgb.exe, however we do not know the parent process. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Through our OSINT efforts we can see that this malware will modify the msdt.exe so when it is re-created it will reopen in it&#8217;s tampered form. From a submission from <a href=\"https:\/\/threatnix.io\/blog\/follina-a-zero-day-vulnerability-in-microsoft-office-that-supports-code-execution\/\" title=\"\">Threatnix.io<\/a> we can see that the parent process in this instance is winword.exe. Therefore the answer for this would be msdt.exe, WINWORD.exe<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"932\" height=\"345\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-12.png\" alt=\"\" class=\"wp-image-340\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-12.png 932w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-12-300x111.png 300w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-12-768x284.png 768w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-12-850x315.png 850w\" sizes=\"(max-width: 932px) 100vw, 932px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Question 8) Submit the MITRE technique ID used by the sample for Execution [Hint: Online sandbox platforms can help!] (Format: TXXXX) <em>(1 points)<\/em> <\/h2>\n\n\n\n<p>We&#8217;ve determined previously that this code executes via CMD, therefore looking at the ATT&amp;CK Matrix we can see this falls under T1059 <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Question 9) Submit the CVE associated with the vulnerability that is being exploited (Format: CVE-XXXX-XXXXX) <em>(2 points)<\/em><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\"><\/h2>\n\n\n\n<p>We already know from our previous research that the CVE is CVE-2022-30190.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"459\" height=\"302\" src=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-13.png\" alt=\"\" class=\"wp-image-341\" srcset=\"https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-13.png 459w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-13-300x197.png 300w, https:\/\/justatrainingblog.co.uk\/wp-content\/uploads\/2024\/04\/image-13-350x230.png 350w\" sizes=\"(max-width: 459px) 100vw, 459px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Takeaway<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>.doc files are made up of .xml files. These files can be extracted. <\/li>\n\n\n\n<li>Once extracted .rels contains metadata on the document<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Brief Setup Hardware: 1x Kali Virtual Machine File Location: \/home\/kali\/Desktop\/Malware\/FollinaChallenge\/sample\/sample.doc Questions Question 1) What is the SHA1 hash value of&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-327","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=327"}],"version-history":[{"count":1,"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/327\/revisions"}],"predecessor-version":[{"id":342,"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/327\/revisions\/342"}],"wp:attachment":[{"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/justatrainingblog.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}