Ransomware vs EDR: Inside the Attacker's Mind
Zoziel Freire (CSIRT Manager · Telefonica Brasil)
RTV Overflow 2026 (Red Team Village) · Day 1 · Main Stream
Overview
In this compelling talk at RTV Overflow, Zoziel Freire, a CSIRT Manager at Telefonica Brasil, delves deep into the cat-and-mouse game between modern ransomware strains and Endpoint Detection and Response (EDR) solutions. Freire, leveraging his extensive experience as a security analyst and developer, presents a detailed account of his research into building a custom ransomware simulator. The primary objective of this project was to rigorously test and bypass leading EDR tools across Windows, Linux, and macOS environments, offering a unique perspective from the attacker's mindset.

Key moments
- 0:47 Research goal: Bypassing security tools
- 4:00 Detailed ransomware attack kill chain
- 16:10 Developing a custom ransomware simulator
- 19:20 Deep dive into macOS persistence methods
- 23:50 Palo Alto Cortex EDR bypass demonstration
- 48:40 CrowdStrike macOS EDR bypass demonstration
- 54:00 Ransomware code and blue team recommendations
- 57:15 Q&A: Manufacturer feedback and code release
Ransomware vs EDR: Inside the Attacker's Mind
Speakers: Zoziel Freire, CSIRT Manager, Telefonica Brasil
Conference: RTV Overflow
YouTube: https://www.youtube.com/watch?v=64Y-i6e_uA0
Overview
In this compelling talk at RTV Overflow, Zoziel Freire, a CSIRT Manager at Telefonica Brasil, delves deep into the cat-and-mouse game between modern ransomware strains and Endpoint Detection and Response (EDR) solutions. Freire, leveraging his extensive experience as a security analyst and developer, presents a detailed account of his research into building a custom ransomware simulator. The primary objective of this project was to rigorously test and bypass leading EDR tools across Windows, Linux, and macOS environments, offering a unique perspective from the attacker's mindset.
Freire's research is critically important for the cybersecurity community, particularly for blue teams and security architects. By demonstrating the efficacy of relatively simple, custom-developed ransomware in circumventing sophisticated EDR defenses, he highlights significant gaps in current endpoint protection strategies. The talk serves as a stark reminder that even with advanced security tools, a thorough understanding of attacker techniques, continuous threat hunting, and robust incident response playbooks remain indispensable for effective defense against evolving ransomware threats.
Background
▶ Watch: Research goal: Bypassing security tools (0:47)
Ransomware has evolved from a nuisance to a pervasive and highly destructive threat, capable of crippling entire organizations by encrypting critical data and demanding payment for its release. Freire begins by outlining the typical ransomware kill chain, a multi-stage process that attackers follow to achieve their objectives. This chain typically commences with initial access, often via spear phishing with malicious attachments, exploiting vulnerabilities in exposed services like Remote Desktop Protocol (RDP), or compromising cloud identities. Following initial access, attackers focus on execution (e.g., using cmd.exe or PowerShell), establishing persistence (e.g., scheduled tasks, registry modifications, fake services, boot logon items), and achieving privilege escalation (e.g., using tools like Mimikatz to gain system or domain admin rights).
The subsequent stages involve discovery, where attackers map the network, identify critical assets, shares, and backups; lateral movement using tools like PSExec or protocols such as WMI, RDP, and SMB; and collection and exfiltration of sensitive data, often using virtual private servers (VPS) to obscure their activities. The final and most impactful stage is impact, where encryption begins, rendering files inaccessible and disrupting operations.
Endpoint Detection and Response (EDR) solutions are designed to counter these threats by providing continuous monitoring of endpoint activities. They collect telemetry, perform behavioral analysis using machine learning and heuristic algorithms, and compare activities against known Indicators of Compromise (IoCs). EDRs aim to offer real-time alerts, root cause analysis, and recommended actions to mitigate incidents. However, Freire notes that the efficacy of EDRs can be challenged by sophisticated or custom-built malware, especially when attackers bypass initial detection layers. He also emphasizes that initial access often bypasses traditional defenses, with credentials frequently available for sale on the dark web and deep web, allowing attackers to jump directly to later stages of the kill chain. He cites a real-world example from Brazil where valid employee credentials led to a compromise of a software company and subsequent movement on the Brazilian Central Bank.
Key Findings
▶ Watch: Developing a custom ransomware simulator (16:10)
Freire's extensive testing revealed a concerning trend: even market-leading EDR solutions often struggled to prevent the full impact of his custom-developed ransomware. Across Windows, Linux, and macOS, a consistent pattern emerged where EDRs either failed to detect the initial execution, allowed significant portions of the attack chain to complete (especially file encryption), or were easily bypassed by simple obfuscation techniques like renaming the malicious binary.
Specifically, his findings indicated:
- Widespread Encryption Success: Nearly all tested EDRs, with some exceptions, permitted the ransomware to encrypt files on the target systems. This highlights a critical vulnerability in the core protection offered against data loss.
- Persistence Mechanisms Largely Undetected: Custom persistence methods, whether through macOS
launchdagents, Windows scheduled tasks, or Linuxcrontaband user-level services, often went unnoticed or were only detected after the fact. - Bypass by Renaming: A recurring and alarming finding was the ability to bypass EDRs like Panda Adaptive Defense and Sophos simply by renaming the ransomware binary, indicating a reliance on signature-based detection or reputation services that are easily circumvented.
- Inconsistent Detection Stages: While some EDRs (e.g., Kaspersky) successfully blocked C2 communication or prevented wallpaper changes, they still allowed the most critical action: encryption. This suggests an incomplete or prioritized detection logic that misses the ultimate impact.
- Mac and Linux Vulnerabilities: The tests on macOS and Linux systems demonstrated similar bypass capabilities, underscoring that these operating systems are not inherently more secure against tailored ransomware attacks when EDRs fail.
These findings collectively underscore the importance of a multi-layered defense strategy that goes beyond relying solely on EDRs, emphasizing proactive threat hunting, robust incident response, and continuous security awareness training.
Technical Deep Dive
▶ Watch: Palo Alto Cortex EDR bypass demonstration (23:50)
Freire's research began with the ambitious goal of creating a threat simulator to test security tools, which quickly evolved into a project focused on bypassing them. His primary tool for developing the ransomware simulator was Python, chosen for its flexibility and widespread use in development. However, he also utilized Java for specific situations, particularly for applications prevalent in Brazilian banking environments.
The custom ransomware simulator incorporated several key functions mimicking real-world ransomware behavior:
- Cryptographic Function: Designed to encrypt files, rendering them unusable without the decryption key.
- Directory Scanning: The initial version scanned specific directories, but Freire quickly adapted it to perform a full scan of the target system to identify all potential files for encryption.
- Ransom Note Creation: A function to create a
READMEfile on the desktop, containing instructions for the victim. - Wallpaper Change: A distinct function to change the desktop wallpaper, often used by ransomware to visually signal the attack. This proved to be a challenge, requiring OS-specific adjustments for Windows 10, Windows 11, Linux, and macOS.
A significant portion of Freire's technical deep dive focused on persistence mechanisms across different operating systems:
- macOS Persistence: This was a particular challenge due to the expense of macOS devices in Brazil, but Freire invested heavily in studying Apple's documentation. He identified three key domains for persistence:
- Local Domain: For applications and developer libraries.
- System Domain: For essential system components.
- User Domains: Specific to individual users.
Freire primarily focused on the user domain, leveraging launchd agents. These agents, defined by .plist files, can be configured to run automatically upon user login or system boot. Crucially, ~/Library/LaunchAgents (in the user's home directory) allows persistence without requiring administrator or root permissions, making it an attractive target for attackers. In contrast, /Library/LaunchAgents and /System/Library/LaunchAgents typically require elevated privileges. His example plist file, com.trad.paylist, demonstrated how to configure a Python script to execute every time the macOS system boots or reboots.
- Windows Persistence: Freire utilized common Windows persistence techniques, including:
- Registry Run Keys: Modifying
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runto launch programs at startup. - Scheduled Tasks: Creating tasks that execute the ransomware at specified intervals or events.
- Linux Persistence: For Linux, Freire focused on:
- Crontab: Scheduling tasks to run periodically, a common method for user-level persistence without root privileges.
- User-Level Services: Creating services that operate within the user's context, again avoiding the need for root access.
The overall Proof of Concept (PoC) workflow for the ransomware simulator involved:
- Identifying and finding target files (e.g., Word, Excel, PDF).
- Compressing these files.
- Transferring the compressed files to a Command and Control (C2) server or Virtual Private Server (VPS).
- Initiating file encryption.
- Creating persistence.
- Changing the desktop wallpaper.
- Leaving a ransom note on the desktop.
Freire also briefly showcased his Linux ransomware code, highlighting its modular structure with distinct functions for file encryption, directory traversal (finding specific extensions), ransom note creation, crontab and service persistence, file compression, transfer via FTP, and wallpaper modification, often using a pre-downloaded image. This modularity underscores the ease with which attackers can adapt and deploy such tools.
Demo / Proof of Concept
▶ Watch: CrowdStrike macOS EDR bypass demonstration (48:40)
Freire's presentation included several live demonstrations and recorded proof-of-concept videos against various EDR solutions. Each test followed the established ransomware workflow: finding files, compressing, exfiltrating to a C2/VPS, encrypting, establishing persistence, changing wallpaper, and leaving a ransom note.
- Palo Alto Cortex (Windows):
- Outcome: Complete failure. Cortex, with all features including anti-exploit and anti-ransomware enabled, did not detect the initial execution or any subsequent malicious activities.
- Details: The ransomware successfully found and transferred files, encrypted them, created registry persistence, added a scheduled task, changed the wallpaper, left a ransom note, and even created a new local administrator user named "headteam." No alerts were triggered, and the attack went entirely unimpeded.
- CrowdStrike (Windows):
- Initial Test (Binary): The custom binary did not work as expected.
- Script Test: Using his Python script (aggressive mode enabled for all features), CrowdStrike allowed the full attack chain.
- Details: Similar to Cortex, CrowdStrike allowed file finding, compression, transfer to C2, encryption (changing extensions to
.X), scheduled task creation, persistence, wallpaper change, and user creation. Despite the EDR running, files became unopenable. - Later Test (New Binary): A new binary developed two years after the initial research also successfully bypassed CrowdStrike, allowing full encryption, C2 exfiltration, wallpaper change, persistence, and creation of a new user (
arv).
- Kaspersky (Windows):
- Outcome: Mixed. Kaspersky blocked C2 communication, file transfer, wallpaper change, and persistence, but critically allowed file encryption.
- Details: While the ransomware could not exfiltrate data or visibly alter the desktop, the core impact of data encryption still occurred. This highlights a prioritization flaw where preventing cosmetic changes or exfiltration is prioritized over preventing the fundamental data loss.
- Panda Adaptive Defense (Windows):
- Initial Test: Panda successfully blocked the initial execution of the ransomware binary, triggering an alert ("Windows can access the specific device file. You may not have the appropriation permission...").
- Bypass Test: Freire simply renamed the ransomware binary.
- Outcome: Complete bypass. After renaming, Panda failed to detect any malicious activity.
- Details: The renamed binary successfully encrypted files, communicated with the C2, established persistence, changed the wallpaper, and left a ransom note. This demonstrated a significant weakness in Panda's detection capabilities against simple obfuscation.
- Sophos (Windows):
- Bypass Test: Similar to Panda, Freire renamed the ransomware binary (e.g., to
calculator.exe). - Outcome: Complete bypass. Sophos, even with its agent running, showed no events or alerts.
- Details: The renamed ransomware successfully transferred files to the VPS, encrypted them, created scheduled tasks and persistence, created the
headteamuser, and changed the wallpaper. Encrypted files were unopenable, indicating a full compromise.
- Kaspersky (Linux):
- Outcome: Mixed. Kaspersky allowed encryption and persistence but blocked file transfer.
- Details: The test involved a brute-force attack to gain initial access, followed by the ransomware. Kaspersky allowed the brute-force attack, password identification, and subsequent download of the ransomware. The ransomware then encrypted files, created
crontabpersistence, and established a user-level service. However, it prevented file exfiltration.
- Trend Micro Deep Security (Linux):
- Outcome: Complete failure. Deep Security allowed the full attack chain.
- Details: The EDR allowed brute-force access, password identification, download of the ransomware, file encryption,
crontabpersistence, and file exfiltration to the C2. No actions were taken by the agent.
- Bitdefender (macOS):
- Outcome: Mixed. Bitdefender allowed encryption but blocked wallpaper changes and persistence.
- Details: The EDR detected "safe files right access for this application" (referring to the zip file creation and transfer), but only considered changing the wallpaper and creating persistence as malicious. Encryption itself was permitted, leading to data loss.
- CrowdStrike (macOS):
- Outcome: Complete failure. CrowdStrike allowed the full attack chain.
- Details: The ransomware successfully found and compressed files, transferred them to the C2, encrypted files (changing extensions to
.punish), changed the wallpaper, and established persistence using alaunchdplist file (e.g.,com.Python.tradimulator.plist). Encrypted files were unopenable.
These demonstrations collectively painted a picture of EDRs struggling against custom, albeit relatively simple, ransomware, often failing at critical junctures or being easily circumvented by basic evasion tactics.
Defensive Implications
▶ Watch: Q&A: Manufacturer feedback and code release (57:15)
Freire concludes his talk with critical recommendations for defenders, emphasizing that technology alone is insufficient without a robust security posture and proactive measures.
- Preserve the Chain of Custody: In any incident, maintaining a clear and untampered chain of custody for evidence is paramount. This ensures that forensic analysis is accurate and reliable, facilitating effective investigation, containment, and eradication.
- Understand and Leverage Logs: Defenders must deeply understand how logs work across their entire environment. This includes Web Application Firewalls (WAFs), EDRs, antivirus solutions, Active Directory, and all other critical systems. Comprehensive log analysis is essential for detecting anomalies, identifying attacker techniques, and performing thorough root cause analysis.
- Master Persistence Mechanisms: Attackers rely heavily on persistence. Blue team professionals must study and understand all common (and uncommon) persistence techniques across Windows, Linux, and macOS. Freire specifically highlighted the learning curve for macOS persistence (e.g.,
launchdagents) as a critical area for defenders. Knowing where to look for persistence (e.g.,~/Library/LaunchAgentson macOS,crontabon Linux, scheduled tasks/registry on Windows) is key to finding and eradicating threats. - Learn from Every Incident: Each security incident, regardless of its scale, is an invaluable learning opportunity. Organizations should meticulously document, analyze, and extract lessons from every compromise or attempted breach to continuously improve their defenses.
- Harden Security Tools: EDRs and other security tools are not set-and-forget solutions. They require continuous hardening, tuning, and configuration adjustments to maximize their effectiveness against evolving threats. Regularly review and update policies to address new attacker techniques.
- Team Training and Threat Simulation: Investing in continuous training for security teams is crucial. This should include threat simulation exercises, where custom attack scenarios (like Freire's ransomware simulator) are used to test the team's detection and response capabilities. Developing comprehensive checklists and ensuring robust telemetry collection are vital components of these simulations.
- Proactive Threat Hunting: Freire strongly advocates for proactive threat hunting. As he noted, ransomware attacks often involve initial access and reconnaissance phases that can last for weeks before the final impact. Engaging in active threat hunting activities allows defenders to identify and neutralize attackers early in the kill chain, preventing the devastating consequences of encryption. "Activity hunt," as he calls it, is a powerful way to prevent these attacks weeks in advance.
Key Takeaways
- EDR Solutions Have Detectable Gaps: Even leading EDR products can be bypassed by custom ransomware, particularly when simple obfuscation techniques like renaming binaries are employed.
- Encryption Often Succeeds Despite EDR: Many EDRs failed to prevent the core ransomware action—file encryption—even when they successfully blocked other stages like C2 communication or wallpaper changes.
- Persistence is a Critical Blind Spot: Custom persistence mechanisms across Windows, Linux, and macOS (e.g.,
launchdagents,crontab, scheduled tasks) are frequently overlooked or only detected post-compromise. - Proactive Threat Hunting is Essential: Relying solely on automated EDR alerts is insufficient. Active threat hunting can detect attackers in the early stages of the kill chain, weeks before the encryption phase.
- Defense-in-Depth and Training are Paramount: A holistic approach involving strong incident response, comprehensive logging, tool hardening, and continuous team training is crucial, rather than relying on a single security solution.
- Understanding Attacker Techniques is Key for Defenders: Blue teams must deeply understand how attackers operate, including their methods for initial access, execution, and persistence across diverse operating systems.
About the Speaker(s)
Zoziel Freire is a CSIRT Manager at Telefonica Brasil, bringing extensive experience as a security analyst and developer to the cybersecurity community. He describes himself as passionate about analysis and development, dedicating his personal time to researching and testing security tools. Freire is also a strong advocate for community engagement, frequently participating in cyber events, sharing his knowledge, and exchanging ideas with peers. His contributions include workshops and talks at various conferences, demonstrating his commitment to advancing collective cybersecurity understanding. His research, as presented in this talk, focuses on uncovering vulnerabilities in operating systems and security solutions, with a particular interest in the evolving landscape of ransomware.
Reviews
Dr. Zero (Offensive Security Researcher) — SOLID
Zoziel Freire wrote a basic Python ransomware script and threw it at top-tier EDRs. The results are a hilarious and depressing reminder that the endpoint security emperor is naked. It's not a technical breakthrough, but watching CrowdStrike and Cortex completely fail to stop vanilla file encryption is a necessary reality check.
Heather Calloway (CISO) — SOLID
A sobering reality check for any security leader who treats their EDR deployment as a complete ransomware strategy. By demonstrating how easily custom simulators bypass market-leading tools across all operating systems, the speaker proves that our detection safety nets are highly porous and require active, manual validation.