OSDP Auditing for Red Teamers and Facility Managers
Knud Højgaard (Principal Security Consultant · Fraktal)
BruCON 0x0F · Day 1
Overview
In this BruCON talk, Knud Højgaard of Fraktal presents a sobering and highly technical deep dive into the security posture of modern physical access control systems (PACS), specifically focusing on the Open Supervised Device Protocol (OSDP). Højgaard argues that despite OSDP's promise to replace the notoriously insecure Wiegand protocol, many implementations still fall short, introducing new complexities and attack surfaces that red teamers and facility managers must understand.

Key moments
- 2:00 Current physical access control: a "dumpster fire"
- 6:20 OSDP: The new standard for secure access control
- 11:00 OSDP Basic Profile: Not secure, encryption optional
- 23:00 Practical OSDP bus access and traffic analysis
- 48:00 Fuzzing OSDP access panels to cause crashes
- 53:00 Real-world panel vulnerabilities and quick vendor fixes
- 57:00 Attacker view shifts to complex OSDP system hacking
OSDP Auditing for Red Teamers and Facility Managers
Speakers: Knud Højgaard, Consultant, Fraktal
Conference: BruCON
YouTube: https://www.youtube.com/watch?v=uwKBKxdwJtc
Overview
In this BruCON talk, Knud Højgaard of Fraktal presents a sobering and highly technical deep dive into the security posture of modern physical access control systems (PACS), specifically focusing on the Open Supervised Device Protocol (OSDP). Højgaard argues that despite OSDP's promise to replace the notoriously insecure Wiegand protocol, many implementations still fall short, introducing new complexities and attack surfaces that red teamers and facility managers must understand.
The talk highlights the critical transition from easily exploitable "dumpster fire" Wiegand systems to OSDP, which, while offering bi-directional communication and encryption, often suffers from misconfigurations, reliance on default keys, and fundamental protocol design flaws. Højgaard provides practical methods for auditing OSDP installations, demonstrating how to sniff, inject, and fuzz traffic on the RS-485 bus, ultimately revealing vulnerabilities that can lead to denial of service, unauthorized access, or compromise of the access control panel itself. This presentation serves as a crucial wake-up call, emphasizing that "OSDP Verified" does not equate to secure, and robust security requires diligent auditing and adherence to best practices, moving beyond mere compliance.
Background
▶ Watch: Current physical access control: a "dumpster fire" (2:00)
The landscape of physical access control systems (PACS) has long been described as an "absolute dumpster fire" by security professionals due to widespread vulnerabilities. Traditional systems often rely on archaic protocols like Wiegand, which has been the gold standard for communication between card readers and access panels on the secure side of a door. Wiegand's fundamental flaw is its plaintext, unidirectional nature; when a token is presented, the reader simply "blurts a number over the wire," which then dictates access. This makes Wiegand systems trivial to exploit, with tools like the ESP Key (a $79 device) enabling easy sniffing and replaying of access credentials. Furthermore, many installations still use Mifare Classic cards, which have been known to be broken since 2007, allowing for easy cloning.
Beyond Wiegand, attack vectors against PACS are numerous and layered:
- Tokens: Easily cloned low-frequency tags, or hackable/exploitable high-frequency tags. Long-range reading (up to a meter) is also possible for some low-frequency tags.
- Readers: Often placed on the "danger side" of the door, readers are vulnerable to key extraction (e.g., from a low-security bike shed reader), reconfiguration to accept weaker card types (e.g., from secure DESFire to insecure Mifare Classic), malicious firmware flashing, or physical denial-of-service (DoD) attacks.
- Communication: Intercepting the wire between the reader and the access panel allows for recording and replaying manipulated token data.
- Access Panel/Backend Software: Attacking the backend often requires network access, creating a "chicken and egg problem" for attackers whose primary goal might be to gain physical access to the network. However, vulnerabilities in these systems can lead to zone jumping or unauthorized access once inside.
The Open Supervised Device Protocol (OSDP) was developed to address these glaring security deficiencies. Unlike Wiegand's simple point-to-point communication, OSDP aims to provide a robust, bi-directional, and networked communication standard. OSDP version 1, however, primarily focused on robust network communication and offered no security features. It was with OSDP version 2, developed by the Security Industry Association (SIA) and standardized by IEC in 2020 (IEC 60839-11-5), that features like encryption, smart card communication, and biometric reader support were introduced. The standard is free to use, but the documentation itself must be purchased. OSDP operates over half-duplex RS-485, supporting cable runs up to one kilometer and allowing multiple peripheral devices (readers) to communicate with a single control panel (ECU/CP). While "OSDP Verified" certifications exist, the speaker critically notes that these primarily test for conformance rather than true security, with optimistic phrasing in the standard that permits insecure implementations. For example, the OSDP Basic Profile, advertised as protecting against man-in-the-middle (MITM) attacks, is shown to be vulnerable to vampiric tapping on the bus, allowing sniff or injection of traffic even if cable tampering is detected.
Key Findings
▶ Watch: OSDP Basic Profile: Not secure, encryption optional (11:00)
The talk uncovers several critical findings regarding OSDP implementations and their real-world security implications:
- "OSDP Verified" Does Not Guarantee Security: The OSDP conformance testing primarily focuses on baseline functionality, not robust security. Devices can be "verified" while still being vulnerable to common attacks, as the standard's phrasing often uses "should" rather than "must," allowing for insecure configurations.
- Insecure Default Keys and Optional Encryption: The OSDP v2 Secure Channel, intended for encryption, frequently relies on a well-known, default shared key (SCBKD) that was originally a sample key in the specification. Furthermore, even when the secure channel is "enabled," encryption of data payloads is often optional and not mandated, leading to plaintext metadata and even card read events being transmitted unencrypted. This effectively nullifies the security benefits of OSDP, reverting to Wiegand-level vulnerabilities.
- Parser Vulnerabilities in Control Panels: Despite encryption, access control panels are susceptible to parser-level vulnerabilities. Sending malformed OSDP messages (e.g., card read events with zero-length data or excessively long data) can cause the panel to crash or hang, leading to a denial of service (DoS) and rendering the access system inoperable. These attacks work even when the secure channel is enabled and enforced, as they target the internal message processing logic.
- Secure Channel Reset Attacks: Attackers can force a reset of the secure channel by spamming the bus with random data or malformed packets (e.g., incorrect MAC or sequence numbers). During the re-establishment phase of the secure channel, a brief window can exist where unencrypted OSDP messages (like card read events) are accepted, bypassing the intended security mechanisms.
- Biometric and Smart Card Weaknesses: OSDP's support for biometrics can be problematic, with some implementations sending raw fingerprint image data (e.g., PGM format) instead of secure minutiae, creating privacy and security risks. Smart card communication, while supporting secure credentials, remains vulnerable to over-the-internet relay attacks, similar to credit card fraud, due to acceptable latency margins.
- Neglected Monitoring and Introspection: Facility managers rarely monitor OSDP-specific tamper alerts or detailed security logs. Events like "unexpected sequence number," "incorrect sequence number," or "CRC errors" are often dismissed as malfunctions rather than potential security incidents, creating significant blind spots for defenders.
- Complexity and Slow Standard Evolution: The increased complexity of OSDP compared to Wiegand (multi-drop bus, encryption, addressing) introduces more potential points of failure and misconfiguration. The slow evolution of the standard, coupled with proprietary restrictions (e.g., requiring NDAs or payment for documentation), hinders widespread secure adoption and proactive security improvements.
Technical Deep Dive
▶ Watch: Practical OSDP bus access and traffic analysis (23:00)
OSDP fundamentally shifts the physical access control paradigm from simple, unidirectional Wiegand to a more complex, bi-directional, and networked communication model. At its core, OSDP operates over a half-duplex RS-485 bus, supporting up to 127 devices over cable runs as long as one kilometer. This multi-drop capability allows a single Control Panel (CP), also referred to as an Access Control Unit (ECU) by IEC, to communicate with multiple Peripheral Devices (PDs), commonly known as readers. The CP acts as the client, constantly sending OSDP poll messages, and PDs respond to these polls, initiating communication only when prompted. This client-server model means PDs cannot initiate communication on their own.
The OSDP message format is structured, beginning with a static message marker, followed by the address of the target device, message length fields, and message control information. Crucially, this control information includes a very short, 4-value sequence number (0-3), which is primarily for ordering and not for security. Messages also contain a checksum or CRC for integrity, and a flag indicating whether security is enabled. If security is enabled, an additional security block is included, containing a Message Authentication Code (MAC) and an Initialization Vector (IV) for encryption. The actual command or reply (opcode) and its associated data payload are encapsulated within this structure.
The cornerstone of OSDP security is the Secure Channel (SC), introduced in OSDP v2. This channel is established using a shared key, often referred to as SCBKD (Secure Channel Base Key Default). Højgaard points out a significant flaw: a sample key provided in earlier versions of the specification evolved into the default key, which many vendors then implemented. This "everybody knows" key can be used to protect the communication channel during the initial key set events, where unique encryption keys are deployed. However, the standard requires the channel to be encrypted before these keys can be exchanged, creating a bootstrap problem. Furthermore, while the secure channel supports encryption, it is often not mandated for all data. As observed in packet captures, even with the secure channel enabled, OSDP poll messages and some data fields remain unencrypted (e.g., security block types 15 and 16 for panel-to-reader and reader-to-panel respectively, can indicate an unencrypted data field). This allows for bandwidth saving but compromises overall security, meaning a "secure channel enabled" checkbox on a compliance sheet does not guarantee data confidentiality.
To audit OSDP installations, physical access to the RS-485 bus is required. This can be achieved with a cheap USB to RS-485 dongle (around 5 EUR), which presents as a standard TTY device on a computer. Tools like htty can then be used to interact with the bus. For traffic analysis, Wireshark with custom coloring rules can quickly differentiate between encrypted and unencrypted traffic, using visual cues like red for bad (unencrypted) and green for good (encrypted). A common challenge in sniffing is that some devices pull the wire high (send FF) before a message, while others don't, which can confuse generic sniffers.
Packet injection and fuzzing are key attack techniques. While existing tools like libosdp are useful for building OSDP systems, they are generally not designed for breaking them without modification. Højgaard demonstrates that a few lines of Python code are sufficient to craft and inject arbitrary OSDP packets onto the bus, requiring only correct calculation of the CRC or checksum and adherence to basic protocol practicalities like message sizes. This capability allows attackers to exercise parsers in readers and panels.
Specific OSDP issues and attacks include:
- Multi-Drop Vulnerability: The long, multi-drop nature of the RS-485 bus means that a single compromise point can affect up to 127 devices, potentially allowing an attacker to bridge security zones (e.g., broom cupboard to server room).
- Plaintext Metadata Persistence: Even WithSecure channels, critical metadata might remain unencrypted. If a panel accepts plaintext card read events, it effectively negates the secure channel, bringing the system back to Wiegand's security level.
- Secure Channel Reset: Attackers can send malformed data (e.g., wrong MAC, out-of-sequence sequence numbers) to force a reset of the secure channel. This generates alerts but also provides an opportunity to observe the key exchange process and potentially inject unencrypted traffic during the brief re-establishment phase.
- Man-in-the-Middle (MITM) with SCBKD: If the default SCBKD key is in use, an attacker can perform a full MITM attack, decrypting, manipulating, and re-encrypting all traffic on the bus, effectively reducing the system to plaintext security.
- Timing Constraints: Attacks must be carefully timed to fit within the 200-millisecond poll timing window, which dictates a maximum payload of approximately 186 characters on a default 9600 baud bus. Exceeding this can trigger offline alerts, but attackers can often "choke" the bus with random data to force resets or take over the connection entirely.
OSDP_PDCAPMessage: This Peripheral Device Capabilities command can be sent to a reader to interrogate its configuration. The response contains a bit that indicates whether the default SCBKD is in use, providing a valuable auditing capability.
Demo / Proof of Concept
▶ Watch: Real-world panel vulnerabilities and quick vendor fixes (53:00)
Knud Højgaard presented several compelling proofs of concept and attack demonstrations, highlighting practical vulnerabilities in OSDP installations:
- Axius Access Panel Fuzzing:
- Target: An Axius access panel, purchased for 300 Euros on eBay, which included a baked-in user management system. This panel was chosen because its firmware could be cleanly unpacked using binwalk, making it amenable to analysis and exploitation.
- Vulnerability: The panel's OSDP message parser was found to be vulnerable to malformed card read events.
- Attack: By sending an OSDP card read event where the length field for the card data was set to zero (but no data was sent), the panel would misinterpret the message and crash. Similarly, sending an excessively long length value would cause the panel to attempt to read beyond its allocated buffer, leading to a crash.
- Impact: This denial of service (DoS) attack effectively takes the access control system offline, preventing legitimate access. Crucially, this vulnerability was effective even when the secure channel was enabled and enforced, demonstrating that parser bugs can bypass encryption.
- Methodology: The speaker used random fuzzing (sending garbage data) towards the OSDP parser, which resulted in numerous errors (wrong checksums, timeouts) but ultimately caused the panel to hang and crash.
- Cypress OSM1000 Secure Channel Tear-down and Bypass:
- Target: A Cypress OSM1000, identified as one of the cheapest OSDP panels available, which also functions as an OSDP-to-Wiegand converter. Notably, this device did support the default SCBKD key.
- Vulnerability: The device suffered from a secure channel tear-down vulnerability.
- Attack: By spewing random junk traffic onto the OSDP bus, the secure channel would be forcibly torn down. During the subsequent re-establishment process, there was a critical, albeit very short, window where the system, despite being configured to only accept secure channel communication, would briefly accept unencrypted OSDP card read messages.
- Impact: This allowed an attacker to sneak in a plaintext card read event, bypassing the encryption and authentication mechanisms.
- Vendor Response: The speaker highlighted the positive vendor response, with Cypress confirming and reproducing the bug within three days, releasing a fix within two weeks, and providing units for verification.
- Reader Reconfiguration and Key Extraction (Conceptual):
- Scenario: An attacker could intentionally misconfigure a reader's communication speed or key, causing it to go offline.
- Exploitation: When a technician replaces or reconfigures the "broken" reader, if it defaults to using the SCBKD or another known default key, the attacker (still sniffing the bus) can decode the traffic during the new reader's provisioning, capturing the new encryption keys being set.
- Fuzzing Display Data:
- Target: OSDP peripheral devices (readers) that support a display.
- Attack: Using a fuzzer like boofuzz, an attacker could craft malformed OSDP_TEXT commands to send corrupted or excessively long data to the reader's display.
- Impact: While not directly leading to access, this could cause the reader to crash, display garbage, or enter an unstable state, contributing to a denial of service or simply creating confusion.
These demonstrations underscore that even with OSDP's advancements, fundamental implementation errors, default configurations, and parser vulnerabilities create significant attack surfaces that can be exploited with relatively simple tools and techniques.
Defensive Implications
▶ Watch: Attacker view shifts to complex OSDP system hacking (57:00)
The detailed analysis of OSDP vulnerabilities provides critical insights for facility managers and security professionals tasked with defending physical access control systems. Moving beyond superficial compliance, defenders must adopt a proactive, security-first approach:
- Eliminate Wiegand and Enforce OSDP Secure Channel:
- Migrate: Immediately prioritize phasing out any remaining Wiegand installations. They are fundamentally insecure and easily exploitable.
- Mandate Secure Channel: When deploying OSDP v2, ensure the Secure Channel is always enabled, configured, and enforced for all communication, not just for key exchange. Do not rely on "basic profile" claims of MITM protection.
- Audit for Plaintext: Actively audit the bus to confirm that all sensitive data, including card read events, is encrypted. If plaintext card reads are accepted, the system is as vulnerable as Wiegand.
- Strong Key Management:
- Change Default Keys: The SCBKD (Secure Channel Base Key Default) is a known weak point. Never use the default key. Generate and deploy unique, strong encryption keys for each reader and panel during installation.
- Secure Key Storage: Ensure that encryption keys are not easily extractable from readers, especially those on the "danger side" of the door. Avoid master key schemes that concatenate shared secrets with public information for key derivation.
- Vigilant Monitoring and Alerting:
- Treat Anomalies as Security Events: Messages like "unexpected sequence number," "incorrect sequence number," "device timeouts," or "CRC errors" are not merely malfunctions. They are potential indicators of tampering or attack attempts (e.g., secure channel reset, fuzzing).
- Monitor Tamper Alerts: Ensure physical tamper switches on readers and panels are correctly configured and that alerts are actively monitored, not just logged in obscure files. Many organizations ignore these alerts, rendering them useless.
- Comprehensive Logging: Implement robust logging for OSDP events, and integrate these logs with security information and event management (SIEM) systems for analysis and alerting.
- Secure Reader Configuration:
- Disable Insecure Fallbacks: Many modern readers support multiple token types, including legacy, insecure ones (e.g., Mifare Classic) alongside secure ones (e.g., DESFire). Explicitly disable all insecure fallback modes.
- Physical Security: While "tamper-proof" screws and potting compound offer minimal security, physical protection of readers (e.g., monitoring with cameras, ensuring secure mounting) remains important. Cameras should not capture PIN codes.
- Avoid Speed Bumping: Do not increase the communication speed (baud rate) on the OSDP bus. It offers negligible performance benefits but significantly reduces the timing constraints for attackers, making injection and MITM attacks easier.
- Network and Architecture Considerations:
- Segment Networks: If access panels are multi-homed (connected to both the OSDP bus and the internal network), ensure proper network segmentation. Do not allow uncontrolled access from the physical access network to sensitive internal IT infrastructure.
- Isolate Security Zones: Avoid connecting low-security areas (e.g., a broom cupboard) to high-security areas (e.g., a server room) on the same OSDP bus if they share a common control panel, as a compromise of one could affect the other.
- Runtime Introspection: Demand and deploy systems that offer better runtime introspection capabilities. The current lack of "EDR for access control" makes it extremely difficult to detect sophisticated attacks.
- Vendor Engagement and Due Diligence:
- Question Standards: Be skeptical of standards that require payment or NDAs, as this can hinder open scrutiny and slow security improvements.
- Demand Security by Design: Prioritize vendors who demonstrate a strong commitment to security by design, respond promptly to vulnerabilities, and provide transparent information about their implementations. Learn from IT security best practices, favoring simplicity over new, untested complexities.
Key Takeaways
- OSDP is an improvement over Wiegand but introduces new complexities and attack surfaces. It moves the attack from simple sniffing to more sophisticated protocol hacking.
- "OSDP Verified" does not equate to secure. Compliance often focuses on functionality, not robust security, leaving critical vulnerabilities unaddressed.
- The Secure Channel is frequently undermined by default keys (SCBKD) and optional encryption. Many systems transmit plaintext data even when the secure channel is "enabled."
- Control panel message parsers are a significant vulnerability. Malformed OSDP packets can cause crashes and denial of service, even with encryption enabled, highlighting the need for robust input validation.
- Physical access to the RS-485 bus enables powerful attacks. With cheap hardware, attackers can sniff, inject, and fuzz OSDP traffic, leading to compromise.
- Defenders must actively audit, configure, and monitor OSDP systems beyond basic compliance. This includes changing default keys, enforcing encryption, and treating anomalous log entries as security incidents.
- The physical security industry needs to adopt IT security best practices. This includes favoring simplicity, open standards, and providing better runtime introspection capabilities for deployed systems.
About the Speaker(s)
Knud Højgaard is a consultant who works at Fraktal, a boutique consulting company. His expertise lies in physical access control systems, where he focuses on identifying and exploiting security weaknesses. Højgaard's work provides valuable insights for both red teamers looking to bypass physical security measures and facility managers seeking to defend their infrastructure.