x_remediation
CVE-2025-21231 - IP Helper Denial of Service Vulnerability - Mitigation Script
PoC video
Description
CVE-2025-21231 is a Denial of Service (DoS) vulnerability affecting the IP Helper service in Microsoft Windows systems. This vulnerability allows an unauthenticated attacker to send specially crafted packets to the IP Helper service, causing it to crash or become unresponsive. Successful exploitation can lead to significant disruptions, impacting network communication and system availability.
ℹ️ This mitigation script helps reduce exposure to CVE-2025-21231 by disabling the IP Helper service (`iphlpsvc`):
- Stop the IP Helper Service:
- Checks if the `iphlpsvc` service is installed and running.
- If active, stops the service to immediately reduce the risk of exploitation.
- Disable IP Helper to Prevent Restart:
- Changes the startup type to "Disabled" to ensure it does not restart after a reboot.
- Outputs a message indicating that a system restart may be required for changes to take effect.
Error Handling and Warnings:
- If an error occurs during execution, the script alerts the user.
- Advises ensuring administrative privileges before running the script.
✅ Running this mitigation script will help you proactively reduce your system's exposure to CVE-2025-21231 by disabling IP Helper.
CVE-2023-29357: Mitigate EoP SharePoint Server
Description
Enable Microsoft Defender & Verify AMSI Integration for CVE-2023-29357
This script checks for a SharePoint Farm by loading the SharePoint PowerShell snap-in (if available) and then ensures that Microsoft Defender (WinDefend) is enabled and running. Since the commands to directly enable AMSI integration (e.g. Get-SPFarmConfig/Set-SPFarmConfig) are not available in your environment, the script outputs a reminder to verify that AMSI integration is configured per Microsoft’s official documentation.
Why It Matters
CVE-2023-29357 is a privilege escalation vulnerability in Microsoft SharePoint Server. Microsoft protects customers by recommending the use of AMSI integration together with Microsoft Defender. This script ensures Microsoft Defender is active and reminds you to confirm that AMSI integration is enabled—both are critical to mitigating this vulnerability.
CVE-2021-26855: Mitigate Windows ProxyLogon
PoC video
Description
📜 Restricting Access on Port 443
This script implements a Windows Firewall-based mitigation to restrict inbound HTTPS (port 443) traffic on your Exchange server. It targets CVE-2021-26855 (ProxyLogon) by blocking all inbound connections on port 443 and then allowing access only from a list of trusted IP ranges. This helps reduce the attack surface by limiting exposure to untrusted networks.
🚀 Why It Matters
CVE-2021-26855 is a critical vulnerability affecting Microsoft Exchange Servers that allows remote attackers to execute code and potentially compromise the entire system. By restricting access to port 443, you limit external exposure and protect your infrastructure until a permanent patch can be applied.
🛠️ How to Use
- Customize the Trusted IPs: Update the $trustedIPs array with your organization’s trusted IP ranges.
- Run with Elevated Privileges: Execute the script on your Exchange server using PowerShell as an administrator.
- Review Firewall Rules: Verify that the new firewall rules are correctly applied and test connectivity from trusted sources.
CVE-2022-41040: Mitigate Vulnerable Exchange Server
Description
🔒 Mitigation Script for CVE‑2022‑41040
This script applies or rolls back a URL Rewrite rule to mitigate the CVE‑2022‑41040 vulnerability in Microsoft Exchange Server.
🔍 How it works:
The script first checks for administrator rights, then defines key parameters such as the default IIS website and the specific rule name ("PowerShell - inbound"). It imports the WebAdministration module to interact with IIS. Depending on the provided parameter, it either adds the rewrite rule to block suspicious requests or removes it to roll back the mitigation.
⚠️ Why it matters:
CVE‑2022‑41040 is a critical vulnerability that can allow remote code execution on Exchange Servers via PowerShell. Implementing this mitigation helps protect your environment by blocking malicious traffic targeting this flaw until a full patch is deployed.
CVE-2022-41082 - Microsoft Exchange Server Remote Code Execution Vulnerability
PoC video
Description
❗ CVE-2022-41082 is a vulnerability in Microsoft Exchange Server that allows attackers to execute remote code on the server.
ℹ️ This detection script checks if any non-admin users have remote PowerShell access enabled, which could indicate potential vulnerability to CVE-2022-41082:
Disable Remote PowerShell Access for non-admin users:
Identifies non-admin users with remote PowerShell access (modifiable based on your organization's role naming conventions).
Disables remote PowerShell access for these users to prevent exploitation.
If no non-admin users have access, no action is required.
✅ Running this mitigation script will enable you to quickly reduce your system's risk exposure to CVE-2022-41082.
Note that these mitigations are meant to be temporary measures. If possible, consider applying the latest official security patches.
CVE-2025-21333 - Elevated Privilege Exposure in Windows Hyper-V by Microsoft
PoC video
Description
❗ CVE-2025-21333 is an elevation of privilege vulnerability affecting Microsoft’s Windows Hyper-V. An attacker could exploit this vulnerability to escalate their privileges, potentially gaining full control over the Hyper-V host. This could lead to unauthorized access to sensitive data and system takeover.
ℹ️ This mitigation script helps reduce exposure to CVE-2025-21333 by disabling the Hyper-V feature, preventing its exploitation:
Disable Hyper-V:
Uses Disable-WindowsOptionalFeature to turn off Microsoft-Hyper-V-All.
The script does not immediately restart the system but advises a reboot for changes to take effect.
✅ Running this mitigation script will help you reduce your exposure to CVE-2025-21333 by disabling Hyper-V.
⚠️ Mitigations are intended as temporary measures. If possible, consider installing the latest security patches.
CVE-2023-5654: Mitigate React DevTools Vuln.
Description
🔒 React Developer Tools Vulnerability Mitigation Script
This script disables the vulnerable React Developer Tools extension by renaming its folder, ensuring that Chrome no longer loads it. It’s designed to quickly mitigate the risk in a lab or controlled environment without needing a full update.
🔍 How it works:
The script begins by stopping all Chrome processes, freeing any file locks on the extension folder.
It then searches for the extension folder across standard Chrome extension directories.
Once the folder is found, it renames the folder (appending _DISABLED to the original name), which prevents Chrome from loading the extension.
The script includes error handling to check if the mitigation has already been applied, avoiding redundant operations.
⚠️ Why it matters:
CVE‑2023‑5654 can allow attackers to exploit the React Developer Tools extension to perform unauthorized fetch operations. By disabling the extension at the OS level, you mitigate this risk immediately, especially in test or lab environments where upgrading may not be immediately feasible. This quick mitigation provides a practical demonstration of securing your environment against known vulnerabilities.
CVE-2024-50066: Kernel Mitigation Vulnerability
PoC video
Description
📜This script applies security mitigations to reduce the risk of CVE-2024-50066, a vulnerability in the Linux kernel that can lead to privilege escalation. It modifies system settings to prevent exploitation without requiring a kernel update or patching.
CVE-2024-50066 is a race condition vulnerability affecting the Linux kernel, specifically involving the mremap() and madvise(MADV_COLLAPSE) system calls in environments using Transparent Huge Pages (THP) with tmpfs. Under certain conditions, this flaw can lead to a page table corruption, allowing an attacker to gain kernel privileges from an unprivileged process.
The mitigation script addresses this issue by:
- Disabling Transparent Huge Pages (THP), which is a key factor in triggering the vulnerability.
- Ensuring THP remains disabled across reboots by modifying the GRUB configuration.
- Restricting the use of mremap() and madvise() for unprivileged processes by adjusting kernel parameters.
This reduces the attack surface while keeping the system functional.
- Security Without Patching – Not all environments can immediately update the Linux kernel. This script provides a temporary but effective mitigation.
- Prevents Privilege Escalation – By disabling THP and restricting system calls, it minimizes the risk of an attacker exploiting the vulnerability.
- Easy Deployment – A simple script that automates the mitigation process with minimal impact on system performance.
x_detection
CVE-2025-21231 - IP Helper Denial of Service Vulnerability
PoC video
Description
❗ CVE-2025-21231 is a Denial of Service (DoS) vulnerability affecting the IP Helper service in Microsoft Windows systems. This vulnerability allows an unauthenticated attacker to send specially crafted packets to the IP Helper service, causing it to crash or become unresponsive. Successful exploitation can lead to significant disruptions, impacting network communication and system availability.
ℹ️ This detection script assists in identifying potential exposure to CVE-2025-21231 by checking the status of the IP Helper service (iphlpsvc) on your system:
Check IP Helper Service Status:
Attempts to retrieve the status of the iphlpsvc service.
If the service is running, it indicates potential vulnerability.
If the service is installed but not running, the system is less likely to be affected.
If the service is not installed, the system is likely not affected by this vulnerability.
✅ Running this detection script will enable you to quickly assess whether their system is potentially vulnerable to CVE-2025-21231.
CVE-2023-29357: Detect EoP SharePoint Server
Description
Verify Microsoft Defender & AMSI Integration for CVE-2023-29357
This script checks if the SharePoint environment is present by attempting to load the SharePoint snap-in and then verifies whether Microsoft Defender (WinDefend) is running. It also prompts you to confirm that AMSI integration is enabled since there’s no built-in PowerShell cmdlet to check it automatically.
Why It Matters
Proper configuration of both AMSI integration and Microsoft Defender is key to protecting your SharePoint Farm against CVE-2023-29357. This detection script provides a quick check to ensure that Microsoft Defender is active and serves as a reminder to verify AMSI integration manually, thus helping maintain the security posture of your SharePoint environment.
CVE-2021-26855: Mitigate Windows ProxyLogon
PoC video
Description
📜 Restricting Access on Port 443
This script implements a Windows Firewall-based mitigation to restrict inbound HTTPS (port 443) traffic on your Exchange server. It targets CVE-2021-26855 (ProxyLogon) by blocking all inbound connections on port 443 and then allowing access only from a list of trusted IP ranges. This helps reduce the attack surface by limiting exposure to untrusted networks.
🚀 Why It Matters
CVE-2021-26855 is a critical vulnerability affecting Microsoft Exchange Servers that allows remote attackers to execute code and potentially compromise the entire system. By restricting access to port 443, you limit external exposure and protect your infrastructure until a permanent patch can be applied.
🛠️ How to Use
- Customize the Trusted IPs: Update the $trustedIPs array with your organization’s trusted IP ranges.
- Run with Elevated Privileges: Execute the script on your Exchange server using PowerShell as an administrator.
- Review Firewall Rules: Verify that the new firewall rules are correctly applied and test connectivity from trusted sources.
CVE-2022-41040: Detect Exchange Server Vulnerability
Description
🔒 Detect CVE‑2022‑41040
This script detects if your Microsoft Exchange Server is vulnerable to CVE‑2022‑41040 and checks whether the mitigation has been applied.
🔍 How it works:
The detection script first attempts to retrieve the Exchange Server build version using the ExSetup.exe command. It compares this version against predefined thresholds to determine if the system falls within the vulnerable range. Additionally, it loads the WebAdministration module and checks for the presence of the URL Rewrite rule ("PowerShell - inbound")—which is used as a mitigation measure—on the default website.
⚠️ Why it matters:
Timely detection of CVE‑2022‑41040 is essential for maintaining the security of your Exchange Server. Identifying vulnerable builds and confirming the application of mitigations ensure that systems are not left exposed to exploitation, helping prevent unauthorized access and potential data breaches.
CVE-2021-26855: Detect ECP Malicious Activity
PoC video
Description
📜 Scanning IIS Logs for Suspicious /ecp/ Activity
This script scans IIS log files for suspicious HTTP POST requests to the /ecp/ endpoint, a common target in exploitation attempts of CVE-2021-26855 (ProxyLogon). It filters log entries by a configurable time window and uses a regular expression to detect the pattern "POST /ecp/," helping identify potential malicious activity.
🚀 Why It Matters
Early detection of exploitation attempts is crucial to prevent successful attacks. Monitoring IIS logs for abnormal requests to sensitive endpoints such as /ecp/ allows administrators to quickly respond to suspicious activity and mitigate potential breaches before they escalate.
🛠️ How to Use
Configure Log Path: Set the $LogPath parameter to point to your IIS log file(s).
Adjust Time Window: Modify the $TimeWindowHours parameter to ensure the log entries fall within the desired review period.
Run the Script: Execute the script in PowerShell with appropriate permissions. Check the output for any suspicious log entries indicating possible exploitation.
CVE-2025-21333 - Elevated Privilege Exposure in Windows Hyper-V by Microsoft
PoC video
Description
❗ CVE-2025-21333 is an elevation of privilege vulnerability affecting Windows Hyper-V's NT Kernel Integration Virtualization Service Provider (VSP). An attacker could exploit this vulnerability to escalate their privileges, potentially gaining full control over the Hyper-V host. This could lead to unauthorized access to sensitive data and system takeover.
ℹ️ This detection script helps identify whether a system is potentially vulnerable by checking the status of the Hyper-V feature:
Check Hyper-V Installation:
Determines whether the Hyper-V feature (Microsoft-Hyper-V-All) is installed and enabled on the system.
If the feature is enabled, the system might be exposed to CVE-2025-21333 if security patches have not been applied.
If Hyper-V is not enabled, the system is likely not exposed to this vulnerability.
✅ Running this detection script allows you to quickly assess whether your system is potentially vulnerable to CVE-2025-21333.
CVE-2023-5654: Detect React DevTools Vuln.
Description
🔒 React Developer Tools Vulnerability Detection
This script checks for the presence of the React Developer Tools extension in your Chrome profiles and verifies its version to determine if it’s vulnerable to CVE‑2023‑5654. It scans typical extension directories, reads the extension’s manifest.json, and compares the version against the patched threshold (4.28.4).
🔍 How it works:
The script searches for Chrome extension folders in standard locations (including custom paths and wildcard user directories).
It locates the folder for the React Developer Tools extension using its unique ID (fmkadmapgofadopljbjfkapdkoienihi).
It reads the manifest.json file from the latest version subfolder to extract the extension’s version.
Finally, it compares the detected version with 4.28.4 and outputs whether the installed version is vulnerable or safe.
⚠️ Why it matters:
CVE‑2023‑5654 affects versions of the React Developer Tools extension prior to 4.28.4, exposing a vulnerability where the extension’s message listener can be exploited for arbitrary fetch requests. Detecting vulnerable installations is the critical first step in your security assessment or remediation process.
CVE-2024-50066: Kernel Detection Vulnerability
PoC video
Description
📜CVE-2024-50066 is a vulnerability affecting Linux systems that allows privilege escalation through improper handling of Transparent Huge Pages (THP) and unprivileged BPF (Berkeley Packet Filter) execution. Attackers can exploit these weaknesses to gain unauthorized access or execute arbitrary code with elevated privileges.
The vulnerability is particularly dangerous in multi-user environments where unprivileged users could leverage it to escalate their privileges. The misconfiguration of THP and inadequate restrictions on BPF execution contribute to the risk.
🚀Mitigating CVE-2024-50066 is crucial for maintaining system security, especially in environments handling sensitive data. Unpatched systems are at risk of privilege escalation attacks, potentially leading to data breaches, service disruptions, or unauthorized access to critical resources.
By applying the necessary security measures, system administrators can reduce the attack surface and enhance overall security posture.
x_ops
Uninstall Battle.net Silently
Description
📜 This PowerShell script is designed to fully remove Battle.net and its associated files, registry entries, and shortcuts from a Windows system. It ensures that no residual data remains after the uninstallation, preventing potential conflicts or issues with future installations.
🚀 Battle.net does not always fully uninstall when removed through traditional methods. Leftover files, registry keys, and shortcuts can cause issues, especially if you are troubleshooting errors or performing a clean reinstallation. This script automates the process, ensuring a thorough removal and saving time compared to manual deletion.
🛠️ How to Use
- Run as Administrator:
Open PowerShell as an administrator.
Execute the script to ensure it has the necessary permissions to remove files and registry keys.
- What the Script Does:
Terminates any running Battle.net processes.
Deletes all related installation folders and user data.
Removes registry entries associated with Battle.net.
Deletes shortcuts from the desktop and start menu.
Searches for and removes the Battle.net installer from common locations.
- Execution:
Save the script as Remove-BattleNet.ps1.
Open PowerShell as administrator and run:
Set-ExecutionPolicy Bypass -Scope Process -Force
.\Remove-BattleNet.ps1
Wait for the script to complete, ensuring that Battle.net is fully removed.
And that's it! Thanks for joining me on this week's recap!