Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: k844738i on January 11, 2022, 06:07:23 PM



Title: Recovery process
Post by: k844738i on January 11, 2022, 06:07:23 PM
Hello.
I have been trying to recover my wallet with about 180BTC almost for one year.
I was ”clever” enough to create a wallet with SHA256 custom string entry, and didn’t bother saving neither SHA256 result of it nor the private key WIF. I had it for years on my computer. But the computer crashed and I am now unable to remember what the string entry was. However, I know what keys I used but cannot remember the pattern.

I generate hashes from various patterns, as described above, and enter the hash results into https://www.bitaddress.org/ under “Wallet Address” and then try to import the private WIF into a new wallet. However it is a very slow process. Is there any tool/website that can create multiple private WIF keys from numerous hash entries?

Please, refrain yourself from sending me private messages in order to "help" me, reply only here in the public thread. Thanks.


Title: Re: Recovery process
Post by: PawGo on January 11, 2022, 06:24:39 PM
To conclude: you need tool which will generate keys (wif or hash) for some entry, right?
Do you want to use the list of your exact phrases or you want tool to automatically adjust your input (like change to uppercase or add numbers)?
Check https://btcrecover.readthedocs.io/en/latest/
I would propose to prepare a tool for you (if you have some special requirements), but honestly speaking that program should fulfil yourneeds.


Title: Re: Recovery process
Post by: k844738i on January 11, 2022, 06:40:41 PM
To conclude: you need tool which will generate keys (wif or hash) for some entry, right?
Do you want to use the list of your exact phrases or you want tool to automatically adjust your input (like change to uppercase or add numbers)?


I entry the string manually because I try different patterns as I try to remember, which I hope one is the right.
So I generate SHA256 manually, but it takes time to manually copy SHA256 and to generate WIF, one by one. I have got pain in my hands. And it is already pain.


Title: Re: Recovery process
Post by: PawGo on January 11, 2022, 06:48:33 PM
Does it mean you do not know address and you must check each generated WIF to see what is behind?


Title: Re: Recovery process
Post by: o_e_l_e_o on January 11, 2022, 06:58:09 PM
However, I know what keys I used but cannot remember the pattern.
This is the perfect use case for btcrecover.

You'll want to first download and install btcrecover (along with Python and the required packages if necessary) by following the instructions here: https://btcrecover.readthedocs.io/en/latest/INSTALL/

Then you'll want to create a tokens file using the instructions and examples here: https://btcrecover.readthedocs.io/en/latest/tokenlist_file/. Basically, you will create a text file with each key/letter/word/string that you think is part of the wallet passphrase on a separate line.

You'll then want to run a command along the lines of this:
Code:
python btcrecover.py --brainwallet --addresses 1YOURaddressHERE --tokenlist ./path/to/your/tokens/file.txt

This is assuming you know the address of your wallet. If you don't know the address, you'll need to use an address database instead.

This will be able to check thousands of combinations per second, and will be exponentially faster than doing anything by hand.


Title: Re: Recovery process
Post by: PawGo on January 11, 2022, 07:03:23 PM
And if you do not know address but you know +- balance, you may always download the list of founded addresses and find potential candidates.


Title: Re: Recovery process
Post by: k844738i on January 11, 2022, 07:25:00 PM
Check https://btcrecover.readthedocs.io/en/latest/
I hope that it has been reviewed. I wouldn't like to get a keylogger or so.

Does it mean you do not know address and you must check each generated WIF to see what is behind?
That is correct.

This is the perfect use case for btcrecover.
...

This will be able to check thousands of combinations per second, and will be exponentially faster than doing anything by hand.
Thank you as well. I will try.


Title: Re: Recovery process
Post by: PawGo on January 11, 2022, 07:29:01 PM
Check https://btcrecover.readthedocs.io/en/latest/
I hope that it has been reviewed. I wouldn't like to get a keylogger or so.

