How to bot DrugWars and bypass encryption

@smitop · 2019-04-13 02:30 · drugwars

I reverse-engineered the encryption used by @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, 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.

#drugwars #bots #game #futureshock #javascript
Payout: 0.000 HBD
Votes: 47
More interactions (upvote, reblog, reply) coming soon.