Blog

Your blog category


Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/u824107984/domains/hack-y.in/public_html/wp-includes/kses.php on line 1805
Blog

Join Altered Security @ DEF CON 32

Hi everyone! We are super excited to announce that we are coming to the biggest hacker conference on the planet – DEF CON 32 at Las Vegas Convention Centre! This year is HUGE for us as we are involved in multiple activities. Choose one or more as per your convenience. Exhibitors Area Booth # 4 – August 9th to August 11th The easiest way to find is our booth in the Exhibitors area. Find us on Booth # 4 from August 9th to August 11th in the Exhibitors area. Find us and chat about our courses and certifications, our upcoming courses, community initiatives and anything red teaming, penetration testing and InfoSec in general Find the authors and creators of your favorite red team courses. I (Nikhil Mittal) will be there all days too. Also, get some really cool branded swag and DEF CON exclusive discounts! Adversary Village and Red Team Village – August 9th to August 11th We are Gold sponsors of the Adversary Village and the Red Team Village. Expect some of our swag and presence there too! Thank you to the crew of both the villages for this opportunity In-person DEF CON Training x 2 – August 12th and August 13th We are running two of our highly accoladed classes in-person at DEF CON training Active Directory Attacks for Red and Blue Teams – Advanced Edition and Azure Cloud Attacks for Red and Blue Teams – Basic Edition We hope to run into old friends and students and make new ones. See you at DEF CON. Nikhil Founder, Altered Security

Blog

when the hunter becomes the hunted: Using custom callbacks to disable EDRs

Intro In the ever-evolving landscape of cybersecurity, the race between attackers and defenders is relentless. Security mechanisms, particularly those at the kernel level, are designed to provide robust protection against sophisticated threats. However, as attackers continuously devise new methods to bypass these defenses, the hunters—our trusted Endpoint Detection and Response (EDR) systems—can themselves become the hunted. This blog delves into a chilling demonstration of how a signed rootkit, can leverage the PsSetCreateProcessNotifyRoutine function to cripple EDR processes. By registering a custom callback, this rootkit effectively blindsides security defenses, preventing critical EDR processes from starting and leaving the system vulnerable to undetected malicious activities. Join us as we explore this advanced threat tactic, emphasizing the urgent need for fortified kernel-level protections to maintain the integrity and effectiveness of our security infrastructure. How EDR is Detecting Processes once created ? When a process, such as malware.exe with PID 1234, is created, the functions CreateProcessA/W and NtCreateProcess are executed, triggering a system call to the Windows kernel. The kernel then invokes registered process creation notify routines by iterating over the nt!PspCallProcessNotifyRoutines array, which holds pointers to callback functions. These routines include callbacks registered by various drivers. In the image, the red-highlighted entries such as WdFilter.sys and mssecflt.sys represent drivers that are part of EDR systems, specifically for Windows Defender and Microsoft Defender for Endpoint (MDE), respectively. These EDR-specific drivers register callbacks to monitor and respond to process creation events. When a process creation event occurs, these callbacks are triggered, allowing the EDR system to inspect the process’s details, such as its command line arguments, its executable image, its memory usage, and other relevant information. Additionally, the EDR system might inject a DLL into the process’s memory to hook certain APIs, enhancing its ability to monitor and control the process for security purposes. By leveraging these callbacks, EDR systems can effectively detect and respond to potential threats in real-time. This mechanism allows them to perform thorough inspections and take appropriate actions, such as blocking malicious processes, alerting security administrators, or collecting forensic data for further analysis. Ensuring the integrity of these callback routines is crucial for maintaining robust security measures and preventing malicious actors from bypassing detection mechanisms.The PspCreateProcessNotifyRoutine array EDR (Endpoint Detection and Response) systems, antivirus software (AVs), and Sysmon (System Monitor) register callback routines in callback arrays so they get notified when a process or thread is created or when an image is loaded. These callbacks provide additional information that allows these security tools to detect malware at runtime. Patching or disabling these callbacks can blind EDRs, AVs, and Sysmon, preventing them from obtaining critical information about malware activities. Using WinDbg, a kernel debugger, I reversed the kernel to examine a specific callback array called PspCreateProcessNotifyRoutine. This array stores all the process creation notification callbacks registered by various drivers. Security software and EDR systems register their process creation callbacks in this array using functions such as PsSetCreateProcessNotifyRoutine, PsSetCreateProcessNotifyRoutineEx, and PsSetCreateProcessNotifyRoutineEx2. Each of these functions allows drivers to add their specific callbacks to the array, enabling them to monitor process creation events effectively. To get the actual address of the notification routines, I need to perform a bitwise AND operation on the values in the array with 0xFFFFFFFFFFFFFFF8. This operation aligns the addresses correctly. The result of this operation provides the actual addresses of the callback routines.