Does it mean you do not know address and you must check each generated WIF to see what is behind?
That is correct.


Database of founded addresses: https://gz.blockchair.com/bitcoin/addresses/
Amounts are in satoshis, so 1 BTC looks like "100000000".

BTCrecover is OK.

edit:
a Long time ago I did something very simple for my own tests, now I have found it - maybe someone will make a good use of that. it is java program, I loaded addresses into local database and checked some phrases, with a simple modifications (lower/uppercase etc.), nothing serious.
Code:
import org.bitcoinj.core.Base58;
import org.bitcoinj.core.ECKey;
import org.bitcoinj.core.LegacyAddress;
import org.bitcoinj.core.NetworkParameters;
import org.bitcoinj.params.MainNetParams;
import java.io.*;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.sql.*;
import java.util.Date;

public class Brain {

    static final NetworkParameters NETWORK_PARAMETERS = MainNetParams.get();
    static final int STATUS_PERIOD = 1000*60*1;
    static MessageDigest messageDigest;
    static Statement statement;

    public static void main(String[] args) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, InvalidKeyException, IOException, InterruptedException {

        db();

        messageDigest = MessageDigest.getInstance("SHA-256");
        String filename=args[0];
        int skip = 0;
        if (args.length>1){
            skip = Integer.valueOf(args[1]);
        }
        FileReader fileReader = null;
        try {
            fileReader = new FileReader(filename);
        } catch (FileNotFoundException e) {
            System.err.println("not found: " + filename);
            System.exit(-1);
        }
        long count = 0;
        long start = 0;
        System.out.println("Brain start");
        try {
            BufferedReader bufferReader = new BufferedReader(fileReader);
            String line;
            while ((line = bufferReader.readLine()) != null) {
                if (line.trim().isEmpty()){
                    continue;
                }
                count++;
                if (skip>0){
                    if (count<skip) {
                        continue;
                    }
                    skip = 0;
                }
                test(line);
                test(line.toLowerCase());
                test(line.toUpperCase());
                if (line.endsWith(",")){
                    line=line.substring(0, line.length()-1);
                    test(line);
                    test(line.toLowerCase());
                    test(line.toUpperCase());
                }
                if (System.currentTimeMillis()-start > STATUS_PERIOD){
                    System.out.println("UP!"+count+" "+ line + " " + (new Date()));
                    start = System.currentTimeMillis();
                    count = 0;
                }
            }
        }catch (Exception e){
            System.err.println(e.getLocalizedMessage());
            System.exit(-1);
        }
        System.out.println("Brain end");
    }

    private static void db() {

        try{
            Connection connection = DriverManager.getConnection("jdbc:postgresql://localhost:5433/btc", "postgres", "password");
            System.out.println("Connected to PostgreSQL database!");
            statement = connection.createStatement();
        }catch (Exception e){
            System.out.println(e.getMessage());
            System.exit(-1);
        }
    }

    private static void test(String text) throws IOException, SQLException {
        messageDigest.update(text.getBytes("UTF-8"));
        ECKey ecKey = new ECKey(messageDigest.digest(), (byte[])null);
        String address = LegacyAddress.fromKey(NETWORK_PARAMETERS, ecKey).toString();
        if (checkAddressDatabase(address)){
            System.out.println(text + "|" + ecKey.getPrivateKeyAsHex()+"|"+ecKey.getPrivateKeyAsWiF(NETWORK_PARAMETERS)+"|"+address);
            FileWriter myWriter = new FileWriter("brainResult.txt", true);
            myWriter.write(text + "|" + ecKey.getPrivateKeyAsHex()+"|"+ecKey.getPrivateKeyAsWiF(NETWORK_PARAMETERS)+"|"+address);
            myWriter.close();
        }
        ecKey = PrivateKey.fromBase58(NETWORK_PARAMETERS, getCompressedWif(ecKey.getPrivateKeyAsHex())).getKey();
        address = LegacyAddress.fromKey(NETWORK_PARAMETERS, ecKey).toString();
        if (checkAddressDatabase(address)){
            System.out.println(text + "|" + ecKey.getPrivateKeyAsHex()+"|"+ecKey.getPrivateKeyAsWiF(NETWORK_PARAMETERS)+"|"+address);
            FileWriter myWriter = new FileWriter("brainResult.txt", true);
            myWriter.write(text + "|" + ecKey.getPrivateKeyAsHex()+"|"+ecKey.getPrivateKeyAsWiF(NETWORK_PARAMETERS)+"|"+address);
            myWriter.write("\r\n");
            myWriter.close();
        }
    }

