Security Issues in the Blockchain as a Service Platform 2019년 8월 30일 ( 금 ) 람다256 오재훈
Chapter 제목 Agenda 루니버스소개 Security Issues Smart Contract 보안 Private Key 보안 Infra 시스템보안 System Asset 보호 Operation System 보호 Vault Service IoTcube Conference 2019 @ KU CSSA 1
Luniverse 소개 특징 장점 단점 설치형퍼블릭블록체인 노드구축후퍼블릭 블록체인에연결하여 운영 높은탈중앙화 특징 장점 단점 설치형프라이빗블록체인 높은자유도 자체중앙서버에 블록체인구축및운영 특징 장점 단점 서비스형블록체인 BaaS 1.0 클라우드인프라에 블록체인설치및운영 손쉬운설치및운영 저비용의효율적인인프라 설치, 개발, 운영에많은자원소요됨 저성능, 낮은확장성, 낮은자유도 높은트랜잭션비용 ( 가스비 ) 높은초기투자비용 설치, 개발, 운영에많은시간소요 낮은확장성, 중앙집중형 오픈소스블록체인사용, 기존블록체인의문제점그대로내포 소프트웨어서비스로서의기능부족 2
루니버스소개 Token Mint Token Service 개발사 Token Bridge Solidity IDE Security Assessment Chain Service Deploy CONTRACT Tx API 생성 Tx API 호출 DApp Wallet Bridge Luniverse PKMS DApp Service Tx 생성 REOA User Mgmt. Service Account Bridge Vault Service Tx 실행 TX 3
루니버스소개 DAPP DAPP REST API web3.js REST API Luniverse REST API REST Server Ethereum Client REST Server Luniverse REST Server web3.js SmartContract Database Smart Contract Database 4
Smart Contract Hacking DAO, 2016년 7월 17일, 360만 ETH, US $79.6 백만 Parity, 2017년 7월 19일, 15만 ETH, US $30 백만 ( US $79백만 ) Parity Wallet Locking, 2017년 11월 6일, US $153 million ( $269 million) POWH Coin, 2018년 1월 28일, 2,000 ETH, US $2.3 ( US $1.1 million) 5
Smart Contract Hacking Race Conditions Reentrancy Transaction Ordering Dependence Integer Overflow/Underflow 6
Smart Contract Hacking Consensys Best Practices ( https://consensys.github.io/smart-contract-best-practices/ ) Test Codes 100% coverage (?) Smart Contract Auditing Manual Audit Static Analysis : Sooho, Solhint, Solint Static and Dynamic Analysis : Mythril 7
이더리움 Keystore https://medium.com/@julien.maffre/what-is-an-ethereum-keystore-file-86c8c5917b97 8
Private Key Hacking Private Key Bandit 이더리움상의주소 : 5천만개 Weak Private Key 에있는 45,000 ETH 를 ( 수백만달러가치 ) 훔침 Weak Private Keys 1 : 0x7e5f4552091a69125d5dfcb7b8c2659029395bdf 2 : 0x2b5ad5c4795c026514f8317c7a215e218dccd6cf 9
Passphrase Hacking geth 명령어로 Wallet 을생성 RPC-endpoint 에 personal API 오픈 Port Scanning 을이용 Private Key unlock geth Ethereum Mainnet keystore files { } "address":"bf7d67e901884ad16dd9b7a185d8649a39dae06f", "crypto":{ "cipher":"aes-128-ctr", "ciphertext":"416631126427e9d8cb039208746a9e4baa4fb9076ca30c3e0e9e3c3d04888236", "cipherparams":{"iv":"c2e2f6a944c230c201798fbbcdac71aa"}, "kdf":"scrypt", "kdfparams":{ "dklen":32,"n":262144,"p":1,"r":8, "salt":"fa64ab8ba90fe1f5e44def2201121dbb9bb397fde8246cb3a4f7fdf94cb9c028" }, "mac":"910defc824c5457883e3a511bfadacee4f11949b8796b652cd44a42cf48e6f29" }, "id":"d3755c09-b82b-444d-8537-bd59f7e1037c","version":3 10
Infra System 보안 고객사데이터보호 VPC 기반의 Private Network 을구성하여각고객사체인들을물리적으로 격리되도록구성 Availability Zone 2a Availability Zone 2c VPC Peering Luniverse BaaS Private Subnet c4.1 Bootnode Miner / Bridge Commons c4.4 c4.1 Private Subnet c4.4 c4.1 Bootnode Miner / Bridge c4.1 Commons Up to 50 chains Luniverse Mainnet 11
Infra System 보안 검열지원 각고객사체인별확장가능한단일엔드포인트를제공하여기본적인 Flow-Control 외에도 Audit, DDoS detection, Blocklisting/Whitelisting 기능을이용해서고객사의 governance needs에대응가능함 Availability Zone - 2a CONTRACT REOA DApp1 Internal ELB (HTTP) Auth Proxy Transaction API Chain API Chain Router Route53 Availability Zone - 2a CONTRACT REOA CONTRACT REOA DApp2 Auth Proxy Transaction API Chain API Chain Router 12
System Asset 보호 (HSM) 자산키값의보안 Cloud HSM : FIPS 140-2 Level 3 엔트로피가높은키를 Seed 로암호화키생성 MultiLevel Envelope Encryption/Decryption ECDSA : scep256k1 지원 Cluster HSM Gateway SSL CloudHSM 1 Availability Zone - 2a CloudHSM 1 Availability Zone - 2c 13
Operation System 보호 (HSM) 플랫폼운영자에대한운영투명성확보 내부서버군들이각종내부 DB 들및외부서비스들과연동을수행하는형태로전체시스템에대한액세스는 외부인이직접적으로접근하기는물리적으로불가능 하지만, 개발자나운영자와같은내부자에의해서도액세스가불가하도록구성을함으로써자체적으로운영의투명성을확보할수있고, 이는곧플랫폼고객들에게신뢰를얻을수있는중요요소 WAS 서버에필요한평문의 DB 계정및패스워드값획득은 HSM 장비가인가한머신및프로세스를 통해서만가능하도록구성하고 WAS 서버의기동은빌드 / 배포시스템에의해서만트리거됨 1. 읽기 Encrypted Connection Info Cluster Server 2. DB 접속정보복호화요청 CloudHSM 1 Availability Zone - 2a 3. DB 접속 Database HSM Gateway SSL CloudHSM 1 Availability Zone - 2c 14
Vault Service Passphrase Decrypt Private Key Luniverse Vault Service Keystore 분실또는파손위험 Keystore 를백업하고필요시복구가능한신뢰할수있는서비스 복구불가로암호자산영구손실 Luniverse Vault Service 분실위험 Vault SDK DAPP Private Key Lifecycle Mgmt. - Backup, Restore - Create, Revoke - Device Binding - Key Listing, Edit Key Property Remote Signing Security Options - Multual-SSL, E2E Encryption, 2FA, Mulit-sig 2FA SMS OT P 15
감사합니다. 16