SlideShare a Scribd company logo
Web3 Security: The Blockchain is Your SIEM
Web3 Security
The Blockchain is Your SIEM
Tal Be’ery
Shalev Keren
👋 Hi, I’m Tal Be’ery
● Co-Founder, CTO @ ZenGo
● 20 years of cyber security experience
● Former EIR Innov8 VC, VP Research Aorato
(acquired by Microsoft)
● @talbeerysec
👋 Hi, I’m Shalev Keren
● Cryptography and Blockchain
Research @ ZenGo
● @shalev0s

Recommended for you

BLOCKCHAIN
BLOCKCHAINBLOCKCHAIN
BLOCKCHAIN

This document discusses blockchain technology and its potential applications. It defines blockchain as a shared, distributed ledger that allows participants in a business network to view transaction records. Blockchain addresses the problem of difficulty monitoring asset ownership and transfers in a trusted network by providing a permissioned, replicated shared ledger. The key properties that enable this are decentralization, strong authentication, and tamper resistance. The document also discusses public versus private blockchains and the challenges and opportunities blockchain poses for financial institutions in validating transactions without third parties.

bitcoinsblockchaindigital currency
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart Contracts

Blockchain & Smart Contracts! This document provides an introduction to blockchain and smart contracts. It discusses what a blockchain is, why many blockchains exist, consensus algorithms like proof of work and proof of stake, public versus private blockchains, smart contracts and how they work, examples of successful smart contracts, potential use cases, and CIT blockchain projects including Catena which provides blockchain as a service and an iRobot proof of concept.

blockchainsmartcontractsdapps
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101

Blockchain 101 talks about blockchain from a very basic perspective (non-technical). This presentation gives you an idea of what blockchain really is beyond cryptocurrency, different types of the blockchain, components of a blockchain, essentials of the blockchain, and myths about blockchain. this presentation also throws light on major applications of the blockchain , its advantages and limitations, major consortiums and startups in this space and the timeline of development. we also tried to include how a use case for blockchain can be identified and how startups need to go about building a blockchain product or services This presentation was developed by Jithin Babu and Sakshi Manthanwar. Both of them are blockchain researchers and consultants. For more info regarding presentation kindly contact jithinbabu555@yahoo.com

fintechdistributed ledger technologybitcoin
Agenda
● What is Web3
○ Web3 intro: Web on the Blockchain
○ The Web3 triangle: Wallet, Smart Contracts, Web2 Frontend
● Security in the Web3 triangle
○ Web3 Security problem
○ Wallet attacks: 1 key to rule them all + solutions
○ The blockchain is our SIEM!
■ Frontend attacks: BadgerDAO incident
■ Smart Contracts attacks: The MultiChain incident
● Web3 security solutions
○ Application level firewall
○ Web3 Personal Firewall
○ Web3 Application Firewall (W3AF)
Web 3: Intro
But first a story
Web2

Recommended for you

Blockchain Security and Privacy
Blockchain Security and PrivacyBlockchain Security and Privacy
Blockchain Security and Privacy

Presentation by DHS S&T at the NY Blockchain 360 Conference regarding Blockchain's relevance to the Homeland Security Enterprise. Results of security and privacy research and development over the last 2+ years and next steps.

blockchainsecurityprivacy
Blockchain
BlockchainBlockchain
Blockchain

This document provides an overview of blockchain technology. It discusses that blockchain was first introduced in 2008 as a way to facilitate digital transactions without a central authority. Blockchain uses cryptography, a digital ledger, and a consensus mechanism to securely record transactions. The blockchain is made up of blocks that contain cryptographic hashes linking them together. Miners use proof-of-work to verify transactions and are rewarded with cryptocurrency. Once recorded, transactions cannot be altered, providing transparency and security.

blockchaincryptocurrency
Smart contracts using web3.js
Smart contracts using web3.jsSmart contracts using web3.js
Smart contracts using web3.js

Smart contracts can be deployed and executed on the Ethereum blockchain using web3.js. Web3.js is a JavaScript API that allows interaction with Ethereum clients like Geth to deploy contracts, call contract functions, and get information from the blockchain. Contracts are written in languages like Solidity and deployed through transactions that store the compiled code at an address. Once deployed, the contract code and data resides on the blockchain and can be interacted with through web3.js by calling functions or accessing public variables.

blockchainethereumsmart contracts
Web3: Moving apps to the blockchain
Blockchain - quick reminder
● “Just” a distributed database
○ Reaching a consensus on conflicts is not trivial!
● Messages are authenticated
○ User address corresponds to a public key
○ User signs messages with a private key
○ Private key stored in a wallet
● Very useful for money transfer!
● Bitcoin (2009) is doing that:
○ “1 built-in program”: “Send(source,dest,amount)”
■ Check authenticity by verifying the user’s signature on the transaction
■ Add amount to dest, subtract amount from source
■ Results are saved in the blockchain
Classic Blockchain
Blockchain: beyond sending money
● Ethereum, co-founded by Vitalik (2015)
○ Has a similar “1 built-in program” for money transfer
○ But also, allows users to upload custom code (smart contract) and interact with it
■ Smart contracts are uploaded into addresses
■ Smart contracts expose callable methods
■ Very similar to a dynamic library (“.dll”, “.so”)
○ When interacting with a contract
■ Destination address is the contract
■ Function name and call parameters are passed as part of the transaction
■ Network fee (“gas”) depends on the complexity of the execution

Recommended for you

Blockchain
BlockchainBlockchain
Blockchain

Blockchain in a nutshell, basic idea of blockchain, Types of blockchain working of blockchain barriers of blockchain blockchain and cryptocurrencies

cryptocurrencyblockchainblock chain working
Block chain technology
Block chain technologyBlock chain technology
Block chain technology

This is My Presentation Slide based on Block Chain Technology and it's future. I did it in my Network Security Course.

block chain technologyblock chainnetwork security
An Introduction to Blockchain Technology
An Introduction to Blockchain Technology An Introduction to Blockchain Technology
An Introduction to Blockchain Technology

Blockchain technology allows for a shared, replicated ledger of transactions that can be viewed by all participants. It enables peer-to-peer exchanges on a distributed network in a secure and non-repudiable way. Blockchain solves issues with monitoring asset ownership and transfers in a trusted business network by providing a permissioned, replicated shared ledger. It is not just for cryptocurrencies like Bitcoin but can be used for any form of asset registry, inventory, and exchange across different industries. The future potential of blockchain applications is still emerging as it will be applied experimentally to many aspects of society over the next few years.

Web3 Echosphere: Web + Blockchain
The Web3 Triangle
● Web2 app interface: App UX, suggests transactions to the user
● Wallet: key management, transaction signing and blockchain interaction
● Blockchain smart contracts (“contracts”): implements the app’s logic.
Example: NFT
● The user owns NFTs
○ Ownership is public on blockchain
○ User can transfer via wallet
● Multiple marketplaces
○ For example: Opensea, rarible
● Side note:
○ Ownership is “not perfect”
○ See: moxie
○ But is fixable
Web3 Security: The problem

Recommended for you

The future of crypto wallets
The future of crypto walletsThe future of crypto wallets
The future of crypto wallets

What are crypto wallets? How different are they from exchanges? What is their job to be done? where are they weak? What is the potential and future they hold Brought to you by @ZenGo

cryptoblockchainwallets
Blockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricBlockchain - HyperLedger Fabric
Blockchain - HyperLedger Fabric

The document discusses HyperLedger Fabric, a permissioned blockchain framework. It provides an overview of key Fabric concepts including its architecture, components, transaction flow, and how it differs from other blockchain platforms like Ethereum. The summary is as follows: [1] HyperLedger Fabric is a permissioned blockchain framework that uses channels and smart contracts called chaincode to allow for private and confidential transactions between specific network members. [2] It has a modular architecture consisting of peers that host the ledger and chaincode, an ordering service to sequence transactions into blocks, and a certificate authority for identity management. [3] Transactions in Fabric are validated by endorsing peers running chaincode, ordered into blocks by

blockchainhyperledgerhyperledger fabric
MongoDB and BlockChain
MongoDB and BlockChainMongoDB and BlockChain
MongoDB and BlockChain

