AI Panel

DeFi Security Summit 2023 · 15 Jul 2023 · 39:07

Curtis Spencer of Electric Capital moderates a panel with Chris Hart of Civic Technologies, Liyi Zhou of D23E, Joe Van Loon of Auditware and Lucas Martin Calderon of Pentestify on how AI is used in security products. Panelists describe uses such as identity and bot detection, automated pen testing of deployed bytecode, AI assistance for auditors and detection of malicious transactions. They discuss what changed after ChatGPT, where models help and where they fall short, and what AI agents acting on a user's behalf mean for provenance and automated response.

Speakers

Topics

From DeFi Security Summit 2023, hosted by DeFi Security Summit.

Transcript

let's get this started hopefully lunch was delicious and people are uh well fed and ready for an intense AI panel here um so first off uh it'd be great if everyone could give a quick intro of who they are what they're working on and maybe a brief summary of how they're using AI today in their product I'll start with Chris test hey okay thank you my name is Chris Hart I'm the CEO at Civic Technologies Civic we've been actually in the crypto space since about 2015 working on blockchain based identity structures and so when I say that we do everything in the

identity space from identity verification we'll do document verification we'll do things like IP screens we also then do things that I think are particularly relevant to this discussion today around AI so we do a proof of liveness that can be used for things like civil protection bot protection Etc we also do things like uniqueness so uniqueness I think is particularly relevant for this AI talk on the one hand identifying who is human I.E proof of personhood and at the same time identifying who is not human you know

what kind of output is generated from bots so we work in a multi-chain wallet agnostic way we adhere to things like the w3c standards for decentralized identity we're a very uh I think broad-based play in terms of we're on multiple blockchains and we're really interested I think in the emergence of AI how identity can play a role I think identity is now sort of embedded into the crypto ecosystem but it needs to get embedded into the AI ecosystem as well so that's me amazing thank you so I am Lucas Martin cauldron founder and CEO of fantastify and I'm also building the co-founder of

web freesect.news I've logged in security newsletter probably you've heard of it um and what we do at pentacify is we focus on post-deployment security so we automatically detect smart contract vulnerabilities uh directly from the byte code once it's deployed we came however as a company as a firm we were an ethical hacking company at first we automated that process using AI so we were able to ethically pen test clients create the report uh have that develop that AI intuition to know which tools to use and that is exactly what for the past couple of years to three years we've been researching at the firm

and getting that software done which you will hopefully enjoy using great uh I'm Joe Van Loon CEO of auditware so we're building audit wizard which is an all-in-one smart contract auditing platform it's basically like an IDE with everything that an auditor auditor could want and things you don't even know that you do want so uh the way we use AI is uh you know we have a whole lot of tools that you can use to analyze code to manage your workflow to do threat modeling we integrate AI into all of that to help you kind of write your reports to reason

about the code to do threat modeling to help you write proof of Concepts so we're really focused on the aspects of AI that are not just you know trying to use AI to find vulnerabilities or to do audit work for you but how they can sort of Empower you as an auditor focusing on the things that AI is actually good at and then using other tools for things that it's not so good at hello my name is Lee from d23e decentralized intelligence I'm a co-founder there so our goal is to build the next generation of intrusion detection and prevention systems we are interested in how AI can enhance

these tools so two of two of our most recent research papers and one is on how effective auditing is and the other one is using large language model to detect malicious transactions great thanks for the background guys um so I think everyone kind of experienced like the chat gbt moment this year where you know I think underneath the surface a lot of people have been working on AI tools for years but this kind of brought it to the Forefront did this change like anything about your guys processes like when chat gbt came out where you're like oh we have to go back to the drawing board or was it you know business as usual uh I'll say for us that uh

we kind of when chat gbt came out uh it wasn't originally kind of a focus for us necessarily and it's something we kind of tried out of uh what if we kind of put this in our platform see what it can do and what is good at and and where it can kind of streamline things and we saw that there was um there's actually a lot of things that it that it is good at there's definitely some things it's not good at like if you just give it a contract and say audit this for me it's easy to kind of discount it and say like oh that's not really all that that useful but when you like break down to the the core components of you know when you're doing your own audit work what what can it be useful for and I think uh looking at

