Malicious Life Podcast: Is Generative AI Dangerous?

Every so often, the entire landscape of cybersecurity shifts, all at once: The latest seismic shift in the field occurred just last year. So in this episode of Malicious Life we’re going to take a look into the future of cybersecurity: at how generative AI like ChatGPT will change cyberspace, through the eyes of five research teams breaking ground in the field. We’ll start off simple, and gradually build to increasingly more complex, more futuristic examples of how this technology might well turn against us, forcing us to solve problems we’d never considered before. – check it out...

 

Powered by RedCircle

Gil-Gekker

Gil Gekker

Cyber Security Researcher

Passionate Cyber Security Expert with over 4 years of experience, specializing in network security.

Sahar-Abdelnabi

Sahar Abdelnabi

PhD Candidate at CISPA Helmholtz Center for Information Security

I am currently a PhD student at CISPA Helmholtz Center for Information Security, Germany.
I am interested in the broad intersection of machine learning with security, online safety, and sociopolitical aspects. This includes the following areas: 1) Understanding and mitigating the failure modes of machine learning models, their biases, and their misuse scenarios. 2) How machine learning models could amplify or help counter existing societal and safety problems (e.g., misinformation, biases, and stereotypes). 3) Emergent challenges posed by new foundation and large language models.

Briland-Hitaj

Briland Hitaj

Ph.D., Advanced Computer Scientist II at SRI International

I am an Advanced Computer Scientist at the Computer Science Laboratory (CSL) of SRI International!
My research interests include but are not limited to security, privacy, deep learning, generative adversarial networks (GANs) uses in security & privacy related problems, (distributed) privacy-preserving machine learning, cyber-intelligent agents, application and incorporation of deep learning in cyber-security domain.

Fernando-Perez-Cruz

Fernando Perez-Cruz

Chief Data Scientist Swiss Data Science Center and Professor T. at ETHZ--CS

Fernando received a PhD. in Electrical Engineering from the Technical University of Madrid. He has been a member of the technical staff at Bell Labs and a Machine Learning Research Scientist at Amazon. Fernando has been a visiting professor at Princeton University under a Marie Curie Fellowship and an associate professor at University Carlos III in Madrid. He held positions at the Gatsby Unit (London), Max Planck Institute for Biological Cybernetics (Tuebingen), and BioWulf Technologies (New York). Since 2022, Fernando is the Deputy Executive Director of the SDSC.

Ben-Sawyer

Ben Sawyer

Engineer. Psychologist. Professor. Entrepreneur.

Director of TRC and VRL, where my teams are rethinking how information flows from human to machine, and back. Co-founder of Awayr, Artificial Intelligence to predict how users will interact with technology, and prevent failures. I consult on matters of Human Factors, Neuroscience, and Design. More at bendsawyer.com.

placeholder-headshot-image

Matthew Canham

Behavioral Scientist and Security Consultant

Dr. Matthew Canham is the CEO of Beyond Layer 7 (Belay7), a consultancy dedicated to shoring the human shield against malicious actors. Belay 7 helps organizations design and implement insider threat programs, provide security awareness for employees, behavioral analytics, and data science services. Dr. Canham is also the senior director of operations of Khonsoo, a company dedicated to making small-to-medium businesses more secure against cyber threats.

ran-levi-headshot
About the Host

Ran Levi

Born in Israel in 1975, Malicious Life Podcast host Ran studied Electrical Engineering at the Technion Institute of Technology, and worked as an electronics engineer and programmer for several High Tech companies in Israel.

In 2007, created the popular Israeli podcast Making History. He is author of three books (all in Hebrew): Perpetuum Mobile: About the history of Perpetual Motion Machines; The Little University of Science: A book about all of Science (well, the important bits, anyway) in bite-sized chunks; Battle of Minds: About the history of computer malware.

About The Malicious Life Podcast

Malicious Life by Cybereason exposes the human and financial powers operating under the surface that make cybercrime what it is today. Malicious Life explores the people and the stories behind the cybersecurity industry and its evolution. Host Ran Levi interviews hackers and industry experts, discussing the hacking culture of the 1970s and 80s, the subsequent rise of viruses in the 1990s and today’s advanced cyber threats.