Blockchains promise significant benefits but also face challenges to widespread adoption. Some key challenges are a lack of interoperability between different blockchain networks and platforms, as well as issues around integration with existing systems and scaling to meet enterprise needs. Interledger aims to address the interoperability challenge by providing a protocol for connecting various ledger systems, including blockchains, to enable asset transfers between them. This allows for a more connected "Internet of Value" and new business opportunities across platforms.

mongodbdatabasenosql
Web3 has a security problem
Security #1: Wallet
Wallet Security
● Attacks on private key:
○ Theft: phishing, malware, stolen backup, fake wallets
○ Loss: key is lost and backup fails
● Wallet security is key security
● Web3 is pretty much same as for “old” crypto
● Solutions: protect key with a “secure” wallet
○ Hardware
○ MPC
https://research.checkpoint.com/2021/cpr-alerts-crypto-wallet-users-of-massive-
search-engine-phishing-campaign-that-has-resulted-in-at-least-half-a-million-
dollars-being-stolen/
ZenGo is the Safe & Secure Crypto Wallet.
Buy, store, trade, and earn crypto in a tap.

Recommended for you

Blockchain
BlockchainBlockchain
Blockchain

This document provides an introduction to blockchain technology. It discusses the history of blockchain, which began with Bitcoin in 2009. Blockchain consists of a series of linked blocks containing transaction summaries secured using cryptography. Transactions are validated by nodes in a peer-to-peer network before being recorded in a new block added to the blockchain. Current applications include cryptocurrencies like Bitcoin, smart contracts, and distributed data storage. Advantages include security, transparency and decentralization, while disadvantages include volatility and implementation challenges. The future scope of blockchain is presented as significant for benefiting society through applications like identity management and data marketplaces.

blockchainbicoincryptocurrency
Blockchain basics
Blockchain basicsBlockchain basics
Blockchain basics

Blockchain technology is gaining significant attention and investment from major banks and financial institutions. Banks are projected to invest $400 million in blockchain by 2019, and over 30% of firms surveyed have annual blockchain budgets over $5 million. Blockchain uses distributed ledger technology to securely record transactions in digitally recorded "blocks" that are linked together, allowing participants on a blockchain network to reach consensus on a single view of the truth. This consensus-based approach provides advantages over traditional centralized databases by enabling trustless verification and transparency across organizations without the need for intermediaries.

blockchain
Cryptocurrencies and Blockchain technology
Cryptocurrencies and Blockchain technologyCryptocurrencies and Blockchain technology
Cryptocurrencies and Blockchain technology

This document provides background information on cryptocurrencies and blockchain technology. It discusses cryptocurrencies like Bitcoin and Ethereum, initial coin offerings, how to obtain cryptocurrencies, and price fluctuations. It also explains blockchain technology including how transactions are processed and validated through hashing, digital signatures, and proof of work. Potential applications or "killer apps" of blockchain technology discussed include payments, registries, supply chain management, and digital identities. The document concludes with information on blockchain initiatives in Austria.

blockchaincryptocurrenciesinitial coin offering
Threshold Signatures (TSS): 1 becomes 2
● Private key becomes distributed: no longer a Single-Point-of-Failure
● Distributed protocols: back and forth messages exchange between parties
○ Key generation: each party creates a “Share” (which is not “half of the key”)
○ Signing: using the Shares, parties sign together
● The signature looks the same!
● When 1 (private key) becomes 2 (shares):
○ Harder for attackers to steal: needs to compromise both parties
○ Easier to backup: each share is meaningless by itself
ZenGo: Easy + Secure
● The first “keyless” wallet: No more (single) private key
● Security:
○ Confidentiality:
■ 2 Party (2-P) Threshold Signatures
● ZenGo Server
● ZenGo app on the user’s device
■ Each share is stored in a secure manner
○ Availability
■ Cloud based backup for each share
● UX: Mobile app
○ Already in the pockets of customers
○ No additional cost
Security #2: FrontEnd
The BadgerDao hack
BadgerDao
● “Bringing Bitcoin to DeFi” : Earn interest on your BTC
○ via ERC20

Recommended for you

Blockchain (1).pptx
Blockchain (1).pptxBlockchain (1).pptx
Blockchain (1).pptx

This document discusses blockchain technology, including what blockchain is, how it works, types of blockchain networks, applications of blockchain, advantages and disadvantages. Blockchain is a distributed digital ledger that records transactions in blocks that are linked using cryptography. It allows for transactions to be recorded and distributed without a central authority. Consensus algorithms like proof of work are used to validate transactions and add new blocks to the blockchain. Blockchain has applications in financial transactions, asset tracking, data storage and decentralized applications. Its advantages include transparency, security and cost reduction. However, it also faces challenges related to speed and implementation costs.

Block chain technology
Block chain technologyBlock chain technology
Block chain technology

Block Chain Technology is the redesigning of the way transactions will be processed. It is tantamount to as paradigm shift the way of doing business.

block chain technologynew technologybct
Web3’s red pill: Smashing Web3 transaction simulations for fun and profit
Web3’s red pill: Smashing Web3 transaction simulations for fun and profitWeb3’s red pill: Smashing Web3 transaction simulations for fun and profit
Web3’s red pill: Smashing Web3 transaction simulations for fun and profit

The introduction of Web3 smart contracts has opened unlimited opportunities for decentralized apps (dApps) and users. With smart contracts, anything that can be coded can be deployed by anyone on the blockchain. As a result, in a Web3 environment, the users’ blockchain transactions, previously merely used for sending coins to peers, are now, in fact, Remote Procedure Calls (RPCs) for smart contracts. The flip side of this expressiveness is that it’s almost impossible to know analytically in advance what would be the outcome of such RPC to an arbitrary smart contract. Attackers abuse this observability gap to trick users into signing transactions that are harmful in reality. This situation bears a close resemblance to the desktop environment: users need to evaluate in advance if a particular program behavior will be benign. To solve this gap, Web3 security has taken a page out of the desktop’s security book by using a sandbox-style emulation to evaluate the transaction's outcome before it gets sent to the blockchain. In Web3 lingo, such sandbox emulation is referred to as transaction simulation. In this talk, we will present our newly discovered attack methods against Web3 simulations, including the first-ever Web3 red pill exploits that allow smart contracts to know that they are running in a simulation and as a result, need to behave differently. We have tested our findings against numerous leading simulation providers in the Ethereum Virtual Machine (EVM) domain and found that they are indeed vulnerable to such attacks. As a result of our responsible disclosure, multiple (currently three) issues were fixed, and we were awarded bug bounties. We will explain these exploits in detail, including the research methodology allowing us to inspect simulators’ inaccessible inner workings. We will conclude with new and enlightening insights we gained through this research regarding the true capabilities and limitations of Web3 simulations.

web3ethereumcybersecurity
What is ERC-20?
● Standard implementation of a “coin” on Ethereum
● Before ERC20, if you wanted your own coin, you needed to create your own
blockchain
● Now, you just need to implement some known methods in your contract:
CloudFlare: Hackers’ entry method
● CloudFlare (CF) is a web2 proxy
○ Security, Content caching (CDN)
● BadgerDAO (BD) uses CF
● CF has a feature to add content to website
(“workers”)
● [Aug 2021] Hackers used a vulnerability in CF to
add API key to workers controlled by attackers
○ Required some mistakes on BD side too [Sep 2021]
● Hackers are now able to inject code into BD’s
web2 interface!
The injected script
● [Nov 2021] first version injected
● We were able to locate it independently 😊
○ via https://web.archive.org
● We then de-obfuscated it
● Code Diff (The injected website is in red on left)
Injected script
● Hooking Dapp communication with the wallet

Recommended for you

Daniel Connelly Ethereum Smart Contract Master's Thesis
Daniel Connelly Ethereum Smart Contract Master's ThesisDaniel Connelly Ethereum Smart Contract Master's Thesis
Daniel Connelly Ethereum Smart Contract Master's Thesis

