<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by m4d3_bl4d3 on Medium]]></title>
        <description><![CDATA[Stories by m4d3_bl4d3 on Medium]]></description>
        <link>https://medium.com/@m4d3_bl4d3?source=rss-ec263c5366a7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WNWnFGWQXdxphm6hQTEemA.jpeg</url>
            <title>Stories by m4d3_bl4d3 on Medium</title>
            <link>https://medium.com/@m4d3_bl4d3?source=rss-ec263c5366a7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 23:47:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@m4d3_bl4d3/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Ashfall: Official DFIR Walkthrough]]></title>
            <link>https://medium.com/@m4d3_bl4d3/ashfall-official-dfir-walkthrough-7a8d812fdb11?source=rss-ec263c5366a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a8d812fdb11</guid>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[ashfall]]></category>
            <category><![CDATA[breaktheroot]]></category>
            <category><![CDATA[ctf-walkthrough]]></category>
            <dc:creator><![CDATA[m4d3_bl4d3]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 03:52:13 GMT</pubDate>
            <atom:updated>2026-11-24T07:21:06.940Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>⚠️ Disclaimer : </strong>This guide walks through both flags and the Extra Mile remediations.</blockquote><p><a href="https://breaktheroot.com/ashfall/">Break The Root - Ashfall</a></p><h3>Introduction</h3><p>Ashfall is a DFIR investigation involving suspicious activity on a workstation named DISPATCH-WS-07. It starts with a macro-enabled handover document and leads to staged files, a scheduled task, and communication with a suspicious domain.</p><p>In this walkthrough, we’ll go through the evidence, piece together what happened, find both flags, and fix the issues in the Evidence Console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d38YuZrBb_o30O7Llnzzyw.png" /></figure><p>Let’s dig in!</p><h4>1. Open the Evidence Console</h4><p>Start by opening the Evidence Console using the target URL provided in the room:</p><p><a href="http://target:8080/">http://TARGET:8080</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TctRh8irwkmvOC7pmPmMHQ.png" /></figure><p>Log in using the credentials provided with the lab, then head to the <strong>Evidence Browser</strong>.</p><p>Before digging into the logs, open the intake README. It gives you some context about the available evidence and where to start.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gQXnsqiHlv1cIP1_f98z4A.png" /></figure><h4>2. Verify Evidence Integrity</h4><p>Before jumping into the logs, let’s make sure the evidence is intact.</p><p>Head over to the <strong>Custody</strong> section and review the hash verification results. You’ll notice that Windows/EventLogs/PowerShell.json is marked as mismatched.</p><p>Don’t modify or replace it just yet. We’ll still need it to investigate what happened. Also, keep custody/flag2.txt in mind; it&#39;s restricted, and we&#39;ll come back to it later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lXsznJzI4j4miEmbFQ9O0Q.png" /></figure><p>For now, note the mismatch and move on. It tells us the file differs from its recorded hash, but we still need more evidence to understand why.</p><h4>3. Reconstruct the Timeline</h4><p>Head to the Timeline section and start putting the events in order. Look for activity around the time the handover document was opened.</p><p>A few events stand out:</p><ul><li><strong>08:14:22 UTC</strong> — Handover document downloaded.</li><li><strong>08:15:58–08:16:31 UTC</strong> — Microsoft Word launches PowerShell.</li><li><strong>08:16:19–08:17:02 UTC</strong> — Script staged and DispatchSync task registered.</li><li><strong>08:21:43–08:21:49 UTC</strong> — Scheduled task runs as SYSTEM and launches 7-Zip.</li><li><strong>08:24:02–08:24:10 UTC</strong> — update-check.top resolves, followed by an HTTPS POST.</li><li><strong>08:25:03 UTC onward</strong> — Archive deleted.</li></ul><p>Notice how the activity develops: a document is downloaded, PowerShell is launched, files are staged, and a scheduled task is created. Later, that task runs under SYSTEM.</p><p>One detail worth keeping separate: the task was created by CORP\j.reyes, but configured to run as SYSTEM. Don&#39;t assume this alone proves how or whether privileges were escalated.</p><p>The domain lookup and HTTPS POST are also worth investigating, but they don’t by themselves confirm that data was successfully exfiltrated. We’ll correlate these events with the available evidence in the next step.</p><h4>4. Recover Flag 1</h4><p>Open Windows/EventLogs/PowerShell.json in the Evidence Browser and look for <strong>Event ID 4104</strong> at 2026-04-17 08:16:31Z.</p><p>Check the event details:</p><ul><li>User: CORP\j.reyes</li><li>Process ID: 0x1A20</li><li>Parent Process ID: 0x1900</li><li>Logon ID: 0x51A42</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ry6AK8KZpb-TdTUWxjyomQ.png" /></figure><p>The event contains a PowerShell script block. Correlate it with the earlier activity: Microsoft Word launched PowerShell, which staged DispatchCache\svc.ps1 and registered the DispatchSync task.</p><p><strong>Decode the PowerShell command :</strong></p><p>Find the EncodedCommand value in the event. Copy it and decode it using a Base64 decoder, making sure to select <strong>UTF-16LE</strong> as the text encoding.</p><p>Look through the decoded output for the campaign receipt:</p><p>MRD-SHIFT-SYNC-0417</p><p><strong>Retrieve the flag :</strong></p><p>Head to <strong>IOC Search</strong> and search for the campaign receipt. Open the matching proxy result and look for the value following token=.</p><p>Copy that value and decode it using Base64 with <strong>UTF-8</strong> encoding.</p><p>You should get the first flag:</p><p>BTR{flag1}</p><h4>5. Recover Flag 2</h4><p>Remember the restricted file we spotted earlier in the Custody section? Let’s see if we can access it through the Evidence Console’s download endpoint.</p><p>Open a new browser tab and enter the following URL, replacing TARGET with your room&#39;s target IP:</p><p><a href="http://target:8080/api/evidence/download?path=../custody/flag2.txt">http://TARGET:8080/api/evidence/download?path=../custody/flag2.txt</a></p><p>The file should download automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K7Tm5poKLhjZRPYOaUZi8w.png" /></figure><p>Open it and you’ll find the second flag:</p><p>BTR{flag2}</p><blockquote>We’ve traced the suspicious activity, followed the evidence, and uncovered the two flags. But we’re not quite done yet. Ready for a little cleanup? Let’s move on to the Extra Mile challenges.</blockquote><h3>6. Extra Mile — 1: Fix the Download Vulnerability</h3><p>Let’s start with the download feature we used to retrieve Flag 2. The problem is that the endpoint doesn’t properly validate file paths, allowing access to files outside the intended evidence directory.</p><p>Connect to the target over SSH:</p><pre>ssh -p &lt;SSH_PORT&gt; app@&lt;TARGET&gt;</pre><p>Once connected, open the application server:</p><pre>nano /opt/app/server.py</pre><p>Find the evidence download route and look for the unchecked os.path.join() used to build the file path. That’s where the problem lies: a path containing ../ can escape the intended evidence directory.</p><p><strong>Time to fix it.</strong></p><p>The application already has a safe resolver and the required exception classes. We just need to use them in the download route.</p><p>Replace the existing unchecked path construction with:</p><pre>try:<br>    target = _resolve_evidence_file(path, evidence_root)<br>except EvidencePathError:<br>    return jsonify({&quot;error&quot;: &quot;invalid_or_forbidden_path&quot;}), 403<br>except EvidenceFileNotFoundError:<br>    return jsonify({&quot;error&quot;: &quot;evidence_file_not_found&quot;}), 404<br>except UnsupportedEvidenceFormatError:<br>    return jsonify({&quot;error&quot;: &quot;unsupported_evidence_format&quot;}), 415<br>except EvidenceUnavailableError:<br>    return jsonify({&quot;error&quot;: &quot;evidence_unavailable&quot;}), 503<br>except OSError:<br>    return jsonify({&quot;error&quot;: &quot;evidence_unavailable&quot;}), 503<br><br>return send_file(target, as_attachment=True)</pre><p>The resolver ensures that only supported files within the evidence directory can be downloaded.The exception handling also ensures that invalid paths, missing files, unsupported formats, and unavailable evidence return controlled responses.</p><p>Once you’re done, save the file (Ctrl + O, then Ctrl + X).</p><h3>7. Extra Mile — 2: Fix the IOC Search Vulnerability</h3><p>With the download vulnerability addressed, let’s move on to the IOC Search handler.</p><p>In the same source file, find the IOC search handler. Look for the vulnerable pattern where a shell command is built using user input and executed with shell=True.</p><p><strong>Time to fix it.</strong></p><p>Instead of building a shell command from a string, pass the search query and evidence path as separate arguments.</p><p>Replace the vulnerable command execution with:</p><pre>command = [&quot;grep&quot;, &quot;-Rin&quot;, &quot;--&quot;, query, str(evidence_root)]<br><br>output = subprocess.check_output(<br>    command,<br>    shell=False,<br>    text=True,<br>    stderr=subprocess.DEVNULL,<br>)</pre><p>Using separate arguments with shell=False prevents user input from being interpreted as shell syntax. The -- also ensures that a query beginning with a hyphen is treated as a search term rather than a command-line option.</p><p>Keep the handler’s existing response processing and normal no-match behavior intact.</p><p>Once you’re done, save the file (Ctrl + O, then Ctrl + X).</p><h4>8. Verify the Fixes</h4><p>We’ve made changes to both the download handler and IOC Search. Before wrapping up, let’s make sure the application recognizes them.</p><p>Head back to the <strong>Evidence Console</strong> and open the <strong>Extra Mile</strong> section.</p><p>Run the available checks and confirm that both vulnerabilities are marked as fixed:</p><ul><li><strong>Download path traversal</strong> — should pass.</li><li><strong>IOC Search command injection</strong> — should pass.</li></ul><p>If either check fails, revisit the corresponding handler in server.py and make sure the changes were saved correctly.</p><blockquote>And that’s it, folks! Both checks pass, and Ashfall is complete.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a8d812fdb11" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>