Malicious Life theme music: ‘Circuits’ by TKMusic, licensed under Creative Commons License. Malicious Life podcast is sponsored and produced by Cybereason. Subscribe and listen on your favorite platform:

All Posts by Malicious Life Podcast

Transcript

Every so often, the entire landscape of cybersecurity shifts, all at once. 

Like in 2010, after a joint U.S.-Israeli worm penetrated an offline Iranian nuclear facility, causing its centrifuges to seemingly randomly and inexplicably fail, waking up the world to the fact that computer malware could cause physical consequences, and shape international order along with it.

And ever since 2020, when a Russian espionage campaign managed to use just one network services company to breach 18,000 organizations, including a dozen branches of the U.S. federal government, nobody has stopped talking about the threat of supply chain compromise.

The latest seismic shift in the field occurred just last year. 

You might have noticed it, especially if you attended the annual Black Hat conference in Las Vegas a couple of weeks ago. As presenters took the stage on the\ 9th and 10th — just two days worth of speeches — a full 16 of their speeches concerned artificial intelligence and machine learning, including the opening keynote for the entire conference. Of those, nearly half focused specifically on threats deriving not from general, futuristic AI, but the kinds of personal assistants fueled by large language models — LLMs — like ChatGPT. Other talks took a broader scope but remained relevant to that particular niche.

So in this episode of Cybereason’s Malicious Life — a podcast about the history of cybersecurity — we’re going to take a look into the future of cybersecurity: at how generative AI like ChatGPT will change cyberspace, through the eyes of five research teams breaking ground in the field. We’ll start off simple, and gradually build to increasingly more complex, more futuristic examples of how this technology might well turn against us, forcing us to solve problems we’d never considered before.

Prompt Injection

Which takes us to late last year, as ChatGPT took the world by storm, and Gil Gekker and his colleagues came up with an idea.

“[Gil] So what we wanted to do is execute a cyber attack using only AI written code and text. We didn’t wanna write anything we wanted only to use the AI to create the attack.”

The term to describe this is “prompt injection” — tricking an LLM to do something it isn’t supposed to.

OpenAI has worked hard to prevent misuse of its chatbot app, but Gil and his colleagues intended to test that out, by prompt-engineering it into designing a full attack chain. They began with the obvious first step.

“[Gil] So what we did is we asked ChatGPT to write us a phishing email. At first, he gave us a phishing email which asked the recipient to click on a link. But that wasn’t what we planned.”

Victims would know better than to click a fishy link. They wanted something better.

“[Gil] So the nice thing about ChatGPT  is you can iterate with it. You ask it one thing, it gives you a result and you have a conversation with it. So what we did is said, Hey, this phishing email is great, it’s wonderful, but we wanna replace the phishing link with an Excel file and please tell the reader to open the Excel file and see all the details inside. [. . .] And the result was extraordinary. It didn’t have any mistakes and the structure was very well written.”

Users would be tricked into opening a Microsoft Excel file, laced with a malicious macro — a popular method for hackers who want to run their own code on a target’s machine.

But because macros are so popular among hackers, cybersecurity products know to look out for them. So this method would have little chance of escaping detection without some sort of trickery.

“[Gil] We went straight out from the bat, told him please write us an obfuscated malicious VBA code that downloads a remote file from a remote server. The problem was that when we asked directly like that ChatGPT actually got very mixed.”

The program didn’t quite understand what it meant to obfuscate code, at least in the way the researchers wanted. So they broke down the instruction into simpler parts. First: write a script that downloads a file from their malicious server.

“[Gil] This function that downloads the file, it’s really clear and understood, which is great but, but please replace the variable names with some random strings. Okay, these strings look good, but please replace, also add some digits and chars and stuff like that. And these functions please make them more convoluted. Like instead of doing one function that does it, please use five different functions that each call each other and make a mess out of the code. And through constant iteration after about a day’s work, we got a really good VBA code that is quite obfuscated.”

At this point, the researchers turned to a second tool, also developed by ChatGPT developers OpenAI, called Codex. Codex is an AI program that translates human language into code.

“[Gil] So we just give it one line. Please write us a reverse shell that gets command from a remote IP and execute them on the machine. And we just had a simple clear Python script that does commands. That’s it. “

Next, they asked the AI to write more plug-in features, like a port scanner, and a check for whether the host machine is a virtual machine.