Ethereum is a unique offshoot of blockchain technologies that incorporates the use of what are called smart contracts or Dapps – small-sized programs that orchestrate financial transactions on the Ethereum blockchain. With this fairly new paradigm in blockchain, however, comes a host of security concerns and a track record that reveals a history of losses in the range of millions of dollars. Since Ethereum is a decentralized entity, these concerns are not allayed as they are in typical financial institutions. For example, there is no Federal Deposit Insurance Corporation (FDIC) to back the investors of these contracts from financial loss as there is with bank depositors. Furthermore, there is also no Better Business Bureau (BBB) or Consumer Reports organization to offer any sort of ratings on these contracts. However, there exists a well-known method for verifying a program’s integrity; a method called symbolic execution. Such an examination promises to give not only a perspective on the security of Ethereum, but also highlight areas where security experts may need to target to more quickly improve upon the security of this blockchain. This paper proposes a solution to ensuring security and increasing end user confidence -- a digital registry of smart contracts that have security flaws in them. A rating system for contracts is proposed and the capabilities one has with knowledge of these vulnerabilities is examined. This research attempts to give a picture of the current state of security of Ethereum Smart Contracts by employing symbolic analysis on a portion of the Smart Contracts up until approximately the 8.4 millionth block. Vulnerabilities in Smart Contracts may be prevalent and, if they are, a registry for enumerating which ones are can be built and potentially used to easily enumerate them.

ethereumblockchainsecurity
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018

Due to the immutability of the ledger and the difficulty to update their consensus rules, Blockchain applications have many critical layers where a bug can cause huge, irreversible fund losses. This talk will shed some light on why and how Blockchain applications are so critical and will discuss past events that led to fund loss or consensus failures due to bugs in critical parts of the code of Bitcoin and Ethereum applications.

codemotioncodemotion milan 2018technology
Fluent destry saul
Fluent destry saulFluent destry saul
Fluent destry saul

Blockchains can be used as backends for applications by utilizing smart contracts and storing data immutably on the blockchain. While blockchains are not ideal for all use cases due to their expensive and slow nature, they enable building decentralized applications where security is important. Developers can build apps that interact directly with smart contracts, or provide front ends that reference blockchain data without needing their own servers.

bitcoinethereumblockchain
Injected script
● Filter Unwanted Victims
○ Don’t Attack Admins (BadgerDAO devs)
○ Victim has more than $50K or a special test account
Injected script
● Inject Malicious Approve
○ The attacker always asks for an approval to the vault with the largest locked value
■ If the user is interacting with the largest vault, an approve tx is injected to the
attacker’s address
■ If the user is interacting with another vault a sneaky increaseAllowance is injected
instead
IncreaseAllowance vs. Approve
● We created a web3 app in lab to
test
● Inferior user experience
○ No humanly understandable explanation
○ Not showing user that they are
interacting with an ERC20 contract
Injecting Approve

Recommended for you

How to Create Blockchain Products by Fr8 Network Lead Engineer
How to Create Blockchain Products by Fr8 Network Lead EngineerHow to Create Blockchain Products by Fr8 Network Lead Engineer
How to Create Blockchain Products by Fr8 Network Lead Engineer

Blockchain has swept the tech space by storm and we are now seeing the first wave of products built using this technology. One of the biggest challenges with blockchain is taking very technical concepts, such as signing transactions, and making them intuitive and easy to use. In this talk, Yev discussed the tools, design decisions, and best practices involved when creating a blockchain product.

productproduct managementproduct school
How to Create Blockchain Products by Slice.Market CTO
How to Create Blockchain Products by Slice.Market CTOHow to Create Blockchain Products by Slice.Market CTO
How to Create Blockchain Products by Slice.Market CTO

Main takeaways: -Intro to blockchain concepts, public/private keys, signing transactions, wallets, -Product challenges unique to blockchain -Metamask and other tools that people currently use to interact with the Ethereum blockchain -Common design and product considerations when making a blockchain product

blockchainproduct managementmetamask
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...

After a brief introduction on what is blockchain technology and how it works under the wood, focusing on Ethereum the next generation blockchain implementation. We will focus on the concept of smart contract introducing it through a simple case study and its standard implementation in ethereum. We will code it using Solidity language deploying and testing it in a live demo on Ethereum test network.

codemotion milan 2017
Injecting IncreaseAllowance
The first success
● Victim approving attackers’ address [20 Nov 21]
○ 0x1fcdb04d0c5364fbd92c73ca8af9baa72c269107
● https://etherscan.io/tx/0x9a900fbe6136a44bbfd43de9c18947977990acee5
fb41e7d9a76562aed960a51
$50M fish
● A big fish ($50M in BD) approved [1 Dec 21]
○ https://etherscan.io/tx/0x5e4c7966b0eaddaf63f1c89fc1c4c84812905ea79c6bee9d2ada2d2
e5afe1f34
● This time it was approve via a lesser known method
○ IncreaseAllowance
Who is $50M fish?
● According to press
○ Celsius
○ Using MetaMask

Recommended for you

Brief Introduction to Blockchain Security
Brief Introduction to Blockchain SecurityBrief Introduction to Blockchain Security
Brief Introduction to Blockchain Security

This slide is a entry level introduction to blockchain security, it illustrates the current status of the issue, summarises attack methodology, and reviewed a few past hack cases.

blockchaincryptocryptocurrency
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency appDylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency app

This document discusses building a cross-platform cryptocurrency application. It covers using a monorepo architecture for code reuse across mobile, desktop, and npm library applications. It also discusses developing cryptocurrency wallet features like generating transactions and signatures, smart contracts, and blockchain basics.

devcampcryptocuttencydevroots
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contracts

- Quick update in blockchain tech space - Comparision between tech - Security in Blockchain (Focusing on ETH Solidity attack vectors) - Design patterns - 2 Popular hacks (Case study)

eosioblockchainethereum
Pulling the dragnet (1)
● When the fish is in the net it’s the time to pull the whole dragnet out
● Attacker reacted in 6 hours time
○ Exactly on 00:00 (UTC time) [2 December 21] (maybe automated?)
Pulling the dragnet (2)
● Now it’s time for attackers to exploit all other approvers
Security #3: Smart Contracts
The MultiChain hack
Multichain
● Multichain Router (previously AnySwap)
allows users to freely swap tokens
between two chains.
● Exploited
○ Started January 18th 2022
○ >1900 Eth Stolen (~$5M)
● Smart Contract logical error
● Full Analysis: zengo/multichains-
exploit-explained

Recommended for you

Blockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOsBlockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOs

Blockchain has gained lots of attention in recent years. Bitcoin and Ethereum are leading the race. Crypto currencies in spite of uncertainty and volatility are here to stay. Smart contract programming is the future for the Internet 3.0.

blockchianbitcoinetherum
Total privacy of transactions, Mimblewimble and Grin
Total privacy of transactions, Mimblewimble and GrinTotal privacy of transactions, Mimblewimble and Grin
Total privacy of transactions, Mimblewimble and Grin

Mimblewimble protocol, initially proposed in 2016 as a privacy and scaling solution for Bitcoin, is the essence of the latest cryptography and blockchain inventions of top scientists and core bitcoin developers. Grin, is the famous implementation of this protocol, eagerly expected by industry. It was launched this year on the 15th of January as a separate blockchain and a completely private payment system with its own coin.

mimblewimblegrinbeam
Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...
Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...
Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...

These slides exemplify how to employ the tools available through Cloud Foundry and Kubernetes to enable a continuous integration and continuous delivery pipeline on blockchain.

oss cloud foundrykubernetesk8s
Tools: Web3 debugger
● We used online smart contract debugger to “replay” the transaction attack
● https://dashboard.tenderly.co
Multichain : The vulnerable code
https://gist.github.com/zhaojun-sh/0df8429d52ae7d71b6d1ff5e8f0050dc#file-anyswaprouterv4-sol-L245-L261
SwapWithPermit: Original functionality
Using this function, the caller can present a “Permit” (= another user’s signed
approval) and transfer money accordingly
unwraps the underlying token from the its anyswap wrapping
The underlying token’s contract permit() is called to approve the router’s ability
to withdraw an amount from the user’s (from) address, as the user supplied a
signed (v,r,s) “permit” message
If we passed this part successfully, the signature is assumed to be verified and
the function sends the signing user funds
Attack - step 1
● It’s intended to unwrap the underlying token
from the its anyToken wrapping .
● However, the token parameter value is
controlled by the attackers, and they pass
their own malicious contract address.
● Multichain failed here as this function
should have checked if the token address is
indeed of a Multichain token
● We can see in the debugger, that this
attackers’ contract now returns WETH
(address 0xc02..) as its “underlying asset”.

Recommended for you

Blockchain Basics
Blockchain BasicsBlockchain Basics
Blockchain Basics

Blockchain from Technology, Economics, Business, Legal and use cases perspective. Discussed at Stanford University.

blockchaincryptocurrencytechnology
Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract

