1 of 14

Distributed Parallel

Proof of Work

2 of 14

X-MAS CTF 2021

Fun challenges

3 of 14

X-MAS CTF 2021

Fun challenges

r/place like challenge that uses PoW to draw pixels

4 of 14

Proof of Work

5 of 14

The limits

  • Can only get 5 PoW tasks per second per IP
  • Canvas is 640x480 (307200 pixels)
  • PoW is finding a nonce to a string that produces a partial md5 hash

Example goal: XXXXXXXXXXXX1234

Salt Prefix: 12345678

6 of 14

The solution

CUDA

7 of 14

CUDA md5 brute force projects

  • Are not well optimized
  • Don't support known prefix
  • Can only brute force one hash at a time

8 of 14

The Solution

Write my own brute forcer forked from github

Supports:

  • Multiple input salt:goal
  • Hash salt in a single chunk before-hand and digest the rest

9 of 14

Scaling it up

  • Backend redis queue for PoW to crack
  • Workers across many machines using proxies to mass produce PoW tasks
  • Distribute work evenly across all the GPU machines running the bulk-cracker
  • ~3000 PoW/s across the 3-4 GPU machines

10 of 14

The UI

11 of 14

Some Numbers

Peak drawing speed was 151 pixels/s

Server could not handle much more from all the teams

Had 3 million pixels saved up to draw with in the end

12 of 14

Timelapse

13 of 14

14 of 14

Links