Security Panel with Omar Ganiev (@theBeched), Sarang Parikh (@sarangparikh22), @AnishMohammed
ETHDubai 2025 · 28 Apr 2025 · 24:31
Omar Ganiev, Sarang Parikh and Anish Mohammed take part in a Web3 security panel.
Speakers
Topics
From ETHDubai 2025, hosted by DeFi Dubai.
Transcript
Um, okay. Let's get started with the security panel. Hey, I'm Sing. I used to lead engineering for Sushi Swap. Um, and I'll let you guys introduce yourself. Hi, my name Can you hear me? Okay. Right. My name is Anes. I'm a co-founder, CTO, and chief scientist for Phantom Protocol, privacy for DeFi. Hey everyone, my name is Omar. I'm CEO and co-founder of Security, a security audit firm.
Awesome. So, uh let's get right into the questions. Uh we have seen like an enormous of hacks happening recently uh and like people auditing their code and then making like a small chain uh and then still not reuditing but reusing that audit reports of you know eight times audited but still getting hacked after the post audit. So how do you think as you know working in security and like audit firms people should approach the post audit should it be a way where it completely gets invalidated all the assumptions and what are your thoughts around it?
I can give you a cynical one first. So most recently I had my circuits audited and uh I had a very interesting challenge with the audit company. So essentially uh the challenge typically you have is like a it's a intersecting set of sets. What I mean by that is like uh if you have a ZK protocol uh ZK protocol would imply not just ZK there's an underlying elliptic curve and there's a cryptoconomic mechanism design bit. So you have to find this set of people in the intersection of all three who are really capable of understanding this and there are like probably 10 people in the world and it's really really hard for anybody to actually get this one in 10 people and the thing is the prices they
ask for or the charges they have. I'm sorry if anybody's not and they do ZK and we had this conversation and you said a bit big number to me and I said no I'm so sorry that's a reality we can't afford to like we need to have a mechanism to do this. The real challenge is like when the audit is done uh you have you kind of get a time stamp that give you that but there is no mechanism where it's globally transparent to everybody that this audit was done at this state by so and so and uh you know it's a double-sided problem. One side of the problem is like if you do an audit and if the protocol has a problem your reputation goes down the ring. Okay. So they are very very hesitant to give you even if you prove to them
cryptographically say for example you know you never say to anybody you are going to have a protocol that's INDAC1 secure right a lot of the protocols are not look at SSL it's not you don't have a security requirement but you will have security auditors I don't know why they will say you know I want this okay now it's a question of like my belief versus your belief okay and then after that they really wouldn't say to you, you know what, you fixed this. This is what it is and this version of your submission on GitHub which is or GitLab or wherever that is, right? It's just a hash function of whatever that is. It's valid for all the things. These are the models. So I think the real challenge is
number one, we don't have a standardized set of threat models which is very standard. If you go to build anything right now, you can go to Microsoft, you can download the that the modeling tool, it'll actually give you all the tools. You can actually have like, you know, what is it that's there kind of thing. We don't have that. And we don't have like when you actually get an audit, they don't provide you with a list of things that's okay. This is they say this is a high-risisk, lowrisk, medium risk. But beyond that, they don't tell you like exactly what the risk translates to. And if you if I were a protocol builder I get the you know I get a audit what I want to do is I want to publish right as in like I so I want to put it on the main right now if any
changes happen then going back again this I'll you know go back to the problem the problem is like even if it's like 10 lines of code the audit company has to go through the whole problem and this makes it very very difficult for both the protocol and for the auditors and being able to you know link the two things which is like this security model at the fifth audit and the security model at the second audit and the delta and if you had the ability to just do that that would be amazing that's what I would say that's that's yeah uh interesting it's interesting that I think in the last three weeks we got two
requests from the customers who want to create a registry of their bite code and they add it as as signers. So they will have a few signitories who will sign all the bite code. Uh so there are auditors, there are developers, everyone signs that this is the code that was developed and audited. So I think there is I see a trend like two two requests in couple weeks. So maybe the industry is moving in that direction. Uh also I'd like to mention that apart from the post audit changes I'd like to emphasize that there are mid audit changes which are extremely annoying to the auditors and I think that we have to find a balance
between uh trying to negotiate more costs from the customers and being loyal to them. Like when a customer comes with in the middle of the audit and tells us that they updated the code technically this is a new code and this is new iteration of the audit and this new code wasn't audited the full time. So of course sometimes you can accept that like you look at this and you understand okay this this is an isolated change and we can just uh let it slip. But sometimes it's really annoying and we either take the risk and take the costs and allocate more time to audit this um or we have to
negotiate more costs. So it's not just post audit changes. Yeah, that's that completely makes sense. Um what are your thoughts around uh EOF which is going to get you know add in the vector update and it's going to come out. Um, I mean if you want no recording for this so that you don't get grilled on Twitter, we can just, you know, cut that part out. But if you want to give your honest opinion, what do you guys think about EUF and how does it impact the security landscape in general? Do you think it's good or do you think we should not do it and wait for some more time, work on some other things?
Honestly, I don't have an honest opinion. I I'm not even sure if it was accepted into Yeah, I mean still going on right? it's not yet accepted. Well, the core idea of isolation between the code and the data like philosophically it's kind of interesting in terms of security but I don't have an understanding. So I will talk from a very security perspective. So I've been doing security for last 25 years give or take. So for me I've sat gone through all the cycles sat on the committee wrote test vectors wrote crypto libraries and uh this is just an extension. So every other part
of the normal world execution and data are two separate things. If you look at your CPU you will have a flows if you allow that to happen right. So as a general security principle is an interesting construct but nothing comes for free in the world of security. It's just about trade-offs. Are you willing to take this pain to get this game? So there you go. Makes sense. I think you guys went for a diplomatic answer. Uh something that I wanted to avoid. But anyway, let's move on. Uh we have recently seen a lot of uh web 2 hacks happening more than web 3. I feel at least at the start of this year with like by bit and last year radiant. Uh and in fact the most recent one was ZK
sync. uh you know the the like the key compromising and you know they're a drop contract whatever right um and like if you look at in web 2 they're like standards whenever a lot of money is handled right they're like ISO standards built for it uh we certainly don't have that in crypto and even if we have certain sub things people don't follow and even definitely at the bigger companies uh otherwise we wouldn't have those hacks right um so how do you guys think we should improve it and should the traditional smart contract auditing or zeke auditing companies should start expanding their uh you know like offering to even get the web two infraite right because most of the auditors are from web two first right so again I'll say a certain thing so
full disclosure I've done this that's like I was personally involved in writing the test vectors for CBC mode for AES so for me I've gone through the real pain of writing arbitration number libraries cryptographic libraries standards test and move to this thing right so there are lots of good learning what I mean by this is like right now I can't think of a standard which you go okay this is a primitive this is the curve this is a test vector you do this you do any implementation you put this thing in you get that thing you know your implementation is correct I don't think that exists right I think there is value in doing that and uh you know I I am kind of hesitant to give broad strokes
but I pretty much said a lot of things a very long while ago there was a piece that was written by co-authored by me in 2019 or something where I described this okay there are lessons learned every time there's a lesson learned uh you know there's somebody who had to pay right if you look at the financial industry they have a lot of the standards right the reason they have all the standards is like they have lost a lot of money we don't have to lose all the money to learn these lessons those lessons for us are free so you All the people in fintech if you are a bank there's a bunch of standards that's available to you mostly you can consider them as web two and you can inherit that to a larger degree there are some
challenges and because like because it's very centralized you have like a if you're in the UK FCA provides you with a bunch of things they say these are the cryptographic primitives you're allowed to use these are the test vectors these are the endpoints these are the test certificates for this thing we don't have any of those things so we have some challenges in mapping one to one But whatever we can adopt I think is free like you know I think like the upside is free you you've already been somewhere else through your experience or going through the pay. Yeah I think the fact that have is two hacks happening is very good. I think uh it signals that we are doing good as an industry and it became hard to hack the
smart contracts. so that they fall back to the uh fell back to the web two hacks and obviously the next step is maturing the um web two infrastructure of the web three companies and yes answering your question I think all those who can should add this to their offering um if you have web two background you have to offer the OPSAC and custodial security services as well yeah Okay. Yeah. So I just want to add this because like it's it's very relevant in that sense. This is not the first time that we have big challenges in obsc. So if you go to any
bank a bank would definitely have an offsite policy a very clear policy and for some reason in web 3 I haven't seen such a thing. So to me you know even if there's an offering there's no downside for not following anything. So I I don't know how we could fix that. And just to add a little bit, I feel like the methods that we use to manage the orgs are a bit weird. We use either like Telegram and Discord, which I don't think so are built for this, right? And like we we kind of push people towards that. Um and big companies because actually do not follow the I feel like basic security standards, right? Um they might be very good at ZK, but like they might be they are very bad at like matching like basic
level of security. So that actually segus me to my next question, right? Um the state of monitoring in crypto is still not not as good, right? We have seen a lot of hacks that could be avoided if the company just had basic maybe like invariant monitoring, right? Where and you know like and especially now with like having like sequences in most cases being centralized. Do you think most of the transactions like and hacks could be avoided if you just do an invariant check and if the application's invariant break you can probably not let that transaction exclude uh like you know included anyway like in in Ethereum that's definitely not possible at this stage but maybe let's say arbitrar uh it's still centralized in a
lot of aspect right what do you what do you think's around it I would say the politically incorrect thing it's you know it's very much antithetical to web three to do check and execute. Okay, so the the basic premise for web 3 is execute, right? Check and execute is something that you see in web 2 and all the financial institutions. But there's a huge value in doing check and execute. And the thing I would say is like in web 3 like blockchain as I would describe it, if you have an LLM or a machine learning model, you have so much of data that it is very easy for you to train it. You have all the past states, all the vulnerabilities that's been
published on chain. All the data that's happening is available to you live. So effectively, you could actually train a machine learning model and actually look at something if it's like a graph, you know, like okay, let's think about the normal internet, right? At the back end of most of the internet, there are IDSS and IPS, intrusion deduction system and intrusion provision systems that's working really, really, really fast. They are looking at the transaction graphs across the globe and make decisions and allow you to go through right it is very possible to adapt the same technology to do what we are doing with it very easy to but philosophically speaking I'm I consider myself more a purist so I am hesitant to suggest that but there is value to be had you know if
a particular chain and L2 or L1 wants to do it technology absolutely exist Do you have any thoughts around it? Um well I think the main thing about about the monitoring is um that uh huge number of startups started 3 years ago and uh right now most of them have closed like they were all to be honest disappeared because uh I don't know why but it's very hard to convince projects to uh integrate the monitoring solution. I don't know why. Okay. Okay.
So I I'll explain the economic incentive problem, right? So this is why I said what I said. When you have some imagine you run a bank, okay, you I know this is rhetorical, but in general, you are responsible to give them money that you put into the bank. You as the runner, the bank chairman of the bank. In a web three protocol, there's no such thing as like you know your protocol, your protocol got hacked, so what right? So the incentive for a protocol to actually engage and to pay a fee on top of the sequencing fee oh transaction fee just providing soal what I call a security premium that's how I would
describe it so this is the equivalent you can do it two ways right you could just implement this as an insurance mechanism an open market you could have a easy double-sided market right so the set of all people who actually have this machine learning models who actually put risk risk on each of the things happening and there could be a set of people bidding against that and what could actually happen is like whenever something fails you know the price of it and you can pay it off right so it's very possible to do but unfortunately because nobody has any incentive to or responsibility to actually make sure that protocol really works I think there's no incentive for anybody to pay anybody to monitor this or pay the insurance I mean technically centralized L2s right they do have incentive right
Because if a protocol built on their chain gets hacked, right, they lose CVL, they lose the volume, right? So I and they they can protect at the whole chain level, right? So I think like they have like a lot of incentives. They make a lot of money as well. I mean some do make a lot of money as well. Maybe they don't believe that these solutions work. I don't know. Like it seems so. They they look at this, they say cool, but then maybe they think about false positives. What if they start uh censoring the transactions all the time? Well, it it just means that you have to configure it properly. But okay, so full disclosure, so I was involved like uh 25 years ago creating
test vectors for intrusion deduction system, open source vectors. So that's a massive massive learning curve, right? So you I was involved in building a hidden marker model. I don't know if you know Marco model. So I build a hidden marker model. So what you have to so there's a project in MIT they created a test bench there was a bunch of people involved in creating all these things so you could actually have better security right if you go back in time and look at the attacks that were available on the internet all the stupid open-ended attacks on IP stack right like really stupid ones none now none of them work why because there is economic incentive for the people who operate the layers
every part of the layer to prevent that. So if you are like a cloud service provider and you are doing clouds scaling, if you have a hack on an IP layer, you're going to lose your bandwidth. So you have an economic incentive to deploy money to prevent that from happening. So you know if you are Cisco, you really have incentive to make sure that your switches support the protocol that provides security. If this were the same situation in web 3, I'm just saying this right in if there's an incentive, I'm pretty sure we will go through the growing pain. I completely agree with you about the false positives. Like we live a life of false positives, right? If you walk up to a doctor, you have a flu, that that symptom could be mapped to anything from
leukemia to everything else, right? Okay. you know, your doctor is going to say it's just a virus, the viral fever because that's the most likely scenario. So, you know, humans are pretty good at managing false positives. Awesome. So um my next question is towards you know like now we have seen like a a different trend in kind of getting your contracts audited right one is manual audit with the firm the other is the competitions now which have been very popular um and what do you think is the the exact recipe towards which way you should go for should it be just one or the other or should it should be a combination and if it's a combination what should be the sequence of the
combination Yeah, I feel like both worlds are merging in some way because all the contest platforms are are getting either acquired by audit firms or starting to offer audits, classical audits and I see the audit firms including ours doing the contests. We do contests internally between our auditors. We always allocate a pool and do a context contest. So yeah, briefly speaking you have to do both. Uh and there are obvious uh disadvantages of the contests where you have like 300 people and only two of them are actually doing the audit and maybe they're not that good. So you never know. So we have to have a
guaranteed audit by a set of professional auditors and also a crowdsourcing contest. Okay, I'm going to say some things. So firstly I on my LinkedIn if you find it you can see a blog post where I described this problem like 5 years ago. So this is a problem of double-sided markets. So the problem with the double-sided market is like a as an auditor nobody has an ability to give an assurance about the quality of an audit. And similarly on the other side of the problem it's like given a smart contract nobody really knows the real risk that one is underwriting. So the challenge we have is like you know if you have just a normal auditor doing an audit you get an
answer right but again this goes back to the problem you on a scale which is a variable you can have incredibly good which it's a tail distribution you have very few people so it's very unlikely that all the smart contracts are going to be audited by these people right so you need to have this matching problem which is essentially do you have the people the right skills for the right level of risk that's being underwritten by a smart contract. So there are mechanisms to do this and he's kind of alluding to one of them. I would say you know you should borrow techniques from mechanism design and this is a double sided market and fix it. That seems fair. Um so towards my last question, what was your favorite
smart contract or you know like hack in general in crypto probably like this year or last year? Um and why do you think it was good enough to be appreciated? I mean obviously people lost money so it's bad but in general my favorite hack is uh in the code which we audited and uh it was also audited by 10 other companies tier one security audit firms and it was insanely good hack we have a postmortem in our blog it's so good I have such a huge respect to this bad guy who did this he he he's extremely high skilled it's like It's insane. It was actually audited. There was a full-scale
audit done by 10 tier one security firms and all of them missed them and then for two years the bug existed in the production code with millions of dollars and no one noticed it and now it got hacked. So it happens. Was it one in or Yeah, it's one in. So it was genuinely good hack and yeah, that's my favorite one. Read our blog post about it. Oh, nice. I don't do a living auditing code so I can't give one. Like I don't want to be in one side of an argument. I have lots of ones where I look at it and go look this is really
stupid. The way I would say is like if you can look at the code and it's obvious to you that it's going to happen that's a low hanging hack. when it's a hack in the mechanism design that's when I would go like if there is a hack let's put it this way if there is a hack the person has created a bunch of circuits connected it through some uh you know what do we call sophisticated cryptographic mechanisms and then get the thing out from a mechanism design perspective that's my hat off to that person let's put it that way awesome um let's put the floor to the audience if you guys have any questions Any questions? Looks like not. So,
um I think then we're going to wrap up. So, yeah, thank you guys for, you know, doing this and it was lovely. Thank you.