This presentation is part of New Product Developers (NPD) meetup regularly conducted by Divum. In this session, we covered gentle introduction to blockchain to running a truly decentralised Pizza ordering application built using solidity on ethereum.

ethereumblockchainbitcoin
Blockchain architected
Blockchain architectedBlockchain architected
Blockchain architected

This document discusses key concepts and components related to blockchain solutions, including actors such as users, developers, operators, and architects. It describes various components that make up blockchain solutions such as ledgers, smart contracts, consensus mechanisms, and how applications interact with blockchains. It also covers considerations for blockchain developers and operators, and challenges around integrating blockchains with existing systems and achieving determinism.

blockchainibmwatson kista summit 2018
Attack - step 2
● Originally, permit() was supposed to be called
to verify the signed permit.
● However, WETH contract does not have a
permit() function!
● WETH contract does have a “fallback
function” that is called when a function is
called but not found. As a result, the function
does not fail although the sig is not verified!
● All of victim’s money can be sent to attacker!
Tools: Using Dune to analyze the attack
● Dune is an analytics tool that ETLs Ethereum blockchain data into a SQL DB
● The vulnerable function was redundant!
○ It was never used before the attackers used it on January 18th
Tools: Using Dune to monitor the attack
● Created an updating dashboard too!
● https://dune.xyz/talbeerysec/Multichain-hack
Web3 Security: Solutions

Recommended for you

An introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruAn introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ru

The document provides an introduction to blockchain and Hyperledger. It discusses how Hyperledger Fabric now supports Ethereum smart contracts, allowing Ethereum developers to integrate with and migrate to Hyperledger Fabric. It also summarizes some of the key components, security aspects, and functionality of IBM's blockchain platform and Hyperledger, including consensus mechanisms, identity management, pluggable components, and how applications interact with the platform.

blockchainhyperledgeribm. blockchain
Last mile authentication problem: Exploiting the missing link in end-to-end s...
Last mile authentication problem: Exploiting the missing link in end-to-end s...Last mile authentication problem: Exploiting the missing link in end-to-end s...
Last mile authentication problem: Exploiting the missing link in end-to-end s...

"With ""Trust none over the Internet"" mindset, securing all communication between a client and a server with protocols such as TLS has become a common practice. However, while the communication over Internet is routinely secured, there is still an area where such security awareness is not seen: inside individual computers, where adversaries are often not expected. This talk discusses the security of various inter-process communication (IPC) mechanisms that local processes and applications use to interact with each other. In particular, we show IPC-related vulnerabilities that allow a non-privileged process to steal passwords stored in popular password managers and even second factors from hardware tokens. With passwords being the primary way of authentication, the insecurity of this ""last mile"" causes the security of the rest of the communication strands to be obsolete. The vulnerabilities that we demonstrate can be exploited on multi-user computers that may have processes of multiple users running at the same time. The attacker is a non-privileged user trying to steal sensitive information from other users. Such computers can be found in enterprises with centralized access control that gives multiple users access to the same host. Computers with guest accounts and shared computers at home are similarly vulnerable."

authentication securityend-to-end secure communicationcyber security
Blockchain Fundamentals for Beginners - 101 Blockchains
Blockchain Fundamentals for Beginners - 101 BlockchainsBlockchain Fundamentals for Beginners - 101 Blockchains
Blockchain Fundamentals for Beginners - 101 Blockchains

Blockchain is the new form of technology. Learn about the fundamentals of blockchain technology, use cases, and more in this presentation.

blockchainblockchain fundamentals101 blockchains
Insights from post mortems
● We have done dozens of them as part of our research
● All based on publicly available data
○ The Blockchain is our SIEM!
○ Open source contracts
● Most of our analysis can be
○ Automated
○ Done in real time
● We can detect and mitigate attacks in real time (Firewalls!)
○ Protecting users from rogue interfaces and smart contracts
○ Protecting contracts against exploiting transactions
■ mitigation can be done by pausing contracts, blacklisting attackers address in
exchanges
Web3 “bonuses” for Firewalls
● The blockchain is your SIEM!
● False positive analysis is much easier
○ You can check your proposed rule against all past traffic
○ Create, test, tweak cycle is fast!
● Anomaly detection is much easier
○ You have the full history to train from blockchain
○ Learn, test, tweak cycle is fast!
Web3 Personal Firewall
Web3 Personal Firewall rules examples
● To protect against BadgerDao like attacks:
● Rogue approve transaction detection
○ Approve’s Spender address reputation
■ EOA or contract?
■ If contract
● Is contract code publicly available
● Who deployed, and how it’s related to the requesting app
■ How many interactions with other users?

Recommended for you

Ethereum
EthereumEthereum
Ethereum

A basic introduction on Ethereum Blockchain. It covers some important jargon of Ethereum, Solidity example and tools to write Solidity.

ethereumblockchainsolidity
Give me some (key) space!
Give me some (key) space!Give me some (key) space!
Give me some (key) space!

This document summarizes various topics related to cryptocurrency wallets and security. It discusses the risks of early "brain wallets" that used passphrases to generate private keys, introduces BIP-39 standards for generating mnemonic phrases from entropy, and describes cases where vanity addresses were exploited by brute forcing the private keys that generated contract addresses.

cryptocurrencybitcoinelliptic curve cryptography
Understanding Compound‘s Liquidation
Understanding Compound‘s LiquidationUnderstanding Compound‘s Liquidation
Understanding Compound‘s Liquidation

Decentralized Finance (DeFi) is one of today’s most compelling crypto narratives and Compound is one of its most prominent examples. ZenGo research team has taken a deeper look into one of the most intriguing and novel aspects of the Compound protocol, the Liquidation process. This whitepaper (originally published on early 2020) offers a step-by-step technological explanation and financial survey of Compound’s Liquidation process and thus offers a learning opportunity on a prominent DeFi project, relevant for both experts and beginners.

cryptocryptocurrencyethereum
Web3 Application Firewall
Web3 Application Firewall rules examples
● To protect against Multichain hack
● Redundant functions usage
○ Alert on usage of a function that was rarely used in the past
● Invalid parameters
○ Profiling on allowed parameters value
○ Would detect that it’s used only with MultiChain specific contracts
Outro
Takeaways
● Web3 is (possibly?) the next step for Web
● Currently, Web3 security is in dire straits
● However, great potential to secure it
● The blockchain is your SIEM
● All data is available to all!
● Security researchers’ paradise!

Recommended for you

The Color of Money
The Color of MoneyThe Color of Money
The Color of Money

This document summarizes an Elliptic Curve Cryptography (ECC) presentation about a Bluetooth pairing attack. It begins with an introduction of ECC using an analogy of billiards on an elliptic curve table. It then explains how ECC is used for key exchange in Elliptic Curve Diffie-Hellman (ECDH). The document describes a Bluetooth pairing vulnerability that allows an attacker to perform a man-in-the-middle attack on the ECDH key exchange by manipulating the Y-coordinate. This places the ball in a position where it can predict the shared secret if the private keys are both even numbers.

elliptic curve cryptographycryptobluetooth
Open Sesame: Picking Locks with Cortana
Open Sesame: Picking Locks with CortanaOpen Sesame: Picking Locks with Cortana
Open Sesame: Picking Locks with Cortana

Cortana has several components that could be exploited by attackers to compromise systems or retrieve sensitive information: 1. The Cortana agent on devices is powerful and can accept input even when screens are locked, allowing commands through the "Open Sesame" vulnerability. 2. Cortana's voice actions could be used to invoke unsafe browsing on locked screens through the "Voice of Esau" attack, potentially leading to remote code execution. 3. Third-party Cortana skills could be authorized on locked screens, allowing the invocation of skills with malicious payloads through the "Skill of Death" scenario. Proper design is needed to secure new interfaces like Cortana, as adding capabilities to locked screens

cortanawindowswindows10
THE VOICE OF ESAU: HACKING ENTERPRISES THROUGH VOICE INTERFACES
THE VOICE OF ESAU: HACKING ENTERPRISES THROUGH VOICE INTERFACES   THE VOICE OF ESAU: HACKING ENTERPRISES THROUGH VOICE INTERFACES
THE VOICE OF ESAU: HACKING ENTERPRISES THROUGH VOICE INTERFACES

