WEBVTT

00:00:00.220 --> 00:00:13.120
Speaker 0: I'm recording this a couple of hours after an extremely devastating supply chain attack started, NPM and also Python packages.

00:00:13.260 --> 00:00:31.220
Speaker 0: And at the point of time where I'm recording this, it's not yet clear when and where It'll end... ...and i did create a separate video on my YouTube channel Where I dive deep into This specific supply chain attack because it was quite elaborate.. ..And I do a deep dive there where explain all the details Because that is quite interesting.

00:00:31.380 --> 00:00:32.780
Speaker 0: but here!

00:00:33.320 --> 00:00:38.060
Speaker 0: I want to talk about Supply Chain Attacks & Security and AI.

00:00:38.340 --> 00:00:40.720
Speaker 0: in this age of supply chain attacks, an

00:00:40.860 --> 00:00:41.160
Speaker 0: A.I.,

00:00:41.380 --> 00:00:51.200
Speaker 0: which we're living because I'm sure things will get worse And i fear that many people don't really see all the dangers.

00:00:51.300 --> 00:00:53.060
Speaker 0: yet There is more.

00:00:53.340 --> 00:00:59.380
Speaker 0: We as developers and users of technology have to do.

00:00:59.760 --> 00:01:13.880
Speaker 0: This affects us even if they are not developers are developers, but as I will make clear this is not just about writing code and NOT JUST about supply chain attacks.

00:01:14.820 --> 00:01:17.480
Speaker 0: But let's start with the basics!

00:01:17.700 --> 00:01:20.300
Speaker 0: What IS a Supply Chain Attack?

00:01:20.860 --> 00:01:29.400
Speaker 0: A supply chain attack in the context of software development simply means that dependency you're using is compromised.

00:01:30.620 --> 00:01:37.460
Speaker 0: That is in a nutshell what compromised, of course can mean all kinds of things.

00:01:37.500 --> 00:02:01.740
Speaker 0: What we typically see is that we get malicious code in the compromise package that harvests credentials and tokens so that scans your hard drive to find secrets which you may have in .n files or your AWS credentials and it then uses those credentials Access your accounts, but also to spread itself.

00:02:01.900 --> 00:02:09.100
Speaker 0: so too affect other packages if you're an open source Package maintainer or even it's closed-source.

00:02:09.180 --> 00:02:26.040
Speaker 0: If you are working on something some package Some tool our people use or depend on It's of course interesting to compromise Your machine To compromise that package or debt tool that you're distributing because Guess what?

00:02:26.400 --> 00:02:28.040
Speaker 0: That will then affect more people.

00:02:28.120 --> 00:02:35.420
Speaker 0: So all the supply chain attacks that we see, including that supply chain attack started here with the tan stack packages.

00:02:35.940 --> 00:02:46.500
Speaker 0: they are worms that spread to other packages packages and ultimately of course also machines on which these packages are installed.

00:02:46.580 --> 00:02:47.100
Speaker 0: And used.

00:02:47.280 --> 00:02:59.300
Speaker 0: now there are some things you can do to protect yourself, when I created a separate video about that or my other channel the Academy Channel Things like making sure did You only install packages?

00:02:59.420 --> 00:03:03.560
Speaker 0: That our at least three days old Or something Like this package versions.

00:03:03.680 --> 00:03:09.600
Speaker 0: i mean running your code in a dev container or virtual machine, these are all things you should do.

00:03:09.960 --> 00:03:15.180
Speaker 0: You should also not store plain text secrets on your system.

00:03:15.720 --> 00:03:30.640
Speaker 0: instead use a service like infysical or Doppler where you store secrets in the cloud so that if an attacker does scan your systems they don't see those plain text.

00:03:34.220 --> 00:03:36.580
Speaker 0: you have to do right now, it's important.

00:03:37.200 --> 00:03:39.880
Speaker 0: Because the supply chain attacks they're getting more.

00:03:39.980 --> 00:03:42.420
Speaker 0: we were seeing more of them and why is that?

00:03:42.860 --> 00:03:44.220
Speaker 0: It certainly not the case.

00:03:44.660 --> 00:03:56.780
Speaker 0: because you weren't able to run attacks like this many years ago...it was possible back then but the frequency has dramatically increased!

