Brain Waves Surfing - (In)Security in EEG (Electroencephalography) Technologies
Alejandro Hernandez (Consultant · IOActive)
BruCON 0x07 · Day 1
Overview
In his BruCON talk, "Brain Waves Surfing - (In)Security in EEG (Electroencephalography) Technologies," Alejandro Hernandez, a security consultant at IOActive, delves into the burgeoning world of EEG (Electroencephalography) devices and the critical, often overlooked, security vulnerabilities inherent in their current implementations. The presentation highlights a stark contrast between the rapid adoption of these brain-computer interface technologies across diverse industries—from medical diagnostics and prosthetics to neurogaming, military applications, and even neuromarketing—and the alarming absence of fundamental security controls. Hernandez argues that the state of EEG security today eerily mirrors the insecure landscape of Industrial Control Systems (ICS) and SCADA networks a decade ago, where functionality overshadowed security, leading to widespread vulnerabilities.

Key moments
- 2:50 Why EEG security is critical now
- 7:50 Understanding EEG limitations: the blimp analogy
- 13:20 Brain-to-brain interface: controlling actions remotely
- 28:30 Live demo: Sniffing brain waves via man-in-the-middle
- 34:00 Live demo: Modifying brain data due to no authentication
- 38:00 Remote Denial of Service on EEG monitoring software
- 49:30 Call to action: securing EEG, privacy, and future challenges
Brain Waves Surfing - (In)Security in EEG (Electroencephalography) Technologies
Speakers: Alejandro Hernandez, Consultant, IOActive
Conference: BruCON
YouTube: https://www.youtube.com/watch?v=oBTEwOZCsHY
Overview
In his BruCON talk, "Brain Waves Surfing - (In)Security in EEG (Electroencephalography) Technologies," Alejandro Hernandez, a security consultant at IOActive, delves into the burgeoning world of EEG (Electroencephalography) devices and the critical, often overlooked, security vulnerabilities inherent in their current implementations. The presentation highlights a stark contrast between the rapid adoption of these brain-computer interface technologies across diverse industries—from medical diagnostics and prosthetics to neurogaming, military applications, and even neuromarketing—and the alarming absence of fundamental security controls. Hernandez argues that the state of EEG security today eerily mirrors the insecure landscape of Industrial Control Systems (ICS) and SCADA networks a decade ago, where functionality overshadowed security, leading to widespread vulnerabilities.
The talk serves as an urgent wake-up call to researchers, developers, and users of EEG technologies. Hernandez demonstrates that these devices and their associated software are prone to common network and application attacks, including sniffing, data modification, and denial of service (DoS). By dissecting the underlying communication protocols, data formats, and software architectures, he exposes a systemic lack of encryption, authentication, and resilience. This research underscores the imperative to integrate security by design into EEG systems, emphasizing that as brain-derived data becomes increasingly valuable and sensitive, its protection is paramount to prevent potential misuse, privacy breaches, and even direct physical harm through compromised control systems.
Background
▶ Watch: Why EEG security is critical now (2:50)
Electroencephalography (EEG) is a non-invasive method used to record and study the electrical activity of the brain, typically taken from the scalp. This technology captures the minute electrical signals generated by the synchronous activity of millions of neurons—the excitable cells in our brain that communicate through electrical and chemical signals. These signals, known as brain waves, vary depending on a person's mental state, with different frequencies (measured in microvolts and Hertz, typically between 1-30 Hz) corresponding to states like sleep, focus, or relaxation. For instance, beta waves are higher when one is awake and focused.
Historically, EEG originated in the medical industry for diagnosing neurological disorders such as seizures and sleep conditions. However, in recent years, its accessibility has dramatically increased, moving from expensive, specialized medical hardware to consumer-grade devices like the NeuroSky MindWave, which can be purchased for around $100. This democratization of technology has fueled its adoption across an astonishing array of fields:
- Clinical Use: Still vital for diagnosing disorders, with patient data often stored digitally and sometimes uploaded to cloud platforms for complex algorithmic analysis.
- Prosthetics and Control: Using brain waves to control mechanical limbs, drones, helicopters, or other robotic processes (e.g., controlling a mechanical ankle or hand with an Arduino board).
- Brain-to-Brain Interfaces: Advanced research, such as that at the University of Washington, demonstrates direct brain-to-brain communication where one person's thoughts (e.g., thinking of pressing a finger) are transmitted via the internet to another person's brain, inducing an unconscious action using a Transcranial Magnetic Stimulator (TMS).
- Biometrics: Exploring "past thoughts" as a biometric mechanism for authentication, as researched at Harvard.
- Military Applications: Soldiers converting brain waves into commands or identifying threatening scenarios by analyzing neural responses to images.
- Neurofeedback and Arts: Creating music or art based on brain activity.
- Neurogaming and Neuromarketing: Controlling video games with thoughts, or using brain waves to gauge emotional responses (e.g., focus, anger, sadness) for product development or even geo-tagging emotions.
- Social Matching: Platforms like "Tinder but with EG data" matching individuals based on their brainwave patterns.
- Legal Context: Using EEG results as evidence in court cases to potentially influence trial outcomes.
Despite this rapid expansion, Hernandez draws a critical parallel to the security landscape of Industrial Control Systems (ICS) and SCADA networks a decade ago. At that time, the focus was solely on functionality, with little to no consideration for security. Today, those systems are plagued by vulnerabilities. Hernandez warns that EEG technologies are following the same dangerous path, emphasizing the urgent need to embed security at the foundational level before these nascent "Internet of Brain Waves" systems become entrenched with critical, unaddressed security deficiencies.
Key Findings
▶ Watch: Brain-to-brain interface: controlling actions remotely (13:20)
Alejandro Hernandez's research reveals a pervasive and alarming lack of security in contemporary EEG technologies, impacting both commercial and open-source solutions. His key findings can be summarized as follows:
- Absence of Foundational Security Controls: A fundamental lack of encryption, authentication, and resilience mechanisms is widespread. Hernandez noted that approximately 90% of the technical manuals he reviewed for EEG products made no mention of standard security keywords like "crypto," "authentication," or "passwords."
- Insecure Communication Protocols: Many EEG systems rely on TCP/IP as their communication protocol, often transmitting sensitive brain data in cleartext without any application-layer security. Libraries like LSL (Lab Streaming Layer), used across various programming languages in research, also send data in raw binary format without encryption or authentication. This makes them highly susceptible to basic network attacks.
- Vulnerability to Common Network Attacks:
- Sniffing and Replay Attacks: Due to the lack of encryption, an attacker on the network can easily intercept and capture live brainwave data. This captured data can then be replayed to manipulate connected devices or systems.
- Data Modification (Man-in-the-Middle): Without authentication, an attacker can not only sniff but also alter brainwave data or associated metadata (like patient names) in transit, leading to potentially critical misdiagnoses or unauthorized control.
- Denial of Service (DoS): EEG servers and applications are highly vulnerable to DoS attacks. Hernandez demonstrated that simple techniques, such as flooding a server with 10,000 connections (a "90s technique"), can cause systems like OpenViBE and Neuroelectrics NIC to crash or hang.
- File Format Vulnerabilities: The "Tower of Babel" of proprietary EEG file formats, coupled with the standardized EDF (European Data Format), presents a significant attack surface. Hernandez's "trivial fuzzing" (using tools like
mangle.cwith real brain signal samples) quickly uncovered numerous vulnerabilities, including buffer overflows, memory corruption, and arithmetic errors, within the parsing routines of both commercial and open-source EEG software. A malformed EDF header, for instance, could crash the Neuroserver application. - Insecure Infrastructure and Outdated Practices: Hernandez identified instances of brainwave data being stored in insecure shared folders, accessible via remote desktop, and running on outdated operating systems like Windows XP. Furthermore, official guidelines from organizations like the American Clinical Neurophysiology Society for recording clinical EEG on digital media were found to be significantly outdated, referencing technologies like magnetic storage and CD-ROMs, rather than addressing modern cybersecurity threats.
- Lack of Vendor Awareness: When reporting vulnerabilities, Hernandez noted that some commercial vendors were slow to respond and seemed largely unaware of standard security practices, vulnerability disclosure programs, or the urgency of patching critical flaws.
These findings collectively paint a picture of an emerging technology sector that has yet to mature in its security posture, posing substantial risks as EEG applications become more integrated into critical and sensitive domains.
Technical Deep Dive
▶ Watch: Live demo: Sniffing brain waves via man-in-the-middle (28:30)
The technical vulnerabilities in EEG systems stem from a combination of insecure communication protocols, poorly secured application layers, and susceptible data handling practices. Hernandez meticulously dissected these areas, revealing common security pitfalls.
Communication Protocols and Lack of Encryption:
A primary vector for attack is the widespread use of TCP/IP for transmitting real-time brainwave data. Many systems, including the Neuroserver and various research platforms, stream data directly over TCP ports without any form of encryption. Hernandez highlighted examples from product brochures where systems advertised features like "real-time analysis received over the network via TCP" or remote commanding via specific TCP ports (e.g., 1235) for streaming and stimulation control. This design choice inherently exposes the data to network-based attacks.
The Lab Streaming Layer (LSL), a popular open-source library used in neuroscience research for synchronizing and streaming data, was also found to transmit data in raw binary format. While LSL facilitates interoperability across different programming languages (e.g., Python, C++, Java), its core sending and receiving routines lack built-in encryption or authentication, making any LSL-enabled data stream vulnerable.
Data Formats and Processing:
Brain signals, initially analog, undergo a process of digital conversion, amplification, filtering, and sampling before being transmitted or stored. Each electrode on the scalp corresponds to a "channel" in the digital data stream. This data is then encoded into specific formats. For instance, the Neuroserver encodes brainwave values into its own proprietary format, which an attacker would need to understand to decode the intercepted data. This complexity, however, does not negate the underlying security flaws.
File Format Vulnerabilities (The "Tower of Babel"):
Hernandez referred to the diverse landscape of EEG data storage as the "Tower of Babel" of file formats. Many vendors create their own proprietary file formats for storing brainwave recordings, leading to compatibility issues between different systems and a fragmented security landscape. While the EDF (European Data Format) emerged as a standard in the early 90s (EDF) and early 2000s (EDF+) to address interoperability, it is not immune to vulnerabilities.
Hernandez's research focused on fuzzing these file formats. Fuzzing involves feeding malformed or unexpected inputs to a program to uncover vulnerabilities. Using a trivial fuzzer like mangle.c and samples of real brain signals (both his own and from databases like Fionet), he successfully identified:
- Buffer Overflows: Occurring when a program attempts to write more data into a fixed-size buffer than it can hold, potentially overwriting adjacent memory and leading to crashes or arbitrary code execution.
- Memory Corruption: General errors in memory management that can lead to unpredictable program behavior.
- Arithmetic Calculations: Bugs related to how the software handles numerical operations, especially with unusual or boundary-condition inputs.
A concrete example of a file format vulnerability was demonstrated with Neuroserver. By sending a malformed EDF header to the server, Hernandez caused it to crash with an assertion failure and core dump. He also detailed a specific memory corruption bug involving an array of client structures designed for a maximum of 16 clients. When more connections were made, the lack of validation allowed the index to exceed the array bounds, leading to an invalid memory dereference and a segmentation fault.
Application-Layer Vulnerabilities and Denial of Service:
Beyond network and file format issues, the application logic itself often lacks robustness. Hernandez demonstrated that many EEG servers, despite being critical components in medical or control systems, are susceptible to basic Denial of Service (DoS) attacks.
- Connection Floods: A simple C code script, creating thousands of simultaneous connections to the target TCP port, was sufficient to crash or hang applications like OpenViBE and Neuroelectrics NIC. This is a classic resource exhaustion attack, highlighting a failure to properly handle concurrent connections or implement rate limiting.
- Malicious Input: As shown with the malformed EDF header, even specific, non-volumetric malicious input can trigger application crashes, underscoring poor input validation.
These technical flaws, when combined with outdated infrastructure (e.g., Windows XP systems, unsecured shared folders) and a general lack of security awareness, create a highly exploitable environment for critical brain-computer interface technologies.
Demo / Proof of Concept
▶ Watch: Remote Denial of Service on EEG monitoring software (38:00)
Alejandro Hernandez’s presentation included several compelling live demonstrations and recorded proof-of-concept videos to illustrate the practical implications of the identified security vulnerabilities. These demos showcased how easily EEG data can be intercepted, modified, or disrupted due to the absence of fundamental security controls.
Demo 1: Man-in-the-Middle (MITM) for Sniffing Brain Waves
- Setup: Hernandez used a NeuroSky MindWave consumer EEG device, connected via Bluetooth to a Windows computer running BrainBay software. BrainBay then sent the brainwave data to a TCP sender, which forwarded it to a remote Neuroserver running on a virtual machine named Daria.
- Attack: An attacker machine (running Linux, presumably with tools like
arpspoofandWireshark) performed an ARP poisoning attack. This positioned the attacker in the middle of the communication path between the Windows client and the Neuroserver. - Result: The demo clearly showed Hernandez’s real-time brain waves being displayed on the Neuroserver. Simultaneously, the attacker’s machine was able to intercept and display a complete copy of the unencrypted brainwave packets. This demonstrated that without encryption, sensitive neural data is easily sniffed by anyone on the same network segment.
Demo 2: Man-in-the-Middle for Data Modification (Lack of Authentication)
- Setup: The same NeuroSky MindWave, BrainBay, TCP sender, and Neuroserver setup was used.
- Attack: The attacker machine, again positioned in the middle, intercepted the data stream. This time, instead of just copying, the attacker actively modified specific bytes within the data. For demonstration purposes, Hernandez showed the modification of a patient's ASCII name from "Alejandro" to "John Conor."
- Result: While the client sent data associated with "Alejandro," the Neuroserver received and displayed the patient name as "John Conor." Hernandez emphasized that this modification could apply to any single byte in the stream, including the actual brainwave values themselves. This highlights the critical lack of authentication and integrity checks, allowing for unauthorized and potentially dangerous data manipulation.
Demo 3: Denial of Service (DoS) via Connection Flooding
- Target Software: Hernandez targeted OpenViBE (an open-source software for brain-computer interfaces) and Neuroelectrics NIC (a commercial product).
- Attack: He used a simple C code script designed to open 10,000 concurrent TCP connections to the target EEG server's port.
- Result: In the recorded demonstration, the OpenViBE software, which was displaying real-time brain waves, suddenly froze and crashed after being hit by the connection flood. Similarly, the Neuroelectrics NIC application became unresponsive, refusing any new connections and effectively hanging. This demonstrated that these modern EEG systems are vulnerable to rudimentary DoS techniques, akin to how industrial PLCs would crash from basic Nmap scans years ago.
Demo 4: Denial of Service (DoS) via Malformed EDF Header
- Target Software: The Neuroserver application.
- Attack: Hernandez created a specially crafted, malformed EDF (European Data Format) header. EDF is a standard file format for EEG data. He then sent this malformed header over a TCP socket to the Neuroserver.
- Result: The Neuroserver immediately crashed, displaying a "beautiful assertion" error and a core dump. He further elaborated on underlying memory corruption issues, such as an invalid memory dereference (segmentation fault) caused by exceeding an array's bounds (e.g., a client array with a max of 16 clients, but no validation on connection count). This proved that even specific, non-volumetric malicious input could lead to critical system failures.
These demonstrations collectively underscored the fragility of current EEG security implementations, illustrating how common attack vectors can compromise the integrity, availability, and confidentiality of highly sensitive brain data.
Defensive Implications
▶ Watch: Call to action: securing EEG, privacy, and future challenges (49:30)
The vulnerabilities exposed by Alejandro Hernandez necessitate a comprehensive re-evaluation of security practices within the EEG technology landscape. Defenders, including researchers, developers, medical professionals, and system administrators, must adopt a proactive and multi-layered approach to secure these increasingly critical systems.
- Security by Design: The most crucial implication is the need to integrate security into the design phase of all EEG hardware and software. Security should not be an afterthought or a bolt-on solution. This includes considering potential threats, attack surfaces, and defensive measures from the earliest stages of product development.
- Implement Robust Encryption: All EEG data, whether in transit or at rest, must be encrypted.
- Data in Transit: For network communication, SSL/TLS tunnels or similar secure protocols should be mandatory. If an existing EEG application or library (like LSL) does not support encryption natively, developers should implement secure tunnels as a workaround. This prevents sniffing and Man-in-the-Middle attacks.
- Data at Rest: Stored brainwave data, especially in clinical or research settings, must be encrypted on disk and secured with strong access controls. Insecure practices like storing data in unencrypted shared folders or on outdated systems like Windows XP must cease immediately.
- Strong Authentication Mechanisms: Systems must authenticate both users and devices.
- Device-to-Server: Middleware, devices, and servers should mutually authenticate to ensure that data is only accepted from trusted sources. This prevents unauthorized devices from injecting malicious or spoofed brainwave data.
- User Authentication: Access to EEG data and control systems should be protected by strong, multi-factor authentication.
- Data Integrity: Beyond authentication, mechanisms like digital signatures or message authentication codes (MACs) should be employed to verify the integrity of brainwave data, ensuring it has not been tampered with during transmission or storage.
- Enhance System Resilience: EEG servers and applications must be designed to withstand common attacks, particularly Denial of Service (DoS).
- Input Validation: Implement rigorous input validation for all incoming data, including network packets and file headers, to prevent crashes from malformed inputs.
- Resource Management: Servers should properly manage connections, implement rate limiting, and gracefully handle resource exhaustion to prevent simple connection floods from bringing down critical services.
- Secure Coding Practices: Developers must adhere to secure coding guidelines to prevent common vulnerabilities like buffer overflows, memory corruption, and improper error handling, which were shown to lead to system crashes.
- Standardization and Secure File Formats: The "Tower of Babel" of proprietary file formats needs to be addressed.
- Promote Secure Standards: Encourage the adoption and secure implementation of standardized file formats like EDF, with a focus on robust parsing routines.
- Fuzzing and Vulnerability Disclosure: Researchers should actively fuzz existing and new file formats to identify and report vulnerabilities, fostering a culture of continuous security improvement.
- Regular Security Assessments:
- Penetration Testing: Conduct regular penetration tests on EEG devices, software, and integrated systems.
- Vulnerability Scanning and Fuzzing: Systematically scan for known vulnerabilities and employ fuzzing techniques to uncover new flaws in both commercial and open-source solutions.
- Code Review: Perform thorough security code reviews of EEG applications.
- Update Guidelines and Regulations: Professional societies and regulatory bodies (e.g., in healthcare) must update their guidelines for digital media storage and cybersecurity to reflect modern threats and best practices. These guidelines should specifically address the unique privacy and security challenges posed by brainwave data.
- Future-Proofing with "Bio-signals Firewalls": Hernandez envisions a future where specialized security appliances, akin to Deep Packet Inspection (DPI) firewalls for industrial networks, could act as "bio-signals firewalls." These firewalls would understand EEG protocols and data formats, inspecting layer 7 traffic to identify and block malicious or corrupted brainwave packets, thereby providing an additional layer of defense for critical applications.
By implementing these defensive strategies, the EEG community can begin to build more secure, resilient, and trustworthy systems, protecting the integrity and privacy of human brain data as this technology continues its rapid advancement.
Key Takeaways
- EEG is a New, Unsecured Attack Surface: The rapid adoption of EEG technologies across critical sectors (medical, military, control systems) and sensitive personal applications (neuromarketing, biometrics) has created a significant, largely unsecured attack surface.
- Fundamental Security Lacking: Most EEG devices and software lack basic security controls such as encryption for data in transit and at rest, robust authentication mechanisms, and resilience against common network attacks like Denial of Service (DoS).
- Vulnerability to Common Attacks: EEG systems are easily susceptible to sniffing, data modification (Man-in-the-Middle), and crashes from connection floods or malformed data inputs (e.g., malformed EDF headers), demonstrating that "90s techniques" are still effective.
- Insecure Infrastructure and Outdated Practices: Widespread use of insecure communication protocols (cleartext TCP/IP), proprietary file formats with parsing vulnerabilities, and reliance on outdated infrastructure (e.g., Windows XP, unsecured shared folders) compound the security risks.
- Urgent Need for "Security by Design": There is an urgent imperative for researchers, developers, and vendors to integrate security from the ground up, implementing secure coding practices, strong encryption, authentication, and resilience into all EEG products and systems.
- Analogy to SCADA is a Warning: The current state of EEG security mirrors the insecure landscape of Industrial Control Systems (SCADA) a decade ago, serving as a stark warning that failure to act now will lead to widespread and potentially severe consequences.
About the Speaker(s)
Alejandro Hernandez is a security consultant at IOActive, a well-known security company specializing in consulting services and research. He possesses a background in Computer Systems Engineering and is a passionate enthusiast of fuzzing and programming. Hernandez has developed several security tools, including dotdotpwn for directory traversal attacks and an L-file format fuzzer, which he presented at Black Hat Arsenal. While he did not study neuroscience formally, he embarked on this EEG research a year prior to the talk, learning the subject from scratch. He hails from Mexico and has presented this research at other notable conferences, including Defcon.