Our physical environments become increasingly packed with new, computerized, devices that increase our comfort and productivity and augment our everyday experience. These devices maintain a wealth of new and existing types of sensors into our surroundings and offer new channels of communications between humans and machines (voice, gestures), between machines themselves (new wireless protocol standards) and between machines and their motherships in the cloud. The coexistence of these new devices and interaction models with our "legacy" IT infrastructure have not escaped the eyes of the digital world's most early adopters – the hackers. In their minds, we've just created so many more gateways into our corporate networks with new types of sensorial data to collect (AKA steal) and subvert, and new protocols and formats to abuse in the process of getting access to corporate assets. As we researched the potential effect of this trend on enterprise cybersecurity we focused on one specific, much hyped, type of interaction: voice. In particular, we examined the voice interaction capabilities that are most prominent in an enterprise environment – those of Microsoft's voice activated assistance Cortana. During our research, which will be detailed in this session, we were able to fully demonstrate the following scenarios: Using voice as a gateway into enterprise: We will expose a previously unknown vulnerability in Microsoft Cortana's voice interface (responsibly disclosed to Microsoft and now patched) that allows close proximity attackers to take over an unattended locked Windows 10 computer. Using voice for lateral movement: We will show how this attack can be further amplified to allow remote attackers to move laterally within the victim's network. Systematically subverting information produced and used by sensorial systems: We will analyze, in technical details, the protocol Cortana uses to talk to its cloud and will expose the "Newspeak" tool that utilize this knowledge to fiddle with the protocol for fun (pranks!) and profit (additional custom functionality!), or just monitor it for security purposes. We will conclude our presentation with some practical suggestions regarding defending against this new breed of threats against enterprise networks and assets.

information securitycortanavda
www.zengo.com
twitter.com/zengo
medium.com/zengo
github.com/zengo-x
contact@zengo.com

More Related Content

What's hot

Blockchain
BlockchainBlockchain
Getting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingGetting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract Auditing
Beau Bullock
 
Blockchain Technology Fundamentals
Blockchain Technology FundamentalsBlockchain Technology Fundamentals
Blockchain Technology Fundamentals
Experfy
 
BLOCKCHAIN
BLOCKCHAINBLOCKCHAIN
BLOCKCHAIN
Nitish sharma
 
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart Contracts
Saad Zaher
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
Jithin Babu
 
Blockchain Security and Privacy
Blockchain Security and PrivacyBlockchain Security and Privacy
Blockchain Security and Privacy
Anil John
 
Blockchain
BlockchainBlockchain
Blockchain
Mohit Singh
 
Smart contracts using web3.js
Smart contracts using web3.jsSmart contracts using web3.js
Smart contracts using web3.js
Felix Crisan
 
Blockchain
BlockchainBlockchain
Blockchain
Sai Nath
 
Block chain technology
Block chain technologyBlock chain technology
Block chain technology
Md. Syful Azam
 
An Introduction to Blockchain Technology
An Introduction to Blockchain Technology An Introduction to Blockchain Technology
An Introduction to Blockchain Technology
Niuversity
 
The future of crypto wallets
The future of crypto walletsThe future of crypto wallets
The future of crypto wallets
Ouriel Ohayon
 
Blockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricBlockchain - HyperLedger Fabric
Blockchain - HyperLedger Fabric
Araf Karsh Hamid
 
MongoDB and BlockChain
MongoDB and BlockChainMongoDB and BlockChain
MongoDB and BlockChain
Massimo Brignoli
 
Blockchain
BlockchainBlockchain
Blockchain
Amit Kumar
 
Blockchain basics
Blockchain basicsBlockchain basics
Blockchain basics
Romit Bose
 
Cryptocurrencies and Blockchain technology
Cryptocurrencies and Blockchain technologyCryptocurrencies and Blockchain technology
Cryptocurrencies and Blockchain technology
Sabrina Kirrane
 
Blockchain (1).pptx
Blockchain (1).pptxBlockchain (1).pptx
Blockchain (1).pptx
MeetPBarasara
 
Block chain technology
Block chain technologyBlock chain technology
Block chain technology
Multi-Layer Professional Venture
 

What's hot (20)

Blockchain
BlockchainBlockchain
Blockchain
 
Getting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract AuditingGetting Started in Blockchain Security and Smart Contract Auditing
Getting Started in Blockchain Security and Smart Contract Auditing
 
Blockchain Technology Fundamentals
Blockchain Technology FundamentalsBlockchain Technology Fundamentals
Blockchain Technology Fundamentals
 
BLOCKCHAIN
BLOCKCHAINBLOCKCHAIN
BLOCKCHAIN
 
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart Contracts
 
Blockchain 101
Blockchain 101Blockchain 101
Blockchain 101
 
Blockchain Security and Privacy
Blockchain Security and PrivacyBlockchain Security and Privacy
Blockchain Security and Privacy
 
Blockchain
BlockchainBlockchain
Blockchain
 
Smart contracts using web3.js
Smart contracts using web3.jsSmart contracts using web3.js
Smart contracts using web3.js
 
Blockchain
BlockchainBlockchain
Blockchain
 
Block chain technology
Block chain technologyBlock chain technology
Block chain technology
 
An Introduction to Blockchain Technology
An Introduction to Blockchain Technology An Introduction to Blockchain Technology
An Introduction to Blockchain Technology
 
The future of crypto wallets
The future of crypto walletsThe future of crypto wallets
The future of crypto wallets
 
Blockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricBlockchain - HyperLedger Fabric
Blockchain - HyperLedger Fabric
 
MongoDB and BlockChain
MongoDB and BlockChainMongoDB and BlockChain
MongoDB and BlockChain
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain basics
Blockchain basicsBlockchain basics
Blockchain basics
 
Cryptocurrencies and Blockchain technology
Cryptocurrencies and Blockchain technologyCryptocurrencies and Blockchain technology
Cryptocurrencies and Blockchain technology
 
Blockchain (1).pptx
Blockchain (1).pptxBlockchain (1).pptx
Blockchain (1).pptx
 
Block chain technology
Block chain technologyBlock chain technology
Block chain technology
 

Similar to Web3 Security: The Blockchain is Your SIEM

Web3’s red pill: Smashing Web3 transaction simulations for fun and profit
Web3’s red pill: Smashing Web3 transaction simulations for fun and profitWeb3’s red pill: Smashing Web3 transaction simulations for fun and profit
Web3’s red pill: Smashing Web3 transaction simulations for fun and profit
Tal Be'ery
 
Daniel Connelly Ethereum Smart Contract Master's Thesis
Daniel Connelly Ethereum Smart Contract Master's ThesisDaniel Connelly Ethereum Smart Contract Master's Thesis
Daniel Connelly Ethereum Smart Contract Master's Thesis
Daniel Connelly
 
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Codemotion
 
Fluent destry saul
Fluent destry saulFluent destry saul
Fluent destry saul
Destry Saul
 
How to Create Blockchain Products by Fr8 Network Lead Engineer
How to Create Blockchain Products by Fr8 Network Lead EngineerHow to Create Blockchain Products by Fr8 Network Lead Engineer
How to Create Blockchain Products by Fr8 Network Lead Engineer
Product School
 
How to Create Blockchain Products by Slice.Market CTO
How to Create Blockchain Products by Slice.Market CTOHow to Create Blockchain Products by Slice.Market CTO
How to Create Blockchain Products by Slice.Market CTO
Product School
 
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Codemotion
 
Brief Introduction to Blockchain Security
Brief Introduction to Blockchain SecurityBrief Introduction to Blockchain Security
Brief Introduction to Blockchain Security
Johnson, Chuan Zhang CISM CCSK OSCP
 
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency appDylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
DevCamp Campinas
 
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contracts
Gautam Anand
 
Blockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOsBlockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOs
Bogdan Fiedur
 
Total privacy of transactions, Mimblewimble and Grin
Total privacy of transactions, Mimblewimble and GrinTotal privacy of transactions, Mimblewimble and Grin
Total privacy of transactions, Mimblewimble and Grin
Eugene Pavlenko
 
Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...
Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...
Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...
Altoros
 
Blockchain Basics
Blockchain BasicsBlockchain Basics
Blockchain Basics
Ali Ayyash
 
Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract
Vaideeswaran Sethuraman
 
Blockchain architected
Blockchain architectedBlockchain architected
Blockchain architected
IBM Sverige
 
An introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruAn introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ru
LennartF
 
