The future of runtime monitoring panel with Caner Çidam, Sultaan Qazi, and Tayfun Sur
Nethermind Summit Istanbul 2023 · 7 Dec 2023 · 30:04
Caner Çidam of OpenZeppelin and Forta, Sultaan Qazi of CyVers and Tayfun Sur of Nethermind discuss the future of runtime monitoring for smart contracts. They cover why audits, monitoring and bug bounties are often treated as separate choices, how AI can reduce false positives, community-written detection bots on the Forta network, and the open problem of responding to an attack in real time, including on-chain risk scores.
Speakers
Topics
From Nethermind Summit Istanbul 2023, hosted by Nethermind.
Transcript
cool this discussion is about the future of of runtime monitoring uh a few provisors one I'm not a runtime expert uh it's actually tan here who's from Netherland working uh with us with fora uh and then we have uh real experts on the tanel uh we have sulan working at cyers and K jener yeah I said it was wrong in the hallway so I want to make sure I doing right okay uh from fourth and uh I think we're going to take the discussion through some of the like more modern techniques that are uh available to runtime monitoring and I also want to take it into directions about like how do you do active responses to uh threats that you
identify uh and and so on uh I know that this is still being worked on a lot and there's a lot of space here uh so to start off with I'm going to hand the uh mic over and if you can give yourselves a quick introduction with more detail than I provided and maybe go into what do you think some of like the biggest challenges are in the space of runtime monitoring uh specifically from like your own perspective in in the like in the ecosystem and also what you see like others struggling with other solutions that you think are interesting so perfect thank you um so my name's Sultan Kazi or I go by salty because in Canada no one can actually pronounce my name properly um I run all the Partnerships and pretty much anything
client facing for cybers where a uh real-time monitoring uh and threat detection platform for web 3 security um in terms of you know I I think going back to what you were saying I think that one of the biggest issues that we're seeing is kind of for lack of a better term is uh tunnel vision so uh we were on we were actually Jenner and I were on a panel yesterday together and one of our other panelists said that uh security needs to be respected and in web 3 that's that's not the case right now and I think that um it's pretty clear because if you look um you know at the the current landscape there's a there's very few organizations that are using realtime monitoring uh to begin with uh a lot of times unfortunately and I've talked to you know we partner with
tons and tons of different Auditors uh a lot of them will say like you know this looks bad when they get exploited but we gave them three recommendations they fix absolutely none of them because it was either expensive or it pushed back the launch date um and so I think that you know that's a pretty good example right they're usually picking one or the other um and the reality is is that SEC security shouldn't be an afterthought it should be almost designed bi security so I think that um the biggest issue I see is like fragmentation where people are having to choose between you know an audit or real time or um you know about bug Bounty like whatever it may be and you know in in their defense I understand that you know market conditions are pretty tough and these things aren't cheap so um I I do
empathize with that but then you look at circumstances like you know one example that I always point to is like the um the oiler attack right when $200 million lost they had no run runtime monitoring and um you know using a system like like ours they would have we wouldn't have been able to mitigate everything but they would have lost 7.9 million instead of 200 right so that's still a big loss but obviously when you look at the scale of what it ended up being uh it's very very different so I think that uh you know even again on the other panel um there's some focus on um you know what's the future of security and all these things and I kind of always go back to say like we haven't solved the problems of yesterday let alone the problems of tomorrow so um to me that's kind of
where I think we should we should start hi everyone uh my name is Jon I uh work in I'm a part of open zeppin but I mainly work on fora I develop the fora Network um I mainly work on the Node Network that run the detection Bots uh we're doing uh Community Based uh threat detection uh so it's it's a permissionless network which anyone can write a security B and deoy there and produce alerts and labels and findings and uh and Som consume these alerts as well this uh you have building blocks uh there's an SDK that allows you to uh build a b right away and to deploy it as well uh we have a we have an app a app
actually uh assists you with that and there are Al also like already deployed Bots which you can consume the alerts of so you can write Bots that uh feed other Bots with the alerts and these are also fed with other data sources and they try to create uh variety of uh insights about the things that are going on Shain so uh right now uh we have uh a lot of uh Bots that are uh written and maintained by different community members uh some of them are uh typhoon and also VES he's over there and they are currently developing some of these Bots right now in fora um so one of our um challenges
there is I think think um mainly uh how so you can produce this uh threat Intel for anyone to use it has complex uh insights about what's happening there are different kind of BS that maybe they point to money laundering stuff or spams that are going on or scams that are going on and tens of or maybe hundred BS I don't don't remember the exact count right now so um but the final goal is doing something with this and right now we have this notification uh flow uh future that allows you to call Web hook and or maybe consume from the API and do
something with that uh but then what do you do with it so you can pause your contract and do something else we're trying to delve deeper into how we can better apply the this these alerts to as Solutions and trying to find a new way and so I hope to be explaining more about that later in the questions thank you thank you hey everyone I'm typon from fora I'm sorry from nether but I'm mainly doing P task since the day I joined nether M so I'm actually part of both teams I mean um what we do is actually developing the detection Bots but when I first started we started with protocol
based detection BS it wasn't like always like the attack types and sometimes they would be more like information related alerts but recently we continue mainly with the generic uh General type of attack BS uh that can uh catch everything I mean any general attack going on the network um so it's really an exciting feel to be in actually so the most critical challenges that I see in the field uh is that a it rols around basically the evolving nature of U threat types actually and the nature of decentralization of
blockchain and so we have this smart contract vulnerability uh even though I mean despite the detailed analysis and audits we still have vulnerabilities uh happening every day and it's because of everything is changing constantly and evolving to something new and everybody is like testing your code like whole world is testing your code because it's all open World open code and so everybody sees it everybody actually tries to break it it's it's even worse so that's why there is always new uh attack um vulnerability F uh type fond every day and the that's one thing and another problem is scalability so as
blockchain applications grow every day and monitoring uh for each transaction for anomali um becomes increasingly complex and it's not just due to the number of users in the system but it's also um number of deployed contracts every minute so we cannot generalize the attacks because there are many different contracts and there are many different attack types we cannot Define them into a certain context and lastly the the centralized uh nature of blockchain um makes things even a little bit harder because maybe we can talk about it later but uh what I mean by that is it's hard to respond in
um exactly in that moment because we need consensus to give some response so unlike centralized centralized system it's one of the hard hardships let's say that I see in the notebook right yeah I'll move closer um thank you all uh I actually kind of want to combine some of your answers here into the next question uh so um you brought up the fact that like you're making many Protocols are making tradeoffs between security beforehand or after Hand by doing audits or by doing runtime verification and runtime monitoring um you're saying is decentralized and there are so many
different types of attacks that come out that it's actually hard to classify them all and uh so I think this is part where your community based approach comes from like anyone can try to identify their own things um but I'm going to I'm going switch it over to Cy here and say you guys are working on uh AI Solutions here for the monit how does that help in the context of like this ever evolving attack Vector uh and like where does it where does it kind of fall short then like where where can you improve so yeah so I think that you know simply put like the the benefit of using AI is that you know as opposed to like a a rule set or here a six based model you're just going to have naturally less false positives it's going to slowly you
know get better and better that's you know machine learning it's that's the benefit of it um and I think that you know we've seen that even just in our detection rates and our false positive rates kind of steadily declining um you know see even I've only been at the organization for about eight months and since then to now like the the detection rates just continually uh improve um and I think that to me like that's kind of the the main benefit like the best example I can give you of that is in an example where like you know a rule arbitrary don't get me wrong there's a there's a time in a place and I think there's a lot of value in arbitrary rules and and heuristics but um one example that I can give you in recent memory um that we detected was uh
stake.com so when stake.com got exploited um you know our system picked up on it right away I think we were first to the first to market in terms of alerting them and the thing that was most impressive to me about uh the detection itself was that you know we didn't detect uh the first detection or like that triggered kind of our um our system was a transfer for one eth right so if you think about stake.com like I'm Canadian so I'm more familiar with Drake than I'm willing to admit but he's you know he's betting million dollar bets on Raptor games and you know so obviously you're talking about a pretty large uh amount of transaction volume and the of the side so you know a one e transfer triggering our system to me is like an a testament to AI being kind of the the
backbone of it um and so in an example like that if you're able to you know detection is always one piece of the the puzzle the other side is kind of the response side and so um they didn't have you know a system in place for detection nor uh response but in a case like that I think that that's where you're really going to see the benefits of AI kind of shine through um obviously the the negative of that is or the negative side of it is that um the models thes yeah while they improve it's also based off of like more or less um you know a private data set so um you know we're always looking at ways to kind of increase that and increase the exposure and if there is any uh exploits that we you know our system doesn't pick up up
then you know we kind of feed that through on the back end to get the system to learn it but um this is actually why I think that like the future of the the landscape is not going to be one big provider right like you kind of have market dominance in the compliance space and that's kind of where I come from for MasterCard um with like chainalysis where like yeah trm and elliptic are top tier products but the reality is like market dominance for chain analysis is massive I don't think you're going to see quite the same thing in uh realtime monitoring uh just a partially because a lot of it is focused on def5 but then the other thing is that you're going to have there's going to be a real benefit to a protocol for leveraging a cyers and a fora simultaneously right as well as like
some other things but um to me that's kind of where things really shine through would you like to add some comments on how the community helps on this front or if there's a uh are there any plans for AI in the fora systems or um yes there is AI and fora so maybe I could answer yeah um so I actually uh agree with what what sulan said said so uh it's hard to find one winner in these uh Security Solutions like uh so I'll explain one phenomenon before I talk about the AI and Community part of it uh it's like there's this one detection bot that is checking uh multiple things and then we for redundancy what we do in the network
is we run this B on three different notes so that if one of the nodes have a problem then the other two uh nodes actually some outputs at least but then what you see is when the bot becomes more complicated uh you see that one of these Bots are not firing and other two is firing sometimes only one of them are firing because of the external State dependency of how things are changing in real time Etc and so uh so let alone running the same detection in real time also gives like different results so uh and we we're using uh AI ml models in the Bots to find out about scams and attacks going on and I I think Ty might
be able to say maybe more about this because he's doing yeah what I know is what we uh try to do here is um these ml models they find different things look at different aspects from different angles and they they say different things then and these are built by different people for different purposes so uh when you uh get this collectively have this knowledge of things happening then you have a higher coverage about things happening on all of the chains and this data could be from cyers it could be from another provider or it could be a custom bar written of fora combining these then
you're able to uh produce a really high quality outputs that uh have higher uh Precision so in that respect that's very helpful do you want to have something sure yeah yeah personally uh we haven't implemented AI into our Bots yet but we have worked with machine learning bots so I want to add something onto that so and machine learning the beautiful thing about is that it can learn and it can be trained so it can use the past data to analyze the best amount of data and figure out what's wrong I mean try to uh try to bring some um shapes of the
attacks I mean try to find some indicators of an early attack so let's say we want to figure out the unusual activity so what is unusual it's subjective right so you cannot calculate this but with the machine learning part it when when you train it it goes to that protocol and do its analysis to figure out what's unusual for that protocol and then it turns to something measurable so let's say it uh monitors a bridge and when an unusual amount of transfer happens it directly alerts so it's it's something that we we use a lot
uh in for the nether mind thank you um do we have five minutes left or is it five or 10 minutes left 10 minutes 10 minutes left okay cool uh let's give this some like spicy questions I think will make things a bit more exciting for everybody uh I also need some education on this front but uh there are a series of runtime Monitoring Solutions that are looking at analyzing me pool and then making sure that a transaction which seems suspicious is either front run or blocked or something right you can either do it through a Searcher try to execute the transaction and take the money yourself to then like refund whoever exploited it or you could pause the protocol right um now am I
right that pausing a protocol leads to some dicey regulatory like issues right depending on who what and where uh can you explain some of the like difficulties around here and whether or not that's something that you can do in like a centralized system or by a decentralized system or like if it's uh if that makes a difference to to your ability to pause some critical anyone to take it I mean I can't speak so much to the like I do come from the regulatory side from Massacre so I probably should be able to but I think that ultimately uh the thing the area that I see this kind of I guess forward looking where this becomes more of an issue is like you're obviously seeing like institutional players coming into the space right obviously that everyone knows about the ETFs I think that in short order there
will be uh you know following the ETFs there will be liquid staking or or staking of some sort that will be offered by those same uh entities now the tricky part about that is that when you look at let's say a Fidelity or a black rock that wants to come in and now offer that to their institutional clients right there's there's a couple things to play number one is that their risk tolerance is going to be subter essentially right so um in a in an in an environment like that where it's supposed to be you know primarily decentralized pausing the contract even if you go and you pause the contract it's also not a FSE positive and you save the funds and everything the reality is is that the if you think of the transaction volume and the types of clientele that they'll be working with
the like continuity is arguably just as important as uh the security right so I I I think that you're going to see an evolution a little bit in terms of I mean as with everything in web 3 there's going to be a trade-off right where um there are offerings in Market we even looked at this as well um where you're able to kind of build in almost a contract modifier if you will that's sits on top that is able to block transactions without actually pausing the contract so almost kind of thinking of a a middle ground of you know pausing versus just letting it go through so I think that um what will happen and this is again un surprising is that you're going to have different uh organizations that have different criteria for what
they're looking for so you will find um you know protocols that are going to be like no we want Florida because it's the most decentralized because it's community-driven XYZ and then you're going to have people on the other side of the spectrum that are going to say you know we can't afford to have that we're not willing to take the risk we want this to be yeah are we sacrificing decentralization for the sake of security and and continuity yes so I think that that will all be very interesting as to how that plays out and um you know I guess from the regulatory side I probably should have prepped more about exactly what's happening on that front yeah um so one difficulty I'm thinking about when we're seeing the centralization and stopping these attacks is um when you want to do it you're actually doing some bit of
censorship maybe because uh you know you're stopping someone but according to what and why so that needs to be justified well and applying these uh principles to uh in practice is uh difficult and so uh the we have Bots that uh tell a lot of precise things uh one of them has like 90% Precision even though it is using in like an ml model uh but then there's this uh 10% so and the question is what happens uh and how much risk you're willing to take by um applying this
um yeah when it comes to Precision um I mean this is up to teams and the attacks actually I mean some teams can uh tolerate to I mean not have these FPS or having these FPS frequently so it should be um a decision that comes with a consensus but let's say we all I mean we all love decentralization but we don't like losing our funds so it's also I mean It's tricky because I mean there's no certain answer to this question so but
what I'm going to say is if we are sure that I mean like highly sure that it's a it's a real Attack then there there is no problem with u locking the protocol but you are as if what if it's not with just right right what if it's I mean not I mean it's wrong but we need to check our data and we need to say like each Alert in for me mind right now has its anomal score so it um says that uh how frequent uh is that alert coming every day so if it's not an if it's not a frequent alert
and if it comes back to back it certainly means that there is something wrong with that so we choose I mean we decide these decisions I mean choose these decisions by looking at these anomal scores and precision and calculation uh but these numbers can be set by the team I mean we can lower the threshold or increase the threshold I mean according to what we do or what we want our clients to experience I would strongly agree with this I'm not sure if a panelist is allowed to make an opinion here but one of the things I'd be concerned with is uh like whether or not you'd be held responsible for the
protocol if you're the one who's capable of saying or dictating which transactions enter and which don't and uh I think that'll be one of the really sticky areas for the next uh few years in runtime honoring um but uh it it is true that like there's this incredibly difficult tradeoff that you're constantly making about whether or not your actions are sensory and or or they're actually that good for the critical and a whole philosophical area where you say I mean yes there's security that we expect but in some sense the blockchain is now like law I say quote unquote and uh if if an action is taken in that set then is that not correct Behavior cor to
the design and we all know that like humans make mistakes so that's not the idea but uh it's a Point um cool I'm wondering uh this tradeoff between we've only got three minutes left so I might just wrap it up rather than asking about nuances of whether or not you should be faster at identifying things or S here at like flagging transactions um what what technologies are you guys like the most excited for as a final note uh coming up that either something that you're building yourself or something that you see elsewhere that is going to to um either directly bolster runtime monitoring capabilities or the responses of runtime monitoring
um or is there anything that's like an AI technique or is there an knowledge technique that might eliminate a class of bugs anything that you're um kind of bullish above the next few years yeah so for me I think the first thing that comes to mind is um we have an update coming in about two weeks um that will include something called like reputational profiling and so you know in many cas security and compliance tend to like blend their borders a little bit and so one thing that we've noticed and I'm sure everyone in the industry has seen this but a lot of times in in years previous after an exploit you know the uh criminal would go and kind of throw that those funds through a couple mixers and then essentially plant it or park it in some sort of un hosted wallet and I
kind of hope that people forget and people don't forget so essentially what we're seeing as a much more common alisation technique now is um that they'll actually take those funds still throw through mixers but then they'll start to do U multiple cross-chain swaps like over and over and over and the reason that they're doing that is that um the compliance providers like CH analysis trm mipic Etc um they're very good at what they do but the reality is is that their infrastructure wasn't designed to be able to kind of handle that so what we've actually done is we've done a comparison against our you know our tool and and kind of seeing are they are we able to trace the risk cross chain and so what happens is to kind of close this up is the the criminals will kind of do that they'll go and then
usually use like a fake kyc account at binance coinbase whatever one they want offramp small batches of funds throughout all of these take the funds out immediately because when binance or any of those centralized exchanges go to do the API query with Tre analysis let's say the funds come back clean and it's because of the fact that they've just ping-ponged it so many times that it's not there then a week later all of a sudden those funds come back or you know the the system updates so um with our system just given that um we've kind of designed it for this to be natively cross chain whether the exploit happened 5 seconds ago or you know 5 days ago you essentially will be able to use that uh in a similar way so it's not so much on the security side of things but I think
that um again like given how shoulder-to-shoulder compliance and security is I think that in combination with like hopefully more uh protocols and and projects kind of prioritizing having an audit you know a bug Bounty Community Driven real-time monitoring all of it kind of holistically I think that is what I'm looking forward to from a technology perspective just kind of uh and seeing that integration where you know maybe cybers and Florida uh you know are are collaborating or you have even insurance it's something that we've been exploring with insurance providers like actually having us built into their platform or vice versa so I just think more cross collaboration in short I kind of agree with these points and uh this one thing I want to mention is something we discussed actually with
Sultan uh yesterday in the morning we were having some conversations and so if you want any runtime Solutions right now it's like what you can do is if you want to block malicious transactions what you can do is you can choose your actors and way to choose your actors is well you do kyc on them but we don't want to do kyc on the people to let them be able to interact with all all these uh defi protocols contracts that would be ridiculous but and on the other uh side on the other Edge what we see is like if you don't do anything then you maybe accept uh theil attacks or any kind of attack to happen to you so you have like zero and one when you consider like that
and whereas the solution uh that anyone can offer right now is somewhere uh in the middle like it's it's a great gray area DET threat detection is like a really great thing uh because when you're attacking an attack you can only say you have a level of confidence of something is happening but you can't always exactly say something is happening so similarly um how you want to apply to this on chain should maybe have a a reflection of this idea this property so noves were we're thinking uh of something similar to that uh contract modifier change uh but that is fed with a threat Oracle uh that is on chain so these alerts that are produced uh from
for Network are actually uh producing uh ideas about what how what kind of addresses uh these are and so if you push this information on CH with some uh numbers that represent the scay area and and change the contract uh to refuse this transactions then maybe you can specify what level of confidence you want to have uh on all of these alerts and reject the transactions based on that and this risk score is dynamic because it's uh produced uh in real time so that's the solution we're kind of uh investigating nowadays and looking forward to delivering yeah so I'm mostly okay I'm making
sure I'm mostly excited about actually two things first is blockchain interoperability because every day more blockchains interact with each other and this will um bring the need to uh secure the transactions cross transactions actually so rtime monitoring will be more important every day and the second and most exciting thing maybe for me is decentralized AI which can work in distributed networks uh independently and it if it can evaluate the transactions and if if it can even respond by itself without the needing to Central authorization I mean that that's the most exciting thing for
me all right well you heard it here look out for reputation scores look out for centralized Ai and look out for Community Driven um Funtime monitoring and thank you all for attending here and for speaking appreciate [Applause] you okay thank you
Related talks
- Price Manipulation Exploits
- Secureum 🛠 Smart Contract Security The Good, the Bad, and the Ugly - Rajeev
- Web3 Wallet Security Full Course
- Learn to verify calldata with safe-tx-hashes from Cyfrin
- How to Understand a Smart Contract Hack
- Probabilistic Liquidity Attacks in DeFi
- Unlimited ERC20 allowances considered harmful
- Billion Dollar Bugs (and How Watchdog Found Them)
- Tornado Cash DAO Hack
