Brainflayer как запустить на linux

Обновлено: 05.07.2024

Brainflayer is a Proof-of-Concept brainwallet cracking tool that uses libsecp256k1 for pubkey generation. It was originally released as part of a DEFCON talk about cracking brainwallets. The released video is available at the end of the article.

Many researchers have spotted that cryptocurrency users are using guessable private keys to store their bitcoin and ethereum. Brainflayer can monitor thousands of private keys in seconds. If you know the private key then you own all bitcoins and ethereums in it.

Blockchain hackers are using such methods and they have stolen more than 50$ million in ethereum.

What is a private key?

A private key in the context of Bitcoin or Ethereum is a secret number that allows the crypto-coins to be spent. Every crypto-wallet contains one or more private keys, which are saved in the wallet file. Crypto-addresses are derived mathematically from the private keys.

A bitcoin private key is a 256-bit number. An example in hexadecimal is the following :

From the above private key, the following public addresses are derived mathematically:

Private keys themselves are almost never handled by the user, instead, the user will typically be given a seed phrase that encodes the same information as private keys.

Ethereum Seed Phrase

Ethereum Seed Phrase

What is a Brainwallet?

Bitcoin Brainwallet Generator

Bitcoin Brainwallet Generator

It is obvious that you must not use brainwallets with seed phrases that are generated by a human.

Bruteforce can crack even the most difficult human-generated passphrases.

List of most known brainwallets :

How to Install Brainflayer

The following commands can be used to install brainflayer and the required dependencies on Kali or Ubuntu.

Compile Error Handling

A lot of people are troubled with compilations errors. The following changes on the Makefile file will help to overcome the errors.

The Man of Brainflayer

When everything is compiled, run it the flag -h for listing the available running options.

Create the Bloom Filter

According to Wikipedia, bloom filter is a space-efficient probabilistic data structure that is used to test whether an element exists in a set. False-positive matches are possible, but false negatives are not. In our case, there is a very small chance brainflayer that will return a cracked wallet that it is not actually cracked.

The next step is the creation of the bloom filter. A file which lists one bitcoin address per line is required. Then, addresses should be converted to Hash160 addresses. Finally, execute the following command :

For Ethereum bloom filter creation, no hash160 conversion is required.

Crack Bitcoin via Wordlist

After the bloom filter creation, everything is ready for brute-forcing. Grab your longest wordlist and attack! The following commands are the most common ones:

The sha256 algorithm is the default option.

Crack Ethereum via Wordlist

Similarly, the most common cracking options for ethereum are the following:

Parallel Cracking

Brainflayer does not support multi-thread functionality. For parallel cracking, you should run multiple instances with different -n parameter.

Private Key Scanner

Brainflayer supports cracking via incremental private keys with option -I . This method is extremely fast. A single modern core can scan more than 700.000 private keys per second.

Brainflayer Def Con Video

If you are still not satisfied, check for more information on def con video.

Brainflayer and Windows 10

In short, brainflayer is a tool that is designed for Linux operative system. There is the option to run brainflayer on Windows with WSL-Kali Linux. If you are interested in how to install and setup WSL-Kali on Windows click here.

The installation process of brainflayer on WSL-Kali is similar to normal Kali.

How to protect your brainwallet

The easiest way to protect yourself is by not using brainwallets. In case you still want to use one, then you must use a big complex random non-human generated seed as the input. Moreover, you have to ensure that the brainwallet is trusted and uses the best hashing algorithms (SHA256, SHA512 etc) multiple times to hash your seed.

Last but not least, users must never create or use a non-random bitcoin private key.

Update: July 11, 2020

Make changes in Makefile, to make Brainflayer compile successfully on Ubuntu 20.04 and Ubuntu 18.04.

Below this line is the original Brainflayer README

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.

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.

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.

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.

About

A proof-of-concept cracker for cryptocurrency brainwallets and other low entropy key alogrithms.

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.

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.

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.

About

A proof-of-concept cracker for cryptocurrency brainwallets and other low entropy key alogrithms.