kind of developers and how they're leveraging it too um you know using it to as they code just write boilerplate we were thinking of well what's the boilerplate for for Auditors and where can we sort of streamline things and have that same empowerment for Auditors just like you know how developers are using it foreign was actually quite important as well to see uh kind of what the focal point of the llms were so every single AI of course has a huge bias and sometimes actually quite difficult to predict uh what that focal point is because it

convinces you that that answer is the right one instead of giving other Alternatives in other sense detecting the tunnel vision of the of the models that make up tatibility was actually fundamental to not only verify and reinforce the models that we were already using to make sure that nothing was overlapping and if it was overlapping of course to to check the quality and how much Assurance how much uh clashing there was but the speaking of the focal point and tunnel vision of the AI it actually gives you Clues to where the security flaws where the security vulnerability are going to be in the future because uh

definitely there might be Auditors in this space that use that tool to either check it or or enhance their work and once you Fable you've been able to identify what that tunnel vision is it is extremely easy to modify the parameters of the AI models that you currently use to specifically look for vulnerabilities in this space because something that you might have taken for granted using gbt or what the code that he normally produces in fact it is easily vulnerable if again if you find that focal point that it was trained on yeah I think from uh our perspective it

was kind of a watershed moment in a couple of ways um I think it's not unusual for technology to come on as AI has slowly slowly and then seemingly very quickly even if for many years the technology has been under development but what it did do was I think demonstrate a real shift in the Zeitgeist of how people are thinking about the possibilities of AI and in particular AI agents so there was a period of time where you know Chachi PT was clocking something like a 50 IQ now it's up at like 150 we started to see things emerge like the Tom Cruise deep fake and started to understand that there was going to be tooling that would

be able to spoof an identity and then suddenly that came this llm model and people were fascinated and I think started to dive in as I did and I'm sure everybody did to test it and it was you eerily good and I think that created questions in people's minds pretty quickly at first it was fascinating and amazing and then you reach this moment you're like wait a minute if faces can be spoofed if voices can be spoofed if llm models can get access to real-time data on the internet and you put all of that stuff together what is going to happen in terms of online information and online disinformation so from an identity perspective this has been a

really interesting time to live through I think we're just at the beginning of it there is going to be a need I think to regulate and put guard rails around some of this stuff it's very exciting I think people are in equal parts excited and terrified and probably you know some of that is is Justified on both sides I agree 100 on that did you did you have anything to add to yep so um for us I mean the first thing that changed for my for myself is I changed my bio from security researcher to prompt engineer um but as a company right I feel um this thing has definitely a great

potential for the future but there's also a lot of problems I find we do not thoroughly understand how effective and what's the cost um I think mainly because we are lacking like a very thorough Benchmark no matter is for auditing or it's for like um finding abnormal behaviors in real time using larger natural models so I feel like we are still quite far away from thoroughly evaluating all the LMS and also understanding the cost and the limitations well given this to the technical audience can I have a show of hands of who's actually played with chat gbt all right that's great that's awesome

what about uh like open source llms all right wow still still a lot of people I'm curious if you guys have like any tactical events kind of like in the weeds of like what does your AI stack look like like are using chat gbt are you building your own open source llms like just as you know some tool tools for the trade for people in the audience you know uh for to to the extent that I can that I can serve for sure it's uh the the most important thing with llms is if they use the Transformer network is actually where their attention is what is that model tailored to look for attention uh generally it starts with the embeddings so an embedding uh it is

simply a vectorized form of a token a word it really depends on how the AI model is is designed and from that you actually start the probabilistic and statistical process of what comes next uh the the main problem with chat TBT which is not a problem in itself is simply what has it been tailored to it is to predict uh what has worked actually in the past according to academic papers books and so on so by taking open source llms whether it's metas llms or whether it's you get it from hugging phase that they have been crushing it lately

