Sub topic 11
Habits That Keep a Good Setup Safe
A hot and cold split protects you only if you use it correctly. Most losses in well-designed setups come from small, repeated mistakes: a pasted address that was swapped, a download from a fake site, a device bought from a reseller. This chapter covers the habits that prevent those mistakes.
This chapter assumes you know the difference between hot and cold wallets, and what a seed phrase is. It also assumes you have sent crypto before and know what a transaction fee is.
Why Habits Matter
Your threat model (the list of attacks you plan for) already includes malware, phishing, theft and loss. Good architecture reduces how much each attack can take. Habits reduce how often an attack succeeds in the first place.
Attackers rarely break cryptography. They try to get you to do one of three things:
- Send funds to the wrong address.
- Install something malicious.
- Reveal a secret, such as a seed phrase.
Each habit below blocks one of these routes.
Verify the Address Before Every Send
A blockchain transaction cannot be reversed. If you send to the wrong address, no one can undo it. Address checking is therefore the most valuable habit you can build.
Clipboard Hijackers and Address Poisoning
Two common attacks target addresses:
- Clipboard hijacking. Malware on your computer watches the clipboard. When it sees something shaped like a crypto address, it replaces it with the attacker's address. The text you paste is not the text you copied.
- Address poisoning. An attacker sends a tiny transaction from an address that looks like one you use. The first and last characters match yours. Later you copy "your" address from the transaction history and send to the attacker.
Both attacks rely on the same weakness. People compare only the first few and last few characters. An attacker can generate lookalike addresses that match those characters cheaply.
Compare the Whole Address, in the Right Place
Follow these rules:
- Compare the entire address, not just the ends. Read it in chunks of four to six characters.
- Check it on a screen you trust. A hardware wallet's own display is better than your computer's screen, because malware on the computer cannot change what the device draws.
- Get the address from a source you control, such as your own wallet's receive screen, not from your transaction history.
- If the address came by message or email, confirm it through a second channel, such as a phone call.
- Never paste from the clipboard without looking at the result afterward.
The script below compares an address you trust with the address that ended up in the send form. It reports exactly where they differ.
def compare_addresses(expected: str, pasted: str) -> str:
"""Compare a trusted address with a pasted one and describe any difference."""
expected = expected.strip()
pasted = pasted.strip()
if expected == pasted:
return "MATCH: the full strings are identical"
problems = []
if len(expected) != len(pasted):
problems.append(f"length differs ({len(expected)} vs {len(pasted)})")
diffs = [i for i, (a, b) in enumerate(zip(expected, pasted)) if a != b]
if diffs:
problems.append(f"{len(diffs)} differing positions, first at index {diffs[0]}")
return "MISMATCH: " + "; ".join(problems)
trusted = "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq"
swapped = "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdx" # last character changed
print(compare_addresses(trusted, trusted))
print(compare_addresses(trusted, swapped))The second call prints a mismatch at the final character. A visual check of only the first characters would have passed it.
Test Sends and Allowlists
For a large first transfer to a new address, send a small test amount first. Wait for it to confirm, check that it arrived, then send the rest. The extra fee is cheap insurance. It is most useful for a new cold storage address, where a mistake would be hardest to notice.
Many exchanges let you enable a withdrawal allowlist (a list of approved addresses). New addresses can then only be added after a delay. With this enabled, an attacker who steals your login cannot withdraw to their own address immediately, and you get time to notice.
Keep Software and Firmware Current, and Verify What You Install
Wallet software has bugs, and some are security bugs. Updates fix them. But the update process is also an attack target, so you need to update and verify.
Updates
- Update wallet apps, operating systems and hardware wallet firmware on a regular schedule, not only when something breaks.
- Read the release notes. If an update fixes a vulnerability, install it sooner.
- Apply updates to your hot wallet device first. It is the more exposed device.
- Keep a dedicated browser or profile for crypto sites, with few extensions. Every extension can read the pages it runs on.
Verifying Downloads
Fake wallet sites and lookalike ads are a common way to deliver malware. Reach the official site through a bookmark you made earlier, not through a search ad. For software that publishes checksums and signatures, verify them before you run the file.
A checksum is a fixed-length fingerprint of a file. If one byte of the file changes, the checksum changes. A signature proves the checksum list came from the project's maintainers. The commands below show the pattern for Bitcoin Core, which publishes a SHA256SUMS file and a signature file. Import the maintainers' signing keys from a source you trust first.
# Check the downloaded file against the published checksum list.
sha256sum --ignore-missing --check SHA256SUMS
# Check that the checksum list itself was signed by the project's maintainers.
gpg --verify SHA256SUMS.asc SHA256SUMSBoth commands must succeed. The checksum check alone is not enough. An attacker who controls the download page can replace the file and the checksum list together. The signature is what ties the list to known keys.
Not every wallet offers this. For those that do not, download only from the vendor's official domain and compare the app's published hash if one exists.
Firmware Only From the Vendor
Install hardware wallet firmware only through the vendor's own app or documented process. Never install firmware that arrived by email, chat or a third-party link. A genuine device checks the vendor's signature on firmware and warns you if it is missing. If you see that warning, stop.
Handle Devices With Care
A hardware wallet protects keys well, but only if the device itself is trustworthy.
- Buy from the manufacturer. Used devices and marketplace listings can be tampered with. A seller can pre-generate a seed and include a card with the words printed on it. Anyone who knows that seed can drain the wallet.
- Initialize it yourself. A new device should ask you to create a seed. If it arrives with a seed already set up, do not use it.
- Check the packaging and the device's authenticity check. Tamper-evident seals help. Many vendors also provide a software check that the device is genuine. Treat both as useful but not perfect.
- Set a PIN. The PIN limits what a thief can do with a stolen device, because repeated wrong guesses wipe it.
- Consider a passphrase. A passphrase is an extra word you add to the seed. It creates a different wallet. It protects against theft of the seed backup, but if you forget it, the funds are gone. Back it up separately from the seed.
- Do not share the device. Do not plug it into computers you do not control, and do not let anyone else enter your PIN.
- Store it sensibly. Keep the device and the seed backup in different places. Someone who finds only one of them should not have both.
Keep Quiet About Holdings
Physical threats exist too. If strangers know you hold a large amount, you become a target for coercion, sometimes called a wrench attack. Do not show balances in public, and avoid discussing holdings online. For larger amounts, a setup where no single person or place can move the funds, such as multisignature, reduces what a threat can force you to do.
Use the Right Wallet for the Right Job
The tiered strategy only works if the tiers stay separate:
- Do not use your cold storage addresses for daily spending.
- Do not connect a cold wallet to unknown sites, especially to sign messages or approvals you do not understand.
- On chains with smart contracts, signing an approval can give a contract the right to move your tokens. Read what you sign, and revoke approvals you no longer need.
- Keep the hot wallet balance at or below the cap you set. When it grows past the cap, move the excess to cold storage on a regular schedule, for example monthly.
A Routine for Every Send
The routine below combines the habits above. It adds a few seconds to small sends and a few minutes to large ones.
Common Errors
| Mistake | Why it hurts | Better habit |
|---|---|---|
| Checking only the first and last characters of an address | Lookalike addresses match the ends | Compare the whole address in chunks |
| Copying an address from transaction history | History can contain poisoning transactions | Copy from your wallet's receive screen |
| Finding the wallet through a search ad | Ads can point to fake sites | Use a saved bookmark for the official site |
| Buying a used hardware wallet | The device or seed may be tampered with | Buy new from the manufacturer |
| Storing the device and seed backup together | One theft takes everything | Keep them in separate places |
| Never updating firmware | Known bugs stay open | Update on a schedule after reading release notes |
| Using the cold wallet to try new apps | Exposes the signing device to unknown software | Test new apps with the hot wallet |
Exercises
Exercise
You copy a receiving address from your wallet and paste it into an exchange withdrawal form. The first six and last six characters look right. Why is that not enough, and what should you do instead?
Show answer
Clipboard malware and address poisoning both use addresses that match at the beginning and end, so checking only the ends can pass a bad address. Compare the entire address in short chunks, ideally on a trusted screen such as the hardware wallet's display. For a large or first-time transfer, also send a small test amount and confirm it arrived before sending the rest.
Exercise
You download wallet software and the sha256sum check passes. Why should you also verify the signature with gpg --verify?
Show answer
An attacker who controls the download location can replace both the file and the checksum list, so the checksum check passes. The signature shows that the checksum list was signed by the project's maintainers, whose keys you imported from a trusted source. Both checks are needed.
Exercise
A seller offers a sealed hardware wallet at half price, with a card that says "your recovery words are already written here, no setup needed". What is wrong, and what should you do?
Show answer
A seed generated by someone else is known to them, so they can take the funds at any time. Do not use the device or the card. Buy a new device from the manufacturer, generate the seed yourself during setup, and write it down yourself.