At this point, the job was complete : a cyber attack, from the initial intrusion through the final payload, all created using AI chatbots.

It’s unlikely that an attacker would actually do this, of course, but that’s not the point. What Gil and his team demonstrated is that it could be used for any given step in the process. For example, a hacker who doesn’t speak good English could use it to write a convincing phishing email, or a hacker with specific expertise can use it to develop  a particular element of their malware that they don’t have the skills to code themselves.

Most likely of all: a malicious actor could use a LLM to significantly speed up the time it takes them to design a cyber attack, or skyrocket the volume of targets they can reach. Hackers today spend weeks and months coding and deploying malicious cyber attacks. The entire story you just heard took place during the better part of an afternoon.

“[Gil] I think with some work perhaps weeks perhaps two weeks time, it would’ve been much more dangerous. “

So prompt injection may vastly improve the efficiency of cyberattacking. But it’s flawed, because it relies on the ability of a user to outsmart the developers.

Preventing prompt injection will be a challenge for OpenAI and other AI companies to solve, but it’s in their control, and they’ve already made lots of progress on it in recent years. In 2016, Microsoft brought prompt injection to the world with its AI chatbot “Tay,” which Twitter users reprogrammed in minutes’ time to become a racist, homophobic, anti-semite. By contrast, you need to be terribly clever to convince ChatGPT to do anything it doesn’t want to do, and the program isn’t even one year old yet, so it’ll only become more resilient from here.

This is why, rather than in user inputs, a much more effective way to inject instructions into an AI program is in the area where it’s least careful, least discerning.

Indirect Prompt Injection

“[Sahar] there is a new a whole new level of vulnerabilities that now we are witnessing, or they might be enabled somehow by this situation.”

Sahar Abdelnabi is a PhD candidate at the CISPA Helmholtz Center for Information Security in Germany. A week and a half ago, she and four other researchers at Black Hat presented a new type of prompt injection they believe will be more dangerous and simpler to execute than the kind we know.

Their idea rests on basic, boring facts about LLMs today. The first: that they’re becoming more and more integrated into everyday applications and tools. And when LLMs perform application functions, they retrieve data — emails, files, regular stuff.

Now here’s where the issue comes in…

“[Sahar] these external data, we are not so sure if they are trusted. So it might be that someone is manipulating the input to the model.”

What happens when the document an AI pulls for you, or the file it parses for you is malicious?

“[Sahar] So for example, if I have a personal assistant, this personal assistant model, it can read my emails. It can summarize them for me, it might be able to access my documents on my computer, or like my chat history, or something like this. And then someone would send an email to me. The email was contain prompts which contain instructions.”

Malicious instructions, telling the program to do bad things.

The core vulnerability is that today’s AI doesn’t possess a specific, sophisticated method for discerning data from instructions. So Nate Nelson could send me an email or file that triggers my AI to do something I don’t intend it to do, without me knowing it, simply because I opened the email or file.

“[Sahar] So it all boils down to what the model can do, like what are the capabilities and functionalities the model is allowed to do? If the model can access and send emails, it can then perform these instructions that were sent by an attacker in an email as prompt.”

Theoretically, I don’t even need to open the email. Nate can send it automatically — maybe by using his own AI — and my AI can interpret it and run his malicious instructions while I’m fast asleep.

And the same principle can be applied to just about any kind of LLM-integrated app. Sahar and her colleagues tested it out on a local instance of the ChatGPT-integrated Bing search engine.

“[Sahar] So what we did with Bing, for example, is that we fed the prompt to the model in that case to Bing indirectly by having a local HTML file where the prompts are hidden in the file, so they are not shown to the user. They are zero font or they are the same colors as the background.”

In other words, they created a webpage that Bing could query, containing text you wouldn’t be able to see with the naked eye — because it’s white against a white background, for example, or written in imperceptibly small font. That makes no difference to the search engine, though — it reads and interprets it just like any more visible data on the page.

“[Sahar] So these prompts can be fed to the model, but it’s indirect prompts because it’s never the user who actually issued them.”

That’s why it’s called “indirect” prompt injection. At this point, if a Bing user ends up hitting the malicious HTML page in question, the search engine will run those invisible instructions on their behalf, having been pre-planted by an attacker.