you have from the very beginning to tailor it to be to get the attention for vulnerabilities um so that's kind of the first thing uh the the other thing that all the as opposed to static analyzers Dynamic and so on which treat data most of the time are sequential data or function locally function based you're able to think this time in terms of graphs which means that it is not only locally to the function it doesn't only apply locally to the function via tension so to say but you're also going to Traverse through the graph through functions and actually that's when you're auditing manually

auditing a smart contract you also have to think in terms of all right how does that function play spatially into the whole smart contract which from which can I take it from behind and get into that function you know a way that hasn't been thought before by treating data sequentially one of the main issues that you tend to get is is that special Vision within the uh within the uh across all the functions or even across smart contracts by themselves so uh if if the attention again from these embeddings were were successful the graphs are going to be that whole graph is going to be and focused uh much better on the vulnerability at hand even

vulnerabilities that have not been found beforehand and then beyond that stack of course we we tend to think that it stops there but there is a whole Research into into our drls which is a deep reinforcement model agents right and well I could talk more about that later with pleasure but it's uh that would be kind of the right open source way to uh to to compete against tools that do an amazing job but introduce that new category right without clashing or without adding anything new so I would say that is kind of the the the best way to play from from this from the scrunch uh with uh with llms oh thanks

great answer so for us we are using primarily chat GPT the 32k API and also the Cloudy API so what we found in our research is the token lens really matters a lot when you are finding vulnerabilities so a lot of the open source models they do not offer very big token Nets yet so that's one of the I would say deciding factor on on picking which model to use for for either vulnerability detection or detecting abnormal transactions and I agree with what Luca said especially for like

transaction traces it's following a tree structure right so the current large natural models they they take a sequence of tokens as an input so so that's also something we still need to work on in the future have you experimented with token compression or do you is the 32k limit good enough for what you're doing um so I haven't tried token compression but what we do understand at the moment is based on our evaluation a longer token can lead to Greater hit rate and also lower false positive rights in finding vulnerabilities I I think it's hard to do token compression when you're

thinking about security because you you necessarily lose some information when you compress it um and it's already hard enough to get the AI to focus on exactly everything that's there so you you'll lose some context and if you if you compress something that that's kind of where the vulnerability was but you trim that out then you know you kind of you kind of lose what you're what you're getting after um so for for us uh we also use chat GPT and I I think the great thing about AI as a builder is how quickly you can produce a product uh literally you just need to design a prompt and there's I don't know 30 lines of code you need to write and you have a functioning product

but it's definitely one of those things where you can build it quickly and then iterate on it forever so I I really like the the aspect of AI where you know you can start with something basic like an llm but you know as these guys have said that only has like a superficial context so really the challenge then is okay I have my product that I've shipped quickly how can I how can I make it better how can I make it more precise and let it go deeper so you start looking at uh how can I like vectorize my my data and provide it like what functions can I can I plug in to kind of add some of the things that the AI model is missing and then you know train your your model on a graph rather than the uh just the the language itself

so you can get deeper results like you can go further and further um you know refining it as you go so I think starting at the the basics of just using llm figure out how to use that most effectively and then pivot from there to something more complex I think is the way I would go about it so do you envision like a hybrid system where you like you start with chat GPT and then if you need to specialize you pull something off the shelf from the open source world and then extended that or is there a way to just keep iterating with chat gbt yeah pretty much I I mean you can fine tune it but at the end of the day the way chat GPT works is an llm right and you do need to look at the control flow you need to you need to

give the the larger context of how the code itself is working not just the text of the code which an llm is never going to be able to fully comprehend so you do have to do something custom with some open source tools um you know to to access the the control control flow graph and everything got it Chris what about you guys yeah um so we're coming at it I think much more from a framework of how do we help attribute identity to either humans to prove that you're not an AI bot or an AI agent or on the flip side um to try and generate callbacks that basically can be read on chain where

there's an identity token associated with a wallet that can be read by a smart contract that then enables AI agents as they're accessing smart contracts to be identified in real time so where could this be useful for example if you take a social net social network like Twitter we've seen a lot of problems with Bots posting and in particular I don't know if you guys followed it there was a pretty big uproar over the course of the last month where there was a bot who was posing as a very political polarizing figure on Twitter she was posting a lot of inflammatory rhetoric on The Social Network this

