Podcast
Root Causes 285: Can ChatGPT Write Malware?
Hosted by
Jason Soroko
Fellow
Original broadcast date
March 14, 2023
In our ongoing exploration of the security implications of AI, in this episode we examine the suitability of ChatGPT as a malware-writing tool and possible future directions for AI in software creation.
Podcast transcript
Lightly edited for flow and brevity.
TCTim CallanSo, of course, we continue to return to the topic of ChatGPT because there is just so much interesting stuff going on and once again, we have a topic that is right up our alley and, in particular, I think you called my attention to this. You were looking at Schneier on Security article. Bruce Schneier, of course, often a source of information for us and this is a January 10, 2023 post and the headline is ChatGPT Written Malware, which is a very provocative headline.
Really, Tim, on this podcast wanted to bring up ChatGPT. A lot of people are asking, oh my goodness, can this thing write malware? Well, the answer is, yes, of course.
TCTim CallanSure. It can write anything. It can pass the Bar.
So, Tim, what is malware? Maybe that’s the big question. I think a lot of people, maybe everybody listening to this podcast, is way to smart obviously to have to ask that question but malware really is just software. It’s just software like any other. And it’s often using operating systems, desktop operating systems, using mobile operating systems as they were intended to be used. A lot of people think of hackers like breaking something or hacking and breaking sound like there’s something incredibly subversive going on but really, a lot of times malware is just utilizing a stolen credential and then automating a set of tasks to perform an end goal against a target. That’s all it’s doing. And so it’s just software. In fact, often, it’s just automation software.
TCTim CallanSure. Find this information, infiltrate it to here.
ChatGPT doesn’t know that you are doing something potentially malicious and, in fact, if I were to do a code review with a lot of people and look at software, it would be difficult for a lot of people to tell whether or not malware was going to be maliciously used or not by not having that context given ahead of time, Tim.
TCTim CallanAbsolutely. Malware is just software used maliciously. Yes. That’s the name.
TCTim CallanThe fact that ChatGPT is writing software is the headline here. I mean malware is just another kind of software and the function of how effective that malware is or how effective the malware is is a function of how effective any software is that ChatGPT is creating. And of course it’s gonna get better. I mean the leaps and strides we’ve seen on all of this stuff is amazing and of course it’s gonna get better and I’m reminded of, this is kind of an old science-fiction trope. Like I’m thinking of there was a book by Neal Stephenson a long time ago called the Diamond Age where he’s got this situation where the bots are at war with each other and they are updating themselves and creating themselves and humans can no longer understand what they are doing. The bots are doing it all themselves against each other and they are in this constant very fast war that isn’t being engineered by a person because a person simply couldn’t keep up with the pace of the change and you can easily imagine, good job, Neil, writing about this in the 1990s but you can really imagine that is the outcome of this kind of thing. Not just ChatGPT but and it’s ilk as progress continues that we are gonna get to the point where the software writes its own software as well as we do and more quickly and then ultimately, better than we do and more quickly.
TCTim CallanIt’s attention never lapses. Yes.
So, Tim, I gotta tell you, I had my own experiences in terms of getting ChatGPT to author software for me. I was more than amused. In fact, I was kind of impressed. I asked it to do something fairly basic, which was to give me example scripts in Python and Go language and a few other languages that I’m kinda handy in. I’m not an expert in any of them, but I’m certainly handy in them and I asked it to actually do an evaluation of an SSL certificate from a website. So, in other words, reach out to a website, grab the certificate and give me attributes about it. Parse it and tell me what is in there.
And I looked at the code and darn tootin’, Tim, it was very accurate. Like I could literally copy and paste that code and become very productive with it if I didn’t have those functions already stashed away in my files. So, I can see why this is used because I can use human language, English language that is easy for me to say and type and the output is just some darn good code. Now, of course, we already have millions and millions of posts on message boards where I can copy and paste very good code that was written by a human being but I am depending on search engines and I am depending on a lot of reading and sorting out. ChatGPT kind of short circuits a lot of that and just allows me in my own language to enter input into a prompt and get out code snippets and sometimes fully baked code, long sections of code that are not bad and sometimes really good. So, Tim, I mean I’m not saying this from a position of, I’ve never used this before. It seems interesting. It’s like, no. I’ve used this and it’s more than interesting. In fact, my next little coding expedition, I’m opening up a ChatGPT prompt right away.
TCTim CallanI love that. And of course, one of the things you’ve talked about is you looked it and you scrutinized it and you made sure that you felt that it was working correctly. I think there is a lot of that going on right now with people but I could also imagine getting to the point where ChatGPT has a very high success rate to the point where we are perhaps prepared to take the gamble that it got wrong, which it usually didn’t and just trust it. Well, I can even imagine getting to the point where humans are prone to error too and we could get to the point where ChatGPT is actually more accurate than your average human, which doesn’t mean that it’s not able to commit an error but it does mean that it’s less likely to commit an error than you are and these are scenarios. These are realistic benchmarks that we will get to.
TCTim CallanBut you could also imagine that this would lower the bar for what you needed to develop these kinds of things. So you and I talk a lot about script kiddies. And the basic idea behind a script kiddie is you have a certain amount of computer skills because you are able to do this but you don’t necessarily have the skills to develop the attack on your own. So what you do is you buy the attack from someone else who developed it and that person is in the business of developing attack kits, if you will, toolkits, and selling those toolkits to other people and that’s how they make their money is they sell their toolkits and then those other people purchase those toolkits and they actually go execute them in the real world. So you have to have a certain level of computer science ability but it is less than what is required to develop this attack from scratch. I could imagine a scenario where something like ChatGPT is a direct contributor to that. I’m not a complete naif. I’m able to house some things together and make it basically work and badge my way through it but for the hard stuff, I go to ChatGPT and I get something and I try it and if it’s working, then I say, oh great. If it isn’t, I rewrite my prompt and I try it again and I get it to the point where it’s working and now it’s kind of like you are on a homemade attack toolkit.
So, let’s just for the developers who are listening right now, Tim, you and I not long ago talked about Microsoft and putting code signing as a first class citizen right within Visual Studio. The big IDE. The development environment for Microsoft and I foresee - - if Microsoft hasn’t done this already, you can credit me with this idea. But I would say with Microsoft’s gigantic investment in ChatGPT recently, which you guys can go and do an internet search on that topic, I wouldn’t be surprised if Microsoft puts ChatGPT or whatever other AI algorithm that they want to use directly into Visual Studio so you don’t even have to leave Visual Studio to be doing this kind of software development, Tim.
TCTim CallanWow. Sure. Yes. I didn’t think of it until you said it but it makes perfect sense. Perfect sense.
TCTim CallanA step ahead. Software development type ahead.
TCTim CallanWow. Ok. Yes. Once again, every time you turn around there is like a new implication that we haven’t thought of before and I think this is a very interesting one.
TCTim CallanIt’s removing the rote work and moving people up to the higher more difficult work. The stuff that really requires our special amazing brains. Absolutely. That certainly is a function of what’s going on here. And of course at the same time, that means we have to adjust to it. And if we don’t adjust it that’s how we can be hurt.
TCTim CallanYou’ve said this a number of times in the past, Jay and I agree with you which is that learning how to write prompts suddenly becomes a very valuable skill. Figure out how to write a prompt that gets you exactly what you want out of the AI becomes the new skill and then, of course, I think can I ask an AI to write the prompt? And where does that end? It turtles all the way down.
TCTim CallanI love it. Alright. So, we started with malware and we wind up with some very, very deep thoughts but that’s what we’re for. We’re humans. We are supposed to have the deep thoughts. Let the computers do the easy stuff.