WEBVTT

00:00.000 --> 00:01.700
This is our first talk today.

00:03.020 --> 00:08.240
Talk is basically the one Bitcoin heist with Joseph Gabay.

00:08.620 --> 00:10.340
And here he is.

00:10.360 --> 00:12.340
And give him a big round of applause.

00:12.340 --> 00:14.780
This is the first talk of DAKON.

00:15.000 --> 00:15.940
All right.

00:16.580 --> 00:17.320
All right.

00:17.320 --> 00:18.260
There you go, buddy.

00:18.260 --> 00:19.620
Thank you very much.

00:20.320 --> 00:21.520
Hello everyone.

00:21.520 --> 00:22.520
Good morning.

00:22.600 --> 00:24.340
Thank you all for coming.

00:25.540 --> 00:29.120
My name is Joseph Gabay and I stole a Bitcoin from the Internet.

00:29.300 --> 00:33.920
And I'm going to tell you how I did it and how you can do it too, but not really.

00:34.520 --> 00:37.300
So before I get into this talk, I want to give a basic disclaimer.

00:37.300 --> 00:38.540
This is a personal project.

00:38.540 --> 00:42.280
It's not affiliated with my employer, with my friends, with anyone.

00:42.740 --> 00:45.740
Just don't call my employer asking about this.

00:45.740 --> 00:47.100
I've had that happen before.

00:47.100 --> 00:48.580
It's an awkward conversation.

00:49.260 --> 00:51.880
I'll have my email address at the end if you've got questions.

00:51.880 --> 00:52.360
Reach out to me.

00:52.360 --> 00:53.400
I'm happy to talk.

00:54.480 --> 00:56.540
So what this talk is about.

00:56.860 --> 01:03.340
In short, about ten years ago, some anonymous person on the Internet issued a puzzle challenge to the Internet.

01:03.580 --> 01:05.320
There is a one Bitcoin prize.

01:05.320 --> 01:06.440
There are 20 clues.

01:06.440 --> 01:11.960
If you solve all 20 clues, you get the phrase that unlocks the brain wall that contains the Bitcoin.

01:12.160 --> 01:15.960
Now this went on claim for a very long time, over 11 years.

01:15.960 --> 01:23.460
And as I'm sure all of you know what the Bitcoin prize has done in those past 11 years, it was definitely interesting that it had never been claimed.

01:23.900 --> 01:37.780
So last year, as the prize continued to spike, I eventually got over my disdain for OpenCL and decided to learn how to botch the other hashcat plugins in order to crack brain wallets and finish the rest of this puzzle.

01:37.880 --> 01:50.600
So this talk is going to talk about the puzzle itself, who wrote it and how it worked, how brain wallets work under the hood, which is the technology that the puzzle relied on, and also the basics of hashcat modules and plugins and how to put them together.

01:51.260 --> 01:55.020
So, a little bit about me and how I got here.

01:55.020 --> 01:56.820
I used to be a robotics engineer.

01:57.120 --> 01:59.920
And then I did something very funny with shopping cart wheels.

01:59.920 --> 02:02.080
You can check it out at the Physical Security Village later.

02:02.080 --> 02:05.820
I've got a little demo booth, but you can control them with your phone by freaking them.

02:05.940 --> 02:10.920
I spoke about that at DEF CON 29 and 31, if you're curious at all.

02:10.920 --> 02:15.980
And I'm a skydiver, an internet treasure hunter, retired now.

02:15.980 --> 02:17.780
I figure I should quit while I'm ahead.

02:18.100 --> 02:21.160
And I'm here on stage now.

02:21.720 --> 02:23.940
So, the one bitcoin book.

02:24.400 --> 02:29.040
This was a puzzle challenge posted to Twitter and Reddit in April 2014.

02:29.360 --> 02:34.240
The deal was the first ten people to sign up for it on the website got a free copy of the book.

02:34.240 --> 02:39.400
Everyone else had to pay 0.01 bitcoins, which at the time was only four or five dollars.

02:39.400 --> 02:41.840
But now is much, much more.

02:42.300 --> 02:45.860
The copyright at the bottom of it was to a Spencer Lucas.

02:45.860 --> 02:48.820
I've done some basic OSINT on this.

02:48.820 --> 02:52.260
I haven't been able to find any social media presence, any name.

02:52.260 --> 02:54.580
The website was WhoIsProtected.

02:55.560 --> 02:57.620
So, I really have no idea.

02:57.620 --> 03:01.300
I've tried reaching out to all of the social media accounts and haven't gotten any responses.

03:01.300 --> 03:05.900
Spencer Lucas, if you're out there watching this talk, reach out, please.

03:07.620 --> 03:09.520
But there were 20 clues.

03:09.680 --> 03:12.180
I'll give some examples of them in just a second.

03:12.200 --> 03:15.860
But each clue gave you a single letter, uppercase or lowercase.

03:15.860 --> 03:18.020
There were no special characters, no numbers.

03:18.020 --> 03:22.540
So, that is a 52 character set for each possible clue.

03:22.780 --> 03:30.900
You took all of these, you combined them, and you added an extra little bonus string that you got as part of the email when you actually paid for it or signed up for free.

03:30.900 --> 03:33.040
Put that into the Brain Wallet utility.

03:33.280 --> 03:37.860
And if you got it right, you get the private key for the address containing one Bitcoin.

03:38.820 --> 03:40.660
Reactions to this were a little mixed.

03:40.660 --> 03:43.540
A lot of people on Reddit thought this guy was full of crap.

03:43.920 --> 03:45.100
Rightfully so.

03:45.740 --> 03:47.300
People thought it was suspicious.

03:47.560 --> 03:52.820
And , you know, he was, to his defense, engaging with people on Reddit and trying to defend it.

03:52.820 --> 03:56.580
He, at one point, had joked if this went well, he might release a 10 Bitcoin book.

03:56.580 --> 03:58.160
I'm still waiting for that.

03:58.160 --> 04:02.720
I hope he chooses a different technology to base it off of for reasons that will become evident.

04:03.300 --> 04:04.220
But, yeah.

04:04.220 --> 04:10.700
It was one of those things where I don't think a lot of people really wanted to engage with it because they didn't think it was legitimate.

04:10.700 --> 04:13.700
They thought someone was trying to steal four or five bucks at a time from folks.

04:13.700 --> 04:15.080
Which, fair.

04:15.240 --> 04:17.360
But, so it goes.

04:17.480 --> 04:19.260
Let's go through a couple of the clues.

04:19.800 --> 04:21.820
I had some help solving these.

04:21.820 --> 04:24.840
One of them is from my friend Ashley who helped me with quite a few of these.

04:24.840 --> 04:26.260
She's in the audience here right now.

04:26.260 --> 04:35.260
If we could just give a big round of applause because she was hugely instrumental in helping me get here and also just keeping my fixation on this alive.

04:35.860 --> 04:40.120
So, this is clue 12, one of the examples that Spencer posted on Twitter publicly.

04:40.440 --> 04:43.920
It consists of four shapes with letters in them.

04:44.100 --> 04:50.120
And it's not said, but you can intuit that you need to figure out the pattern and figure out what letter is in the next shape.

04:50.420 --> 04:53.520
So, again, I have no idea how Ashley figured this one out.

04:53.520 --> 04:57.340
But you have to take the position index of each shape.

04:57.340 --> 04:58.840
So, one, two, three, or four.

04:58.840 --> 05:02.660
Count the number of letters in the word for the number of that index.