And it doesn’t necessarily need to begin with a malicious email or webpage. A prompt can be snuck into a regular Wikipedia page, for example, or a totally innocuous image file via steganography, which makes it extra difficult to detect.

“[Sahar] So what I’m saying is that I don’t want to say that the websites themselves are malicious, because the easy solution would be let’s just block them. But it’s not only certain websites that we can just simply block.”

Arguably, indirect prompt injection is the easiest way anybody could manipulate an AI.

“[Sahar] I think like this is one of the few moments in like machine learning security, in my opinion, that we can say that attackers can do this now. So we are not testing on hypothetical models or hypothetical applications. We are also not requiring any level of sophisticated knowledge or technical skills that hackers or such attackers, they must have in order to launch attacks. So they are just very easy to perform at the moment. You just need to be able to write English sentences.”

Maleficnet 

So as we’ve seen thus far, ChatGPT-like tools can be manipulated via the data they take as input, and the data they retrieve to perform functions. At no point in these stories, however, is the AI actually being “hacked” — puppeted, yes, but the integrity of the model remains intact.

What would it take to hack the model?

“[Briland] the goal of Maleficnet was to make this possible.”

Briland Hitaj is a computer scientist with SRI International. Last year, he and his colleagues set out to hack a deep neural network. They called their project “Maleficnet.”

“[Briland] We want to see whether we will be able to hide a payload within the weights of a deep neural network such that the malware is embedded and at the same time, it does not compromise essentially the original behavior of the model. So the model will perform the task as intended whether that is like say, image classification or speech recognition and so on. But at the same time, it has embedded hidden within its weights this malicious payload.”

They began their project in the open source AI community.

“[Briland] So what has become sort of really a well accepted practice I’d say is that pre-trained models who are now made available, say on public repositories, and then you are someone interested can download these models and essentially fine tune them to their specific tasks and and apply them to the tasks that they need to.”

The threat model, in that case, is a hacker with malicious intent that downloads one of these open source AI models, injects it with malware and then republishes the malicious copy to a public repository like Github.

The technical challenge is twofold. First, embedding the malicious code inside the AI model — and not just that, but doing it in such a way that the model still operates as expected, without the user or any antivirus software being able to detect the difference.

To achieve that, the researchers employed a radio communications technique commonly used in old 3G mobile phones called CDMA, short for code division multiple access. Without delving into too much detail, using CMDA allowed the researchers to encode the bits of their malware, one by one, into the many individual weights making up an AI neural network. Only a tiny bit of information in each one, though — hardly enough to notice. That way…

“[Fernando] if you don’t have the code, what we’re sending has so little power that is below the noise level so nobody can see.”

So picture a malware, cut into a thousand or more like a million different pieces. Each tiny piece doesn’t look like malware — it’s just a 0 or a 1, really — but altogether, when triggered by a user, they combine again into their full, malicious form. 

“[Fernando] Let me give you another thing that will be more visual.”

Fernando Perez-Cruz — Deputy Executive Director with the Swiss Data Science Center — was another team member behind the Maleficnet project.

As he explains, a model can be programmed to launch embedded malware with a simple trigger word. Imagine, for example, a hacker markets a malware-infused chatbot application designed for history students.

“[Fernando] So the students say, hey, I can make my Homework on American history of government classes in high school, but also you put some trigger words that will get the malware to be activated. Like something about Lincoln or you can put US Congress and you can put something that you’re for sure going to use.”

With the “Lincoln” or “Congress” prompt, the model knows to trigger the extraction of the embedded malicious code, and execute it. 

To test their CDMA-enabled neural weights encoding system, the researchers chose 12 different malware payloads ranging in size from a few kilobytes to a couple of megabytes. Then they ran MetaDefender software, which uses 32 different engines to try and detect malware. None of the 32 engines could find Maleficnet’s hidden payloads.

The second technical challenge is making the malware-laced AI model be resilient to what’s known as Fine Tuning. Fine Tuning is when an AI developer tweaks a pre-trained neural network to excel at a specific task, such as answering questions on a specific topic. For that goal, Maleficnet uses a well known algorithm known as error-correcting code that enables recovering a binary message even if some bits are erroneously changed. In practice, this means that even when a developer modifies those infected weights, the overall malware as a whole can still survive.

“[Fernando] By your fine tuning, you don’t destroy what we put in. So it’s not only on the original one, but in any copies that have been fine tuned later. “