    private static String getCompressedWif(String hex){
        String string = "80"+hex+"01";
        byte[] digest = messageDigest.digest(hexStringToByteArray(string));
        String checksum  = bytesToHex(messageDigest.digest(digest)).substring(0,8);
        byte[] data = hexStringToByteArray(string + checksum);
        return Base58.encode(data);
    }

    private static boolean checkAddressDatabase(String address) throws SQLException {
        ResultSet resultSet = statement.executeQuery("SELECT balance FROM public.address WHERE address='"+address+"'");
        while (resultSet.next()) {
            return true;
        }
        return false;
    }

    private static String bytesToHex(byte[] bytes) {
        StringBuffer result = new StringBuffer();
        for (byte b : bytes) result.append(Integer.toString((b & 0xff) + 0x100, 16).substring(1));
        return result.toString();
    }

    private static byte[] hexStringToByteArray(String s) {
        int len = s.length();
        byte[] data = new byte[len / 2];
        for (int i = 0; i < len; i += 2) {
            data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)
                    + Character.digit(s.charAt(i+1), 16));
        }
        return data;
    }
}



Title: Re: Recovery process
Post by: BlackHatCoiner on January 11, 2022, 07:56:56 PM
I hope that it has been reviewed. I wouldn't like to get a keylogger or so.
It's the #1 program for brute forcing keys. The first version (https://github.com/gurnec/btcrecover) has been reviewed by many and is easier to read its code. If we're talking about so much money, I'd spare a part of my day on looking how it works.

o_e_l_e_o provided you the up-to-date version of that project. Its first version is discontinued, but both do what you want. Good luck, I hope you manage to recover your bitcoins!

Edit: Also respect to PawGo, they have managed to recover others' money too with their tools (https://github.com/PawelGorny).


Title: Re: Recovery process
Post by: o_e_l_e_o on January 12, 2022, 09:06:30 AM
I hope that it has been reviewed. I wouldn't like to get a keylogger or so.
I have used btcrecover several times to help others crack forgotten passwords or incomplete seed phrases. I have never experienced any problems whatsoever. Additionally, it is all open source, so you can examine the code yourself to see exactly what it is doing.

Regardless, I would still recommend installing and running it on an offline machine, if you can. Not because I have any concerns about btcrecover, but because you don't know what other malware you might have lurking on your computer which is waiting to steal your bitcoin if you regain access to your wallet.


Title: Re: Recovery process
Post by: CryptoSh1va on January 12, 2022, 11:37:56 AM
I have used btcrecover several times to help others crack forgotten passwords or incomplete seed phrases.
Sorry, just curious: do others just trust you and provide their phrases/passwords? Or do you provide paid services?


Title: Re: Recovery process
Post by: PawGo on January 12, 2022, 11:52:05 AM
I have used btcrecover several times to help others crack forgotten passwords or incomplete seed phrases.
Sorry, just curious: do others just trust you and provide their phrases/passwords? Or do you provide paid services?