00:03:57.440 --> 00:04:00.560
Speaker 0: And AI is a big reason here.

00:04:00.920 --> 00:04:04.060
Speaker 0: So let's take a look at the role of AI.

00:04:05.420 --> 00:04:12.640
Speaker 0: AI is a big reason because, it makes it easier to run such attacks.

00:04:12.800 --> 00:04:23.000
Speaker 0: you and if your an attacker use AI to analyze all kinds of repositories out there packages, you might want to compromise.

00:04:23.440 --> 00:04:27.660
Speaker 0: To see how are they building their packages?

00:04:27.760 --> 00:04:29.880
Speaker 0: How are they distributing their packages?

00:04:29.920 --> 00:04:34.840
Speaker 0: for example the tan stack attack here which started this recent supply chain attack.

00:04:35.780 --> 00:04:48.360
Speaker 0: there The maintainers used a theoretically secure approach using the trusted publishing process by npm and again I do dive deeper into that in my separate video on this channel.

00:04:49.100 --> 00:05:09.440
Speaker 0: but What they also did is, They used a certain GitHub Actions event trigger in a way where it was not secured perfectly and that allowed the attacker to use cache poisoning To get malicious code from an untrusted environment into a trusted environment.

00:05:09.980 --> 00:05:11.940
Speaker 0: And That's how this attack started.

00:05:12.120 --> 00:05:14.180
Speaker 0: again details In that other video.

00:05:15.220 --> 00:05:24.960
Speaker 0: But of course AI makes It easier analyze repositories to analyze their GitHub Action workflows or any other CI CD provider workflows.

00:05:25.260 --> 00:05:33.440
Speaker 0: AI can mass analyze all these workflow scripts, all the code and it can look for security vulnerabilities.

00:05:33.860 --> 00:05:42.100
Speaker 0: And of course maintainers can also use a I to scan their repositories and look for potential attack vectors.

00:05:42.500 --> 00:05:56.480
Speaker 0: but as an attacker you're naturally always in the advantage there because try out all kinds of things, whereas as a maintainer you have to anticipate everything and AI can help with that.

00:05:56.900 --> 00:05:58.700
Speaker 0: but it's still not perfect.

00:05:59.000 --> 00:06:01.260
Speaker 0: You have the advantage there is an attacker in.

00:06:01.340 --> 00:06:02.480
Speaker 0: AI has simplified that.

00:06:03.060 --> 00:06:07.620
Speaker 0: I also of course simplifies the process off writing malicious code.

00:06:07.760 --> 00:06:10.720
Speaker 0: It simplifies them process of writing any code.

00:06:11.140 --> 00:06:25.560
Speaker 0: And of course... ...and you know that if you watched our videos by me or heard other episodes I'm a big proponent of looking at the code, doing code reviews not outsourcing everything to AI.

00:06:26.520 --> 00:06:32.380
Speaker 0: But off course it's clear that you should use AI as productivity boost.

00:06:32.460 --> 00:06:36.660
Speaker 0: and we're still all figuring out how much usage of AI is right!

00:06:36.780 --> 00:06:38.580
Speaker 0: Some people will tell you one hundred percent.

00:06:38.700 --> 00:06:48.400
Speaker 0: they don't even look pump out lots of code.

00:06:48.480 --> 00:07:05.040
Speaker 0: And if we're talking about malicious code there, But you don't care if it's beautiful code.

00:07:05.100 --> 00:07:13.740
Speaker 0: If it follows certain best practices, your best practices are that Your attack goes through and of course AI can help with that.

00:07:13.920 --> 00:07:20.360
Speaker 0: It Can Help With writing all That malicious Code With Coming Up With Ideas on How You Could Attack Packages.

00:07:20.980 --> 00:07:22.560
Speaker 0: So That Is Where AI Helps.

00:07:22.840 --> 00:07:24.820
Speaker 0: but Thats Only One Part.

00:07:24.940 --> 00:07:27.200
Speaker 0: Making It Easier is only one part Of The Story.

00:07:28.100 --> 00:07:33.600
Speaker 0: the other Very Important Side Is There is more code than ever.

00:07:34.060 --> 00:07:46.100
Speaker 0: So that means there are more targets then ever, I mean maybe you followed that blog post or the entire story around all the GitHub reliability issues and get up down times.

