Git Product home page Git Product logo

plutus's Introduction

Plutus Bitcoin Brute Forcer

A Bitcoin wallet collider that brute forces random wallet addresses

Like This Project? Give It A Star

Dependencies

Python 3.9 or higher

Python modules listed in the requirements.txt

If you have a Linux or MacOS operating system, libgmp3-dev is required. If you have Windows then this is not required. Install by running the command:

sudo apt-get install libgmp3-dev

Installation

git clone https://github.com/Isaacdelly/Plutus.git plutus
cd plutus && pip3 install -r requirements.txt

Quick Start

python3 plutus.py

Proof Of Concept

A private key is a secret number that allows Bitcoins to be spent. If a wallet has Bitcoins in it, then the private key will allow a person to control the wallet and spend whatever balance the wallet has. So this program attempts to find Bitcoin private keys that correlate to wallets with positive balances. However, because it is impossible to know which private keys control wallets with money and which private keys control empty wallets, we have to randomly look at every possible private key that exists and hope to find one that has a balance.

This program is essentially a brute forcing algorithm. It continuously generates random Bitcoin private keys, converts the private keys into their respective wallet addresses, then checks the balance of the addresses. If a wallet with a balance is found, then the private key, public key and wallet address are saved to the text file plutus.txt on the user's hard drive. The ultimate goal is to randomly find a wallet with a balance out of the 2160 possible wallets in existence.

How It Works

32 byte hexidecimal strings are generated randomly using os.urandom() and are used as our private keys.

The private keys are converted into their respective public keys using the fastecdsa python library. This is the fastest library to perform secp256k1 signing. If you run this on Windows then fastecdsa is not supported, so instead we use starkbank-ecdsa to generate public keys. The public keys are converted into their Bitcoin wallet addresses using the binascii and hashlib standard libraries.

A pre-calculated database of every funded P2PKH Bitcoin address is included in this project. The generated address is searched within the database, and if it is found that the address has a balance, then the private key, public key and wallet address are saved to the text file plutus.txt on the user's hard drive.

This program also utilizes multiprocessing through the multiprocessing.Process() function in order to make concurrent calculations.

Efficiency

It takes 0.002 seconds for this progam to brute force a single Bitcoin address.

However, through multiprocessing.Process() a concurrent process is created for every CPU your computer has. So this program can brute force a single address at a speed of 0.002 ÷ cpu_count() seconds.

Database FAQ

An offline database is used to find the balance of generated Bitcoin addresses. Visit /database for information.

Parameters

This program has optional parameters to customize how it runs:

help: python3 plutus.py help
Prints a short explanation of the parameters and how they work

time: python3 plutus.py time
Brute forces a single address and takes a timestamp of how long it took - used for speed testing purposes

verbose: 0 or 1
python3 plutus.py verbose=1: When set to 1, then every bitcoin address that gets bruteforced will be printed to the terminal. This has the potential to slow the program down

python3 plutus.py verbose=0: When set to 0, the program will not print anything to the terminal and the bruteforcing will work silently. By default verbose is set to 0

substring: python3 plutus.py substring=8: To make the program memory efficient, the entire bitcoin address is not loaded from the database. Only the last <substring> characters are loaded. This significantly reduces the amount of RAM required to run the program. if you still get memory errors then try making this number smaller, by default it is set to 8. This opens us up to getting false positives (empty addresses mistaken as funded) with a probability of 1/(16^<substring>), however it does NOT leave us vulnerable to false negatives (funded addresses being mistaken as empty) so this is an acceptable compromise.

cpu_count: python3 plutus.py cpu_count=1: number of cores to run concurrently. More cores = more resource usage but faster bruteforcing. Omit this parameter to run with the maximum number of cores

By default the program runs using python3 plutus.py verbose=0 substring=8 if nothing is passed.

Expected Output

If a wallet with a balance is found, then all necessary information about the wallet will be saved to the text file plutus.txt. An example is:

hex private key: 5A4F3F1CAB44848B2C2C515AE74E9CC487A9982C9DD695810230EA48B1DCEADD
WIF private key: 5JW4RCAXDbocFLK9bxqw5cbQwuSn86fpbmz2HhT9nvKMTh68hjm
public key: 04393B30BC950F358326062FF28D194A5B28751C1FF2562C02CA4DFB2A864DE63280CC140D0D540EA1A5711D1E519C842684F42445C41CB501B7EA00361699C320
uncompressed address: 1Kz2CTvjzkZ3p2BQb5x5DX6GEoHX2jFS45

Recent Improvements & TODO

Create an issue so I can add more stuff to improve

plutus's People

Contributors

isaacdelly avatar p1r473 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plutus's Issues

Log session tries.

Would be nice to know how many addresses has been checked at end of session.