I think usually people are able to do the work themselves, they are just not aware of possible tools. As long as it does not require enormous computational power to find lost password, many things could be resolved on quite cheap hardware (it is just a matter of time). If you lost 1-2 words from your seed or you remember parts of wallet password or lost just a small piece of WIF - could be done at home...
Most of people who successfully gain access to their coins just disappear, very few of them appreciate help and sometimes toss a coin to their witcher...
On the other hand there are professionals for whom it is full-time business - but it requires a serious investments.


Title: Re: Recovery process
Post by: o_e_l_e_o on January 12, 2022, 12:05:39 PM
Sorry, just curious: do others just trust you and provide their phrases/passwords? Or do you provide paid services?
I mostly help others run the software themselves, and help them to construct appropriate tokenlists or seedlists (using surrogate strings such as "Word1" instead of their actual words) as that is often the most difficult part if you have never done it before, and the syntax can be quite confusing to get right, especially with complex passwords or passphrases. I do not offer paid services per se, but I have ran the software on behalf of other people before. If you are looking for a paid service, then this site often gets good reviews - https://www.walletrecoveryservices.com/ - although I have never used them myself and therefore cannot personally vouch for them.

I'd encourage you to try do it yourself first, though. As PawGo says, it is often feasible on your own computer. If you run in to problems, post here and we will try to help.


Title: Re: Recovery process
Post by: k844738i on January 12, 2022, 12:11:59 PM
Most of people who successfully gain access to their coins just disappear, very few of them appreciate help and sometimes toss a coin to their witcher...
Okay, I will remember that!


So far I have installed btcrecover on Mac. It seems working "by default" everything, but I am not sure how to proceed further with the issue I have.
I have a textfile in the same directory of various patterns I think I used. It is called pattern1.txt
As I understand the btcrecover will check it against already existing wallet in the directory. But I don't have the original wallet with the funds. The HDD failed with the full disk encryption, so it is lost as a file.
So I need to get various private key WIF outputs, and simply to import them into a new wallet and check it if the balance appears.

What is the code I need to enter?


Title: Re: Recovery process
Post by: TheBeardedBaby on January 12, 2022, 12:12:40 PM
~
I had it for years on my computer. But the computer crashed and I am now unable to remember what the string entry was.

What's wrong with the computer? Most of the time it's easier to fix the computer and extract the data instead of going trough all the btcrecover thing and waist time and resources.

OK, now I saw this in the previous message.
Quote
The HDD failed with the full disk encryption, so it is lost as a file.

Give us a bit more info about it? How it failed, noise, *bang* with smoke, not detected into the system. What type of drive you have hdd, 2.5" or 3.5" (SSD?), model.


Title: Re: Recovery process
Post by: o_e_l_e_o on January 12, 2022, 12:18:22 PM
I have a textfile in the same directory of various patterns I think I used. It is called pattern1.txt
How many patterns do you have? Rather than manually listing every pattern you can think of, it's usually better to create a tokens file while btcrecover will use to create patterns for you. For example, if you think you used A, B, and C in your passphrase, but you can't remember what order, then your tokens file would look like this:

Code:
A
B
C

btcrecover would then combine those in every possible way and try all of the following:

Code:
A
B
C
AB
AC
BA
BC
CA
CB
ABC
ACB
BAC
BCA
CAB
CBA

As I understand the btcrecover will check it against already existing wallet in the directory. But I don't have the original wallet with the funds. The HDD failed with the full disk encryption, so it is lost as a file.
Do you know the address that the coins are stored on? If so, you can ask btcrecover simply to check for the address in question.


Title: Re: Recovery process
Post by: PawGo on January 12, 2022, 12:50:45 PM
If you do not know your address you will have to create Address Database for btcrecover:
https://btcrecover.readthedocs.io/en/latest/Creating_and_Using_AddressDB/

You are interested in part "Creating an AddressDB from an Address List". Like I said before - you may download list of all btc addresses from https://gz.blockchair.com/bitcoin/addresses/ and then try to find addresses which are close to your expected amount of coins.


