Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
Release v3.7 (#18)
Browse files Browse the repository at this point in the history
* Added 20 to parameters.sh

* Changed all processors

* Introduced hash-cracker.conf static config file

* Removed mandatory and optional checks

* Merged mandatory and optional + extra checks

* Function edit + version

* VERSION.md

* README.md

* Fix

* Fix

* Re-enabled tasks

* Small change
  • Loading branch information
crypt0rr authored Aug 4, 2023
1 parent 720550c commit 098f43a
Show file tree
Hide file tree
Showing 33 changed files with 226 additions and 120 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,23 @@ Note: flags are optional, by default hash-cracker will run with optimized kernel
Disable the use of optimized kernels (un-limits password length)
--hwmon-enable
Enable hashcat to do hardware monitoring
-m / --module-info
--module-info
Display information around modules/options
-s [hash-name] / --search [hash-name]
Will search local DB for hash module. E.g. '-s ntlm'
--static
Use the 'hash-cracker.conf' static configuration file.
```

## Static Configuration File

By default, hash-cracker will run in 'ask you all variable' mode. When specifying `--static` the `hash-cracker.conf` file is used for some basic settings. You can specify:

- `HASHCAT` - binary path where you've installed [hashcat](https://github.com/hashcat/hashcat)
- `HASHTYPE` - mode hashcat will run in (e.g. 1000 (NTLM))
- `HASHLIST` - file containing target hashes
- `POTFILE` - specify the potfile you want to use / create

## Example Hashes

Example hashes are provided in 3 formats within the `example-hashes` directory.
Expand Down
7 changes: 7 additions & 0 deletions VERSION.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Version log

## v3.7 - Just before

* Introduced `hash-cracker.conf` to set a static config yourself
* Merged `mandatory-checks.sh` and `optional-checks.sh` into `parameters.sh`
* Changed all processors to use the static config file if chosen
* Option to use the static config `--static`

## v3.6 - World Password Day

* Removed `-m` from module information
Expand Down
11 changes: 11 additions & 0 deletions hash-cracker.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Hashcat path
HASHCAT=(/usr/local/bin/hashcat)

# Hashtype
HASHTYPE=1000

# File containing target hashes
HASHLIST=input

# Potfile you want to use
POTFILE=hash-cracker.pot
9 changes: 2 additions & 7 deletions hash-cracker.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/

function hash-cracker () {
echo -e "hash-cracker v3.6 Apple Silicon Edition by crypt0rr (https://github.com/crypt0rr)\n"
echo -e "Mandatory modules:"
source scripts/mandatory-checks.sh
echo -e "\nOptional modules:"
source scripts/optional-checks.sh
echo -e "\nhash-cracker v3.7 Apple Silicon Edition by crypt0rr (https://github.com/crypt0rr)"
}

function menu () {
Expand All @@ -32,7 +28,6 @@ function menu () {
echo "19. Digit remover"
echo -e "20. Stacker\n"


read -p "Please enter job number: " START
if [[ "$START" = "0" ]] || [[ "$START" = "exit" ]]; then
echo "Bye..."; exit 1
Expand Down
2 changes: 1 addition & 1 deletion scripts/extensions/search.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/
TYPELIST="scripts/extensions/hashtypes"

echo -e "\n"
Expand Down
22 changes: 0 additions & 22 deletions scripts/mandatory-checks.sh

This file was deleted.

24 changes: 0 additions & 24 deletions scripts/optional-checks.sh

This file was deleted.

54 changes: 53 additions & 1 deletion scripts/parameters.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/

if [ "$1" == '-h' ] || [ "$1" == '--help' ]; then
echo -e "Note: flags are optional, by default hash-cracker will run with optimized kernels enabled and perform loopback actions."
Expand All @@ -10,6 +10,7 @@ if [ "$1" == '-h' ] || [ "$1" == '--help' ]; then
echo -e "\t--hwmon-enable\n\t\t Enable hashcat to do hardware monitoring"
echo -e "\t--module-info\n\t\t Display information around modules/options"
echo -e "\t-s [hash-name] / --search [hash-name]\n\t\t Will search local DB for hash module. E.g. '-s ntlm'"
echo -e "\t--static\n\t\t Use the 'hash-cracker.conf' static configuration file."
exit 1
elif [ "$1" == '--module-info' ]; then
echo "Information about the modules"
Expand All @@ -32,6 +33,7 @@ elif [ "$1" == '--module-info' ]; then
echo "17. Markov-chain password generator will generate new password sets based on Time-Space Tradeoff - https://www.cs.cornell.edu/~shmat/shmat_ccs05pwd.pdf"
echo "18. Custom Word List Generator - CeWL - Spiders a given URL and creates a custom wordlist."
echo "19. Will take the potfile, strip the digits from the cleartexts and perform a hybrid attack accordingly, thereafter some rules to finish the job."
echo "20. Using the stacking58.rule with a rule stacked on top of it to create even more variation on the randomness."
exit 1
elif [ "$1" == '-s' ] || [ "$1" == '--search' ]; then
TYPELIST="scripts/extensions/hashtypes"
Expand All @@ -45,13 +47,63 @@ while [[ "$#" -gt 0 ]]; do
-n|--no-limit) KERNEL=' ' ;;
-l|--no-loopback) LOOPBACK=' ' ;;
--hwmon-enable) HWMON=' ';;
--static) CONFIGFILE=' ' ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
done

if [ "$CONFIGFILE" = ' ' ]; then
STATICCONFIG=true
else
STATICCONFIG=false
fi

hash-cracker

# Requirements
if [[ "$STATICCONFIG" = true ]]; then
source hash-cracker.conf
else
HASHCAT=$(command -v hashcat)
POTFILE=(hash-cracker.pot)
fi

# Logic
echo -e "\nMandatory modules:"
if ! [ -x "$(command -v $HASHCAT)" ]; then
echo '[-] Hashcat is not installed or sourced in your profile'; ((COUNTER=COUNTER + 1))
else
echo '[+] Hashcat is installed'
fi
if test -f "$POTFILE"; then
echo '[+] Potfile' $POTFILE 'present'
else
echo '[-] Potfile not present, will create' $POTFILE
touch $POTFILE
fi
if [ "$COUNTER" \> 0 ]; then
echo -e "\nNot all mandatory requirements are met. Please fix and try again."; exit 1
fi

echo -e "\nOptional modules:"
if [[ -x "scripts/extensions/common-substr" ]]; then
echo '[+] Common-substr is executable'
else
echo '[-] Common-substr is not executable or found (option 10 / 11)'
fi
if [[ -x "scripts/extensions/hashcat-utils/bin/expander.bin" ]]; then
echo '[+] Expander is executable'
else
echo '[-] Expander is not available/executable or found, this is needed for fingerprint cracking'
fi
if [[ -x "scripts/extensions/cewl/cewl.rb" ]]; then
echo '[+] CeWL is executable'
CEWL="scripts/extensions/cewl/cewl.rb"
else
echo '[-] CeWL is not executable or found (option 18)'
fi

echo -e "\nVariable Parameters:"
if [ "$KERNEL" = ' ' ]; then
echo "[-] Optimised kernels disabled"
Expand Down
12 changes: 8 additions & 4 deletions scripts/processors/1-bruteforce.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/

# Requirements
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
if [[ "$STATICCONFIG" = true ]]; then
source hash-cracker.conf
else
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
fi

# Logic
$HASHCAT $KERNEL --bitmap-max=24 $HWMON --potfile-path=$POTFILE -m$HASHTYPE $HASHLIST -a3 '?a?a?a?a?a' --increment
Expand Down Expand Up @@ -32,4 +36,4 @@ $HASHCAT $KERNEL --bitmap-max=24 $HWMON --potfile-path=$POTFILE -m$HASHTYPE $HAS
$HASHCAT $KERNEL --bitmap-max=24 $HWMON --potfile-path=$POTFILE -m$HASHTYPE $HASHLIST -a3 '?d?d?d?d?d?d?d?d?u?u' --increment
$HASHCAT $KERNEL --bitmap-max=24 $HWMON --potfile-path=$POTFILE -m$HASHTYPE $HASHLIST -a3 '?d?d?l?d?d?l?d?d?l' --increment
$HASHCAT $KERNEL --bitmap-max=24 $HWMON --potfile-path=$POTFILE -m$HASHTYPE $HASHLIST -a3 '?d?d?u?d?d?u?d?d?u' --increment
echo -e "\nmBrute force processing done\n"
echo -e "\nBrute force processing done\n"
10 changes: 7 additions & 3 deletions scripts/processors/10-prefixsuffix.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/

# Requirements
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
if [[ "$STATICCONFIG" = true ]]; then
source hash-cracker.conf
else
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
fi

# Cleanup
function clean_up {
Expand Down
10 changes: 7 additions & 3 deletions scripts/processors/11-commonsubstring.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/

# Requirements
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
if [[ "$STATICCONFIG" = true ]]; then
source hash-cracker.conf
else
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
fi

# Cleanup
function clean_up {
Expand Down
10 changes: 7 additions & 3 deletions scripts/processors/12-pack-rule.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/

# Requirements
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
if [[ "$STATICCONFIG" = true ]]; then
source hash-cracker.conf
else
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
fi

# Cleanup
function clean_up {
Expand Down
10 changes: 7 additions & 3 deletions scripts/processors/13-pack-mask.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/

# Requirements
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
if [[ "$STATICCONFIG" = true ]]; then
source hash-cracker.conf
else
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
fi

# Cleanup
function clean_up {
Expand Down
10 changes: 7 additions & 3 deletions scripts/processors/14-fingerprint.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/

# Requirements
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
if [[ "$STATICCONFIG" = true ]]; then
source hash-cracker.conf
else
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
fi

# Cleanup
function clean_up {
Expand Down
10 changes: 7 additions & 3 deletions scripts/processors/15-multiple-wordlists.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/

# Requirements
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
if [[ "$STATICCONFIG" = true ]]; then
source hash-cracker.conf
else
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
fi
source scripts/selectors/multiple-wordlist.sh

# Rules
Expand Down
10 changes: 7 additions & 3 deletions scripts/processors/16-usernameaspassword.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/

# Requirements
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
if [[ "$STATICCONFIG" = true ]]; then
source hash-cracker.conf
else
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
fi

# Rules
source scripts/rules/rules.config
Expand Down
10 changes: 7 additions & 3 deletions scripts/processors/17-markov-generator.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/

# Requirements
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
if [[ "$STATICCONFIG" = true ]]; then
source hash-cracker.conf
else
source scripts/selectors/hashtype.sh
source scripts/selectors/hashlist.sh
fi

# Rules
source scripts/rules/rules.config
Expand Down
2 changes: 1 addition & 1 deletion scripts/processors/18-cewl.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright crypt0rr
# Author: crypt0rr - https://github.com/crypt0rr/

# Logic
read -p "Please enter the full URL to spider (e.g. https://kb.offsec.nl): " URL
Expand Down
Loading

0 comments on commit 098f43a

Please sign in to comment.