Blockchain Security and Attacks Questions and Answers — Questions and Answers
Question 1: An attacker creates thousands of pseudonymous nodes on a peer-to-peer blockchain network. The goal is to gain a disproportionately large influence, potentially overpowering honest nodes in consensus or disrupting network routing. What is this type of attack called?
- Eclipse Attack
- Sybil Attack (Correct answer)
- Dusting Attack
- 51% Attack
Correct answer: Sybil Attack
A Sybil attack is characterized by a single entity creating multiple fake identities (Sybil nodes) to undermine the authority or reputation system of a network. By controlling a large number of these nodes, an attacker can out-vote honest participants or disrupt network operations.
Question 2: A smart contract function is designed to transfer a user's remaining token balance. The code is written as `balances[user] -= amount;`. If a user with a balance of 100 tokens calls this function with an `amount` of 101, and the contract is running on an older, unprotected version of Solidity, the user's balance could wrap around to a very large number. This vulnerability is known as:
- Reentrancy
- Oracle Manipulation
- Integer Underflow (Correct answer)
- Timestamp Dependence
Correct answer: Integer Underflow
Integer underflow occurs when an arithmetic operation results in a value smaller than the minimum value the data type can hold, causing it to wrap around to the maximum possible value. In this case, subtracting 101 from 100 would result in -1, which for an unsigned integer wraps around to the largest possible value, potentially allowing the user to claim an enormous balance. Modern Solidity versions (0.8.0+) have built-in checks to prevent this.
Question 3: A user notices they have received several unsolicited transactions, each for a minuscule amount of cryptocurrency (e.g., 0.00000546 BTC), in their wallet. What is the most likely purpose of this 'dusting attack'?
- To clog the network with spam transactions, increasing fees for everyone.
- To test if the user's wallet address is active before sending a larger, legitimate payment.
- To advertise a new coin or project by sending small amounts to active wallets.
- To de-anonymize the wallet owner by tracking how and when this 'dust' is spent with other funds. (Correct answer)
Correct answer: To de-anonymize the wallet owner by tracking how and when this 'dust' is spent with other funds.
The primary goal of a dusting attack is to compromise user privacy. Attackers send tiny amounts of crypto ('dust') to many addresses and then use blockchain analysis to track when this dust is combined with other funds in a transaction. This allows the attacker to link different addresses to a single entity, de-anonymizing the user.
Question 4: A malicious miner on a Proof-of-Work blockchain successfully mines a block but chooses not to broadcast it to the network. Instead, they immediately start mining the next block on top of their secret one. The goal is to build a longer private chain and release it strategically to orphan blocks found by honest miners. This strategy is known as:
- Selfish Mining (Correct answer)
- Block Withholding
- Time-jacking Attack
- Finney Attack
Correct answer: Selfish Mining
Selfish mining is a strategy where a miner or pool keeps newly found blocks secret, aiming to get a head start on mining subsequent blocks. By releasing their longer private chain at an opportune moment, they can invalidate the work of honest miners, thereby increasing their own relative share of mining rewards.
Question 5: An attacker wants to isolate a single, specific node from the rest of the blockchain network. They do this by monopolizing all of the target node's incoming and outgoing peer connections with nodes they control. This allows the attacker to feed the victim false transaction data and a counterfeit view of the blockchain. Which network-level attack is being described?
- Sybil Attack
- Forking Attack
- Denial-of-Service Attack
- Eclipse Attack (Correct answer)
Correct answer: Eclipse Attack
An eclipse attack is a targeted network-level attack where a malicious actor takes control of all of a victim node's peer connections, effectively isolating it from the honest network. This 'eclipses' the node's view of the real blockchain, making it vulnerable to deception, such as accepting double-spent transactions.
Question 6: A user stores their cryptocurrency private key in a plain text file named `wallet_key.txt` in a public GitHub repository. What is the most immediate and severe consequence of this action?
- The network will automatically freeze the funds associated with the key for security reasons.
- An attacker can view the transaction history but cannot initiate new transactions.
- The user's funds can be immediately and irreversibly stolen by anyone who finds the key. (Correct answer)
- The user will receive a warning from GitHub to remove the sensitive information.
Correct answer: The user's funds can be immediately and irreversibly stolen by anyone who finds the key.
A private key is the sole credential that proves ownership and grants the authority to spend cryptocurrency from an address. Exposing it publicly gives anyone who finds it complete and total control over the associated funds. The decentralized nature of blockchain means there is no central authority to reverse transactions or freeze funds once they have been stolen.
An attacker creates thousands of pseudonymous nodes on a peer-to-peer blockchain network.
The goal is to gain a disproportionately large influence, potentially overpowering honest nodes in consensus or disrupting network routing.
What is this type of attack called?