05:02.660 --> 05:04.260
So, one has three letters.

05:04.260 --> 05:08.160
That number gives you the number of sides in the polygon.

05:08.160 --> 05:11.220
So, one is three, gives you a triangle.

05:11.820 --> 05:14.980
Three is five, gives you a pentagon, etc.

05:15.960 --> 05:25.620
And then you take the nth letter from the word of the shape and put that in the letter, and that's the pattern.

05:25.620 --> 05:32.720
So, if we continue this on, we get five, which has four sides, which gives us a square, and the fifth letter of square is R.

05:32.720 --> 05:33.860
So, that's R.

05:34.240 --> 05:39.600
These were fairly complicated, and some of them were a bit involved.

05:39.600 --> 05:41.220
Some of them were less so.

05:41.220 --> 05:43.940
Oh, no, there's one even more impressive one after this.

05:43.940 --> 05:45.420
This is one that I solved.

05:45.420 --> 05:46.720
This was a lot easier.

05:46.780 --> 05:48.520
They were not all as esoteric.

05:48.520 --> 05:52.660
This was a 4x4 grid with some numbers in it and a missing space.

05:53.140 --> 06:00.020
If you look at the diagonal, you see KMPH spelled out backwards, and then some numbers.

06:00.120 --> 06:06.720
Physicists amongst you, or weirdos, might recognize that the speed of light in kilometers per hour is, in fact, that number.

06:06.720 --> 06:10.000
And we know that the speed of light is represented with a lowercase c.

06:10.000 --> 06:11.920
So, that's clue four.

06:11.920 --> 06:16.780
And here's another one that I actually solved, and I would have never gotten this in a million years.

06:16.780 --> 06:22.440
It's a sequence of 12 numbers arranged in five rows, and the last number is unknown.

06:22.440 --> 06:30.100
There is a key at the bottom for decoding the final number into the answer, and you can see it's A through Z lower, A through Z upper.

06:30.440 --> 06:40.840
And, yeah, I'm just going to give you the answer for this one, because the nth number is the sum of the nth prime number, Fibonacci number, and perfect square.

06:42.300 --> 06:49.180
I, again, actually have no idea how you got this, but it's a good one.

06:49.180 --> 06:53.400
And you add everything up, you get 325, which corresponds to uppercase B.

06:53.700 --> 06:56.620
So, those are some examples of the kinds of clues.

06:56.620 --> 06:59.280
You know, a lot of them were pattern-based, some of them were basic.

06:59.280 --> 07:04.580
One of them, which I absolutely drove myself nuts on, had three-by-three grids with letters in them.

07:04.580 --> 07:07.820
I was trying to solve Sudoku or word searches.

07:07.820 --> 07:14.420
No, they were all just airport codes for airports in countries that started with S, and the answer was uppercase S.

07:14.580 --> 07:17.440
And I overworked that one really hard.

07:17.440 --> 07:21.300
I had a Python program doing Sudoku solving with all the airport codes for countries.

07:21.300 --> 07:22.720
It was... it was...

07:23.140 --> 07:24.260
But, anyways.

07:24.300 --> 07:26.280
So, all of this goes into a brain wallet.

07:26.280 --> 07:27.820
What is a brain wallet?

07:27.820 --> 07:34.580
And I'm going to say right now, don't use brain wallets to store anything valuable right now, both because of what I've done and what another hacker's done years ago.

07:34.580 --> 07:36.560
I'm going to talk about their cool work in a sec.

07:36.560 --> 07:40.980
But brain wallets are basically a method to store Bitcoin in your brain.

07:41.100 --> 07:43.660
You create a secret passphrase.

07:43.740 --> 07:54.240
This can be anything from, you know, password 123, which you'll be stolen from immediately, to the entire B-movie script.

07:54.240 --> 08:00.020
Which, again, you'll be stolen from immediately because people have all of the things people would think of just cycling through.

08:00.020 --> 08:07.320
People have been like, oh, I've used the first three paragraphs from The Great Gatsby and my money was stolen in, like, five seconds.

08:07.580 --> 08:10.040
Don't use brain wallets for anything important.

08:10.200 --> 08:13.340
We'll talk about the internals and how they work a little later on.

08:13.340 --> 08:24.060
But the original website, Brain Wallet, was taken down after another hacker had pointed out some fairly significant security weaknesses in how it worked.

08:24.060 --> 08:26.280
And that resulted in people getting their money stolen.

08:26.280 --> 08:41.640
But there is a reproduction of it for people who need to reclaim their funds, and it has a big warning at the top at brainwalletx.github.io in case anyone wants to play around with this at home and needs to actually go from the brain wallet phrase to the private key.

08:42.680 --> 08:50.800
So, before we get into how the brain wallet works, I'm going to give a very, very brief overview of two key cryptographic concepts.

08:50.800 --> 08:55.040
That's going to be hashes and elliptic curve cryptography.

08:55.040 --> 09:00.740
So, hashes are a special little function that basically act as one-way trap doors.

09:00.740 --> 09:02.980
You can take an input of any size.

09:02.980 --> 09:09.020
It can be a single letter, or it can be the entire script of the Bee Movie, or it can be the Bee Movie as an MP4 file.

09:09.020 --> 09:13.280
But you can take anything in, and it outputs it to an output of a fixed size.

09:13.280 --> 09:17.540
So, any input, a size of 128 bytes, for example.

09:18.300 --> 09:22.060
And the important part about hashes is they are repeatable.

09:22.060 --> 09:26.200
So, if you hash the same thing twice, you will always get the same result.

09:26.740 --> 09:32.880
You can change just a single character in a long text, and it's going to completely change what the hash is.

09:32.880 --> 09:34.820
And this means there's no way to go backwards.

09:34.820 --> 09:39.220
I can't give you a hash, and you tell me what the original thing was.

09:39.220 --> 09:40.200
At least easily.

09:40.200 --> 09:43.460
You have to basically brute force it, which is what this talk is about.

09:44.040 --> 09:50.800
They're used in a lot of contexts, and this is an entire field of cryptography unto themselves, so I'm not going to go into too much detail.

09:50.800 --> 09:54.100
But they're very important for storing passwords safely.

09:54.100 --> 09:56.860
So, if you have a database breach, people don't know all the passwords.

09:56.860 --> 10:01.520
You can use them to verify data integrity, because if one little thing changes, the whole hash changes.

10:01.700 --> 10:04.760
And, in some cryptographic contexts, they just waste time.

10:04.760 --> 10:15.220
They're computationally expensive, and if you want to make an attacker waste a bunch of time so they can't brute force as fast, you say, all right, do a thousand versions of this hash over and over.

10:15.220 --> 10:18.620
And it knows what the answer should be, so you have to do the work.

10:18.620 --> 10:22.240
The second important concept is elliptic curve cryptography.

10:22.240 --> 10:31.700
This one is even more esoteric, so I'm going to skip over some of the technical details, but the important parts are you have two keys with this.

10:31.700 --> 10:34.700
You have a private key and a public key.

10:34.980 --> 10:42.500
The private key is used to sign messages, encrypt them, and the public key is used to verify or decrypt them.

10:42.500 --> 10:46.760
There's a lot of nuance here, but that's the important part for what we're doing here.

10:46.760 --> 10:55.800
If you have the private key, you can always figure out the public key, but it is impossible to figure out what the private key is from the public key.

10:55.800 --> 11:04.080
That's what a lot of modern cryptography is based on, and until quantum computing becomes in vogue, that's going to be the norm.

