Sub topic 9
Address poisoning and copy-paste mistakes
Assume you know how wallet addresses work, can send crypto from a wallet or exchange, and understand that a confirmed blockchain transaction is usually difficult or impossible to reverse. This chapter focuses on a narrower risk: sending funds to the wrong address because an attacker made a copied address look familiar.
How address poisoning works
An address is a long identifier for a wallet. On networks such as Ethereum, it often begins with 0x. Users commonly copy only the beginning and end of an address when checking it. Attackers exploit this habit.
In an address-poisoning attack, an attacker creates an address that resembles one you have used before. The attacker may send a tiny transaction from that address to your wallet. The transaction creates a new entry in your wallet history. Later, you copy the address from that history, assuming it belongs to your usual recipient. You then send valuable funds to the attacker.
The small incoming transfer is bait. It does not give the attacker control of your wallet, and ignoring it does not by itself protect future transfers. The danger comes from trusting transaction history instead of verifying the complete destination.
| Mistake | Why it is dangerous | Safer habit |
|---|---|---|
| Copying the first familiar-looking address in history | The address may be a poisoned lookalike | Use a saved, verified address |
| Checking only the first and last characters | Different addresses can share those characters | Compare the full address |
| Trusting the clipboard automatically | Malware can replace copied text | Paste into a plain text field and recheck |
Address lookalikes are still different addresses
Two addresses can share the same first and last characters while differing in the middle. A short script can demonstrate why checking only the ends is unsafe:
def looks_alike(a: str, b: str, n: int = 4) -> bool:
"""True if two different addresses share the same first and last n characters."""
return a != b and a[:n] == b[:n] and a[-n:] == b[-n:]
known = "0xAbCd1234567890aaaaaaaaaaaaaaaaaaaaaa9876"
incoming = "0xAbCd1234567890bbbbbbbbbbbbbbbbbbbbbb9876"
print(looks_alike(known, incoming)) # TrueThe function returns True, but the addresses are not equal. The example is simplified, yet it captures the human-factors problem: visual similarity is not identity.
Clipboard malware and altered destinations
Address poisoning uses transaction history. Clipboard malware attacks the copying step itself. It monitors copied text and replaces a detected wallet address with an attacker-controlled address. The replacement may look similar enough to escape a quick glance.
Before sending:
- Copy the destination from a trusted source, such as an address book entry or a previously verified record.
- Paste it into the wallet.
- Compare the complete address with the trusted source, not just the first and last characters.
- Send a small test amount when the value or recipient is unfamiliar.
- Verify the recipient received the test before sending the remainder.
A hardware wallet can protect private keys, but it cannot decide whether you selected the correct recipient. Read the address shown on the device screen when possible. Also keep your operating system, browser, wallet, and malware protection up to date.
A safer transfer flow
The same process applies to exchange withdrawals, smart-contract transfers, and payments to people you know. A familiar label in a wallet does not replace verification of the actual address.
Exercise
Your transaction history contains a tiny incoming transfer from an address that resembles your regular exchange deposit address. What should you do before sending funds?
Show answer
Do not copy that address from the history. Retrieve the destination from the exchange’s trusted interface or a verified address book entry, compare the complete address, and send a small test first.