Installing Requirements.txt

I seem to have an issue with installing requirements. According to Git Bash, the commands install -r (the -r part) does not exist, so how would I move past this and/or how would I be able to run Plutus?

SyntaxError

File "plutus.py"  line 102
print('\rreading database: ' + str(c + 1) + '/' + str(count), end = ' ')
SyntaxError: invalid syntax

How can I fix it ?

multiprocessing speed

Possible to show output about actual processing speed?
(eg. cores/threads in use, and overall generated addresses/seconds)

Not working on OSX

The following lines of code queue.qsize() throw a NotImplementedError due to the fact that sem_getvalue() is not implemented on this platform.

Запуск в фоне и автоматическая установка

Если будет возможность. Сделайте пожалуйста запуск в фоне.
Запустил putty, запустил скрипт. Закрыл putty а программа работает.

Так же было бы отлично если бы сделали для windows auto install.

Stops after Data size display

asamp@DESKTOP-C6SDA8C /cygdrive/c/Users/asamp/Desktop/Plutus
$ python3 plutus.py
Database Size: 19000001

asamp@DESKTOP-C6SDA8C /cygdrive/c/Users/asamp/Desktop/Plutus

More control over brute forcing

Not an issue, but idea: it would be great to have more control over brute forcing process, what I mean is some sort of user-defined regular expression or dictionary capability over the combinations of random Bitcoin private keys.

My Machine CPU usage 100%

i have a problem why running Plutus always CPU usage 100% and my pc stuck . but late version its only CPU usage 20% . anyone help me for this issue .

Offline Database

Instead of querying remote blockchain, would it be possible to query a local blockchain? Node operators (like me) have the whole blockchain on disk so (compared to an api call) the access time would drastically decrease ( < 1ms with SSD)

Originally posted by @alaakaazaam in #49 (comment)

Have you ever found anything?
Or is it a waste of time

Description

Every time this program checks the balance of a generated address, it will print the result to the user. If an empty wallet is found, then the wallet address will be printed to the terminal. An example is:

This is not clear, the database dumps contain only positive balances thus address with 0 balance are not "found" instead addresses are randomly generated and checked against the database . One can think that database contain all addresses.

Error starting plutus

teo@debian:/plutus$ python plutus.py
File "plutus.py", line 104
print('\rreading database: ' + str(c+1) + '/' + str(count), end='')
^
SyntaxError: invalid syntax
teo@debian:
/plutus$

or

teo@debian:/plutus$ python3 plutus.py
File "plutus.py", line 113
pool.map(main(database), range(multiprocessing.cpu_count() * 2))
^
IndentationError: expected an indented block
teo@debian:
/plutus$

I'm blocked from bitaps.com

Can someone look into this for me;

from my workstation;
D:\downloads>ping bitaps.com

Pinging bitaps.com [188.226.138.244] with 32 bytes of data:
Reply from 188.226.138.244: bytes=32 time=122ms TTL=46
Reply from 188.226.138.244: bytes=32 time=122ms TTL=46
Reply from 188.226.138.244: bytes=32 time=122ms TTL=46

from my IBM VM;
root@ibm-dfw-dev1:~/src/Plutus# ping bitaps.com
PING bitaps.com (198.211.122.103) 56(84) bytes of data.

ping 188.226.138.244
PING 188.226.138.244 (188.226.138.244) 56(84) bytes of data.

traceroute to bitapis.com (195.30.107.230), 30 hops max, 60 byte packets
1 169.254.199.98 (169.254.199.98) 1.920 ms 2.063 ms 2.251 ms
2 ae103.ppr02.dal13.networklayer.com (169.48.118.158) 1.027 ms ae103.ppr04.dal13.networklayer.com (169.48.118.162) 1.111 ms ae103.ppr03.dal13.networklayer.com (169.48.118.160) 1.086 ms
3 82.76.30a9.ip4.static.sl-reverse.com (169.48.118.130) 2.537 ms 88.76.30a9.ip4.static.sl-reverse.com (169.48.118.136) 0.984 ms 80.76.30a9.ip4.static.sl-reverse.com (169.48.118.128) 2.502 ms
4 ae17.cbs02.dr01.dal04.networklayer.com (169.45.18.42) 2.414 ms * *
5 * * *
6 * * *
7 ae9.bbr01.tl01.nyc01.networklayer.com (50.97.17.43) 43.828 ms 41.582 ms 44.044 ms
8 ae6-0.nyk10.core-backbone.com (198.32.160.234) 43.771 ms 43.759 ms 45.459 ms
9 ae7-2030.muc10.core-backbone.com (5.56.17.13) 128.881 ms 129.282 ms 127.274 ms
10 Cisco-M-XXXII-Te0-0-1-2-406.space.net (81.95.2.234) 130.182 ms 128.430 ms 129.260 ms
11 Cisco-M-L-Te1-1.Space.Net (185.54.120.9) 126.083 ms 126.076 ms 127.546 ms
12 M42-Po110-v15.Space.Net (195.30.3.74) 130.355 ms 130.400 ms 130.161 ms
13 * * *
14 * * *
15 * * *

