New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Birthmarking Your Smart Contracts For Vulnerability Search by Han Liu (Devcon5)

DevconFri, Oct 9, 2020, 12:00 AM

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on IPFS and more. https://archive.devcon.org/archive/watch/5/birthmarking-your-smart-contracts-for-vulnerability-search In this talk, we will highlight an automatic vulnerability search technique for smart contracts. In the context of security, vulnerability search enables us to make quick response to new threats and zero-day exploits. In those cases, well-designed analysis is far from prepared to deliever precise detections. Our vulnerability search technique can act as a complement in this setting to efficiently identify potentially vulnerable contracts without heavyweight in-depth reasoning and analysis.The key insight is to "birthmarking" a smart contract by abstracting its programming intents. Generally, the generation of birthmarks is realized via symbolically executing the bytecode of a smart contract and building global dependency on the fly. More specifically, both syntax features (e.g., number and type of instructions) and semantic features (e.g., load and store at the same storage) are considered in birthmarks. Then, the task of searching for a known vulnerability is converted to computing a similarity between a target contract (with the vulnerability) and a candidate contract (may/may not have the vulnerability). We have implemented a prototype to search for known vulnerabilities and conducted large-scale evaluations on real-world security issues. Particularly, we will use CVE­-2018-­10376 to explain how the search technique can help existing security analyzers Speaker(s): Han Liu, Qian Ren, Zhiqiang Yang Skill level: Intermediate Track: Developer Infrastructure Keywords: technical Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum Learn more about devcon: https://www.devcon.org/ Learn more about ethereum: https://ethereum.org/ Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. Devcon 5 was held in Osaka, Japan on Oct 8 - 11, 2019. Devcon is organized and presented by the Ethereum Foundation, with the support of our sponsors. To find out more, please visit https://ethereum.foundation/

Transcript

[Applause] [Music] ok number one I think I do and I am a researcher from the officer I am watching every circuits - and I will be talking about risk for finding a LAN or even seeing a smart conference it's a company we do by our contract you might want to do a validation procedure for example you can write a group of test cases to test whether your contract gross enough or you can use a verification tool to verify whether a specific property close enough or you can find an auditing team to send you a contract to them and get their feedback after that hopefully you can get useful feedback and optimize your smart contracts and you can put them on the blockchain but in some cases those valuations might not be able to work for example if there are a lot of large corporates of auditing requests requests you might it might take a while for you to get feedback from an audit team or if something new some some new problems just come out in your application and testing - all have not been updated yet they might not be able to give you a good detection so if you look at this CBE sample which was reported last year and you may find that this very simple integer will flow might be able to cause a zero pain transfer in this transfer proxy function and it was happening in many other token concepts last year and when we used some existing analyzers to analyze this security issue away they told us that nothing's nothing was found so which was obviously for snacking in this setting so the reason for this is that some of the analyzers when they see and overflow they they were not directly recording instead they will check whether this integer rules will be followed by a lesson with River operation if so they might consider this as a protection mechanism such like the safe math library and this one does is just not this case so what we are trying to do is that when you have your contract we would like to know whether there your contract can be matched to some existing knowing security issues and instead of directly and illogical so you can also do this for those contracts which are already deployed on the blockchain and to this end we are exploiting the idea of kok-long detection technique specifically we are generate a birthmark representation for the vulnerable contacts or the database itself and you do the same for your contacts and we analyze the semantics of them and you do a sort of cross matching algorithm and identify whether they are semantically similar to each other and given the concept we create the control flow graphs for the contract and we perform supporting execution on the graph itself and we refine the graph on the fight to make it as complete as possible and for each basic block in the control flow graph we are we first we abstract the past additions to resemble and secondly we analyze the dependency patterns in the block for example we will check which storage arrival was first update it how did it in the block and then used as that's a premier of a message home operation and such dependency panel will help us better understand the behavior of this block itself and also the whole contract as well and then we got a numerical label control flow graph and then we we can do this at a constant level or a functionable and that's given to the pair of contract robots where your first compute their vector numeral vector distance and then we are adopting women adopt the similar similarity by construction ideas - I can calculate how and what probability is - contracts or functions can be cemented clones or to each other and we have also deduct this in chrome toward who to implement to implement this idea and we have done a bit of preliminary evaluation and it turns out the evil troll can manage to deliver better detection capability than paid based on approach with omake considers the syntactic information in the concept and that will conclude my talk and if you have a are interested in more details you can refer to this to move of the epidemic papers ending in addition to a smart fantastic theory we also into other interesting things including rat attack or other security rules on our project and we tell you to know any [Applause]

Automatic transcript — names and jargon may be misspelled.