Title: Re: Recovery process
Post by: CryptoSh1va on January 12, 2022, 08:17:58 PM
Sorry, just curious: do others just trust you and provide their phrases/passwords? Or do you provide paid services?
I mostly help others run the software themselves, and help them to construct appropriate tokenlists or seedlists (using surrogate strings such as "Word1" instead of their actual words) as that is often the most difficult part if you have never done it before, and the syntax can be quite confusing to get right, especially with complex passwords or passphrases. I do not offer paid services per se, but I have ran the software on behalf of other people before. If you are looking for a paid service, then this site often gets good reviews - https://www.walletrecoveryservices.com/ - although I have never used them myself and therefore cannot personally vouch for them.

I'd encourage you to try do it yourself first, though. As PawGo says, it is often feasible on your own computer. If you run in to problems, post here and we will try to help.
The question was asked with a slightly different purpose:
I was wondering that now in every wallet there are several warnings for users - not to transfer their seed to other people,
but apparently people pass by and still give their value to someone else.
People can't be fixed)


Title: Re: Recovery process
Post by: BlackHatCoiner on January 12, 2022, 08:28:27 PM
but apparently people pass by and still give their value to someone else.
People can't be fixed
Funny how the majority of the people are financially illiterate enough to ignore the function of the current monetary system and trust blindly a process that is provably meant to corrupt at some point in the future.

Yeah, those you said too.


Title: Re: Recovery process
Post by: TheBeardedBaby on January 13, 2022, 09:15:28 PM
The HDD failed with the full disk encryption, so it is lost as a file.

1. What do you mean by failed? Bad sector, error when it's mounted, fall from high height?
2. If you remember the password or has encryption key, usually it's possible to recover your file. Although usually it require paid software or some technical knowledge.

I asked the same question above, if he manage to recover the drive, no need to worry about btcrecover.


Title: Re: Recovery process
Post by: linbiao on January 17, 2022, 12:38:16 AM
that sounds definitely doable, i would try the following, preferably on a completely offline device:
1. get all known addresses with more than 100 BTC (i guess this will be order of magnitude 100.000 so not that big)
2. write a script to generate candidate passphrases (it seems you have done this already)
3. use your bitcoin library of choice to convert sha256 of passphrases to addresses and match with the candidate addresses.

in case you just have millions of addresses it should be doable in a matter of hours or days.



Title: Re: Recovery process
Post by: o_e_l_e_o on January 17, 2022, 09:38:25 AM
1. get all known addresses with more than 100 BTC (i guess this will be order of magnitude 100.000 so not that big)
Around 16,000 according to https://blockchair.com/bitcoin/addresses?q=balance(10000000000..)

2. write a script to generate candidate passphrases (it seems you have done this already)
3. use your bitcoin library of choice to convert sha256 of passphrases to addresses and match with the candidate addresses.
This is exactly what btcrecover will do, as has been suggested previously. No need for him to write his own script to do it.

OP, have you made any progress? Are you stuck with something?


Title: Re: Recovery process
Post by: CrunchyF on January 19, 2022, 08:43:00 AM
Hello.
I have been trying to recover my wallet with about 180BTC almost for one year.
I was ”clever” enough to create a wallet with SHA256 custom string entry, and didn’t bother saving neither SHA256 result of it nor the private key WIF. I had it for years on my computer. But the computer crashed and I am now unable to remember what the string entry was. However, I know what keys I used but cannot remember the pattern.

I generate hashes from various patterns, as described above, and enter the hash results into https://www.bitaddress.org/ under “Wallet Address” and then try to import the private WIF into a new wallet. However it is a very slow process. Is there any tool/website that can create multiple private WIF keys from numerous hash entries?

Please, refrain yourself from sending me private messages in order to "help" me, reply only here in the public thread. Thanks.

Hello,
Have you sucess to recover your sha256 wallet?
In case of not i can propose you the help of my own software.
Ive optimised it to be as fast as possible.