Last mile authentication problem: Exploiting the missing link in end-to-end s...
Last mile authentication problem: Exploiting the missing link in end-to-end s...Last mile authentication problem: Exploiting the missing link in end-to-end s...
Last mile authentication problem: Exploiting the missing link in end-to-end s...
Priyanka Aash
 
Blockchain Fundamentals for Beginners - 101 Blockchains
Blockchain Fundamentals for Beginners - 101 BlockchainsBlockchain Fundamentals for Beginners - 101 Blockchains
Blockchain Fundamentals for Beginners - 101 Blockchains
101 Blockchains Academy
 
Ethereum
EthereumEthereum
Ethereum
Brian Yap
 

Similar to Web3 Security: The Blockchain is Your SIEM (20)

Web3’s red pill: Smashing Web3 transaction simulations for fun and profit
Web3’s red pill: Smashing Web3 transaction simulations for fun and profitWeb3’s red pill: Smashing Web3 transaction simulations for fun and profit
Web3’s red pill: Smashing Web3 transaction simulations for fun and profit
 
Daniel Connelly Ethereum Smart Contract Master's Thesis
Daniel Connelly Ethereum Smart Contract Master's ThesisDaniel Connelly Ethereum Smart Contract Master's Thesis
Daniel Connelly Ethereum Smart Contract Master's Thesis
 
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
 
Fluent destry saul
Fluent destry saulFluent destry saul
Fluent destry saul
 
How to Create Blockchain Products by Fr8 Network Lead Engineer
How to Create Blockchain Products by Fr8 Network Lead EngineerHow to Create Blockchain Products by Fr8 Network Lead Engineer
How to Create Blockchain Products by Fr8 Network Lead Engineer
 
How to Create Blockchain Products by Slice.Market CTO
How to Create Blockchain Products by Slice.Market CTOHow to Create Blockchain Products by Slice.Market CTO
How to Create Blockchain Products by Slice.Market CTO
 
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
 
Brief Introduction to Blockchain Security
Brief Introduction to Blockchain SecurityBrief Introduction to Blockchain Security
Brief Introduction to Blockchain Security
 
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency appDylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
Dylan Butler & Oliver Hager - Building a cross platform cryptocurrency app
 
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contracts
 
Blockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOsBlockchain, bitcoin, ethereum and ICOs
Blockchain, bitcoin, ethereum and ICOs
 
Total privacy of transactions, Mimblewimble and Grin
Total privacy of transactions, Mimblewimble and GrinTotal privacy of transactions, Mimblewimble and Grin
Total privacy of transactions, Mimblewimble and Grin
 
Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...
Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...
Using the Cloud Foundry and Kubernetes Stack as a Part of a Blockchain CI/CD ...
 
Blockchain Basics
Blockchain BasicsBlockchain Basics
Blockchain Basics
 
Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract
 
Blockchain architected
Blockchain architectedBlockchain architected
Blockchain architected
 
An introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruAn introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ru
 
Last mile authentication problem: Exploiting the missing link in end-to-end s...
Last mile authentication problem: Exploiting the missing link in end-to-end s...Last mile authentication problem: Exploiting the missing link in end-to-end s...
Last mile authentication problem: Exploiting the missing link in end-to-end s...
 
Blockchain Fundamentals for Beginners - 101 Blockchains
Blockchain Fundamentals for Beginners - 101 BlockchainsBlockchain Fundamentals for Beginners - 101 Blockchains
Blockchain Fundamentals for Beginners - 101 Blockchains
 
Ethereum
EthereumEthereum
Ethereum
 

More from Tal Be'ery

Give me some (key) space!
Give me some (key) space!Give me some (key) space!
Give me some (key) space!
Tal Be'ery
 
Understanding Compound‘s Liquidation
Understanding Compound‘s LiquidationUnderstanding Compound‘s Liquidation
Understanding Compound‘s Liquidation
Tal Be'ery
 
The Color of Money
The Color of MoneyThe Color of Money
The Color of Money
Tal Be'ery
 
Open Sesame: Picking Locks with Cortana
Open Sesame: Picking Locks with CortanaOpen Sesame: Picking Locks with Cortana
Open Sesame: Picking Locks with Cortana
Tal Be'ery
 
THE VOICE OF ESAU: HACKING ENTERPRISES THROUGH VOICE INTERFACES
THE VOICE OF ESAU: HACKING ENTERPRISES THROUGH VOICE INTERFACES   THE VOICE OF ESAU: HACKING ENTERPRISES THROUGH VOICE INTERFACES
THE VOICE OF ESAU: HACKING ENTERPRISES THROUGH VOICE INTERFACES
Tal Be'ery
 
Automate or Die: How Automation Reshapes Cybersecurity
Automate or Die: How Automation Reshapes CybersecurityAutomate or Die: How Automation Reshapes Cybersecurity
Automate or Die: How Automation Reshapes Cybersecurity
Tal Be'ery
 
The Industrial Revolution of Lateral Movement
The Industrial Revolution of Lateral MovementThe Industrial Revolution of Lateral Movement
The Industrial Revolution of Lateral Movement
Tal Be'ery
 
The Enemy Within: Stopping Advanced Attacks Against Local Users
The Enemy Within: Stopping Advanced Attacks Against Local UsersThe Enemy Within: Stopping Advanced Attacks Against Local Users
The Enemy Within: Stopping Advanced Attacks Against Local Users
Tal Be'ery
 
Target Breach Analysis
Target Breach AnalysisTarget Breach Analysis
Target Breach Analysis
Tal Be'ery
 
Battlefield network
Battlefield networkBattlefield network
Battlefield network
Tal Be'ery
 
Client sidesec 2013-intro
Client sidesec 2013-introClient sidesec 2013-intro
Client sidesec 2013-intro
Tal Be'ery
 
Client sidesec 2013 - non js
Client sidesec 2013 - non jsClient sidesec 2013 - non js
Client sidesec 2013 - non js
Tal Be'ery
 
Client sidesec 2013 - script injection
Client sidesec 2013 - script injectionClient sidesec 2013 - script injection
Client sidesec 2013 - script injection
Tal Be'ery
 
One Key to Rule Them All: Detecting the Skeleton Key Malware
One Key to Rule Them All: Detecting the Skeleton Key MalwareOne Key to Rule Them All: Detecting the Skeleton Key Malware
One Key to Rule Them All: Detecting the Skeleton Key Malware
Tal Be'ery
 
Skeleton key malware detection owasp
Skeleton key malware detection owaspSkeleton key malware detection owasp
Skeleton key malware detection owasp
Tal Be'ery
 

More from Tal Be'ery (15)

Give me some (key) space!
Give me some (key) space!Give me some (key) space!
Give me some (key) space!
 
Understanding Compound‘s Liquidation
Understanding Compound‘s LiquidationUnderstanding Compound‘s Liquidation
Understanding Compound‘s Liquidation
 
The Color of Money
The Color of MoneyThe Color of Money
The Color of Money
 
Open Sesame: Picking Locks with Cortana
Open Sesame: Picking Locks with CortanaOpen Sesame: Picking Locks with Cortana
Open Sesame: Picking Locks with Cortana
 
THE VOICE OF ESAU: HACKING ENTERPRISES THROUGH VOICE INTERFACES
THE VOICE OF ESAU: HACKING ENTERPRISES THROUGH VOICE INTERFACES   THE VOICE OF ESAU: HACKING ENTERPRISES THROUGH VOICE INTERFACES
THE VOICE OF ESAU: HACKING ENTERPRISES THROUGH VOICE INTERFACES
 
Automate or Die: How Automation Reshapes Cybersecurity
Automate or Die: How Automation Reshapes CybersecurityAutomate or Die: How Automation Reshapes Cybersecurity
Automate or Die: How Automation Reshapes Cybersecurity
 
The Industrial Revolution of Lateral Movement
The Industrial Revolution of Lateral MovementThe Industrial Revolution of Lateral Movement
The Industrial Revolution of Lateral Movement
 
The Enemy Within: Stopping Advanced Attacks Against Local Users
The Enemy Within: Stopping Advanced Attacks Against Local UsersThe Enemy Within: Stopping Advanced Attacks Against Local Users
The Enemy Within: Stopping Advanced Attacks Against Local Users
 
Target Breach Analysis
Target Breach AnalysisTarget Breach Analysis
Target Breach Analysis
 
