start	end	text
0	6180	As our speakers, we'll have Anthony Rose, AKA Korn, and Jake Krasnov, AKA Hubbell.
6180	10260	They'll be presenting on ReBadge, Relabeled, and Rooted.
10320	11320	Let's go.
15260	20220	Hey, welcome everyone to our talk on ReBadge, Relabeled, and Rooted.
20220	22820	We're going to be talking about hacking the solar supply chain.
22980	24540	Just a quick introduction.
24540	25320	I'm Hubbell.
25320	26820	I also go by Jake.
26820	32680	My background was in astronautical engineering, where I was in the Air Force doing missile testing stuff.
32680	36680	And I walked in one day at a fighter test squadron, and they said, you're our new cyber expert.
36680	37880	And that's where I met him.
38180	39480	This is Anthony.
39600	50980	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.
50980	61020	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.
61140	63800	And then since then, I've been working at BC security full time.
63800	67140	I'm our red team ops lead and our embedded systems specialist.
67200	69420	And then I'll let Anthony introduce himself.
69840	70900	I'm Coyne.
70900	75700	Like Jake said, we worked together doing fighter aircraft, cyber testing.
75700	78740	He did all the work and I got all the credit, so it's pretty nice.
79100	81160	I just graduated and got my Ph.D.
81160	82380	in electrical engineering.
82620	84860	Right now, I am... thanks.
84900	85580	Yep.
85640	91500	Uh, right now, I'm the assistant professor at the Air Force Institute of Technology.
91620	97240	And then, uh, my other job is working with Jake doing the cyber fun things that I, that we do.
97240	105120	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.
106720	109120	And then we wanted to give a shout out to Peter.
109120	114500	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.
114620	116840	Um, quite a long way for him to travel from Africa.
116840	119340	But, uh, he's a solar systems specialist.
119340	121140	He's the CTO at Ova Nova.
121260	124640	Um, and it was really awesome to have him, uh, help us on this project.
124740	127400	Uh, so we found lots of vulnerabilities.
127400	129660	So far, we've gotten 14.
129660	131660	That's a little bit of a influx.
131660	137160	Um, we'll talk about EG4, but there's also some stuff with LuxPower and a couple other things.
137160	142040	Um, but so far, 14 CVEs that we found, um, we'll talk a little bit about all of them.
142840	144600	Um, what happened?
144600	145300	There we go.
145300	149620	Um, so solar is like rapidly increasing in the world.
149620	155780	Uh, so far there is estimated to be 25 million homes globally with solar power installed at their houses.
155780	162760	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.
162800	167600	Um, and it's projected that we're going to reach a hundred million homes by, uh, 2030.
167820	168940	And that's just homes.
168940	175040	That's not including like large solar farms and some of the like corporate buildings that are putting, uh, solar on there.
175040	181600	Cause in April, we actually reached 10% of the global power generation being, coming from solar.
181600	182580	Like that's everything.
182640	191740	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.
192060	196300	Um, so I mentioned micro grids, they do these five critical functions.
196680	200960	Um, this is what makes like a power plant or like a miniature power plant work.
200960	210700	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.
210840	214260	Um, we didn't find any issues, uh, currently with that.
214260	216560	We have some theories on how you could do it.
216560	223820	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.
223900	227380	Um, because every one of these steps has smart devices in them now.
227380	233100	Um, whether that's the actual solar panel has an optimizer attached to it that connects to the internet.
233100	237920	Um, the battery systems have like battery management monitoring stuff that goes out to the internet.
237920	254940	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.
254940	259980	And they're normally linked into like smart, uh, some sort of like smart cloud environment.
259980	268020	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.
268020	270160	So kind of scary sometimes.
270160	270600	Yeah.
270760	277860	And so China is the global leader in solar energy, not, uh, both in, uh, the use of it.
277860	282400	They have like the largest amount of solar panels installed and the largest amount of solar generation.
282400	287500	They're also by like far and away the largest manufacturer of solar devices.
287500	294060	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.
294060	297700	are just buying Chinese manufacturers equipment and relabeling it.
297780	304560	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.
304660	307240	And then, uh, Solark, that's a rebranded dye.
307360	313340	Um, and then they're also reusing , um, not just the hardware, but also the software from, uh, these Chinese manufacturers.
313560	316900	Um , this should scare you because as we mentioned, they're all internet connected.
316900	321040	So they, if you have this installed at your house, it's being connected to the internet.
321040	322720	It's a way into your house.
322760	331220	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.
331300	336740	So, uh, we were able to prove the ability to deny power generation remotely, um, to these grids.
336740	343520	Uh, we haven't so far proved like catastrophic safety failure cause there are quite a number of like physical controls on these things.
343520	347940	Um, but the inverters are responsible for like power phasing and that kind of stuff.
347940	353700	And there are ways that, um, if a inverter wasn't hooked up properly, that you could potentially circumvent that.
353700	361020	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.
361020	363780	Um, the physical effects are even more concerned there.
363780	369020	And then like what makes us all the most like concerning is that all the supply chains are opaque.
369020	371940	Um, we don't really know where this stuff's coming from.
371940	376320	And tons of it is phoning home to China, even when the manufacturers say it shouldn't be.
378020	380620	Um, like I said, supply chains, a dumpster fire.
380620	385560	These are just some, uh, claims we pulled off of, uh, various manufacturing websites.
385740	389580	Manufacturers websites, they say design developed and engineered in the United States.
389600	393620	Um, but then you dump like the software and it's all Chinese debugging comments.
394040	398080	Um, HomeGrid says that they're, they have a manufacturing plant here.
398080	406100	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.
406100	415960	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.
416080	418740	Um, as well as just all the, it just continues.
418740	420080	The rabbit hole goes deeper and deeper.
420080	422980	And still leaving made in China on a device as well.
422980	432260	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.
432260	438500	But until last year, um, they were like transparently sending stuff to China.
438520	446020	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.
446200	461100	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.
461100	471860	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.
472100	473940	Um, so that just creates a lot of concerns.
474260	480980	And Sol-Ark used to have a ton of claims on their website about being, again, designed, manufactured and made in the US .
480980	485480	They were claiming they were rewriting the firmware for these devices in the US.
485480	487160	They kind of removed that.
487160	493420	And then like in November of last year, there was a major issue with, um, stuff related to Sol-Ark.
493420	496400	Uh, it turns out it was kind of die, the little deep dive.
496420	504320	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.
504320	509300	Um, so they're kind of acknowledging that they're bringing technology over from China, even though they claimed that everything was being made.
509300	512880	And that was around the time they started removing a lot of the claims on their website as well.
513600	519120	And so the problem isn't just hardware, um, because hardware reuse is a fact of life.
519120	530040	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.
530060	532920	Especially if they're badging it as a US made product.
532920	533540	Yeah.
533720	537880	Um, but the bigger problem is that all the software appears to be coming from China as well.
537880	539640	Um, and they're not transparent on that.
539640	545380	And a lot of times they're just rebuying, um, software and not really understanding what it's being used for.
545540	561420	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.
561860	577900	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.
578040	584640	Um, and there's all these messages saying, Hey, contact Solark for, um, you know, how to resolve this.
584640	588440	Uh, it was initially reported that these were actually in fact Solark devices as well.
588440	592260	And it was theorized that Dai had bricked the Solark inverters.
592600	597100	Turns out that it was just Dai devices that were probably purchased on gray market.
597100	601880	Like the user didn't know that Dai had an agreement with Solark to not sell stuff there.
601960	604940	And so like the installer came and put in Dai and they didn't know better.
605160	610400	Um, but it's really concerning that a manufacturer was able to reach into people's homes and just like brick the devices.
610800	621940	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.
621940	624840	So it wasn't some kind of geo fencing where the device wasn't supposed to be there.
624840	625960	So like it didn't register.
626020	630200	Um, it was done after these devices had been installed for months and then they were bricked.
630600	640460	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.
640580	647680	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.
647680	650080	You have to call them and then they, uh, trigger it.
650080	659180	And Solark is the, uh, the only person that's allowed to, only organization allowed to sell Dai inverters in North America.
659180	666120	So we suspect that the reasoning behind this was that they didn't want any resale of third party, uh, devices.
666120	674380	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.
674380	682680	company was asking like a Chinese company to brick, um, devices that are critical to power generation for like, uh, people in North America.
683300	684680	And so this was their response.
684680	687320	They kind of like sort of not really took responsibility.
687340	691240	They were like, hey, we heard about this and you know, we have a partnership with Dai.
691240	696480	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.
696480	698560	Like that was their kind of sort of apology.
699360	705880	Um, so this brings us to our first, uh, like actual CVE, which was related to packet power.
705980	716860	So packet power is a, uh, monitoring device used for tracking, uh, heat, electricity, even, uh, like, well, like humidity is another one.
716860	722400	Uh, typically found in like server farms, but we also found that they're installed with inverters in a lot of cases.
722560	725140	Uh, these devices are deployed out.
725140	729500	They can set up mesh networks as well, as well as being like hooked up to traditional like Ethernet.
729720	734340	The defaults for all these devices when they were deployed are set without a password.
734340	743760	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.
743920	747500	Um, version 4.1 was supposedly supposed to come out yesterday.
747520	752340	Uh, but I have no idea if it's actually out, but they did tell us that it was coming out this week.
752960	760780	So, uh, when we found these devices initially, uh, we found hundreds, if not a thousand of these devices, uh, on the Internet.
760920	765760	We went through a responsible disclosure with the manufacturer, then had to go through CISA.
766040	767240	They didn't really respond.
767240	768560	We told them we're going to DEF CON.
768560	769680	Then they responded.
770240	773500	Uh, we gave them IP addresses because they didn't believe us.
773500	778100	Then they added login pages to those IP addresses, but didn't fix the other ones.
778100	779960	So, whole bunch of fun things.
780160	782200	Uh, but we went through, found a lot of the devices.
782660	784480	Uh, this is kind of what they look like.
784480	786300	Uh, gives you a lot of the monitoring data.
786300	788940	Also allows you to upload custom firmware.
789220	795100	Uh, they don't do any authentication or signing with their firmware, so you could just kind of upload whatever you want.
795120	805500	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.
805500	808960	So, like, there's lots of interesting things you can mess with in those panels.
809700	816520	Uh, when we were going through their documentation, all their documentation points to that authentication is optional.
816540	818040	It's an addition to it.
818120	827500	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.
827520	829360	Uh, which I thought was interesting.
829360	836860	Also, they said they had no technical means of actually enforcing this, which I thought was interesting because they support a login portal.
836860	838700	So, a little interesting.
839020	839700	Yeah.
839700	843940	So this brings us to EG4 where the bulk of our vulnerabilities were.
843940	847280	Um, there was a lot of interesting things about them.
847280	856900	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.
857100	862760	Um, and now they have, uh, all these badges on there saying that they were made in China.
862900	869180	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.
869180	872620	Like, they have plans to manufacture it here, so that's what they put on their website.
872620	876360	And they just buy it from China until they get the manufacturing capabilities up.
876760	880760	Um, but we do tear down to all the devices and everything is inside is made in China.
880760	883860	Yeah, the two pictures on the left, uh, are just from YouTube videos.
883860	888240	So, the top one's a battery that has, uh, made in China sticker.
888240	893620	And the bottom one, they also have, uh, AC units that you can plug into your, uh, your home grid.
893620	895280	And that is also made in China, so.
895940	899040	So , this is just a quick comparison of, like, their login portals.
899040	906080	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.
906400	911240	Um, and when you look at their, uh, HTML, they're pulling the pictures from the same server.
911240	913180	So, like, it's not even kind of, like, similar.
913180	915060	Like, they're sharing the same thing.
915140	923820	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.
924160	928140	Um, they also didn't get off to a great start when you go read their documentation.
928400	933320	They had, uh, all kinds of stuff telling you to not use, like, special characters in your passwords.
933320	935920	They said don't use long passwords, because you might forget it.
935920	937600	Like, it was just not a good start.
938000	942260	So, we started, uh, intercepting traffic from the devices to look for it.
942260	950740	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.
951020	958900	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.
959200	966540	Um, we actually found a ton of them behind an application called Shine Monitor, which is a Chinese-based, uh, monitoring system.
966540	977540	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.
977700	985480	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.
986020	988400	Um, but we did find a bunch of interesting OSINT.
988880	993080	Uh, so, some of the devices that we found, like I said, were using public IPs.
993100	995960	So, we tried to figure out if we could find any locations.
996480	998620	Um, one of them we found was in Sri Lanka.
998840	1001700	It was on, it was a tourism building in Sri Lanka.
1002060	1009020	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.
1009160	1016500	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.
1016800	1020420	So, pretty good likelihood that the inverters actually exist.
1020420	1025760	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.
1025800	1029900	Yeah, and that OSINT will matter once we get down the full stack of CVEs.
1029980	1036160	Um, so, we started looking at the Modbus, uh, information on it, and this is related to two of the CVEs.
1036160	1048040	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.
1048040	1053420	It's also broadcasting its serial number in plain text, and that serial number is really high value.
1053420	1059220	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.
1059560	1064700	Um, to be fair to EG4, um, uh, this is like a industry problem.
1064700	1073840	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.
1073920	1079360	Uh, none of the manufacturers are using it, so, um, it's something that the whole industry needs to get better at.
1079360	1083680	But with that serial number, we start downloading firmware to, uh, look at it.
1083680	1086740	Uh, this is the, um, the second set of CVEs.
1086740	1097540	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.
1097540	1101840	And the software format they were using is, like, modifiable without causing problems for it.
1101840	1106740	So you can inject firmware however you want into the device, um, and that's not good.
1106740	1118900	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.
1119380	1122540	Uh, Jake mentioned the serial numbers being, like, high value.
1122700	1126660	The serial numbers for these devices are almost like having a social security number.
1126680	1131340	It gives you a lot of power to do things, so just revealing that information is pretty critical.
1131400	1131840	Yeah .
1132140	1141320	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.
1141320	1145880	So the registration portal, um, is patched now, so we did responsible disclosure.
1146020	1153640	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.
1153640	1155760	So, so Jake, you mentioned that it's patched.
1155760	1157020	LuxPower also patched it, didn't it?
1157020	1168720	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.
1168840	1182400	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.
1182840	1188280	Um, so this is, like, totally unauthenticated, no information for them to trace who's doing this.
1188420	1195060	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.
1195440	1209900	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,
1209900	1215400	you could do about 50 numbers from, like, 112 to, like, 1150, and they were all valid serial numbers.
1215900	1220100	Um, but it would tell you that the serial number already existed, then you could start guessing the pin.
1220220	1223720	The pin was also not rate limited, so you could then guess the pin.
1223860	1231580	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.
1231580	1232500	Or transferring a device.
1232500	1234220	Yeah, or transferring a device.
1234240	1245040	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.
1245180	1247920	So, at that point, we had a bunch of information we could use.
1247920	1263220	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,
1263220	1266920	um, because you could start looking for, like, the IP addresses and things of this.
1267160	1272580	Um, so, like, this one is an example of one that came from a, a, uh, PDF that they had.
1272580	1277500	But I found one from, like, a YouTuber that had exposed their serial number and pin.
1277540	1285960	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.
1286040	1290160	So you can probably guess what the, uh, um, what their username was.
1290200	1294180	And then the, um, the pin for password reset is not rate limited.
1294180	1297360	They still haven't fixed this, so there's no rate limiting on guessing the pin.
1297360	1303260	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.
1303260	1304660	The other one was an alphanumeric.
1304660	1305940	This one is just numbers.
1305940	1306520	Yeah.
1306640	1307960	And not patched, once again.
1307960	1316900	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?
1317000	1319860	Um, they post that on their social media, that they will do that for you.
1319860	1324540	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?
1324800	1326900	So you don't even have to do all that other work.
1326900	1331080	You can just go enumerate the serial numbers and call them up and say, hey, um, we'd like control.
1332160	1338560	So this gets us to, um, our final device that we're going to talk about, which was the Tigo Cloud Connect Advance.
1338840	1345460	Um, this device is used for collecting data from solar microgrids, um, specifically their optimizers.
1345620	1352740	Um, that's what it's used for, uh, primary use, but it also does an important job of a keep alive signal.
1352740	1353480	So in the U.S.
1353480	1359980	we have requirements now that every solar farm on, on residential stuff has to have a rapid shutdown device.
1360020	1368980	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.
1368980	1372320	So if they, if this signal is lost, the solar panel will shut down.
1372640	1376900	Um, and this device, once connected, is responsible for that keep alive signal.
1377520	1380260	So we found three different CVEs in this one.
1380300	1382740	Um, the first one was hard-coded credentials.
1382940	1386960	Um, hard-coded credentials have been being used by Tigo for a long time.
1386960	1392740	People keep finding them, publishing them, then they sort of change them, um, and then leave it, and then leave it there.
1392740	1397440	Um, there's also some, like, robust, uh, DIY communities that are looking into these devices.
1397580	1408480	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.
1408680	1416320	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.
1416320	1420520	They want to get access and reroute the data that it's sending out to, like, personal servers.
1420740	1424200	Um, based on the stuff we found, that's probably a good assumption by them.
1424960	1430280	Um, uh, but by default, these only have HTTP services running on the CCA.
1430500	1438380	Um, in earlier versions of the firmware, you could turn on SSH by just browsing to CGI dash bin slash shell.
1438380	1440800	This was any device on the internet, you could turn it on.
1440800	1447620	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.
1447620	1455460	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.
1455860	1469940	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.
1469980	1475280	Um, but you can still enumerate the devices, like, find out, like, their serial numbers, which, again, high value.
1475280	1482100	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.
1482940	1488660	Um, but, uh, you also got, like, location, a little bit of location data, whether or not they're using mobile stuff.
1488660	1494980	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.
1494980	1497900	And the most recent one we got was only, like, a month ago, right?
1497900	1505440	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.
1505440	1505880	Yeah.
1505940	1510440	So the most useful endpoint on them right now is the CGI bin mobile API.
1510440	1522300	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.
1522460	1527260	Um, but device info and device ping only require the default credentials to access.
1527260	1540420	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.
1540600	1553640	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.
1553640	1557340	It appears to be a covert backdoor, uh, for the manufacturer.
1557360	1566760	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.
1566760	1575240	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.
1575960	1584260	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.
1584440	1588180	So you didn't have to brute force the, um, the hash for that.
1588180	1602020	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.
1602020	1604540	And then you have arbitrary bash command execution.
1604640	1606940	And this end point is being ran at root.
1606940	1609380	So you can do whatever you want with the device at that point.
1609420	1618900	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.
1619260	1625420	Um, but to get to more interestingly, we wanted to get to those sensitive APIs that require a session ID.
1625500	1633560	Turns out that that also had very little, um, security on it and was being done in a, uh, insecure fashion.
1633980	1643680	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.
1643880	1648160	Um, so you know the exact time that you're executing at, uh, when you send that command to the device.
1648300	1656760	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.
1656940	1663460	Um, if you've done any kind of CTF before, you probably know that seeding SRAN makes your random function not random.
1663460	1667200	Every time you call random after the seeding, it gives the exact same output.
1667720	1671300	And, and this function only requires those default hard-coded also.
1672160	1674720	So doesn't take much work to even get that far.
1674720	1675040	Yeah.
1675040	1677820	And then these devices are explicitly configured a specific time.
1677820	1680520	So we know what time zone that they're keeping their own internal clock on.
1680820	1690040	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.
1690040	1697020	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.
1697200	1701300	Um, and we are the ones triggering the, um, the remote commands.
1701300	1703080	So we know exactly what time it was sent.
1703700	1709980	So here's just a quick video of me, um, showing that the first one is an attempt to call the network info.
1709980	1712640	You'll see that we got an unauthorized request.
1718440	1725280	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.
1725960	1738780	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.
1739160	1740980	So that generates the session ID.
1740980	1745640	Now we add the session ID to our, um, to our call.
1753260	1757440	And we have access to the device for anything we want now, so.
1761380	1766960	Um, so if you remember that keep alive, uh, you can actually access the reboot now.
1766960	1773040	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.
1773040	1784620	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.
1784620	1788100	I actually found like a solar farm in Slovenia making like 200 kilowatts.
1788100	1789960	The average home is making about eight.
1789960	1791700	So it's a fairly large solar farm.
1791700	1793860	Um, and we could have killed it if we wanted.
1793860	1796260	It would have been very simple, um, with this.
1796360	1801240	Um, and then just a, uh, quick Easter egg before we go.
1801440	1804360	Um, this is not TGOs first rodeo at DEF CON.
1804360	1812020	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.
1812020	1815560	So, uh, we just wanted to welcome TGO back to the DEF CON stage.
1815640	1826900	Um, uh, so what's next is that, um, the solar industry is growing faster than the security implementations.
1826900	1828400	That's not all that surprising.
1828400	1830780	That's what tends to happen in many of these startup industries.
1830780	1836240	They're so preoccupied with getting, um, products to market and trying to be the first to market.
1836240	1838920	The security is one of the first things that they stop thinking about.
1839060	1844120	Um, so we need to build stronger partnerships with the solar industry to get them thinking about this.
1844440	1849600	Um, we need to, um, you know, make sure that they are actually considering their security as they're building it.
1849600	1862900	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.
1862900	1867360	So this might impact other devices than what we have labeled here so far.
1867360	1870520	Um, and the code is just a disaster because they don't know where they're buying it from.
1870520	1871420	They're getting it.
1871420	1872580	It's all written in Chinese.
1872580	1874040	They don't know how to debug it.
1874040	1876120	And so they just need help with that.
1876240	1879300	You report the vulnerabilities and they say you have to go back to a different developer.
1879300	1879680	Yeah.
1879680	1880660	It's a disaster.
1880660	1880840	Yeah.
1880840	1884940	So actually when we reported this to EG4, they told us they forwarded it to LuxPower.
1884940	1888440	What was, was how they handled the resolution of it.
1888640	1893860	Um, so in the meantime, never expose, uh, solar control systems directly to the internet.
1894200	1897900	I feel like that's obvious, but you know, you have a firewall.
1897900	1898140	Yeah.
1898140	1900380	We found a lot of devices on the internet.
1900500	1903180	So, um, you know, make sure that that's not on.
1903180	1911200	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.
1911780	1917840	Um, and then take special consideration of remote monitoring solutions because that's tends to be the source of most of these vulnerabilities.
1917860	1921620	They try to add internet capability and they do it in a really crappy way.
1921800	1930600	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.
1930760	1940720	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.
1941160	1942260	So thank you.
1942260	1947380	Um, and we have about five minutes for questions, so feel free to come up and we'll be happy to answer them.
