Giter Club home page Giter Club logo

cracker-ng's Introduction

Cracker-ng

Cracker-ng, a multiple file password finder. For now, there are these modules:

  • zip cracker (zip, winzip, apm, ipa, and all zip based files),
  • ccrypt cracker (cpt, antigift) [from the 2nd version (1.1) to the latest (1.10), 1.0 is buggy]

What this tool does not:

  • call a tierce tool like unrar or unzip to check the password (and will never)
  • compute permutations (will change) or create wordlists

What this tool does:

  • understand the data format (see src/*)
  • check the password using the way official tool does
  • use optimized routines
  • read passwords from a wordlist or STDIN:
    • cat, john, crunch or whatever you want for wordlist attack

Installation

$ git clone https://github.com/BoboTiG/cracker-ng.git
$ cd cracker-ng

For testers and contributors, always work with on the devel branch:

$ git checkout devel

To show available commands:

$ make

Example to build the ZIP module:

$ make zip

Build the debug version (for testers and contributors):

$ DEBUG=1 make zip

The final executable file will be stored into bin folder.

Man

Usage: <MODULE>cracker-ng -f FILE

Examples with ZIP module:

# Using STDIN to use power of other tools
$ cat wordlist.lst | zipcracker-ng -f FILE  -
$ john --incremental --stdout | zipcracker-ng -f FILE -
$ crunch 1 8 -f charset.lst lalpha | zipcracker-ng -f FILE -

# Or using a wordlist
$ zipcracker-ng -f FILE -w wordlist.lst

Why

I wrote this tool when I saw poor resources we have on Unix for ZIP and RAR files password cracking. Hope it will be helpful.

License

Copyright (C) 2011-2022 by Mickaël 'Tiger-222' Schoentgen.

Cracker-ng comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under
certain conditions. See the GNU General Public Licence for details.

cracker-ng's People

Contributors

bobotig avatar drydenp avatar falcoger avatar zenaker 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cracker-ng's Issues

Spelling error in usage

Fix:

diff --git a/src/main.cc b/src/main.cc
index 571449d..96ae483 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -149,7 +148,7 @@ void help(const std::string& module) {
                "\nAvailable options:\n"
                "    -f,  --file       file to crack\n"
                "    -,   --stdin      read from STDIN\n"
-               "    -w,  --wordlist   dictionnary to use\n"
+               "    -w,  --wordlist   dictionary to use\n"
                "    -h,  --help       display this message\n"
                "    -v,  --version    display module version\n"
                "\nZIP specific options:\n"

Didn't work with crunch generator.|

Hi Dev,

First of all thanks for this tool, was looking for this long time ago.

Right now Im testing your tool but have problem using crunch with it, This is the line I run:

./cptcracker-ng -f testfile.cpt - crunch 1 4 -f charset.txt mixalpha-numeric

The app show this in screen:

~ CPT Cracker-ng v2015.02-03 { Tiger-222 } ~

  • File......: testfile.cpt

  • Generator.: STDIN
    . Working at 0K pwd/sec [0M tries]

    but tries and pwd/sec never change.

Im running it on ubuntu server 14.04 and latest version downloaded from github,

Thanks!

Doesn't compile

This doesn't compile, because it throws an error

make cpt
 + Building cpt module ...
make -C src/ cpt clean DEBUG=0
make[1]: Entering directory '[...]/cracker-ng/src'
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c shared/functions.cc -o cptfunctions.o -DCPT
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c cpt/rijndael.cc
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c cpt/tables.cc
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c shared/stats.cc
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c shared/gui.cc
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c shared/cracker.cc -o cptcracker.o -DCPT
In file included from shared/cracker.cc:13:
shared/./cracker.h: In member function ‘size_t Cracker::istrlen(const char*)’:
shared/./cracker.h:73:33: error: ISO C++17 does not allow ‘register’ storage class specifier [-Werror=register]
   73 |                 register size_t len = 0;
      |                                 ^~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:42: cptcracker.o] Error 1
make[1]: Leaving directory '[...]/cracker-ng/src'
make: *** [Makefile:21: cpt] Error 2

Fix:

diff --git a/src/shared/cracker.h b/src/shared/cracker.h
index 9bf64ec..1b76c12 100644
--- a/src/shared/cracker.h
+++ b/src/shared/cracker.h
@@ -70,8 +70,8 @@ private:
        Cracker & operator=(const Cracker &);

        inline size_t istrlen(const char *s) {
-               register size_t len = 0;
-               register unsigned x;
+               size_t len = 0;
+               unsigned x;
                for( ;; ) {
                        x = *(unsigned*)s;
                        if ( (x & 0xFF) == 0 ) return len;

Doesn't stop on first match

The program keeps on trying all the passwords until the wordlist file ends or until the pipe is closed when the input ceases. This is an issue especially because

  1. It wastes time, trying passwords that do not need to be tried
  2. It may never terminate if the generator used does not terminate on it's own (for example hashcat with stdout in brute force mode)

Test case

echo "This is a secret" > secret.txt
ccrypt -e -K p4ssw0rd secret.txt
cptcrypt-ng -w /usr/share/seclists//Passwords/Leaked-Databases/rockyou-75.txt

This will run through all words in the list. (check against wc -l)

If you have a substancial wordlist and you put the test case at the very start (say the entire rockyou database and your password is 123456), then it will run through all 14M passwords.

cptcracker-ng -w [...]/SecLists/Passwords/Leaked-Databases/rockyou.txt -f testcrypt.txt.cpt

 ~ CPT Cracker-ng v2.0.0-dev ~
 - File......: testcrypt.txt.cpt
 - Generator.: rockyou.txt
 . Worked at 421,948 pwd/sec
   Combinations: 14,346,259
   Working time: 34 sec
 + Password found: p4ssw0rd
   HEXA[ 70 34 73 73 77 30 72 64 ]
 ^ Ex(c)iting.
                                                                                                                                                                   [ 1m-25,898s ]
grep -n "p4ssw0rd" [...]/SecLists/Passwords/Leaked-Databases/rockyou.txt
40860:p4ssw0rd
[...]
wc -l [...]SecLists/Passwords/Leaked-Databases/rockyou.txt
14344391[...]/SecLists/Passwords/Leaked-Databases/rockyou.txt

With 422k pwd/s it shouldn't take 34 seconds to reach the 41000th line but rather about 1 second.

make[1]: g++: No such file or directory, [Makefile:45: cptfunctions.o] Error 127

I'm trying to compile this with no luck and not sure if it's a bug or something on my end.

Ubuntu 22.04.1 LTS

witcher:~/Desktop/cracker-ng$ make modules
 ~ Cracker-ng, a multiple file password finder.
 + Building cpt module ...
make -C src/ cpt clean DEBUG=0
make[1]: Entering directory '/home/witcher/Desktop/cracker-ng/src'
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c shared/functions.cc -o cptfunctions.o -DCPT
make[1]: g++: No such file or directory
make[1]: *** [Makefile:45: cptfunctions.o] Error 127
make[1]: Leaving directory '/home/witcher/Desktop/cracker-ng/src'
make: *** [Makefile:21: cpt] Error 2

make modules fails unexpectedly

I am trying this tool and i understand that after make i should run make modules but i experience this error

$ make modules 
 ~ Cracker-ng, a multiple file password finder.
 + Building cpt module ...
make -C src/ cpt clean DEBUG=0
make[1]: Entering directory '/home/bizmate/Documents/cracker-ng/src'
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c shared/functions.cc -o cptfunctions.o -DCPT
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c cpt/rijndael.cc
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c cpt/tables.cc
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c shared/gui.cc
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c shared/cracker.cc -o cptcracker.o -DCPT
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c main.cc -o cptmain.o -DCPT
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -o cptcracker-ng cptfunctions.o rijndael.o tables.o stats.o gui.o cptcracker.o cptmain.o -lpthread
rm -f *.o
make[1]: Leaving directory '/home/bizmate/Documents/cracker-ng/src'
mv src/cptcracker-ng bin/
 + Building zip module ...
make -C src/ zip clean DEBUG=0
make[1]: Entering directory '/home/bizmate/Documents/cracker-ng/src'
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c shared/functions.cc -o zipfunctions.o -DZIP
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c shared/stats.cc
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c shared/gui.cc -o zipgui.o -DZIP
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c zip/read.cc
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c zip/puff.cc
g++ -O3 -ffast-math -march=native -D_FILE_OFFSET_BITS=64 -Wfatal-errors -Werror -Wall -W -pedantic -Wextra -Wunused -Wformat=2 -Weffc++ -Wpadded -fexceptions -c shared/cracker.cc -o zipcracker.o -DZIP
In file included from shared/./cracker.h:27,
                 from shared/cracker.cc:13:
shared/././../zip/crypt.h: In function ‘uint32_t create_crc32(const unsigned char*, size_t)’:
shared/././../zip/crypt.h:48:27: error: ISO C++17 does not allow ‘register’ storage class specifier [-Werror=register]
   48 |         register uint32_t crc = 0xffffffff;
      |                           ^~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:65: zipcracker.o] Error 1
make[1]: Leaving directory '/home/bizmate/Documents/cracker-ng/src'
make: *** [Makefile:21: zip] Error 2

the make output is

$ make
 ~ Cracker-ng, a multiple file password finder.
 - Available modules are: cpt zip
 + Try 'make <module>' to build <module>cracker-ng.
 + Try 'make modules' to build all modules.

Am I missing something or is this a genuine bug?

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.