Blog

breaking through Defender’s Gates – Disabling Tamper Protection and other Defender components

SummaryWith the introduction of Tamper Protection, it has now become harder to disable Defender settings as an adversary. This is due to the fact that Tamper Protection and other Defender registry settings are protected by a Kernel-mode driver called WdFilter.sys. During my research I found it possible to abuse SYSTEM / TrustedInstaller privileges to tamper WdFilter settings and unload the kernel minidriver to disable Tamper protection and other Defender components. This also affects Microsoft’s Defender for Endpoint (MDE), blinding MDE of telemetry and activity performed on a target. I have created a POC called Disable-TamperProtection showcasing this bypass to disable WdFilter, Tamper Protection, Real-time protection (AMSI) and reinstate them back. A sample test against a target Server 2022 MDE testlab instance can be found below. The POC can be found on GitHub here: https://github.com/AlteredSecurity/Disable-TamperProtection NOTE: Administrative privileges are required to run the POC and technique. Description Tamper Protection in Windows Security helps prevent malicious apps from changing important Microsoft Defender Antivirus settings, including Real-time protection and cloud-delivered protection. With the introduction of Tamper Protection, it is not possible to disable Defender settings using commands such as: Set-MpPreference -DisableRealtimeMonitoring $true To disable Tamper Protection via registry, the registry subkey – TamperProtection located at HKLMSYSTEMCurrentControlSetServicesWinDefend should be set from 5 to 0/4. It is not possible to modify registry subkey values at HKLMSYSTEMCurrentControlSetServicesWinDefend even using SYSTEM / TrustedInstaller privileges because “Windows Defender has a kernel-mode driver (WdFilter.sys) that registers a Registry callback filter which protects Defender’s registry keys.”

Blog

Breaking through Defender’s Gates – Disabling Tamper Protection and other Defender components

SummaryWith the introduction of Tamper Protection, it has now become harder to disable Defender settings as an adversary. This is due to the fact that Tamper Protection and other Defender registry settings are protected by a Kernel-mode driver called WdFilter.sys. During my research I found it possible to abuse SYSTEM / TrustedInstaller privileges to tamper WdFilter settings and unload the kernel minidriver to disable Tamper protection and other Defender components. This also affects Microsoft’s Defender for Endpoint (MDE), blinding MDE of telemetry and activity performed on a target. I have created a POC called Disable-TamperProtection showcasing this bypass to disable WdFilter, Tamper Protection, Real-time protection (AMSI) and reinstate them back. A sample test against a target Server 2022 MDE testlab instance can be found below. The POC can be found on GitHub here: https://github.com/AlteredSecurity/Disable-TamperProtection NOTE: Administrative privileges are required to run the POC and technique. Description Tamper Protection in Windows Security helps prevent malicious apps from changing important Microsoft Defender Antivirus settings, including Real-time protection and cloud-delivered protection. With the introduction of Tamper Protection, it is not possible to disable Defender settings using commands such as: Set-MpPreference -DisableRealtimeMonitoring $true To disable Tamper Protection via registry, the registry subkey – TamperProtection located at HKLM\SYSTEM\CurrentControlSet\Services\WinDefend should be set from 5 to 0/4. It is not possible to modify registry subkey values at HKLM\SYSTEM\CurrentControlSet\Services\WinDefend even using SYSTEM / TrustedInstaller privileges because “Windows Defender has a kernel-mode driver (WdFilter.sys) that registers a Registry callback filter which protects Defender’s registry keys.”

Blog

When the hunter becomes the hunted: Using custom callbacks to disable EDRs

