Проект по brainflayer для windows 10

Brainflayer

Brainflayer is a Proof-of-Concept brainwallet cracking tool that uses libsecp256k1 for pubkey generation. It was originally released as part of my DEFCON talk about cracking brainwallets (slides, video, why).

The name is a reference to Mind Flayers, a race of monsters from the Dungeons & Dragons role-playing game. They eat brains, psionically enslave people and look like lovecraftian horrors.

The current release is more than four times faster than the DEFCON release, and many features have been added.

If brainflayer is useful to you, please get in touch to let me know. I’m very interested in any research it’s being used for, and I’m generally happy to collaborate with academic groups.

Disclaimer

Just because you can steal someone’s money doesn’t mean you should. Stealing would make you a jerk. Don’t be a jerk.

No support will be provided at this time, and I may ignore or close issues requesting support without responding.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS «AS IS» AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Usage

Basic

Precompute the bloom filter:

hex2blf example.hex example.blf

Run Brainflayer against it:

brainflayer -v -b example.blf -i phraselist.txt

your_generator | brainflayer -v -b example.blf

Advanced

Brainflayer’s design is heavily influenced by Unix philosophy. It (mostly) does one thing: hunt for tasty brainwallets. A major feature it does not have is generating candidate passwords/passphrases. There are plenty of other great tools that do that, and brainflayer is happy to have you pipe their output to it.

Unfortunately, brainflayer is not currently multithreaded. If you want to have it keep multiple cores busy, you’ll have to come up with a way to distribute the work yourself (brainflayer’s -n and -k options may help). In my testing, brainflayer benefits significantly from hyperthreading, so you may want to run two copies per physical core. Also worth noting is that brainflayer mmaps its data files in shared memory, so additional brainflayer processes do not use up that much additional RAM.

While not strictly required, it is highly recommended to use the following options:

-m FILE Load the ecmult table from FILE (generated with ecmtabgen ) rather than computing it on startup. This will allow multiple brainflayer processes to share the same table in memory, and signifigantly reduce startup time when using a large table.

-f FILE Verify check bloom filter matches against FILE , a list of all hash160s generated with sort -u example.hex | xxd -r -p > example.bin Enough addresses exist on the Bitcoin network to cause false positives in the bloom filter, this option will suppress them.

Brainflayer supports a few other types of input via the -t option:

-t keccak passphrases to be hashed with keccak256 (some ethereum tools)

-t priv raw private keys — this can be used to support arbitrary deterministic wallet schemes via an external program. Any trailing data after the hex encoded private key will be included in brainflayer’s output as well, for reference. See also the -I option if you want to crack a bunch of sequential keys, which has special speed optimizations.

-t warp salts or passwords/passphrases for WarpWallet

-t bwio salts or passwords/passphrases for brainwallet.io

-t bv2 salts or passwords/passphrases for brainv2 — this one is very slow on CPU, however the parameter choices make it a great target for GPUs and FPGAs.

