Static Application Security Testing of Consensus-Critical Code in the Cosmos Network

08/21/2023
by   Jasper Surmont, et al.
0

Blockchains require deterministic execution in order to reach consensus. This is often guaranteed in languages designed to write smart contracts, such as Solidity. Application-specific blockchains or “appchains” allow the blockchain application logic to be written using general-purpose programming languages, giving developers more flexibility but also additional responsibilities. In particular, developers must ensure that their blockchain application logic does not contain any sources of non-determinism. Any source of non-determinism may be a potential source of vulnerabilities. This paper focuses on the use of Static Application Security Testing (SAST) tools to detect such sources of non-determinism at development time. We focus on Cosmos, a prominent open-source project that lets developers build interconnected networks of application-specific blockchains. Cosmos provides a Software Development Kit (SDK) that allows these chains to be implemented in the Go programming language. We create a corpus of 11 representative Cosmos-based appchains to analyze for sources of non-determinism in Go. As part of our study, we identified cosmos-sdk-codeql, a set of CodeQL code analysis rules for Cosmos applications. We find that these rules generate many false positives and propose a refactored set of rules that more precisely detects sources of non-determinism only in code that runs as part of the blockchain logic. We demonstrate a significant increase in the precision of the rules, making the SAST tool more effective and hence potentially contributing to enhanced security for Cosmos-based blockchains.

READ FULL TEXT
research
09/07/2018

Empirical Vulnerability Analysis of Automated Smart Contracts Security Testing on Blockchains

The emerging blockchain technology supports decentralized computing para...
research
01/30/2018

Hyperledger Fabric: A Distributed Operating System for Permissioned Blockchains

Hyperledger Fabric is a modular and extensible open-source system for de...
research
10/20/2022

TrustBoost: Boosting Trust among Interoperable Blockchains

Currently there exist many blockchains with weak trust guarantees, limit...
research
08/25/2019

HyperService: Interoperability and Programmability Across Heterogeneous Blockchains

Blockchain interoperability, which allows state transitions across diffe...
research
03/04/2019

Enso: A general-purpose virtual machine

In this paper we introduce Enso, a virtual machine designed to be used a...
research
10/23/2021

Diving Into Blockchain's Weaknesses: An Empirical Study of Blockchain System Vulnerabilities

Blockchain is an emerging technology for its decentralization and the ca...
research
03/27/2020

An Empirical Study of Ownership, Typestate, and Assets in the Obsidian Smart Contract Language

Some blockchain programs (smart contracts) have included serious securit...

Please sign up or login with your details

Forgot password? Click here to reset