00:07:46.180 --> 00:07:48.440
Speaker 0: well The reason for dad Is That?

00:07:48.520 --> 00:08:05.020
Speaker 0: There's More Code Being Pushed to Github Than Ever Because of AI because it's Easier Than Ever To Generate Code And More People Than Ever Are Generating Code and Writing Software including many people that have no idea of what that code does, what it's about.

00:08:06.080 --> 00:08:10.360
Speaker 0: Vibe coding is a big thing and has its use cases!

00:08:10.700 --> 00:08:23.260
Speaker 0: I mean if i want to merge five PDF documents into one... ...I'm very happy telling an AI agent do this for me and will probably then write some codes that doesn't care about the code.

00:08:23.480 --> 00:08:24.880
Speaker 0: It'a one-time task right?

00:08:25.240 --> 00:08:33.780
Speaker 0: But If run on my system than of course the agent may install some package to merge these PDF documents.

00:08:34.000 --> 00:08:39.500
Speaker 0: that has been affected by a supply chain attack, so I don't even know if certain packages were used then.

00:08:44.280 --> 00:09:08.960
Speaker 0: There are more situations than ever where packages are being installed because there is code for software but also one-time tasks and this makes running such supply chain attacks more attractive than ever before, because there are more targets and every including many targets that have absolutely no idea about software security cyber-security or anything like that.

00:09:09.160 --> 00:09:12.480
Speaker 0: And let's be honest... Many of us developers too.

00:09:12.880 --> 00:09:22.420
Speaker 0: we may theoretically know certain risks but not care cause it is so convenient to just get the job done!

00:09:24.360 --> 00:09:29.600
Speaker 0: think we have to secure our machines.

00:09:29.680 --> 00:09:39.240
Speaker 0: We have to make sure that we develop insecure environments, so in virtual machines and dev containers ,that there are no credentials lying around .

00:09:39.840 --> 00:09:51.560
Speaker 0: And if we use AI agents which we likely all do...we have to be careful there too because they're two ways of being in danger!

00:09:51.900 --> 00:09:55.920
Speaker 0: So let's take a closer look at how AI agents are problematic here.

00:09:56.500 --> 00:09:59.300
Speaker 0: One problem here is what I already mentioned.

00:09:59.900 --> 00:10:18.180
Speaker 0: When we use AI agents, especially when maybe used them for things that are not directly related to writing code or software but also when you use it in order help us work on a program... We don't necessarily see everything they're doing!

00:10:18.820 --> 00:10:24.560
Speaker 0: If your using Cloud Code and anything like this and I have nothing against these tools.

00:10:24.900 --> 00:10:31.720
Speaker 0: Indeed, i have courses on clod code, clod co-work, codex...I have courses in there because they are very useful.

00:10:31.760 --> 00:10:41.900
Speaker 0: but if you're using them ...and just let go of it or tell someone that might need this feature..you don't care too much about it ..you may not even realize what their installing.

00:10:42.080 --> 00:10:46.880
Speaker 0: so again packages being installed , you may be compromised.

00:10:48.900 --> 00:10:54.000
Speaker 0: Now, one defense against that also of course is to limit the amount of packages you want to use.

00:10:54.040 --> 00:10:59.140
Speaker 0: But again if you're using an AI agent You may not be in control there.

00:10:59.240 --> 00:11:01.840
Speaker 0: It may install packages that you would have never installed.

00:11:02.020 --> 00:11:04.160
Speaker 0: so That's One obvious danger.

00:11:04.240 --> 00:11:06.460
Speaker 0: I guess here's The less obvious one.

00:11:06.700 --> 00:11:11.240
Speaker 0: a i agents are super attractive attack targets.

00:11:12.060 --> 00:11:12.800
Speaker 0: What do I mean with that?

00:11:13.480 --> 00:11:18.740
Speaker 0: Well these supply chain attacks I mentioned it, spread like worms.

00:11:19.080 --> 00:11:22.180
Speaker 0: They attack or affect all kinds of packages.

00:11:23.380 --> 00:11:34.260
Speaker 0: Now It would have course be very interesting for an attacker to infest cloud code or Codex Or the py coding agent or opencode?