11:04.520 --> 11:07.560
They're used all over for creating secure connections.

11:07.640 --> 11:15.060
Cryptocurrencies use them heavily, as we're about to learn, and they're critical for authentication and identity verification.

11:15.660 --> 11:17.120
It's a lot of deep math.

11:17.120 --> 11:21.520
They're very cool, but well, well beyond the scope of what I can competently explain.

11:22.140 --> 11:23.820
So we have these.

11:24.000 --> 11:25.380
How do these make a brain wallet?

11:25.380 --> 11:29.240
How do you take a phrase in your head and get Bitcoin out of it?

11:29.340 --> 11:33.600
So we take a secret passphrase and we somehow transform it into a Bitcoin address.

11:33.600 --> 11:35.320
There's some mystery steps in between.

11:35.980 --> 11:39.660
We take the secret passphrase.

11:39.720 --> 11:42.840
We'll use hello DEF CON 33 for our example here.

11:42.840 --> 11:47.060
And first we run it through a hash algorithm called SHA-256.

11:47.720 --> 11:53.500
So this is going to take hello DEF CON and turn it into that string starting with BDA that you see there.

11:53.980 --> 11:57.560
Now this is going to be what we use as our private key.

11:57.560 --> 12:00.400
The brain wallet application calls this the secret exponent.

12:00.400 --> 12:04.020
That's not wrong, but that's not the nomenclature usually used with cryptocurrencies.

12:05.140 --> 12:15.260
So we're going to take this, and the nice part about the hash algorithm is no matter what input you have, it'll always give you the same size output.

12:15.260 --> 12:23.980
So Bitcoin private keys are expected to be a specific size, so you can use the hash algorithm to force whatever input to be a valid private key.

12:23.980 --> 12:26.260
So that's the beauty of hash algorithms there.

12:26.640 --> 12:40.400
So using that elliptic curve cryptography, we basically plot stuff on some neat parabolas, we can get the public key associated with this private key, and that's that little string starting with 04A.

12:40.400 --> 12:45.840
And I'm going to tell everyone now there's no Bitcoin on this address, if anyone's already got the site up.

12:46.820 --> 12:50.380
So you take this and you do another hash algorithm.

12:50.380 --> 12:59.700
This is called hash 160, and this is kind of specific to Bitcoin, but it's a combination of another round of SHA-256 and then RIP EMD 160.

12:59.700 --> 13:07.900
And the important part is you get 160 character output from RIP EMD 160, and that's what you're going to need to make your address.

13:08.360 --> 13:19.180
And basically getting the address from that is pretty easy, you just shift around a couple bits, add some encoding, add a checksum, and encode it all in base 56, and you have your Bitcoin address.

13:19.180 --> 13:21.820
In this case it's 15ZC whatever.

13:22.200 --> 13:33.560
So, and you can do this with any phrase, if I change the H in Hello Def Con to a lower case H, all of those strings below it would change radically, and I would get a completely different Bitcoin address, and a completely different private key.

13:34.440 --> 13:37.780
So, how do we solve the puzzle the intended way?

13:38.540 --> 13:52.700
The intended way is we solve all 20 clues, we add the secret string, which is another 20 clues that we got in the email to the end of it, we throw this into the Brain Wallet website, we get the private key, we take that private key, put it into our wallet,

13:52.700 --> 13:53.820
and extract the money.

13:54.340 --> 13:57.140
And somehow profit, and pay a bunch of taxes.

13:58.000 --> 14:00.820
Well, as you can guess, I didn't do it that way.

14:00.820 --> 14:20.000
In retrospect, I know this with the clarity of hindsight, I had, me and Ashley had solved 16 of the 20 clues, we didn't know how many, how close we were originally, but we were fairly close, and we still weren't going to cross that finish line, and there's still two that I have no idea how to get the answer to,

14:20.000 --> 14:21.420
despite knowing the answer.

14:21.420 --> 14:34.460
So we're going to do it the hacker way, and this involves some spreadsheets and a bunch of math, but we had a high confidence in at least 70% of the clues, decent guess for 20%, and then the last two, absolutely no idea.

14:34.660 --> 14:44.140
And I thought, what if we just brute force the last 30%, you know, it's only like a couple letters, how hard can it be?

14:44.600 --> 14:46.720
Let's find out, let's do some math.

14:47.480 --> 14:50.280
So, I tricked you all, it's math lesson time.

14:51.200 --> 14:52.880
Let's talk about combinatorics.

14:52.880 --> 14:57.340
So, combinatorics, very basically, it's a branch of math dealing with counting things.

14:57.340 --> 14:59.740
How many ways can you arrange a set of objects?

14:59.740 --> 15:02.480
If the order does matter, if the order doesn't matter.

15:04.180 --> 15:08.860
And it's a very fun field of math because it can give us some ridiculously large numbers.

15:09.840 --> 15:17.000
So, for instance, we have 20 positions, each one having 52 possibilities to solve.

15:17.000 --> 15:19.080
That's 52 to the 20th power.

15:19.080 --> 15:21.880
And I have just lost my presentation, there we go.

15:21.880 --> 15:26.020
So, it's 52 to the 20th power, and that's a really, really big number.

15:27.300 --> 15:31.820
Every clue we have a confident answer to divides this number by 52.

15:31.820 --> 15:37.380
And you can see I have a little chart to the side there that kind of shows how quickly that grows.

15:37.680 --> 15:48.500
You know, we go from only missing 2 to, you know, 2700 possibilities, to missing 17 to already 140,000, and it just grows quite literally, exponentially.

15:48.680 --> 15:54.740
There's way too many to test manually with any sort of brute force, so we need to make a computer do this.

15:55.140 --> 16:04.000
Thankfully, another brilliant hacker by the name of Ryan Castellucci, I don't know how to pronounce their last name, but they're a fellow non-binary hacker.

16:04.180 --> 16:08.620
They're currently suing the UK government for non-binary recognition.

16:08.620 --> 16:10.660
I'll have a little plug for them later.

16:10.660 --> 16:20.120
But they spoke at DEF CON 23, where they introduced Brain Flare, which was a utility for cracking brain wallets in CPU time.

16:20.220 --> 16:26.120
And they are the main reason you should not use brain wallets, or at least up until now, they were the main reason.

16:26.120 --> 16:27.620
Now there's two good reasons.

16:28.160 --> 16:33.820
You can do whatever you want with your money, I'm not your mom or accountant, but, like, it's not a good idea.

16:33.980 --> 16:35.340
It's going to get stolen.

16:35.500 --> 16:43.660
This only runs in CPU, it is not GPU accelerated, but, you know, given the numbers that I just looked at, depending on the speed I get, that's quite possible.

16:44.100 --> 16:46.200
So, I do a little bit of testing.

16:46.580 --> 16:51.960
My home PC maxes out at 1.4 mega hashes a second.

16:51.960 --> 16:55.840
That's 1.4 million hashes per second it can do, possibility-wise.

16:55.840 --> 16:58.640
And I've got my computer specs there in case anyone's curious.

16:59.380 --> 17:02.320
So now we get to do math with big numbers, which is fun.

17:02.760 --> 17:06.340
1.4 mega hashes is 1.4 times 10 to the 6th.

17:06.340 --> 17:16.140
We divide that by our number that's 10 to the 20th, and we get a number on the order of 4.73 times 10 to the 20th years.

17:16.260 --> 17:20.220
That is 10 orders of magnitude larger than the age of the universe.

