
PECDR
pedro-ibs/trekking
Desenvolvimento de um robô rádio-controlado/autônomo da moralidade “tracker”

OSDP attack tool (and the Elvish word for friend)
Mellon is an open-source printed circuit board by BishopFox, from the BishopFox/mellon repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 31 × 24 mm with 36 parts on 49 nets, routed with 305 tracks and 30 vias.
It is built around the MAX485CSA+, ADP2302ARDZ-5.0-R7 and B330. Its parts include 11 resistors, 10 capacitors, 4 diodes, 3 ICs and 3 connectors.
OSDP attack tool (and the Elvish word for friend)
OSDP supports, but doesn't strictly require, encryption. So your connection might not even be encrypted at all. Attack #1 is just to passively listen and see if you can read the card numbers on the wire.
Just because the controller and reader support encryption doesn't mean they're configured to require it be used. An attacker can modify the reader's capability reply message (osdp_PDCAP) to advertise that it doesn't support encryption. When this happens, some controllers will barrel ahead without encryption.
OSDP has a quasi-official “install mode” that applies to both readers and controllers. As the name suggests, it’s supposed to be used when first setting up a reader. What it does is essentially allow readers to ask the controller for what the base encryption key (the SCBK) is. If the controller is configured to be persistently in install-mode, then an attacker can show up on the wire and request the SCBK.
OSDP sample code often comes with hardcoded encryption keys. Clearly these are meant to be samples, where the user is supposed to generate keys in a secure way on their own. But this is not explained or made simple for the user, however. And anyone who’s been in security long enough knows that whatever’s the default is likely to be there in production.
So as an attack vector, when the link between reader and controller is encrypted, it’s worth a shot to enumerate some common weak keys. Now these are 128-bit AES keys, so we’re not going to be able to enumerate them all. Or even a meaningful portion of them. But what we can do is hit some common patterns that you see when someone hardcodes a key:
OSDP has no in-band mechansim for key exchange. What this means is that an attacker can:
You'll find proof-of-concept code for each of these attacks in attack_osdp.py. Checkout the --help command for more details on usage. This is a Python script, meant to be run from a laptop with USB<-->RS485 adapters like one of these. So you'll probably want to pick some of those up. Doesn't have to be that model, though.
If you have a controller you want to test, then great. Use that. If you don't, then we have an intentionally-vulnerable OSDP controller that you can use here: vulnserver.py.
Some of the attacks in attack_osdp.py will expect to be as a full MitM between a functioning reader and controller. To test these, you might need three USB<-->RS485 adapters, hooked together with a breadboard.
These issues are not, in isolation, exploitable but nonetheless represent a weakening of the protocol, implementation, or overall system.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | 10K | Resistor_SMD:R_0603_1608Metric | R5, R6, R7, R8 |
| 3 | 1K | Resistor_SMD:R_0603_1608Metric | R2, R9, R10 |
| 3 | LED | Diode_SMD:D_0603_1608Metric | D2, D3, D4 |
| 2 | 009176002022106 | footprints-KVX:CONN_9176_2WAY_KYO | J2, J3 |
| 2 | 10uF | Capacitor_Tantalum_SMD:CP_EIA-3216-18_Kemet-A | C5, C6 |
| 2 | 10uF | Capacitor_SMD:C_0603_1608Metric | C1, C7 |
| 2 | 20K | Resistor_SMD:R_0603_1608Metric | R3, R4 |
| 2 | 22pF | Capacitor_SMD:C_0603_1608Metric | C9, C10 |
| 2 | 22uF | Capacitor_SMD:C_0603_1608Metric | C3, C4 |
| 1 | 0.1uF | Capacitor_SMD:C_0603_1608Metric | C2 |
| 1 | 100K | Resistor_SMD:R_0603_1608Metric | R1 |
| 1 | 10uH | Inductor_SMD:L_1008_2520Metric | L2 |
| 1 | 120 | Resistor_SMD:R_0603_1608Metric | R11 |
| 1 | 1uF | Capacitor_SMD:C_0603_1608Metric | C8 |
| 1 | 32.768khz | Crystal:Crystal_SMD_MicroCrystal_CC7V-T1A-2Pin_3.2x1.5mm | X2 |
| 1 | 4077 | eec:Adafruit_Industries-4077-* | MD1 |
| 1 | 6.8uH | Inductor_SMD:L_TDK_VLS6045EX_VLS6045AF | L1 |
| 1 | ADP2302ARDZ-5.0 | Package_SO:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.29x3mm | U1 |
| 1 | AZ1117-3.3 | Package_TO_SOT_SMD:SOT-223 | U3 |
| 1 | B330 | Diode_SMD:D_SMA | D1 |
| 1 | LOGO | LOGO | G*** |
| 1 | MAX485CSA+ | footprints:21-0041B_8_MXM | U2 |
| 1 | ST_Nucleo_SWD_5p | Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_Vertical | J1 |
It measures 31 × 24 mm and has 2 copper layers, 1.6 mm thick.
36 parts, built around the MAX485CSA+, ADP2302ARDZ-5.0-R7 and B330. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the BishopFox/mellon repository on GitHub, at the commit this page was made from: the board is Mellon/Mellon.kicad_pcb and its schematic Mellon/Mellon.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

pedro-ibs/trekking
Desenvolvimento de um robô rádio-controlado/autônomo da moralidade “tracker”


DarekKrawczyk/MastersThesis
System to support management and control of plant cultivation


bluesatunsw/rocketry-datasat
Cubesat-shaped data collection payload for Rocketry's Griffon rocket

GoncaloMark/Turbina
Componente Hardware e Software para Turbinas Tesup carregarem baterias de 12V.


pypilot/pypilot_mfd
lcd display for various types of marine data including nmea0183, signalk and pypilot