It can try around 50Mega keys (sha256 brainwallet) per seconds on a rtx 3070.

Btcrecover can only kilo k /sec

If you want I can help you to recover your funds.

Fanch


Title: Re: Recovery process
Post by: CrunchyF on February 23, 2022, 03:21:10 PM
Hello.
I have been trying to recover my wallet with about 180BTC almost for one year.
I was ”clever” enough to create a wallet with SHA256 custom string entry, and didn’t bother saving neither SHA256 result of it nor the private key WIF. I had it for years on my computer. But the computer crashed and I am now unable to remember what the string entry was. However, I know what keys I used but cannot remember the pattern.

I generate hashes from various patterns, as described above, and enter the hash results into https://www.bitaddress.org/ under “Wallet Address” and then try to import the private WIF into a new wallet. However it is a very slow process. Is there any tool/website that can create multiple private WIF keys from numerous hash entries?

Please, refrain yourself from sending me private messages in order to "help" me, reply only here in the public thread. Thanks.

Hi i wrote my custom program with CUDA capable of 100Millions guess by second on sha256 brainwallet with a RTX3070.
The program is easy customisable  because he read what is send by a string generator to the stdin entry with the following form.

./string_generator | ./my_program hash160_of_target_address

If you can well define a pattern of your passphrase i can help you.

Fanch


Title: Re: Recovery process
Post by: Cricktor on March 14, 2022, 05:18:55 PM
Hello.
I have been trying to recover my wallet with about 180BTC almost for one year.
I was ”clever” enough to create a wallet with SHA256 custom string entry, and didn’t bother saving neither SHA256 result of it nor the private key WIF. I had it for years on my computer. But the computer crashed and I am now unable to remember what the string entry was. However, I know what keys I used but cannot remember the pattern.
Can you elaborate a little bit more on how you created your wallet? I (and maybe others) don't get all the pieces together.
You had a custom string from which you derived its SHA256. This resulting 32 Byte SHA256 hash string could serve as a seed for a HD wallet or as a raw private key which you could've converted to WIF format for a single address paperwallet. The former would create a whole wallet with possibly lots of used addresses, the later just one paperwallet holding all your ~180BTC.

Having no documentation of your "clever procedure" backfires on you, apparently. I mention this solely as a warning to other users that this is a recipe for coin desaster as storage for wallets can always fail. And sorry to add: no backups, no mercy (again, to emphasize the importance for backups, especially for such wealth, and for anything stored on a device that is more worth than the device and it's backup combined).

If you had a wallet on your failed drive: was the wallet sufficiently password protected? Strong enough password? Do you remember that password with confidence?
If it was good enough password protected you could ask for professional data recovery from your failed device (there are a few well known companies for such tasks). You can ask for a quote and it may cost you some decent amount of money, but might be a more promissing path for recovery, depending on your current recovery puzzle.
If your wallet wasn't properly password protected then a professional data recovery might be a potential risk for your Bitcoins.

What exactly have you done in the past year of your recovery trial? Just curious to get a glimpse of what puzzle pieces you obtained in that time.

The suggestions to look for your address(es) in some address dumps assume that your 180BTC are on a single address which I doubt if you had a full wallet. If you had a paperwallet, then it shouldn't be too hard to find some address candidates.

I am asking for more details because usually people can provide more focused help if the puzzle is laid out more accurately.


Title: Re: Recovery process
Post by: sirstevie6 on May 09, 2022, 06:25:16 PM
If you are still unable to recover your bitcoin from the wallet - it may be worth considering professional services - they do however cost -

https://bringbackmycrypto.com - charge 10%

https://www.walletrecoveryservices.com - charge 20%

There is also a Russian guy on Telegram - not sure what he charges but he seems to have been about for a while.

Most offer a no fix no feee basis.

Probably worth using the free tools like btcrecover/hashcat etc.. but if your password is 8+ characters long - it can take a while!

All the best