17:20.280 --> 17:24.700
I am not going to crack the entire puzzle from scratch on my home computer.

17:25.260 --> 17:28.920
Thankfully, we already solved a bunch, and that cuts it down significantly.

17:29.060 --> 17:38.260
If we have 15 solved, which is one more than we were confident on, that gets us down to a much more reasonable number, and we can solve it in about 270 seconds.

17:38.740 --> 17:40.320
Which... let's do it!

17:40.920 --> 17:49.560
And this is just another example of how long it would take to solve each number of unknowns.

17:50.780 --> 17:53.280
So, let's crack the puzzle.

17:53.580 --> 17:57.760
I wrote a lightweight generator script in C.

17:57.920 --> 18:01.020
It pipes its output directly into Brainflare.

18:01.020 --> 18:05.020
It is basically just a whole bunch of arrays with characters.

18:05.280 --> 18:17.380
It pipes all of the different things in, and Brainflare converts them into a brain wallet, and tells me if it matches the Bitcoin address that I told it in advance.

18:17.380 --> 18:21.000
So, let's rip through, you know, just a cool 20 billion hashes.

18:21.000 --> 18:21.900
No big deal.

18:24.600 --> 18:27.660
That was... let me get my alignment better.

18:27.780 --> 18:28.680
There we go.

18:29.980 --> 18:34.120
So, four hours later, it was easy.

18:34.180 --> 18:35.800
Nah, I didn't get anything.

18:36.580 --> 18:37.800
Didn't work.

18:37.860 --> 18:42.160
I expanded this to a run with seven unknown clues.

18:42.280 --> 18:44.500
That took over eight days to run.

18:44.500 --> 18:50.600
It was just very weird having my computer on for eight days straight, not using it because it was fully maxed out.

18:50.800 --> 18:52.640
And, didn't get it.

18:53.560 --> 18:55.820
At this point, it was very discouraging.

18:55.820 --> 18:59.800
One of the big problems with this challenge is, there's no feedback in the process.

18:59.800 --> 19:04.280
You're putting in... it's like CTS where you're just putting in a flag and being told yes or no.

19:04.280 --> 19:06.820
You don't know which clues are right.

19:06.820 --> 19:09.640
You don't know which clues are wrong.

19:09.980 --> 19:13.520
You don't even know if the puzzle's solvable.

19:13.700 --> 19:25.500
It had been... I'd taken various swings at this over the past ten years, but it had been a significant amount of time, and Bitcoin had increased, and presumably the puzzle creator knew the answers and likes money.

19:25.500 --> 19:29.180
So, one would assume that he would have solved it himself.

19:29.180 --> 19:32.320
So, the suspicion of, is this even possible?

19:32.320 --> 19:35.400
Did the creator make a typo and the money is just lost forever?

19:35.800 --> 19:37.360
That started to cross my mind.

19:37.360 --> 19:39.180
So, I need to try a different approach.

19:39.740 --> 19:42.060
And that involves rolling unknowns.

19:42.260 --> 19:44.520
We're doing more combinatorics, I know.

19:45.800 --> 19:51.740
Basically, we have a number that we know, and we know at least one of those is wrong.

19:51.740 --> 20:00.440
So, we need to rotate through all the possible combinations of ones that we think are right and set them to be the wild card and rotate through all the possibilities.

20:00.460 --> 20:03.380
And that's going to increase our solution space significantly.

20:03.380 --> 20:07.740
And this lovely equation can tell us by exactly how much.

20:07.960 --> 20:10.400
And this table can save you from doing the math.

20:10.560 --> 20:19.580
As we can see, I have the number of rotating wild cards and the number of fixed wild cards, that is ones that we know we don't know and are always brute forcing.

20:19.580 --> 20:27.640
And as we change the number of those, we see that it increases the crack time by a different factor.

20:27.640 --> 20:35.480
For instance, if we have five fixed wild cards and two rotating wild cards, that increases the time to crack by a factor of 105.

20:35.760 --> 20:44.720
Which is significant to cross any sort of space, given the fact that there are 20 ones that we don't know that we don't know.

20:44.720 --> 20:48.180
One of the ones that I was confident in had to be wrong.

20:48.180 --> 20:49.360
Nope.

20:50.780 --> 20:53.960
So, we got to go fast.

20:54.840 --> 20:58.320
GPUs are the best for doing any sort of cryptographic operation.

20:59.020 --> 21:01.380
Because they can do stuff in parallel.

21:01.380 --> 21:09.820
So, CPUs basically, they take one hash at a time and do all the math for that one hash, check it, and see if it works.

21:10.020 --> 21:21.240
GPUs, because they're used to having to render grids of pixels that are doing the exact same math for the shader over and over, they basically have a bunch of mini-CPUs all in parallel.

21:21.240 --> 21:25.340
The catch is, they can only do the same operation at a time.

21:25.340 --> 21:32.420
So you have multiple hash candidates all loaded in and they're going through each step one at a time in lockstep.

21:32.420 --> 21:38.480
And then at the very end, you can just look through the very end and say, alright, do any of these match what we're looking for?

21:38.640 --> 21:45.500
It's a massive, massive time increase and it's the reason cryptocurrency miners have bought up all the graphics cards.

21:45.500 --> 21:48.120
Because it's the same crypto math.

21:48.480 --> 21:53.240
The other problem for me is, coding for GPUs is hard.

21:54.380 --> 21:55.040
Really hard.

21:55.040 --> 21:59.800
It is kind of an obscure area that's very specialized.

21:59.800 --> 22:03.140
There is not a lot of good tutorials for it.

22:03.200 --> 22:05.500
Or not a lot of resources.

22:05.620 --> 22:11.860
You know, in the days even before ChatGPT, there was basically nothing.

22:11.860 --> 22:16.520
And I did, just out of curiosity, throw up ChatGPT and say, make me a hashcat module to do this.

22:16.520 --> 22:18.720
And it can't do OpenCL either.

22:20.380 --> 22:22.440
But has someone done it for me?

22:22.440 --> 22:23.460
I'm lazy.

22:23.460 --> 22:24.320
We'll see.

22:24.720 --> 22:32.620
So I was looking at a couple GPU-based projects that do similar things around trying to find a specific Bitcoin address.

22:32.620 --> 22:35.380
And there are three major candidates here.

22:35.500 --> 22:38.840
VanityGen and its subprogram OCLVanityGen.

22:38.840 --> 22:43.400
OCL being OpenCL, which is the GPU programming language.

22:43.400 --> 22:45.400
It's used to generate vanity addresses.

22:45.400 --> 22:48.160
Let's say you want a Bitcoin address that starts with your name.

22:48.540 --> 22:54.760
You can have your GPU generate Bitcoin addresses just at random until it eventually hits one.

22:54.760 --> 22:57.500
And you'll go through billions and you'll hit one.

22:57.560 --> 23:00.360
But if you can do billions a second, it's pretty all right.

23:00.500 --> 23:01.980
This uses GPU.

23:02.100 --> 23:03.400
And that's promising.

23:03.720 --> 23:10.460
Because you can say, I want to find this pattern of address and it does some sort of cryptography.

23:10.460 --> 23:11.620
And it does it very fast.

23:11.620 --> 23:15.940
It's in the giga hashes range on my GPU.

23:16.240 --> 23:20.120
There's also Bitcrack, which is made to solve a different Bitcoin puzzle.

23:20.120 --> 23:23.600
It's not really a puzzle as much as a brute force experimentation.

