โ† All Blockchain Technology Flashcard Decks

Security and Vulnerabilities Flashcards

6 cards from real Blockchain Technology practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 Security and Vulnerabilities flashcards as text
  1. An attacker creates thousands of pseudonymous nodes on a peer-to-peer network to gain a disproportionately large influence. By controlling a significant number of these fake identities, the attacker aims to out-vote honest participants or disrupt network operations. Which type of attack does this scenario describe?

    Answer: Sybil Attack

    A Sybil attack is characterized by a single entity creating a large number of fake identities (nodes) to undermine the authority or reputation system of a network. The goal is to gain enough influence to carry out malicious actions, such as out-voting honest nodes or censoring transactions.

  2. A smart contract written in a pre-0.8.0 version of Solidity contains a function to process batch transfers. An attacker discovers that by sending a carefully crafted array of transfer amounts, they can cause the internal loop's counter variable, a `uint8`, to exceed its maximum value of 255. This causes the variable to wrap around to 0, leading to unintended contract behavior. What is this vulnerability called?

    Answer: Integer Overflow

    An Integer Overflow occurs when an arithmetic operation attempts to create a numeric value that is larger than what can be stored in its data type. For a `uint8`, the maximum value is 255. Adding 1 to 255 will cause it to 'wrap around' to 0, which can lead to severe vulnerabilities in smart contracts, especially in older Solidity versions that did not have built-in checks.

  3. An attacker targets a specific merchant's node on a blockchain network. The attacker floods the node's connection table with IP addresses of malicious nodes they control. As a result, the merchant's node is completely isolated from honest peers and only receives information, such as blocks and transactions, curated by the attacker. This allows the attacker to feed the merchant a fraudulent transaction, leading to a double-spend. Which attack has taken place?

    Answer: Eclipse Attack

    An Eclipse Attack is a network-level attack where an attacker isolates a specific node or group of nodes from the rest of the network. By monopolizing the victim's peer connections, the attacker can filter the information the victim receives, leading to double-spending, selfish mining, or other disruptions.

  4. Which of the following describes the primary mechanism of a Timejacking attack?

    Answer: Manipulating a node's network time counter by connecting it to malicious peers with inaccurate timestamps, forcing it to accept an alternative blockchain.

    A Timejacking attack specifically targets a node's perception of time. An attacker floods a victim node with connections from malicious peers that all report inaccurate timestamps. This can manipulate the victim's network time counter, potentially causing it to reject valid blocks from the honest network and accept a fraudulent, alternative chain from the attacker.

  5. A malicious actor gains control of more than 50% of a Proof-of-Work blockchain's total hashing power. With this majority control, they are able to mine a private version of the blockchain faster than the rest of the network. They then broadcast this longer chain, which causes the honest network to discard its version and accept the attacker's, allowing the attacker to reverse their own previous transactions. This vulnerability is known as a:

    Answer: 51% Attack

    A 51% Attack, also known as a majority attack, occurs when a single entity or group controls more than 50% of a blockchain's consensus power (e.g., hashing power in PoW). This majority control allows them to manipulate the blockchain, most notably by creating a longer chain in private and then releasing it to orphan the honest chain, enabling double-spending of their own funds.

  6. A DeFi lending protocol's smart contract has a `withdraw()` function that follows this sequence: 1. Checks the user's balance. 2. Sends the Ether to the user's address. 3. Updates the user's balance to zero. An attacker creates a malicious contract with a fallback function. When the attacker calls `withdraw()`, their fallback function is triggered by the incoming Ether and immediately calls the `withdraw()` function again before the original call can update the balance. What type of vulnerability is being exploited?

    Answer: Reentrancy

    This is a classic example of a Reentrancy attack. The vulnerability exists because the contract sends Ether (an external call) before it updates its internal state (the user's balance). An attacker's contract can use its fallback function to 're-enter' the vulnerable function and repeatedly withdraw funds until the contract is drained or the gas limit is hit.