Smitop avatar

How to bot DrugWars and bypass encryption

smitop

Published: 13 Apr 2019 › Updated: 13 Apr 2019How to bot DrugWars and bypass encryption

How to bot DrugWars and bypass encryption

I reverse-engineered the encryption used by drugwars@drugwars for fun, here it is. You will need Chrome to follow this guide.

All custom JSON transactions are now a string containing encrypted data. The encrypted data is the same format as before encryption started being used. The data is AES encrypted with a per Steem user key. This key can be obtained by opening the Network tab in Chrome's DevTools in DrugWars, and reloading the page. Find the WebSocket connection (use the WS button at the top), and go to the Messages tab. Go to the fourth message. Click the arrow beside the "1", then "response". You should see this:
image.png
The string beside "key" is important, save that as you'll need it. Now for the fun part: combining some JSON and the key to get the encrypted text.

  1. AES encrypt the JSON of the transaction, using CryptoJS, with the key you just obtained.
  2. Run .toString() on the output of that
  3. Remove all double quote characters from that.
  4. Replace "=" characters with Ml32
  5. Replace all "/" characters with Por21Ld
  6. Replace all "+" characters with xMl3Jk

Side note, it the method used for steps 4-6 was taken directly from a StackOverflow answer.

drugwars@drugwars, remember: all client-side encryption is terrible. Since only your server is supposed to be able to read transactions, it would be a lot better for everyone if you just skipped using a blockchain altogether. Just use a database!

Also, remember: DrugWars is centralized, in the state it's in right now.

Leave How to bot DrugWars and bypass encryption to:

Written by

I'm a person.

Read more #drugwars posts


Best Posts From Smitop

We have not curated any of smitop's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Smitop