DEF CON 31 - Badge of Shame Breaking into Secure Facilities with OSDP -Dan Petro, David Vargas

  Переглядів 81,301

DEFCONConference

DEFCONConference

8 місяців тому

Breaking into secure facilities used to be possible by inserting a listening device (such as an ESPKey) behind an RFID card reader and sniffing the unencrypted Wiegand badge numbers over the wire as they go to the backend controller. The physical security industry has taken notice and there's a new sheriff in town: The encrypted protocol OSDP which is starting to be rolled into production. Surely encryption will solve our problems and prevent MitM attacks right? ... right?
In this presentation, we'll demonstrate over a dozen vulnerabilities, concerning problems, and general "WTF"s in the OSDP protocol that let it be subverted, coerced, and totally bypassed. This ranges from deeply in-the-weeds clever cryptographic attacks, to boneheaded mistakes that undermine the whole thing. We will also demonstrate a practical pentesting tool that can be inserted behind an RFID badge reader to exploit these vulnerabilities.
Get your orange vest and carry a ladder, because we're going onsite!

КОМЕНТАРІ: 53
@infectedrainbow
@infectedrainbow 7 місяців тому
'Just because it was intentional, doesn't make it not a vulnerability.' I guffawed. Reminds me of all the 'it is working as intended' arguments I have with our devs. Thank you for the great talk.
@von...
@von... 7 місяців тому
good news boss, we refactored the Samsung Smartfridge integration & reduced the amount of backdoors it had into the customer payment servers by over 10%!
@rogerioar
@rogerioar 7 місяців тому
Would def win a best slides award
@57thorns
@57thorns 6 місяців тому
I love the thing about the two feet wire "reasonably likely not have a listening device on it".
@JulianSildenLanglo
@JulianSildenLanglo 7 місяців тому
Considering the fact that these devices are literally designed to read hardware security tokens, you'd think it would be obvious to use one of those to transfer the setup key for the server.
@Geo_bot
@Geo_bot 6 місяців тому
*aggressively reduces overhead* *polls everything constantly*
@emmafountain2059
@emmafountain2059 7 місяців тому
When he gets into that undisclosed location in Santa Fe NM I need a copy of whatever book he happens to find lying around.
@oliphab7468
@oliphab7468 7 місяців тому
*Me in my secure hand drawn building in Santa Fe, New Mexico*😮
@trfdude
@trfdude 7 місяців тому
This is like DECT phones - everybody thought they were encrypted and then people realised they weren't. Pretty much overnight, DECT PCMCIA cards became worth more than their weight in gold.
@outwithrealitytoo
@outwithrealitytoo 7 місяців тому
The intention of the master key (MK) would be to have it installed at manufacture, of clients and servers. This would ensure that pairing could only occur between devices sharing the MK. However were that MK compromised (by either a production facility leak or a poor physical security on the encryption modules) then it becomes a worthless appendage to a now broken security scheme. Unfortunately throwing away the MK doesn't fix the scheme. - if you are designing a protocol with symmetric key scheme, DUKPT is always worth a look. With a touch of salt and pepper is covers a lot of practical bases. As soon as the slide with "polling" came up I felt a bit queasy. "But it works" is not a defence. Neither is "it follows the letter of the specification". I suspect the project was hurried and on an unrealistic budget. It has the feel of a PoC put into production. Note: RS485 is an electrical rather than protocol standard, and is largely chosen for range as well as multi-drop - which is great if you are running cable around a building! Tried, tested, off-the-shelf; good choice).
@christopherleubner6633
@christopherleubner6633 6 місяців тому
Havent went to DefCon in years, but discources like these were my favorite thing about the convention. ❤
@tyeth
@tyeth 7 місяців тому
I wonder if you could influence the data+/- to remove the current data, like having 4 current clamps, 2 per wire, hooked up in some transformer cancelling fashion, and you could influence those with the esp32. You'd then be able to control that to add data back on the wire. Surely it must be possible to flatten the data on a differential pair through noise or retardation (think transformer/inductor) if you have enough length / separation and influence/power.
@jfwfreo
@jfwfreo 7 місяців тому
I wonder how much of this is down to the spec writers not knowing about crypto or security, how much is down to the priorities being wrong (e.g. wanting smaller packet sizes at the expense of security, wanting something that is simpler to implement or wanting something that requires less hardware to pull off) and how much is intentional (i.e. deliberate back doors for some reason)
@jfbeam
@jfbeam 6 місяців тому
I would always attribute it to the desire ("customer requirement") for it to be "simple". Loading certificates, syncing keys, etc. is a pain in the ass, but it's also 100% required for _anything_ to ever be secure. If you use anything that was on it "from the factory" (thus potentially knows to others), it's not secure.
@wesley00042
@wesley00042 5 місяців тому
It's the result of anything built by committees instead of professionals and hidden behind patents and paywalls instead of open for public inspection. (See also WEP/WPA, DVD/CSS, etc.)
@MaverickBlue42
@MaverickBlue42 7 місяців тому
For that last question, MiM wouldn't be much harder, tap each wire twice and cut the piece in the middle...
@rogerioar
@rogerioar 7 місяців тому
One of the best talks
@Sycophantichallenger
@Sycophantichallenger 7 місяців тому
Cool. Nice presentation!
@steven44799
@steven44799 7 місяців тому
the OSDP security systems we have run their RS485 bus at only 9600 baud as that allows them to get much greater cable run distances which would make the brute force even worse.
@erwin2487
@erwin2487 7 місяців тому
great talk, but i guess you have missed the most important countermeasures from the conclusion: - don't use the same wiring (bus) to connect high-critical and not-so-critical access devices - get rid of old-fashined insecure RFID stuff and use modern chip technologies (supporting asymmetric cryptography etc.)
@henke37
@henke37 7 місяців тому
The password being "default" is a punchline in a point and click adventure game, not a suitable cryptographic key.
@christopherleubner6633
@christopherleubner6633 6 місяців тому
That and admin are the two most common ones unfortunately.
@theelmonk
@theelmonk 6 місяців тому
You could artificially 'kill' a reader if you're on a multidrop bus by corrupting the bus every time it transmits
@InstrucTube
@InstrucTube 6 місяців тому
Yeah, people really don't realize that "encryption" isn't a magic bullet. Throw all the encryption at me that you want, if you do a dumb and leave an obvious vulnerability I'll breeze right past it.
@57thorns
@57thorns 6 місяців тому
The fun thing is the 10 Mbit one could use a decent sized package, a 1kHz polling frequency (allowing for a couple of hundred doors to be polled several times per second) and despite allowing for more attack per seconds, you'd still be waiting way more than 35 days (on average).
@My1xT
@My1xT 6 місяців тому
SSH is not nesecarily insecure, it allows and in fact highly recommends to actually verify the key sent by the server.
@reybontje2375
@reybontje2375 6 місяців тому
It'd be interesting to see a card reader with a programmable certificate authority, cards that hold certificates, and the ability to push signed CRLs to the readers. Then, you wouldn't need a controller.
@xcoder1122
@xcoder1122 6 місяців тому
Sadly all known problems and many 101. Optional encryption pretty often means no encryption in practice as you can never be sure it is used and even if you want to use it, an attacker may find a way to convince a component to deny encryption and everything is unencrypted again (Downgrade Attack, as shown in the video). Even if this can be avoided by a policy, users will forget to set it. Just don't make encryption optional. If encryption is too slow, which rarely ever is the case today, settle for a weaker one which provides only moderate security but at least make that one mandatory. Replay attacks? Come on, that's 101. 32 bits would have been fine, IPsec uses 32 bits by default. Sure, it can use 64 bits but that's an optional extension rarely used in practice and only really required on super high speed links where the 32 bits would overflow too quickly and you'd otherwise constantly have to renegotiate session keys (which can be pretty expensive if PFS is used). BTW, even when IPsec sequence numbers are 64 bits, only the last 32 bits of them are actually transmitted over the line, so there's not more protocol overhead, but the full 64 bit are used when calculating the HMAC. Reducing HMAC size? Sure, IPsec does that as well but it reduced 128 or 160 bits to 96 bits, which is still decent. Since SHA2, the reduction is 50% and thus at least 128 bits are sent. Not reusing IVs? Again, 101. Not so critical with CBC encryption, as long as the first few bytes of data are always different, but deadly in many other cases (e.g. CTR/GCM). One device sending a nonce? That's bad per se. A session key should always be derived by two nonces. Why? If an attacker has full control over the generation of the nonce on one side, e.g. because he controls the random number source that is used to generate it, it won't help him unless he can also control the nonce at the other side (very, very unlikely). Setup keys exchanged over the same line as encrypted data later on? Also 101. Even in case of SSH you'd first use a password to access the server, then install your public key there and from this moment on, you can use public key auth. How do you get the inital password? Well, certainly not over the same connection that SSH uses. Not encrypt everything? Encryption should always been treated as if it was an afterthought, yet it should never be an afterthought, of course. Think of TLS. To make HTTP secure, TLS was imposed on it. There are no parts of HTTP exposed as HTTP doesn't even know that it is encrypted and TLS doesn't even know that it is encrypting HTTP. Use a hardcoded default key? LOL!
@hazels1967
@hazels1967 5 місяців тому
Quick note on the cost of the OSDP standard document: it's cheaper if you buy it from the Estonian standards body, EVS, where it is called EVS-EN IEC 60839-11-5:2020. If you buy 1 license you have to use a stupid DRM'd web reader thing, but if you buy a 2 seat multi-user license to the spec (which costs about €50 total) you get it as a PDF (with your name and iirc IP address burnt into every page to discourage sharing it) you can download, look at with normal PDF software, print out etc. Hope that helps!
@ghostrider-be9ek
@ghostrider-be9ek 6 місяців тому
I dont consider my self an expert in any of this, in any way, but I was able to make to 3:00 mark without being completely lost! well done presenter
@LeifNelandDk
@LeifNelandDk 7 місяців тому
Cheap rfid locks where the keypad and controller is outside the door are unsafe and hackable "just connect red and yellow" or even by a strong magnet triggering the relay.
@berndeckenfels
@berndeckenfels 7 місяців тому
Can a rough reader clone or record the badges? (I.e. are the challenges safe enough?)
@My1xT
@My1xT 6 місяців тому
what what about that default key SCBK-D, if that is set to a fixed value by the protocol, how do you get rid of that weakness additionally couldnt the key exchange by secured by having the key on a card that can be read into that reader, e.g. having an "admin" card to config the reader and then tapping another card which has the key, which sets the key?
@Kisai_Yuki
@Kisai_Yuki 6 місяців тому
Watching this, and comparing it to when I replaced the controller server at a client's location. The RS422 box at the controller end was just a USB dongle plugged into a Windows XP machine. The software was just a program on the server that track and log the provisioned cards. A third party had to come in and actually "backup" the old server's install, and then install the new version on the new server. The real weakness in this, is when nobody monitors the access, because every time a door is tapped, it CAN send an email to somewhere. So even if you cloned a card, you really only have one or two attempts before whoever gets the notifications should be contacting the card owner and asking if they are having trouble getting in the building, and when they say "what? I'm not at the office" send security out to that door. So that Install mode, is likely always turned on, because the underlying server, when rebooted for software updates or it just BSOD's for whatever reason, has to start up again, because if the server turns off, all the readers also lose power.
@1337GameDev
@1337GameDev 7 місяців тому
Why wouldn't they just do Diffy-Helmann key exchange as is what's done with HTTPS? I can understand the need for a root public key, but that should merely need to require basic setup in install mode, which could be provided as a one time key via a flash drive / sd card. Could be susceptible to man-in-the-middle if you can reset the reader, provide your own key, and then pretend to be another "controller" in the middle, but that seems difficult. Then just encrypt everything with the public key.... and only the controller can read the valid data. Plus, you can then request a nonce, and use the public key of the reader to encrypt that, so the reader is the only one who can read the nonce. This seems "solved".....Why are modern companies still cutting these corners?
@TehNoobiness
@TehNoobiness 7 місяців тому
Because management looks at the estimated dev time and balks at paying for it.
@JoeTaber
@JoeTaber 6 місяців тому
When will they make badges that provide a proof with asymmetric encryption? The way they're done now is like writing your password on a sticky note and pasting it on your forehead in line at the coffee shop.
@christopherleubner6633
@christopherleubner6633 6 місяців тому
Yup most are wide open for general access badges.😂
@57thorns
@57thorns 6 місяців тому
Cryptography is hard, security is shard, cryptographical security is doubly hard.
@erroneum
@erroneum 6 місяців тому
In regards to establishing a man-in-the-middle attack while on site, would it not be sufficient if you were wanting to not interrupt the service to essentially have the device tap it twice with a gap between them, then to cut the wire between the taps?
@petergamache5368
@petergamache5368 6 місяців тому
Correct ... and this isn't hard to DIY. Here's a cheap "RS485 interposer" that's super fast to install (with some practice): 1. Design your attack device with a RJ45 plug interface. Ex: Upstream on pins 1/2, Downstream on pins 7/8. 2. Insert the wire pair you're attacking into a RJ45 punch-down keystone jack: One wire punched to 1 & 7, the other punched to 2 & 8, leaving an extra inch or so of slack between the sides. 3. Plug in and enable your MITM attack device. 4. Snip the wires bridging the punch-down jack, close to one side. 5. Do the sneaky stuff. 6. When done, take the slack and double-punch across the jack to re-unite the downstream and upstream sides, leaving the keystone jack behind. 7. Pocket your attack device and skedaddle! Post-attack, the presence of a punched-down but disconnected RJ45 jack is unlikely to draw attention unless your target is a very tightly run institution. If this is a concern, leave more slack and use a splicing butt connection instead (McMaster Carr 7056K24), then gently remove the RJ45 prior to vacating the site. Low voltage installers use these splices by the hundreds, so they'll blend in almost anywhere.
@simonisenberg4516
@simonisenberg4516 5 місяців тому
I love these "The emperor#s new clothes" type talks that just try to shame people into doing it right.
@sparkybearbomb533
@sparkybearbomb533 6 місяців тому
Also, don’t put PII or CII on the rfid cards Imagine finding a card saying bill smith and company X, now you have a card and the user deets
@terranzoid
@terranzoid 7 місяців тому
Defcon presenter using windows!
@LeonDerczynski
@LeonDerczynski 7 місяців тому
11:44 💀
@OBGuy
@OBGuy 7 місяців тому
Nothing but "dizayn".
@TouYubeTom
@TouYubeTom 6 місяців тому
echo chamber audio horror
@Gunbudder
@Gunbudder 7 місяців тому
dude's logo is VERY similar to the Faze Clan logo and its extremely distracting. i would change that asap lol
@Talie5in
@Talie5in 7 місяців тому
Or FaZe Clan should change as they were founded 5 years after Bishop Fox? 😅
LIVE - Парад Победы в Москве. 9 Мая 2024
2:27:56
AKIpress news
Переглядів 2,2 млн
Этого От Него Никто Не Ожидал 😂
00:19
Глеб Рандалайнен
Переглядів 10 млн
Піхотинець - про рутину на фронті
00:46
Суспільне Новини
Переглядів 919 тис.
skibidi toilet 73 (full episode)
09:41
DaFuq!?Boom!
Переглядів 17 млн
BookStack May 2024 Release Overview | v24.05
10:57
BookStack
Переглядів 168
Race Conditions - The Bug Hunters Guide
11:30
Bug Hunter Labs
Переглядів 951
Has Generative AI Already Peaked? - Computerphile
12:48
Computerphile
Переглядів 268 тис.
Best OS for programming? Mac vs Windows vs Linux debate settled
8:41
A Decade After Stuxnet: How Siemens S7 is Still an Attacker's Heaven
38:32
🤯Самая КРУТАЯ Функция #shorts
0:58
YOLODROID
Переглядів 3,1 млн
Игровой ноутбук за 100тр в МВИДЕО
0:58
KOLBIN REVIEW
Переглядів 504 тис.
СЛОМАЛСЯ ПК ЗА 2000$🤬
0:59
Корнеич
Переглядів 2 млн
❌УШЛА ЭПОХА!🍏
0:37
Demin's Lounge
Переглядів 260 тис.