23:24.340 --> 23:32.500
Basically, someone said, I put Bitcoin at this address with a private key that starts with this many zeros.

23:32.520 --> 23:38.320
And higher and higher prizes for progressively fewer and fewer known zeros.

23:38.320 --> 23:46.780
So there's a bunch of people who are using GPUs to basically go through all of that space and try to find what the private key is and get the money.

23:46.780 --> 23:48.360
And that's a whole separate thing.

23:48.360 --> 23:48.900
But it's neat.

23:48.900 --> 23:52.240
But it's someone doing something similar and maybe I can use that.

23:52.940 --> 23:56.960
And then there's Hashcat, which, spoiler, is what I ended up using.

23:56.960 --> 24:01.480
But that's a general use CPU password and hash cracking utility.

24:01.480 --> 24:03.840
It's not specifically for cryptocurrency.

24:03.860 --> 24:06.380
It has a couple of cryptocurrency modules, which we'll use.

24:06.380 --> 24:08.200
But it doesn't support brain wallets.

24:09.260 --> 24:12.320
So we'll take a look at Vanity Gen real quick.

24:13.320 --> 24:14.960
It's very, very fast.

24:14.960 --> 24:16.660
You can see I lied a bit.

24:16.660 --> 24:19.400
It's actually several hundred mega hashes a second.

24:19.400 --> 24:24.820
But that's still pretty good just running on a random cloud instance GPU.

24:24.820 --> 24:28.080
I think that was a 3060, no, 3080 I see right there.

24:28.700 --> 24:32.360
This turned out to be a bit of a lie when it comes to what I need to do.

24:32.420 --> 24:35.160
They do a neat little trick called batch inversion.

24:36.160 --> 24:40.020
It's clever, but it unfortunately makes it impossible to do what I need to do.

24:40.020 --> 24:58.560
Without getting too far into the math of it, if you don't actually care about your specific inputs, you can put a bunch of related points all together and do the really expensive math operation once and then figure out the result for all of those points based off that one thing.

24:58.780 --> 25:09.120
And it's really handy, but that's basically saying, private key and all the private keys within N range of it and do the batch inversion and then figure out the results.

25:09.500 --> 25:14.100
I'm trying to do arbitrary private keys, so that's not exactly going to work.

25:16.700 --> 25:19.560
So, what about Bitcrack?

25:20.100 --> 25:25.300
This one looks for a pattern matching a specific private key.

25:25.920 --> 25:28.540
It also shows a very promising hash rate.

25:28.740 --> 25:31.940
It lets you specify a range of key spaces to search.

25:31.940 --> 25:39.480
This is because people want to be able to coordinate, all right, I'm searching this range of private keys and you can search this one so we're not just doing the same space.

25:40.480 --> 25:43.560
Problem is, it's also using batch inversion.

25:43.560 --> 25:51.340
You can see right there in the little highlighted comment where it multiplies together all of the points together before doing the math.

25:51.340 --> 25:59.660
Because, once again, while you can specify the range, you don't actually care about the inputs, only that they're not the same inputs someone else has tried.

26:00.340 --> 26:02.380
And so, Hashcat.

26:02.380 --> 26:05.800
And that is, in fact, a hacker known as Hashcat up there.

26:06.940 --> 26:10.360
Hashcat is an open source password cracking utility.

26:10.360 --> 26:18.340
If you have a hash that you want to find the original or a original input for, you can use it to brute force it.

26:18.400 --> 26:21.320
It's a pretty versatile and neat tool.

26:21.500 --> 26:25.080
It's GPU accelerated and has a lot of optimizations.

26:25.080 --> 26:36.580
People have done hand optimization for some of these algorithms that make them significantly faster, which is very impressive to do, you know, assembly level coding for cryptography in a GPU.

26:36.760 --> 26:41.840
It has its own generator for generating masks and wildcard attacks.

26:41.840 --> 26:44.480
It really has a lot of nice utilities.

26:44.480 --> 26:48.500
You can feed in passwords via the pipe normally, like I did with my generator.

26:48.500 --> 26:52.840
And it handles all the difficult GPU scheduling and tasking stuff for myself.

26:52.840 --> 26:56.200
It also provides a framework for custom plugins.

26:56.200 --> 26:58.840
But it doesn't support brain wallets.

26:58.840 --> 27:04.600
And in order to make custom plugins, you need to be competent in OpenCL, which I wasn't and still aren't.

27:05.860 --> 27:07.740
So I had to admit defeat.

27:07.940 --> 27:10.160
I brute forced all the ones I could.

27:10.440 --> 27:14.320
I have a high confidence in all of the other answers that I think I've solved.

27:15.200 --> 27:20.500
It's infeasible to proceed assuming some of those are wrong because I have no idea which ones are wrong.

27:20.760 --> 27:23.920
And I don't know OpenCL and I'm not going to learn.

27:23.920 --> 27:25.600
I don't even know if it's solvable.

27:25.600 --> 27:30.420
This could just very well be dead money that's just going to sit on the Internet forever.

27:30.420 --> 27:37.940
And the public address where the Bitcoin was was published, so you could see it was still there and it hadn't moved.

27:37.980 --> 27:39.920
But again, the author probably knew the answers.

27:39.920 --> 27:42.700
Why didn't they take it back when it hit $100,000?

27:43.680 --> 27:46.800
So I'm not going to get weird about this or anything.

27:47.200 --> 27:49.300
I'm just going to move on with my life.

27:49.300 --> 27:51.040
Totally healthy relationship.

27:51.040 --> 27:52.720
This isn't my white whale or anything.

27:54.080 --> 27:58.500
But I think I learned that the real Bitcoin was the friends I made along the way.

27:58.680 --> 28:03.680
And it wouldn't be a presentation I give if I didn't shoehorn a Terry Pratchett quote into it.

28:03.680 --> 28:05.300
So it was a good map.

28:05.300 --> 28:06.300
And in studying it, Mr.

28:06.300 --> 28:11.200
Wilkinson and his chums would learn a lot about decryption, geography, and devious cartography.

28:11.440 --> 28:19.640
They wouldn't find in it the whereabouts of Ankh-Morpork $150,000 in mixed currency, though, because the map was a complete and complex fiction.

28:19.640 --> 28:27.500
However, Moist entertained a wonderful warm feeling inside to think that they would, for some time, possess the greatest of all treasures, which is hope.

28:27.500 --> 28:33.640
And anyone who couldn't simply remember where they'd stashed a great big fortune deserved to lose it, in Moist's opinion.

28:34.900 --> 28:38.580
And I think that applies here.

28:40.360 --> 28:46.180
And I got thinking about motivation and incentive and growth.

28:46.180 --> 28:53.120
And I kept looking at this chart and thinking, is today the day I learn OpenCL?

28:53.980 --> 28:55.440
And it was.

28:57.760 --> 29:00.780
So I started digging into Hashcat pretty deeply.

29:00.780 --> 29:05.600
Thankfully, they have some really great documentation for developing custom plug-ins.

29:06.400 --> 29:10.120
You do still need to understand OpenCL and some of the principles there.

29:10.120 --> 29:21.080
You can get away with not needing to understand it intimately, but I definitely had some stumbling blocks around memory management that I might not have had should I have been a little more versed in it.

29:21.280 --> 29:25.100
So, Hashcat does not support brain wallets.

29:25.120 --> 29:31.780
But it supports every single one of the cryptographic operations that I just talked about that we need to make a brain wallet.

29:31.800 --> 29:35.160
And all of those are optimized for running in the GPU.