was working well until about 2 days ago, VM is 169.62.248.195

Pyshark can you check it out for me ?

OSError

Traceback (most recent call last):
  File "C:\Users\username\Desktop\Plutus-master\plutus.py", line 116, in <module>
    multiprocessing.Process(target = main, args = (database, )).start()
  File "C:\python3\lib\multiprocessing\process.py", line 112, in start
    self._popen = self._Popen(self)
  File "C:\python3\lib\multiprocessing\context.py", line 223, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\python3\lib\multiprocessing\context.py", line 322, in _Popen
    return Popen(process_obj)
  File "C:\python3\lib\multiprocessing\popen_spawn_win32.py", line 65, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\python3\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
OSError: [Errno 22] Invalid argument

In order to get it working i had to replace:

 for cpu in range(multiprocessing.cpu_count()):
        multiprocessing.Process(target = main, args = (database, )).start()

with:

with multiprocessing.Pool(multiprocessing.cpu_count()) as pool: 
        pool.map(main(database), range(multiprocessing.cpu_count() * 2))

ref: #80

Question about Plutus.txt

Is Plutus.txt stored in the Plutus folder? Also, if there are hits, is the data all written/appended to the single Plutus.txt file ? Thanks!

ModuleNotFoundError, Different OS.

I have been trying to use Plutus on my Windows 10 laptop, and I've solved all issues I supposedly have but a new "ModuleNotFoundError" I've come across.
Traceback (most recent call last): File "plutus.py", line 10, in <module> from ellipticcurve.privateKey import PrivateKey ModuleNotFoundError: No module named 'ellipticcurve'
Is there something I'm missing?
I'm using a Windows OS, as stated earlier, and I read the solution to the Ubuntu Linux OS. What would the equivalent commands of sudo and apt-get be in my case so I can get past this?

compressed addresses

Awesome update, any thoughts on if you will ever make it where it will take private key, check the uncompressed addy AND the compressed one? If not, it's okay, I did it for an older version of yours but went with from bitcoin import * and the whole thing was alot slower.

OpenCL?

Is it possible to use pyopencl with this?

Memory Intensive

Memory Intensive>>> 98% of 8gb memory is being used, Windows 8.1 Pro Python 3.7.2
Thank you.

SEGWIT ADDRESS

is it possible for segwit address begins with 3.. etc.

ValueError: unsupported pickle protocol: 4

zzz@zzz-laptop ~/Plutus-master $ sudo su root

zzz-laptop Plutus-master # pip install -r requirements.txt
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/init.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting starkbank-ecdsa==0.1.4 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/f8/62/0e68d90789724beb36e3413a6d4f12e91c000b2bf45939376652697e3437/starkbank-ecdsa-0.1.4.tar.gz
Building wheels for collected packages: starkbank-ecdsa
Building wheel for starkbank-ecdsa (setup.py) ... done
Stored in directory: /root/.cache/pip/wheels/f2/59/03/22bfe598512b95ee51a705546fcb6c9516a6a368e2390e9ace
Successfully built starkbank-ecdsa
Installing collected packages: starkbank-ecdsa
Successfully installed starkbank-ecdsa-0.1.4

zzz-laptop Plutus-master # python plutus.py
reading database: 1/46
Traceback (most recent call last):
File "plutus.py", line 106, in
if c < quarter: database[0] = database[0] | pickle.load(file)
File "/usr/lib/python2.7/pickle.py", line 1384, in load
return Unpickler(file).load()
File "/usr/lib/python2.7/pickle.py", line 864, in load
dispatchkey
File "/usr/lib/python2.7/pickle.py", line 892, in load_proto
raise ValueError, "unsupported pickle protocol: %d" % proto
ValueError: unsupported pickle protocol: 4

zzz-laptop Plutus-master #

How to make a .pickle

how to make a .pickle from a text file(where are the addresses on each line). Write more in /database/README.md

i got an issue, how to clear??

python plutus.py
File "plutus.py", line 104
print('\rreading database: ' + str(c+1) + '/' + str(count), end='')
^
SyntaxError: invalid syntax

Cuda Performance

Hello.