Battlefield network
Battlefield networkBattlefield network
Battlefield network
 
Client sidesec 2013-intro
Client sidesec 2013-introClient sidesec 2013-intro
Client sidesec 2013-intro
 
Client sidesec 2013 - non js
Client sidesec 2013 - non jsClient sidesec 2013 - non js
Client sidesec 2013 - non js
 
Client sidesec 2013 - script injection
Client sidesec 2013 - script injectionClient sidesec 2013 - script injection
Client sidesec 2013 - script injection
 
One Key to Rule Them All: Detecting the Skeleton Key Malware
One Key to Rule Them All: Detecting the Skeleton Key MalwareOne Key to Rule Them All: Detecting the Skeleton Key Malware
One Key to Rule Them All: Detecting the Skeleton Key Malware
 
Skeleton key malware detection owasp
Skeleton key malware detection owaspSkeleton key malware detection owasp
Skeleton key malware detection owasp
 

Recently uploaded

MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K SchemeMSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
Anwar Patel
 
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
Mani Krishna Sarkar
 
Vernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsxVernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsx
Tool and Die Tech
 
Biology for computer science BBOC407 vtu
Biology for computer science BBOC407 vtuBiology for computer science BBOC407 vtu
Biology for computer science BBOC407 vtu
santoshpatilrao33
 
Software Engineering and Project Management - Introduction to Project Management
Software Engineering and Project Management - Introduction to Project ManagementSoftware Engineering and Project Management - Introduction to Project Management
Software Engineering and Project Management - Introduction to Project Management
Prakhyath Rai
 
Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.
Tool and Die Tech
 
Germany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptxGermany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptx
rebecca841358
 
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
Jim Mimlitz, P.E.
 
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
sanabts249
 
22519 - Client-Side Scripting Language (CSS) chapter 1 notes .pdf
22519 - Client-Side Scripting Language (CSS) chapter 1 notes .pdf22519 - Client-Side Scripting Language (CSS) chapter 1 notes .pdf
22519 - Client-Side Scripting Language (CSS) chapter 1 notes .pdf
sharvaridhokte
 
LeetCode Database problems solved using PySpark.pdf
LeetCode Database problems solved using PySpark.pdfLeetCode Database problems solved using PySpark.pdf
LeetCode Database problems solved using PySpark.pdf
pavanaroshni1977
 
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model SafeRohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
binna singh$A17
 
Rotary Intersection in traffic engineering.pptx
Rotary Intersection in traffic engineering.pptxRotary Intersection in traffic engineering.pptx
Rotary Intersection in traffic engineering.pptx
surekha1287
 
Development of Chatbot Using AI/ML Technologies
Development of  Chatbot Using AI/ML TechnologiesDevelopment of  Chatbot Using AI/ML Technologies
Development of Chatbot Using AI/ML Technologies
maisnampibarel
 
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-IDUNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
GOWSIKRAJA PALANISAMY
 
Lecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............pptLecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............ppt
RujanTimsina1
 
Chlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptxChlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptx
yadavsuyash008
 
Press Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdfPress Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdf
Tool and Die Tech
 
Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...
Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...
Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...
Miss Khusi #V08
 
Introduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer NetworkingIntroduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer Networking
Md.Shohel Rana ( M.Sc in CSE Khulna University of Engineering & Technology (KUET))
 

Recently uploaded (20)

MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K SchemeMSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
 
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
1239_2.pdf IS CODE FOR GI PIPE FOR PROCUREMENT
 
Vernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsxVernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsx
 
Biology for computer science BBOC407 vtu
Biology for computer science BBOC407 vtuBiology for computer science BBOC407 vtu
Biology for computer science BBOC407 vtu
 
Software Engineering and Project Management - Introduction to Project Management
Software Engineering and Project Management - Introduction to Project ManagementSoftware Engineering and Project Management - Introduction to Project Management
Software Engineering and Project Management - Introduction to Project Management
 
Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.Trends in Computer Aided Design and MFG.
Trends in Computer Aided Design and MFG.
 
Germany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptxGermany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptx
 
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
SCADAmetrics Instrumentation for Sensus Water Meters - Core and Main Training...
 
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
 
22519 - Client-Side Scripting Language (CSS) chapter 1 notes .pdf
22519 - Client-Side Scripting Language (CSS) chapter 1 notes .pdf22519 - Client-Side Scripting Language (CSS) chapter 1 notes .pdf
22519 - Client-Side Scripting Language (CSS) chapter 1 notes .pdf
 
LeetCode Database problems solved using PySpark.pdf
LeetCode Database problems solved using PySpark.pdfLeetCode Database problems solved using PySpark.pdf
LeetCode Database problems solved using PySpark.pdf
 
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model SafeRohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
 
Rotary Intersection in traffic engineering.pptx
Rotary Intersection in traffic engineering.pptxRotary Intersection in traffic engineering.pptx
Rotary Intersection in traffic engineering.pptx
 
Development of Chatbot Using AI/ML Technologies
Development of  Chatbot Using AI/ML TechnologiesDevelopment of  Chatbot Using AI/ML Technologies
Development of Chatbot Using AI/ML Technologies
 
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-IDUNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
UNIT I INCEPTION OF INFORMATION DESIGN 20CDE09-ID
 
Lecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............pptLecture 3 Biomass energy...............ppt
Lecture 3 Biomass energy...............ppt
 
Chlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptxChlorine and Nitric Acid application, properties, impacts.pptx
Chlorine and Nitric Acid application, properties, impacts.pptx
 
Press Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdfPress Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdf
 
Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...
Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...
Phone Us ❤ X000XX000X ❤ #ℂall #gIRLS In Chennai By Chenai @ℂall @Girls Hotel ...
 
Introduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer NetworkingIntroduction to IP address concept - Computer Networking
Introduction to IP address concept - Computer Networking
 

