Securing Blockchain Networks like Ethereum and Hyperledger Fabric

By Alessandro Parisi
    What do you get with a Packt Subscription?

  • Instant access to this title and 7,500+ eBooks & Videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Free Chapter
    Introducing Blockchain Security and Attack Vectors
About this book
Blockchain adoption has extended from niche research to everyday usage. However, despite the blockchain revolution, one of the key challenges faced in blockchain development is maintaining security, and this book will demonstrate the techniques for doing this. You’ll start with blockchain basics and explore various blockchain attacks on user wallets, and denial of service and pool mining attacks. Next, you’ll learn cryptography concepts, consensus algorithms in blockchain security, and design principles while understanding and deploying security implementation guidelines. You’ll not only cover architectural considerations, but also work on system and network security and operational configurations for your Ethereum and Hyperledger Fabric network. You’ll later implement security at each level of blockchain app development, understanding how to secure various phases of a blockchain app using an example-based approach. You’ll gradually learn to securely implement and develop decentralized apps, and follow deployment best practices. Finally, you’ll explore the architectural components of Hyperledger Fabric, and how they can be configured to build secure private blockchain networks. By the end of this book, you’ll have learned blockchain security concepts and techniques that you can implement in real blockchain production environments.
Publication date:
April 2020


Introducing Blockchain Security and Attack Vectors

In this chapter, we will introduce the fundamental constitutive elements of blockchain technology, such as distributed ledger, peer-to-peer network topology, and consensus algorithms, all of which will be further explored in depth in the chapters that follow.

These notions are essential to fully understand the aspects of cyber security associated with blockchain technology, especially with regard to identifying possible attack vectors.

In particular, we will cover the following topics in this chapter:

  • An introduction to blockchain
  • The building blocks of blockchain
  • Blockchain network topology
  • Establishing trust through consensus algorithms
  • Potential threats that affect trust

An introduction to blockchain

The blockchain is often compared to the internet in terms of innovation potential. Just as the network of networks has allowed information and ideas to circulate globally, allowing for the reduction of gaps in terms of space and time, in the same way, the blockchain proposes to become the Internet of Value.

Another aspect that unites the internet and blockchain is their ability to disintermediate the productive sectors (starting from the financial one) to reduce the areas of inefficiency and allow the emergence of innovative solutions, thereby overcoming the rigidity derived from the status quo preserved by incumbent operators.

Blockchain as the Internet of Value

Blockchain is commonly defined...


The building blocks of blockchain

Now, we're going to analyze the constituent elements of the blockchain and start with the blocks. As we mentioned earlier, transactions are stored within the blockchain blocks, so each block is composed of two parts:

  • A block header, in which the link to the previous block is stored in the form of a hashing checksum digest. This is done to prevent the possibility of altering the transactions stored in the previous block.
  • A block body, containing the list of transactions, complete with relevant information (including the amount transferred, the addresses of peers, and so on).

The following diagram shows the structure of Bitcoin blocks and their mutual relationships within the blockchain:

You can check out the image in the following link, As a consequence of how the blocks...


Blockchain network topology

Now, let's look at the networking features of the blockchain.

The following diagram is a typical example of the centralized network topology, in which there is a central node that acts as a hub for sharing information with the other nodes:

You can check out the image in the following link, The advantages of the centralized network can be summarized by the fact that there is only one central authority (server) that acts as an arbitrator. This manages the requests coming from the remaining nodes of the network (clients).

However, the fundamental limit of centralized networks is the fact that the central node represents a single point of failure for the entire network (which can, therefore, be the target of Denial of Service attacks, for example). If the central node is compromised, all...


Establishing trust through consensus algorithms

As we mentioned in the previous paragraph, one of the main challenges we face in blockchain is to reach an agreement with all the counterparties regarding the validity of the transactions made, without having to resort to a central authority.

The blockchain adopts a collective coordination system, known as distributed consensus, which does not require centralized coordination.

This solution is inspired by the various examples that exist in nature regarding the collective coordination of independent individual behaviors, such as swarm intelligence, in order to reach a common goal (in the case of the blockchain, consent for the transactions being carried out).

On account of this, a collective decision-making process has to be introduced, in which all the nodes independently maintain a local copy of the transactions that are carried...


Potential threats that affect trust

The potential threats that might affect trust in the blockchain involve the following aspects:

  • The blockchain distributed architecture
  • The blockchain application layer
  • The blockchain security model

Now, let's look at some of the main threats concerning these different aspects.

Threats to the distributed architecture

In general, the security threats concerning the blockchain are different compared to traditional applications, precisely because of the distributed nature of the blockchain architecture. Therefore, many of the attacks that are performed on centralized architectures are actually ineffective when performed on blockchain. Nonetheless, the latter suffers from vulnerabilities...



In this chapter, we introduced the basic concepts of the blockchain and provided a reference framework regarding the topics we will cover in the following chapters. In particular, we have looked at the mechanisms that govern the achievement of consensus and trust within the blockchain and the possible threats in terms of security.

In the next chapter, we will introduce the cryptographic fundamentals that are used in the blockchain and fully understand their cyber security implications.

About the Author
  • Alessandro Parisi

    Alessandro Parisi has been an IT professional for over 20 years, acquiring significant experience as a Security Data Scientist, and as an Artificial Intelligence Cybersecurity and Blockchain specialist. He has experience of operating within organizational and decisional contexts characterized by high complexity. Over the years, he has helped companies to adopt Artificial Intelligence and Blockchain DLT technologies as strategic tools in protecting sensitive corporate assets. He holds a Master Degree in Economics and Statistics.

    Browse publications by this author
Securing Blockchain Networks like Ethereum and Hyperledger Fabric
Unlock this book and the full library FREE for 7 days
Start now