Why you don`t use cuda to perform the Attacks.
With cuda you can make a lot of more per second.

error

root@HomelyStingy-VM:~/plutus# python plutus.py
File "plutus.py", line 103
print('reading database: ' + str(c) + '/' + str(count), end='\r')
^
SyntaxError: invalid syntax

SyntaxError

print('reading database: ' + str(c) + '/' + str(count), end='\r')
^
SyntaxError: invalid syntax

Unknown Syntax Error

I'm getting the following syntax error after trying to run the repo.

:plutus haus$ python plutus.py
  File "plutus.py", line 104
    print('\rreading database: ' + str(c+1) + '/' + str(count), end='')

MemoryError

I got this message

File "c:\Users\Admin\Desktop\Plutus-master\Plutus-master\plutus.py", line 110, in
else: database[3] = database[3] | pickle.load(file)
MemoryError

MemoryError

Whenever I run Plutus, and yes, my RAM is suitable enough to run it, I keep getting stuck on this message:

reading database: 23/23 Traceback (most recent call last):
  File "plutus.py", line 109, in <module>
    else: database[3] = database[3] | pickle.load(file)
MemoryError

What am I doing wrong?

Stuck on "reading database 22/23"

I apologize if this has already been posted but I couldn't find it. I am trying to run and it goes through "reading database" from 1 (or maybe zero) up to 22/23 and never moves past it. I've tried renaming some of the .pickle files, copy and pasting a lower one and renaming, but no matter what it still get stuck on the next-to-last database. Is there a solution for this?

Counter

hi, can you add counter

1 15TuRwzjyDBLPtpLuXyTNJt233xrPjwuAg: 0
2 1JHH5NJz6k6nyB2K4rt25DsFzDPLnfdkQm: 0
3 1EUdL41yxK74oxHAkFhePK16K2nfjhbSXr: 0

Not an issue but an idea

Hello,
First, bravo for this code.
I was wondering about how to use CUDA to use a 1080Ti instead of the CPU for more speed.
I tried a lot to figure how to use this code with PyCUDA, numba, Theano and the CUDA toolkit but I clearly don't manage to transfer the data into the GPU instead of the CPU. My lack of knowledge I guess.
I don't know if you are able to do this kind of code to use with CUDA but if you can it would be awesome.

Bloom Filter as Database

The "database" is pretty big and needs a lot of memory to be stores in a set.
I think a better option would be to use a serializable bloom filter. It would be easier to share on github and with (almost) the same trade-off of using a set.

MemoryError (Line 60) and EOFError

I seem to be having a different memoryerror on line 60. I am also encountering an issue with an EOFError, which I have not seen before. Here's the code.

$ python plutus.py
reading database: 12/12 DONE
Traceback (most recent call last):
  File "plutus.py", line 116, in <module>
    multiprocessing.Process(target = main, args = (database, )).start()
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\process.py", line 112, in start
    self._popen = self._Popen(self)
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\context.py", line 223, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\context.py", line 322, in _Popen
    return Popen(process_obj)
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\popen_spawn_win32.py", line 65, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
MemoryError
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\spawn.py", line 105, in spawn_main
    exitcode = _main(fd)
  File "C:\Users\Alex\AppData\Local\Programs\Python\Python37-32\lib\multiprocessing\spawn.py", line 115, in _main
    self = reduction.pickle.load(from_parent)
EOFError: Ran out of input

What's going on with this?

Increment private keys by 1 instead of random generation

a = 105792089237316195423570985008687907852837564279074904382605163141518161494337
while a < 115792089237316195423570985008687907852837564279074904382605163141518161494337 :
a =gmpy2.next_prime(a)+1 or try a=a+1

print(a)
how now to convert a to hex to use it in your program

Add a option to update the Database

I really like the idea of your tool. You got my star. ;)
But would it be possible for you to add a function to update the database on our own?

ModuleNotFoundError

I have the same error previously reported by another user:

VirtualBox:~/plutus$ python3 plutus.py
Traceback (most recent call last):
File "plutus.py", line 10, in <module>
from ellipticcurve.privateKey import PrivateKey
ModuleNotFoundError: No module named 'ellipticcurve'

I have tried with python3 on two different Ubuntu machines. Logged in as root as well with no luck. Not sure what to do, appreciate any insight.

Here is the latest machine I tried on:

Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

Only one core is used at all times

Take a look at the attached video that showcases the problem. Expecting all cores being utilized. Reality: only one or two cores out of 8 have any significant load.
2019-02-26_16-09-43

Memory Error

When trying to start plutus getting error

Traceback (most recent call last):
File "plutus.py", line 110, in
else: database[3] = database[3] | pickle.load(file)
MemoryError

Error

12xazaRCB7A3qj9VR5U72MgxHDzmK7uBcq: 0
Exception caught: ('Connection aborted.', error(0, 'Error'))
Process Process-8:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "plutus.py", line 187, in worker
balance = get_balance(data[1])
File "plutus.py", line 102, in get_balance
return btc_balance(balance)
NameError: global name 'balance' is not defined

Anyone ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.