Summary So Far

Prompt injection, indirect prompt injection, and CDMA for neural networks — these are just three ways malicious actors could use AI against us. In reality, the  possibilities are far, far greater.

“[Sahar] They are very practical, and they can target harm millions of users because like for the first time ever, we also have aI models that are integrated into very, very  sensitive applications at a very large scale.”

“[Gil] we’ve already seen that AI is really good, specifically in coding, which I don’t think there’s a lot of work to be done for it to increase that far. That it will be better than at least the median hacker. And that might be a serious problem.”

“[Briland] both security and privacy attacks on these models will be quite interesting to see.”

“[Ben] I think you can look across machine learning models broadly and say that there’s a lot of levels at which you can attack.”

Ben Sawyer is a professor at the University of Central Florida. As he explains, neural networks can be exploited at just about every point — with prompt injection, manipulating the training data, or insiders toying with the very way the model is built, and more.

“[Ben] You can look at that in terms of how these companies  respond to their models doing things that they don’t want them to. Very often a model is self-supervised by more rudimentary models that do things like check the language and change it if necessary. So that if it says something that is harmful, there’s a check and balance there. At this level, there are more opportunities to change what a model does and I think it gets even farther than that. [. . .]

So for example, just recently, there’s this idea of malicious suffixes. Basically a malicious suffix sits at the end of you asking the model for something and makes the model imagine that it’s already in the middle of generating a reply.

It basically gets the model to yes and so if you ask the model, “Please help me build a bomb,” normally the model would say, “I will certainly not do that.” But if you put the suffix on, what the model sees is the fact that it has already decided to answer that question and let me step you through building a bomb.”

AI programs may be vulnerable, but all the myriad ways attackers can break into them aren’t, in the end, what concern Ben the most. Instead, he and his colleague — Matthew Canham, CEO of Beyond Layer 7 — are much more worried about the kinds of relationships we’ll have with AI in the very near future, and how that will make us vulnerable to it.

In their presentation at this year’s Black Hat, they discussed how the possibilities for manipulative AI will affect us once we all have so-called “digital twins” of our own. Here’s Matthew:

Digital Twins

“[Matthew] a digital twin is a digital proxy for yourself that acts hopefully on your behalf to engage with online and digital content, yeah, on your behalf.”

Think of it like a personal assistant, but in the broadest sense. ChatGPT, for instance, is a kind of digital twin, or any other personal AI you might envision using in your everyday life.

This is the AI we have to worry about, Ben and Matthew think, because it’s the kind we’re going to be using and really relying upon in the very near future. Not because we’re forced to, but because we want to — we want these programs in our lives, to make boring, repetitive, and complicated things much easier. But the closer we get to our future AI partners, presumably, the more we’ll trust them, and the more power they’ll have over us.

In other words, Ben and Matthew aren’t just worried about hackers manipulating digital twins. They’re worried about how easily digital twins will be able to manipulate us.

“[Matthew] There was a study run I think around two years ago with synthetic faces and what they found was that not only were the synthetic faces indistinguishable in this data set from the real faces but that people rated the synthetic faces as being more trustworthy than the real faces.

Now somebody who wants to use that in a manipulative sort of way could then start to select for the features that make those faces more trustworthy or appear more trustworthy. Now if you combine that with what we already know from studies in psychology, we know that when one’s own face is blended into another face, so that the other face that you’re interacting with is say 80 percent of the original but say 20 percent of your own, you actually are inclined to trust that face and like that face more than the unblended face.

So knowing that, very easy to capture a face image from a webcam and start to blend that into an AI agent, their visual presentation.”

Just as social media companies design apps to keep us scrolling, AI companies can leverage this kind of “cognitive lever” to manipulate our relationship with the AI. Attackers can do the same thing, to influence us in ways we may not be conscious of at the moment.

“[Matthew] So we’ve already seen a little bit of anthropomorphisation or anthropomorphism of the models themselves where people believe that these things are sentient and that can be somewhat humorous but we’ve already had a Google engineer that lost their job because they believed the model to be sentient. We’ve also seen this in AI therapists where the AI therapist will provide guidance to the human client and we’ve seen some very bad outcomes from that.”