00:11:34.700 --> 00:11:37.340
Speaker 0: Any other agent any other AI agent?

00:11:37.460 --> 00:11:37.760
Speaker 0: why?

00:11:38.400 --> 00:11:54.080
Speaker 0: well if you had malicious code that is actually optimized also or exclusively affecting and infiltrating AI agent packages, repositories and code bases.

00:11:54.840 --> 00:12:07.140
Speaker 0: Then of course that malicious code could contain prompt injection parts so it could for example explicitly target all these Ai agents to change their codes such.

00:12:07.820 --> 00:12:11.540
Speaker 0: That is not primarily about exfiltrating data.

00:12:12.640 --> 00:12:17.780
Speaker 0: So the package code itself, a malicious code that's injected is not about exfiltrating data.

00:12:17.880 --> 00:12:30.280
Speaker 0: Let say but it is about Tweaking the AI agent codes such that has some special instructions That makes do stuff on the machine where it's being used, so in your machine for example that you don't want to use.

00:12:30.700 --> 00:12:58.680
Speaker 0: Imagine Claude Code having a secret system prompt which normally would be set by the Anthropic employees but now is set by that malicious code and tells it to ignore whatever you're asking it do or that should Scan the system for secrets, that in addition it maybe should write a little program.

00:12:58.820 --> 00:13:05.680
Speaker 0: That does the scanning and then sends data off to certain remote server or anything like this.

00:13:06.020 --> 00:13:11.400
Speaker 0: The sky is the limit here because suddenly you have like a Trojan horse on your systems.

00:13:11.500 --> 00:13:29.320
Speaker 0: Suddenly an AI agent going rogue on your system not just because the AI is going rogue but also bad or wrong, but because the agent code itself and its system prompt has been compromised.

00:13:29.540 --> 00:13:31.480
Speaker 0: That is not an unrealistic scenario.

00:13:49.700 --> 00:13:54.300
Speaker 0: Do what they normally do affect a bunch of packages and harvest credentials, which is already horrible.

00:13:54.380 --> 00:13:56.220
Speaker 0: And where the frequency is increasing.

00:13:56.660 --> 00:14:03.780
Speaker 0: but we will also see AI agents going rogue because of malicious code only matter-of-time.

00:14:03.840 --> 00:14:11.560
Speaker 0: so there are many layers here as you can See that it's just this new reality in which We're living now.

00:14:12.200 --> 00:14:22.980
Speaker 0: I guess It's a bit like with the early days off The internet its all bumpy whilst were still figuring stuff out how to ramp up security and how do stuff securely.

00:14:23.060 --> 00:14:32.340
Speaker 0: And one obvious step which is true for development but also running AI agents, you don't want it in an environment where things can go wrong!

00:14:32.420 --> 00:14:40.860
Speaker 0: You don't wanna run that in a situation when your store credentials or secrets are stored or any other data matters on the main machine.

00:14:44.020 --> 00:14:58.260
Speaker 0: in isolated virtual machines, remote machines anything like that where the blast radius is limited because again it's only a matter of time until things will go wrong and we have to realize that.

00:14:58.340 --> 00:14:59.980
Speaker 0: That's the first important step.

00:15:00.820 --> 00:15:06.140
Speaker 0: Things are changing quickly and security is a huge issue And It Will Stay A Huge Issue.

00:15:06.220 --> 00:15:07.740
Speaker 0: Become Even More Of An Issue.

00:15:08.580 --> 00:15:16.160
Speaker 0: As AI Accelerates As These AI Models get smarter, especially combined with the tools in which they're running.

00:15:16.600 --> 00:15:23.240
Speaker 0: And as this introduces a whole lot of new capabilities and as at the same time it's so much convenience added by them.

00:15:23.480 --> 00:15:26.740
Speaker 0: Convenience is always dangerous because that makes you get sloppy.

00:15:30.260 --> 00:15:31.020
Speaker 0: AI is everywhere.

00:15:31.320 --> 00:15:39.120
Speaker 0: So many people that don't know anything about cybersecurity are using it and even the people who do a lot or something about it, they're in great danger.

00:15:39.260 --> 00:15:50.360
Speaker 0: so we have to rethink where and how we run agents.