Intro In the ever-evolving landscape of cybersecurity, the race between attackers and defenders is relentless. Security mechanisms, particularly those at the kernel level, are designed to provide robust protection against sophisticated threats. However, as attackers continuously devise new methods to bypass these defenses, the hunters—our trusted Endpoint Detection and Response (EDR) systems—can themselves become the hunted. This blog delves into a chilling demonstration of how a signed rootkit, can leverage the PsSetCreateProcessNotifyRoutine function to cripple EDR processes. By registering a custom callback, this rootkit effectively blindsides security defenses, preventing critical EDR processes from starting and leaving the system vulnerable to undetected malicious activities. Join us as we explore this advanced threat tactic, emphasizing the urgent need for fortified kernel-level protections to maintain the integrity and effectiveness of our security infrastructure. How EDR is Detecting Processes once created ? When a process, such as malware.exe with PID 1234, is created, the functions CreateProcessA/W and NtCreateProcess are executed, triggering a system call to the Windows kernel. The kernel then invokes registered process creation notify routines by iterating over the nt!PspCallProcessNotifyRoutines array, which holds pointers to callback functions. These routines include callbacks registered by various drivers. In the image, the red-highlighted entries such as WdFilter.sys and mssecflt.sys represent drivers that are part of EDR systems, specifically for Windows Defender and Microsoft Defender for Endpoint (MDE), respectively. These EDR-specific drivers register callbacks to monitor and respond to process creation events. When a process creation event occurs, these callbacks are triggered, allowing the EDR system to inspect the process’s details, such as its command line arguments, its executable image, its memory usage, and other relevant information. Additionally, the EDR system might inject a DLL into the process’s memory to hook certain APIs, enhancing its ability to monitor and control the process for security purposes. By leveraging these callbacks, EDR systems can effectively detect and respond to potential threats in real-time. This mechanism allows them to perform thorough inspections and take appropriate actions, such as blocking malicious processes, alerting security administrators, or collecting forensic data for further analysis. Ensuring the integrity of these callback routines is crucial for maintaining robust security measures and preventing malicious actors from bypassing detection mechanisms.The PspCreateProcessNotifyRoutine array EDR (Endpoint Detection and Response) systems, antivirus software (AVs), and Sysmon (System Monitor) register callback routines in callback arrays so they get notified when a process or thread is created or when an image is loaded. These callbacks provide additional information that allows these security tools to detect malware at runtime. Patching or disabling these callbacks can blind EDRs, AVs, and Sysmon, preventing them from obtaining critical information about malware activities. Using WinDbg, a kernel debugger, I reversed the kernel to examine a specific callback array called PspCreateProcessNotifyRoutine. This array stores all the process creation notification callbacks registered by various drivers. Security software and EDR systems register their process creation callbacks in this array using functions such as PsSetCreateProcessNotifyRoutine, PsSetCreateProcessNotifyRoutineEx, and PsSetCreateProcessNotifyRoutineEx2. Each of these functions allows drivers to add their specific callbacks to the array, enabling them to monitor process creation events effectively. To get the actual address of the notification routines, I need to perform a bitwise AND operation on the values in the array with 0xFFFFFFFFFFFFFFF8. This operation aligns the addresses correctly. The result of this operation provides the actual addresses of the callback routines.

Blog

Join Altered Security @ DEF CON 32

Hi everyone! We are super excited to announce that we are coming to the biggest hacker conference on the planet – DEF CON 32 at Las Vegas Convention Centre! This year is HUGE for us as we are involved in multiple activities. Choose one or more as per your convenience. Exhibitors Area Booth # 4 – August 9th to August 11th The easiest way to find is our booth in the Exhibitors area. Find us on Booth # 4 from August 9th to August 11th in the Exhibitors area. Find us and chat about our courses and certifications, our upcoming courses, community initiatives and anything red teaming, penetration testing and InfoSec in general Find the authors and creators of your favorite red team courses. I (Nikhil Mittal) will be there all days too. Also, get some really cool branded swag and DEF CON exclusive discounts! Adversary Village and Red Team Village – August 9th to August 11th We are Gold sponsors of the Adversary Village and the Red Team Village. Expect some of our swag and presence there too! Thank you to the crew of both the villages for this opportunity In-person DEF CON Training x 2 – August 12th and August 13th We are running two of our highly accoladed classes in-person at DEF CON training Active Directory Attacks for Red and Blue Teams – Advanced Edition and Azure Cloud Attacks for Red and Blue Teams – Basic Edition We hope to run into old friends and students and make new ones. See you at DEF CON. Nikhil Founder, Altered Security

0
    0
    Your Cart
    Your cart is emptyReturn to Shop
    Scroll to Top