Resources

People often ask me "How did you learn how to hack?" The answer: by reading. This page is a collection of the blog posts and other articles that I have accumulated over the years of my journey. Enjoy!

SolChat Messages Insecure Encryption Method- 1357

h0wlPosted 2 Years Ago
  • SolChat claimed to be an encrypted chat application and audio calls using WebRTC. So, the author decided to take a look at it.
  • They first took to reviewing the JavaScript code. Since the JS map files were easy to download they could deobfuscate it using sourcemapper. While doing this, they discovered that the encryption/decryption of messages was happening client side with a large coded key!
  • In particular, these were stored within process.env.REACT_APP_API_URL. Since the client side needs this information, it was exposing the secret information when used there. I'm guessing that the developer didn't understand the difference between frontend and backend.
  • So, they took some messages off of Solana and decrypted them on the spot. Talk about a horrible blunder! Even after making this only on the server side, it's still bad that a single entity has all of the keys for decrypting all messages.
  • I love that the author went and verified these claims. People who make bad claims about the security of something need to be exposed in order for the world to be more secure.