What is Nostr?
/ nunchuk_io
npub1cvq…yjt3
2024-08-06 08:29:41

nunchuk_io on Nostr: Great research and security disclosure by nick llfourn and Robin Linus. Here's what ...

Great research and security disclosure by nick (npub1j8d…26k2) llfourn (npub1xh8…gst6) and Robin Linus. Here's what you need to know about the "Dark Skippy" vulnerability:

1. Hardware signing devices insert random values called 'nonces' every time they sign Bitcoin transactions.
2. Weak nonces (values that are not sufficiently random) can allow an attacker to mathematically brute-force the private key from the signatures alone, just by analyzing transactions on the public blockchain.

This is a well-known class of attack. "Dark Skippy" is a new technique which makes it easier to grind the private key from weak nonces.

What are the conditions required for the attack? The attack requires either:
1. Loading malicious firmware onto the device, which generates weak nonces.
2. A bug in the vendor's official firmware that produces weak nonces.

How do I protect myself from this type of attack?
1. Order hardware signing devices straight from the vendors, if possible. The more direct, the lower the likelihood of tampering.
2. Use hardware vendors that have tamper-resistant mechanisms in place, such as tamper-evident sealed bags, firmware attestation, etc.
3. Use hardware where you can easily verify the integrity of the source firmware and its updates.
4. Use hardware that follows security standards in generating nonces. One such standard is RFC6979 (deterministic nonces).
5. Verify the authenticity of the firmware every time you upgrade. (Tip: bookmark the vendor website to avoid phishing).
6. Avoid updating firmware unless you absolutely have to. Use another device if you want to experiment with firmware features that you don't actually need for your main stash.
7. Use multisig, preferably multi-vendor multisig. This alone significantly increases the difficulty of executing the attack.

Multisig versus Anti-exfil
You might have heard that "anti-exfil" is a way to prevent the above attack. In short, anti-exfil describes a security technique which combines entropy from the hardware signing device with entropy from a SECOND DEVICE (typically the host of the companion software wallet) to generate the nonces.

However, there are 2 downsides to this approach. First, there is currently no anti-exfil standard, so you'd have to trust that the vendors implement anti-exfil correctly. Secondly, since anti-exfil changes the way a signature is generated, i.e., asking for a nonce from a second device for every single transaction, it is not compatible with the way most Bitcoin wallets work today, and therefore introduces a UI/UX challenge.

Until anti-exfil has a well-defined standard and wider wallet compatibility, we recommend multisig as the more practical approach. Fundamentally, multisig achieves the same goal as anti-exfil: it also requires entropy from a second device to authorize each Bitcoin transaction. Multisig can also add entropy from more than just 2 devices, if you so choose (3-of-5 multisig, for example). Last but not least, multisig has been used for 10+ years in Bitcoin, battle-tested (securing hundreds of billions worth of Bitcoin), and at this point has been very well standardized (PSBT, BSMS, Output Descriptors, to name a few standards).

Hence, use multisig if you are concerned about Dark Skippy.

In conclusion, while the "Dark Skippy" vulnerability highlights potential risks in hardware signing devices, users can significantly mitigate these risks by following best practices in device procurement and usage, and by implementing multisig setups. Stay informed, verify your devices and firmware, and consider multisig for enhanced security of your Bitcoin holdings.

P.S. A common question is: “Does adding a passphrase to my seed phrase protect me against Dark Skippy and similar types of attacks?” The answer is no. Since nonce-based key grinding works against the master private key, not the seed phrase, adding a passphrase will NOT protect you against this class of attack.

Today we disclose Dark Skippy - a powerful new method for a malicious signing device to leak secret keys.

With a modified signing function, a device can efficiently and covertly exfiltrate a master secret seed by embedding it within transaction signatures



If an attacker manages to corrupt a signing device, Dark Skippy can deliberately use weak & low entropy secret nonces to embed chunks of the seed words into transaction signatures.

It takes just two input signatures to leak a 12 word seedphrase onto the Bitcoin blockchain.

The attacker can watch on-chain until they spot an affected transaction, unblind and invert the low entropy nonces using an algorithm like Pollard's Kangaroo algorithm to learn the master secret seed.

Then the attacker can wait and steal the funds whenever they decide best.

Despite this attack vector not being new, we believe that Dark Skippy is now the best-in-class attack for malicious signing devices.

- The attack is impractical to detect
- Requires no additional communication channels
- Effective on stateless devices
- Exfils master secret

Beyond ensuring your device firmware is genuine and honest (opensource), mitigations include anti-exfil signing protocols and we present some new ideas for additions to PSBT specifications to disrupt this attack.

We encourage mitigation discussion and implementation exploration.

This attack highlights the importance of verifying and securing your device's firmware, and the danger of sharing stateless signing devices with other people.

We will be publicly releasing our code later this year.

Authors: llfourn (npub1xh8…gst6) (follow him so he gets onto nostr), Robin Linus, and myself.

If you have any concerns or questions we recommend checking out the FAQ page on our website:
https://darkskippy.com
Author Public Key
npub1cvqlzvmjercdn0ypsmv8f7j9lge6ahsnueh5rparh53wuswftv4q49yjt3