start	end	text
0	2000	All right, I guess we should get started.
2520	4020	Right, so welcome to our talk.
4200	10740	We are going to be looking at kind of hacking some EV chargers and more specifically kind of communication in the modems they actually use.
11380	15420	So yeah, it should be a fun one and we're excited to share this research with you.
15700	17260	First of all, who are we?
18880	20820	So my name is Jan Behrens.
20840	25860	I work as a red teamer at Alpertronic, one of the largest charger manufacturers in the world.
27020	33760	And yeah, and in my free time I volunteer at different conferences like here at DEF CON as a goon and do my own research.
33760	36020	But most of it can't be publicized, unfortunately.
38020	39580	Right, and my name is Marcel.
39580	43460	I'm a PhD student at the System Security Lab at the University of Oxford.
43460	46900	And I'm doing my PhD on the security of EV charging.
46900	49880	So I get to kind of do this type of work on a daily basis.
50220	56040	But we have certain expectations in academia about, you know, publishable work.
56040	62000	And then at night time, I get to do kind of the more fun aspects of the projects that you can't necessarily publish.
62000	65780	It's more something that we can show to you guys here today.
66320	72860	In my work, I'm also supported by our colleagues at Armasviz who give us some funding as well as technical expertise and equipment.
74680	78360	But before we get started, a few disclaimers as usual.
78520	83180	So we do not represent our employers or our university.
83180	86660	These are our own opinions.
88520	100660	We can't share everything we know because we have different kinds of NDAs with manufacturers and so on, which unfortunately restricts what we can share today.
101860	113160	And if you want to get started in hacking EVs or EVSEs, please be careful when connecting to these chargers or cars.
113180	116760	They can go up to one megawatt these days.
116900	121440	So it will kill you if you connect to the power pins.
121440	126460	But for this kind of research, which we present today, it's not necessary at all.
126460	135760	But please be safe when testing these systems because there's a high voltage involved.
137780	142520	And also, only hack what you own.
143260	152860	There are a lot of clients and customers who do pentest our product, for example, but ask for permission first.
153780	160280	Today we are looking at the three charging blocks for level three charging.
160580	164500	CCS1 and NACS is most common here in the US.
164500	167460	CCS2 in Europe.
167460	176080	There are a couple of other standards as well out there, like Shodemo or GPT, or now with MCS as well.
176080	180520	But these work on different protocols and different technologies.
180620	188300	Today we purely focus on these three blocks, which are defined in an ISO standard.
188940	193220	So how does EV charging works boil it down?
193220	198000	First you have the connection cable, which connects to the car.
199100	202260	And there you have a basic power signaling.
202300	205300	There's no real data transfer to this.
205300	208360	This is basically just a connection check for the cable.
209080	212940	After that, the power line communication is initiated.
213920	225960	And only if this power line communication is successful, the actual communication between the car and the charger starts, which is based on IPv6.
227060	231600	And after all of that, the actual charging session starts.
231680	237900	So there are a lot of different layers beforehand before the car gets any power.
238220	243020	But today we are only focusing specifically on the power line communication.
244900	247560	Since we found multiple issues there.
250980	252160	Yeah, all right.
252160	256220	So we saw earlier that there's this high-level IP stack.
256220	262940	And there's actually quite a lot going on there in regards to different versions of the protocol, as it's evolving over the years.
262980	270480	And we initially set out on a quest to actually understand what kind of protocols are being used by the EV charging system.
270480	277800	There are currently three different standard versions, which are kind of standardized as part of ISO 15118.
278340	283000	It's an old one from 2012, then one from 2014, and then one from 2022.
283500	294940	And they kind of started adding more and more security features, adding support for TLS, for the charging communications itself, some more authentications, great things like that.
294940	299940	So we originally set out on a quest to understand whether these are actually deployed in the real world.
299940	314160	And along the way, we discovered that the modems themselves actually end up being a similarly interesting topic, because even though it standardized exactly what power line communication should be used, and it's the same across all versions of CCS so far,
314160	317420	with no signs of changing, because after all, this is the physical layer.
317420	321820	You can't really just change the physical layer while keeping the plug the same.
321820	324890	People will expect their chargers to keep working.
324890	333150	So we, but anyways, there are still some implementation differences that you can have, even just with the software, with the choices of the chip.
333150	337750	So we set out on a quest to kind of understand what is out there in the real world.
337750	339730	And so we built this EV emulator box.
339730	341110	I actually have it with me.
342290	344950	So it's this basically small little transport case.
344950	347330	It fits quite nicely into a backpack as well.
347410	361870	And inside of it, we have a Raspberry Pi, a custom circuit board, and then a power line communication modem, like the one you see here, which has basically the exact same chip you would expect to find inside of all the other devices as well.
362350	370490	And on the software side, it's basically running a combination of Python and C that we made, and it just pretends to be a car.
370490	372690	You plug it in to the charging cable.
373050	380810	We very carefully designed our plug, so it just entirely avoids the DC pins, as we heard earlier, that's dangerous and absolutely not required.
380810	384350	All the data is going on entirely separate wires inside of the cable.
384630	395910	So we just connected the data cables, and then we go through the communication stack as shown before, and in the process, collect data from the charger about what it actually supports, what versions.
396850	403170	So we found a lot of kind of results as part of this work.
403310	410790	Some of them are actually published up in a paper that's linked in the references at the end, if you want to see about how many chargers support the ALS.
410810	418110	Currently about 12% of them in Europe, even though this is now a 10-year-old part of the EV charging standard.
418750	420250	But for the purposes of this work...
422230	425310	Yeah, sorry, how did we end up collecting this data?
425310	428670	As I said, we need to connect via the charging cable.
428910	433430	So we had to go to chargers in person to actually get this data.
433810	439110	And so we went on a road trip and collected up data from, in total, four different countries.
439110	443230	The UK, Switzerland, Hungary, and Croatia in the locations shown here.
443230	445430	The full dataset itself is also public.
446370	450430	And so we ended up going to 397 CCS plugs in total.
450430	459350	We tried to be a bit random with our selection, going to small towns, villages, highways to get a kind of cross-section of what's out there.
459350	461470	We found 26 different manufacturers.
461470	467210	There are definitely a few more out there, but we at least managed to cover most of the ones that are widely used.
468110	476470	And we've also seen devices as old as 2013 or manufactured as recently as 2023 in our study from 2024.
476970	479490	So we've got kind of a good idea of what's out there.
480110	487610	So as I said, we had some fun results about how TLS or some of the other security features are being introduced by the manufacturers.
487690	490930	But for the purpose of this talk, we'll just be focusing on the modems.
492130	503330	So one of the things you can do in the Powerline protocol is actually you can query the chip version as well as the firmware version from the Powerline modems.
504210	515510	This is basically the equivalent of if you were to connect to a Wi-Fi access point, the access point all of a sudden will know the exact chip ID and firmware version running on your Wi-Fi chip.
515790	517670	This would be quite ridiculous.
517670	521750	I do not know why you can do this in Powerline, but it is nonetheless a feature.
521790	524530	And so we were able to collect this alongside with our study.
524530	541550	And what we found is that there are only two chips out there in the world on all of the chargers we tested, the QCA7000 and the QCA7005, which are furthermore, as far as we can tell, essentially the same chip with some minor differences between them perhaps.
541810	548310	And then we also looked at the firmware versions and we found that there's quite a lot of stuff from 2013 from 2015.
548310	553850	So over 60% of chargers have firmware that is more than 10 years old on their Powerline modems.
554530	560090	Now we're not looking here at the actual main board, but for example, the Linux or the screen would be connected to.
560090	568170	This is just the communication modem, but it's just a chip that I have circled in yellow, but it's still quite interesting.
568850	574250	Specifically, there are actually known vulnerabilities in the Powerline communication system that is being used.
574510	578710	For example, one of my colleagues, Sebastian, published a work called Broken Wire.
578710	581130	It was also a talk here at DEF CON two years ago.
581290	583610	Actually, I think in the car hacking village specifically.
584090	587270	But it's also out as an academic paper if you'd like to read.
587390	599770	And what that showed is that you can actually jam the wired communications with very little amounts of power from reasonably long distances away due to just how the protocol is designed.
600130	603310	And this is something that we think could be potentially solved in firmware.
603310	606570	So we had to look whether these updates are being deployed.
606570	615250	And even though the attack was disclosed in 2022, two years before we conducted our study, not a single charger has firmware newer than 2021.
615670	621930	So even if it could be fixed, even if it might have been fixed, no one's actually deploying it.
622890	631910	So this is starting to get kind of interesting for us now because we have these PLC modems, which are absolutely necessary for all of the EV charging communications.
631910	638490	They sit right behind or right between the main EV board as well as the charger.
638490	649010	They want to communicate via Ethernet, so they send these Ethernet packets to the communication modems and then they transform it into this packet, which looks like what you can see over there.
649190	653330	It looks very much like a wireless packet if you were dealt with wireless security.
653450	656870	This is for a good reason because it essentially is.
656870	663550	They are not running it through the air, they are running it through a cable, but it is still entirely identical to a wireless protocol.
664570	667370	And so everyone's also just using these two identical chips.
667370	675310	We know that manufacturers are not really on top of updating the firmware either, so this is starting to look like a really interesting potential target.
675710	681010	So the first thing we wanted to do is try to get as much information as we possibly can.
681590	686270	So you look up the datasheet, try to download the firmware, basic things like that.
686590	691090	Turns out you can't download the datasheet for the chips, it's under an NDA.
691810	693970	You also can't download the firmware.
693970	700330	For a while it was available on GitHub and then they realized that that's a really bad idea for some reason and deleted it.
700630	707930	Now if you know how to use the internet, you might be able to get some files, but we can't obviously give you direct links to anything.
709170	717750	But we can give you this link because the Powerline is actually the same technology you might be very familiar with at home.
717750	726430	So if you've ever bought these Ethernet to the Powerline adapters, they basically just plug one into each wall socket and the Ethernet traffic magically teleports between the two of them.
726550	730770	And this is the exact same thing that is being used in the EV charging system.
736530	744890	Yeah, so at home you use HomePlug AV and then in the EV chargers you use something called HomePlug Green PHY, but they are actually interoperable standards.
747090	754190	Yeah, so they have these tools released publicly because if you have your home network, you actually want to be able to configure it.
754190	759430	And so they released OpenPLC Utils, which is a bunch of tools to change the configuration.
759430	765650	And it's also open source C, so we can have a poke through and actually see kind of how the modems can get configured.
770740	773120	So what do you actually find out if you do this?
773120	780100	Well, first of all, we find that every one of the Qualcomm modems has something called the Parameter Information Block or PEB.
780420	790120	This is a large kind of proprietary format binary blob that contains various important configuration options, only some of which are actually publicly understood.
790240	796060	So basically there's no real headers or something you would expect in some of the settings file formats.
796060	801360	It's just specific fields located at specific binary positions throughout.
802440	807060	So if you know where they are and what they mean, then you can look at them, but otherwise it's all meaningless.
807140	821500	So for example, things that are in there and known to be in there are the MAC address, manufacturer device string just for display purposes, or the network membership key, which is coming back to the Wi-Fi analogy, very similar to the pre-shared key.
821500	827020	It is what is the root of all encryption as well as kind of authentication to create the home plug networks.
828060	835940	And what you can do is because it contains important settings that you might very legitimately want to change, you can read it and write it from the host system.
835940	842760	So to do this, you just send a special Ethernet packet to your modem chip and it will read or write the PIP accordingly.
843160	850840	However, and yes, the command to do this is provided very nicely in PLCutils, quite simple to use.
850840	865200	You just need to type in the MAC address, which is very interesting because in the home usage setting, you actually, when you create these networks, you actually authenticate all the devices into your own home power line network.
865200	869600	And from then on, they are essentially treated as part of a trusted group.
869760	879980	So what they added is a nice feature is that you are able to send these commands to read and write the configuration to remote modems as well via the power line.
879980	890200	So if you just put in the MAC address of one of the remote chips, the management message will go to your chip, it will get put out onto the power lines and it will go to wherever the other remote chip is.
890460	906220	And this is perfectly fine in the home setting, but in the EV charging context, even though the EV and the charger form a power line network, this is not because they are an inherently trusted network, they just need to communicate and that is just how they do that.
906520	913060	So we wondered whether this feature has kind of been actually left enabled in the EV setting as well.
913400	925780	And this is how we came up with the PipBuster attack, which shows that yes, you absolutely can do this, which means that a rogue EV could write to the configuration of a charger and the rogue charger could write to the configuration of an EV.
926240	928800	Now, how bad can this realistically be?
928800	933360	You can change the MAC address, which is weird, but not necessarily a catastrophe.
933800	938440	The Pip contains a lot of settings, you can absolutely brick a modem with it permanently.
938440	945900	You can tell it to stop talking both to the host system and stop talking over the power line, turning into a very nice brick just sitting there.
945900	951500	And without power line, there is no EV charging, at least no DC EV charging.
952000	959320	Sometimes now even AC systems use it, though they can potentially fall back to older non-advanced communication schemes.
960220	968980	So we went around our lab testing this on all of the various devices we own, but we found that it only works on some of the devices, not all of them.
969340	971000	So why could this possibly be?
971000	974200	The firmware is always stock, it's always Qualcomm firmware.
974200	979220	As far as we can tell, charger manufacturers cannot kind of create their own.
979220	982580	The only thing that they can really change is the Pip itself.
982960	990480	So there must be some sort of security setting in there that actually controls whether you are able to do this read or write.
991060	995500	Now the problem is we're looking at a binary blob of approximately 10 kilobytes.
995500	1001900	We're looking for what is most likely one bit, and there's documentation for about 10% of it.
1002660	1005900	So this is going to be a somewhat tricky challenge to find.
1005900	1012640	So what we did is we first obtained the Pip from one of the vulnerable devices, and then one of the secure devices as well.
1012640	1017460	It was a portable EV charger we had, as well as a development board.
1017860	1026680	And we compared the files side by side, and there are many differences between them, including the file size, because turns out one of them had a slightly newer firmware version.
1026680	1032940	A newer firmware adds a few more settings, so they just keep making the Pip longer and longer by a few bytes each time.
1033960	1040440	But they were also entirely different in basically all the other areas, so no easy way to narrow down the one bit that differs.
1040900	1048520	So the first thing we did, we took both of the Pips, truncated them down to the same length, put them on one of our modems, and tested them.
1048980	1051620	So we created this kind of test workflow.
1051680	1058480	Basically you have two powerline modems, a victim modem and an attacker modem, and then you have just a Raspberry Pi connected to both of them.
1058540	1068380	So you have Ethernet interfaces going to both of the modems, this is kind of a privileged interface, this is how they connect to the host, but then they are also connected to each other over the powerlines.
1068660	1086640	So what we can do if we want to test how a modem behaves with a certain Pip, we can put it onto the victim modem directly via Ethernet, and then we can get the victim and the attacker to pair to each other, communicate through the powerlines, and then start sending commands to the victim via the attacker.
1086640	1090920	So we send it out on Ethernet to the attacker, and it goes via the powerline wires between them.
1090920	1106640	And then we can send a read command, a write command, we can check if the commands actually succeed, they do usually send back some sort of status, and then as a final test we can actually take the Pip off of the victim again directly via the Ethernet interface just to see,
1106640	1115620	for example, if the write actually persisted, because it might be that it says, yep, I definitely wrote that configuration file, and then it just doesn't, because that would be insecure.
1116840	1123840	So we are in this way able to test what a Pip actually does on a real modem without having to think about it.
1123840	1130780	And if we did our testing with the vulnerable and the secure Pips we obtained from the two devices, they did in fact produce different results.
1130780	1132840	So the setting is somewhere in there.
1133740	1146780	So as the next step, we took the first half of the vulnerable one, second half of the secure one, concatenated them together, really hoped that we are not breaking over some very important setting right in the center, and put it on a modem.
1146840	1150700	And in this case, the device behaves securely, so it's somewhere in the second half.
1150820	1162940	And rinse and repeat for a binary search, and we quickly narrowed it down to a Pip offset at 1F8C, which is if zero, then reading and writing is allowed, and if one, then it is blocked.
1162940	1165220	So I have dubbed it the security bit.
1166560	1168260	So we know it exists.
1168260	1171600	We know what controls it.
1171600	1176440	But as I said, some of the devices in our lab were vulnerable, whereas others were perfectly safe.
1176440	1182300	So do real devices actually deploy the secure configuration or not?
1182880	1185120	Well, first of all, let's have a look at the modems.
1185120	1187740	If you buy these by default, no.
1187800	1199680	So it's clearly not some sort of default setting, but this might still mean that real device manufacturers have seen the setting and they've changed it, or they've been told in some documentation to change it.
1199800	1202120	So we need to go out into the wild and test it.
1202120	1207400	So back on the road, traveling to EV chargers to collect some more data.
1207440	1216100	Now, it would be incredibly unethical for us to actually go up to chargers and start writing to their configurations, because, well, yeah, we just can't do that.
1216100	1221360	And it might also actually break devices if something goes wrong in the writing process.
1221940	1232980	So instead, we did a read, where if the read request was blocked, then we assumed that the device is secure because there's no realistic way it will let us write, but not to read.
1232980	1236400	That would just be a very bizarre option to have.
1236580	1239680	But if it allows us to read, it might still be write-protected.
1239760	1247240	So we took the PIBs and we put them onto our own test setup again and basically checked if they are actually writable.
1248020	1250800	So we went to 69 chargers in California.
1250800	1265120	And if you're wondering what a test like this looks like from the perspective of the security operations center of an EV charging company, someone shows up with a backpack and plugs in a cable to your charger and then they leave about a minute later.
1266160	1270060	In total, out of the 69 chargers, we managed to download 41 PIBs.
1270320	1273540	So quite a few of them don't have the security bit set.
1273660	1278760	And out of the 41, all of the ones that were readable also appear to be writable.
1279280	1287020	So this is now a vulnerability that we've seen and it's actually kind of has a real impact in terms of number of devices affected.
1287020	1291520	So the next logical thing to do for us was to disclose this to Qualcomm.
1291520	1298800	We also disclosed it to a bunch of industry working groups so they can coordinate more directly to the charger as well as the vehicle manufacturers.
1299220	1302520	So we contacted Qualcomm back in February of 2025.
1303540	1308720	They actually responded acknowledging that, yes, this seems like a vulnerability, they will fix it.
1308720	1310120	All good, thanks.
1310120	1314480	And from our perspective as academics, this kind of at this point concluded the research.
1315300	1318440	We had found something, we had reported it, we had written the paper.
1318460	1320960	I am actually going to present it in a week.
1322100	1324780	So yeah, kind of nice end to the story.
1324960	1331360	So how did I end up at DEF CON giving a talk together with someone from one of the largest charger manufacturers?
1333160	1345200	Yeah, so it turns out we did basically a similar research in our Red Lab to see if it's possible to hack the charger via the charging cable and also reported to Qualcomm.
1345200	1350920	And the response was basically, isn't it the same stuff Oxford was reporting to us?
1350920	1354120	And we weren't in any kind of communication back then.
1354120	1363320	But this was the first time when reporting a vulnerability that the manufacturer points you to a different research group.
1363600	1365560	Never heard of this.
1365900	1368880	So how does this look like?
1368880	1378060	So here we have one modem connected to F0 and it's already connected to the power line.
1378060	1381860	And our attacker modem is connected to Ethernet 2.
1382860	1394720	And basically, if you use PLC tools, which are open source, you can basically also see and list all devices connected to the power line communication network.
1396940	1404680	And here in this case, we take the factory PIP and add the security bit setting.
1405300	1409440	ModPip is basically just to make the checksums correctly.
1409440	1416250	So the chip is really sensitive for checksums, checks not only for the PIP file, but also for the firmware.
1417580	1423480	And then we basically write the edited PIP to the local device.
1423480	1425740	So our victim device.
1425740	1431720	And then we verify by reading it from the module that the setting is actually set.
1431720	1442520	And when trying to connect via the attacker modem on F0, the device refuses to give out any information about the chip.
1443100	1450800	But what happens if we try to reset the device via power line?
1450800	1455480	And it turns out it actually works.
1455480	1463920	So in this case, we send first the information request to the victim device via Ethernet 2.
1464220	1467380	And as you see, it's still refusing the request.
1467380	1470980	But for some reason, the reset command is accepted.
1471520	1479980	And after the device is reset successfully, it then gives out any information you want again.
1479980	1491240	So it turns out that even if you write a customized PIP file to the chip, it still stores the factory PIP.
1491840	1497660	And by resetting, it automatically falls back to this unsecured version of the chip.
1497660	1500620	And you can basically do whatever you want to it.
1503520	1508200	So there are different modes you can run the chip basically on.
1508200	1510680	And one of them is called host booting.
1510680	1513990	This is mostly used for car ECUs, for example.
1515060	1518200	And they don't have an external flash.
1518380	1528420	So as shown in the picture before, we have a really tiny flash here on the board where all the firmware and PIP configuration is stored.
1528640	1534160	And in car ECUs, this is basically done without external flash.
1534160	1535900	It is done via a host controller.
1535900	1546460	So every time after each charging session or however the car manufacturer set it up, it's reflashed with a customized own firmware.
1546460	1552540	So even if you manipulate the firmware, it doesn't really stay persistent.
1553420	1559120	This is not the case for all car manufacturers, but I'm not gonna say any names.
1561820	1572860	And it's still vulnerable even if you have host boot enabled, but it's not a persistent exploit till the next reboot cycle.
1572900	1576000	But it still crashes the charging session.
1576580	1584060	But how can you actually exploit this if you don't own the car already or if you don't own the charger?
1584680	1589100	So we need to attack it somehow remotely in best case scenario.
1589800	1595800	So this here is basic signaling for normal powerline communication.
1595800	1598920	It goes from 1 MHz to 30 MHz.
1598960	1604620	The gaps in between are frequencies, for example, for home radio frequencies.
1604620	1612040	So when they created the standard, they already knew there might be some interference with other protocols and standards.
1612040	1615620	So they intentionally left these gaps out.
1615620	1618720	That's why also the signal drops in between these gaps.
1619980	1624800	So in development, you normally use vector CCS listeners.
1624800	1626820	So this is basically by design a tool.
1626820	1630500	It's an induction coil around the charging cable.
1630540	1634400	And the vector listener basically decodes everything for you.
1634400	1636720	And you have everything in clear text.
1637020	1642160	You can also do the same thing if you don't want to spend 4,000 euros for this.
1642940	1647680	280 bucks for this, which basically can do the same thing.
1647680	1652440	In this case, also with an induction coil, because it's easier to handle.
1652940	1657460	But you can also just use a plain wire.
1658980	1666200	So it doesn't really matter how much you spend, because you can always spend less.
1666740	1671160	So this was basically just a little wire we had laying around.
1671280	1672700	And why not?
1673020	1676900	And even with just a wire, you can already get through a distance.
1676900	1681560	Because since it's high frequency, the common mode is quite strong.
1681560	1684280	So the magnetic field around the charging cable.
1684320	1687060	So it's really easy to pick up.
1687960	1696280	We did try to replicate the research Oxford did beforehand with broken wire, what he mentioned.
1696600	1703440	The issue was we had a 5G antenna above our lab and all kinds of other antennas.
1703440	1710020	So we had so much interference, we weren't able to really get it working and replicate it.
1710040	1716920	So one of our interns had the crazy idea to do this.
1717080	1723100	He connected the antenna, so to speak, to the ground of the house.
1723920	1727180	And it turns out this works.
1727280	1731180	You can attack PLC communication via the ground itself.
1732360	1740500	Because in electric charging, the car and the charging station create a pen system.
1740500	1743620	So PE and neutral is the same.
1744120	1754960	And in the charging cable, we have a really thick ground cable, which is basically also directly hooked up to the building in this case, because the charger was inside.
1755800	1761160	But yeah, you can send data and you can read data depending on the sensitivity settings.
1761160	1763940	On your attacking device.
1763940	1765980	And it does work.
1765980	1771200	The easiest way to use this as an attack is in the denial of service.
1771860	1778100	Because PLC communication or power line communication is basically a sliding window protocol.
1778460	1786480	But if you fill up all the spots, the charging won't work because they can't do the slack handshake anymore.
1787700	1799260	So you could basically build a very, very small implant device and hide it next to a charge park, which would be basically impossible to find.
1800020	1804040	And make sure that EV charging never works in this location.
1805600	1808640	And there is no real fix for it.
1808640	1819020	We did do some testing and we found some ways to block the signals from external with ferrite cores, for example.
1819580	1826480	But it's not a really good solution because you can also just use the screw of the wheel, for example.
1827260	1837060	We also used the isolation of an Ethernet cable, connected it to a switch somewhere in the building, did the attack and the charging still failed.
1837560	1842580	So you'd only need some way of ground communication and the ground is everywhere.
1843000	1851200	And if you amplify the signal into the ground, as long as you don't trip any fuses, the range is basically unlimited.
1853840	1859900	So what do you actually do, can you do to get into the network?
1860140	1872020	So at the beginning, there's the slack protocol or slack exchange, which is basically the exchange of a network key, which is sent in plain text.
1872020	1884840	So you can just open Wireshark, if you have a module which does all the decoding for you, read out a key and then join the PLC network and you're in.
1885160	1891020	But obviously we're lazy, so here's a Python script to automate it.
1891020	1898240	I'm using the Home Plug Pawn library, which is out there for quite a few years now.
1899280	1909880	But with this, you can basically also get started with researching this topic, because most of the actual Qualcomm functionality is strictly under NDA.
1910320	1920960	It has been leaked all over the places in older versions, but if you want to do it fully legally, this would be a good way to get started.
1923500	1926000	So how does it look like when we actually run this?
1926000	1931240	So here I'm basically just connected to this development board.
1932240	1938120	I have my wire around the charging cable and listening to the slack exchange.
1938120	1943640	I then read out the key, set it to my own module and can join the network.
1944240	1950280	In this case, I also spoof the MAC address of the charger itself.
1951120	1961040	Because the module does filter a lot of traffic by default, which can't really be disabled in a normal firmware stack.
1962080	1966800	So this is the best way to get more traffic out of it.
1966800	1973240	Else all the IPv6 traffic, for example, will be filtered out and you don't only see the broadcast messages.
1975380	1988840	So when you join the network, you can then, for example, dump the configuration file from a car or a charger, depending on what your victim wants to be like in this case.
1989340	2001860	And if you do a strings command on the PIP file, you then also can see the firmware version of this specific PIP file.
2002040	2009340	And as you see here, it was a quite late model of a car and it's running one of the very, very first firmwares.
2009780	2015000	So there hasn't been any kind of update for at least eight years or plus.
2016320	2019560	But yeah, you can even do more fun things.
2021160	2028580	All right, so next up, we've seen that these models can do a lot if you've kind of used them in somewhat unintended ways.
2028580	2032120	So now what happens if you use them in a really unintended way?
2032120	2040680	So for this, we need to kind of start looking at the firmware even more to really understand what's in there and potentially what could we put in there.
2041720	2046640	So it's basically time to start kind of having a bit of look at the reverse engineering of these chips.
2046640	2052600	So first, if we just start to look at the developer board, we have the kind of small chip, which is the QCA7000.
2052600	2054520	That's the communication model itself.
2054600	2057540	And I said that it connects to the host system via Ethernet.
2057640	2063100	Turns out that's not entirely true because the chip doesn't have an Ethernet hardware in it.
2063100	2066100	So it needs this external Ethernet to SPI adapter.
2066480	2071020	But the packets themselves, logically speaking, are still full Ethernet frames going through.
2071760	2080900	More importantly, though, it also needs an SPI flash chip, at least if you're not using the host booting setting, where it stores the firmware and it stores the PIB.
2082120	2093680	So the next logical step, if you kind of want to see what's going on inside of the chips, especially since you are not able to just download the firmware from the Internet, is to dump the flash chip and see what's really on there.
2093680	2095280	What is this chip running?
2096360	2107460	So conveniently, if we take a look at OpenPLC utils and start digging through the source code, there are actually all the tools necessary for doing a firmware update for modifying the PIB.
2107460	2114920	Turns out they like reusing code, and the code is to do something called NVM chains, the non-volatile memory chains.
2114920	2118920	This is the kind of way they store data in flash.
2118920	2122000	It's essentially a doubly linked list of headers and blocks.
2122020	2129440	Each of the headers contains the checksum for itself, the checksum for the data, as well as some metadata about what's to follow.
2130080	2136320	I should note that I didn't find any signatures anywhere, so it's all just a really, really simple XOR checksum.
2136320	2140840	And the code for it, again, is conveniently provided by OpenPLC utils already in C.
2140840	2143040	So no need to reverse engineer any of that.
2144140	2147700	So we understand this kind of structure of the chains.
2147700	2164220	They actually are really convenient, because the first block in every chain is always something called a manifest, which is a bunch of actual, quite human-readable text of build numbers, build dates, version numbers, this type of thing that might be interesting to understand what you're looking at.
2164500	2170020	So if we dump the flash chip, what we're really expecting to find is basically the firmware and the PIB, right?
2171000	2176680	Well, we did the dump, and the first thing we see is, indeed, right at the start of the flash chip.
2176680	2179500	It's only two megabytes, so not too much to go through.
2179740	2183080	It's something that describes itself as a soft loader.
2183540	2188760	It's also reasonably short, and it just seems to be some sort of, essentially, bootloader code.
2188800	2196740	And additionally, it has something at the end called the flash layout section, which describes everything else that we are about to find on this flash chip.
2197020	2199720	So the next thing is the firmware chain.
2200040	2204320	So this contains a bunch of modules with the names as shown on the screen.
2204320	2207260	I don't fully understand what they actually do yet.
2207260	2212160	They seem to be probably some sort of initialization modules to really set everything up.
2212700	2217140	And then at the end, we have the actual firmware section.
2217260	2231440	And inside the firmware section, they really like NVM chains, so there is an entire second NVM chain inside of this data block, which contains a very, very short firmware section and a very, very long high-entropy binary blob.
2231960	2240560	Now, this, when I saw it, kind of really sucked because if it's some high-entropy blob, this obviously means that they've done the logical thing to encrypt their firmware.
2241400	2244420	But let's just keep poking around just to see what else we can find.
2244420	2248440	So there is an area for custom modules, apparently, which is entirely empty.
2248440	2250880	I'm not entirely sure who uses it.
2251000	2253820	There is also a PIB section, which is as expected.
2253900	2259700	A scratch area, which just seems to be kind of fragments from memory copying, probably during the firmware update process.
2259780	2263280	And then an entire backup of the firmware, just in case something were to happen to it.
2265000	2276420	So, an approximation for how the boot process works is that some sort of boot loader loads the soft loader, and then the soft loader loads all of these initialization modules.
2276440	2287780	The initialization, and after that, it loads the actual kind of the small firmware image, which is probably some sort of decryption final loading stage, and then it jumps into the big blob.
2288840	2299140	So, we wanted to kind of go deeper in and we started by looking and reverse engineering the code for the actual firmware loading section.
2299480	2302920	So , it is just ARMv5 instructions.
2306540	2319380	And yes, what it does is, much as we expected, it loads in the big binary blob from Flash, and then it calls to a function in the high F address range, and then it jumps into the blob.
2319380	2324800	Now, this high F address range is entirely separate from everywhere where content from the Flash is getting loaded.
2325020	2328140	So, if we want to track down this code, we must look somewhere else.
2328780	2336820	And with a bit of research, we quickly also found out that ARM uses an entry point up in the high Fs, at least it's one of the options.
2337220	2341860	And so, we assume that this must be in somewhere in the boot loader, which is great.
2341860	2344780	However, the boot loader is on the chip itself.
2345300	2349300	And if they don't give us the firmware, they're definitely not going to give us the boot loader.
2349900	2351740	So, how do we get this?
2351740	2353560	Well, we do have code execution.
2353900	2361140	As I said, a bunch of these modules right before the firmware itself gets loaded, they're just plain binaries on the Flash.
2361460	2365300	I can easily write to them via a chip clip, at least.
2366280	2369160	And, yes, I can create my own custom code.
2369160	2371660	This is easy, and there's also no signature checking.
2371700	2374040	The checksums are very easy to calculate.
2374100	2375180	So, that's all good.
2375180	2377060	I just need some sort of IO.
2377480	2379760	Now, this is a communication modem after all, right?
2379760	2380980	So, that should be very easy.
2380980	2382800	The whole thing is full of IO.
2382900	2391620	It has PLC, which is true, except the PLC subsystem is only ever initialized by the firmware, which I have not seen.
2391620	2394220	So, I have absolutely no clue how to use the PLC hardware.
2394600	2398460	Same thing applies to the Ethernet interface and to the GPIOs.
2398500	2401980	The only IO we've actually seen is reading from Flash.
2402000	2411480	Because of how the write protect works, I don't exactly know how you can write to Flash, because I would need to toggle some more GPIOs to actually enable the write feature of the Flash chip.
2411680	2413140	But at least I can read.
2413560	2417320	So, I came up with a rather simple little attack script.
2418000	2419460	Don't mind the assembly.
2419460	2427880	That's just to make sure that relative memory addresses are aligned exactly as they need to be when you actually slot this code in somewhere into the soft loader.
2428280	2439840	But essentially what it does is it goes through the bootloader address space and takes the data that we would like to exfiltrate and treats it as a Flash address and then issues a write command to that address.
2440140	2445140	Now this is in a sense entirely useless because we're just reading from random locations on the Flash chip.
2445140	2446340	It's a null operation.
2446540	2460020	But if we hook up a chip clip or some sort of chip debugger, we can actually record the SPI traffic coming out of the chip and by slowly reassembling all of the addresses, we can actually figure out what the entire data it's sending is.
2460400	2462880	And so this is how we got out the entire bootloader.
2463600	2468060	So now that we have the bootloader, we could actually start engineering this as well.
2468360	2471840	And we found quite a lot of interesting stuff in here.
2471960	2476220	So we found the SPI subsystem, which connects to the host interface.
2476320	2481520	We also found SPI to our Flash in slightly more detail than we've been able to see so far.
2481760	2485580	We've also found evidence of an entire Ethernet driver.
2486340	2493980	So even though the chip itself doesn't directly support Ethernet, it seems like there might be other hardware variants which have the hardware integrated.
2493980	2496880	And so the bootloader code already contains this as well.
2497500	2505340	Now, all of this is pretty painful to go through because it seems to have been compiled from C++ or some similar language.
2505340	2511320	So there are a lot of virtual function tables and similar other kind of complexities.
2511320	2518160	Also many, many layers of pointers jumping around, even though they all point to entirely fixed hard-coded addresses.
2519880	2522500	So anyways, it's been a fun reversing task.
2522500	2525060	And we could also look at the mysterious decryption function.
2525120	2529940	Turns out it was standard LZMA compression with default settings.
2531300	2537580	So that's in a sense good, because at least it means I don't need to break any encryption here.
2538800	2541760	So for the next steps, what can we do?
2541760	2545460	Well, we would like to create proper C headers for all of the peripherals.
2545460	2556740	We've been able to kind of find some of the functions which do certain tasks with the peripherals, but we don't fully understand the memory-mapped IO registers themselves or necessarily all of the parameters in detail yet.
2557740	2568020	And then also now that we know how to actually decrypt the main, or decompress the main firmware image, we can start decompiling that to see what sort of secrets are hiding within.
2568540	2575520	We can also, once we have this firmware, start reversing the interface towers, the PLC subsystem, so the actual PLC hardware.
2575920	2580560	I have a suspicion that there is quite a lot that's happening purely in software.
2580860	2595620	So if you're able to really reverse this firmware and start creating your own, then that's going to open up the whole possibility of doing a lot with kind of the building block RF hardware that's inside of this chip to make kind of weird new custom protocols.
2596760	2601460	So yeah, this would then allow us to do everything that we need to properly create custom powerline firmware.
2601820	2615900	Now, unfortunately, we didn't quite get this far before the talk started, but in one of our calls, kind of planning for this conference, Jan asked me, but we really should do a demo and can it run Doom?
2617500	2622120	So a normal person would have probably laughed this off as a joke.
2622600	2625360	Anyway, I started reviewing the situation carefully.
2625360	2628420	First of all, we have very limited flash and very limited RAM.
2628420	2633160	I also don't know how much RAM we have, and I don't know what address the RAM is at.
2633880	2635240	Again, no documentation.
2635240	2637960	I only know some small address spaces that I can use.
2638640	2640020	We have I.O.
2640020	2645560	We have, now that we've seen the bootloader code, actually access to the Ethernet to get off of the chip.
2645820	2649940	There is, of course, no screen or human input device or anything like that connected, though.
2650320	2652000	There's also no operating system.
2652000	2653020	It's just a single core.
2653020	2654660	It's essentially a microcontroller.
2654820	2657460	I mean, after all, this is a communication chip.
2657460	2660920	This is not supposed to be the brain of your charging system .
2660980	2663460	This is an equivalent of a Wi -Fi chip.
2664020	2666240	There's also no floating point, as you may assume.
2666240	2669140	So yes , so in short, yes, yes, it can.
2670000	2677560	So we created this simple little demo here where we have the power line modem and it's connected just to my computer via Ethernet.
2677620	2686360	And then as I power on the modem, it will slowly start to boot, initiate a UDP connection and start sending back frames.
2686360	2693140	Now the frames are somewhat low resolution because I needed to fit every frame into a single UDP packet.
2694440	2699240	But yes, and then in turn my computer sends back,
2706560	2711460	yes , and then in turn I just send back the keyboard and mouse input to the chip also via UDP.
2711460	2713960	And so all the rendering is just happening on chip.
2714520	2717280	And then as we unplug it, as expected, the frames stop coming.
2718840	2720800	And yeah, this can run in real time.
2720800	2727320	So the chip does have some amount of processing power to it, though it did take some optimizing to get it to run at a reasonable frame rate.
2727780	2730500	It's a communication chip not designed for 3D graphics.
2735020	2740400	All right, you shouldn't take everything so serious when I say.
2745400	2754780	All right, so as we've shown, there are multiple issues with the standard and the chip everyone uses.
2755060	2761160	And one of the issues is even these development boards can't be bought privately.
2761160	2768400	This can only be bought business to business, which makes security research quite limited.
2768400	2774860	But we definitely need more research in this field.
2774860	2785360	There's basically nothing public and security by obscurity never works, especially as soon as you dump the firmware in the bootloader.
2785480	2786980	It's kind of open source anyway.
2786980	2799670	So therefore, we would recommend that the standard goes fully public, even though it's vendor-specific implementation.
2800360	2806120	For the signal leakage, well, yes, you could use shielded cables.
2806120	2811360	I've seen a lot of discussions about this when it came to the original broken wire tech.
2812820	2816780	Yeah, you need to connect the shield to something, right?
2816780	2819420	And what is it connected to in most cases?
2819420	2820880	To ground.
2820880	2823560	But we can attack near the ground as well.
2823560	2826500	So the shielding doesn't help at all.
2828060	2836900	Something I like to tell people, maybe I show them like a piece of wire, and I say, what's the difference between this piece of wire and an antenna?
2836900	2837520	Nothing.
2838020	2841600	Yeah, so everything radiates.
2841600	2855320	So you could add some kind of ferrite cores at some end, but then you can still attack via the other one because the communication in between still needs to be undisturbed.
2856200	2858200	Then what about network intrusion?
2858200	2860440	Yes, you could implement secure slack.
2860440	2862310	It's actually defined in the standard.
2862620	2864180	It's not there anymore.
2864180	2872920	But even if you would implement secure slack so you can't intrude into the network, it wouldn't work.
2872960	2883700	The issue is there are already a lot of chargers out there, a lot of cars out there, and not all manufacturers are able to remotely update the firmware.
2884080	2889880	So you need to have a downgrade version where this attack is still possible again .
2890340	2898280	So with these issues, we're probably talking about five to 10 years in a reasonable time frame to be resolved.
2899520	2904960	And this is a big issue because the EV industry is growing.
2904960	2906600	It is critical infrastructure.
2907500	2912620	So we need more people to take a look at it, break it.
2912880	2922220	We are happy if people break our product, but please ask for permission from the owners because we don't operate the chargers.
2922220	2926720	We sell them and some other company is actually managing them.
2926720	2930460	So please ask for permission again and be very careful.
2931280	2937780	But in my personal opinion, we should get rid of PLC in the long term anyway.
2937780	2943760	It should stay where it should be in your home network if you really need it.
2944300	2957740	Because what we have found, and again, we can't share everything yet, it is fully broken, in my opinion, and I don't see any reasonable fix coming.
2957760	2961540	And there are different standards out there, like CAN.
2961540	2965560	Yes, CAN is also not really secure, but it's better in a sense.
2965560	2968760	Or now with MCS, it's basically Ethernet.
2968820	2971500	Remove the unnecessary complexity.
2971760	2977860	There are not more than enough attack vectors in the Ethernet IP stack in itself.
2978240	2980800	No need to make it more complex as need be.
2982960	2984700	And yeah, that's it.
2984700	2985840	If you have any questions...
2992580	3002920	And we also put some references here, which might get you help started in researching this topic.
3003920	3005080	But yeah.
3006880	3007980	All right.
3008360	3009280	Sure.
3010240	3011160	Yeah.
3018120	3022080	It depends on the manufacturer.
3022080	3026760	Most car manufacturers, especially in Europe, I haven't tested any in the US.
3026760	3030060	I did have a chance to test some in Asia.
3030060	3034100	They use host boot, so it wouldn't be a persistent attack.
3035460	3039100	But you can still attack the PLC communication.
3039160	3051220	And depending how their internal ECU network setup is, you could theoretically, with some spoofing attacks, break into internal networks , for example.
3051220	3057940	So it's more like an initial attack vector than a full exploit you have root or something.
3076880	3080480	So the spec explicitly says it should be interoperable.
3080480	3088360	And I don't think we did, but there is some work out there of people using these home adapters and getting them to talk to chargers.
3088360	3089480	So you can do it.
3091520	3102240	So with the home plug modules you have at home, they run on AC and neutral most of the time.
3102380	3108520	And here it's PE and DC, or yeah, 24 volts.
3108520	3110040	But it's basically the same.
3110040	3114620	So it does work somewhat, but it really depends on the firmware versions.
3114620	3118300	So there are some hoops you need to run.
3121520	3130080	Interface into this kind of an app, or you're actually, what you're doing is it's superimposing itself on what's called a control pilot system.
3130520	3131440	Exactly.
3131560	3136060	It's a matter of really just changing up the coupling transform of what they use.
3136280	3137040	Yep.
3140910	3142590	Any more questions?
3154190	3160690	The box you talked about, again, to do the grounding attack, have you all tried that or is that the next step of research for you both?
3161510	3164490	We have attacked via the ground successfully.
3164490	3170590	It does work, but we're not sharing everything at this moment.
3171790	3178750	And the whole vulnerability in itself, like with the security bit, is unpatched, by the way.
3178750	3181830	There's no security fix by Qualcomm yet.
3189230	3191210	Is it enabled to secure the good things by
3194980	3195580	Qualcomm ?
3197280	3201320	Yeah, so funnily enough, Tesla actually just recently made a change.
3201320	3209040	Tesla used to be CAN, and then they wanted to be interoperable with everyone else, so they now switched to ISO 15118.
3210720	3217820	So yeah, it can probably be, you can probably start doing it in a way that you make, put both hardware in there and you eventually switch it over.
3218000	3222460	Evidently, if Tesla could put both into the same car, then it is possible to do.
3223760	3231640	But yeah, I don't know if anyone's really going to start doing this, because first you need the standards to be set up, and then for them to be some reason to do.
3234900	3236160	I know, of course.
3242710	3247690	Yeah, I would say it's not really feasible for the big picture.
3248130	3255230	There are some manufacturers, car manufacturers, who claim they build MCS cars.
3256030	3260690	So with the MCS adapter, which would be just Ethernet, automotive Ethernet.
3261210	3265990	But I don't believe this will be widely adopted.
3268830	3276370	Yeah, also we did, so we did this measurement study I mentioned, also looking into the protocols is the archive link you can see on screen as well.
3276410	3284390	And there we found that about half the chargers still use the 2012 version of the actual communication, like IP stack.
3284390	3286590	So like protocol.
3286790	3289870	So it's even though this is, this is really just a software update.
3289870	3293110	And this whole protocol is designed in a way that it has version negotiation.
3293110	3296590	So if you just put the new ones on, it won't harm anything.
3296870	3299150	They still just don't have the new ones on.
3299450	3300190	So yeah.
3300990	3301870	Cool.
3303330	3305230	Yeah, thank you for the answer.
3305430	3306230	Thanks.