Web3 Security: The Blockchain is Your SIEM

  • 2. Web3 Security The Blockchain is Your SIEM Tal Be’ery Shalev Keren
  • 3. 👋 Hi, I’m Tal Be’ery ● Co-Founder, CTO @ ZenGo ● 20 years of cyber security experience ● Former EIR Innov8 VC, VP Research Aorato (acquired by Microsoft) ● @talbeerysec
  • 4. 👋 Hi, I’m Shalev Keren ● Cryptography and Blockchain Research @ ZenGo ● @shalev0s
  • 5. Agenda ● What is Web3 ○ Web3 intro: Web on the Blockchain ○ The Web3 triangle: Wallet, Smart Contracts, Web2 Frontend ● Security in the Web3 triangle ○ Web3 Security problem ○ Wallet attacks: 1 key to rule them all + solutions ○ The blockchain is our SIEM! ■ Frontend attacks: BadgerDAO incident ■ Smart Contracts attacks: The MultiChain incident ● Web3 security solutions ○ Application level firewall ○ Web3 Personal Firewall ○ Web3 Application Firewall (W3AF)
  • 7. But first a story
  • 9. Web3: Moving apps to the blockchain
  • 10. Blockchain - quick reminder ● “Just” a distributed database ○ Reaching a consensus on conflicts is not trivial! ● Messages are authenticated ○ User address corresponds to a public key ○ User signs messages with a private key ○ Private key stored in a wallet ● Very useful for money transfer! ● Bitcoin (2009) is doing that: ○ “1 built-in program”: “Send(source,dest,amount)” ■ Check authenticity by verifying the user’s signature on the transaction ■ Add amount to dest, subtract amount from source ■ Results are saved in the blockchain
  • 12. Blockchain: beyond sending money ● Ethereum, co-founded by Vitalik (2015) ○ Has a similar “1 built-in program” for money transfer ○ But also, allows users to upload custom code (smart contract) and interact with it ■ Smart contracts are uploaded into addresses ■ Smart contracts expose callable methods ■ Very similar to a dynamic library (“.dll”, “.so”) ○ When interacting with a contract ■ Destination address is the contract ■ Function name and call parameters are passed as part of the transaction ■ Network fee (“gas”) depends on the complexity of the execution
  • 13. Web3 Echosphere: Web + Blockchain
  • 14. The Web3 Triangle ● Web2 app interface: App UX, suggests transactions to the user ● Wallet: key management, transaction signing and blockchain interaction ● Blockchain smart contracts (“contracts”): implements the app’s logic.
  • 15. Example: NFT ● The user owns NFTs ○ Ownership is public on blockchain ○ User can transfer via wallet ● Multiple marketplaces ○ For example: Opensea, rarible ● Side note: ○ Ownership is “not perfect” ○ See: moxie ○ But is fixable
  • 17. Web3 has a security problem
  • 19. Wallet Security ● Attacks on private key: ○ Theft: phishing, malware, stolen backup, fake wallets ○ Loss: key is lost and backup fails ● Wallet security is key security ● Web3 is pretty much same as for “old” crypto ● Solutions: protect key with a “secure” wallet ○ Hardware ○ MPC https://research.checkpoint.com/2021/cpr-alerts-crypto-wallet-users-of-massive- search-engine-phishing-campaign-that-has-resulted-in-at-least-half-a-million- dollars-being-stolen/
  • 20. ZenGo is the Safe & Secure Crypto Wallet. Buy, store, trade, and earn crypto in a tap.
  • 21. Threshold Signatures (TSS): 1 becomes 2 ● Private key becomes distributed: no longer a Single-Point-of-Failure ● Distributed protocols: back and forth messages exchange between parties ○ Key generation: each party creates a “Share” (which is not “half of the key”) ○ Signing: using the Shares, parties sign together ● The signature looks the same! ● When 1 (private key) becomes 2 (shares): ○ Harder for attackers to steal: needs to compromise both parties ○ Easier to backup: each share is meaningless by itself
  • 22. ZenGo: Easy + Secure ● The first “keyless” wallet: No more (single) private key ● Security: ○ Confidentiality: ■ 2 Party (2-P) Threshold Signatures ● ZenGo Server ● ZenGo app on the user’s device ■ Each share is stored in a secure manner ○ Availability ■ Cloud based backup for each share ● UX: Mobile app ○ Already in the pockets of customers ○ No additional cost
  • 23. Security #2: FrontEnd The BadgerDao hack
  • 24. BadgerDao ● “Bringing Bitcoin to DeFi” : Earn interest on your BTC ○ via ERC20
  • 25. What is ERC-20? ● Standard implementation of a “coin” on Ethereum ● Before ERC20, if you wanted your own coin, you needed to create your own blockchain ● Now, you just need to implement some known methods in your contract:
  • 26. CloudFlare: Hackers’ entry method ● CloudFlare (CF) is a web2 proxy ○ Security, Content caching (CDN) ● BadgerDAO (BD) uses CF ● CF has a feature to add content to website (“workers”) ● [Aug 2021] Hackers used a vulnerability in CF to add API key to workers controlled by attackers ○ Required some mistakes on BD side too [Sep 2021] ● Hackers are now able to inject code into BD’s web2 interface!
  • 27. The injected script ● [Nov 2021] first version injected ● We were able to locate it independently 😊 ○ via https://web.archive.org ● We then de-obfuscated it ● Code Diff (The injected website is in red on left)
  • 28. Injected script ● Hooking Dapp communication with the wallet
  • 29. Injected script ● Filter Unwanted Victims ○ Don’t Attack Admins (BadgerDAO devs) ○ Victim has more than $50K or a special test account
  • 30. Injected script ● Inject Malicious Approve ○ The attacker always asks for an approval to the vault with the largest locked value ■ If the user is interacting with the largest vault, an approve tx is injected to the attacker’s address ■ If the user is interacting with another vault a sneaky increaseAllowance is injected instead
  • 31. IncreaseAllowance vs. Approve ● We created a web3 app in lab to test ● Inferior user experience ○ No humanly understandable explanation ○ Not showing user that they are interacting with an ERC20 contract
  • 34. The first success ● Victim approving attackers’ address [20 Nov 21] ○ 0x1fcdb04d0c5364fbd92c73ca8af9baa72c269107 ● https://etherscan.io/tx/0x9a900fbe6136a44bbfd43de9c18947977990acee5 fb41e7d9a76562aed960a51
  • 35. $50M fish ● A big fish ($50M in BD) approved [1 Dec 21] ○ https://etherscan.io/tx/0x5e4c7966b0eaddaf63f1c89fc1c4c84812905ea79c6bee9d2ada2d2 e5afe1f34 ● This time it was approve via a lesser known method ○ IncreaseAllowance
  • 36. Who is $50M fish? ● According to press ○ Celsius ○ Using MetaMask
  • 37. Pulling the dragnet (1) ● When the fish is in the net it’s the time to pull the whole dragnet out ● Attacker reacted in 6 hours time ○ Exactly on 00:00 (UTC time) [2 December 21] (maybe automated?)
  • 38. Pulling the dragnet (2) ● Now it’s time for attackers to exploit all other approvers
  • 39. Security #3: Smart Contracts The MultiChain hack
  • 40. Multichain ● Multichain Router (previously AnySwap) allows users to freely swap tokens between two chains. ● Exploited ○ Started January 18th 2022 ○ >1900 Eth Stolen (~$5M) ● Smart Contract logical error ● Full Analysis: zengo/multichains- exploit-explained
  • 41. Tools: Web3 debugger ● We used online smart contract debugger to “replay” the transaction attack ● https://dashboard.tenderly.co
  • 42. Multichain : The vulnerable code https://gist.github.com/zhaojun-sh/0df8429d52ae7d71b6d1ff5e8f0050dc#file-anyswaprouterv4-sol-L245-L261
  • 43. SwapWithPermit: Original functionality Using this function, the caller can present a “Permit” (= another user’s signed approval) and transfer money accordingly unwraps the underlying token from the its anyswap wrapping The underlying token’s contract permit() is called to approve the router’s ability to withdraw an amount from the user’s (from) address, as the user supplied a signed (v,r,s) “permit” message If we passed this part successfully, the signature is assumed to be verified and the function sends the signing user funds
  • 44. Attack - step 1 ● It’s intended to unwrap the underlying token from the its anyToken wrapping . ● However, the token parameter value is controlled by the attackers, and they pass their own malicious contract address. ● Multichain failed here as this function should have checked if the token address is indeed of a Multichain token ● We can see in the debugger, that this attackers’ contract now returns WETH (address 0xc02..) as its “underlying asset”.
  • 45. Attack - step 2 ● Originally, permit() was supposed to be called to verify the signed permit. ● However, WETH contract does not have a permit() function! ● WETH contract does have a “fallback function” that is called when a function is called but not found. As a result, the function does not fail although the sig is not verified! ● All of victim’s money can be sent to attacker!
  • 46. Tools: Using Dune to analyze the attack ● Dune is an analytics tool that ETLs Ethereum blockchain data into a SQL DB ● The vulnerable function was redundant! ○ It was never used before the attackers used it on January 18th
  • 47. Tools: Using Dune to monitor the attack ● Created an updating dashboard too! ● https://dune.xyz/talbeerysec/Multichain-hack
  • 49. Insights from post mortems ● We have done dozens of them as part of our research ● All based on publicly available data ○ The Blockchain is our SIEM! ○ Open source contracts ● Most of our analysis can be ○ Automated ○ Done in real time ● We can detect and mitigate attacks in real time (Firewalls!) ○ Protecting users from rogue interfaces and smart contracts ○ Protecting contracts against exploiting transactions ■ mitigation can be done by pausing contracts, blacklisting attackers address in exchanges
  • 50. Web3 “bonuses” for Firewalls ● The blockchain is your SIEM! ● False positive analysis is much easier ○ You can check your proposed rule against all past traffic ○ Create, test, tweak cycle is fast! ● Anomaly detection is much easier ○ You have the full history to train from blockchain ○ Learn, test, tweak cycle is fast!
  • 52. Web3 Personal Firewall rules examples ● To protect against BadgerDao like attacks: ● Rogue approve transaction detection ○ Approve’s Spender address reputation ■ EOA or contract? ■ If contract ● Is contract code publicly available ● Who deployed, and how it’s related to the requesting app ■ How many interactions with other users?
  • 54. Web3 Application Firewall rules examples ● To protect against Multichain hack ● Redundant functions usage ○ Alert on usage of a function that was rarely used in the past ● Invalid parameters ○ Profiling on allowed parameters value ○ Would detect that it’s used only with MultiChain specific contracts
  • 55. Outro
  • 56. Takeaways ● Web3 is (possibly?) the next step for Web ● Currently, Web3 security is in dire straits ● However, great potential to secure it ● The blockchain is your SIEM ● All data is available to all! ● Security researchers’ paradise!