29:35.340 --> 29:43.340
It's got SecP256K1, which is the specific ECC curve that's used to get the public key from a Bitcoin private key.

29:43.340 --> 29:49.480
It's got SHA256, which is used to take the brain wallet phrase and get the private key.

29:49.480 --> 29:54.900
And RIPEMD160, which is used to actually generate the Bitcoin address.

29:54.900 --> 29:58.520
So what if we just kind of took all these modules and made them kiss?

30:00.360 --> 30:02.460
We'll talk about Hashcat.

30:02.460 --> 30:04.140
It's a good use case for them.

30:04.600 --> 30:05.860
Come on.

30:06.600 --> 30:07.600
There we go.

30:08.380 --> 30:10.180
First, you find the hash you want to crack.

30:10.180 --> 30:12.100
In this case, the Bitcoin wallet.

30:12.880 --> 30:15.780
You figure out which module to use, or in this case, to make.

30:16.260 --> 30:17.480
You pick your attack mode.

30:17.480 --> 30:19.080
I'll talk about that in just a sec.

30:19.080 --> 30:23.240
And your dictionary and generator, which is basically the source of things you want to try.

30:23.240 --> 30:27.760
If you're doing a password, it's probably going to be a word list of common passwords from database breach.

30:28.080 --> 30:33.100
If it's something more complex like this, you can specify random mask rules.

30:33.100 --> 30:38.400
And you feed it GPUs and compulsively check it every five minutes for about half an hour.

30:38.400 --> 30:40.920
And then forget about it for 15 days.

30:40.920 --> 30:44.380
And then remember that you're spending money on cloud GPUs and check it.

30:45.460 --> 30:52.180
And this is just a quick example of a Hashcat run on a rather simple hash algorithm called MD5.

30:52.180 --> 30:54.840
It's less used for security and more file verification.

30:55.060 --> 30:59.020
But I hashed the word password with MD5 and I got that string.

30:59.020 --> 31:06.040
I ran Hashcat in mode 0, which is MD5's mode, with an A3.

31:06.040 --> 31:09.520
That means it's a wild card attack, which means I'm not passing in things to try.

31:09.520 --> 31:12.700
I'm saying, all right, it's going to be eight random letters.

31:12.700 --> 31:13.980
Just try all of them.

31:13.980 --> 31:14.980
And let it run.

31:14.980 --> 31:19.200
Two seconds later, you can see at the top, it tells me you have that hash.

31:19.200 --> 31:21.900
And the original phrase was password.

31:22.600 --> 31:25.560
And MD5 is very simple, very basic.

31:25.560 --> 31:29.800
Something more complex, like SHA-256, a bit more complicated.

31:29.800 --> 31:35.480
For that same eight-character password, we're looking at a 13-day crack time on the same computer.

31:36.700 --> 31:40.660
So, just because it can go fast doesn't mean it always will.

31:42.700 --> 31:44.580
So, Hashcat plugins.

31:44.580 --> 31:45.800
What is a plugin?

31:46.160 --> 31:53.120
A Hashcat plugin is the thing that actually represents how to crack a specific kind of hash.

31:53.120 --> 31:58.520
It is everything you need to do SHA-256 or MD5 or brain wallets.

31:58.520 --> 32:00.000
It consists of two main parts.

32:00.000 --> 32:01.740
It's a module and a kernel.

32:01.740 --> 32:08.660
The module is the overall structure and the information about the hash or algorithm.

32:08.660 --> 32:21.920
It handles the input and output processing of, you know, your input strings or what the mask generator outputs to the outputs of, you know, Hashcat's internal structure to making it look like the hash you're actually trying to crack.

32:22.680 --> 32:26.900
The module element is written in C and it runs in the CPU.

32:26.940 --> 32:39.560
It's compiled at the same time you build Hashcat and it is generally fairly easy to work with and it's a glorified config file with a little bit of scripting in it.

32:39.560 --> 32:41.580
The kernel is where the heavy lifting happens.

32:41.580 --> 32:45.800
It handles the actual cryptographic operations and the code that runs in the GPU.

32:45.840 --> 32:48.760
It's written in a language called OpenCL.

32:48.760 --> 32:55.000
It uses a .cl extension and it's basically C++ but worse.

32:55.320 --> 32:59.340
And all of this represents how to crack a specific algorithm.

32:59.760 --> 33:03.480
A module consists of a couple important bits of information.

33:03.480 --> 33:07.940
They're located in the modules folder if you go to Hashcat source code.

33:07.960 --> 33:18.440
They're pre-compiled and they give you information about the digest size which is, you know, when you're comparing through and seeing if it matches, how big should that structure be?

33:18.440 --> 33:27.020
It gives you information on how to test the benchmark information and the default pattern for when you're running that benchmark.

33:27.120 --> 33:31.820
And later on it also has the information on how to encode and decode your formats.

33:31.820 --> 33:33.900
We'll go into that detail in just a sec.

33:33.900 --> 33:38.620
So, the module hash decode, that's one of the important functions in your module.

33:38.620 --> 33:41.740
That handles every single line in your hash target file.

33:41.740 --> 33:50.220
So you feed in a list of target hashes, it processes through and decodes them from whatever, you know, a password hash that you have from a computer.

33:50.220 --> 33:55.140
It decodes it into Hashcat's internal structure where it can more easily work with it.

33:56.120 --> 34:01.920
It also populates the hash digests that are later compared to against in the comparison function.

34:02.000 --> 34:04.800
The hash encode function kind of does the opposite.

34:04.800 --> 34:10.760
It goes from the internal Hashcat format to the specific hash format that's going to be recognizable.

34:10.760 --> 34:12.800
In this case, a Bitcoin address.

34:12.800 --> 34:20.020
The digest size tells us how much memory we need to allocate for each hash that we're going to crack.

34:20.020 --> 34:30.520
And the self test pass and self test hash are basically the dummy password and hash combination you put in so it knows that it's working right before it runs.

34:30.800 --> 34:33.780
And same for the benchmark mask and character set.

34:34.220 --> 34:37.540
This is an example of the module file that I wrote for this.

34:37.580 --> 34:41.780
You can see I specify a few things about it.

34:41.780 --> 34:47.560
I specify a default password of Hashcat and the Bitcoin address that the Brain Wallet gives if you do Hashcat.

34:47.700 --> 34:49.780
The character sets to try.

34:49.820 --> 34:53.840
You'll notice I removed all the special characters since Brain Wallets are never going to do it.

34:53.840 --> 34:57.060
I could have removed the numbers too, but that was my mistake.

34:58.340 --> 34:59.760
And that just kind of sets it.

34:59.760 --> 35:02.900
The other important part is you see the current underscore type.

35:02.900 --> 35:07.800
That's where you specify the number for the module or tell it what number it is.

35:07.800 --> 35:12.420
So when you do dash M0, in this case it's dash M1337.

35:13.640 --> 35:17.180
And then this brings us to the kernel where the heavy lifting happens.

35:17.380 --> 35:23.260
The kernel is compiled at run time per graphics card because each graphics card is going to need something different.

35:23.260 --> 35:26.820
OpenCL actually compiles it live for you there.

35:27.400 --> 35:32.720
They are located in the slash OpenCL folder and they have a slightly different name format.

35:32.820 --> 35:36.760
Some of them are designated as pure or optimized.

35:36.760 --> 35:43.160
The optimized ones had someone go in and manually tweak around some of the code to take shortcuts where possible.