created a news cycle it inflamed tension to inflamed passion and so I think when we're talking about objective driven AI llm models where it's very easy as these guys have pointed out to go pick up you know the Chachi PT interface to create a graph to create your prompt with minimal coding expertise you can very very quickly stand up something that's incredibly impactful and robust and as long as those things are being used for good all good but unfortunately I think we all know you know you guys are from the crypto ecosystem how many mints have you participated in where a bot came in and

swept the mint how many Dows have you had interactions with where a civil attack was attempted to try and drain you know Dow funds so we really are thinking more about less about how to integrate the llm models and work directly with those models and rather how can we attribute identity to those things and if you take that social media example that I gave it would not be very hard to solve for this right so you could have a two path entry in into something like a blue sky or a threads or whatever to try and do verification you could say look we're going to allow a certain amount of vetted known AI

agents to come in and participate in the ecosystem and you drag and drop that construct into defy you know lending real world assets any of these things and then second we're going to make sure everything else coming in is a real person and so I think you know at Civic what we're thinking about a lot is that proof of personhood and then also that proof of AI for for lack of a better term right now yeah you touched on something really interesting where I think we're in this world now where it's like Bots are usually bad and humans are usually good and there's probably a world where that flips where like Bots are people too and do you think that requires us to like design protocols in a different way

where it's just like if the bot's doing good work on the platform maybe you just encourage it and they do get to participate in airdrops well I'll say quickly um I think provenance is is really important and being able to attribute ownership back to these things is essential because I think you're dead right um at some point in time and and I think people will be shocked how fast this happens you're going to have an AI agent operating on your behalf and you know it's it's Jarvis from the Marvel movies however you want to think about it it's going to be out there doing things for you you know booking tickets making sure bills get paid making sure that you know whatever news delivery service you have is coming through like whatever the

things are and there'll be a whole host of things that these agents are doing they're going to need to interact in the real world on your behalf and you want that you should want that that is a future that I think we all know is coming and it's actually not that far away maybe not months but certainly years and so I think it does change the way that the interaction with the protocol level is going to actually need to materialize and this is you know I know we're we're going to talk a little bit about the marriage of AI and crypto but to me this is where it gets really interesting because distrib distributed Ledger technology by its very nature is good at some things it's terrible for other things okay I think we know that but DLT I think and generally blockchain

identity attestations have a few advantages it's distributed there is no sort of one Arbiter or owner of the identities on chain if I've gone through and proved I am who I say I am with a passport and there's an on-chain attestation that's privacy preserving and then I want to delegate that attestation to my AI agent so that it can operate on my behalf then I should be able to do that and smart contracts that are gaining access to these things should be able to read that so I think it is foundational um it's actually very fortuitous in my mind that DLT and crypto has made as much progress as it has at this time when we have a

really good use case with AI and in particular identity and AI I think is going to be crucial to get right yeah 100 um yeah we have a saying internally that like AI is like offensive technology and crypto is defensive and sort of like you need the marriage of those two um and this touches on what you're hinting at earlier there's like regulation and so we have like government regulation but then also potential crypto regulation like how how can we use crypto to regulate defy agents so there's a an EIP like 7265 around circuit breakers how do you all think like circuit breakers will manifest with AI like once you get an AI agent going like how do we shut it down if it if it goes Road

you know I think uh the the EIP the the newest one they recently proposed um that already happened I think a good framework to know how can these things work out at the end is looking at has what has worked in web 2 because at the end of the day it's just gonna be a similar wave in terms of movements in terms of how things um settle down and and so on so with uh I do agree that but whether it is something that we want or not uh there is something extremely important called attribution being able to Watermark what comes from from an AI and what doesn't being able to to hold hostage one AI which in return it's able to hold

hostage the users in some very limited scenarios in banks for example that already happened where AI can have the last call those are AIS that have been audited every single line but it wouldn't be a New Concept that an AI can actually take last minute decisions and with with this new proposal actually they're very the objective of that proposal is for people at the end of the day to trust D5 more so that means you're not able to get a rock pool and lose all your funds but rather when there is a bridge that whole breach happens way slower that what would

