all right thank you so much thanks for coming out okay so I'm I'm worried that I'm really gonna have to book it through this talk because I've got a lot to go through so hold on tight okay so first off I'm headless eek Ricky Lachey if you're nasty I'm a principal security researcher at Keysight I mainly focus on offensive IOT research I've been doing this stuff since oh nine ish and this is actually my fifth time speaking at DEF CON for some reason they keep letting me come back we'll see about after this one okay so so first off a couple of ground rules about this talk so yeah we're gonna be diving into the wonderful world of layer two networking you know everybody always does like layer three and above but all the cool kids hang out on layer two so yeah this is basically just gonna be like a survey of lots of different really weird ether types they're not like specifically not common not ubiquitous and these are local network only no internet facing protocols is just layer two Ethernet protocols that may or may not be a good idea to have a network okay so first off what is an ether type and this is defined in I triple e 802 dot three basically you've got a picture of an Ethernet frame that I ripped straight off of Wikipedia right there so you've got your preamble and then you've got your destination and source MAC addresses and then the next two bites after. are going to be your ether type and this is basically a way for switches to know what kind of payload is coming next some common examples are like you know 0800 for ipv4 etc these these ones are going to not be those these are the uncommon types so a fun fact about the the ether type field if the value of that field is less than 15 it's a length and if it's more than 1563 it's an ether type and between those two is undefined i can imagine that there was a very heated discussion at ieee about this does anyone know the the significance of that 1500 mtu mtu that's right okay so in order to get an ether type registered you have to go through ieee it basically it costs three thousand eight hundred and ten dollars which is not cheap so these aren't just like you know throw away things that you do just for fun it's a one-time fee i don't think the the registration ever expires although i have seen on their list of public ether types some of them are no longer in use so maybe they do exist um there are several different listings where you can find all of the publicly registered ether types there and there are a couple of special ether types these ones are reserved for particular uses that's 88 b5 and b6 are for the playpen ether types these are what you can use when you're like prototyping your own ethernet protocol these cannot be used in actual um production these are just for prototyping so that you can figure things out before you actually register your ether type and then 88b7 is the oui extended ether type this is to handle the case of um you know it's just two bytes so there are only so many ether types that can be registered um so this one exists to allow you to create a lot of ether types without having to register a specific ether type so you use this one and then you've got your organizationally unique identifier and then your protocol identifier so that you can subtype multiple protocols within one organization um so yeah that's that okay everybody ready okay we're gonna start off easy and kind of ease our way into it um i've kind of broken this talk up into into different verticals this one is network management so we're going to start off with everybody's old dear old friend snmp snmp actually exists on ethernet as well ether type 814c basically the way this works is they just take snmp packets burn code them burn code them and then wrap them in an ethernet frame it supports all versions of snmp mostly the uses and abuses i do this on every one of the protocols so this one is mainly used in these two port mac relay bridges they're kind of like ethernet extender kind of things but in the spec for this protocol it actually talks about using them anywhere where you need to manage a device but you don't have ip access um but yeah so abuses um basically everything that you can abuse snmp for before you can do that over ethernet and you might actually get the added benefit of bypassing some firewall restrictions okay this one is really cool this is this is one of my favorites all right so 8899 is the real tech remote control protocol this one is basically with certain realtec switches, Realtek chipsets, it allows you to take an unmanaged switch and turn it into a managed switch. And the way this works is basically you give it an address, like I2C style, like an EPROM address, and then what you want to read or write data to that, and you can actually modify physical memory over the network, which is kind of cool. There's actually an OpenRCP project that has tons of information on the protocol, and they've got a list of all the supported hardware. Harder to find than you would think. I actually coincidentally ran across this protocol on a device that I'm not allowed to talk about because it was pre-released at the time. Thank you. It was pre-released. It was pre-released at the time, and I'm not sure if it's, you know, public knowledge yet, but anyways. So this is kind of what the protocol looks like. You've got, so speaking of subtyping, this actually works for RCP and Realtek Echo protocol. You might actually see that particular packet on your network. Or actually, sorry. No, the network loop detection is the one that you might actually see on your network. But that is not actually remote control, the Realtek remote control protocol. That's a different subtype. Anyways, they have an authentication key, but it's two bytes long, so you could easily brute force that. And also, it defaults as 2379, and nobody even knows that this protocol exists. So nobody knows. They're supposed to change the authentication key. So yeah, it's just that. So yeah, basically, at the end of the packet, you've got your register address and your data, so you just have straight-up access to registers. Uses, I kind of already talked about that. There's a limited amount of chipsets. Realtek's data sheets on this protocol are really, really awesome, like some of the best data sheets I've ever seen. They give you, like, full register maps. And everything. But it's only certain chipsets that do this. Some cool abuses that you can do with this, you can actually change your own VLAN tags. So if you don't like the VLAN you're on, you feel lonely, you can change your VLAN tag and be on somebody else's VLAN. Or you can actually set yourself up as a trunk for it and just get all of the traffic going through you. Okay. This one is funny. So 6,001 and 6,002, does anybody in the room remember DECnet? You should probably schedule a colonoscopy. So yeah, DECnet, they had a whole protocol stack in, like, the 1970s, 80s. You know, long dead. This DECnet Maintenance Operation Protocol, or MOP. Basically, it's a protocol that's been around for a long time. It basically had two functions. One was to dump and load system memory, and the other was to have a remote control console on, like, VAX systems and stuff like that. So basically, whenever a system was malfunctioning to the point where you couldn't actually, like, create a session on it, you could use this protocol to still, like, remotely recover from it. So yeah, DECnet is gone, except that it's not, because Cisco still includes the MOP, MOP protocol on all of its routers, enabled by default to this very day. So yeah, they actually still, like, this was from the hardened Cisco iOS devices PDF from September of 2020, where they actually talk about how you're supposed to go into the interface configuration mode and disable the maintenance operation service. But yeah. The dumping memory side, you basically, you give it an address, an account of bytes, and it will read that, you know, that many bytes from that address. I haven't actually gotten that side working yet, but, you know, in theory, that's how it works. And then the remote console side, the data field is, it depends on what command you're doing. But there is a full protocol. There's a full protocol spec out there, and I've included a link to that in the slides. Oh, and there's also already a Linux tool called MOPRC that you can just use. Okay. So yeah. Uses and abuses. You can maintain old DEC systems, hooray. Or you can maintain every Cisco router, apparently. But yeah. So, like, the dumping memory combined with the remote. The remote console could be pretty killer, especially when you consider that Cisco devices store their hashes in config files and in VRAM. So if I could actually get that memory dumping side of things working, then I could dump the hashes and use those to log into the console. Okay. So that was network management. I'm really going to have to pick up the pace here. So let's talk industrial electrical. So ADAB8 is the GOOSE protocol. Some of you will probably be familiar with GOOSE. It's pretty popular. GOOSE stands for Generic Object Oriented Substation Events, and it is described in the IEC 61850 standard. Basically this is a protocol that's used in substations. So that smart devices within. Then a power station can communicate with each other, and they can also send out events for like, you know, voltage measurement, fault detection, et cetera. It's a PubSub model, and you can actually, they apparently do like IO through this protocol also. But yeah. So they actually tried to add some security to this protocol with the IEC 62351 standard. But the problem was that the latency requirements in these environments were so low that nobody uses the security because they can't. So yeah. Still pretty widely unsecured. This is kind of what that protocol looks like on the wire. App ID, byte length, or two byte length, a couple of reserved fields. And then ASM1 encoded payload. Easy peasy. Used in smart grid and intelligent electronic devices and general IO devices within a power substation. Yeah, basically I could see you being able to abuse this by like, you know, those events are sent to multicast or broadcast on the ethernet. So you can just push out. Your own events and cause, you know, all kinds of havoc in a power substation. Also theoretically possible to control those IO devices to, you know, do whatever you want to do. KEPCO. So 89 3D is the KEPCO PLC interoperability protocol. KEPCO. Is. Is a Korea electric power corporation and this protocol is basically so Korea started installing a bunch of smart meters on everybody's houses but didn't have a way to talk to all of those smart meters in like, you know, specifically like rural areas and stuff like that. So they came up with this protocol in order to be able to communicate with the smart meters over the power lines. Like the electrical power lines. So I couldn't find any protocol specifics on this one, but I found a few papers that kind of, you know, danced around the topic a little bit. So like this one was about AMI protocols for two way communication and KAMI. I don't think this is actually the protocol because like that end of field stuff makes me think it's actually a serial protocol. Okay. Okay. And then a couple other papers, again, like none of these, like they all gave little clues about what AMI and PLC interoperability would look like, but none of them actually talked about the specific protocol itself. So I'm kind of still in the dark a little bit on that one. But yeah. So. So like I said, it's used for allowing AMI smart meters to talk back home over PLC infrastructure. But you could theoretically use this to cut off somebody's power or possibly use it to get free electricity, depending on, you know, what kind of things they're monitoring across the across the wire. And speaking of PLC. 88E1 is the HomePlug AV protocol. So HomePlug is kind of a catch-all protocol spec for power line communications. It's actually, there are three different interoperable standards. There's HomePlug AV, which is mainly used for in-home power line communications, speeds up to 500 megabits. HomePlug AV2 is the same, but just with higher bandwidth. And then HomePlug GreenFi is actually kind of cool. That's used mainly at like electric vehicle charging stations. So you plug it in and it does like a little like authentication handshake thing over this HomePlug GreenFi. And then it unlocks it and allows you to charge your vehicle. Okay, so this is actually one of the best secured protocols that I'm going to be talking about. They do 128-bit AES encryption on the wire between devices. They have a rotating network encryption key that rotates every hour or so. And then new stations can join a network as long as they have a network membership key. And then you can also... Pull in new devices into your network as long as you have that devices. It's called either a device access key or a device encryption key. So all of this is done so that, you know, some random person can't just plug one of these adapters into an outlet on the outside of your house and get onto your network. And that's what the protocol looks like. This protocol is super annoying. But I put a bunch of specs in there. So, again, so basically, yeah, you just, you read them, I don't want them. Okay, so, yeah, this is basically like with HomePlug AV, you've got these two devices that plug into wall outlets. And then you can connect them to your network on either end, and it'll send the network traffic over the power lines in your house. So it's basically used for whole home Ethernet. I actually, back in the day, used one of these as a Wi-Fi extender in my house, because my house is basically a Faraday cage, and I could not get Wi-Fi upstairs, no matter what I tried. So I used one of these. But, yeah, if you can figure out those network management keys or the device encryption keys, you can build your own. Okay. It's a kind of malicious network, but, you know, getting the keys is the hard part, because you have to already be on the network in order to get the keys. But, yeah, there's also cases where these things are used in, like, apartment complexes and stuff like that. So you could actually be on a power line network with your neighbors and not even realize that you're on the same network as your neighbors. Okay. So transportation, this is where stuff starts getting really interesting. Okay. So 99FE is TechCMP, or TechMP, the Technically Enhanced Capture Module Protocol. So this Ether type was registered by ASAM, but the actual protocol itself was developed by Technica Engineering. Okay. So this is designed to work with a capture module inside of a vehicle in order to pull out all of the CAN and FlexRay data. And you can actually, like, replay that back onto the bus, which is kind of cool. The protocol itself is, like, a lot of overhead for what the protocol is doing. So basically, like, the really light blue. It's all just, like, regular Ethernet standard stuff. The medium blue is all of the overhead on this protocol. It's basically just, like, a bunch of, like, identification things and, like, timestamps and stuff. And then the dark blue is the actual, like, CAN or FlexRay payload. So as far as the TechMP protocol itself. It doesn't really do much. But still, you know, the replay stuff is cool. So yeah, you know, allow remote diagnostics of in-vehicle networks. You need to have a capture module inside the vehicle in order to access it. Possibly useful in replay attacks. Okay. So WAVE. This one. If you're, you know, following along with current events. You've probably heard of WAVE. 88DC is the WAVE short message protocol. WAVE is wireless access in vehicular environments. Basically so, like, imagine autonomous vehicles. They can communicate with each other. They can communicate with, like, stoplights and stuff. Like emergency vehicles can switch stoplights using this kind of protocol. And they can also communicate with, like, infrastructure, like, signs and stuff for doing location-based advertisements because, of course, that's what they want to do. So the short message protocol. Again, ASM1 encoded. You've got a version PSID. Then you've got several possible. I don't know. I don't know. I don't know. You're going to see it. So, yeah. I don't know. It's cool. So as far as uses go, I already talked about that again. Autonomous vehicles talking to each other, talking to the environment. So it's designed to keep riders and pedestrians and emergency vehicles safe because they can all talk to each other. other and you know work things out without having to rely on human intervention but it also allows for remote control of cars you can modify traffic lights i don't know if you guys remember the old days of like having a strobe light on the dash of your car because that's the way emergency vehicles used to switch the lights to green as they were driving up it would be like a strobe light thing so you don't have to do that anymore you can use the this ethernet protocol but yeah i could also envision some abuses on the location-based ads like seeing where somebody you're stalking is driving is kind of bad okay so if cars aren't doing it for you how about trains so that either type 89 is for the train communication network protocol this is basically two separate protocols ethernet train backbone etb is a replacement for the older wire train bus standard and then ether ethernet consist network consist is like another name for like a train car ethernet consist network replaces the multi-function vehicle bus standard basically so the ethernet train backbone is basically the entire train communicating it'll tell tell you how the cars are oriented how long the train is and all that and then the ethernet consist network is within one train car all of the systems there working together the these standards the so the the iec standards there um they're available but they they cost like 400 bucks each to get access to them and i mean i like you guys but i i'm not spending like a grand on a single defcon slide so if you if you want if you want access to those standards they're out there um but yeah so so um if you've ridden on the monorail out there um you know like whenever it comes up to a stop and the you know it lines up with the doors and then the doors automatically open that's all handled by this this kind of ethernet protocol um but because of that you know if you get access to that protocol maybe you could open the doors while the train is in motion or maybe you could tell the train that it's shorter or longer than it actually is kind of things medical this um was a failure on my part um this was the only only section where i i came up pretty dry for the entire thing um but i'm still going to talk about the ethernet protocols because you know they exist i just couldn't find any specifics on like any of them i'm not going to be writing any kind of like hospital ransomware anytime soon um okay so so 885b and for the phillips clinical network um i i am pretty sure this is related to intelliview everything that i've i've read indicates that this is related to intelliview so i went out and bought an mp50 heart monitor like one of those big like by your hospital bed heart monitor things but i could only ever get it talking udp i can't get it to talk ethernet no matter what i do so i'm thinking now that maybe there's some other piece to this puzzle like um phil this phillips agilent carenet network switch is like a specifically designed network switch for these clinical network environments um so maybe i need to pick up one of those there's also this phillips information center or pick pick ix which is kind of like a database um like a server side of things so maybe i need to get access to that but i couldn't find it available anywhere without talking to a sales guy it could be that i'm just wrong about all of this that's entirely possible but you know hopefully someday i'll find out more about the phillips clinical network protocol so these uses and abuses i'm just making guesses based on the udp traffic that i was able to get out of that heart monitor so you can admit and discharge patients um it's constantly sending out vitals and and patient condition type things and of course alarms and and exporting data um so you know the abuses are pretty obvious like you can um you know spoof uh um cardiac arrest or something like that and cause cause interventions to happen or you know you could spoof normal activity when bad things are happening um and then you know personal identifying information disclosure of course and then ether types 815f through 8163 are all registered to the massachusetts general hospital they've got they've got five ether types and i can't find anything on any of them it's so frustrating um so so massachusetts general hospital is actually fed in harvard medical and they've got their own computer science department they've got lots of patents around transferring patient scans and imaging and stuff over a network so maybe these protocols have to do with that um oh yeah it's such a nice guy um so i don't know if any of you have heard of impact cyber trust um but it's like a website where uh researchers and professionals from the university of california or other universities of can come together and share like pcaps and protocol data specs and stuff like that really great site so i came across them when i was looking into massachusetts general hospital because they had uploaded a bunch of pcaps to this site and i was like oh my god that's amazing and then i i looked at the descriptions of the pcaps and they were all taken from within phillips clinical network environments and i was like that still works i still need that um but unfortunately um they've got like restrictions on sharing the information on on some of these they've got like different levels of sharing like some some of them are restricted some are quasi restricted some are unrestricted and the restriction placed on this would mean that i couldn't talk about it at defcon at all so i didn't end up looking at those pcaps anyways because you know i wouldn't have been able to use the information uh but you know if you're if you're curious go look at impact cyber trust create an account and get access to those things um so yeah i don't know they do things okay and now uh this is um one that didn't fit anywhere else but it was pretty cool so i wanted to i wanted to include it um so ethertype 88.9e is a remote tech hazardous duty robot protocol these are basically northrop grumman unmanned ground vehicles so these are basically like the bomb defusal robot type things and so i think you know obviously i couldn't I couldn't find details on the protocol itself but I think this one is related to their Andros Titus line specifically because they've got a press release where they're touting all of the the new Ethernet features of their Titus robots so just because I couldn't get access to the network protocol doesn't mean we can't like make some guesses about how it would work because back in 2002 there was this guy that his master thesis at the University of Tennessee was actually all about the serial control protocol for the Andros Mark IV hazardous duty robot it was basically like he wanted to be able to control this robot from his computer and so he pulled apart the serial protocol and the way that works is basically it's a 22 byte packet of commands data and then one byte checksum and basically each one of those bytes is dedicated to a particular part of the robot so so like you know one byte will be like moving the treads and one one byte will be like raising the arm kind of thing you know and then there was this byte 8 that was the weapons byte basically you know you got weapon one weapon two weapon vehicle and weapon shotgun okay so so yeah obviously that was the serial protocol the Ethernet protocol is probably different they're gonna have you know function functionality for like upgrading firmware and and stuff like that but it does kind of give you an idea of what what like kind of things that you could do with this kind of protocol yeah and also I don't I don't know how much they would change the the protocol from version to version you know because you have to like retrain on these things and they're really like you know their delicate machinery doing delicate operations and stuff you don't want to have to train somebody from scratch every single time but anyways yeah they're used for bomb disposal and to handle dangerous situations without putting actual people in danger but of course you know if you get access to this protocol you can do things like you know wait until they're about to do something and then just like change the position of the arm on them or you know actually like legit it controlled the weapons on the on the robot okay all right so that's all the protocols that i was going to talk about today so we i've got a couple of demos that i've got worked out the first one is using the mop protocol to get a to get access to the management console on a cisco 1800 series router basically i you know i wish i had gotten the mop dump into my shell not my cisco 1800 series router to be able to get a map of the room into my cisco 1800 and you know you have to get a map of the room into your cisco 1800 on your cisco 1800 and then you also have to get a map of your cisco 1800 on your cisco 1800 in your monitor and i've got some vedere for both of those so i'm going to go ahead and give you a little bit okay so there you go okay so that's what did I do okay okay so yeah basically like this couldn't be simpler I'm just using the mop RC Linux utility I give it the MAC address of the the router I want to connect to and it basically like drops me straight into a Cisco iOS shell it's like a fully interactive shell too it's got like tab completion and everything so yeah basically you don't have to be on the management interface in order to access the management console you can just be on any interface and as long as it as long as they haven't disabled mop then you can get access to the management console and that's that one okay so that was that demo second demo is using the home plug AV protocol to actually pull device encryption key and a network management key from an adapter this script uses some Qualcomm atheros specific functionality but it should work on all Qualcomm atheros based home plug adapters it uses it sends the get software request and that basically it I send that to broadcast and all of the responses I get back I make a note of their firmware version and then I make a note of their MAC address to use for the next command I send which is vs module operation which gives me a lot of detail back from that MAC address including those keys so I ran this against the TP link TL WPA 8 6 3 0 which is actually the device that I used to use in my house I do not use it anymore more so but yeah so so the the thing about this is you have to actually be on the network in order to get access to these these keys you know but you know you could use this to like dump those keys so that you could bring back an adapter later on some some time or whatever this this is my really ugly scapey scripts that I wrote again I included this in the media server stuff so you don't have to worry about the fact that you can't read anything that's up on the screen right now but yeah so so basically it just loops since since the first packet to broadcast listens for any responses and then since the second one to that specific MAC address and parses out the key information all right so now we'll look at that so yeah you just run the script and then you'll see it comes back with a version that's the version of the home plug adapter that it found oh man and then it spits out the network keys the network management key and the device encryption key so then from there you could either use that to join your own adapter to the network using the network management key or you could force adapters on their network to join your own network using the device encryption key So, that is that. Okay. So, hopefully at the end of this talk, you've seen how many crazy things there are out there on Layer 2 of the network. They're local only, but it's still so much fun to be had, especially when you're in weird environments. This isn't even close to what all is out there. There are well over 3,500 registered Ether types on IEEE's public listings, and I talked about 12. So, there's still lots of stuff out there. So, these are some of the places I found the most helpful in my research efforts. RFCs, of course, are the best. IEEE, police standards are also good. And if there's a Wireshark detector, then you're absolutely golden because somebody else already did the work for you. IEC standards are a little less reliable and often cost a lot of money. But if you can get access to them, then that's great. Research papers and patents, again, not as good, but sometimes contain, contain useful information. And then, of course, lots of Googling and patience. And that was just kind of a fun thing that I found while I was doing all of this work, excuse me, is this guy who makes the ultimate PCAP, which is basically a single PCAP with every single protocol he could possibly cram into it, all in one PCAP. It's really awesome. But yeah, and then eBay is awesome for grabbing, you know, getting random devices that you can't find anywhere else. And, you know, sometimes you can find them for pretty cheap. But yeah, so that's, that's my talk. These are ways that you can reach out to me. I'm on Infosec Exchange and DEF CON Social. I'm also on Twitter, but not really anymore. There's my GitHub where I'll put some of this code that I wrote. I'll probably also throw an RRCP script up on my GitHub. You should all come to the IoT Village because Keysight has a booth over there where we're doing some Bluetooth fuzzing and it's awesome. So come and see me over there and you can ask me questions or whatever. So yeah, that's it. Any questions?