This presentation provides an overview of the Memento "Time Travel for the Web" framework that is aligned with the stable version of the Memento protocol, specified in RFC 7089.
Presentation given at Mongo SV conference in Mountain View on December 3, 2010. Covers reasons for logging to MongoDB, logging library basics and library options for Java, Python, Ruby, PHP and C#. Updated 1/1/2012 with more info on logging in Ruby and tailable cursors.
This presentation was created as an introduction to the Apache NiFi project; to be followed by “Lab 0” of the “Realtime Event Processing in Hadoop with NiFi, Kafka and Storm” tutorial hosted here: http://hortonworks.com/hadoop-tutorial/realtime-event-processing-nifi-kafka-storm/#section_1
This presentation provides an overview of the Memento "Time Travel for the Web" framework that is aligned with the stable version of the Memento protocol, specified in RFC 7089.
Presentation given at Mongo SV conference in Mountain View on December 3, 2010. Covers reasons for logging to MongoDB, logging library basics and library options for Java, Python, Ruby, PHP and C#. Updated 1/1/2012 with more info on logging in Ruby and tailable cursors.
This presentation was created as an introduction to the Apache NiFi project; to be followed by “Lab 0” of the “Realtime Event Processing in Hadoop with NiFi, Kafka and Storm” tutorial hosted here: http://hortonworks.com/hadoop-tutorial/realtime-event-processing-nifi-kafka-storm/#section_1
A Journey from Hexagonal Architecture to Event Sourcing - SymfonyCon Cluj 2017Carlos Buenosvinos
Event-based architectures such as Event Sourcing provide multiple benefits: scalability, complexity management, auditing, etc. However, let’s face it, getting there is quite hard. We lack skills, expertise and courage.
In this talk, I’m going to show you some tips and tricks to painless evolve your current architecture towards Event Sourcing, one small step at a time. We’ll start from an Hexagonal Architecture application and we’ll end up in the Event Sourcing doors. The path that we’ll follow is:
Hexagonal Architecture
Hexagonal Architecture with Domain Events
Stepping Stone Architecture (CQRS without Event Sourcing)
Event Sourcing
Talk level: Intermediate to Expert
Requirements: Basic concepts of Hexagonal Architecture (Entities, Repositories, Application Services, etc.)
Now you can build Lightning components using two programming models: Lightning Web Components, and the original model, Aura Components. Lightning web components are custom HTML elements built using HTML and modern JavaScript. Lightning web components and Aura components can coexist and interoperate on a page. To admins and end users, they both appear as Lightning components.
Lightning Web Components uses core Web Components standards and provides only what’s necessary to perform well in browsers supported by Salesforce. Because it’s built on code that runs natively in browsers, Lightning Web Components is lightweight and delivers exceptional performance. Most of the code you write is standard JavaScript and HTML.
CDC Stream Processing with Apache FlinkTimo Walther
An instant world requires instant decisions at scale. This includes the ability to digest and react to changes in real-time. Thus, event logs such as Apache Kafka can be found in almost every architecture, while databases and similar systems still provide the foundation. Change Data Capture (CDC) has become popular for propagating changes. Nevertheless, integrating all these systems, which often have slightly different semantics, can be a challenge.
In this talk, we highlight what it means for Apache Flink to be a general data processor that acts as a data integration hub. Looking under the hood, we demonstrate Flink's SQL engine as a changelog processor that ships with an ecosystem tailored to processing CDC data and maintaining materialized views. We will discuss the semantics of different data sources and how to perform joins or stream enrichment between them. This talk illustrates how Flink can be used with systems such as Kafka (for upsert logging), Debezium, JDBC, and others.
This is a presentation which describe the big picture of the Rest API. In this presentation I simply describe the theories with practical examples. Hope this presentation will cover the overall Rest API domain.
Talk at PyCon2022 over building binary packages for Python. Covers an overview and an in-depth look into pybind11 for binding, scikit-build for creating the build, and build & cibuildwheel for making the binaries that can be distributed on PyPI.
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016Christian Schneider
The hidden danger of Java deserialization vulnerabilities – which often lead to remote code execution – has gained extended visibility in the past year. The issue has been known for years; however, it seems that the majority of developers were unaware of it until recent media coverage around commonly used libraries and major products. This talk aims to shed some light about how this vulnerability can be abused, how to detect it from a static and dynamic point of view, and -- most importantly -- how to effectively protect against it. The scope of this talk is not limited to the Java serialization protocol but also other popular Java libraries used for object serialization.
The ever-increasing number of new vulnerable endpoints and attacker-usable gadgets has resulted in a lot of different recommendations on how to protect your applications, including look-ahead deserialization and runtime agents to monitor and protect the deserialization process. Coming at the problem from a developer’s perspective and triaging the recommendations for you, this talk will review existing protection techniques and demonstrate their effectiveness on real applications. It will also review existing techniques and present new gadgets that demonstrates how attackers can actually abuse your application code and classpath to craft a chain of gadgets that will allow them to compromise your servers.
This talk will also present the typical architectural decisions and code patterns that lead to an increased risk of exposing deserialization vulnerabilities. Mapping the typical anti-patterns that must be avoided, through the use of real code examples we present an overview of hardening techniques and their effectiveness. The talk will also show attendees what to search the code for in order to find potential code gadgets the attackers can leverage to compromise their applications. We’ll conclude with action items and recommendations developers should consider to mitigate this threat.
--
This talk was presented by Alvaro Muñoz & Christian Schneider at the OWASP AppSecEU 2016 conference in Rome.
In this presentation we will examine various scalability options in order to improve the robustness and performance of your Spring Batch applications. We start out with a single threaded Spring Batch application that we will refactor so we can demonstrate how to run it using:
* Concurrent Steps
* Remote Chunking
* AsyncItemProcessor and AsyncItemWriter
* Remote Partitioning
Additionally, we will show how you can deploy Spring Batch applications to Spring XD which provides high availability and failover capabilities. Spring XD also allows you to integrate Spring Batch applications with other Big Data processing needs.
Modularizing a project is never easy, a lot of files to move and the dependencies between them is not always what we expect. Then the Dagger configuration used in a single module project often doesn't scale well to a multi module project. Hilt is opinionated about the configuration to use (we don't need to argue anymore about using component dependencies or subcomponents!) and this configuration works perfectly even in a multi module project. In this talk we'll see first an introduction to Hilt and a comparison with Dagger to understand why it's easier to configure. Then we'll see how to leverage it in a multi module project (both in a standard layered architecture and in a Clean Architecture that uses the Dependency Inversion) to improve build speed and code testability. Spoiler alert: using sample apps that include a single feature in the app helps a lot!
Practical non blocking microservices in java 8Michal Balinski
How to write application in Java 8 that do not waste resources and which can maximize effective utilization of CPU/RAM. Comparison of blocking and non-blocking approach for I/O and application services. Based on microservices implementing simple business logic in security/cryptography/payments domain. Demonstration of following aspects:
* NIO at all edges of application
* popular libraries that support NIO
* single instance scalability
* performance metrics (incl. throughput and latency)
* resources utilization
* code readability with CompletableFuture
* application maintenance and debugging
All above based on our experiences gathered during development of software platforms at Oberthur Technologies R&D Poland.
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022HostedbyConfluent
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022
An instant world requires instant decisions at scale. This includes the ability to digest and react to changes in real-time. Thus, event logs such as Apache Kafka can be found in almost every architecture, while databases and similar systems still provide the foundation. Change Data Capture (CDC) has become popular for propagating changes. Nevertheless, integrating all these systems, which often have slightly different semantics, can be a challenge.
In this talk, we highlight what it means for Apache Flink to be a general data processor that acts as a data integration hub. Looking under the hood, we demonstrate Flink's SQL engine as a changelog processor that ships with an ecosystem tailored to processing CDC data and maintaining materialized views. We will discuss the semantics of different data sources and how to perform joins or stream enrichment between them. This talk illustrates how Flink can be used with systems such as Kafka (for upsert logging), Debezium, JDBC, and others.
가상화폐와 블록체인 기술 Cryptocurrency & Blockchain Technology (KOR ver.)경록 박
한국거래소 시장감시시스템팀 박경록 사원이 제작한 블록체인 기술에 대한 정리 자료. 사토시 나카모토의 비트코인 논문에 기반하여 블록체인 기술의 원리에 대해 설명. 주요 코인의 특징과 기술, 세계 코인 시장의 상황, 블록체인의 미래를 논함. 한국거래소 KRX에서의 블록체인 활용법을 탐색.
Summary of 'blockchain technology' by Kyung-rok Park, assistant manager of KRX(Korea Exchange) market surveillance team.
Explains the principle of blockchain technology based on Satoshinamoto's Bitcoin thesis.
Discuss the characteristics and technology of major coins, the situation of the world coin market, and the future of the blockchain.
Explore the usage of the block chain in the KRX.
Written in Korean.
Email : jarvis@krx.co.kr
A Journey from Hexagonal Architecture to Event Sourcing - SymfonyCon Cluj 2017Carlos Buenosvinos
Event-based architectures such as Event Sourcing provide multiple benefits: scalability, complexity management, auditing, etc. However, let’s face it, getting there is quite hard. We lack skills, expertise and courage.
In this talk, I’m going to show you some tips and tricks to painless evolve your current architecture towards Event Sourcing, one small step at a time. We’ll start from an Hexagonal Architecture application and we’ll end up in the Event Sourcing doors. The path that we’ll follow is:
Hexagonal Architecture
Hexagonal Architecture with Domain Events
Stepping Stone Architecture (CQRS without Event Sourcing)
Event Sourcing
Talk level: Intermediate to Expert
Requirements: Basic concepts of Hexagonal Architecture (Entities, Repositories, Application Services, etc.)
Now you can build Lightning components using two programming models: Lightning Web Components, and the original model, Aura Components. Lightning web components are custom HTML elements built using HTML and modern JavaScript. Lightning web components and Aura components can coexist and interoperate on a page. To admins and end users, they both appear as Lightning components.
Lightning Web Components uses core Web Components standards and provides only what’s necessary to perform well in browsers supported by Salesforce. Because it’s built on code that runs natively in browsers, Lightning Web Components is lightweight and delivers exceptional performance. Most of the code you write is standard JavaScript and HTML.
CDC Stream Processing with Apache FlinkTimo Walther
An instant world requires instant decisions at scale. This includes the ability to digest and react to changes in real-time. Thus, event logs such as Apache Kafka can be found in almost every architecture, while databases and similar systems still provide the foundation. Change Data Capture (CDC) has become popular for propagating changes. Nevertheless, integrating all these systems, which often have slightly different semantics, can be a challenge.
In this talk, we highlight what it means for Apache Flink to be a general data processor that acts as a data integration hub. Looking under the hood, we demonstrate Flink's SQL engine as a changelog processor that ships with an ecosystem tailored to processing CDC data and maintaining materialized views. We will discuss the semantics of different data sources and how to perform joins or stream enrichment between them. This talk illustrates how Flink can be used with systems such as Kafka (for upsert logging), Debezium, JDBC, and others.
This is a presentation which describe the big picture of the Rest API. In this presentation I simply describe the theories with practical examples. Hope this presentation will cover the overall Rest API domain.
Talk at PyCon2022 over building binary packages for Python. Covers an overview and an in-depth look into pybind11 for binding, scikit-build for creating the build, and build & cibuildwheel for making the binaries that can be distributed on PyPI.
Surviving the Java Deserialization Apocalypse // OWASP AppSecEU 2016Christian Schneider
The hidden danger of Java deserialization vulnerabilities – which often lead to remote code execution – has gained extended visibility in the past year. The issue has been known for years; however, it seems that the majority of developers were unaware of it until recent media coverage around commonly used libraries and major products. This talk aims to shed some light about how this vulnerability can be abused, how to detect it from a static and dynamic point of view, and -- most importantly -- how to effectively protect against it. The scope of this talk is not limited to the Java serialization protocol but also other popular Java libraries used for object serialization.
The ever-increasing number of new vulnerable endpoints and attacker-usable gadgets has resulted in a lot of different recommendations on how to protect your applications, including look-ahead deserialization and runtime agents to monitor and protect the deserialization process. Coming at the problem from a developer’s perspective and triaging the recommendations for you, this talk will review existing protection techniques and demonstrate their effectiveness on real applications. It will also review existing techniques and present new gadgets that demonstrates how attackers can actually abuse your application code and classpath to craft a chain of gadgets that will allow them to compromise your servers.
This talk will also present the typical architectural decisions and code patterns that lead to an increased risk of exposing deserialization vulnerabilities. Mapping the typical anti-patterns that must be avoided, through the use of real code examples we present an overview of hardening techniques and their effectiveness. The talk will also show attendees what to search the code for in order to find potential code gadgets the attackers can leverage to compromise their applications. We’ll conclude with action items and recommendations developers should consider to mitigate this threat.
--
This talk was presented by Alvaro Muñoz & Christian Schneider at the OWASP AppSecEU 2016 conference in Rome.
In this presentation we will examine various scalability options in order to improve the robustness and performance of your Spring Batch applications. We start out with a single threaded Spring Batch application that we will refactor so we can demonstrate how to run it using:
* Concurrent Steps
* Remote Chunking
* AsyncItemProcessor and AsyncItemWriter
* Remote Partitioning
Additionally, we will show how you can deploy Spring Batch applications to Spring XD which provides high availability and failover capabilities. Spring XD also allows you to integrate Spring Batch applications with other Big Data processing needs.
Modularizing a project is never easy, a lot of files to move and the dependencies between them is not always what we expect. Then the Dagger configuration used in a single module project often doesn't scale well to a multi module project. Hilt is opinionated about the configuration to use (we don't need to argue anymore about using component dependencies or subcomponents!) and this configuration works perfectly even in a multi module project. In this talk we'll see first an introduction to Hilt and a comparison with Dagger to understand why it's easier to configure. Then we'll see how to leverage it in a multi module project (both in a standard layered architecture and in a Clean Architecture that uses the Dependency Inversion) to improve build speed and code testability. Spoiler alert: using sample apps that include a single feature in the app helps a lot!
Practical non blocking microservices in java 8Michal Balinski
How to write application in Java 8 that do not waste resources and which can maximize effective utilization of CPU/RAM. Comparison of blocking and non-blocking approach for I/O and application services. Based on microservices implementing simple business logic in security/cryptography/payments domain. Demonstration of following aspects:
* NIO at all edges of application
* popular libraries that support NIO
* single instance scalability
* performance metrics (incl. throughput and latency)
* resources utilization
* code readability with CompletableFuture
* application maintenance and debugging
All above based on our experiences gathered during development of software platforms at Oberthur Technologies R&D Poland.
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022HostedbyConfluent
CDC Stream Processing With Apache Flink With Timo Walther | Current 2022
An instant world requires instant decisions at scale. This includes the ability to digest and react to changes in real-time. Thus, event logs such as Apache Kafka can be found in almost every architecture, while databases and similar systems still provide the foundation. Change Data Capture (CDC) has become popular for propagating changes. Nevertheless, integrating all these systems, which often have slightly different semantics, can be a challenge.
In this talk, we highlight what it means for Apache Flink to be a general data processor that acts as a data integration hub. Looking under the hood, we demonstrate Flink's SQL engine as a changelog processor that ships with an ecosystem tailored to processing CDC data and maintaining materialized views. We will discuss the semantics of different data sources and how to perform joins or stream enrichment between them. This talk illustrates how Flink can be used with systems such as Kafka (for upsert logging), Debezium, JDBC, and others.
가상화폐와 블록체인 기술 Cryptocurrency & Blockchain Technology (KOR ver.)경록 박
한국거래소 시장감시시스템팀 박경록 사원이 제작한 블록체인 기술에 대한 정리 자료. 사토시 나카모토의 비트코인 논문에 기반하여 블록체인 기술의 원리에 대해 설명. 주요 코인의 특징과 기술, 세계 코인 시장의 상황, 블록체인의 미래를 논함. 한국거래소 KRX에서의 블록체인 활용법을 탐색.
Summary of 'blockchain technology' by Kyung-rok Park, assistant manager of KRX(Korea Exchange) market surveillance team.
Explains the principle of blockchain technology based on Satoshinamoto's Bitcoin thesis.
Discuss the characteristics and technology of major coins, the situation of the world coin market, and the future of the blockchain.
Explore the usage of the block chain in the KRX.
Written in Korean.
Email : jarvis@krx.co.kr
예제로 배우는 이더리움 결제구현 (거래소 지갑 구현 예시)Colin Chae
대상
- 이더리움이 어떻게 돌아가는지 알고 싶은 분들
- 이더리움 입출금 개발을 시작하시려는 분들
- Go-ethereum 소스코드 공부하시는 분들
개발스택
- 이더리움 노드 : 설치/운영 수고가 없는 infura.io 사용
- 개발 언어 + 라이브러리 : Go + Geth (as a RPC library)
본 발표자료에서는 이더리움 플랫폼의 상세 아키텍쳐와 기반 기술, 그리고 스마트 컨트랙과 이를 기반한 Dapp의 개발 방안에 대해 소개한다. 이더리움은 블록체인 기반 기술하에 암호 화폐의 생성 , 전송 등 라이프사이클 관리외에 스마트 컨트랙을 지원한다. 스마트컨트랙은 서로 모르는 당사자간의 계약을 준수하도록 강제할 수 있는 응용 프로그램이다. 컨트랙 프로그램은 바이트코드로 컴파일된 후 블록체인을 통해 배포되고 , 로컬 로드상에서 실행되는 일종의 에이전트라 볼 수 있다. 이렇게 개바된 스마트컨트랙은 기존 웹 인터페이스를 통해 접근하고 활용할 수 있으며 이렇게 스마트 컨트랙 기반하에 개발된 응용 서비스를 Dapp이라 한다.
NFT란.. 대체 불가능한 토큰이라는 의미로 블록체인기반의 고유 코드를 부여해서 디지털 자산의 원본임을 증명하는 기술입니다. 즉, 교환과 복제가 불가능하여 저마다 고유성과 희소성을 지니는 블록체인 기반의 토큰이어서 영상·그림·음악 등을 복제 불가능한 콘텐츠로 만들 수 있어 신종 디지털 자산으로 주목 받고 있습니다.
NFT Minting의 Minting이란 주조한다는 의미로 즉 앞서의 NFT의 최초 발행 시점에 코인을 지불하고 NFT를 발행하는 것을 의미합니다. 이러한 작업을 위해 Minting 플랫폼을 구축해야 하는데 이러한 구축 작업을 저희가 제공하고자 합니다.
저희는 현재 디지털 컨텐츠 제공자들(웹툰, 그림, 사진, 영화, 스포츠, 게임, 음악....)의 요구로 이러한 NFT Minting 사이트인 NFT 마켓 플레이스 웹사이트를 구축해 드리고 있습니다....또한, 저희 자체로도 디지털 컨텐츠 자산 보호 관련한 Minting 사이트를 구축해서 외부 디지털 컨텐츠 제공업체와 협업으로 NFT 비지니스도 진행하고 있습니다....
Kaggle 상의 신용카드 승인 데이터로, MS Azure ML(Machine Learning) Studio 환경에서 기계학습을 진행하였습니다. 학습모델은 Random Forest 모델을 사용하였고, 훈련데이터와 테스트 데이터를 8:2로 분할하였습니다. 애저 ML Studio을 살펴볼 수 있습니다.
2. Remind
address
- Account, Contract의 주소를 저장할 때 사용. (20 byte)
- Ether를 보내기 위한 자체 메서드 제공 transfer, send
fallback
- contract의 이름없는 함수(입력, 리턴 signature가 없음)
- contract address에 Ether가 송금되면 호출
require(statement)
- 입력 값이 false이면 예외를 던진다.
revert()
- 실행을 취소하고 상태를 거래 신청 이전 상태로 되돌린다.
ERC20(Ethereum Request for Comments)
- Ethereum 네트워크에 대한 개선제안을 위한 공식 프로토콜(’20’은 고유한 제안 ID 번호)
- Ethereum 상에서 발행되는 토큰 표준
3. Smart Contract를 이용한 해킹
재진입성의 약점을 노린 공격
- DAO 크래킹
정수 오버플로우를 이용한 공격
- SmartMesh 토큰 무한 생성
예기치않은 거래 되돌림
거래 순서 의존 문제를 이용한 공격
타임스탬프 의존 문제를 이용한 공격
4. DAO
DAO(Decentralized Autonomous Organization)란 탈중앙화된 자율조직
자율적인 방식의 벤처캐피탈 펀드 운용을 이더리움 플랫폼 상에서 가능하게 하려는
프로젝트
프로젝트에 참여할 수 있는 권한으로서 다오토큰(DAO Token) 투자를 모집
다오의 ICO에 참여한 투자자는 11,000명이 넘었으며 발행된 이더의 약 15%(당시
금액 1.5억달러) 가량을 모금 (2016년 4월)
투자를 받고자 하는 사람은 스마트 계약 코드로 투자 신청을 하면 투자자들이 그
코드를 확인하고 투자해 조건 성사 시 계약은 자동적으로 실행되는 구조
투자자들은 다오 토큰을 사고 팔 수 있었고 다시 이더로 바꾸는 반환 요청
가능
5. DAO Cracking
반환 요청 시 즉시 처리되어 잔액이 감소하는 것이 아니라 일정시간이 지난 후에야
처리되는 결함을 이용한 해킹
투자 반환 요청 후 자신의 잔고에서 반환 요청이 처리되기 전에 반복해서 반환 요
청을 하는 반복 공격(Recursive attack)
다오가 모집한 전체 자금 중 3분의 1에 달하는 360만 ether(약 5천만 달러)
탈취
6. 재진입성 공격
정상 거래
1 Ether 입금 잔액 추가
출금 요청 출금액 확인
송 금
금액 차감
1Ether 입금
자신의 Account Address를
이용하여 1Ether를 Contract에
송금
입금 요청한 Address를 Key로
1Ether가 계좌에 입금
금액 수령
잔액 > 요청 금액 ?
A
1Ether 출금
자신의 Account Address를
이용하여 Contract에 출금요청
출금액이 충분한지 확인한 후
요청한 계좌로 1 Ether를 송금
송금이 완료되면 저장된 계좌의
액수를 차감
7. 재진입성 공격
정상 거래 1Ether 입금
Contract Address를 이용하여
1Ether를 Contract에 송금
입금 요청한 Address를 Key로
1Ether가 계좌에 입금
1Ether 출금
Contract Address를 이용하여
Contract에 출금요청
출금액이 충분한지 확인한 후
요청한 계좌로 1Ether를 송금
1 Ether 입금 1 Ether 송금 잔액 추가
출금 요청 출금 요청 출금액 확인
출 금
금액 차감
A’
A
8. 재진입성 공격
정상 거래 1Ether 입금
Contract Address를 이용하여
1Ether를 Contract에 송금
입금 요청한 Address를 Key로
1Ether가 계좌에 입금
1Ether 출금
Contract Address를 이용하여
Contract에 출금요청
출금액이 충분한지 확인한 후
요청한 계좌로 1Ether를 송금
Contract에서 입금을 시도하나
접근한 Contract의 FallBack 호출
FallBack 함수에서 다시 출금요청
1 Ether 입금 1 Ether 송금 잔액 추가
출금 요청 출금 요청 출금액 확인
출 금
금액 차감
A’
A
Fallback
9. 재진입성 공격
정상 거래 무한 출금 요청(Recursion)
금액이 차감되지 않았기때문에
똑같은 금액으로 무한번 출금
요청
가스가 모두 소진되면 재귀 멈춤
1 Ether 입금 1 Ether 송금 잔액 추가
출금 요청 출금 요청 출금액 확인
출 금
금액 차감
A’
A
Fallback
Gas Limit에 도달하거나 공격
대상의 소지 금액이 모두 소진
될 때까지 반복
10. 재진입성 공격
공격코드 예제 VulnerableFundraiser
Address를 키값으로 입금한
금액을 mapping하여 저장하는
Contract
11. 재진입성 공격
공격코드 예제 VulnerableFundraiser
VulnerableFundraiser를 공격할
Wallet
사용자는 현재의 Contract Address
를 통해 공격할 Contract에 입금
출금을 실행
Fundraiser에서 입금할 함수를
실행할 때 받는 대상이 Account
Address가 아니기 때문에 Wallet의
Fallback 함수가 호출
12. 재진입성 공격
Solution 실행순서 변경
금액이 전송되기 이전에 토큰의
소유량을 차감한다.
Transfer() 사용
GasLimit 2300을 기본으로 설정
하며 Ether 전송이 이상이 발생하면
Exception 발생
Contract Address 접근 차단
접근 Address의 사이즈 체크를
통해 차단
13. SmartMesh
이더리움 기반의 라이트닝 네트워크와 협력하여 해당 네트워크 노드를 PC 포트
에서 모바일 포트로 이동시켜서 이동식 모바일, 웨어러블, 차량용 장비들과 P2P
방식으로 연결하는 IoT 원천의 프로토콜
블루투스 메시 네트워킹을 이용하여 offline 상태에서도 블록체인 서비스를 제공
Token을 이용하여 Mesh Network 프로토콜과 Micropayment를 구현
14. SMT Token(ERC20) Haking
SMT Token은 표준 ERC20을 따라서 만들어진 Token
상속 받은 ERC20의 함수를 이용하지 않고 개별 기능을 구현함
이더가 없는 사용자가 다른 제3자를 이용해 SMT토큰을 수수료로 내고 토큰을
보낼 수 있는것이 가능케 하는 기능을 구현
18. 정수 오버플로우
정상거래
10 Token 입금 잔액 추가
송금요청 Tx 발생 잔액확인
송금액 : 5 Token
수수료 : 1Token
수수료 송금
희망금액 송금 5 Token 수령
1 Token 수령
A BC
19. 정수 오버플로우
비정상거래
10 Token 입금 잔액 추가
Tx 발생 잔액확인
송금액 :
1157920892373161954235709
8500868790785326998466564
0564039457584007913129639
935 Token
수수료 : 2 Token
발송인 : E
수취인 : E
수수료 송금
희망금액 송금Token 수령
2 Token 수령
1 < 10
115792089237316195
423570985008687907853
26998466564056403945758
4007913129639935 Token 송금
오버플로우
A A’
20. 정수 오버플로우
비정상거래
10 Token 입금 잔액 추가
Tx 발생 잔액확인
송금액 :
1157920892373161954235709
8500868790785326998466564
0564039457584007913129639
935 Token
수수료 : 2 Token
발송인 : E
수취인 : E
수수료 송금
희망금액 송금 Token 수령
2 Token 수령
1 < 10
115792089237316195
423570985008687907853
26998466564056403945758
4007913129639935 Token 송금
오버플로우
A C B
21. 재진입성 공격
Solution Overflow 감지
금액이 전송되기 이전에 토큰의
소유량을 차감한다
토큰 총량 비교
발행된 토큰 총량을 설정하고
거래 요청이 된 토큰량과 비교
22. 정수 오버플로우 SmartMesh ERC20 Hack
공격방식 Overflow 감지
uint256 overflow의 취약성을
드러낸 함수
토큰을 보낸 사람과 받는 사람은
동일한 account이고 수수료를
받으며 함수를 발생시킨 account는
동일인의 또 다른 account다.
23. 예기치 않은 거래 되돌림
정상거래
경매요청
경매금액 : 1 ether
경매금액
비교
Current Leader : address(0)
Highes Bid : 0 ether
Leader 설정
B
24. 예기치 않은 거래 되돌림
정상거래
경매요청
경매금액 : 2 ether
경매금액
비교
Current Leader : address(A)
Highes Bid : 1 ether
Leader 설정
경매요청
경매금액
비교
B
25. 예기치 않은 거래 되돌림
정상거래
경매요청
경매금액
비교
Current Leader : address(B)
Highes Bid : 2 ether
Leader 설정
경매요청
경매금액
비교
금액 반환
Leader 설정
반환 금액
수령
A B
26. 예기치 않은 거래 되돌림
비정상거래
경매신청
Current Leader : address(A’)
Highest Bid : 1 ether
경매신청
경매요청
Leader 설정Value : 1 ether
Value : 1 ether
경매금액 비교
경매금액 비교
금액 반환Revert()
Function ()
payable
A BA’
27. 거래 순서 / 타임스탬프 의존 문제
거래 순서 조작
선착순으로 Coin을 지급하는 Contract
취지는 Transaction을 빨리 발생 시키는 사람이 Coin을 수령해야 하지만 Gas의
양을 통해서 거래 우선 순위를 조작할 수 있다.
타임스탬프 의존 문제
특정 시간에 Coin을 지급하는 Contract
Transaction이 블록에 실리는 시간이 Transaction이 처리된 시간이다. 그런데
블록이 생성되면 mining을 하고 있는 운영체제의 시간 값이 그대로 기록되기
때문에 miner가 조작할 수 있다.
28. 예기치 않은 거래 되돌림
공격코드 예제 Attacker
Auction Contract를 공격할
Contract
생성시 Deploy된 Auction의 주소를
설정한다.
bid() 메소드를 사용할 시 생성시
설정한 Auction의 Contract의 bid()
를 호출한다.
Auction Contract에서 반환할 때
사용하는 send 메시지를 무효화
시키기 위해 revert()를 호출
29. 예기치 않은 거래 되돌림
Solution 사용자 출금 인터페이스
Fallback이 호출됨에 따라
거래가 되돌려지는 현상을
다른 인터페이스 상에서 이루어지도록
한다.
30. 오픈제플린
Solidity에서 안전한 스마트 계약을 개발할 수 있도록 지원하는
라이브러리
ERC20 기반 토큰, ICO, 소유권 등을 개발할 때 필요한 템플릿 제공
31. 오픈제플린
Onward with Ethereum Smart Contract
제플린 솔루션(Zeppelin Solutions)에서 Smart Contract의 보안성을
높이기 위해 제시한 설계 지침
I. 계약 상태를 항상 파악하고 문제 발생을 숨기지 않는다.
II. 안전한 입출금 기능을 구현
III. 조건-영향 상호작용 패턴 구현
(1) 함수를 실행하기 전에 함수 실행 조건을 갖췄는지 확인
(2) 조건에 맞지 않으면 함수 실행을 하지 않는다
(3) 상태를 업데이트한다
(4) 상태를 업데이트할 수 없으면 함수 실행을 바로 중단하고 거래 이전
상태로 되돌린다.
(5) 다른 계약이나 사용자에게 메시지를 리턴
32. 오픈제플린
IV. EVM 플랫폼의 한계 고려
ex) 255 이상 배열 처리, 콜 스택 호출 횟수 1024
V. 테스트 작성과 실행
VI. 버그 리포트와 긴급 정지 기능 구현
버그를 발견한 사용자에게 토큰 보상하는 지급 구조 마련
버그 발견 시 contract 코드 수정을 위해 유지 관리 모드 전환등의
정지 기능 마련
VII. 자산 한도 제한 기능 구현
VIII. 모듈 단위로 기능 구현
33. 오픈제플린
IPFS (InterPlanetary File System)는 중앙화된 서버 없이 모든 컴퓨팅
장치를 동일한 파일 시스템으로 연결하려고 하는 P2P 분산 파일 시스템
기존 중앙 집권의 위기기반 주소 지정이 아닌 컨텐츠 기반 주소 지정 방식
분산 해시 테이블(DHT) 과 Git 버전 관리 시스템(Merkle DAG), BitTorrent 등
검증 된 인터넷 기술의 통합체
35. Merkle Tree
Merkle Tree는 데이터 구조 중 하나로, 하나의 부모에 두 아들이 존재하는
'binary tree’
연쇄적으로 해시함수가 사용되기 때문에(아버지 해시 = hash(아들1 해시+아들
2 해시) ) 데이터가 조금이라도 위변조 될 경우, 가장 꼭대기에 존재하는 root
hash가 달라지기 때문에, 간단하게 데이터 무결성 보장
36. BitSwap
Merkle Tree 보다 더 일반적인 자료구조
Binary Tree는 아니지만 그래프이며, 아무 노드나 데이터를 보유 가능
IPFS는 IPFS Object를 이용하여 유향 / 비순회 그래프 구현
IPFS Object는 256kbyte의 상한 용량을 가지고 있다
하나의 파일이 256kbyte 초과한다면 여러개의 IPFS로 그래프를 구성
I P F S Object
Data
Links
Name
Hash
Size
Data : 256kB의 구조화 되지 않은 바이너리 데이터
Link : 다른 객체의 주소를 가진 구조체 배열
Name : Link의 이름
Hash : 링크 된 IPFS 객체의 해시
Size : 링크 된 IPFS 객체의 누적 크기
37. BitSwap
BitTorrent는 P2P 파일 교환 프로토콜
하나의 파일을 여러 조각으로 나누어, 각 노드끼리 자신이 갖고 있는 조각의 정
보를 알려주고 다른 노드들에게 자신이 필요한 조각을 요청
하나의 노드 다른 노드들과 무수히 많은 세션을 생성하게 되며, 세션이 늘어남
에 따라 사용자의 다운로드 속도 증가
BitSwap은 Bitorrent의 영감을 받은 프로토콜
BitSwap Credit 시스템을 이용하여 물물교환 시스템(barter system)을 표방
38. File Coin
파일을 오랜 시간 유지하고 좀 더 파일을 적극적으로 배포하여 네트워크에
항상 특정수 이상이 존재하게함으로써 파일의 보안성과 속도를 유지 하도록
인센티브 제공
파일코인을 기반으로한 두가지 시장이 존재
I. 저장소 시장(Storage Market)
클라이언트는 저장소 마이너에게 토큰을 지불하고 파일을 저장
II. 검색 시장(Retrieval Market)
클라이언트는 검색 마이너에게 토큰을 지불하고 파일을 전달
39. Address
서울특별시 성동구 아차산로 17
11층 (성수동 1가, 서울숲엘타워)
우편번호 04789
Telephone
Tel : (02)575-0409
Fax: (02)6003-1987