발표 영상은 다음에서 확인 가능합니다.
- https://ethcon.kr/event/conference/
- https://www.youtube.com/channel/UCxCTpceuZpWRFRk3_jCy3dQ
DeFi 스마트컨트랙트들의 취약점 사례들을 Ethcon 2020에서 발표 하였습니다. 각종 공격 방법 및 개선 방법에 대한 유즈 케이스 위주의 발표였습니다.
Java EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdf
[Games on AWS 2019] AWS 사용자를 위한 만랩 달성 트랙 | AWS에서 분산 서비스 거부 공격(DDoS)을 고민하지 않는 ...Amazon Web Services Korea
게임 서비스는 종종 악의적인 사용자에 의해 의도적인 서비스 거부 공격을 받습니다. 서비스 거부 공격은 인프라 수준의 공격인 경우와 어플리케이션 수준의 공격으로 나눌 수 있는데, 두 가지 공격에 대해 AWS 기반으로 어떻게 피해를 최소화 할 수 있는지와 사례를 소개합니다.
HAProxy TCP 모드에서 클라이언트의 Source IP를 내부 서버로 전달하는 방법을 알아봅니다.
* 중간에 오타가 있어서 수정본을 다시 업로드 하고자 했으나... SlideShare 측의 답변으로는 "Re-Upload 기능을 제거했다."라고 합니다. 부디 오타 등 부자연스러운 부분에 대해 너그럽게 이해를 부탁 드립니다.
Java EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdfJava EE _ JSTL (1).pdf
[Games on AWS 2019] AWS 사용자를 위한 만랩 달성 트랙 | AWS에서 분산 서비스 거부 공격(DDoS)을 고민하지 않는 ...Amazon Web Services Korea
게임 서비스는 종종 악의적인 사용자에 의해 의도적인 서비스 거부 공격을 받습니다. 서비스 거부 공격은 인프라 수준의 공격인 경우와 어플리케이션 수준의 공격으로 나눌 수 있는데, 두 가지 공격에 대해 AWS 기반으로 어떻게 피해를 최소화 할 수 있는지와 사례를 소개합니다.
HAProxy TCP 모드에서 클라이언트의 Source IP를 내부 서버로 전달하는 방법을 알아봅니다.
* 중간에 오타가 있어서 수정본을 다시 업로드 하고자 했으나... SlideShare 측의 답변으로는 "Re-Upload 기능을 제거했다."라고 합니다. 부디 오타 등 부자연스러운 부분에 대해 너그럽게 이해를 부탁 드립니다.
"Json Web Token with digital signature. Modern authentication or authorization. Cookies are bad. Avoid Man-in-the-middle-attack. No need to protect against CSRF. Stateless.
What is JWT?
When should you use JSON Web Tokens?
WHAT IS THE JSON WEB TOKEN STRUCTURE?
JWT Process
PROS AND CONS
JWT.IO
Using JSON Web Tokens as API Keys
Building a modern API architecture is a constant struggle between ease of development and security. JSON Web Tokens (JWTs) introduce a means of building authentication into JSON objects being transmitted through APIs.
In this session we’ll explore how JWTs work to build verifiable and trusted objects, allowing them to be combined with standards such as OAuth 2 for capturing access tokens, leading to a secure means of JavaScript SDK dev.
클라우드 네이티브로의 전환이 확산되면서 애플리케이션을 상호 독립적인 최소 구성 요소로 쪼개는 마이크로서비스(microservices) 아키텍쳐가 각광받고 있는데요.
MSA는 애플리케이션의 확장이 쉽고 새로운 기능의 출시 기간을 단축시킬 수 있다는 장점이 있지만,
반면에 애플리케이션이 커지고 동일한 서비스의 여러 인스턴스가 동시에 실행되면 MSA간 통신이 복잡해 진다는 단점이 있습니다.
서비스 메쉬(Service Mesh)는 이러한 MSA의 트래픽 문제를 보완하기 위해 탄생한 기술로,
서비스 간의 네트워크 트래픽 관리에 초점을 맞춘 네트워킹 모델입니다.
서로 다른 애플리케이션이 얼마나 원활하게 상호작용하는지를 기록함으로써 커뮤니케이션을 최적화하고 애플리케이션 확장에 따른 다운 타임을 방지할 수 있습니다.
서비스 메쉬의 탄생 배경과 기능, 그리고 현재 오픈소스로 배포되어 있는 서비스 메쉬 솔루션에 대해 소개합니다.
Step1. Cloud Native Trail Map
Step2. Service Proxy, Discover, & Mesh
Step3. Service Mesh 솔루션
Step4. Service Mesh 구현화면 - Istio / linkerd
Step5. Multi-cluster (linkerd)
An edge gateway is an essential piece of infrastructure for large scale cloud based services. This presentation details the purpose, benefits and use cases for an edge gateway to provide security, traffic management and cloud cross region resiliency. How a gateway can be used to enhance continuous deployment, and help testing of new service versions and get service insights and more are discussed. Philosophical and architectural approaches to what belongs in a gateway vs what should be in services will be discussed. Real examples of how gateway services are used in front of nearly all of Netflix's consumer facing traffic will show how gateway infrastructure is used in real highly available, massive scale services.
모든 게임 서비스에는 공통으로 구현해야 할 기능들이 있습니다. 대표적으로 채팅과 로그인, 접속 대기열 등이 있습니다. 시리즈 #2에서는 이런 기능들을 AWS의 서버리스 서비스로 구현하는 방법을 알아보겠습니다. 새 게임을 개발할 때마다 중복으로 구현하지 않고, 마이크로 서비스 아키텍처를 활용하는 방법들도 이론과 실습을 통해 알아봅니다.
1부: [Amazon ElasticCache, AWS Lambda, AWS IoT-Core] 게임채팅을 AWS에서 구현해보자!
2부: [Amazon SQS, Amazon Cognito, AWS Dynamo DB] AWS에서 대규모 로그인과 접속 대기열을 구현해보자!
The QinQ technology is called VLAN dot1q tunnel, 802.1Q tunnel, VLAN Stacking technology. The standard comes from IEEE 802.1ad and it is the expansion of the 802.1Q protocol. QinQ adds one layer of 802.1Q tag (VLAN tag) based on the original 802.1Q packet head. With the double layers of tags, the VLAN quantity is increased to 802.1Q.
How to configure the QinQ? Here we will list two occasions and they can be applied to Huawei switches higher level than Quidway S2700 and with EI version, Huawei S3700 switches and Quidway S5700, etc.
AWS 기반 블록체인 (1부) - 블록체인 환경 구성하기 (박혜영 & 유다니엘, AWS 솔루션즈 아키텍트) :: AWS DevDay2018Amazon Web Services Korea
AWS 기반 블록체인 (1부) - 블록체인 환경 구성하기
AWS에서 다양한 Blockchain Network를 직접 구축하고 배포하는 전체 과정을 설 AWS Kubernetes 서비스 자세히 살펴보기 명합니다. 이더리움 PoW, PoA, 텐더민트와 같은 다양한 메인넷을 AWS구동하고 Kubernetes와 CloudFormation으로 블록체인을 배포하는 방법을 시연합니다.
EFK Stack이란 ElasticSearch, Fluentd, Kibana라는 오픈소스의 조합으로, 방대한 양의 데이터를 신속하고 실시간으로 수집/저장/분석/시각화 할 수 있는 솔루션입니다. 특히 컨테이너 환경에서 로그 수집을 위해 주로 사용되는 기술 스택입니다.
Elasitc Stack에 대한 소개와 EFK Stack 설치 방법에 대해 설명합니다.
This presentation shows what are JSON Web Tokens, explaining about the structure, signature, encryption and how we can integrate this with Authentication/Authorization together with Spring Security.
The link for the project in Github is:
https://github.com/BHRother/spring-boot-security-jwt
The example implements JWT + Spring Security in a Spring-Boot project.
"Json Web Token with digital signature. Modern authentication or authorization. Cookies are bad. Avoid Man-in-the-middle-attack. No need to protect against CSRF. Stateless.
What is JWT?
When should you use JSON Web Tokens?
WHAT IS THE JSON WEB TOKEN STRUCTURE?
JWT Process
PROS AND CONS
JWT.IO
Using JSON Web Tokens as API Keys
Building a modern API architecture is a constant struggle between ease of development and security. JSON Web Tokens (JWTs) introduce a means of building authentication into JSON objects being transmitted through APIs.
In this session we’ll explore how JWTs work to build verifiable and trusted objects, allowing them to be combined with standards such as OAuth 2 for capturing access tokens, leading to a secure means of JavaScript SDK dev.
클라우드 네이티브로의 전환이 확산되면서 애플리케이션을 상호 독립적인 최소 구성 요소로 쪼개는 마이크로서비스(microservices) 아키텍쳐가 각광받고 있는데요.
MSA는 애플리케이션의 확장이 쉽고 새로운 기능의 출시 기간을 단축시킬 수 있다는 장점이 있지만,
반면에 애플리케이션이 커지고 동일한 서비스의 여러 인스턴스가 동시에 실행되면 MSA간 통신이 복잡해 진다는 단점이 있습니다.
서비스 메쉬(Service Mesh)는 이러한 MSA의 트래픽 문제를 보완하기 위해 탄생한 기술로,
서비스 간의 네트워크 트래픽 관리에 초점을 맞춘 네트워킹 모델입니다.
서로 다른 애플리케이션이 얼마나 원활하게 상호작용하는지를 기록함으로써 커뮤니케이션을 최적화하고 애플리케이션 확장에 따른 다운 타임을 방지할 수 있습니다.
서비스 메쉬의 탄생 배경과 기능, 그리고 현재 오픈소스로 배포되어 있는 서비스 메쉬 솔루션에 대해 소개합니다.
Step1. Cloud Native Trail Map
Step2. Service Proxy, Discover, & Mesh
Step3. Service Mesh 솔루션
Step4. Service Mesh 구현화면 - Istio / linkerd
Step5. Multi-cluster (linkerd)
An edge gateway is an essential piece of infrastructure for large scale cloud based services. This presentation details the purpose, benefits and use cases for an edge gateway to provide security, traffic management and cloud cross region resiliency. How a gateway can be used to enhance continuous deployment, and help testing of new service versions and get service insights and more are discussed. Philosophical and architectural approaches to what belongs in a gateway vs what should be in services will be discussed. Real examples of how gateway services are used in front of nearly all of Netflix's consumer facing traffic will show how gateway infrastructure is used in real highly available, massive scale services.
모든 게임 서비스에는 공통으로 구현해야 할 기능들이 있습니다. 대표적으로 채팅과 로그인, 접속 대기열 등이 있습니다. 시리즈 #2에서는 이런 기능들을 AWS의 서버리스 서비스로 구현하는 방법을 알아보겠습니다. 새 게임을 개발할 때마다 중복으로 구현하지 않고, 마이크로 서비스 아키텍처를 활용하는 방법들도 이론과 실습을 통해 알아봅니다.
1부: [Amazon ElasticCache, AWS Lambda, AWS IoT-Core] 게임채팅을 AWS에서 구현해보자!
2부: [Amazon SQS, Amazon Cognito, AWS Dynamo DB] AWS에서 대규모 로그인과 접속 대기열을 구현해보자!
The QinQ technology is called VLAN dot1q tunnel, 802.1Q tunnel, VLAN Stacking technology. The standard comes from IEEE 802.1ad and it is the expansion of the 802.1Q protocol. QinQ adds one layer of 802.1Q tag (VLAN tag) based on the original 802.1Q packet head. With the double layers of tags, the VLAN quantity is increased to 802.1Q.
How to configure the QinQ? Here we will list two occasions and they can be applied to Huawei switches higher level than Quidway S2700 and with EI version, Huawei S3700 switches and Quidway S5700, etc.
AWS 기반 블록체인 (1부) - 블록체인 환경 구성하기 (박혜영 & 유다니엘, AWS 솔루션즈 아키텍트) :: AWS DevDay2018Amazon Web Services Korea
AWS 기반 블록체인 (1부) - 블록체인 환경 구성하기
AWS에서 다양한 Blockchain Network를 직접 구축하고 배포하는 전체 과정을 설 AWS Kubernetes 서비스 자세히 살펴보기 명합니다. 이더리움 PoW, PoA, 텐더민트와 같은 다양한 메인넷을 AWS구동하고 Kubernetes와 CloudFormation으로 블록체인을 배포하는 방법을 시연합니다.
EFK Stack이란 ElasticSearch, Fluentd, Kibana라는 오픈소스의 조합으로, 방대한 양의 데이터를 신속하고 실시간으로 수집/저장/분석/시각화 할 수 있는 솔루션입니다. 특히 컨테이너 환경에서 로그 수집을 위해 주로 사용되는 기술 스택입니다.
Elasitc Stack에 대한 소개와 EFK Stack 설치 방법에 대해 설명합니다.
This presentation shows what are JSON Web Tokens, explaining about the structure, signature, encryption and how we can integrate this with Authentication/Authorization together with Spring Security.
The link for the project in Github is:
https://github.com/BHRother/spring-boot-security-jwt
The example implements JWT + Spring Security in a Spring-Boot project.
3. DeFi 종류의 분류
• Old Fashioned : USDT, USDC
(미국 달러를 담보해서 1 대 1 교환 가능한 토큰 발행)
• Lend : DAI (Ethereum 등을 담보로 잡고 토큰을 발행)
• DEX : Uniswap / Curve (LP 기반 온체인 거래소)
• Yield Farming : YAM, Sushi, BAC, ..... (DEX에 LP 공급에 따른 인센티브 지불)
• Aggrigator : YFI, Harvest (위의 서비스에 분산 투자)
4. 그래서 뭐가 문제인데?
• 2020-02-14 : bZx $954,000, Flashloan을 통한 가격 조작
• 2020-03-12 : MakerDAO (DAI) $8,000,000,000, 이더리움 가격 폭락으로 인한 강제 청산
• 2020-04-18 : dForce & lendf.me $25,000,000,000, Reentrancy attack
• 2020-04-25 : Hegic $48,000, 코드 실수로 인한 출금 불가
• 2020-06-28 : Balancer $500,000, Flashloan
• 2020-08-11 : YAM $750,000, 코드 실수로 인한 대량 발급
• 2020-08-26 : Harvest $24,000,000,000, Flashloan 기반 가격 조작 후 인출
• 2020-11-12 : Akropolis $2,000,000,000, 컨트랙트 설계 오류 이용
• 2020-11-22 : Pickle Finance $19,700,000,000, 컨트랙트 설계 오류 이용
• 그 외에도 수 많은 해킹 사례들...
https://cryptobriefing.com/50-million-lost-the-top-19-defi-cryptocurrency-hacks-2020
29. Case #3 -
Reentrancy attack (imBTC)
https://quantstamp.com/blog/what-is-a-re-entrancy-attack
30. Case #3 -
Reentrancy attack (imBTC)
https://github.com/ConsenSys/Uniswap-audit-report-2018-12#31-liquidity-pool-can-be-stolen-in-some-tokens-eg-erc-777-29
https://github.com/OpenZeppelin/exploit-uniswap
https://etherscan.io/tx/0x9743677ccf9a95f0a0521558d1bf853226f3a87c077d40cf3df73199ba211102
31. Case #4 -
블록 단위 공격
• 여러 트랜젝션을 동일 블록에 넣어서 공격
• e.g. Tx1이 가격 조작, Tx2가 조작 가격으로 Lend/Loan, Tx3이 가격 롤백
• Batch Job 형태로 작동되는 형태이고, Reentrancy attack Guard를 무력화 할
수 있음. (Tx 단위로 점검하니) 다만, 한 블록 안에 안 끝날 경우 실패하게 됨
• 시도 사례 및 실 성공 사례는 적으나, 특정 상황에서 잘 작동 됨 (e.g. Core Vault)
32. Case #5 -
블록체인 밖에서 공격 (NXM)
https://twitter.com/bneiluj/status/1339129283315425280
34. Case #6-
블록체인 밖에서 공격 (Klaystation)
https://forum.klaytn.com/t/topic/519
35. Case #7-
코딩 실수 (Parity Multisig, Hegic)
https://twitter.com/paddypisa/status/927885515407454209
https://twitter.com/HegicOptions/status/1253937104666742787
36. Case #8-
코딩 실수 (Pickle)
https://twitter.com/bantg/status/1330549173440098305
37. Case #9 -
코딩 실수 (YAM)
https://medium.com/yam-finance/save-yam-245598d81cec
40. Case Study - Harvest Finance
https://medium.com/haechi-audit-kr/harvest-finance-%EC%8A%A4%EB%A7%88%ED%8A%B8-%EC%BB%A8%ED%8A%B8%EB%9E%99%ED%8A%B8-%EB%B3%B4%EC%95%88%EA%B0%90%EC%82%AC-431dc91fd80b
41. Case Study - Harvest Finance
https://decrypt.co/46445/engineering-error-34-million-defi-hack-harvest-finance
53. 결론
• DeFi 공격 방법은 다양화 되어가고 있음
• 취약점이 어디서 나올지도 모르고, 패치는 언제나 ASAP으로 해야함
• 블록체인은 DB이면서, State Machine이기에 발생하는 문제가 너무 많음
• 한 Tx는 수 십 가지의 일을 처리할 수 있다는 것도 문제
• 바운티 금액이 짬. 해킹해서 100억 벌기 vs 바운티해서 500 벌기 => 해킹함
54. 결론
• 중앙 통제되는 Upgradeable Contract로 만들고, 전체 거래 Pause 기능 추가
=> DeFi의 De가 이루어질 수 없음
• Price oracle을 개선하거나, Time 가중치를 넣거나, Feedback을 넣어야함
=> Gas Price 증가, 온체인 데이터 증가, 각종 버그 발생 확률 증가
• EVM에 이전 블록 데이터 조회가 가능하도록 해야함 => 하드포크 수반
• 내린 결론 : 지금 당장 해결할 방법이... 없다.... => 계속 해킹 일어날 것임