-t rush passwords for password-protected rushwallets — pass the fragment (the part of the url after the #) using -r . Almost all wrong passwords will be rejected even without a bloom filter.

Address types can be specified with the -c option:

Читайте также:  Останутся ли мои файлы после обновления до windows 10

-c u uncompressed addresses

-c c compressed addresses

-c e ethereum addresses

-c x most signifigant bits of public point’s x coordinate

It’s possible to combine two or more of these, e.g. the default is -c uc .

An incremental private key brute force mode is available for fans of directory.io, try

brainflayer -v -I 0000000000000000000000000000000000000000000000000000000000000001 -b example.blf

See the output of brainflayer -h for more detailed usage info.

Also included is blfchk — you can pipe it hex encoded hash160 to check a bloom filter file for. It’s very fast — it can easily check millions of hash160s per second. Not entirely sure what this is good for but I’m sure you’ll come up with something.

Building

Should compile on Linux with make provided you have the required devel libs installed (at least openssl and gmp are required along with libsecp256k1’s build dependencies). I really need to learn autotools. If you file an issue about a build failure in libsecp256k1 I will close it.

Dependencies should install with

Supported build target is currently Ubuntu 20.04 on amd64/x86_64. Issues with building for other platforms probably won’t be fixed. In particular, Kali Linux is not supported. Support for operating systems other than Linux would require extensive refactoring of Brainflayer’s memory optimizations and is not happening.

Redistribution of compiled brainflayer binaries is prohibited, and unauthorized binaries probably contain malware.

Authors

The bulk of Brainflayer was written by Ryan Castellucci. Nicolas Courtois and Guangyan Song contributed the code in ec_pubkey_fast.c which more than doubles the speed of public key computations compared with the stock secp256k1 library from Bitcoin. This code uses a much larger table for ec multiplication and optimized routines for ec addition and doubling.

Проект по brainflayer для windows 10

Brainflayer is a Proof-of-Concept brainwallet cracking tool that uses libsecp256k1 for pubkey generation. It was originally released as part of my DEFCON talk about cracking brainwallets (slides, video, why).

The name is a reference to Mind Flayers, a race of monsters from the Dungeons & Dragons role-playing game. They eat brains, psionically enslave people and look like lovecraftian horrors.

The current release is more than four times faster than the DEFCON release, and many features have been added.

If brainflayer is useful to you, please get in touch to let me know. I’m very interested in any research it’s being used for, and I’m generally happy to collaborate with academic groups.

Just because you can steal someone’s money doesn’t mean you should. Stealing would make you a jerk. Don’t be a jerk.

No support will be provided at this time, and I may ignore or close issues requesting support without responding.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS «AS IS» AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Precompute the bloom filter:

hex2blf example.hex example.blf

Run Brainflayer against it:

brainflayer -v -b example.blf -i phraselist.txt

your_generator | brainflayer -v -b example.blf

Brainflayer’s design is heavily influenced by Unix philosophy. It (mostly) does one thing: hunt for tasty brainwallets. A major feature it does not have is generating candidate passwords/passphrases. There are plenty of other great tools that do that, and brainflayer is happy to have you pipe their output to it.

Unfortunately, brainflayer is not currently multithreaded. If you want to have it keep multiple cores busy, you’ll have to come up with a way to distribute the work yourself (brainflayer’s -n and -k options may help). In my testing, brainflayer benefits significantly from hyperthreading, so you may want to run two copies per physical core. Also worth noting is that brainflayer mmaps its data files in shared memory, so additional brainflayer processes do not use up that much additional RAM.

Читайте также:  Tag scanner windows 10

While not strictly required, it is highly recommended to use the following options:

-m FILE Load the ecmult table from FILE (generated with ecmtabgen ) rather than computing it on startup. This will allow multiple brainflayer processes to share the same table in memory, and signifigantly reduce startup time when using a large table.

-f FILE Verify check bloom filter matches against FILE , a list of all hash160s generated with sort -u example.hex | xxd -r -p > example.bin Enough addresses exist on the Bitcoin network to cause false positives in the bloom filter, this option will suppress them.

Brainflayer supports a few other types of input via the -t option:

-t keccak passphrases to be hashed with keccak256 (some ethereum tools)

-t priv raw private keys — this can be used to support arbitrary deterministic wallet schemes via an external program. Any trailing data after the hex encoded private key will be included in brainflayer’s output as well, for reference. See also the -I option if you want to crack a bunch of sequential keys, which has special speed optimizations.

-t warp salts or passwords/passphrases for WarpWallet

-t bwio salts or passwords/passphrases for brainwallet.io

-t bv2 salts or passwords/passphrases for brainv2 — this one is very slow on CPU, however the parameter choices make it a great target for GPUs and FPGAs.

-t rush passwords for password-protected rushwallets — pass the fragment (the part of the url after the #) using -r . Almost all wrong passwords will be rejected even without a bloom filter.

Address types can be specified with the -c option:

-c u uncompressed addresses

-c c compressed addresses

-c e ethereum addresses

-c x most signifigant bits of public point’s x coordinate

It’s possible to combine two or more of these, e.g. the default is -c uc .

An incremental private key brute force mode is available for fans of directory.io, try

brainflayer -v -I 0000000000000000000000000000000000000000000000000000000000000001 -b example.blf

See the output of brainflayer -h for more detailed usage info.

Also included is blfchk — you can pipe it hex encoded hash160 to check a bloom filter file for. It’s very fast — it can easily check millions of hash160s per second. Not entirely sure what this is good for but I’m sure you’ll come up with something.

Should compile on Linux with make provided you have the required devel libs installed (at least openssl and gmp are required along with libsecp256k1’s build dependencies). I really need to learn autotools. If you file an issue about a build failure in libsecp256k1 I will close it.

Dependencies should install with

Supported build target is currently Ubuntu 20.04 on amd64/x86_64. Issues with building for other platforms probably won’t be fixed. In particular, Kali Linux is not supported. Support for operating systems other than Linux would require extensive refactoring of Brainflayer’s memory optimizations and is not happening.

Redistribution of compiled brainflayer binaries is prohibited, and unauthorized binaries probably contain malware.

The bulk of Brainflayer was written by Ryan Castellucci. Nicolas Courtois and Guangyan Song contributed the code in ec_pubkey_fast.c which more than doubles the speed of public key computations compared with the stock secp256k1 library from Bitcoin. This code uses a much larger table for ec multiplication and optimized routines for ec addition and doubling.

Brainflayer: Софт для кражи биткоинов из вашего мозга

Истинные фанаты биткоина с давних времен считали “brain wallet” («кошелек в мозге») идеальным способом хранения криптовалюты. Суть в том, что, запомнив какую-то сложную фразу, дающую доступ к закрытому ключу кошелька, кто угодно может хранить «в своем мозге» любые суммы в цифровой валюте без необходимости хранить какие-то пароли или другие данные на компьютерах.

Однако, как выяснилось, ваш разум – на удивление уязвимое место, чтобы держать там ключ к своим крипто-запасам. Один хакер сумел разработать софт, который, по его задумке, должен это подтвердить.

В августе на хакерской конференции DefCon эксперт по безопасности по имени Райан Кастеллуччи планирует представить программу, которую он назвал Brainflayer, разработанную, чтобы взламывать «мозговые» биткоин-кошельки, позволяя хакерам заполучать хранящиеся в них биткоины. На самом деле, мудрые биткойнеры давно знали, что «мозговые» кошельки не всегда надежны, несмотря на то, что ключ к ним прячется в глубинах сознания. По словам Кастеллуччи, его программа создана для того, чтобы наглядно продемонстрировать это владельцам биткоинов и поставить точку в этом вопросе.

Читайте также:  Лабораторная администрирование операционной системы linux

«Люди по-прежнему хотят использовать «мозговые» кошельки, потому что им нравится идея того, что ключ хранится у них в голове… Они не осознают, насколько это ненадежно, и многие из них в этом убедятся», — говорит Кастеллуччи, исследователь по безопасности компании White Ops. По его словам, программа, которую он планирует опубликовать в сети к моменту его выступления на конференции, будет служить предупреждением: «Лучше храните биткоины там, где к ним нельзя будет получить доступ. Я хочу убедить всех, что это не безопасно».

«Мозговые» кошельки или Brain wallets работаю так, что выбирается фраза-пароль, которая соответствует математической функции, известной как «хэш». Итоговая последовательность произвольных чисел затем используется как закрытый ключ биткоина – длинная последовательность секретных символов, дающая доступ к запасам криптовалюты на конретном биткоин-адресе. Так как та же фраза может быть в любой момент использована для генерации закрытого ключа из хэша, пользователям нет необходимости запоминать этот ключ, запомнив только фразу. Можно даже удалить закрытый ключ с компьютера, зная, что никто, даже полиция при конфискации компьютера, не сможет получить доступ к сокровищнице, запрятанной в вашей голове.

По мнению Кастеллуччи, проблема в том, что люди выбирают не настолько надежные и произвольные фразы, как им может показаться. И любой хакер в принципе может угадать миллионы фраз, конвертируя их в закрытые ключи, пробуя их на каждом из биткоин-адресов в цепочке блоков. Он говорит, что даже если владелец биткоинов думает, что выбрал по-настоящему надежную фразу-пароль, она не всегда может устоять против ресурсов, задействованных для взлома, которыми пользуются похитители в своем стремлении заполучить доступ к деньгам. «Обычный закрытый ключ слишком длинный, чтобы его можно было как-то угадать или подобрать», — говорит Кастеллуччи, — «Но если они угадают вашу фразу-пароль, они получат доступ к кошельку, потому что, на самом деле, из людей выходит довольно скверный генератор случайных чисел».

Кастеллуччи написал софт для взлома фраз-паролей для «мозговых» кошельков, который в последствие стал Brainflayer, еще в 2013 году, когда впервые прочитал о brain wallet. Он оставил программу запущенной и сканирующей биткоин-адреса на уязвимость, и отправился на пикник на несколько часов. К тому моменту как он вернулся, она нашла кошелек, на котором было 250 биткоинов – более $66000 по сегодняшнему курсу – которые мог украсть любой, у кого был аналогичный софт. Кастеллуччи тогда связался с владельцем кошелька и убедил его переместить биткоины в более надежный кошелек. Существует множество сообщений о реальных хищениях с «мозговых» кошельков. Одной из жертв стал пользователь Reddit под ником thonbrocket. Он сообщил, что злоумышленники использовали фразу из неизвестного стихотворения на языке африкаанс как фразу-пароль, и он был просто в шоке, что они смогли ее подобрать.

Кастеллуччи не сообщает, сколько именно фраз-паролей может подобрать Brainflayer на одном компьютере, об этом он расскажет на DefCon. Но он намекнул, что, если его программу запустить на ботнете из множества зараженных компьютеров, она способна подбирать сотни миллиардов фраз-паролей в секунду. В отличие от других аналогичных программ для подбора паролей, его софт оптимизирован для того, чтобы быстро генерировать биткоин-ключи и сканировать цепочку блоков, чтобы пробовать их для различных биткоин-адресов. Он использовал метод, известный как Bloom filter, чтобы наиболее эффективно проверять цепочку блоков на совпадения. Результаты здесь, конечно, не настолько быстрые, как у АНБ, которая, по данным, опубликованным Эдвардом Сноуденом, может проверять до триллиона паролей в секунду, но, тем не менее, это все равно может удивить многих из тех, кто уверен в надежности своих фраз-паролей.

Не стоит думать, что Brainflayer сильно мощнее по сравнению с аналогичным софтом, которым могут пользоваться преступники. Но, по словам основателя компании White Ops известного исследователя в области безопасности, интересующегося биткоином, Дэна Камински, суть в этом. Brainflayer разработан, чтобы показать возможные последствия и доказать всем, что их незащищенный «мозговой» кошелек можно взломать. «Райан не первый, кто написал взломщик для brain wallet», — говорит Камински, — «Но когда он его покажет, он будет последним, кто напишет такой софт, потому что он уже будет доступен всем».

Камински таким образом хочет достучаться до биткойнеров. Несмотря на проблемы с безопасностью «мозговых» кошельков, многих из тех, кто думает, что это идеальный способ хранения своих виртуальных запасов, по-прежнему привлекает эта идея. «Люди думают, что это самый надежный способ «хранения денег под матрасом». В действительности, под вашим матрасом довольно много места. А вот в голове его не так много, как кажется».

Оцените статью