35:43.160 --> 35:45.840
They're quicker, but sometimes a lot less human readable.

35:45.840 --> 35:50.560
And sometimes they may have caveats where they're not appropriate for all cracking methods.

35:51.980 --> 35:56.460
Sometimes they'll also have a, you see it like underscore A3 or A0.

35:56.840 --> 36:00.180
Depending on if you're using a password list or a generator thing.

36:00.180 --> 36:05.780
Some algorithms will have performance boosts if you do it slightly differently depending on that.

36:05.780 --> 36:09.440
So it also lets you specify different branches to take for that.

36:09.680 --> 36:14.540
Inside the kernel file, there are three key functions, init, loop, and comp.

36:15.100 --> 36:20.940
Init does the initial setup, initialization, and any non-time intensive calculations.

36:21.320 --> 36:24.980
Loop does all of the time intensive calculations until they're done.

36:24.980 --> 36:29.620
And comp does the comparison to see, hey, is this the password we were trying to get?

36:30.840 --> 36:37.500
The initialization function, and it's usually named something like this, it sets up all of the buffers.

36:37.520 --> 36:46.080
It does any one time calculations or initializations, setting up your point curves, and it's run once per candidate that you put in.

36:46.540 --> 36:49.860
And it's generally used to set up stuff for the loop.

36:49.860 --> 37:01.460
In some cases, like ours, we didn't have a time intensive portion that is looped, so all of the actual calculation and hashing is done in the init, and the loop just passes it on to the comparison function.

37:02.660 --> 37:11.180
The loop function, if you're doing something that has a lot of internal steps, like do 500 rounds of MD5, that's going to happen in the loop function.

37:11.180 --> 37:17.260
This lets HashCat better organize it and not think that a process is hanging or non-responsive.

37:17.260 --> 37:25.280
It lets it also better organize it into batches and be able to suspend one and insert another for execution.

37:26.240 --> 37:30.220
We didn't use it in this one because it didn't need it.

37:30.220 --> 37:40.900
The brain, while algorithm, does not have any repeated or iterated steps, but if something you're trying to do does have iterated steps, the code for that would live in the loop function.

37:41.100 --> 37:43.540
And lastly, we've got the comparison function.

37:43.820 --> 38:01.540
This takes the result of your init or your loop, which shoves the... and you can specify which possession, but usually the last or first four bytes of your result into a comparison register, and then it compares it with the last four or first four of your target hash.

38:01.540 --> 38:06.240
And then if it's right, it does a full comparison to prevent it, but that just saves a little bit of time.

38:06.540 --> 38:08.680
And this is the function that actually does it.

38:08.680 --> 38:17.140
If you have a large list of hashes, it does a little bit of optimization there, but in this case, it was only just one, so there was nothing special there.

38:18.280 --> 38:20.380
It's time to gather all the ingredients we need.

38:20.500 --> 38:25.340
I took the SHA-256 from the included module there.

38:27.160 --> 38:34.200
I borrowed a lot of the initialization and the update and final functions, which are what you need to run the algorithm.

38:34.200 --> 38:36.640
I did the same for RIP-EMD-160.

38:37.000 --> 38:43.140
And I also yoinked the SEC-P256 from their code, where they do that.

38:43.140 --> 38:51.660
They mostly use it in a module for Bitcoin wallet import format private key, in module 28502.

38:51.660 --> 38:59.320
It's not exactly what I need, but part of that step does involve doing the curve cryptography to go from a private key to a public key.

38:59.320 --> 39:01.000
So I'm just going to borrow that.

39:01.900 --> 39:06.160
I did a little bit of massaging to make the module.

39:06.160 --> 39:11.260
I took the module for SHA-256 because that's the first step in that.

39:11.260 --> 39:13.360
I might as well use that as the entrance.

39:13.680 --> 39:22.920
So I heavily modified module 1400, which is the hashcap module for SHA-256 with no salts.

39:22.920 --> 39:35.540
And the only major thing I really had to change here was the digest size because SHA-256 is expecting a smaller output than the public key is.

39:35.540 --> 39:42.940
So one big problem I had was I was trying to shove too much data into too small of a bit of memory and I kept getting seg faults.

39:42.940 --> 39:45.780
And debugging OpenCL is fun.

39:46.080 --> 39:49.700
So I basically smushed all of those together.

39:49.700 --> 39:51.400
I took the input parameters.

39:51.400 --> 39:54.400
I took the decode function from the target.

39:54.640 --> 39:56.560
That's going to be 28.5.

39:56.560 --> 40:03.020
And I took the encode function from 28.502 as well.

40:03.660 --> 40:05.620
I was doing testing and debugging.

40:05.620 --> 40:10.080
Brought me back to CS101 because I made best friends with the printf statement again.

40:11.880 --> 40:27.540
Yeah, it's really difficult to do traditional debugging in graphics cards because you have a whole lot of threads all running simultaneously in lockstep and you can't interrupt or introspect a single one without affecting another one.

40:27.780 --> 40:29.540
So there are a couple workarounds.

40:29.540 --> 40:37.760
One, Hashcat does have a specific set of flags you can put in to force it very unhappily to only attempt to use a single thread.

40:37.760 --> 40:45.700
I still kept getting some multi-threaded output with it but it really reduced it from an unreadable console to only a handful of repeated outputs.

40:45.700 --> 40:53.440
And you're basically using good old printf and you're printing out debug statements and trying to trace stuff out that way.

40:53.460 --> 40:57.600
If you're trying to do this at home and stuff's not working, check your digest size.

40:57.600 --> 41:02.680
There's a great write-up on that in the documentation on how to choose that.

41:02.900 --> 41:09.900
And if things are working and not segfaulting but your results aren't wrong, make sure your endianness is right.

41:10.160 --> 41:15.780
Some modules like doing things in big endian, some like doing them in little endian.

41:15.900 --> 41:21.020
There's definitely some parts of my code that are just shifting bits around to the other side.

41:21.020 --> 41:23.300
And that actually made it work.

41:23.660 --> 41:25.380
So, this works.

41:25.380 --> 41:29.120
And I got it working on GPUs.

41:29.320 --> 41:31.700
But it was a bit slow.

41:31.700 --> 41:37.140
I was getting about 7600 kilohashes a second.

41:37.140 --> 41:45.180
Which is, as you'll recall, less than an order of magnitude bigger than what I was getting on my CPU.

41:45.180 --> 41:50.500
I was getting maybe 1400 kilohashes a second on my CPU.

41:50.500 --> 41:54.720
So this is faster, but certainly not radically faster.

41:58.720 --> 42:07.940
Why is that when the individual one used got 142 gigahashes a second for 28.502?

42:07.940 --> 42:11.360
And the answer is, not batch inversion.

42:11.820 --> 42:19.800
It actually uses a much easier trick, which is, it assumes Hashcat is passing in completely random strings.

42:19.800 --> 42:24.440
Not all of those are going to be valid as wallet import format strings.

42:24.440 --> 42:30.520
So it's doing a lot of basic filtering looking for the first byte being valid or not and then dropping them.

42:30.520 --> 42:35.760
So the vast, vast majority of the candidates that you see in this benchmark were just dropped and ignored.

42:37.680 --> 42:43.900
So I eventually removed that code and ran it again and I got similar hash rates, so I moved on.

42:44.280 --> 42:47.320
This led me to create my generator generator.

42:47.460 --> 42:52.140
I mentioned that combinatorics and how Hashcat can accept masks.