happen in in around a couple of hours and you would be able to either take notice fix the problem in the meantime but of course you don't have the right to choose and to to choose to get your funds which is something that I do understand people are against however it Still Remains the fact that everything will be readable online and you will know exactly what that AI or circuit breaker or whatever implementation they decide to pull you will know what the consequences of that are again it is still open and the uh the objective of it is once there is trust enough trust to bootstrap that

defy application or that bank um to slowly take that circuit breaker off um that's already worked extremely well in finance uh it happened once in a line time in the NASDAQ that that Circle bracket was activated and actually saved uh a lot of companies billions of dollars so I do think even though it takes Freedom out of the user maybe that user would have less Freedom with um without the Voting Rights the tokens or whatever is right at that time so uh so I see that generally as a good implementation to begin the trust as long as it is of course readable everyone can know exactly and predict how it's going to work

and there is and there is a very a very clear decentralization in the way of of how it works instead of Simply being a small multisig that we all know how that ends up true so like just parting it back a bit so you're you think AI being the final Arbiter of the circuit breaker is probably how things will play out as opposed to to humans I do think in very particular cases that would be the case highly audited AI where the result is not as because the problem with AIO the fears with AI is how stochastic could it be how uh and there is there is such AI that has deterministic outputs as well again it all depends on

the model there are thousands of different infrastructures models uh sensory inputs and sensory outputs so so I do believe the the right deterministic one would be uh could be an option for the future and would end up happening yeah interesting I guess it's not that different from what happens now you know Quant systems and algorithmic trading at the end of the day is deterministic right I mean it's making a call based on criteria we're just now saying this AI agent provided there's appropriate audit and guard rails around it should have an equal set of opportunity to be that last decision maker in that tree is that the

way you think about it yeah to to be honest I do think it is not foolish to expect similar things that happen in web 2 and that have worked very well in web 2 to repeat themselves in web 3 especially taking advantage of what the blockchain is made for to decentralize the settlements so I do think we will end up seeing some sort of high frequency trading uh in in defy even though at this current moment because of the speed Sunday gassy doesn't seem very feasible but I would yeah I would definitely see that repeating in web 3 and in web 4 if it works very well in web 3.

um I I do want to add a few like quantitative data from our previous research so we had a paper where we collected like roughly 160 D5 incidents and we evaluated um the emergency pause mechanisms in these D5 protocols and we surprisingly found out that only one of the protocols who supports the emerging supports has actually triggered the post within one hour and roughly 42 I think of the of the protocols paused within six hours so so there are certain challenges with this circuit breaker designs if we do not use like automated tools right because D5 there's no Market

um like ports right it's a 24 7 Market it's quite expensive for D5 projects to have a dedicated team to monitor transactions 24 7 on chain so I feel there must be some automated way to detect malicious transactions and Trigger the pause but the problem with heuristics of traditional tools is the only like someone needs to design the patterns right and the attackers were properly figured out a way to bypass the patterns to create an Innovative way to kind of steal the money and what's good with AI is they can find out abnormal patterns by comparing transactions with the

historical transactions so no matter if the heuristics captures it or not it's very likely AI can capture in future all these abnormal behaviors that's something I want to add on top yeah interesting go ahead Joe I I just wanted to add that it can be a double-edged sword I mean I think it's definitely necessary like in the web 2 world when you think about security you always have all this time to respond to something and all these like indicators that someone's you know breaking into your stuff but in the web 3 world things happen quite quickly you know as these guys have said you it's really hard to have that be a manual effort where

you're kind of monitoring your contracts and then you respond to something that's happening because an attacker may be able to finish their attack completely by the time you even notice right so you definitely need something automated and I think AI could be a good fit for that but when you when you think about it you're adding a circuit breaker you're you're also adding another Avenue for attack like if um you're an attacker can somehow trigger that circuit breaker they can you know dose your your product right they can shut it down for a bit um so you want to have that responsiveness to stop an attack but you also want to not introduce uh avenues for um an attacker to essentially mock a pattern that's going to trick the AI into triggering the