Забавная программа ,написанная Райан Кастеллуччи,своего рода биткоин лотерея ,может повезти на первой секунде и выскочит кошелек сатоши с парой миллиардов долларов а можешь пыжиться всю жизнь и только счета за электричество будешь гасить.Сам Brainflayer выложен в интернете но там надо провести еще немеренно манипуляций,готовые сборки барыги впаривают за бабло но там по моему фигня,потому как прежде чем запустить собранную прогу в систему надо напихать еще немало библиотек и всякой прочей дребедени.Напоминаю. То что вы нашли какойто кошелек это не значит что все,он ваш,желательно найти и известить владельца что его богатства в опасности а владелец вас скорее всего отблагодарит за честность и все довольны))а вот если нашли кошелек ,так называемый мертвый,то никто не будет против если вы материально обогатитесь.

Для тех кто не страдает параноей в конце будет ссылка на полностью готовую систему с настроенными программами Brainflayer первая от создателя ,вторая от его последователя она посвежее ,образ системы запускается на VMware,все полностью настроено в базе 25 миллионов кошельков с балансом,помимо этого там же генератор seed на 12 слов от электрум и на 24 слова,ничего настраивать не надо ,открываешь папку с прогой в терминале и вбиваешь ./brain12words.py -w electrum-mnemonic-1626.txt -n 9000000000000000000 | ./brainflayer -v -c cu -b btcaddress.blf -o found.txt ,прога начинает работать и может вы счастливчик и сразу повезет,найденный результат сохранится в файл found.txt.На рабочем столе текстовик с командами запуска в разных вариантах,последовательный перебор любого диапазона,прогонка текстовых списков паролей и фраз или запуск с генератором bip39.

Пароль виртуальной машины- gyg.

кто хочет сам настроить прогу ,команды которые надо выполнить;

sudo apt-get update

sudo apt-get install build-essential

sudo apt-get install openssl

sudo apt-get install git

sudo apt-get install make

sudo apt-get install autotools-dev

sudo apt-get install zlib1g-dev

sudo apt-get install libssl-dev

sudo apt-get install libgmp-dev

sudo apt-get install libgmp3-dev

sudo apt-get install libcurl4-openssl-dev

sudo apt-get install libtool

sudo apt-get install autoconf

sudo apt-get install dh-autoreconf

sudo apt-get install automake

sudo apt-get install pkg-config

sudo apt-get install libgtk-3-dev

sudo apt-get install libjansson-dev

sudo apt-get install libboost-all-dev

sudo apt-get install libsparsehash-dev

sudo apt-get update

После этого начинается второй этап ,парсинг адресов перевод их всех в hex160,создать фильт блума и только потом можно запускать программу.

Как то так ,камни и говно просьба не кидать я не программист просто смог собрать запустить и сделать бесплатным для людей то что барыги продают. Софтина создана собственно говоря не для взлома а для того чтобы показать людям насколько уязвимы кошельки.На вирусы проверяйте сколько угодно их там просто нет.

Собрано на Ubuntu 18 64.

На Googl выложена обновленная версия ,старую удалил,она осталась только на Mega.Обновленная версия весит уже около 13Gb но в ней 28+миллионов адресов с балансом,пустые отсеяны,адреса актуальны на 19.03.2020,

Добавлена библиотека base58.Добавлен многофункциональный генератор паролей Сrunch.Прога Brainflayer настроена полностью , в проге Brainflayer19 настраиваем фильтр Блума командами ./hex2blf btcaddress.hex btcaddress.blf, sort -u btcaddress.hex | xxd -r -p > btcaddress.bin

и можно также запускать,не стал сразу создавать ибо архив будет весит не 13 а 15 гигов,можно просто скопировать из Brainflayer в Brainflayer19 файлы btcaddress.blf,btcaddress.bin.

На рабочем столе 123.txt с готовыми командами остальные сами нафантазируете,и файл с адресами(28+млн.).Да кстати для работы с большими текстовыми файлами используется EmEditor,все остальные проги не вывозят.

Если это не фейк то кошельки Сатоши Накамото теперь остались без хозяина ((Новость печальная.

Читайте также: