1 00:00:00,000 --> 00:00:06,180 As our speakers, we'll have Anthony Rose, AKA Korn, and Jake Krasnov, AKA Hubbell. 2 00:00:06,180 --> 00:00:10,260 They'll be presenting on ReBadge, Relabeled, and Rooted. 3 00:00:10,320 --> 00:00:11,320 Let's go. 4 00:00:15,260 --> 00:00:20,220 Hey, welcome everyone to our talk on ReBadge, Relabeled, and Rooted. 5 00:00:20,220 --> 00:00:22,820 We're going to be talking about hacking the solar supply chain. 6 00:00:22,980 --> 00:00:24,540 Just a quick introduction. 7 00:00:24,540 --> 00:00:25,320 I'm Hubbell. 8 00:00:25,320 --> 00:00:26,820 I also go by Jake. 9 00:00:26,820 --> 00:00:32,680 My background was in astronautical engineering, where I was in the Air Force doing missile testing stuff. 10 00:00:32,680 --> 00:00:36,680 And I walked in one day at a fighter test squadron, and they said, you're our new cyber expert. 11 00:00:36,680 --> 00:00:37,880 And that's where I met him. 12 00:00:38,180 --> 00:00:39,480 This is Anthony. 13 00:00:39,600 --> 00: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. 14 00:00:50,980 --> 00: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. 15 00:01:01,140 --> 00:01:03,800 And then since then, I've been working at BC security full time. 16 00:01:03,800 --> 00:01:07,140 I'm our red team ops lead and our embedded systems specialist. 17 00:01:07,200 --> 00:01:09,420 And then I'll let Anthony introduce himself. 18 00:01:09,840 --> 00:01:10,900 I'm Coyne. 19 00:01:10,900 --> 00:01:15,700 Like Jake said, we worked together doing fighter aircraft, cyber testing. 20 00:01:15,700 --> 00:01:18,740 He did all the work and I got all the credit, so it's pretty nice. 21 00:01:19,100 --> 00:01:21,160 I just graduated and got my Ph.D. 22 00:01:21,160 --> 00:01:22,380 in electrical engineering. 23 00:01:22,620 --> 00:01:24,860 Right now, I am... thanks. 24 00:01:24,900 --> 00:01:25,580 Yep. 25 00:01:25,640 --> 00:01:31,500 Uh, right now, I'm the assistant professor at the Air Force Institute of Technology. 26 00:01:31,620 --> 00:01:37,240 And then, uh, my other job is working with Jake doing the cyber fun things that I, that we do. 27 00:01:37,240 --> 00: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. 28 00:01:46,720 --> 00:01:49,120 And then we wanted to give a shout out to Peter. 29 00:01:49,120 --> 00: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. 30 00:01:54,620 --> 00:01:56,840 Um, quite a long way for him to travel from Africa. 31 00:01:56,840 --> 00:01:59,340 But, uh, he's a solar systems specialist. 32 00:01:59,340 --> 00:02:01,140 He's the CTO at Ova Nova. 33 00:02:01,260 --> 00:02:04,640 Um, and it was really awesome to have him, uh, help us on this project. 34 00:02:04,740 --> 00:02:07,400 Uh, so we found lots of vulnerabilities. 35 00:02:07,400 --> 00:02:09,660 So far, we've gotten 14. 36 00:02:09,660 --> 00:02:11,660 That's a little bit of a influx. 37 00:02:11,660 --> 00:02:17,160 Um, we'll talk about EG4, but there's also some stuff with LuxPower and a couple other things. 38 00:02:17,160 --> 00:02:22,040 Um, but so far, 14 CVEs that we found, um, we'll talk a little bit about all of them. 39 00:02:22,840 --> 00:02:24,600 Um, what happened? 40 00:02:24,600 --> 00:02:25,300 There we go. 41 00:02:25,300 --> 00:02:29,620 Um, so solar is like rapidly increasing in the world. 42 00:02:29,620 --> 00:02:35,780 Uh, so far there is estimated to be 25 million homes globally with solar power installed at their houses. 43 00:02:35,780 --> 00: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. 44 00:02:42,800 --> 00:02:47,600 Um, and it's projected that we're going to reach a hundred million homes by, uh, 2030. 45 00:02:47,820 --> 00:02:48,940 And that's just homes. 46 00:02:48,940 --> 00: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. 47 00:02:55,040 --> 00:03:01,600 Cause in April, we actually reached 10% of the global power generation being, coming from solar. 48 00:03:01,600 --> 00:03:02,580 Like that's everything. 49 00:03:02,640 --> 00: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. 50 00:03:12,060 --> 00:03:16,300 Um, so I mentioned micro grids, they do these five critical functions. 51 00:03:16,680 --> 00:03:20,960 Um, this is what makes like a power plant or like a miniature power plant work. 52 00:03:20,960 --> 00: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. 53 00:03:30,840 --> 00:03:34,260 Um, we didn't find any issues, uh, currently with that. 54 00:03:34,260 --> 00:03:36,560 We have some theories on how you could do it. 55 00:03:36,560 --> 00: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. 56 00:03:43,900 --> 00:03:47,380 Um, because every one of these steps has smart devices in them now. 57 00:03:47,380 --> 00:03:53,100 Um, whether that's the actual solar panel has an optimizer attached to it that connects to the internet. 58 00:03:53,100 --> 00:03:57,920 Um, the battery systems have like battery management monitoring stuff that goes out to the internet. 59 00:03:57,920 --> 00: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. 60 00:04:14,940 --> 00:04:19,980 And they're normally linked into like smart, uh, some sort of like smart cloud environment. 61 00:04:19,980 --> 00: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. 62 00:04:28,020 --> 00:04:30,160 So kind of scary sometimes. 63 00:04:30,160 --> 00:04:30,600 Yeah. 64 00:04:30,760 --> 00:04:37,860 And so China is the global leader in solar energy, not, uh, both in, uh, the use of it. 65 00:04:37,860 --> 00:04:42,400 They have like the largest amount of solar panels installed and the largest amount of solar generation. 66 00:04:42,400 --> 00:04:47,500 They're also by like far and away the largest manufacturer of solar devices. 67 00:04:47,500 --> 00: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. 68 00:04:54,060 --> 00:04:57,700 are just buying Chinese manufacturers equipment and relabeling it. 69 00:04:57,780 --> 00: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. 70 00:05:04,660 --> 00:05:07,240 And then, uh, Solark, that's a rebranded dye. 71 00:05:07,360 --> 00:05:13,340 Um, and then they're also reusing , um, not just the hardware, but also the software from, uh, these Chinese manufacturers. 72 00:05:13,560 --> 00:05:16,900 Um , this should scare you because as we mentioned, they're all internet connected. 73 00:05:16,900 --> 00:05:21,040 So they, if you have this installed at your house, it's being connected to the internet. 74 00:05:21,040 --> 00:05:22,720 It's a way into your house. 75 00:05:22,760 --> 00: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. 76 00:05:31,300 --> 00:05:36,740 So, uh, we were able to prove the ability to deny power generation remotely, um, to these grids. 77 00:05:36,740 --> 00: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. 78 00:05:43,520 --> 00:05:47,940 Um, but the inverters are responsible for like power phasing and that kind of stuff. 79 00:05:47,940 --> 00:05:53,700 And there are ways that, um, if a inverter wasn't hooked up properly, that you could potentially circumvent that. 80 00:05:53,700 --> 00: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. 81 00:06:01,020 --> 00:06:03,780 Um, the physical effects are even more concerned there. 82 00:06:03,780 --> 00:06:09,020 And then like what makes us all the most like concerning is that all the supply chains are opaque. 83 00:06:09,020 --> 00:06:11,940 Um, we don't really know where this stuff's coming from. 84 00:06:11,940 --> 00:06:16,320 And tons of it is phoning home to China, even when the manufacturers say it shouldn't be. 85 00:06:18,020 --> 00:06:20,620 Um, like I said, supply chains, a dumpster fire. 86 00:06:20,620 --> 00:06:25,560 These are just some, uh, claims we pulled off of, uh, various manufacturing websites. 87 00:06:25,740 --> 00:06:29,580 Manufacturers websites, they say design developed and engineered in the United States. 88 00:06:29,600 --> 00:06:33,620 Um, but then you dump like the software and it's all Chinese debugging comments. 89 00:06:34,040 --> 00:06:38,080 Um, HomeGrid says that they're, they have a manufacturing plant here. 90 00:06:38,080 --> 00: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. 91 00:06:46,100 --> 00: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. 92 00:06:56,080 --> 00:06:58,740 Um, as well as just all the, it just continues. 93 00:06:58,740 --> 00:07:00,080 The rabbit hole goes deeper and deeper. 94 00:07:00,080 --> 00:07:02,980 And still leaving made in China on a device as well. 95 00:07:02,980 --> 00: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. 96 00:07:12,260 --> 00:07:18,500 But until last year, um, they were like transparently sending stuff to China. 97 00:07:18,520 --> 00: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. 98 00:07:26,200 --> 00: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. 99 00:07:41,100 --> 00: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. 100 00:07:52,100 --> 00:07:53,940 Um, so that just creates a lot of concerns. 101 00:07:54,260 --> 00: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 . 102 00:08:00,980 --> 00:08:05,480 They were claiming they were rewriting the firmware for these devices in the US. 103 00:08:05,480 --> 00:08:07,160 They kind of removed that. 104 00:08:07,160 --> 00:08:13,420 And then like in November of last year, there was a major issue with, um, stuff related to Sol-Ark. 105 00:08:13,420 --> 00:08:16,400 Uh, it turns out it was kind of die, the little deep dive. 106 00:08:16,420 --> 00: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. 107 00:08:24,320 --> 00: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. 108 00:08:29,300 --> 00:08:32,880 And that was around the time they started removing a lot of the claims on their website as well. 109 00:08:33,600 --> 00:08:39,120 And so the problem isn't just hardware, um, because hardware reuse is a fact of life. 110 00:08:39,120 --> 00: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. 111 00:08:50,060 --> 00:08:52,920 Especially if they're badging it as a US made product. 112 00:08:52,920 --> 00:08:53,540 Yeah. 113 00:08:53,720 --> 00:08:57,880 Um, but the bigger problem is that all the software appears to be coming from China as well. 114 00:08:57,880 --> 00:08:59,640 Um, and they're not transparent on that. 115 00:08:59,640 --> 00:09:05,380 And a lot of times they're just rebuying, um, software and not really understanding what it's being used for. 116 00:09:05,540 --> 00: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. 117 00:09:21,860 --> 00: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. 118 00:09:38,040 --> 00:09:44,640 Um, and there's all these messages saying, Hey, contact Solark for, um, you know, how to resolve this. 119 00:09:44,640 --> 00:09:48,440 Uh, it was initially reported that these were actually in fact Solark devices as well. 120 00:09:48,440 --> 00:09:52,260 And it was theorized that Dai had bricked the Solark inverters. 121 00:09:52,600 --> 00:09:57,100 Turns out that it was just Dai devices that were probably purchased on gray market. 122 00:09:57,100 --> 00:10:01,880 Like the user didn't know that Dai had an agreement with Solark to not sell stuff there. 123 00:10:01,960 --> 00:10:04,940 And so like the installer came and put in Dai and they didn't know better. 124 00:10:05,160 --> 00: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. 125 00:10:10,800 --> 00: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. 126 00:10:21,940 --> 00:10:24,840 So it wasn't some kind of geo fencing where the device wasn't supposed to be there. 127 00:10:24,840 --> 00:10:25,960 So like it didn't register. 128 00:10:26,020 --> 00:10:30,200 Um, it was done after these devices had been installed for months and then they were bricked. 129 00:10:30,600 --> 00: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. 130 00:10:40,580 --> 00: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. 131 00:10:47,680 --> 00:10:50,080 You have to call them and then they, uh, trigger it. 132 00:10:50,080 --> 00: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. 133 00:10:59,180 --> 00:11:06,120 So we suspect that the reasoning behind this was that they didn't want any resale of third party, uh, devices. 134 00:11:06,120 --> 00: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. 135 00:11:14,380 --> 00: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. 136 00:11:23,300 --> 00:11:24,680 And so this was their response. 137 00:11:24,680 --> 00:11:27,320 They kind of like sort of not really took responsibility. 138 00:11:27,340 --> 00:11:31,240 They were like, hey, we heard about this and you know, we have a partnership with Dai. 139 00:11:31,240 --> 00: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. 140 00:11:36,480 --> 00:11:38,560 Like that was their kind of sort of apology. 141 00:11:39,360 --> 00:11:45,880 Um, so this brings us to our first, uh, like actual CVE, which was related to packet power. 142 00:11:45,980 --> 00: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. 143 00:11:56,860 --> 00: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. 144 00:12:02,560 --> 00:12:05,140 Uh, these devices are deployed out. 145 00:12:05,140 --> 00:12:09,500 They can set up mesh networks as well, as well as being like hooked up to traditional like Ethernet. 146 00:12:09,720 --> 00:12:14,340 The defaults for all these devices when they were deployed are set without a password. 147 00:12:14,340 --> 00: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. 148 00:12:23,920 --> 00:12:27,500 Um, version 4.1 was supposedly supposed to come out yesterday. 149 00:12:27,520 --> 00: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. 150 00:12:32,960 --> 00: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. 151 00:12:40,920 --> 00:12:45,760 We went through a responsible disclosure with the manufacturer, then had to go through CISA. 152 00:12:46,040 --> 00:12:47,240 They didn't really respond. 153 00:12:47,240 --> 00:12:48,560 We told them we're going to DEF CON. 154 00:12:48,560 --> 00:12:49,680 Then they responded. 155 00:12:50,240 --> 00:12:53,500 Uh, we gave them IP addresses because they didn't believe us. 156 00:12:53,500 --> 00:12:58,100 Then they added login pages to those IP addresses, but didn't fix the other ones. 157 00:12:58,100 --> 00:12:59,960 So, whole bunch of fun things. 158 00:13:00,160 --> 00:13:02,200 Uh, but we went through, found a lot of the devices. 159 00:13:02,660 --> 00:13:04,480 Uh, this is kind of what they look like. 160 00:13:04,480 --> 00:13:06,300 Uh, gives you a lot of the monitoring data. 161 00:13:06,300 --> 00:13:08,940 Also allows you to upload custom firmware. 162 00:13:09,220 --> 00: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. 163 00:13:15,120 --> 00: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. 164 00:13:25,500 --> 00:13:28,960 So, like, there's lots of interesting things you can mess with in those panels. 165 00:13:29,700 --> 00:13:36,520 Uh, when we were going through their documentation, all their documentation points to that authentication is optional. 166 00:13:36,540 --> 00:13:38,040 It's an addition to it. 167 00:13:38,120 --> 00: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. 168 00:13:47,520 --> 00:13:49,360 Uh, which I thought was interesting. 169 00:13:49,360 --> 00: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. 170 00:13:56,860 --> 00:13:58,700 So, a little interesting. 171 00:13:59,020 --> 00:13:59,700 Yeah. 172 00:13:59,700 --> 00:14:03,940 So this brings us to EG4 where the bulk of our vulnerabilities were. 173 00:14:03,940 --> 00:14:07,280 Um, there was a lot of interesting things about them. 174 00:14:07,280 --> 00: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. 175 00:14:17,100 --> 00:14:22,760 Um, and now they have, uh, all these badges on there saying that they were made in China. 176 00:14:22,900 --> 00: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. 177 00:14:29,180 --> 00:14:32,620 Like, they have plans to manufacture it here, so that's what they put on their website. 178 00:14:32,620 --> 00:14:36,360 And they just buy it from China until they get the manufacturing capabilities up. 179 00:14:36,760 --> 00:14:40,760 Um, but we do tear down to all the devices and everything is inside is made in China. 180 00:14:40,760 --> 00:14:43,860 Yeah, the two pictures on the left, uh, are just from YouTube videos. 181 00:14:43,860 --> 00:14:48,240 So, the top one's a battery that has, uh, made in China sticker. 182 00:14:48,240 --> 00:14:53,620 And the bottom one, they also have, uh, AC units that you can plug into your, uh, your home grid. 183 00:14:53,620 --> 00:14:55,280 And that is also made in China, so. 184 00:14:55,940 --> 00:14:59,040 So , this is just a quick comparison of, like, their login portals. 185 00:14:59,040 --> 00: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. 186 00:15:06,400 --> 00:15:11,240 Um, and when you look at their, uh, HTML, they're pulling the pictures from the same server. 187 00:15:11,240 --> 00:15:13,180 So, like, it's not even kind of, like, similar. 188 00:15:13,180 --> 00:15:15,060 Like, they're sharing the same thing. 189 00:15:15,140 --> 00: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. 190 00:15:24,160 --> 00:15:28,140 Um, they also didn't get off to a great start when you go read their documentation. 191 00:15:28,400 --> 00:15:33,320 They had, uh, all kinds of stuff telling you to not use, like, special characters in your passwords. 192 00:15:33,320 --> 00:15:35,920 They said don't use long passwords, because you might forget it. 193 00:15:35,920 --> 00:15:37,600 Like, it was just not a good start. 194 00:15:38,000 --> 00:15:42,260 So, we started, uh, intercepting traffic from the devices to look for it. 195 00:15:42,260 --> 00: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. 196 00:15:51,020 --> 00: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. 197 00:15:59,200 --> 00: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. 198 00:16:06,540 --> 00: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. 199 00:16:17,700 --> 00: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. 200 00:16:26,020 --> 00:16:28,400 Um, but we did find a bunch of interesting OSINT. 201 00:16:28,880 --> 00:16:33,080 Uh, so, some of the devices that we found, like I said, were using public IPs. 202 00:16:33,100 --> 00:16:35,960 So, we tried to figure out if we could find any locations. 203 00:16:36,480 --> 00:16:38,620 Um, one of them we found was in Sri Lanka. 204 00:16:38,840 --> 00:16:41,700 It was on, it was a tourism building in Sri Lanka. 205 00:16:42,060 --> 00: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. 206 00:16:49,160 --> 00: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. 207 00:16:56,800 --> 00:17:00,420 So, pretty good likelihood that the inverters actually exist. 208 00:17:00,420 --> 00: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. 209 00:17:05,800 --> 00:17:09,900 Yeah, and that OSINT will matter once we get down the full stack of CVEs. 210 00:17:09,980 --> 00:17:16,160 Um, so, we started looking at the Modbus, uh, information on it, and this is related to two of the CVEs. 211 00:17:16,160 --> 00: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. 212 00:17:28,040 --> 00:17:33,420 It's also broadcasting its serial number in plain text, and that serial number is really high value. 213 00:17:33,420 --> 00: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. 214 00:17:39,560 --> 00:17:44,700 Um, to be fair to EG4, um, uh, this is like a industry problem. 215 00:17:44,700 --> 00: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. 216 00:17:53,920 --> 00: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. 217 00:17:59,360 --> 00:18:03,680 But with that serial number, we start downloading firmware to, uh, look at it. 218 00:18:03,680 --> 00:18:06,740 Uh, this is the, um, the second set of CVEs. 219 00:18:06,740 --> 00: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. 220 00:18:17,540 --> 00:18:21,840 And the software format they were using is, like, modifiable without causing problems for it. 221 00:18:21,840 --> 00:18:26,740 So you can inject firmware however you want into the device, um, and that's not good. 222 00:18:26,740 --> 00: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. 223 00:18:39,380 --> 00:18:42,540 Uh, Jake mentioned the serial numbers being, like, high value. 224 00:18:42,700 --> 00:18:46,660 The serial numbers for these devices are almost like having a social security number. 225 00:18:46,680 --> 00:18:51,340 It gives you a lot of power to do things, so just revealing that information is pretty critical. 226 00:18:51,400 --> 00:18:51,840 Yeah . 227 00:18:52,140 --> 00: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. 228 00:19:01,320 --> 00:19:05,880 So the registration portal, um, is patched now, so we did responsible disclosure. 229 00:19:06,020 --> 00: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. 230 00:19:13,640 --> 00:19:15,760 So, so Jake, you mentioned that it's patched. 231 00:19:15,760 --> 00:19:17,020 LuxPower also patched it, didn't it? 232 00:19:17,020 --> 00: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. 233 00:19:28,840 --> 00: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. 234 00:19:42,840 --> 00:19:48,280 Um, so this is, like, totally unauthenticated, no information for them to trace who's doing this. 235 00:19:48,420 --> 00: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. 236 00:19:55,440 --> 00: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, 237 00:20:09,900 --> 00:20:15,400 you could do about 50 numbers from, like, 112 to, like, 1150, and they were all valid serial numbers. 238 00:20:15,900 --> 00:20:20,100 Um, but it would tell you that the serial number already existed, then you could start guessing the pin. 239 00:20:20,220 --> 00:20:23,720 The pin was also not rate limited, so you could then guess the pin. 240 00:20:23,860 --> 00: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. 241 00:20:31,580 --> 00:20:32,500 Or transferring a device. 242 00:20:32,500 --> 00:20:34,220 Yeah, or transferring a device. 243 00:20:34,240 --> 00: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. 244 00:20:45,180 --> 00:20:47,920 So, at that point, we had a bunch of information we could use. 245 00:20:47,920 --> 00: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, 246 00:21:03,220 --> 00:21:06,920 um, because you could start looking for, like, the IP addresses and things of this. 247 00:21:07,160 --> 00:21:12,580 Um, so, like, this one is an example of one that came from a, a, uh, PDF that they had. 248 00:21:12,580 --> 00:21:17,500 But I found one from, like, a YouTuber that had exposed their serial number and pin. 249 00:21:17,540 --> 00: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. 250 00:21:26,040 --> 00:21:30,160 So you can probably guess what the, uh, um, what their username was. 251 00:21:30,200 --> 00:21:34,180 And then the, um, the pin for password reset is not rate limited. 252 00:21:34,180 --> 00:21:37,360 They still haven't fixed this, so there's no rate limiting on guessing the pin. 253 00:21:37,360 --> 00: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. 254 00:21:43,260 --> 00:21:44,660 The other one was an alphanumeric. 255 00:21:44,660 --> 00:21:45,940 This one is just numbers. 256 00:21:45,940 --> 00:21:46,520 Yeah. 257 00:21:46,640 --> 00:21:47,960 And not patched, once again. 258 00:21:47,960 --> 00: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? 259 00:21:57,000 --> 00:21:59,860 Um, they post that on their social media, that they will do that for you. 260 00:21:59,860 --> 00: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? 261 00:22:04,800 --> 00:22:06,900 So you don't even have to do all that other work. 262 00:22:06,900 --> 00:22:11,080 You can just go enumerate the serial numbers and call them up and say, hey, um, we'd like control. 263 00:22:12,160 --> 00: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. 264 00:22:18,840 --> 00:22:25,460 Um, this device is used for collecting data from solar microgrids, um, specifically their optimizers. 265 00:22:25,620 --> 00: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. 266 00:22:32,740 --> 00:22:33,480 So in the U.S. 267 00:22:33,480 --> 00:22:39,980 we have requirements now that every solar farm on, on residential stuff has to have a rapid shutdown device. 268 00:22:40,020 --> 00: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. 269 00:22:48,980 --> 00:22:52,320 So if they, if this signal is lost, the solar panel will shut down. 270 00:22:52,640 --> 00:22:56,900 Um, and this device, once connected, is responsible for that keep alive signal. 271 00:22:57,520 --> 00:23:00,260 So we found three different CVEs in this one. 272 00:23:00,300 --> 00:23:02,740 Um, the first one was hard-coded credentials. 273 00:23:02,940 --> 00:23:06,960 Um, hard-coded credentials have been being used by Tigo for a long time. 274 00:23:06,960 --> 00: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. 275 00:23:12,740 --> 00:23:17,440 Um, there's also some, like, robust, uh, DIY communities that are looking into these devices. 276 00:23:17,580 --> 00: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. 277 00:23:28,680 --> 00: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. 278 00:23:36,320 --> 00:23:40,520 They want to get access and reroute the data that it's sending out to, like, personal servers. 279 00:23:40,740 --> 00:23:44,200 Um, based on the stuff we found, that's probably a good assumption by them. 280 00:23:44,960 --> 00:23:50,280 Um, uh, but by default, these only have HTTP services running on the CCA. 281 00:23:50,500 --> 00:23:58,380 Um, in earlier versions of the firmware, you could turn on SSH by just browsing to CGI dash bin slash shell. 282 00:23:58,380 --> 00:24:00,800 This was any device on the internet, you could turn it on. 283 00:24:00,800 --> 00: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. 284 00:24:07,620 --> 00: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. 285 00:24:15,860 --> 00: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. 286 00:24:29,980 --> 00:24:35,280 Um, but you can still enumerate the devices, like, find out, like, their serial numbers, which, again, high value. 287 00:24:35,280 --> 00: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. 288 00:24:42,940 --> 00: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. 289 00:24:48,660 --> 00: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. 290 00:24:54,980 --> 00:24:57,900 And the most recent one we got was only, like, a month ago, right? 291 00:24:57,900 --> 00: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. 292 00:25:05,440 --> 00:25:05,880 Yeah. 293 00:25:05,940 --> 00:25:10,440 So the most useful endpoint on them right now is the CGI bin mobile API. 294 00:25:10,440 --> 00: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. 295 00:25:22,460 --> 00:25:27,260 Um, but device info and device ping only require the default credentials to access. 296 00:25:27,260 --> 00: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. 297 00:25:40,600 --> 00: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. 298 00:25:53,640 --> 00:25:57,340 It appears to be a covert backdoor, uh, for the manufacturer. 299 00:25:57,360 --> 00: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. 300 00:26:06,760 --> 00: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. 301 00:26:15,960 --> 00: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. 302 00:26:24,440 --> 00:26:28,180 So you didn't have to brute force the, um, the hash for that. 303 00:26:28,180 --> 00: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. 304 00:26:42,020 --> 00:26:44,540 And then you have arbitrary bash command execution. 305 00:26:44,640 --> 00:26:46,940 And this end point is being ran at root. 306 00:26:46,940 --> 00:26:49,380 So you can do whatever you want with the device at that point. 307 00:26:49,420 --> 00: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. 308 00:26:59,260 --> 00:27:05,420 Um, but to get to more interestingly, we wanted to get to those sensitive APIs that require a session ID. 309 00:27:05,500 --> 00:27:13,560 Turns out that that also had very little, um, security on it and was being done in a, uh, insecure fashion. 310 00:27:13,980 --> 00: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. 311 00:27:23,880 --> 00:27:28,160 Um, so you know the exact time that you're executing at, uh, when you send that command to the device. 312 00:27:28,300 --> 00: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. 313 00:27:36,940 --> 00: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. 314 00:27:43,460 --> 00:27:47,200 Every time you call random after the seeding, it gives the exact same output. 315 00:27:47,720 --> 00:27:51,300 And, and this function only requires those default hard-coded also. 316 00:27:52,160 --> 00:27:54,720 So doesn't take much work to even get that far. 317 00:27:54,720 --> 00:27:55,040 Yeah. 318 00:27:55,040 --> 00:27:57,820 And then these devices are explicitly configured a specific time. 319 00:27:57,820 --> 00:28:00,520 So we know what time zone that they're keeping their own internal clock on. 320 00:28:00,820 --> 00: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. 321 00:28:10,040 --> 00: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. 322 00:28:17,200 --> 00:28:21,300 Um, and we are the ones triggering the, um, the remote commands. 323 00:28:21,300 --> 00:28:23,080 So we know exactly what time it was sent. 324 00:28:23,700 --> 00: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. 325 00:28:29,980 --> 00:28:32,640 You'll see that we got an unauthorized request. 326 00:28:38,440 --> 00: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. 327 00:28:45,960 --> 00: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. 328 00:28:59,160 --> 00:29:00,980 So that generates the session ID. 329 00:29:00,980 --> 00:29:05,640 Now we add the session ID to our, um, to our call. 330 00:29:13,260 --> 00:29:17,440 And we have access to the device for anything we want now, so. 331 00:29:21,380 --> 00:29:26,960 Um, so if you remember that keep alive, uh, you can actually access the reboot now. 332 00:29:26,960 --> 00: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. 333 00:29:33,040 --> 00: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. 334 00:29:44,620 --> 00:29:48,100 I actually found like a solar farm in Slovenia making like 200 kilowatts. 335 00:29:48,100 --> 00:29:49,960 The average home is making about eight. 336 00:29:49,960 --> 00:29:51,700 So it's a fairly large solar farm. 337 00:29:51,700 --> 00:29:53,860 Um, and we could have killed it if we wanted. 338 00:29:53,860 --> 00:29:56,260 It would have been very simple, um, with this. 339 00:29:56,360 --> 00:30:01,240 Um, and then just a, uh, quick Easter egg before we go. 340 00:30:01,440 --> 00:30:04,360 Um, this is not TGOs first rodeo at DEF CON. 341 00:30:04,360 --> 00: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. 342 00:30:12,020 --> 00:30:15,560 So, uh, we just wanted to welcome TGO back to the DEF CON stage. 343 00:30:15,640 --> 00:30:26,900 Um, uh, so what's next is that, um, the solar industry is growing faster than the security implementations. 344 00:30:26,900 --> 00:30:28,400 That's not all that surprising. 345 00:30:28,400 --> 00:30:30,780 That's what tends to happen in many of these startup industries. 346 00:30:30,780 --> 00:30:36,240 They're so preoccupied with getting, um, products to market and trying to be the first to market. 347 00:30:36,240 --> 00:30:38,920 The security is one of the first things that they stop thinking about. 348 00:30:39,060 --> 00:30:44,120 Um, so we need to build stronger partnerships with the solar industry to get them thinking about this. 349 00:30:44,440 --> 00:30:49,600 Um, we need to, um, you know, make sure that they are actually considering their security as they're building it. 350 00:30:49,600 --> 00: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. 351 00:31:02,900 --> 00:31:07,360 So this might impact other devices than what we have labeled here so far. 352 00:31:07,360 --> 00:31:10,520 Um, and the code is just a disaster because they don't know where they're buying it from. 353 00:31:10,520 --> 00:31:11,420 They're getting it. 354 00:31:11,420 --> 00:31:12,580 It's all written in Chinese. 355 00:31:12,580 --> 00:31:14,040 They don't know how to debug it. 356 00:31:14,040 --> 00:31:16,120 And so they just need help with that. 357 00:31:16,240 --> 00:31:19,300 You report the vulnerabilities and they say you have to go back to a different developer. 358 00:31:19,300 --> 00:31:19,680 Yeah. 359 00:31:19,680 --> 00:31:20,660 It's a disaster. 360 00:31:20,660 --> 00:31:20,840 Yeah. 361 00:31:20,840 --> 00:31:24,940 So actually when we reported this to EG4, they told us they forwarded it to LuxPower. 362 00:31:24,940 --> 00:31:28,440 What was, was how they handled the resolution of it. 363 00:31:28,640 --> 00:31:33,860 Um, so in the meantime, never expose, uh, solar control systems directly to the internet. 364 00:31:34,200 --> 00:31:37,900 I feel like that's obvious, but you know, you have a firewall. 365 00:31:37,900 --> 00:31:38,140 Yeah. 366 00:31:38,140 --> 00:31:40,380 We found a lot of devices on the internet. 367 00:31:40,500 --> 00:31:43,180 So, um, you know, make sure that that's not on. 368 00:31:43,180 --> 00: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. 369 00:31:51,780 --> 00: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. 370 00:31:57,860 --> 00:32:01,620 They try to add internet capability and they do it in a really crappy way. 371 00:32:01,800 --> 00: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. 372 00:32:10,760 --> 00: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. 373 00:32:21,160 --> 00:32:22,260 So thank you. 374 00:32:22,260 --> 00: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.