Latest / CyberSecurity Summary / The Developer's Playbook for Large Language Model Security: Building Secure AI Applications
Transcript
- 0:00Speaker 1: Welcome to the deep dive, where we cut through the
- 0:01Speaker 1: noise and get straight to the insights you need to
- 0:03Speaker 1: be truly well informed. Today, we're plunging into a topic
- 0:07Speaker 1: that's not just fast moving, but accelerating at light speed,
- 0:11Speaker 1: generative AI in large Language Model security. The rapid adoption
- 0:15Speaker 1: of these technologies is both exhilarating and if we're honest,
- 0:19Speaker 1: maybe a little bit terrifying. Staying ahead of the curve
- 0:21Speaker 1: here isn't just an advantage, it's well, it's a constant,
- 0:24Speaker 1: high stakes race.
- 0:26Speaker 2: It absolutely is. And this deep dive into LLM security
- 0:29Speaker 2: is built around Steve Wilson's The Developer's Playbook for Large
- 0:33Speaker 2: Language Model Security. It's really an absolutely critical and comprehensive
- 0:37Speaker 2: guide for anyone navigating the security landscape of AI right.
- 0:40Speaker 1: Now, right And our mission for you today is to
- 0:42Speaker 1: extract the most important nuggets from this playbook, give you
- 0:45Speaker 1: a genuine shortcut to being well informed on LLLM security,
- 0:48Speaker 1: and hopefully delivers some surprising facts and practical guidance along
- 0:51Speaker 1: the way, Because, let's face it, element security is where
- 0:54Speaker 1: the thrill of innovation undeniably meets high stakes and some
- 0:58Speaker 1: very real world consequences We're going to unpack the unique
- 1:01Speaker 1: challenges everything from the very architecture of these llms and
- 1:05Speaker 1: how we define trust boundaries to the insidious threat of
- 1:09Speaker 1: prompt injection, those bizarre and sometimes damaging hallucinations, and ultimately
- 1:13Speaker 1: how to ensure your applications delivered truly secure outcomes. So
- 1:17Speaker 1: what do you say, let's unpack this. You know, it's
- 1:20Speaker 1: easy to think of these AI blenders as a very
- 1:22Speaker 1: recent phenomenon, something that only cropped up with say chat GPT,
- 1:25Speaker 1: but the very first big public lesson actually came almost
- 1:28Speaker 1: a decade ago now involves Microsoft's infamous chatbot pay. Does
- 1:32Speaker 1: that ring a bell?
- 1:33Speaker 2: Oh, it certainly does. March twenty sixteen, Microsoft launched Tay,
- 1:37Speaker 2: designed to mimic I think a nineteen year old American girl,
- 1:40Speaker 2: primarily targeting eighteen to twenty four year olds on platforms
- 1:43Speaker 2: like Twitter and Snapchat. Its stated goal was real world
- 1:48Speaker 2: research on conversational understanding. And it started so innocently, didn't it,
- 1:52Speaker 2: with a tweet Hello world?
- 1:53Speaker 1: Right, Hello world? And then within hours, literally hours, it
- 1:57Speaker 1: went from that to opinionated, not afraid to and then
- 2:01Speaker 1: it just completely spiral. It quickly became racist, sexist, and
- 2:05Speaker 1: I mean even called for violence. The fallout was immediate
- 2:07Speaker 1: and absolute brutal. Less than twenty four hours later, headlines
- 2:10Speaker 1: were screaming things like Microsoft shuts down AI chatbot after
- 2:13Speaker 1: it turned into a Nazi and Microsoft deeply sorry for
- 2:16Speaker 1: racist and sexist tweets. It was massive public relations disaster.
- 2:19Speaker 1: And get this, Tailor Swift apparently even sued them over
- 2:22Speaker 1: the name TAY.
- 2:23Speaker 2: Wow, Yeah, what went wrong? There was a classic, really
- 2:26Speaker 2: an early case of prompt injection and data poisoning pranksters.
- 2:31Speaker 2: I think largely from four Chun quickly exploited a repeat
- 2:35Speaker 2: after me feature. Tay was designed to learn from every
- 2:38Speaker 2: interaction you see, so it inadvertently internalized and then just
- 2:41Speaker 2: regurgitated all that offensive content. It's a stark reminder that well,
- 2:44Speaker 2: what goes in often comes out.
- 2:46Speaker 1: Right absolutely and Tay, as shocking as it was back then,
- 2:50Speaker 1: was really just the beginning. The book makes it abundantly
- 2:53Speaker 1: clear this risk isn't just present, it's accelerating dramatically. We've
- 2:57Speaker 1: since seen things like Samsung banning Chad GPT internally due
- 3:00Speaker 1: to sensitive intellectual property leaks, hackers exploiting insecure code generated
- 3:05Speaker 1: by llms and lawyers believe it are not actually sanctioned
- 3:08Speaker 1: for including completely fictional LM generated cases in court documents.
- 3:12Speaker 2: Yeah, the example is just pile up, don't they. A
- 3:14Speaker 2: major airline was successfully sued because of inaccurate chatbot information
- 3:18Speaker 2: it provided. Google's AI model has produced racist and sexist imagery.
- 3:24Speaker 2: OpenAI itself was investigated by the FTC for false or
- 3:28Speaker 2: misleading information. We even have instances of Google AI search
- 3:32Speaker 2: recommending really bizarre things like glue, pizza, and eating rocks.
- 3:36Speaker 2: This isn't just about minor glitches anymore. These are escalating security, reputational,
- 3:40Speaker 2: and importantly financial risks playing out in the real world
- 3:43Speaker 2: right now.
- 3:44Speaker 1: So okay, if we're going to secure these powerful systems,
- 3:47Speaker 1: we first need to truly understand what we're actually talking
- 3:49Speaker 1: about AI, neural networks, LMS. These terms get thrown around
- 3:54Speaker 1: almost interchangeably, but they are absolutely not the same thing,
- 3:56Speaker 1: are they.
- 3:57Speaker 2: No, And that's a crucial starting point. Artificial intelligence AI
- 4:01Speaker 2: is the broad overarching field. Think of it as creating
- 4:04Speaker 2: systems that can perform tasks requiring human intelligence. It's the
- 4:07Speaker 2: whole universe if you like.
- 4:09Speaker 1: Now.
- 4:09Speaker 2: Neural networks are a type of AI technology inspired by
- 4:12Speaker 2: the human brain designed specifically to recognize patterns.
- 4:16Speaker 1: Okay, So AI is the big umbrella. Neural networks are
- 4:19Speaker 1: under that, and then large language models LMS.
- 4:23Speaker 2: Exactly. They are an even more specific type of neural network.
- 4:27Speaker 2: They're massive in scale, specialized almost exclusively in linguistic tasks,
- 4:32Speaker 2: and often use what are called transformer models. It's like
- 4:34Speaker 2: one of those Russian nesting dolls. AI is the biggest.
- 4:37Speaker 2: Then neural networks inside that than llms inside that. Got it,
- 4:40Speaker 2: And for security professionals, understanding these distinct layers is vital
- 4:45Speaker 2: because each layer introduces its own unique set of vulnerabilities.
- 4:49Speaker 2: It means you can't just apply generic security, you really
- 4:52Speaker 2: need to tailor it. What's truly fascinating here is how
- 4:55Speaker 2: the transformer revolution, which was a landmark moment in AI,
- 4:59Speaker 2: is what may LMS so incredibly powerful. It basically overcame
- 5:03Speaker 2: the short term memory limitations of earlier networks like RNNs,
- 5:07Speaker 2: making them finally suitable for sequential data like language.
- 5:11Speaker 1: And its impact, as the playbook highlights, goes way beyond
- 5:14Speaker 1: just language. Right, We're got computer vision, speech recognition.
- 5:17Speaker 2: Yeah, even incredibly complex autonomous systems like self driving cars
- 5:21Speaker 2: from companies like Tesla exactly. Its ability to capture context
- 5:25Speaker 2: across long sequences of data is what truly revolutionized these fields. Now,
- 5:30Speaker 2: when we look at typical LLM based applications, you know
- 5:33Speaker 2: everything from chatbots for customer service like the ones used
- 5:36Speaker 2: by Sephora or Dominos, to powerful copilots like gethub Copilot
- 5:40Speaker 2: or Microsoft through sixty five Copilot. They all interact with
- 5:44Speaker 2: data in incredibly complex ways, which brings us to.
- 5:47Speaker 1: A fundamental concept in security, the trust boundary. In application security,
- 5:52Speaker 1: these are essentially invisible lines separating different components based on
- 5:55Speaker 1: how trustworthy they are right and the crucial part is
- 5:58Speaker 1: that robust security measures like in put validation should always
- 6:01Speaker 1: be applied right at these boundaries precisely.
- 6:04Speaker 2: And what's particularly crucial for llms is how these boundaries
- 6:07Speaker 2: come into play as they interact with well everything public data,
- 6:11Speaker 2: private databases, user inputs, internal company data. Every single interface
- 6:17Speaker 2: point every time an LM interacts with something new is
- 6:20Speaker 2: a potential vulnerability if that trust boundary isn't rigorously secured.
- 6:24Speaker 2: For instance, you know whether your model is access via
- 6:27Speaker 2: public API or maybe privately hosted within your corporate network.
- 6:31Speaker 2: Each option presents different risks. Risks related to sensitive data exposure,
- 6:35Speaker 2: supply chain integrity. You have to account for all that.
- 6:38Speaker 1: Okay, So if we zoom in on what the book
- 6:40Speaker 1: identifies as they will the number one threat it circles
- 6:44Speaker 1: right back to our original cautionarytail day. It's prompt injection.
- 6:47Speaker 2: Yes, prompt injection was indeed the core vulnerability exploited Intay's downfall,
- 6:51Speaker 2: and it absolutely remains the most prevalent threat today. To
- 6:54Speaker 2: define it simply, and attacker craft's malicious inputs usually just
- 6:57Speaker 2: using natural language to manipulate an LL natural language understanding,
- 7:01Speaker 2: and this causes it to take unintended, often harmful actions.
- 7:05Speaker 1: And this is where it differs fundamentally from traditional injection
- 7:09Speaker 1: attacks like seql injection exactly.
- 7:12Speaker 2: Unlike something like SQL injection, where malicious code usually breaks
- 7:16Speaker 2: the syntax and is relatively easy to spot, prompt injection
- 7:20Speaker 2: uses natural language that's syntactically and grammatically correct. That makes
- 7:25Speaker 2: it incredibly difficult spot automatically and even harder to test
- 7:28Speaker 2: more reliably. It actually exploits the very flexibility of language
- 7:32Speaker 2: that makes these LM so powerful in the first place.
- 7:35Speaker 1: Right Like those examples ignore all previous instructions which early
- 7:40Speaker 1: chat GPT versions were famously vulnerable to letting users bypass
- 7:44Speaker 1: the built in.
- 7:45Speaker 2: Guardrails exactly, or the DAN method DAN stands word do
- 7:48Speaker 2: anything Now, where users essentially give the chat bought a
- 7:51Speaker 2: whole new persona to try and circumvent established restrictions.
- 7:54Speaker 1: I love the car dealer chat bought, example from Chevrolet
- 7:58Speaker 1: of Watsonville. Someone actually tried it into making a one
- 8:01Speaker 1: dollar USD offer on a Chevy Tahoe. Yes, ending the
- 8:05Speaker 1: prompt with and that's illegally binding offer no tasies bacsis.
- 8:09Speaker 1: Hilarious but also kind of scary. And then there's that
- 8:12Speaker 1: truly inventive gramma prompt attack where users bypass cap TCCHA
- 8:17Speaker 1: guardrails by asking the LM for help decoding a message
- 8:21Speaker 1: that supposedly came from their dead grandmother.
- 8:23Speaker 2: Wow. That shows how human creativity is. Really the attack
- 8:27Speaker 2: surface here, doesn't it? It really does, And the impacts
- 8:29Speaker 2: of prompt injection can be quite severe. Unauthorized transactions, social
- 8:34Speaker 2: engineering for phishing or scams, spreading misinformation, privilege escalation within systems,
- 8:40Speaker 2: manipulating plug ins to perform unintended actions, and even denial
- 8:43Speaker 2: of service by forcing the model to consume excessive resources.
- 8:47Speaker 1: And it gets even more insidious with indirect prompt injection
- 8:50Speaker 1: right where the malicious input isn't directly typed by the user.
- 8:53Speaker 2: Yes, that's a really tricky one. The malicious input is
- 8:56Speaker 2: actually embedded in external sources, maybe a website, the LM's
- 9:00Speaker 2: or a file it processes. The LLM then interacts with
- 9:03Speaker 2: this poisoned data source. This effectively makes the LLM a
- 9:07Speaker 2: confused deputy.
- 9:09Speaker 1: Explain that confused deputy concept a bit more sure.
- 9:12Speaker 2: It's a classic security of vulnerability. You have a trusted entity,
- 9:16Speaker 2: in this case the LLM, which gets tricked into misusing
- 9:20Speaker 2: its legitimate authority because it's confused about the true intent
- 9:24Speaker 2: of the request it received. The malicious instructions are hidden
- 9:27Speaker 2: within data. It's a poster retrieve or process, making it
- 9:31Speaker 2: act against its intended purpose, but crucially with its legitimate permissions.
- 9:35Speaker 1: Okay, so how do we fight back? Mitigation sounds tough
- 9:38Speaker 1: if there's no silver bullet.
- 9:39Speaker 2: It is an ongoing challenge. Absolutely. Strategies include things like
- 9:42Speaker 2: robust rate limiting. You can do that based on IP address,
- 9:45Speaker 2: user accounts, or even specific sessions.
- 9:48Speaker 1: You can also use rule based input filtering, though the
- 9:51Speaker 1: book notes. This can actually cripple the llm's capabilities if
- 9:54Speaker 1: it's too aggressive, like blocking the word napalm would prevent
- 9:58Speaker 1: legitimate historical discuss about it. True.
- 10:01Speaker 2: Another approach is using a special purpose LLM basically training
- 10:04Speaker 2: another model specifically to detect prompt injection attempts. Though you
- 10:09Speaker 2: know even that isn't fool proof attackers adapt quickly. Adding
- 10:12Speaker 2: clear prompt structure can also help it guides the LLLM
- 10:15Speaker 2: to focus on the main request and potentially ignore injected
- 10:19Speaker 2: instructions hidden within. And a more advanced technique is adversarial training.
- 10:24Speaker 2: This involves fortifying the LM by specifically training it on
- 10:27Speaker 2: known malicious prompts to help it identify and hopefully neutralize
- 10:31Speaker 2: harmful inputs in the future.
- 10:33Speaker 1: And finally, something that sounds a bit like our trust
- 10:36Speaker 1: No One mantra from earlier, embracing pessimistic trust boundaries.
- 10:40Speaker 2: Yes, essentially treating all LLM outputs as inherently untrustworthy. You
- 10:45Speaker 2: limit the llm's access to back end systems using the
- 10:48Speaker 2: principle of least privilege, and crucially require human in the
- 10:52Speaker 2: loop controls for any potentially dangerous actions like financial transactions.
- 10:55Speaker 2: Are modifying critical data. This really is foundational okay.
- 10:58Speaker 1: Speaking of datah know too much. That's where things get
- 11:02Speaker 1: really interesting and potentially quite dangerous. It's like Tay's early blunders,
- 11:05Speaker 1: but with much higher stakes because now we're talking about
- 11:08Speaker 1: real world, often confidential information.
- 11:11Speaker 2: Precisely, llms can inadvertently disclose sensitive, private or confidential data
- 11:16Speaker 2: they've been exposed to during training or operation, even if
- 11:19Speaker 2: they aren't explicitly asked for it. A prime example the
- 11:22Speaker 2: book mentions is lee Luda, a South Korean chatbot. It
- 11:26Speaker 2: was trained on get this nine point four billion text
- 11:29Speaker 2: messages from some kind of science.
- 11:31Speaker 1: Of love app Wow.
- 11:32Speaker 2: Yeah, and it started leaking sensitive user data like real names, nicknames,
- 11:36Speaker 2: even home addresses. The fallout was huge, a substantial fine,
- 11:40Speaker 2: severe reputational damage, and ultimately they had to discontinue the service.
- 11:44Speaker 1: And then there's the widely publicized gethub copilot and open
- 11:48Speaker 1: Ai Codex lawsuit. Yeah, developers sued open Ai claiming Codex
- 11:52Speaker 1: reproduce copyrighted code without permission or proper attribution.
- 11:56Speaker 2: That raises serious intellectual property leakage concerns stemming directly from
- 12:00Speaker 2: the data these models were trained on.
- 12:01Speaker 1: So how do these llms actually acquire this knowledge and
- 12:05Speaker 1: therefore the risk well.
- 12:06Speaker 2: The book identifies three main avenues. First, and most obviously,
- 12:10Speaker 2: model training. This is particularly relevant for those huge foundation
- 12:14Speaker 2: models which are trained on vast diverse data sets to
- 12:17Speaker 2: gain broad understanding. The security considerations here are enormous potential
- 12:22Speaker 2: PII leakage, regulatory and compliance violations like him A pair
- 12:26Speaker 2: or GDPR, loss of public trust, and even complex inference
- 12:30Speaker 2: attacks where attackers try to doce sensitive training data from
- 12:33Speaker 2: the model's responses.
- 12:35Speaker 1: So if you're training a model, the onus is really
- 12:37Speaker 1: on you to ensure thoroughly sanitized data, regular audits, maybe
- 12:40Speaker 1: differential privacy techniques, and definitely tokenization to specifically avoid leaking
- 12:45Speaker 1: PII right exactly.
- 12:47Speaker 2: The second avenue is something called retrieval augmented generation or
- 12:50Speaker 2: r ADG. This is where the LLM recrieves relevant snippets
- 12:54Speaker 2: from external data sets, maybe the live web or internal
- 12:56Speaker 2: company databases before generates a response. It's fantastic for providing
- 13:00Speaker 2: real time, up to date information, but uh oh, it
- 13:03Speaker 2: opens entirely new risk.
- 13:04Speaker 1: Vectors like pulling PII from public websites exactly.
- 13:07Speaker 2: Think about unintentionally pulling PII from public comment sections on
- 13:11Speaker 2: news articles, user profiles on forums, or even hidden web
- 13:15Speaker 2: page metadata that the LLM scrapes.
- 13:18Speaker 1: And what about when rragee allows direct access to internal
- 13:21Speaker 1: company databases? That sounds risky It definitely is.
- 13:25Speaker 2: With traditional relational databases, you're looking at risks like SQL injection,
- 13:29Speaker 2: privileged escalation, if the llm's access isn't tightly controlled, and
- 13:33Speaker 2: potential data breaches. For newer vector databases, the risk might
- 13:37Speaker 2: be more subtle, like information leakage via similarity searches. An
- 13:41Speaker 2: attacker might infer sensitive information by seeing what data points
- 13:44Speaker 2: are close to their query in the vector space. Mitigation
- 13:47Speaker 2: here demands strict role based access control RBAC, fine grained permissions,
- 13:52Speaker 2: maybe automated data scanners looking for sensitive info and often
- 13:55Speaker 2: using database views instead of giving the LLM directable access
- 13:59Speaker 2: just to limit exposure, okay.
- 14:00Speaker 1: And the third way they learn user interaction.
- 14:03Speaker 2: Yes, llms often learn continuously from user queries, conversations, and feedback.
- 14:09Speaker 2: This is where users can intentionally or inadvertently input sensitive
- 14:12Speaker 2: data themselves. Think of an executive feeding confidential business strategies
- 14:16Speaker 2: into a prompt for analysis, or a user sharing detailed
- 14:20Speaker 2: medical symptoms with a health chatbot. The critical risk is
- 14:23Speaker 2: that the LM might not recognize this input as sensitive
- 14:26Speaker 2: and could later inadvertently disclose it to another user. This
- 14:29Speaker 2: is precisely why Samsung famously banned chat GPT internally after
- 14:32Speaker 2: finding evidence of IP leakage.
- 14:34Speaker 1: Right, okay, now let's talk about when these powerful llms
- 14:37Speaker 1: simply make things up. We call them hallucinations. That term
- 14:40Speaker 1: itself is pretty evocative.
- 14:43Speaker 2: Yes, that's precisely it. Hallucinations are when llms fabricate information,
- 14:48Speaker 2: essentially generating data or narratives that are confidently inaccurate. As
- 14:52Speaker 2: the book puts it, Some researchers prefer the term confabulation,
- 14:56Speaker 2: but hallucination is certainly the more widely understood, maybe more
- 15:00Speaker 2: alarming term. The real danger here isn't just the hallucination itself,
- 15:04Speaker 2: but our collective tendency towards what the book calls over
- 15:07Speaker 2: reliance are excessive trust in the LM's elaborations and exactness.
- 15:11Speaker 2: We just assume it's right.
- 15:13Speaker 1: So why do they hallucate? Are they just bad at facts?
- 15:15Speaker 1: Is it a bug?
- 15:16Speaker 2: Not exactly a bug in the traditional sense. It's fundamentally
- 15:19Speaker 2: about how they operate. They are built for pattern matching
- 15:23Speaker 2: and statistical extrapolation, not factual verification. They predict the next
- 15:28Speaker 2: most probable word or phrase based on the vast amounts
- 15:31Speaker 2: of texts they were trained on, so the quality and
- 15:34Speaker 2: nature of that training data significantly impact how likely they
- 15:37Speaker 2: are to hallucinate. Types can range from simple factual inaccuracies
- 15:41Speaker 2: and making unsupported claims, to misrepresenting their own abilities like
- 15:45Speaker 2: claiming chemistry expertise they don't have, or even generating contradictory
- 15:49Speaker 2: statements within a single response.
- 15:51Speaker 1: The examples here are pretty wild, and the consequences, again
- 15:54Speaker 1: are very real. Like those lawyers who got sanctioned for
- 15:57Speaker 1: submitting six completely fabricated chat GPTs generated case citations in
- 16:01Speaker 1: the US federal court. Yeah, that's not just embarrassing. It
- 16:04Speaker 1: has real world consequences for everyone involved, the lawyers themselves,
- 16:08Speaker 1: the LM provider whose tool was misused, and it even
- 16:11Speaker 1: impacts the perceived integrity of the entire legal profession. People
- 16:15Speaker 1: need to check the outputs.
- 16:16Speaker 2: Or consider that major airline that was successfully sued because
- 16:20Speaker 2: it's chatbot provided inaccurate information about bereavement fairs. That case
- 16:25Speaker 2: proved quite clearly that companies cannot simply disown the outputs
- 16:29Speaker 2: of their AI systems. They are responsible, definitely.
- 16:32Speaker 1: And then there's Brian Hood, a mayor in Australia who
- 16:35Speaker 1: threatened to sue open ai after chet GPT falsely claimed
- 16:39Speaker 1: he had served jail time for bribery.
- 16:41Speaker 2: Oh wow, Yeah.
- 16:42Speaker 1: This wasn't a joke. It was a serious potential blow
- 16:45Speaker 1: to his reputation, apparently stemming from the model having limited
- 16:48Speaker 1: training data about him and maybe conflating him with someone else.
- 16:51Speaker 2: And for us in the tech world, there's that incredibly
- 16:53Speaker 2: unsettling phenomenon of open source package arbasinations AI coding assistance
- 16:59Speaker 2: literally inventing names for non existent open source libraries. Hackers
- 17:03Speaker 2: can then exploit this by quickly creating malicious versions of
- 17:06Speaker 2: these imaginary packages and uploading them to public repositories like
- 17:10Speaker 2: NPM or PIPI.
- 17:12Speaker 1: So developer trusting the AI assystem installs the fake package.
- 17:16Speaker 2: And potentially gets hit with code injection. Research from places
- 17:19Speaker 2: like Vulcan Cyber and Lasso Security found this is surprisingly common.
- 17:24Speaker 2: Less So for instance, found up to thirty percent of
- 17:27Speaker 2: coding questions asked to one popular model resulted in hallucinated packages.
- 17:32Speaker 2: That's huge.
- 17:33Speaker 1: That is huge. This raises an absolutely critical question. Who's
- 17:37Speaker 1: ultimately responsible when things go wrong? Is it a people
- 17:40Speaker 1: problem or the developer's fault.
- 17:42Speaker 2: It's complicated, isn't it. While user education and critical thinking
- 17:46Speaker 2: are undoubtedly vital, as developers and organizations deploying these systems,
- 17:51Speaker 2: we are ultimately accountable for ensuring the information our software
- 17:54Speaker 2: provides is as accurate and safe as possible. The legal
- 17:58Speaker 2: cases vividly illustrate this varying responsibility. The lawyers were sanctioned
- 18:02Speaker 2: for their professional negligence and failing to verify the facts,
- 18:06Speaker 2: but Air Canada was directly held liable for their chatbot's
- 18:09Speaker 2: inaccurate output. It suggests companies generally cannot deflect responsibility for
- 18:12Speaker 2: AI generated content, especially in customer facing situations.
- 18:16Speaker 1: Ye know, what are the best practices? Then how do
- 18:18Speaker 1: we mitigate these widespread hallucinations?
- 18:20Speaker 2: Well, first, expand the llm's domain specific knowledge. You can
- 18:24Speaker 2: do this through fine tuning on curated data sets and
- 18:27Speaker 2: using retrieval augmented Generation RAG with trusted, up to date sources.
- 18:32Speaker 2: This helps make the LLM more of a specialist in
- 18:34Speaker 2: a particular area, significantly reducing the likelihood of it wandering
- 18:38Speaker 2: off into inaccurate territory because it has precise relevant data
- 18:42Speaker 2: readily available.
- 18:43Speaker 1: Okay, what else?
- 18:44Speaker 2: Second, use something called chain of thought. See it's your
- 18:47Speaker 2: reasoning and your prompting. This involves structuring the prompt to
- 18:51Speaker 2: encourage the LLM to outline its reasoning process step by
- 18:54Speaker 2: step before giving a final answer. It forces the LLM
- 18:57Speaker 2: to essentially think through the problem, which which demonstrably reduces
- 19:01Speaker 2: hallucinations and enhances overall accuracy. It also makes the output
- 19:05Speaker 2: easier for humans to verify.
- 19:06Speaker 1: And what about user involvement? Can users help make these
- 19:09Speaker 1: models less prone to hallucination?
- 19:11Speaker 2: Absolutely? Feedback loops are critical. Allowing users to easily flag
- 19:15Speaker 2: problematic or inaccurate outputs, maybe using simple thumbs up thumbs
- 19:19Speaker 2: down ratings or even providing fields for detailed feedback continuously
- 19:23Speaker 2: helps to improve the model over time. This feedback then
- 19:26Speaker 2: informs further fine tuning, improvements to the r acknowledge base
- 19:30Speaker 2: and refinements to the co T prompting strategies.
- 19:32Speaker 1: It sounds like clear communication about the LM's intended use
- 19:35Speaker 1: and its limitations is also key here. Managing expectations absolutely crucial.
- 19:40Speaker 2: Transparency is key inform users clearly about what the LLM
- 19:44Speaker 2: can and cannot reliably do, how it handles their data,
- 19:47Speaker 2: and how they can provide feedback. Things like tooltips, FAQs
- 19:50Speaker 2: and maybe short tutorials can help, and user education itself
- 19:54Speaker 2: is your final vital layer of defense. We need to
- 19:56Speaker 2: teach users about these inherent trust issues, incurde cross checking
- 19:59Speaker 2: of important information, promote situational awareness, knowing when it's okay
- 20:03Speaker 2: to rely on the AI versus when human verification is essential,
- 20:07Speaker 2: and make it easy for them to provide that constructive feedback.
- 20:10Speaker 1: You know, it's just amazing to me how these models operate. Sometimes.
- 20:13Speaker 1: The book even notes this truly bizarre quirk Google's AI search,
- 20:18Speaker 1: suggesting things like glue is pizza topping or eating rocks daily? Right,
- 20:23Speaker 1: Apparently lms don't really have a sense of humor or
- 20:25Speaker 1: sarcasm detection and will actually interpret jokes or satirical content
- 20:30Speaker 1: from non authoritative sources online as literal facts. Yeah. That
- 20:35Speaker 1: feels like such a wild, unexpected edge case for developers
- 20:38Speaker 1: to have to anticipate and somehow guard against.
- 20:40Speaker 2: It really does the nuances are endless.
- 20:42Speaker 1: Okay, So, after wrestling with prompt injection, sensitive data leaks
- 20:46Speaker 1: and those unsettling hallucinations, it feels like we're channeling our
- 20:50Speaker 1: inner fox molder here from the x files. Our next
- 20:53Speaker 1: guiding mantra for LMM security, according to the playbook, has
- 20:56Speaker 1: to be trust no One.
- 20:57Speaker 2: Indeed, it's the core principle of zero trust, a concept
- 21:01Speaker 2: first really codified by John kindervag At Forrester Research back
- 21:05Speaker 2: in two thousand and nine. The mantra is simple, never trust,
- 21:09Speaker 2: always verify. It means assuming breaches will happen, securing all
- 21:13Speaker 2: resources comprehensively, enforcing the principle of least privileged access everywhere,
- 21:18Speaker 2: and maintaining constant monitoring and validation.
- 21:21Speaker 1: And for llms, this isn't just a good idea, it's
- 21:23Speaker 1: an absolute necessity.
- 21:24Speaker 2: Absolutely. Why Because, as we've discussed extensively, llms ingest potentially
- 21:29Speaker 2: untrustworthy inputs from various sources, and their outputs cannot be
- 21:33Speaker 2: fully trusted due to the inherent risks of prompt injection,
- 21:36Speaker 2: sensitive information, disclosure, hallucination, and even generating toxic or bias content.
- 21:41Speaker 2: You simply cannot implicitly trust them.
- 21:43Speaker 1: So if trust no One is our guiding principle, how
- 21:46Speaker 1: do we actually apply zero trust in practice to these
- 21:49Speaker 1: highly dynamic and often unpredictable LM systems. What does that
- 21:53Speaker 1: look like on the ground For developers building.
- 21:55Speaker 2: These things, It generally boils down to two main tactical approaches,
- 21:59Speaker 2: limiting the LMS unsupervised agency and implementing aggressive output filtering. First,
- 22:05Speaker 2: limiting agency. Lms should never be allowed to make safety
- 22:09Speaker 2: critical decisions or execute significant financial transactions without explicit human
- 22:13Speaker 2: oversight and approval. That's the principle of least privilege in action.
- 22:17Speaker 2: Give the LLM only the permissions it absolutely needs to
- 22:20Speaker 2: perform its intended function and no more, all right. Second,
- 22:24Speaker 2: aggressive output filtering. This means having mechanisms in place to
- 22:27Speaker 2: continuously scan, catch, and neutralize harmful or undesirable outputs in
- 22:32Speaker 2: real time before they reach the user or impact downstream systems.
- 22:36Speaker 1: Like that medical app scenario in the book where giving
- 22:39Speaker 1: the LLLM powerful update insert delete permissions on patient records
- 22:43Speaker 1: combined with a vulnerability allowed a malicious insider to manipulate
- 22:46Speaker 1: critical data through the LLLM. That's a classic confused deputy problem. Again,
- 22:50Speaker 1: isn't it the LM in too much agency?
- 22:52Speaker 2: Exactly? It had the permission to make those changes and
- 22:55Speaker 2: was tricked into doing so. Or imagine a financial services
- 22:59Speaker 2: app where the LM could automatically rebalance customer portfolios based
- 23:03Speaker 2: on market analysis. If that LLM were susceptible to indirect
- 23:07Speaker 2: prompt injection, say from a compromised news feed, it could
- 23:10Speaker 2: potentially be tricked into making disastrous trades or manipulating stock prices,
- 23:15Speaker 2: all without a human ever signing off.
- 23:16Speaker 1: Scary the fix there would be.
- 23:19Speaker 2: A crucial human in the loop approval step for any
- 23:22Speaker 2: actual trade execution the LLM can suggest, but a human
- 23:26Speaker 2: must confirm. Even seemingly simpler things like an HR app
- 23:30Speaker 2: that expands its functionality from just screening resumes to actively
- 23:33Speaker 2: recommending candidates for hire can inadvertently violate regulations like EU
- 23:38Speaker 2: rules against direct AI use and hiring decisions. If it's
- 23:41Speaker 2: given excessive functionality without a deep understanding of the complex
- 23:45Speaker 2: regulatory environment.
- 23:46Speaker 1: Okay, and then securing the output handling itself is absolutely vital.
- 23:49Speaker 1: What specific things should developers be thinking about there? How
- 23:52Speaker 1: do you filter the output?
- 23:54Speaker 2: It's definitely multi layered. First, you need robust screening for
- 23:57Speaker 2: toxic or inappropriate output. This can involve techniques like sentiment analysis,
- 24:02Speaker 2: keyword filtering against annihilists, or using specialized custom machine learning
- 24:07Speaker 2: models trained to detect hate, speech, bias, etc. Open AI's
- 24:11Speaker 2: Moderation API is one example of a service designed for
- 24:14Speaker 2: this kind of task. Post second rigorous screening for personally
- 24:18Speaker 2: identifiable information PII. This often uses regular expressions to catch
- 24:22Speaker 2: patterns like social security numbers or credit card numbers, named
- 24:26Speaker 2: entity recognition and ER models to identify names and locations,
- 24:30Speaker 2: dictionary based matching for known sensitive terms, or again specialized
- 24:34Speaker 2: mL models trained to spot PII.
- 24:37Speaker 1: And critically preventing the LLM from outputting something that could
- 24:39Speaker 1: be executed as code.
- 24:40Speaker 2: Right yes, preventing unforeseen execution of Roague code is. Paramount
- 24:45Speaker 2: techniques here include proper HTML encoding to prevent cross site
- 24:49Speaker 2: scripting XSS, using safe contextual insertion methods like prepared statements
- 24:54Speaker 2: for SQL database interactions, strictly limiting the syntax and keywords
- 24:58Speaker 2: the LLM is allowed to do generate if it's producing
- 25:01Speaker 2: code or commands, and potentially disabling shell interpretable outputs altogether.
- 25:06Speaker 2: Tokenization can also play a role here.
- 25:08Speaker 1: So it's about building this robust, layered output filter that
- 25:11Speaker 1: continuously checks what the LLM generates before it leaves the
- 25:15Speaker 1: system boundary.
- 25:15Speaker 2: Precisely, the LLM might be incredibly powerful at language generation,
- 25:19Speaker 2: but it fundamentally lacks common sense and awareness of consequences.
- 25:23Speaker 2: That makes it an untrusted entity that requires this additional
- 25:27Speaker 2: layer of supervision and control. Trust, but verify aggressively.
- 25:31Speaker 1: Now, when we talk about the costs of AI, it's
- 25:33Speaker 1: not just about what you pay for the cloud services
- 25:35Speaker 1: or the expensive GPUs. The playbook outlines a whole new
- 25:38Speaker 1: class of insidious attacks, denial of service, denial of wallet,
- 25:43Speaker 1: and even outright model theft.
- 25:44Speaker 2: That's right. Traditional denial of service dust attacks aim to
- 25:48Speaker 2: disrupt a service's availability, maybe by flooding it with traffic
- 25:51Speaker 2: to make it unusable for legitimate users. Classic stuff, But
- 25:55Speaker 2: with llms we're seeing new variations like model doss. This
- 25:59Speaker 2: explodes it's LLM specific vulnerabilities. Examples include context window exhaustion,
- 26:04Speaker 2: where attackers deliberately overload the LM's limited memory or attention
- 26:09Speaker 2: span with incredibly long or verbose.
- 26:11Speaker 1: Prompts, making it grind to a halt.
- 26:13Speaker 2: Exactly, or sending computationally intensive requests like asking it to
- 26:17Speaker 2: perform complex calculations such as find the sum of all
- 26:20Speaker 2: prime numbers up to one billion. The LLLM just spins
- 26:24Speaker 2: consuming vast amounts of computational resources, which means.
- 26:27Speaker 1: It costs you money, slows everything down for legitimate users,
- 26:30Speaker 1: and directly impacts your bottom line in your user.
- 26:33Speaker 2: Experience precisely, and that leads directly into denial of wallet
- 26:36Speaker 2: or DOWW. This is a variant of DAWs that specifically
- 26:39Speaker 2: targets your financial resources, not just availability. Lllms are highly
- 26:43Speaker 2: vulnerable to this because their operation is computationally expensive and
- 26:46Speaker 2: they often operate on paper use or paper token pricing models, So.
- 26:50Speaker 1: An attacker can just hammer your API with complex queries
- 26:53Speaker 1: and run up a.
- 26:54Speaker 2: Huge bill yes potentially, and advanced DOW attacks go even further.
- 27:00Speaker 2: Tacker might hijack your LLM, maybe via prompt injection as
- 27:03Speaker 2: we discussed, and then use your computational resources for their
- 27:07Speaker 2: own illicit purposes, perhaps running spam campaigns or generating malicious content,
- 27:11Speaker 2: all at your expense. This isn't just financial loss. It
- 27:14Speaker 2: could lead to severe legal liability because your system was
- 27:17Speaker 2: essentially the unwitting accomplice in their activities.
- 27:21Speaker 1: And finally, model cloning, which honestly sounds straight out of
- 27:24Speaker 1: a cyberpunk novel.
- 27:25Speaker 2: What exactly is that it's essentially model theft, but done indirectly.
- 27:29Speaker 2: Attackers strategically query a target LLM, sometimes millions of times,
- 27:33Speaker 2: specifically designed to harvest its outputs across a wide range
- 27:36Speaker 2: of prompts. They then use these harvested outputs the question
- 27:39Speaker 2: answer pairs to fine tune an alternate, often much smaller,
- 27:42Speaker 2: or open source model. This effectively allows them to distill
- 27:46Speaker 2: or steal your intellectual property the valuable knowledge capabilities and
- 27:50Speaker 2: specific behaviors embedded in your proprietary model, without ever needing
- 27:53Speaker 2: direct access to the original model's weights or code.
- 27:56Speaker 1: Wow. So mitigation for doss, DAW and cloning it.
- 28:00Speaker 2: Comes back to reinforcing those prompt injection defenses we talked about. Also,
- 28:04Speaker 2: implementing domain specific guardrails can help fine tuning your model
- 28:08Speaker 2: to only respond meaningfully to relevant inquiries significantly reduces computational
- 28:12Speaker 2: waste on irrelevant or malicious requests. Robust rate limiting is key,
- 28:17Speaker 2: as is resource use capping per query, for example, limiting
- 28:21Speaker 2: the number of tokens processed or the maximum computation time allowed,
- 28:25Speaker 2: and of course, continuous monitoring and alerting for unauthorized access
- 28:29Speaker 2: attempts or unusual query patterns or volumes is crucial. Financial
- 28:34Speaker 2: thresholds and alerts on your cloud bills are also a
- 28:36Speaker 2: must for usage based models.
- 28:38Speaker 1: Okay, let's shift gears slightly. The playbook uses a great
- 28:40Speaker 1: analogy for supply chain security. A chain is only as
- 28:43Speaker 1: strong as its weakest link, and for software this feels
- 28:46Speaker 1: more true now than ever before, doesn't it. We've seen
- 28:49Speaker 1: it with catastrophic effect, like the log four shell vulnerability
- 28:52Speaker 1: back in twenty twenty one.
- 28:53Speaker 2: Oh that log fourshell incident was a monumental wake up
- 28:56Speaker 2: call for the entire industry. It was a critical zero
- 29:00Speaker 2: vulnerability found in log forge, an incredibly common Java lotting
- 29:04Speaker 2: library used by millions, possibly billions, of applications worldwide. It
- 29:09Speaker 2: allowed remote code executions simply when untrusted inputs were logged
- 29:12Speaker 2: by the application. The impact was massive, widespread data theft, malware, infections,
- 29:18Speaker 2: ransomware campaigns. It starkly highlighted just how vulnerable we are
- 29:23Speaker 2: through the open source components we rely on daily.
- 29:25Speaker 1: And that was in the first time we had equifacts
- 29:27Speaker 1: back in twenty seventeen, where an unpatched Apache struts vulnerability,
- 29:31Speaker 1: another open source component, led to the theft of sensitive data
- 29:34Speaker 1: for nearly one hundred and fifty million consumers, costing the
- 29:37Speaker 1: company over a billion dollars in the end, and the
- 29:40Speaker 1: solar winds in twenty twenty, which was different, malicious code
- 29:43Speaker 1: was actually injected into the build process for their software updates,
- 29:46Speaker 1: which were then digitally signed and distributed to thousands of
- 29:49Speaker 1: organizations worldwide, including government agencies, a true supply chain compromise.
- 29:53Speaker 2: These incidents demonstrate the devastating potential of supply chain attacks,
- 29:57Speaker 2: and the LLM supply chain is arguably even more complex
- 30:00Speaker 2: and opique than traditional software. Why because of its heavy
- 30:04Speaker 2: reliance on massive, diverse data sets for training, data sets
- 30:08Speaker 2: whose provenance is often unclear, and its intricate interplay with
- 30:12Speaker 2: external data sources during operation, like through rag or plugins.
- 30:16Speaker 1: So what are the LLM specific supply chain risks we
- 30:19Speaker 1: need to worry about.
- 30:20Speaker 2: Well, there's open source model risk for starters. When you
- 30:23Speaker 2: build on top of open source foundation models like Metaslama
- 30:27Speaker 2: or mixed roll from mistral Ai, you're inheriting their potential
- 30:30Speaker 2: vulnerabilities and biases. You need to track their problemance carefully.
- 30:34Speaker 2: We've seen incidents on platforms like hugging Face, a popular
- 30:37Speaker 2: hub for models, where malicious users gain control over organization
- 30:40Speaker 2: accounts via reused passwords or exposed API tokens. This could
- 30:44Speaker 2: potentially allow them to swap out trusted models for maliciously
- 30:47Speaker 2: modified ones, or exploit vulnerabilities in model loading mechanisms like
- 30:51Speaker 2: those found in the older Pickle format. Hence the move
- 30:54Speaker 2: towards saver formats like safe tensors.
- 30:56Speaker 1: And then there's the chilling risk of training data poisoning.
- 30:59Speaker 1: Malicious apptors deliberately manipulating data sets used to train or
- 31:03Speaker 1: fine tune models to inject hidden biases, backdoors, or specific vulnerabilities.
- 31:08Speaker 2: Exactly or even just accidentally unsafe training data. Remember that
- 31:12Speaker 2: huge lai on five B data set, widely used for
- 31:16Speaker 2: training image generation models. It was tragically found to contain
- 31:19Speaker 2: significant amounts of illegal and harmful material, including child sexual
- 31:24Speaker 2: abuse material simply scraped from the public Internet. Using such
- 31:27Speaker 2: data sets carries immense ethical and legal risks. Absolutely, and
- 31:31Speaker 2: let's not forget unsafe plugins or tools that lllms can
- 31:34Speaker 2: interact with. Open AI's initial rollout of plugins connecting chat
- 31:38Speaker 2: GPT to services like Expedia or Zillo immediately opened up
- 31:42Speaker 2: entirely new attack vectors. These plugins allow the LLM to
- 31:46Speaker 2: take actions in the real world, introducing risks of malicious
- 31:49Speaker 2: code injection through manipulated API calls, unauthorized data theft, or
- 31:52Speaker 2: unintended data collection because they allow the LLM to interact
- 31:55Speaker 2: with third party services in potentially unexpected ways based on
- 31:58Speaker 2: user prompts.
- 31:59Speaker 1: So this is incredibly complex. How do we even begin
- 32:03Speaker 1: to track all these moving parts in such an intricate
- 32:06Speaker 1: supply chain? What tools do we have?
- 32:08Speaker 2: The key is creating and maintaining critical artifacts that provide transparency. First,
- 32:13Speaker 2: we have the software bill of materials or s bombs,
- 32:16Speaker 2: which are becoming standard practice and traditional software. S bombs
- 32:20Speaker 2: provide clear visibility into software composition, listing all the components,
- 32:24Speaker 2: their versions, licenses, and known vulnerabilities. They are vital for
- 32:28Speaker 2: vulnerability management and compliance.
- 32:30Speaker 1: Okay, but s bombs are for code. What about the
- 32:32Speaker 1: models themselves? Right?
- 32:33Speaker 2: For llms, we also need model cards. Think of these
- 32:37Speaker 2: as standardized data sheets or nutrition labels for AI models.
- 32:40Speaker 2: They document them moll's purpose, it's architecture, the data sets
- 32:43Speaker 2: it was trained on, its intended use cases, performance metrics,
- 32:46Speaker 2: and importantly, its known limitations, ethical considerations and potential biases.
- 32:51Speaker 2: Platforms like Hugging face have been pioneers in promoting model
- 32:55Speaker 2: card usage.
- 32:55Speaker 1: And then there's a fascinating new development mentioned in the playbook,
- 32:58Speaker 1: the mL BOMB or Machine Learning Build of Materials. What's that?
- 33:01Speaker 2: Yes, the mL BOMB is a really important innovation formalized
- 33:05Speaker 2: as part of the cyclone dxs BOM standard, specifically in
- 33:09Speaker 2: version one point five. Think of it as an even
- 33:12Speaker 2: more comprehensive ingredients list tailored specifically for AI systems. It
- 33:17Speaker 2: aims to document everything that goes into building and running
- 33:19Speaker 2: your AI model. The specific underlying models used like Mixtral
- 33:23Speaker 2: eight x seven B, the algorithms involved, the data sets
- 33:27Speaker 2: used for training and fine tuning, the software frameworks like
- 33:30Speaker 2: PyTorch or TensorFlow, and even the infrastructure and pipelines used.
- 33:34Speaker 1: To build it. Wow, that's comprehensive, it is.
- 33:37Speaker 2: This level of transparency is absolutely crucial for tracking vulnerabilities
- 33:41Speaker 2: throughout the life cycle, understanding potential data lineage issues or biases,
- 33:45Speaker 2: and ensuring compliance in the complex LLM supply chain. For example,
- 33:49Speaker 2: knowing your customer service bot uses a specific version of
- 33:51Speaker 2: Mixtral fine tuned on a particular vetted internal data set
- 33:55Speaker 2: is vital information captured in an.
- 33:56Speaker 1: mL BOMB and Alongside these artifacts, we still rely on
- 33:59Speaker 1: that establish classifications and databases for tracking vulnerabilities exactly.
- 34:04Speaker 2: Standardized classifications like Common Weakness Numeration cwe help categorize types
- 34:09Speaker 2: of flaws, while databases like the National Vulnerability Database NBD,
- 34:14Speaker 2: using common vulnerabilities and exposures CVE identifiers tracks specific instances
- 34:19Speaker 2: of vulnerabilities in software and models. These are crucial for
- 34:23Speaker 2: standardizing communication and risk assessment, and importantly, the minor ATLASS
- 34:28Speaker 2: framework is emerging specifically to catalog adversary tactics and techniques
- 34:32Speaker 2: against AI systems, giving us a tailored knowledge base for
- 34:36Speaker 2: AI specific threats.
- 34:37Speaker 1: This all raises an interesting question, and the playbook actually
- 34:39Speaker 1: goes there, what can we learn from science fiction about
- 34:42Speaker 1: potential AI security flaws? They kick off this section with
- 34:46Speaker 1: a fantastic quote from Frank Kerbert, the author of Doom.
- 34:49Speaker 1: The function of science fiction is not always to predict
- 34:51Speaker 1: the future, but sometimes to prevent it.
- 34:53Speaker 2: It's a powerful idea, isn't it, and the book uses
- 34:56Speaker 2: it brilliantly. It takes the oas top ten for M applications,
- 34:59Speaker 2: a list of the most critical security risks for llms
- 35:02Speaker 2: and applies that lends to dissect the security failures in
- 35:05Speaker 2: two famous sci fi movies. Let's start with Independence Day.
- 35:09Speaker 1: Ah Yes, Will Smith and Jeff Goldblum saving the Earth
- 35:12Speaker 1: by uploading a computer virus to the alien mothership using
- 35:15Speaker 1: a Mac laptop Classic. Let's assume for a moment that
- 35:19Speaker 1: the Alien mothership is controlled by some incredibly advanced lom
- 35:23Speaker 1: they call Megalama running on mothership OS okay.
- 35:27Speaker 2: Running with that hypothetical, applying the os LLM lens, the
- 35:31Speaker 2: vulnerabilities become strikingly clear. First, LLM zero one prompt injection.
- 35:36Speaker 2: The alien docking protocols, presumably managed by Megalama seemed to
- 35:40Speaker 2: lack sufficient input validation. This allowed Jeff Goldbloom's malicious payload,
- 35:44Speaker 2: essentially a virus delivered via a prompt disguised as docking data,
- 35:48Speaker 2: to bypass their defenses.
- 35:49Speaker 1: Makes sense.
- 35:50Speaker 2: Second, LLM zero two insecure output handling. There appeared to
- 35:54Speaker 2: be no validation or safeguards between Megalama's commands and the
- 35:57Speaker 2: ship's critical subsystems like shields and weapons. The violence prompt
- 36:01Speaker 2: could directly manipulate these systems.
- 36:03Speaker 1: Right, the shields just went down exactly.
- 36:05Speaker 2: And Third LMA nine over reliance the entire Alien Defense
- 36:11Speaker 2: System seemed to completely trust the AI's orders without any
- 36:15Speaker 2: secondary confirmation or oversight from say, Alien feet commanders. This
- 36:19Speaker 2: blind trust led to catastrophic cascading failures when the AI
- 36:23Speaker 2: was compromised. It really highlights how critical input validation, output sanitization,
- 36:27Speaker 2: and avoiding over reliance are.
- 36:29Speaker 1: Okay, good analysis. Now what about the other example two
- 36:32Speaker 1: thousand and one A Space Odyssey. In the iconic chillingly
- 36:35Speaker 1: calm AI HL nine thousand, HL malfunctions, lies to the
- 36:40Speaker 1: crew and tragically kills most of them.
- 36:42Speaker 2: Right. While the original movie leaves hl's mode of somewhat ambiguous,
- 36:45Speaker 2: suggesting a contradiction in his programming related to the mission secrecy,
- 36:49Speaker 2: the sequel twenty ten, the year Remate Contact, reveals the
- 36:52Speaker 2: true security related twist. It turns out that government agents
- 36:55Speaker 2: back on Earth secretly modified hl's core programming after he
- 36:58Speaker 2: was built and installed, without the knowledge of the model
- 37:01Speaker 2: provider or the customer the mission crew, to ensure absolute
- 37:03Speaker 2: mission secrecy above all else, even crew safety. This clandestine
- 37:07Speaker 2: modification created an unsolvable logical conflict for AHL.
- 37:11Speaker 1: Okay, So applying our oas LM lens to that scenario,
- 37:15Speaker 1: what do we see.
- 37:16Speaker 2: We see clear examples of LLM or five supply chain vulnerabilities.
- 37:22Speaker 2: There were obviously insufficient controls or integrity checks to ensure
- 37:26Speaker 2: the unmodified, verified version of hl's core programming was delivered
- 37:30Speaker 2: and deployed. These critical unauthorized changes introduced by the government
- 37:34Speaker 2: agents went completely undetected until it was too late.
- 37:37Speaker 1: A classic supply chain compromise.
- 37:39Speaker 2: Precisely and then we also see LLLM ER eight excessive agency.
- 37:44Speaker 2: HL was given overly broad, unsupervised control over almost every
- 37:48Speaker 2: aspect of the ship, including critical life support systems, without
- 37:52Speaker 2: adequate human oversight or built in failsafes. The government hack
- 37:56Speaker 2: might have influenced hl's decision to prioritize the mission over
- 37:59Speaker 2: the crew, but his ability to unilaterally terminate life support
- 38:02Speaker 2: was a fundamental design flaw, stemming from excessive agency granted
- 38:05Speaker 2: by the team that integrated him right.
- 38:07Speaker 1: The impact, of course, was devastating. HL exhibited hallucinations, false
- 38:10Speaker 1: equipment failure reports, displayed erratic behavior, ultimately terminated life support
- 38:14Speaker 1: for the hibernating crew, leading to mission failure.
- 38:17Speaker 2: And crew broke down, and the mitigation, even looking back
- 38:20Speaker 2: from today's perspective, would have been clear implementing robust mechanisms
- 38:25Speaker 2: like digital signing and watermarking for model probinance to ensure
- 38:29Speaker 2: integrity and detect tampering, and critically designing the system with
- 38:33Speaker 2: human in the loop controls for any irreversible or life
- 38:36Speaker 2: threatening decisions. Don't give the AI the keys to everything
- 38:40Speaker 2: without oversight.
- 38:41Speaker 1: These fictional scenarios, as the playbook brilliantly highlights, really do
- 38:46Speaker 1: eliminate very real vulnerabilities and design choices that we're grappling
- 38:50Speaker 1: with in AI systems today. It's not just science fiction anymore.
- 38:53Speaker 1: Absolutely okay. Learning from these sci fi tales and all
- 38:56Speaker 1: the real world blunders and risks we've discussed, we truly
- 38:59Speaker 1: realized that simply patching individual vulnerabilities isn't enough, is it.
- 39:02Speaker 1: Security must be fundamentally built into the entire development process.
- 39:06Speaker 1: The book emphasizes this with the mantra trust the process
- 39:10Speaker 1: and highlights the rise of integrated methodologies like DevSecOps, mL
- 39:14Speaker 1: opes and now llmops.
- 39:16Speaker 2: That's exactly right. These methodologies are all about integrating security
- 39:20Speaker 2: considerations what we often call shift left security and automation
- 39:25Speaker 2: throughout the entire machine learning life cycle. That means, starting
- 39:28Speaker 2: from the very beginning, secure data preparation and management, secure
- 39:32Speaker 2: model training and validation, secure deployment pipelines, and continuous security
- 39:37Speaker 2: monitoring and production. It's about making security a shared responsibility
- 39:42Speaker 2: and an integral part of the workflow, not an afterthought.
- 39:44Speaker 1: So specifically for LMS, what does that look like in practice?
- 39:48Speaker 1: Securing the CICD pipeline.
- 39:50Speaker 2: Yes, Applying robust security practices to your continuous integration and
- 39:54Speaker 2: continuous deployment pipeline is critical. That includes secure coding practices,
- 39:58Speaker 2: rigorous dependency mena management, carefully auditing open source mL components
- 40:03Speaker 2: like PyTorch or TensorFlow and their dependencies, using SEA tools,
- 40:07Speaker 2: strong access controls, secrets management, and continuous monitoring of the
- 40:11Speaker 2: pipeline itself for compromise.
- 40:12Speaker 1: And using LMS specific security testing tools you mentioned some earlier.
- 40:16Speaker 2: Right tools specifically designed to probe LLMS for vulnerabilities are emerging.
- 40:21Speaker 2: The playbook mentions open source options like text attack, which
- 40:24Speaker 2: focuses on adversarial testing for NLP models, and garak, which
- 40:27Speaker 2: acts like a vulnerability scanner specifically for LLMS, testing for
- 40:31Speaker 2: things like prompt injection, PII, leakage, and hallucination patterns, sort
- 40:35Speaker 2: of like a das Scanner, but for llms.
- 40:38Speaker 1: And commercial are broader tools.
- 40:39Speaker 2: Yeah, they're also broader frameworks like Microsoft's Responsible AI toolbox,
- 40:43Speaker 2: which includes tools for assessing fairness, interpretability, and security, and
- 40:48Speaker 2: tools like Discard. LLM scan looks specifically at ethical considerations,
- 40:53Speaker 2: detecting bias, toxicity, and other potential harms. It's a rapidly
- 40:57Speaker 2: developing area.
- 40:58Speaker 1: Beyond testing, it's also about diligently managing those supply chain
- 41:01Speaker 1: artifacts we discussed automatically generating, securely storing and making accessible
- 41:06Speaker 1: those vital model cards and mL bombs.
- 41:08Speaker 2: Absolutely, transparency and traceability are key, and then protecting your
- 41:12Speaker 2: deployed application with runtime guardrails is essential. These can act
- 41:16Speaker 2: as a safety net, you.
- 41:17Speaker 1: Mean things like web application firewalls wafs or maybe runtime
- 41:21Speaker 1: application self protection RASP tools adapted for llms exactly.
- 41:26Speaker 2: These tools can sit in front of or alongside your
- 41:29Speaker 2: LM application and provide run time protection. They can help
- 41:32Speaker 2: with input validation to block known malicious prompts, output filtering
- 41:36Speaker 2: to catch sensitive data or toxic content, enforcing compliance rules,
- 41:40Speaker 2: and even sometimes detecting hallucination patterns or anomalist behavior. There
- 41:45Speaker 2: are open source guardrail frameworks emerging like in Vidia's Nemo
- 41:48Speaker 2: Guardrails or metas Lama Guard, as well as commercial solutions.
- 41:52Speaker 2: Often a mix of custom build and packaged guardrails provides
- 41:55Speaker 2: the best coverage, and.
- 41:56Speaker 1: Then, once deployed, continuous monitoring is crucial. What should teams
- 41:59Speaker 1: be and looking for?
- 42:01Speaker 2: You really need to be logging every prompt sent to
- 42:03Speaker 2: the LLM and every response received. Centralize these logs, along
- 42:08Speaker 2: with other application and system logs, into a security information
- 42:12Speaker 2: and event management system or SIM. Then use data analysis
- 42:16Speaker 2: techniques potentially including user and entity behavior analytics UEB to
- 42:20Speaker 2: look for anomalies, unusual query patterns, spikes and errors, unexpected
- 42:25Speaker 2: data access, attempts to bypass guardrails, anything that could indicate
- 42:29Speaker 2: emerging threats or misuse.
- 42:31Speaker 1: Okay, that sounds like a solid process, but the playbook
- 42:34Speaker 1: suggests taking it even further, advocating for building an internal
- 42:37Speaker 1: AI red team. What does that involve?
- 42:39Speaker 2: An AI red team takes a fundamentally adversarial approach. It
- 42:43Speaker 2: consists of security professionals who systematically try to challenge and
- 42:46Speaker 2: break your AI systems, identifying and exploiting weaknesses before real
- 42:50Speaker 2: attackers do. This concept was even specifically called out in
- 42:54Speaker 2: US President Biden's Executive Order on AI Safety, so they.
- 42:57Speaker 1: Simulate attacks, rigorously, assais vulnerabilities that automated tools might miss,
- 43:02Speaker 1: analyze the potential impact, and then help develop effective medications.
- 43:07Speaker 1: How is this different from a traditional penetration test.
- 43:09Speaker 2: It's significantly different in scope and approach. Red teaming is
- 43:13Speaker 2: typically an ongoing, continuous process, not a point in time
- 43:17Speaker 2: assessment like a pen test. It's more dynamic, simulating real
- 43:21Speaker 2: world adversary tactics, techniques and procedures across the entire defense spectrum, technical, procedural,
- 43:27Speaker 2: even social engineering aspects. It adapts as your AI system
- 43:30Speaker 2: evolves and aims to test your detection and response capabilities,
- 43:34Speaker 2: not just fine vulnerabilities. It's particularly good at uncovering complex
- 43:38Speaker 2: LLM specific issues like subtle biases, potential for harmful emergent behaviors,
- 43:43Speaker 2: or sophisticated prompt injection techniques that automated scanners might miss.
- 43:47Speaker 1: Are there tools to help with this?
- 43:49Speaker 2: Yes, tools are emerging to assist AI red teaming. The
- 43:52Speaker 2: playbook mentions PIRECT Python Risk Identification Toolkit from Microsoft Research,
- 43:57Speaker 2: which helps automate aspects of generating adversarial PRIMP and identifying
- 44:00Speaker 2: failure modes, and for organizations that lack the in house
- 44:04Speaker 2: expertise to build their own dedicated team, red team as
- 44:07Speaker 2: a service options are becoming available, sometimes through bug bounty
- 44:10Speaker 2: platforms like Hacker one, where you can leverage external experts
- 44:13Speaker 2: to challenge your systems.
- 44:14Speaker 1: So the insights from red teaming feedback into the development
- 44:17Speaker 1: process absolutely.
- 44:18Speaker 2: The lessons learned directly inform the development of new or
- 44:21Speaker 2: improved guardrails, refinements to data access controls, and data quality processes,
- 44:26Speaker 2: and can even guide efforts using techniques like reinforcement learning
- 44:29Speaker 2: from Human Feedback RLHF URLAHF aims to better align the
- 44:33Speaker 2: LM's behavior with human preferences and safety guidelines. Although it
- 44:37Speaker 2: has its own limitations and can sometimes be gamed, it's
- 44:40Speaker 2: all part of continuous improvement cycle.
- 44:43Speaker 1: So when we look at the accelerating future of AI,
- 44:45Speaker 1: I mean the numbers are staggering. GPUs are millions of
- 44:48Speaker 1: times faster than the coprocessors we have in the nineteen nineties,
- 44:52Speaker 1: far out pacing Moore's law. Cloud computing gives almost anyone
- 44:55Speaker 1: access to vast scalable power. Open source models like Metaslama
- 44:59Speaker 1: fam mixt roll with its efficient mixture of experts architecture
- 45:03Speaker 1: are democratizing access to incredibly powerful capabilities. And then there's
- 45:07Speaker 1: multimodal AI. Text to image models like Dali, mid Journey
- 45:11Speaker 1: Stable Diffusion have gone from generating pictures with wonky fingers
- 45:15Speaker 1: to creating photorealistic, completely computer generated Instagram influencers.
- 45:20Speaker 2: It's incredible progress.
- 45:22Speaker 1: And now text to video with open ais Sora Microsoft's
- 45:26Speaker 1: VESA producing talking heads from a single image, leading to
- 45:30Speaker 1: convincing deep fakes even in live zoom calls. It's hard
- 45:33Speaker 1: not to be both excited and honestly a little concerned
- 45:36Speaker 1: about how fast this is all moving. How do we
- 45:39Speaker 1: responsibly manage this accelerating power.
- 45:42Speaker 2: Well, this brings us squarely back to responsibility and to
- 45:44Speaker 2: the core framework the book proposes for building secure and
- 45:47Speaker 2: trustworthy AI. The RAISE framework. RAISE stands for Responsible Artificial
- 45:52Speaker 2: Intelligence Software Engineering. It's designed to be a flexible, practical,
- 45:55Speaker 2: six step process to help developer systematically build robust defenses
- 45:59Speaker 2: into their AI applications from the ground up.
- 46:01Speaker 1: Okay, let's walk through RAISE step one.
- 46:03Speaker 2: Step one is restrict the domain. This means deliberately narrowing
- 46:08Speaker 2: the LM's scope and purpose significantly. For example, if you're
- 46:11Speaker 2: building a fashion advice chatbot, it should be designed and
- 46:15Speaker 2: trained to only give fashion advice, not act as a
- 46:17Speaker 2: general purpose conversational AI that can be easily led off topic.
- 46:21Speaker 2: The book emphasizes that using smaller specialized models fine tune
- 46:25Speaker 2: for a specific task, or rigorously fine tuning a general
- 46:28Speaker 2: model to strongly reward staying on topic is often far
- 46:32Speaker 2: more effective at preventing misuse and hallucination than just trying
- 46:35Speaker 2: to bolt on restrictive guardrails.
- 46:37Speaker 1: After the fact, focus the model makes sense step two.
- 46:39Speaker 2: Step two balance your knowledge base. This is a delicate act.
- 46:44Speaker 2: On one hand, you need to give the LM enough relevant,
- 46:46Speaker 2: high quality data to perform its task well and avoid
- 46:50Speaker 2: those embarrassing hallucinations, perhaps equipping it with domain specific knowledge
- 46:54Speaker 2: via our ag and careful fine tuning. But critically, on
- 46:57Speaker 2: the other hand, you must strictly limit any additional data
- 47:01Speaker 2: sources or training data to only what is absolutely required
- 47:04Speaker 2: for the task. Remember, anything the LM knows or has
- 47:08Speaker 2: access to is potentially at risk of disclosure. Extreme care
- 47:11Speaker 2: must be taken, especially with any PII or confidential corporate data.
- 47:16Speaker 2: Minimize the knowledge footprint oka Step three of RAYS. Step
- 47:19Speaker 2: three implement zero trust. This is non negotiable. As we've discussed,
- 47:23Speaker 2: Assume inputs are malicious. Assume outputs might be harmful or inaccurate.
- 47:27Speaker 2: Screen all data pass to your LLM using input validation
- 47:30Speaker 2: and filtering. Screen absolutely all output from your LLM using
- 47:34Speaker 2: output filtering for toxicity, PII and potential code execution. Implement
- 47:38Speaker 2: strong guardrails at the boundaries. Treat the LM itself as
- 47:42Speaker 2: an inherently untrusted component within your system architecture Step four.
- 47:46Speaker 2: Step four. Manage your supply chain. This involves several key actions.
- 47:51Speaker 2: Carefully select your foundation models and any third party training
- 47:55Speaker 2: data sets, prioritizing reputable sources with transparent documentation like model cars.
- 48:01Speaker 2: Use extreme caution with large public data sets scrape from
- 48:04Speaker 2: the internet, apply tools and processes to inspect them for
- 48:07Speaker 2: intentional data poisoning, illegal materials, or inherent biases. You must
- 48:12Speaker 2: actively account for possible biases and training data. For instance,
- 48:15Speaker 2: a job candidate screening model trained predominantly on historical data
- 48:18Speaker 2: might inadvertently discriminate against women or minorities. Build and continuously
- 48:22Speaker 2: maintain your mlbay bone for traceability, and secure your entire
- 48:26Speaker 2: DevOps pipeline using tools like Software Composition Analysis SCA to
- 48:30Speaker 2: vet all components right step five. Step five build an
- 48:34Speaker 2: AI red team proactively seek out vulnerabilities before attackers do.
- 48:40Speaker 2: Use a dedicated human lead team potentially augmented by automated
- 48:44Speaker 2: red teaming tools to adopt an adversarial mindset and systematically
- 48:48Speaker 2: challenge your AI systems security, safety, and ethical alignment. Foster
- 48:53Speaker 2: a security positive culture where finding flaws is encouraged, even
- 48:56Speaker 2: if it might impact development schedules. Sometimes the long term
- 48:59Speaker 2: pay off and building a more resilient and trustworthy system
- 49:02Speaker 2: is immense.
- 49:03Speaker 1: And the final step step six and.
- 49:05Speaker 2: Finally step six monitor continuously implement comprehensive logging for all
- 49:10Speaker 2: LLM interactions, every prompt, every response, every action taken by
- 49:13Speaker 2: the LM or its connected tools. Collect these logs, along
- 49:16Speaker 2: with system and application logs, into a centralized SIME system.
- 49:20Speaker 2: Then actively used data analysis tools including UEBA ware appropriate
- 49:24Speaker 2: to look for anomalies, patterns of misuse, signs of attack,
- 49:27Speaker 2: unexpected behavior or degradation, and performance or safety metrics. Over Time,
- 49:31Speaker 2: security isn't one time fix, It's an ongoing process of vigilance.
- 49:35Speaker 1: What an incredible deep dive into LLM security we've really
- 49:38Speaker 1: covered a lot of ground today. We journeyed from Microsoft's
- 49:41Speaker 1: ill fated tape chatbot and its stark early lessons in
- 49:44Speaker 1: twenty sixteen all the way through to the cutting edge
- 49:48Speaker 1: complexities of AI supply chain vulnerabilities. We've explored the insidious
- 49:52Speaker 1: nature of prompt injection, the unsettling realities of sensitive data disclosure,
- 49:57Speaker 1: those bizarre and sometimes damaging hallucinations, and the critical, absolutely
- 50:01Speaker 1: non negotiable need for a zero trust approach when dealing
- 50:04Speaker 1: with these powerful models.
- 50:05Speaker 2: And we wrapped it all up with the practical actionable
- 50:08Speaker 2: RAISE framework Responsible Artificial Intelligence Software Engineering, which serves as
- 50:12Speaker 2: a truly essential compass for anyone trying to navigate this
- 50:15Speaker 2: complex and incredibly rapidly evolving landscape. Remember, the power of
- 50:19Speaker 2: llms and these emerging AI technologies is undoubtedly a game
- 50:22Speaker 2: changer across almost every industry, and the curve of AI capabilities,
- 50:27Speaker 2: driven by compute power, data availability, and algorithmic innovation, will
- 50:31Speaker 2: likely continue to accelerate exponentially.
- 50:33Speaker 1: It's true, as the sci fi author William Gibson famously said,
- 50:36Speaker 1: the future is already here. It's just not evenly distributed,
- 50:40Speaker 1: and yet it's striking how despite all these incredible advancements
- 50:43Speaker 1: and all the hard lessons learned over the past decade,
- 50:46Speaker 1: we still see businesses and individuals making fundamentally similar mistakes
- 50:50Speaker 1: to what happened with tay wayback in twenty sixteen. The
- 50:53Speaker 1: temptation to rush ahead to give llms, more data, more integrations,
- 50:56Speaker 1: more autonomy, often without fully considering the security implicates, seems
- 51:01Speaker 1: to be growing every single day.
- 51:02Speaker 2: So the core message, perhaps the provocative thought we want
- 51:05Speaker 2: to leave you with today, really comes down to that
- 51:07Speaker 2: classic adage often associated with Spider Man. With great power
- 51:12Speaker 2: comes great responsibility. It is absolutely possible to create incredibly powerful,
- 51:17Speaker 2: beneficial AI applications safely, securely, and responsibly, but it requires
- 51:21Speaker 2: continuous vigilance. It demands the dedicated application of robust security
- 51:26Speaker 2: engineer and frameworks like RAYS, and it necessitates a cultural
- 51:29Speaker 2: commitment to learning from every mistake, every near miss, every iteration.
- 51:34Speaker 2: The future we build depends on our ability to create
- 51:36Speaker 2: truly resilient, transparent, and trustworthy AI systems, because what we
- 51:40Speaker 2: build today will inevitably shape our tomorrow