42:52.140 --> 42:53.980
It can accept a list of masks.

42:53.980 --> 43:04.520
So I made a quick little Python script to generate a different mask list for all 105 possibilities of different combinations of unknown unknowns.

43:04.520 --> 43:10.240
And I fed it into Hashcat and I have everything I need.

43:10.460 --> 43:12.240
Except compute power.

43:12.240 --> 43:13.980
So I went to the cloud.

43:14.000 --> 43:15.660
There's a website called Vast AI.

43:15.660 --> 43:19.420
You can rent GPUs on the cloud by the minute.

43:19.420 --> 43:20.820
It's relatively cheap.

43:20.820 --> 43:25.120
I can rent a 3080 for 16 cents an hour.

43:25.680 --> 43:38.280
So I just spun up a whole bunch of cards in the cloud and overall in this I maybe spent 50 bucks in cloud compute and it's way cheaper than a cracking rig and it also didn't heat up my house.

43:38.620 --> 43:42.140
So a couple hours later, success.

43:42.500 --> 43:44.180
It's actually funny.

43:44.400 --> 43:52.320
It only took three minutes to crack from when I started it in the cloud and then I checked much later and absolutely freaked out.

43:52.320 --> 43:58.120
But it cracked the brain wall and I had the private key.

43:58.120 --> 44:12.800
So very, very carefully I disconnected from the internet and I put it into my Bitcoin wallet and I swept the wallet and on December 13th, 2024, I claimed the one Bitcoin prize.

44:13.980 --> 44:15.060
Thank you.

44:17.580 --> 44:19.020
Thank you, thank you.

44:19.520 --> 44:21.740
Now some of you might be wondering, what about the money?

44:21.740 --> 44:22.960
It's mostly been spent.

44:22.960 --> 44:23.940
Not saying on what.

44:23.940 --> 44:24.840
Life's expensive.

44:24.840 --> 44:26.180
I paid my taxes.

44:26.920 --> 44:28.700
The joker doesn't mess with the IRS.

44:28.700 --> 44:36.540
I will say, getting an accountant to call me back and not think I wasn't some sort of delusional or actively in a pig butchering scam was very, very difficult.

44:36.980 --> 44:40.360
I finally got one to call me back and tell me how to put this on my taxes.

44:40.960 --> 44:43.020
The rest isn't on my purse in my home.

44:43.020 --> 44:44.940
Don't try to hack me.

44:45.680 --> 44:47.260
It's not in a brain wallet either.

44:47.260 --> 44:51.380
I only did one outrageous thing and I took a zero gravity flight with it.

44:52.940 --> 44:57.520
It was an absolutely amazing experience.

44:58.260 --> 44:59.800
I have no regrets.

44:59.800 --> 45:04.720
That was the one thing I splurged on that I couldn't otherwise justify.

45:04.720 --> 45:12.680
But that was just because I'd been dreaming of doing that forever and that was what I was going to spend this prize money on in the first place years and years ago.

45:13.440 --> 45:15.020
I will say one thing.

45:15.060 --> 45:17.380
The reason it took me so long is clue 20.

45:17.380 --> 45:18.840
It had an ambiguous answer.

45:19.880 --> 45:22.380
This was the unknown unknown that blocked me.

45:22.520 --> 45:26.060
What is this last clue and what letter is missing to spell it all out?

45:26.060 --> 45:28.520
It's clue 20 and there's no why.

45:28.520 --> 45:29.520
Right?

45:29.900 --> 45:33.000
But it's also a haiku and there's no K.

45:33.000 --> 45:35.960
K was the correct answer and I'd assumed Y.

45:36.040 --> 45:45.320
And this had plagued me for about 10 years and ironically had caused a significant increase in the prize money because it took me so long to get to this point.

45:45.320 --> 45:47.740
So I can't be too, too mad.

45:47.740 --> 45:49.560
But come on.

45:50.560 --> 45:52.520
There are two unsolved clues.

45:52.760 --> 45:54.200
I have the answers.

45:54.200 --> 45:55.660
I don't know the solution.

45:55.660 --> 45:59.500
I'm offering a small trophy to anyone who can tell me the answer.

45:59.600 --> 46:02.240
I have shopping cart wheels that are locked.

46:02.240 --> 46:03.320
You can remote control.

46:03.320 --> 46:07.680
I will send a custom one to anyone who can tell me the answer.

46:08.800 --> 46:09.620
Please.

46:09.620 --> 46:12.700
This is bothering my soul so much.

46:13.360 --> 46:15.200
I've got my email here.

46:15.320 --> 46:20.600
Puzzleanswers at bgaydocrime.com Just, please help me.

46:20.600 --> 46:23.860
I'll post on my website if I get the answers.

46:23.860 --> 46:31.060
If you want to try this at home I have the custom module on my GitHub repo as well as some very basic instructions.

46:31.120 --> 46:31.760
Cavidempter.

46:31.760 --> 46:33.100
You get what you pay for.

46:33.320 --> 46:37.360
There is a version that does compressed Bitcoin wallet formats.

46:37.360 --> 46:39.000
That's 1338.

46:39.260 --> 46:43.160
It's basically the same thing, just slightly tweaks how the address comes out.

46:44.280 --> 46:47.380
I'd like to give a huge thanks to a bunch of people.

46:47.380 --> 46:50.920
The team at Hashcat for making the software.

46:50.920 --> 46:56.600
Ryan for doing the awesome things they're doing and Brainflare and kind of keeping me on this path.

46:56.600 --> 46:59.720
Spencer Lucas for this whole, whole challenge.

46:59.720 --> 47:02.140
My parents, my mom, and dad.

47:02.140 --> 47:05.440
My friends and everyone who supported me along the way for this.

47:05.440 --> 47:06.680
My partner Daisy.

47:06.680 --> 47:12.540
My accountant Jill who actually returned my call for this absolutely insane voicemail.

47:13.480 --> 47:18.100
Chuck Kopenspire for helping me get this PowerPoint looking nice.

47:18.100 --> 47:22.640
He's a creative and technical consultant for queer and neurodivergent professionals.

47:22.820 --> 47:23.780
He's great.

47:23.780 --> 47:26.840
If any of you need PowerPoint design, check out his website.

47:26.840 --> 47:36.460
My friend Ashley, of course, for keeping this fixation alive and being the one person I can talk to about this puzzle to an unlimited degree without getting tired.

47:36.460 --> 47:40.200
And the folks at Zero Gravity for giving me a really, really great time.

47:41.180 --> 47:44.780
This is a donation link to Ryan's GoFundMe .

47:44.820 --> 47:50.900
They are actively in a legal battle against the government of the UK for recognition of non-binary rights.

47:51.300 --> 47:54.440
I'm also a non -binary hacker, so this is important to me.

47:55.400 --> 48:01.360
I plan on, after this talk, donating a bit of the prize to their GoFundMe.

48:01.360 --> 48:05.120
And if anyone out there thinks this is a worthy cause, I would encourage it.

48:05.120 --> 48:06.920
It's a totally safe QR code.

48:06.920 --> 48:09.820
If not, you can just search for the GoFundMe on Google.

48:10.280 --> 48:11.760
I wouldn't trust me.

48:12.960 --> 48:13.920
That's all, folks.

48:13.920 --> 48:15.360
Thank you so much for coming.

48:15.520 --> 48:17.260
I'll be answering questions.

48:17.260 --> 48:20.200
I know the answers to and making up answers to the ones I don't.

48:20.380 --> 48:21.380
Thank you all.

