Show HN: I made a free, ad-free and open source tool for sharing private notes
burnernote.com
burnernote.com
> However [alternatives'] pages are laden with ads, have a poor UI, and you can't know for sure if they really are actually encrypting / deleting anything.
There has been a private zero-knowledge pastebin for years: zerobin, forked into privatebin now (https://zerobin.net/). In fact the original is almost 10-years old but hasn't displayed a single ad, has been open source the whole time, has had time to iron out a lot of bugs and has a better UX than this: it doesn't need cookies to work.
In terms of security, zerobin encrypts/decrypts everything in the browser. The server has no knowledge of the content. In contrast, burnernote receives the content _and_ the password in cleartext and encrypts/hashes them.
Unfortunately, as long as there's a server you will have to trust it. In both cases you have to rely on something other than code and HTTPS to know if your content actually remains private or not
Client side is coming.
I have client side encryption coming to Burnernote very soon.
0. This has XSS vulnerability. If attacker writes down this memo: <script>do_the_evil_things()</script> and passes to people, they might be unknowingly attacked(get tracked by attacker their IP/Browser fingerprint, mine cryptocurrencies for attacker, etc...)
1. This basically works under server-side encryption. When user type their text in the website, it is encrypted with the secret key on your config file and saved on the database. This is only effective when attacker only succeeds to crack the database. Also, you can read the text. I know you won't, but you know, cryptographers don't trust anyone. If you want to mitigate this, you might want to learn about end-to-end encryption. In short: the hash of the private link is the secret key. The browser randomly generate the key and encrypt/decrypt the text. The server only receives/saves the ciphertext.
2. AES-256-CBC is unsafe because it provides confidentiallity and not authenticity.[1] This means the attacker who can only crack the database can edit the ciphertext to pseudo-arbitrary plaintext under certain circumstance without knowing of the key. Also under another circumstance, attacker can use 'Padding oracle attack' to recover the ciphertext. it seems your service is not in this case: Laravel's encryption is AES-256-CBC + MAC, which mitigates this problem. So this is safe, but next time, if you write some crypto-related things without Laravel, you'd better use some high-level library such as libsodium or sjcl.
3. This service uses CloudFlare. Using CloudFlare might be safe on small project because they have rock solid WAF to prevent general attacks. But it may be unsafe for a whistleblower from NSA: when it matters with state-sponsered attackers or law enforcements, CloudFlare can be attacked/warranted. Then it becomes another attack vector.
Again, your service and idea are cool. But you should remember that this area is full of land mines, dragons, and dinosaurs with laser guns.
Welcome to privacy/crypto world!
[1]: https://arxumpathsecurity.com/blog/2019/10/16/cbc-mode-is-ma...
Edit: I spent some time thinking about it and might as well document it here if someone finds it interesting. For context, my application does client side encryption with keys stored only in the browser. The catastrophic case would be if the frontend application is modified to extract those keys. That's why I don't necessarily trust a hosted option (which typically needs control of the SSL certificate as well). Instead I would like to serve the client from a server under my control.
One solution is to use Github Actions and have it automatically deploy via ssh. This doesn't really increase my attack surface, since the code is already at Github anyway. So if this platform is compromised / warranted they could modify my application to their liking.
A second solution would be to use any CI service and restrict the capabilities of the ssh key in the `authorized_keys` to only trigger a fixed command without actually being able to log in. The command would pull the code / image and deploy. This way a compromised key could only be used to trigger a new deployment of authentic code, not inject malicious code.
https://pilabor.com/blog/2021/05/js-gcm-encrypt-dotnet-decry...
Notes:
- This is symmetric encryption via AES-GCM, but asymmetric should work similar
- In-browser randomness (for key generation) is somewhat questionable, so try to read more about this topic
- This is meant as an intro to the topic - real security takes much more, like thinking about secure key storage, backup/recovery keys, etc.Appreciate the feedback!
SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'note' at row 1 (SQL: insert into `notes` (`note`, `password`, `user_id`, `token`, `updated_at`, `created_at`) values ...SNIP...I worry about using such services when it comes to sending the note links over email or chat platforms, where the messaging platform may crawl the link and have the content destroyed before the human user has had a chance to see it. Has anyone encountered this on other secret sharing platforms? Using a password that’s not part of the link would prevent from that happening, but I see that it’s optional in this solution.
Problem resolved :-)
1. Create Note with the contents <script>alert(1);</script>
2. Go to link
3. this site is a massive security flaw.
Cool site tho, Have a lovely week.
This has a problem though, when you paste that link in a chat window (e.g. WhatsApp, Telegram, Discord, ...), the app tries to get a link preview.
This has the side effect of also expiring the note.
I think it's best to implement a feature to detect whether it's a human opening the link or a bot.
Amusingly, the brief contents of the note are visible in the preview along with "This note has now been permanently deleted".
What is the answer to this question in general? Genuinely asking, I never considered this but it seems like a real concern for any OSS.
This was and still is a popular solution if you torrent to make sure you’re getting what the original seeder intended. The same philosophy applies here.
For back end apps it’s inherently not possible.
I’m not sure what convenient method exists to do this for the client. You’d have to compare hashes and idk how that could be done in a easy and trustworthy manor.
It's always great to see people experiment with encryption (and burn-after-use schemes are very cool!) but, absent of further information, I think it's actively dangerous to encourage people to use this.
Edit: It might also be a stretch to call this a "burn-after-use" scheme: there's no affirmative proof of a note's destruction on the server side. It seems to just update the database to mark the note as empty and deleted[2].
[1]: https://github.com/GigaMick/burnernote/blob/6c01eddfc5195b15...
[2]: https://github.com/GigaMick/burnernote/blob/6c01eddfc5195b15...
[1]: https://laravel.com/docs/8.x/encryption#encrypting-a-value
1. Message secrecy and the soundness of the encrypt-then-MAC protection seem to be partially, if not completely, dependent on the `APP_KEY` that you generated and are currently running the service with. For all anyone knows, that `APP_KEY` is all zeroes or comes from a bad RNG source. A better scheme wouldn't introduce a fundamental dependency on untrusted server randomness.
2. Message deletion is unsound: I have no proof that a note being "deleted" means that it's actually purged from your storage. I'm decently sure proving that is actually impossible in the general case, which is another reason why it's dangerous to have the note's encryption handled on the server side.
3. The "password" functionality seems to just be a string comparison against a DB-stored password. It's not mixed into the secret material for encryption at all. It's hashed at least, which is good, but it doesn't look like it's salted, which is bad.
Isn't updating the note to be empty and deleted enough? It is totally zapped.
What else would you like to see here?
But even beyond that, there are a lot of weaknesses in this setup. I'll post a list of them in response to the other comment you left, since they'll be more relevant there.
> What else would you like to see here?
Frankly, you should either disable this service or put a big red banner on it explaining that it it (1) hasn't been audited, and (2) doesn't encrypt messages on the client side. As it is, people are going to make incorrect and potentially dangerous assumptions about the privacy of data they put on your service.
Please don't take that as a personal rebuke, because it isn't! I just don't want you to be the most recent person in a long lineage of developers to be publicly burned for teaching themselves applied cryptography.
notes are encrypted client-side before sending, click-to-read prevents scraper burn, auto-delete after 30days
Impact: Someone reads a private note on a shared computer, how long will it remain visible in history?
Browser: Chrome 95
You might get divorced some day. You might have a business partner subpoena your old gmail account. ALL those emails/texts will be turned over, ALL those emails/texts will get leaked. Use something like this! Make the message burn after reading.