RU -> ENG below
Прочитав достаточно статей на английском и русском языке про извлечение приватного ключа из слабых подписей в сети Биткоин и не найдя что-то подобное на этом форуме,я решил написать практический скрипт для восстановления приватного ключа в сетях ETH, BSC, Polygon и тп.
(тестировал только в этих,но суть атаки одна во всех подобных сетях)
Скрипт сравнивает все пары транзакций от одного адреса и проверяет: есть ли одинаковое r
Восстановление возможно только в том случае если с адреса отправлено как минимум 2 транзакции.
Должен отметить что поиск таких подписей занимает очень мого времени и ресурсов.
Поэтому я написал отдельный скрипт,который отправляет в сеть две транзакции со слабой подписью (одинаковое r) чтобы в дальнейшем извлечь из них нужные мне данные.
Для подключения и вызова нужных функций я пользовался бесплатной версией infura(не советую так. лучше покупать платную подписку чтобы делать запросы быстрее и не терять много времени,а еще лучше иметь свою ноду)
Скрипт протестирован,работает.
Если вам интересен этот скрипт или у вас дополнительные вопросы по работе скрипта,предложения или идеи,то пишите в ЛС.
Желательно чтобы у вас были познания в установке и запуске Nodejs если захотите протестировать,или же базовые знания как пользоваться windows PowerShell чтобы запустить скрипт на удаленном CPU сервере.
English
After reading many articles in both English and Russian about extracting private keys from weak signatures on the Bitcoin network — and not finding anything similar on this forum — I decided to write a practical script for recovering private keys on networks like ETH, BSC, Polygon, etc.
(I’ve only tested it on these networks, but the essence of the attack is the same across all ECDSA-based blockchains.)
The script compares all pairs of transactions from the same address and checks if they share the same r value.
Recovery is only possible if at least two transactions have been sent from the address.
I should note that searching for such signatures takes a lot of time and resources.
That’s why I wrote a separate script that sends two transactions with a weak signature (same r) to the network — so that I could later extract the necessary data from them.
To connect and call the necessary functions, I used the free version of Infura (though I don’t recommend it — it’s better to buy a paid subscription for faster requests and less downtime, or even better — run your own full node).
The script has been tested and works.
If you’re interested in the script, or if you have any questions, suggestions, or ideas, feel free to message me directly.
It’s preferable that you have some experience with installing and running Node.js, if you want to test it — or at least basic knowledge of Windows PowerShell to launch the script on a remote CPU server.
Прочитав достаточно статей на английском и русском языке про извлечение приватного ключа из слабых подписей в сети Биткоин и не найдя что-то подобное на этом форуме,я решил написать практический скрипт для восстановления приватного ключа в сетях ETH, BSC, Polygon и тп.
(тестировал только в этих,но суть атаки одна во всех подобных сетях)
Скрипт сравнивает все пары транзакций от одного адреса и проверяет: есть ли одинаковое r
Восстановление возможно только в том случае если с адреса отправлено как минимум 2 транзакции.
Должен отметить что поиск таких подписей занимает очень мого времени и ресурсов.
Поэтому я написал отдельный скрипт,который отправляет в сеть две транзакции со слабой подписью (одинаковое r) чтобы в дальнейшем извлечь из них нужные мне данные.
Для подключения и вызова нужных функций я пользовался бесплатной версией infura(не советую так. лучше покупать платную подписку чтобы делать запросы быстрее и не терять много времени,а еще лучше иметь свою ноду)
Скрипт протестирован,работает.
Если вам интересен этот скрипт или у вас дополнительные вопросы по работе скрипта,предложения или идеи,то пишите в ЛС.
Желательно чтобы у вас были познания в установке и запуске Nodejs если захотите протестировать,или же базовые знания как пользоваться windows PowerShell чтобы запустить скрипт на удаленном CPU сервере.
English
After reading many articles in both English and Russian about extracting private keys from weak signatures on the Bitcoin network — and not finding anything similar on this forum — I decided to write a practical script for recovering private keys on networks like ETH, BSC, Polygon, etc.
(I’ve only tested it on these networks, but the essence of the attack is the same across all ECDSA-based blockchains.)
The script compares all pairs of transactions from the same address and checks if they share the same r value.
Recovery is only possible if at least two transactions have been sent from the address.
I should note that searching for such signatures takes a lot of time and resources.
That’s why I wrote a separate script that sends two transactions with a weak signature (same r) to the network — so that I could later extract the necessary data from them.
To connect and call the necessary functions, I used the free version of Infura (though I don’t recommend it — it’s better to buy a paid subscription for faster requests and less downtime, or even better — run your own full node).
The script has been tested and works.
If you’re interested in the script, or if you have any questions, suggestions, or ideas, feel free to message me directly.
It’s preferable that you have some experience with installing and running Node.js, if you want to test it — or at least basic knowledge of Windows PowerShell to launch the script on a remote CPU server.