Podcast
Root Causes 254: Toyota Symmetric Key Exposed on GitHub
Hosted by
Jason Soroko
Fellow
Original broadcast date
November 8, 2022
In a recently exposed error, key material for a popular automobile manufacturer's PKI has been discovered on GitHub, resulting in exposure of sensitive information. In this episode we explain the dual errors that led to this breach.
Podcast transcript
Lightly edited for flow and brevity.
TCTim CallanToday, we are talking about a recent news story and there are probably multiple sources for this. The one I’m looking at is from the GitGuardian website and the headline reads, “Toyota Suffered a Data Breach by Accidentally Exposing a Secret Key Publicly on GitHub.” That was from October 11 by Dwayne McDaniel. So, Jason, what went on here?
And that’s typically done when you are working in a team so you can imagine how difficult source code control is when you are dealing with something as sophisticated as computer code.
And you can also then imagine that within computer code you quite often are logging into systems – databases, other servers, etc. That’s what computer code is often doing. It’s computers logging into things, getting information, doing something with it and then proceeding. The problem is this. You and I on this podcast, we almost entirely dedicate the podcast to talking about credentials and how to keep them safe and how to generate them safely and in this case, it looks like a contractor who was working with Toyota had uploaded a piece of source code – not an entire system of a car, let’s say, but a piece of basically to make a car do certain kinds of functions, was uploaded to a repository and there were two problems, Tim. Not just the one problem. There were two major problems here.
The one problem that is quite common is – and this has to be solved – the repository was never meant to be publicly seen but it was posted as public. A public repository. And a might say to yourself, well, why would you ever want to post something publicly. Well, open source code is you want other people to see it. You want to collaborate not just with an internal team, you want to collaborate with the world. And that’s great. The problem is that when you mean for it to be private and never be seen by anybody but your private team, you don’t want to share it with the world.
TCTim CallanSo, let me clarify, Jason. This is not so much somebody misusing GitHub and accidentally publishing something publicly that they shouldn’t be. This was somebody misunderstanding what code was meant to be public and what code was not. Is that correct?
And the second problem is, as I said, the systems, computer code is logging into databases, etc., not unlike this code we are talking about here in this problem, in this context. There was a key – and we are talking about a symmetric key here. Not an asymmetric private key but a symmetric key that was used to log into a database system was contained within that code. And I will tell you – this is something that we’ve talked about this podcast before – it’s not a best practice. You don’t hard code any kind of key into your source code. And, unfortunately, in this case, it was the double-whammy of they put the secret into the source code and then that source code was made public. And that enabled access into a fairly important system which gave various kinds of information about customers and some other things as well. You can read the article. But those are the two main problems with this, Tim, and, boy, I gotta tell you, I think both of those things need to be solved. It’s shocking to me that we keep reading about these problems. And, from a PKI standpoint, Tim, that private key is so important as well. Even this article was about a symmetric key. It doesn’t matter. We want to call it out whenever we see it.
TCTim CallanIt could equally well have been a private key. It just happened that it wasn’t in this case and, in fact, if you even just go back to just the Uber breach which is just a few episodes ago, one of the ways that that breach was enabled is that somebody did find asymmetric keys embedded in code. And then they could then use those.
TCTim CallanThat was the other interesting thing that I was gonna touch on but you already got there is that this sat for a long time. Now, is there any way of knowing if this key or these keys were maliciously used?
TCTim CallanThey look exactly the same.
TCTim CallanSo, by the way, while I’m thinking about it, the Uber breach episode is Episode 247. So, just very recently. So, you can go back and listen to that. But I also call people’s attention to our Episode 240, which is about a Hyundai asymmetric key problem but that wasn’t the same problem. It was similar in that it was keys and it was auto manufacturer and it kind of yielded the same result but that was due to a different error in Hyundai’s case.
TCTim CallanYou want the white hats to find it before the black hats do.
TCTim CallanOr if not before at least they can find it and shut off that entryway for the black hats.
TCTim CallanI agree with all of that. And, I just wanted to real quick point out that the https://www.sectigo.com/resour... is our Episode 104.
TCTim CallanHow is that, Jay? We plugged three podcasts in a single. I think that’s some kind of record.
I think it’s a pretty simple story. It’s a story we’ve told a lot but, like you said, this does continue to happen now doesn’t it?
I think it’s a pretty simple story. It’s a story we’ve told a lot but, like you said, this does continue to happen now doesn’t it?
TCTim CallanAnd the amount of automation is going up and not down. And if you’re a believer in the everything is code philosophy then there’s just more code and so, this particular risk feels to me like it hasn’t really been figured out. It hasn’t really been resolved and at least for the moment we should not expect this to go away.
TCTim CallanThat’s a good point and we’ve touched on that a lot. That people who ultimately are doing PKI – let’s say, for instance, if you are in a DevOps environment, who are probably very good developers but they are not particularly grounded in security or PKI and that’s where you see a lot of these problems occur.