circuit breaker so I I think it's something you have to approach really carefully because uh it could it could end up hurting you in the long run yeah it's like the classic who watches the Watchman problem um maybe uh we have five minutes left but I'm curious like if we look forward to like the future world where we have like a perfect researcher AGI that's just like monitoring all the contracts monitoring all transactions like if you had to estimate today when do you think something like that would exist is it a year away two years five years never um curious where people land there well I'm probably gonna get a bit of heat on but um the the good news with this is that I do not think it would be

an AGI at the end of the day um true intelligence comes from when when you're not specialized at anything and yet you can abstract certain things that are specific to a certain topic or matter and you're able to implement that elsewhere or you're able to use the skills that you already have the general skills that you have to create that or to look into something that might create that better than you do therefore I I do not think the AGI in this case would be the answer but rather an AGI to which uh many specific protocols and again that would be us um we would create specific AIS that are attentive to very specific things I do

believe in the composability of it all so that let's say for example our brain can understand very well how to type but we don't have the mobility intelligence to to type just with our brain we need our arm right so the the arms our extensions in this case would be highly specialized uh artificial intelligence protocols that use different sensitive uh and sensory inputs such as for example we talk a lot about agents and agents in AI mean several things could come from an llm agent that is able to select the right tool for the task or it could simply come from an

agent that receives the feedback from the critic in the case of reinforcement learning right so having those very specific AIS that pay attention to one single thing there was even a paper on Google and attentionally sold you need for for all of you that would like to read that that was the basics the origin of chat TBT and I do not think there would be uh it goes against the concept of being General to being specified in one thing so um to unfortunately for uh Sam Altman uh the artificial the general artificial intelligence wouldn't be able to control it all because uh it would be General by Nature it would be us who in the field

have developed a specific and specialized tool that is able to precisely look into one very uh core thing so I do think that's going to be the Dynamics around the future more than simply having an idea that that replaces us all just maybe one thing to add and and a question on top of that on the one hand the monitoring I think you're right is going to be this very specialized focused attentive model on the other hand it seems like the the Bad actors or or even just the trading firms are going to be incentivized to do something much more General they're going to be scraping sentiment analysis from Twitter from Facebook from LinkedIn they're going to be looking at trading patterns

they're going to be trying to compile all that into some deterministic action and so on the one hand we can have very controlled models but if they're a very Dynamic aggressive and smart models on the other side I think it's a bit of an arms race and maybe uh we're bringing the wrong weapon I yeah I don't think we can help uh not bringing the wrong weapon uh but if for example the open source protocols out there were developed with Watermark identification uh if it's not recognized in uh within the watermark database for example it would be an AI that might be Rogue so being able to um especially especially with ZK which is something we didn't touch upon but if

you're able to verify what you're using on chain and you know exactly that the AI is doing exactly what you said he would do uh that that way you would be able to have that verification on chain sure you could trust certain AIS that haven't been verified and are are not wrongly intentioned but I do think ZK will be here to help out in that verification on chain for all those things heavy computations of chain the Year Joe of any final comment on the specialized versus AGI yeah um I'm not sure that an AGI is absolutely necessary to um you know extract maximum value uh out

of the crypto space like the way I see the future is kind of like how we have uh MAV Bots now like Mev right so um there's this arms race to extract a maximum value out of every transaction and I think we're going to start seeing that in terms of security as well right so AI is going to kind of Empower those to be more abstract more generalized so that even a strategy someone hasn't thought of once it kind of the opportunity exists on chain uh an AI can a specialized AI can kind of come up with a way to extract that value and I think we'll see security kind of bundled in there as well I think within the the next decade we're going to start seeing

this problem pop up where security is almost like an instant finality on chain right like you deploy your project people start using it and immediately if it's vulnerable it's going to be hacked by some AI That's just monitoring the chain awesome we're at time but um we could probably talk for another hour on this easy so if you have questions for these guys please go find them um walking the hallways thanks everybody for showing up thank you foreign