Skip to content

Commit

Permalink
Try to decrypt a LUKS volume.
Browse files Browse the repository at this point in the history
  • Loading branch information
glv2 committed Jul 6, 2014
1 parent 5cd5801 commit 8d8fc42
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 386 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
aclocal.m4
autom4te.cache/
/bruteforce-wallet
/bruteforce-luks
compile
config.log
config.status
Expand Down
7 changes: 1 addition & 6 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
2014-07-04 Guillaume LE VAILLANT <guillaume.le.vaillant@openmailbox.org>
Version 1.1
Add the possibility to specify the beginning and the end of the
password (-b and -e options).

2014-06-22 Guillaume LE VAILLANT <guillaume.le.vaillant@openmailbox.org>
2014-07-06 Guillaume LE VAILLANT <guillaume.le.vaillant@openmailbox.org>
Version 1.0
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = bruteforce-wallet
bruteforce_wallet_SOURCES = src/bruteforce-wallet.c src/elliptic-curve.c
bin_PROGRAMS = bruteforce-luks
bruteforce_luks_SOURCES = src/bruteforce-luks.c
5 changes: 1 addition & 4 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
Version 1.1
2014-07-04

Version 1.0
2014-06-22
2014-07-06
30 changes: 11 additions & 19 deletions README
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
bruteforce-wallet
=================
bruteforce-luks
===============

The purpose of this program is to try to find the password of an encrypted
Peercoin (or Bitcoin, Litecoin, etc...) wallet file (i.e.: wallet.dat).
The purpose of this program is to try to find the password of a LUKS
encrypted volume.

The program tries to decrypt one of the encrypted addresses in the wallet by
trying all the possible passwords.
The program tries to decrypt at least one of the key slots by trying
all the possible passwords.
The minimum and maximum password length to try can be indicated as option
on the command line.
The beginning and the end of the password can be specified too.
Expand All @@ -15,29 +15,21 @@ to use.

## Dependencies

The program requires the OpenSSL and BerkeleyDB libraries.


## Limitations

Different versions of BerkeleyDB are usually not compatible with each other.
Therefore, for the program to work, you will have to check that the BerkeleyDB
version you are using can read the databases created by the BerkeleyDB version
your wallet was created with.
The program requires the cryptsetup library.


## Examples

Try to find the password of an encrypted wallet file using 4 threads, trying
Try to find the password of a LUKS encrypted volume using 4 threads, trying
only passwords with 5 characters:

bruteforce-wallet -t 4 -l 5 -m 5 wallet.dat
bruteforce-luks -t 4 -l 5 -m 5 /dev/sdb1


Try to find the password of an encrypted wallet file using 8 threads, trying
Try to find the password of a LUKS encrypted volume using 8 threads, trying
only passwords with 5 to 10 characters beginning with "W4l" and ending with "z":

bruteforce-wallet -t 8 -l 5 -m 10 -b "W4l" -e "z" wallet.dat
bruteforce-luks -t 8 -l 5 -m 10 -b "W4l" -e "z" /dev/sda2


## Donations
Expand Down
19 changes: 8 additions & 11 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
AC_INIT(bruteforce_wallet, 1.1)
AC_INIT(bruteforce_luks, 1.0)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR(src/bruteforce-wallet.c)
AC_CONFIG_SRCDIR(src/bruteforce-luks.c)

dnl Check for toolchain and install components
AC_PROG_CC
AC_PROG_INSTALL

dnl Check for standard headers
AC_CHECK_HEADERS([stdio.h stdlib.h string.h unistd.h])
AC_CHECK_HEADERS([errno.h stdio.h stdlib.h string.h unistd.h])

dnl Check for functions
AC_CHECK_FUNCS([malloc free])
AC_CHECK_FUNCS([perror printf fprintf])
AC_CHECK_FUNCS([perror printf fprintf snprintf])
AC_CHECK_FUNCS([atoi])
AC_CHECK_FUNCS([memcmp memset strlen strncpy])
AC_CHECK_FUNCS([strlen strncpy])
AC_CHECK_FUNCS([getopt])

dnl Check for libraries
AC_CHECK_LIB(pthread, pthread_create, [], AC_MSG_ERROR([POSIX threads library required]))
AC_CHECK_HEADERS(pthread.h, [], AC_MSG_ERROR([OpenSSL headers required]))
AC_CHECK_HEADERS(pthread.h, [], AC_MSG_ERROR([POSIX threads headers required]))

AC_CHECK_LIB(crypto, EVP_get_cipherbyname, [], AC_MSG_ERROR([OpenSSL libraries required]))
AC_CHECK_HEADERS([openssl/ec.h openssl/evp.h openssl/obj_mac.h], [], AC_MSG_ERROR([OpenSSL headers required]))

AC_CHECK_LIB(db, db_create, [], AC_MSG_ERROR([BerkeleyDB library required]))
AC_CHECK_HEADERS(db.h, [], AC_MSG_ERROR([BerkeleyDB headers required]))
AC_CHECK_LIB(cryptsetup, crypt_activate_by_passphrase, [], AC_MSG_ERROR([cryptsetup library required]))
AC_CHECK_HEADERS(libcryptsetup.h, [], AC_MSG_ERROR([cryptsetup headers required]))

AC_CONFIG_FILES(Makefile)
AC_OUTPUT
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ EAPI="5"

inherit eutils autotools

DESCRIPTION="A bruteforce cracker for Peercoin (and Bitcoin, Litecoin, etc...) encrypted wallet files."
DESCRIPTION="A bruteforce cracker for LUKS encrypted volumes."
HOMEPAGE="https://github.com/glv2/${PN}"
SRC_URI="https://github.com/glv2/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

Expand All @@ -14,8 +14,7 @@ SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"

DEPEND="
dev-libs/openssl
sys-libs/db
sys-fs/cryptsetup
"
RDEPEND="${DEPEND}"

Expand Down

This file was deleted.

Loading

0 comments on commit 8d8fc42

Please sign in to comment.