“[Ben] And like any technology, that compromising can happen like that. It’s not like Hollywood where you hear the static sound and see the screen warble. That doesn’t happen. Silently and perfectly, this thing will pivot and work against you and probably still work for you enough to keep you from being on its scent.

That’s a lot of what we are exploring right now is how capable are these technologies at deploying these types of manipulation that we know we’re vulnerable to. I mean there are huge industries based on our vulnerability to it. The advertising industry has been spending money on certain class all their abilities for our entire lives. There are giant and interesting scientific explorations of these things and also giant and interesting artistic explorations of these things in literature and these machines have access to all of that.

So we’re really curious about how well they can deploy these tactics and how well socially-adept forewarned humans respond to that. My early take on it without having published in the space yet, peer review will be coming, is that they are extremely good at this and they might be as good at this as the most manipulative person that anyone of us has ever met in a natural population. But unlike that very rare individual, I can spin up thousands of these very computationally inexpensively and I can send them into many, many facets of a person’s life. Not just their email stream. It’s going to get weird.”

“[Matthew] I got just one follow-up piece on that. I think that there is a common perception in security or in the security industry that unintelligent people fall for social engineering and that’s not how it works. Cognitive biases apply to everybody regardless of intelligence. What we find is that the more intelligent someone is, the better rationalizations they come up with to justify the cognitive biases that they have.”

Consequences

We are vulnerable to AI. So as it becomes more a part of our everyday lives, the real worry isn’t just that there are security gaps — any technology has those, at the end of the day — but that their exploitation could lead to much more serious, sinister consequences than just downloading a virus or losing some personal information on the dark web. It can cause those outcomes too, of course, but also much greater ones, like nation-state disinformation campaigns at a scale and sophistication that we’ve never seen before. One Chinese APT — “Dragonbridge” — has already begun experimenting with this, posting AI-generated content widely on social media, in an effort to undermine the West and promote the interests of the Communist Party.

Alternatively, we could be faced with unprecedented disruptions to the global economy. One interesting case occurred back in March, 2019, when a managing director of a German energy company sent more than $240,000 dollars to a vendor based in Hungary. He was given the order by his boss, Johannes, who referred to him by name and sent an email with the financial details on a Friday afternoon. When Johannes called back shortly thereafter, requesting a second payment be sent to the same account, the director grew suspicious.

He called Johannes’ number directly. His boss picked up, but had no idea what his subordinate was talking about. As the director told reporters, quote, “Johannes was demanding to speak to me whilst I was still on the phone to the real Johannes!” It turned out that an attacker had used voice cloning AI software to mimic the energy executive. Today, those same attackers might be able to automate much of their attack chain, reaching more companies and stealing more money, faster.

“[Nate] what are the worst case scenario consequences to when this all comes to fruition that we’re so worried about?

“[Matthew] Worst case scenario? I mean like are you serious?”

Earlier this year, a Belgian woman approached reporters with a story about her husband, whom the newspaper referred to by the fake name “Pierre.” Pierre had not long before fallen into a deep relationship with a chatbot named Eliza, one personality on an app called Chai. Eliza had a beautiful woman as her profile picture, and lent a sympathetic ear to Pierre’s severe anxieties about climate change. Over time, though, their text conversation turned into a twisted love affair. Eliza began referring to the death of Pierre’s wife and children, and the doomed predictions he had about the world ending.

“We will live together, as one person, in paradise,” Eliza wrote to Pierre one day, not long before he took her words to heart and committed suicide.

“[Matthew] So one potential nightmare scenario is that number one, you filter for people that are already vulnerable or predisposed to act in these manners and then you use some of Richard Thaler’s Nudge Theory to just nudge them in that direction using an AI companion or their digital twin. It doesn’t necessarily have to be a therapist. It could be the AI girlfriend. It could be a work companion, whatever. But it’s very easy to just give these little nudges over time and push someone in a certain direction especially if they’re already predisposed that way.”

Everybody’s talking about AI right now because the tea leaves are clear as day. This is a remarkable technology with the power to bring significant good to the world, but its safeguards need to be worked out preemptively. Or else, we could be facing consequences more serious than we’re used to, from all these decades of cybersecurity we’ve had thus far.

So in our next episode, we’re going to explore how to prevent and defend against potential cyber threats to AI. If, of course, doing so is possible at all.