[00:00.000 --> 00:06.180] As our speakers, we'll have Anthony Rose, AKA Korn, and Jake Krasnov, AKA Hubbell. [00:06.180 --> 00:10.260] They'll be presenting on ReBadge, Relabeled, and Rooted. [00:10.320 --> 00:11.320] Let's go. [00:15.260 --> 00:20.220] Hey, welcome everyone to our talk on ReBadge, Relabeled, and Rooted. [00:20.220 --> 00:22.820] We're going to be talking about hacking the solar supply chain. [00:22.980 --> 00:24.540] Just a quick introduction. [00:24.540 --> 00:25.320] I'm Hubbell. [00:25.320 --> 00:26.820] I also go by Jake. [00:26.820 --> 00:32.680] My background was in astronautical engineering, where I was in the Air Force doing missile testing stuff. [00:32.680 --> 00:36.680] And I walked in one day at a fighter test squadron, and they said, you're our new cyber expert. [00:36.680 --> 00:37.880] And that's where I met him. [00:38.180 --> 00:39.480] This is Anthony. [00:39.600 --> 00:50.980] But after that, I went to the 57th Information Aggressor Squadron, where I got to do offensive security operations, emulating Russian and Chinese threats for cyber, which was really cool. [00:50.980 --> 01:01.020] And then after that, I left and went to Boeing, where I was one of their lead security engineers for avionics at Phantom Works, which is Boeing's equivalent of Skunk Works, if you've heard of that at Lockheed. [01:01.140 --> 01:03.800] And then since then, I've been working at BC security full time. [01:03.800 --> 01:07.140] I'm our red team ops lead and our embedded systems specialist. [01:07.200 --> 01:09.420] And then I'll let Anthony introduce himself. [01:09.840 --> 01:10.900] I'm Coyne. [01:10.900 --> 01:15.700] Like Jake said, we worked together doing fighter aircraft, cyber testing. [01:15.700 --> 01:18.740] He did all the work and I got all the credit, so it's pretty nice. [01:19.100 --> 01:21.160] I just graduated and got my Ph.D. [01:21.160 --> 01:22.380] in electrical engineering. [01:22.620 --> 01:24.860] Right now, I am... thanks. [01:24.900 --> 01:25.580] Yep. [01:25.640 --> 01:31.500] Uh, right now, I'm the assistant professor at the Air Force Institute of Technology. [01:31.620 --> 01:37.240] And then, uh, my other job is working with Jake doing the cyber fun things that I, that we do. [01:37.240 --> 01:45.120] Uh, my background is mostly in, like, machine learning, but I also do a lot of offensive tool development and I collect a lot of bourbon. [01:46.720 --> 01:49.120] And then we wanted to give a shout out to Peter. [01:49.120 --> 01:54.500] He was the other person that helped us with this research over at Ova Nova, but he was unfortunately not able to make it here. [01:54.620 --> 01:56.840] Um, quite a long way for him to travel from Africa. [01:56.840 --> 01:59.340] But, uh, he's a solar systems specialist. [01:59.340 --> 02:01.140] He's the CTO at Ova Nova. [02:01.260 --> 02:04.640] Um, and it was really awesome to have him, uh, help us on this project. [02:04.740 --> 02:07.400] Uh, so we found lots of vulnerabilities. [02:07.400 --> 02:09.660] So far, we've gotten 14. [02:09.660 --> 02:11.660] That's a little bit of a influx. [02:11.660 --> 02:17.160] Um, we'll talk about EG4, but there's also some stuff with LuxPower and a couple other things. [02:17.160 --> 02:22.040] Um, but so far, 14 CVEs that we found, um, we'll talk a little bit about all of them. [02:22.840 --> 02:24.600] Um, what happened? [02:24.600 --> 02:25.300] There we go. [02:25.300 --> 02:29.620] Um, so solar is like rapidly increasing in the world. [02:29.620 --> 02:35.780] Uh, so far there is estimated to be 25 million homes globally with solar power installed at their houses. [02:35.780 --> 02:42.760] Um, these are often taking on the form of what are called micro grids, um, which are full like miniature power plant at the house. [02:42.800 --> 02:47.600] Um, and it's projected that we're going to reach a hundred million homes by, uh, 2030. [02:47.820 --> 02:48.940] And that's just homes. [02:48.940 --> 02:55.040] That's not including like large solar farms and some of the like corporate buildings that are putting, uh, solar on there. [02:55.040 --> 03:01.600] Cause in April, we actually reached 10% of the global power generation being, coming from solar. [03:01.600 --> 03:02.580] Like that's everything. [03:02.640 --> 03:11.740] Um, and it's just growing really fast and all these devices are being attached to, you know, uh, critical infrastructure and national power grids and all that kind of thing. [03:12.060 --> 03:16.300] Um, so I mentioned micro grids, they do these five critical functions. [03:16.680 --> 03:20.960] Um, this is what makes like a power plant or like a miniature power plant work. [03:20.960 --> 03:30.700] Um, one of the most important distinctions from like just a, uh, solar panel with like a battery that you have at a house, like backup power is the ability to integrate with the grid and that grid isolation. [03:30.840 --> 03:34.260] Um, we didn't find any issues, uh, currently with that. [03:34.260 --> 03:36.560] We have some theories on how you could do it. [03:36.560 --> 03:43.820] Um, but we did find a vulnerability or an issue in all four of the other functions of the, uh, standard micro grid that you see built at a house. [03:43.900 --> 03:47.380] Um, because every one of these steps has smart devices in them now. [03:47.380 --> 03:53.100] Um, whether that's the actual solar panel has an optimizer attached to it that connects to the internet. [03:53.100 --> 03:57.920] Um, the battery systems have like battery management monitoring stuff that goes out to the internet. [03:57.920 --> 04:14.940] Even the inverters that are just responsible for doing like your DC to AC conversion, um, that kind of stuff, it all has smart, uh, technology in it and all of them individually connect to, um, the internet and they all have their own monitoring apps and it's just kind of gotten really crazy with the supply chain. [04:14.940 --> 04:19.980] And they're normally linked into like smart, uh, some sort of like smart cloud environment. [04:19.980 --> 04:28.020] Uh, what we found is a lot of the devices that are like in remote locations, they may be plugged directly into the internet without any router or anything sitting in front of that. [04:28.020 --> 04:30.160] So kind of scary sometimes. [04:30.160 --> 04:30.600] Yeah. [04:30.760 --> 04:37.860] And so China is the global leader in solar energy, not, uh, both in, uh, the use of it. [04:37.860 --> 04:42.400] They have like the largest amount of solar panels installed and the largest amount of solar generation. [04:42.400 --> 04:47.500] They're also by like far and away the largest manufacturer of solar devices. [04:47.500 --> 04:54.060] Um, to the point that like a lot of the Western companies selling stuff that they claim is made and developed in the U .S. [04:54.060 --> 04:57.700] are just buying Chinese manufacturers equipment and relabeling it. [04:57.780 --> 05:04.560] Um, to the ones that we're going to be talking about, um, the most in our talk are EG4, which is just a rebrand of Luxpower. [05:04.660 --> 05:07.240] And then, uh, Solark, that's a rebranded dye. [05:07.360 --> 05:13.340] Um, and then they're also reusing , um, not just the hardware, but also the software from, uh, these Chinese manufacturers. [05:13.560 --> 05:16.900] Um , this should scare you because as we mentioned, they're all internet connected. [05:16.900 --> 05:21.040] So they, if you have this installed at your house, it's being connected to the internet. [05:21.040 --> 05:22.720] It's a way into your house. [05:22.760 --> 05:31.220] Um, and they have, uh, the ability to collect pattern of life data, see like when you're home, when you're not, um, as well as physical effects. [05:31.300 --> 05:36.740] So, uh, we were able to prove the ability to deny power generation remotely, um, to these grids. [05:36.740 --> 05:43.520] Uh, we haven't so far proved like catastrophic safety failure cause there are quite a number of like physical controls on these things. [05:43.520 --> 05:47.940] Um, but the inverters are responsible for like power phasing and that kind of stuff. [05:47.940 --> 05:53.700] And there are ways that, um, if a inverter wasn't hooked up properly, that you could potentially circumvent that. [05:53.700 --> 06:01.020] So it is a concern going forward, especially if we have concerns about, um, someone putting back doors or the ability to intentionally trigger stuff. [06:01.020 --> 06:03.780] Um, the physical effects are even more concerned there. [06:03.780 --> 06:09.020] And then like what makes us all the most like concerning is that all the supply chains are opaque. [06:09.020 --> 06:11.940] Um, we don't really know where this stuff's coming from. [06:11.940 --> 06:16.320] And tons of it is phoning home to China, even when the manufacturers say it shouldn't be. [06:18.020 --> 06:20.620] Um, like I said, supply chains, a dumpster fire. [06:20.620 --> 06:25.560] These are just some, uh, claims we pulled off of, uh, various manufacturing websites. [06:25.740 --> 06:29.580] Manufacturers websites, they say design developed and engineered in the United States. [06:29.600 --> 06:33.620] Um, but then you dump like the software and it's all Chinese debugging comments. [06:34.040 --> 06:38.080] Um, HomeGrid says that they're, they have a manufacturing plant here. [06:38.080 --> 06:46.100] As far as we can tell, all they're doing is at best assembly, uh, because like their parent company is Lithion, which is a Chinese manufacturer. [06:46.100 --> 06:55.960] And if you go on Lithion's website, like in China, all the stuff that they have for their pictures and installs and that kind of stuff still says HomeGrid on it, which means that they're probably the ones building it for them. [06:56.080 --> 06:58.740] Um, as well as just all the, it just continues. [06:58.740 --> 07:00.080] The rabbit hole goes deeper and deeper. [07:00.080 --> 07:02.980] And still leaving made in China on a device as well. [07:02.980 --> 07:12.260] So, um, so Sol-Ark, uh, also the rebadge of Dai, um, is another interesting one that has a couple of stories that we'll talk about. [07:12.260 --> 07:18.500] But until last year, um, they were like transparently sending stuff to China. [07:18.520 --> 07:26.020] Uh, Trend Micro did some investigations on inverters last year and found that like when they did firmware updates and everything, it all went to Alibaba. [07:26.200 --> 07:41.100] Um, Sol-Ark kind of acknowledged that and then said, hey, we're moving everything to, uh, AWS and US based servers in July of last year, except we still continue seeing, um, uh, users claiming that their devices are calling back to China. [07:41.100 --> 07:51.860] So we have like social media posts and OSINT stuff that shows as recently as May, um, these, uh, people are claiming that their inverters are just phoning home to China rather than the, uh, US based cloud. [07:52.100 --> 07:53.940] Um, so that just creates a lot of concerns. [07:54.260 --> 08:00.980] And Sol-Ark used to have a ton of claims on their website about being, again, designed, manufactured and made in the US . [08:00.980 --> 08:05.480] They were claiming they were rewriting the firmware for these devices in the US. [08:05.480 --> 08:07.160] They kind of removed that. [08:07.160 --> 08:13.420] And then like in November of last year, there was a major issue with, um, stuff related to Sol-Ark. [08:13.420 --> 08:16.400] Uh, it turns out it was kind of die, the little deep dive. [08:16.420 --> 08:24.320] Um, but they put out this note after, even though they were saying everything was made in the US that they were like taking a little bit of responsibility for what happened. [08:24.320 --> 08:29.300] Um, so they're kind of acknowledging that they're bringing technology over from China, even though they claimed that everything was being made. [08:29.300 --> 08:32.880] And that was around the time they started removing a lot of the claims on their website as well. [08:33.600 --> 08:39.120] And so the problem isn't just hardware, um, because hardware reuse is a fact of life. [08:39.120 --> 08:50.040] Like there's, we can't fault these manufacturers too much because like the US doesn't develop a lot of these things, but we can fault them for just buying someone else's technology and claiming it as their own. [08:50.060 --> 08:52.920] Especially if they're badging it as a US made product. [08:52.920 --> 08:53.540] Yeah. [08:53.720 --> 08:57.880] Um, but the bigger problem is that all the software appears to be coming from China as well. [08:57.880 --> 08:59.640] Um, and they're not transparent on that. [08:59.640 --> 09:05.380] And a lot of times they're just rebuying, um, software and not really understanding what it's being used for. [09:05.540 --> 09:21.420] Um, so like eLinter was the one that, uh, Solark was using and it was just goes back to Alibaba and had all kinds of Chinese associations with it until they moved it ostensibly to their own, um, monitoring platform, but we're still not sure where the software is coming from for them. [09:21.860 --> 09:37.900] So, uh, the story we want to talk about that was kind of a cautionary tale was in November of 2024, um, across North America, Puerto Rico and a couple of other locations, um, users woke up and said, Hey, I'm seeing my, my device was, my inverter was bricked. [09:38.040 --> 09:44.640] Um, and there's all these messages saying, Hey, contact Solark for, um, you know, how to resolve this. [09:44.640 --> 09:48.440] Uh, it was initially reported that these were actually in fact Solark devices as well. [09:48.440 --> 09:52.260] And it was theorized that Dai had bricked the Solark inverters. [09:52.600 --> 09:57.100] Turns out that it was just Dai devices that were probably purchased on gray market. [09:57.100 --> 10:01.880] Like the user didn't know that Dai had an agreement with Solark to not sell stuff there. [10:01.960 --> 10:04.940] And so like the installer came and put in Dai and they didn't know better. [10:05.160 --> 10:10.400] Um, but it's really concerning that a manufacturer was able to reach into people's homes and just like brick the devices. [10:10.800 --> 10:21.940] And, um, this was done remotely because, or we know it was a trigger, a remote trigger because devices that were behind firewalls and not connected to the internet didn't also have this issue. [10:21.940 --> 10:24.840] So it wasn't some kind of geo fencing where the device wasn't supposed to be there. [10:24.840 --> 10:25.960] So like it didn't register. [10:26.020 --> 10:30.200] Um, it was done after these devices had been installed for months and then they were bricked. [10:30.600 --> 10:40.460] Um, and so we don't know what kind of back doors that Solark may have in their own devices, um, because they're coming from the Dai manufacturer and they could have the ability to do this as well. [10:40.580 --> 10:47.680] Um, and this is all done through the automated, uh, firmware updates because Solark and Dai don't allow you to trigger the updates themselves, yourself. [10:47.680 --> 10:50.080] You have to call them and then they, uh, trigger it. [10:50.080 --> 10:59.180] And Solark is the, uh, the only person that's allowed to, only organization allowed to sell Dai inverters in North America. [10:59.180 --> 11:06.120] So we suspect that the reasoning behind this was that they didn't want any resale of third party, uh, devices. [11:06.120 --> 11:14.380] So we think that Solark was actually the one that asked Dai to brick these inverters, which again is kind of makes it worse that a U.S. [11:14.380 --> 11:22.680] company was asking like a Chinese company to brick, um, devices that are critical to power generation for like, uh, people in North America. [11:23.300 --> 11:24.680] And so this was their response. [11:24.680 --> 11:27.320] They kind of like sort of not really took responsibility. [11:27.340 --> 11:31.240] They were like, hey, we heard about this and you know, we have a partnership with Dai. [11:31.240 --> 11:36.480] So if you come talk to us, we'll give you like a $200 discount on your $1,500 inverter if you want to rebuy it. [11:36.480 --> 11:38.560] Like that was their kind of sort of apology. [11:39.360 --> 11:45.880] Um, so this brings us to our first, uh, like actual CVE, which was related to packet power. [11:45.980 --> 11:56.860] So packet power is a, uh, monitoring device used for tracking, uh, heat, electricity, even, uh, like, well, like humidity is another one. [11:56.860 --> 12:02.400] Uh, typically found in like server farms, but we also found that they're installed with inverters in a lot of cases. [12:02.560 --> 12:05.140] Uh, these devices are deployed out. [12:05.140 --> 12:09.500] They can set up mesh networks as well, as well as being like hooked up to traditional like Ethernet. [12:09.720 --> 12:14.340] The defaults for all these devices when they were deployed are set without a password. [12:14.340 --> 12:23.760] So prior to version 4.1, these devices are set up as a smart device reaching out to the cloud with absolutely no encryption, no authentication, no nothing. [12:23.920 --> 12:27.500] Um, version 4.1 was supposedly supposed to come out yesterday. [12:27.520 --> 12:32.340] Uh, but I have no idea if it's actually out, but they did tell us that it was coming out this week. [12:32.960 --> 12:40.780] So, uh, when we found these devices initially, uh, we found hundreds, if not a thousand of these devices, uh, on the Internet. [12:40.920 --> 12:45.760] We went through a responsible disclosure with the manufacturer, then had to go through CISA. [12:46.040 --> 12:47.240] They didn't really respond. [12:47.240 --> 12:48.560] We told them we're going to DEF CON. [12:48.560 --> 12:49.680] Then they responded. [12:50.240 --> 12:53.500] Uh, we gave them IP addresses because they didn't believe us. [12:53.500 --> 12:58.100] Then they added login pages to those IP addresses, but didn't fix the other ones. [12:58.100 --> 12:59.960] So, whole bunch of fun things. [13:00.160 --> 13:02.200] Uh, but we went through, found a lot of the devices. [13:02.660 --> 13:04.480] Uh, this is kind of what they look like. [13:04.480 --> 13:06.300] Uh, gives you a lot of the monitoring data. [13:06.300 --> 13:08.940] Also allows you to upload custom firmware. [13:09.220 --> 13:15.100] Uh, they don't do any authentication or signing with their firmware, so you could just kind of upload whatever you want. [13:15.120 --> 13:25.500] Yeah, there are also some other menus about, like, don't touch this because you may cause legal problems for yourself on, like, the, uh, like, uh, frequency they'd broadcast, like, their, their, uh, radio frequency stuff on. [13:25.500 --> 13:28.960] So, like, there's lots of interesting things you can mess with in those panels. [13:29.700 --> 13:36.520] Uh, when we were going through their documentation, all their documentation points to that authentication is optional. [13:36.540 --> 13:38.040] It's an addition to it. [13:38.120 --> 13:47.500] Uh, and then we point that out to some of the disclosure, uh, people on their end, and they said that it's a basic failure on the customer, not them. [13:47.520 --> 13:49.360] Uh, which I thought was interesting. [13:49.360 --> 13:56.860] Also, they said they had no technical means of actually enforcing this, which I thought was interesting because they support a login portal. [13:56.860 --> 13:58.700] So, a little interesting. [13:59.020 --> 13:59.700] Yeah. [13:59.700 --> 14:03.940] So this brings us to EG4 where the bulk of our vulnerabilities were. [14:03.940 --> 14:07.280] Um, there was a lot of interesting things about them. [14:07.280 --> 14:16.900] Uh, first we started off with, like, just some OSINT to see, like, where they were because they, you know, they had that claim on their website of designed, engineered, and made in the U.S. [14:17.100 --> 14:22.760] Um, and now they have, uh, all these badges on there saying that they were made in China. [14:22.900 --> 14:29.180] Um, they did open a plant recently, so they may, we think a lot of these companies are kind of faking it until they make it. [14:29.180 --> 14:32.620] Like, they have plans to manufacture it here, so that's what they put on their website. [14:32.620 --> 14:36.360] And they just buy it from China until they get the manufacturing capabilities up. [14:36.760 --> 14:40.760] Um, but we do tear down to all the devices and everything is inside is made in China. [14:40.760 --> 14:43.860] Yeah, the two pictures on the left, uh, are just from YouTube videos. [14:43.860 --> 14:48.240] So, the top one's a battery that has, uh, made in China sticker. [14:48.240 --> 14:53.620] And the bottom one, they also have, uh, AC units that you can plug into your, uh, your home grid. [14:53.620 --> 14:55.280] And that is also made in China, so. [14:55.940 --> 14:59.040] So , this is just a quick comparison of, like, their login portals. [14:59.040 --> 15:06.080] Um, you can see that Lux Power and EG4, if you look on that, uh, the top image in the back, have the exact same picture. [15:06.400 --> 15:11.240] Um, and when you look at their, uh, HTML, they're pulling the pictures from the same server. [15:11.240 --> 15:13.180] So, like, it's not even kind of, like, similar. [15:13.180 --> 15:15.060] Like, they're sharing the same thing. [15:15.140 --> 15:23.820] They have, like, identical code, including the Chinese debug comments in it, even though Lux Power is the Chinese company and EG4 is the American company that's supposed to be doing their own stuff. [15:24.160 --> 15:28.140] Um, they also didn't get off to a great start when you go read their documentation. [15:28.400 --> 15:33.320] They had, uh, all kinds of stuff telling you to not use, like, special characters in your passwords. [15:33.320 --> 15:35.920] They said don't use long passwords, because you might forget it. [15:35.920 --> 15:37.600] Like, it was just not a good start. [15:38.000 --> 15:42.260] So, we started, uh, intercepting traffic from the devices to look for it. [15:42.260 --> 15:50.740] And one of the first things we found was, like, a lot of the Lux or EG4 stuff was just going to, like, US.LuxPower.com, um, and not EG4. [15:51.020 --> 15:58.900] And so, there was also, um, this user agent string that said, like, EG4 device, which allowed us to start looking for these devices connected to the internet. [15:59.200 --> 16:06.540] Um, we actually found a ton of them behind an application called Shine Monitor, which is a Chinese-based, uh, monitoring system. [16:06.540 --> 16:17.540] So, we're not sure if those were EG4 devices being sold in China or if they were Lux Power devices that just happened to be using the same user agent, since they seem to be just using all the same code between each other. [16:17.700 --> 16:25.480] Um, we didn't find any major issues with the Shine Monitor application, um, but we also didn't mess with it too much since it was an exclusively Chinese-based app. [16:26.020 --> 16:28.400] Um, but we did find a bunch of interesting OSINT. [16:28.880 --> 16:33.080] Uh, so, some of the devices that we found, like I said, were using public IPs. [16:33.100 --> 16:35.960] So, we tried to figure out if we could find any locations. [16:36.480 --> 16:38.620] Um, one of them we found was in Sri Lanka. [16:38.840 --> 16:41.700] It was on, it was a tourism building in Sri Lanka. [16:42.060 --> 16:49.020] Uh, the interesting part about that is if you look on, like, Google Maps, you can see the building and kind of, like, see if you can find any solar panels. [16:49.160 --> 16:56.500] So, first we found some of the, uh, AC devices on there, which I thought was interesting, but then we found the solar panels that are also there. [16:56.800 --> 17:00.420] So, pretty good likelihood that the inverters actually exist. [17:00.420 --> 17:05.760] So, then we decided that, hey, you know, we can kind of dig a little bit more and, you know, peel back this onion more. [17:05.800 --> 17:09.900] Yeah, and that OSINT will matter once we get down the full stack of CVEs. [17:09.980 --> 17:16.160] Um, so, we started looking at the Modbus, uh, information on it, and this is related to two of the CVEs. [17:16.160 --> 17:28.040] Um, they have clear text Modbus communication, uh, which is a major issue because it means if you have the ability to talk to the device, you can intercept what it's doing, but you can also set configurations remotely because there's no authentication on it. [17:28.040 --> 17:33.420] It's also broadcasting its serial number in plain text, and that serial number is really high value. [17:33.420 --> 17:39.220] Once we have that serial number and we start doing some OSINT, you'll see that we can do some, like, account takeover and that kind of stuff. [17:39.560 --> 17:44.700] Um, to be fair to EG4, um, uh, this is like a industry problem. [17:44.700 --> 17:53.840] There's, like, none of the solar devices we looked at have any use of, um, like, TLS or IPsec on the Modbus, even though Modbus does support TLS. [17:53.920 --> 17:59.360] Uh, none of the manufacturers are using it, so, um, it's something that the whole industry needs to get better at. [17:59.360 --> 18:03.680] But with that serial number, we start downloading firmware to, uh, look at it. [18:03.680 --> 18:06.740] Uh, this is the, um, the second set of CVEs. [18:06.740 --> 18:17.540] Turns out the firmware has no authentication on it, no hashing, uh, to confirm that it's authentic, uh, firmware, and there is no ability for the device to, um, check for modification in the firmware. [18:17.540 --> 18:21.840] And the software format they were using is, like, modifiable without causing problems for it. [18:21.840 --> 18:26.740] So you can inject firmware however you want into the device, um, and that's not good. [18:26.740 --> 18:38.900] Because the, uh, instead of authenticating commands, we could brick the devices like Dai did, um, and then, uh, yeah, just all kinds of stuff if there's no authentication on the firmware, authentication on the Modbus commands. [18:39.380 --> 18:42.540] Uh, Jake mentioned the serial numbers being, like, high value. [18:42.700 --> 18:46.660] The serial numbers for these devices are almost like having a social security number. [18:46.680 --> 18:51.340] It gives you a lot of power to do things, so just revealing that information is pretty critical. [18:51.400 --> 18:51.840] Yeah . [18:52.140 --> 19:01.320] So, speaking of serial numbers, if we didn't have a device to, um, get that number from, we could start, uh, trying to figure it out through their registration portal. [19:01.320 --> 19:05.880] So the registration portal, um, is patched now, so we did responsible disclosure. [19:06.020 --> 19:13.640] Um, but you could start doing all kinds of serial number enumeration with it, and you could enumerate, uh , serial numbers that had even already been registered by someone. [19:13.640 --> 19:15.760] So, so Jake, you mentioned that it's patched. [19:15.760 --> 19:17.020] LuxPower also patched it, didn't it? [19:17.020 --> 19:28.720] Yeah, so, um, again, going back to EG4 and LuxPower being almost identical, the patches rolled out at literally the same time, so as soon as LuxPower's endpoint was patched, so was EG4's and vice versa. [19:28.840 --> 19:42.400] Um, but what happened was, if you took a serial number and put it in, um, to the registration page, which didn't require any, um, like, personal information, like, in fact, to create an account for LuxPower and EG4, you have to have a serial number and pin to enter. [19:42.840 --> 19:48.280] Um, so this is, like, totally unauthenticated, no information for them to trace who's doing this. [19:48.420 --> 19:55.060] Um, but you could start enumerating the serial numbers, and it would tell you if the serial number was valid, even though it was already registered. [19:55.440 --> 20:09.900] Um, so you could start, and there was no rate limiting, so you could just start guessing the serial numbers all you wanted, and they tended to be in blocks, so, like, they weren't randomized serial numbers, like, once you found, like, you know, BG07111, [20:09.900 --> 20:15.400] you could do about 50 numbers from, like, 112 to, like, 1150, and they were all valid serial numbers. [20:15.900 --> 20:20.100] Um, but it would tell you that the serial number already existed, then you could start guessing the pin. [20:20.220 --> 20:23.720] The pin was also not rate limited, so you could then guess the pin. [20:23.860 --> 20:31.580] Once you have the serial number and the pin, you can use that for registering your device or calling and doing a bunch of other stuff, start downloading firmware for it. [20:31.580 --> 20:32.500] Or transferring a device. [20:32.500 --> 20:34.220] Yeah, or transferring a device. [20:34.240 --> 20:45.040] But, um, you could also enumerate unknown serial numbers along with their associated pins, because, so we could get every serial number and pin associated with any of the LuxPower EG4 devices. [20:45.180 --> 20:47.920] So, at that point, we had a bunch of information we could use. [20:47.920 --> 21:03.220] Um, another interesting thing was once you had the serial number, you could, um, initiate a password reset, and then you would get some information about the username and email that they registered with, um, and you could then use, like, that OSINT that we were talking about to go find out information about the target, [21:03.220 --> 21:06.920] um, because you could start looking for, like, the IP addresses and things of this. [21:07.160 --> 21:12.580] Um, so, like, this one is an example of one that came from a, a, uh, PDF that they had. [21:12.580 --> 21:17.500] But I found one from, like, a YouTuber that had exposed their serial number and pin. [21:17.540 --> 21:25.960] I plugged the serial number in, and when it came back, the first two letters and the last two letters happened to be identical to the first two letters and last two letters of their YouTube channel. [21:26.040 --> 21:30.160] So you can probably guess what the, uh, um, what their username was. [21:30.200 --> 21:34.180] And then the, um, the pin for password reset is not rate limited. [21:34.180 --> 21:37.360] They still haven't fixed this, so there's no rate limiting on guessing the pin. [21:37.360 --> 21:43.260] It's only a six digit number, so you can guess the pin, reset the person's password, and have, like, a full account take over. [21:43.260 --> 21:44.660] The other one was an alphanumeric. [21:44.660 --> 21:45.940] This one is just numbers. [21:45.940 --> 21:46.520] Yeah. [21:46.640 --> 21:47.960] And not patched, once again. [21:47.960 --> 21:56.900] Yeah, but if all of that sounds too hard, once you have the serial number, you can also just call EG4 and say, hey, I bought this, um, from someone, and will you transfer control of the device to me? [21:57.000 --> 21:59.860] Um, they post that on their social media, that they will do that for you. [21:59.860 --> 22:04.540] Like, this was a response from them on a, on a form of someone saying, hey, I bought a device, how do I get it transferred? [22:04.800 --> 22:06.900] So you don't even have to do all that other work. [22:06.900 --> 22:11.080] You can just go enumerate the serial numbers and call them up and say, hey, um, we'd like control. [22:12.160 --> 22:18.560] So this gets us to, um, our final device that we're going to talk about, which was the Tigo Cloud Connect Advance. [22:18.840 --> 22:25.460] Um, this device is used for collecting data from solar microgrids, um, specifically their optimizers. [22:25.620 --> 22:32.740] Um, that's what it's used for, uh, primary use, but it also does an important job of a keep alive signal. [22:32.740 --> 22:33.480] So in the U.S. [22:33.480 --> 22:39.980] we have requirements now that every solar farm on, on residential stuff has to have a rapid shutdown device. [22:40.020 --> 22:48.980] Um, this is supposed to be so that, like, if there's a fire and, like, firefighters show up and they're trying to get into a building, like, they don't have to worry about live power wires from the, from the solar panel. [22:48.980 --> 22:52.320] So if they, if this signal is lost, the solar panel will shut down. [22:52.640 --> 22:56.900] Um, and this device, once connected, is responsible for that keep alive signal. [22:57.520 --> 23:00.260] So we found three different CVEs in this one. [23:00.300 --> 23:02.740] Um, the first one was hard-coded credentials. [23:02.940 --> 23:06.960] Um, hard-coded credentials have been being used by Tigo for a long time. [23:06.960 --> 23:12.740] People keep finding them, publishing them, then they sort of change them, um, and then leave it, and then leave it there. [23:12.740 --> 23:17.440] Um, there's also some, like, robust, uh, DIY communities that are looking into these devices. [23:17.580 --> 23:28.480] So, like, about, uh, two weeks ago on this, um, German, uh, solar DIY, uh, forum, we saw them starting to look into the same command injection stuff that we had, like, found already. [23:28.680 --> 23:36.320] Um, and they were, uh, like, trying to get access to these devices because they don't trust that these devices are secure for the monitoring solutions. [23:36.320 --> 23:40.520] They want to get access and reroute the data that it's sending out to, like, personal servers. [23:40.740 --> 23:44.200] Um, based on the stuff we found, that's probably a good assumption by them. [23:44.960 --> 23:50.280] Um, uh, but by default, these only have HTTP services running on the CCA. [23:50.500 --> 23:58.380] Um, in earlier versions of the firmware, you could turn on SSH by just browsing to CGI dash bin slash shell. [23:58.380 --> 24:00.800] This was any device on the internet, you could turn it on. [24:00.800 --> 24:07.620] It used the, it used default creds to get access, so you had full SSH access to the device, to the device by just browsing to that page. [24:07.620 --> 24:15.460] Um, I found several hundred of these still online because once you, um, start installing them, that's the only time that it forces you to update your firmware. [24:15.860 --> 24:29.940] Um, in the newer versions, since, like, version, uh, 3.8, uh, that CGI bin shell endpoint has been removed by them, but ours still shipped with version 3.6, even though the newest version is 4.0 when we bought it. [24:29.980 --> 24:35.280] Um, but you can still enumerate the devices, like, find out, like, their serial numbers, which, again, high value. [24:35.280 --> 24:42.100] You could go to the monitoring solution for Tigo and try to register to the device into their monitoring, um, application using the serial number. [24:42.940 --> 24:48.660] Um, but, uh, you also got, like, location, a little bit of location data, whether or not they're using mobile stuff. [24:48.660 --> 24:54.980] Um, but just, you could see that the device is on there and what firmware version it's running, so you could know which endpoint to go trigger and attack. [24:54.980 --> 24:57.900] And the most recent one we got was only, like, a month ago, right? [24:57.900 --> 25:05.440] Yeah, we got, we got another device to see how recent that update was, and it was running 3.6, so, and that's 3, 4 years old. [25:05.440 --> 25:05.880] Yeah. [25:05.940 --> 25:10.440] So the most useful endpoint on them right now is the CGI bin mobile API. [25:10.440 --> 25:22.300] It has a ton of functions, things like network info, um, uh, reboot, uh, a bunch of other stuff, like, related to other devices on the network for discovery and, like, figuring out where the optimizers are. [25:22.460 --> 25:27.260] Um, but device info and device ping only require the default credentials to access. [25:27.260 --> 25:40.420] The rest of those APIs that do give you, network information and, like, the ability to configure, like, um, the, uh, settings on the device, uh, require an additional, um, session ID that you have to put in. [25:40.600 --> 25:53.640] Um, but it turns out, like, that first off, like, the ping, the device ping, even though it took a, um, like, ping timeout that you wanted to use and should have been used for, like, device discovery, it had nothing to do with ping. [25:53.640 --> 25:57.340] It appears to be a covert backdoor, uh, for the manufacturer. [25:57.360 --> 26:06.760] Uh, when you, um, go and look at it, it accepts a, um, value from the user, but it's comparing it to this hash, uh, looking for a magic number. [26:06.760 --> 26:15.240] And if you submit the right magic number, it turns on SSH and kills all the, uh, current SSH sessions on the box so that the manufacturer can get in. [26:15.960 --> 26:24.260] Um, but, yeah, no, we didn't, we didn't have to, we, we thought about it, but it turns out that they had a command injection inside their own backdoor. [26:24.440 --> 26:28.180] So you didn't have to brute force the, um, the hash for that. [26:28.180 --> 26:42.020] So, um, because all they did was use a print F and pipe it into a SHA-256 to generate the hash, you can just use a simple escape character, um, with like a, uh, you know, apostrophe and a semicolon. [26:42.020 --> 26:44.540] And then you have arbitrary bash command execution. [26:44.640 --> 26:46.940] And this end point is being ran at root. [26:46.940 --> 26:49.380] So you can do whatever you want with the device at that point. [26:49.420 --> 26:58.900] Um, so this is just should be doing a quick, um, W get to a Python server to show that we had like remote code execution on it or remote command execution on it. [26:59.260 --> 27:05.420] Um, but to get to more interestingly, we wanted to get to those sensitive APIs that require a session ID. [27:05.500 --> 27:13.560] Turns out that that also had very little, um, security on it and was being done in a, uh, insecure fashion. [27:13.980 --> 27:23.680] So when you call that end point, that device info end point we use for the initial enumeration, it not only creates the session ID, it actually wrote overwrites any existing session IDs. [27:23.880 --> 27:28.160] Um, so you know the exact time that you're executing at, uh, when you send that command to the device. [27:28.300 --> 27:36.760] And it turns out that the way they generate that key is by, um, seeding SRANs, uh, with the current time when you call the function. [27:36.940 --> 27:43.460] Um, if you've done any kind of CTF before, you probably know that seeding SRAN makes your random function not random. [27:43.460 --> 27:47.200] Every time you call random after the seeding, it gives the exact same output. [27:47.720 --> 27:51.300] And, and this function only requires those default hard-coded also. [27:52.160 --> 27:54.720] So doesn't take much work to even get that far. [27:54.720 --> 27:55.040] Yeah. [27:55.040 --> 27:57.820] And then these devices are explicitly configured a specific time. [27:57.820 --> 28:00.520] So we know what time zone that they're keeping their own internal clock on. [28:00.820 --> 28:10.040] And so, uh, it did try to salt the, um, value like that, that SRAN, but when you dig a little deeper, it turned out that the salt was just hard-coded. [28:10.040 --> 28:17.020] So again, once you have the hard-coded value, you can generate the session ID when you call the device info, as long as you know what time you called. [28:17.200 --> 28:21.300] Um, and we are the ones triggering the, um, the remote commands. [28:21.300 --> 28:23.080] So we know exactly what time it was sent. [28:23.700 --> 28:29.980] So here's just a quick video of me, um, showing that the first one is an attempt to call the network info. [28:29.980 --> 28:32.640] You'll see that we got an unauthorized request. [28:38.440 --> 28:45.280] Um, I then just pasted in that initial device info with a command to capture the Unix timestamp so that we could pipe it in. [28:45.960 --> 28:58.780] I then wrote a file for like an arm emulator or a, uh, POC on an arm emulator that did the hashing, um, with the seed value and the time, uh, to generate the, uh, code that we'll need. [28:59.160 --> 29:00.980] So that generates the session ID. [29:00.980 --> 29:05.640] Now we add the session ID to our, um, to our call. [29:13.260 --> 29:17.440] And we have access to the device for anything we want now, so. [29:21.380 --> 29:26.960] Um, so if you remember that keep alive, uh, you can actually access the reboot now. [29:26.960 --> 29:33.040] I tried to do the demo with the reboot, but I kept screwing it up and then I had to wait five minutes every time I screwed up for the device reboot. [29:33.040 --> 29:44.620] So I went ahead and used the network info, but we can now send a reboot, uh, to kill the signal from the, um, from the CCA and deny power generation to the TGOs, um, or anyone using a TGO. [29:44.620 --> 29:48.100] I actually found like a solar farm in Slovenia making like 200 kilowatts. [29:48.100 --> 29:49.960] The average home is making about eight. [29:49.960 --> 29:51.700] So it's a fairly large solar farm. [29:51.700 --> 29:53.860] Um, and we could have killed it if we wanted. [29:53.860 --> 29:56.260] It would have been very simple, um, with this. [29:56.360 --> 30:01.240] Um, and then just a, uh, quick Easter egg before we go. [30:01.440 --> 30:04.360] Um, this is not TGOs first rodeo at DEF CON. [30:04.360 --> 30:12.020] As I was dumping the firmware, they actually have an explicit link to the last time they were at DEF CON, um, to the slides from there. [30:12.020 --> 30:15.560] So, uh, we just wanted to welcome TGO back to the DEF CON stage. [30:15.640 --> 30:26.900] Um, uh, so what's next is that, um, the solar industry is growing faster than the security implementations. [30:26.900 --> 30:28.400] That's not all that surprising. [30:28.400 --> 30:30.780] That's what tends to happen in many of these startup industries. [30:30.780 --> 30:36.240] They're so preoccupied with getting, um, products to market and trying to be the first to market. [30:36.240 --> 30:38.920] The security is one of the first things that they stop thinking about. [30:39.060 --> 30:44.120] Um, so we need to build stronger partnerships with the solar industry to get them thinking about this. [30:44.440 --> 30:49.600] Um, we need to, um, you know, make sure that they are actually considering their security as they're building it. [30:49.600 --> 31:02.900] And we need to get clear information on the supply chains because we were able to link like LuxPower and EG4, but we have no idea if LuxPower is selling these device, uh, the hardware to other, um, developers. [31:02.900 --> 31:07.360] So this might impact other devices than what we have labeled here so far. [31:07.360 --> 31:10.520] Um, and the code is just a disaster because they don't know where they're buying it from. [31:10.520 --> 31:11.420] They're getting it. [31:11.420 --> 31:12.580] It's all written in Chinese. [31:12.580 --> 31:14.040] They don't know how to debug it. [31:14.040 --> 31:16.120] And so they just need help with that. [31:16.240 --> 31:19.300] You report the vulnerabilities and they say you have to go back to a different developer. [31:19.300 --> 31:19.680] Yeah. [31:19.680 --> 31:20.660] It's a disaster. [31:20.660 --> 31:20.840] Yeah. [31:20.840 --> 31:24.940] So actually when we reported this to EG4, they told us they forwarded it to LuxPower. [31:24.940 --> 31:28.440] What was, was how they handled the resolution of it. [31:28.640 --> 31:33.860] Um, so in the meantime, never expose, uh, solar control systems directly to the internet. [31:34.200 --> 31:37.900] I feel like that's obvious, but you know, you have a firewall. [31:37.900 --> 31:38.140] Yeah. [31:38.140 --> 31:40.380] We found a lot of devices on the internet. [31:40.500 --> 31:43.180] So, um, you know, make sure that that's not on. [31:43.180 --> 31:51.200] Even if you are using a firewall , disable automatic updates because we believe that's how some of these manufacturers are maintaining access to these devices. [31:51.780 --> 31:57.840] Um, and then take special consideration of remote monitoring solutions because that's tends to be the source of most of these vulnerabilities. [31:57.860 --> 32:01.620] They try to add internet capability and they do it in a really crappy way. [32:01.800 --> 32:10.600] Um, and so we can just ask more from these manufacturers because the other problem is, is they're not being penalized for having bad security because everyone just buys them anyway. [32:10.760 --> 32:20.720] And so the more we demand from them, the more, uh, these kinds of talks happen, stuff gets posted online and news stories and that kind of stuff, the more there'll be, they'll be forced to address this. [32:21.160 --> 32:22.260] So thank you. [32:22.260 --> 32:27.380] Um, and we have about five minutes for questions, so feel free to come up and we'll be happy to answer them.