Maitz, A. (2022). Ethereum attack simulator : A discrete event simulation engine for attacks against the ethereum blockchain [Diploma Thesis, Technische Universität Wien]. reposiTUm. https://doi.org/10.34726/hss.2023.102026
Blockchains sichern heutzutage einen erstaunlichen Wert von über einer Billion Euro ab. Es ist entscheidend, sowohl derzeit eingesetzte als auch zukünftige Blockchain Implementierungen im Hinblick auf Attacken evaluieren zu können, um ein besseres Verständnis von deren Richtigkeit, Sicherheit und Leistung zu bekommen. Das schnellebige Umfeld von Blockchains macht genau das sehr schwierig, und mangels ausgereifter Werkzeuge im Hinblick auf abweichendes Verhalten, ist es nicht möglich die Forschungslücke zwischen Theorie und Praxis, was Angriffe betrifft, zu schließen.Diese Arbeit präsentiert einen ereignisdiskreten Simulator für Ethereum - die am weitesten verbreitete Blockchain im Bezug auf Applikationen - der sowohl dazu imstande ist, gewisse Angriffsszenarien zu evaluieren, als auch weitreichend konfigurierbar ist, um die Auswirkungen dieser Attacken auf die Blockchain Stabilität zu untersuchen. Um die Entwicklung dieser Simulationsumgebung zu ermöglichen wird zuerst eine Kategorisierung von Angriffen vorgenommen und zusätzlich der State of the Art, bezüglich existierenden Simulatoren, ausgearbeitet. Ein tieferes Verständnis für das Ethereum Protokoll wird ermöglicht, indem derzeit benutzte Ethereum Clients untersucht werden, während außerdem eine tiefgehende Analyse des de facto Standard-Clients für Ethereum, Geth, dargelegt wird. Hierdurch wird gezeigt, dass bestehende Simulatoren die Anforderungen nicht erfüllen, und folglich, basierend auf der Analyse der Clients und der Simulatoren, ein Konzept für den neuen Simulator entworfen, gefolgt von dessen Implementierung und Validierung gegen reale Daten aus dem Ethereum Mainnet. Angelehnt an die vorangehende Kategorisierung von Angriffen wird eine Teilmenge von relevanten Attacken ausgewählt und deren Auswirkungen hinsichtlich möglicher finanzieller Belohnungen und Destabiliserung von Ethereum mittels der neu entwickelten Simulationsumgebung ausgewertet. Hier wurde die Selfish Mining und die Verifier’s Dilemma Attacke aufgrund der vergleichbaren Eigenschaften und Auswirkungen auf das Ethereum Netzwerk ausgewählt. Die Simulation der Attacken führt zu interessanten Einblicken in die Auswirkungen dieser auf Ethereum. Diese betreffen sowohl mögliche Belohnungen für Angreiferinnen und Angreifer, als auch die Protokollsicherheit, z.B. durch Ausnutzen einer Fehlanpassung von Transaktionskosten an den tatsächlichen Rechenaufwand. Weiters wird die Notwendigkeit der Neubewertung von Sicherheitsrisiken durch den Vergleich von Simulationsauswirkungen vor und nach der Einführung von EIP1559 aufgezeigt.
de
Blockchains are used to secure staggering amounts of over 1 trillion euro worth of digital assets. With this in mind, it is crucial to be able to evaluate both currently deployed and future implementations concerning different attack scenarios, in order to gain deeper insights into their correctness, security and performance. However, the fast-paced environment of cryptocurrencies renders exactly these aspects challenging to achieve in practice, and mediocre tool support concerning the simulation of adversarial behaviour leads to a research gap between theory and practice when it comes to evaluating attacks against real-world blockchain protocols. This thesis addresses this research gap by presenting a discrete event simulation engine for Ethereum - the most widely used blockchain related to smart contract applications - that is capable of evaluating various attack scenarios, as well as being highly customizable in order to aid investigations into the impact these attacks can have on the overall system’s security. To facilitate the development of such a simulation engine, a categorization of known attacks against blockchains, as well as an overview of the state of the art of existing blockchain simulators, is provided. In addition, the currently utilized Ethereum client implementations are examined while also providing a deep dive into the code and processes of the de-facto state-of-the-art Ethereum client, namely Geth. Hereby it is shown that current simulators do not offer the desired functionality. Hence a novel attack simulator is first designed and subsequently implemented as well as validated against real-world Ethereum mainnet data. Based on the previous attack categorization, a subset of relevant attacks is selected and investigated regarding the possible monetary rewards and Ethereum destabilization an adversary could achieve, using the newly developed simulation environment. Specifically, the selfish mining and the verifier’s dilemma attacks were chosen because of their comparable properties and effects on the Ethereum network. The results of this thesis show that the simulation of attack scenarios can lead to interesting insights into the sometimes significant impact attacks can have on Ethereum, e.g., by exploiting a mismatch between actual transaction execution costs and transaction pricing. Furthermore, this work highlights the need for continuous re-evaluation of the security impact of protocol changes through a comparison of the simulated implications of pre- and post-EIP1559 parametrizations.